:root {
  color-scheme: light;
  --paper: #fafcf7;
  --white: #fff;
  --ink: #172f24;
  --muted: #4a6154;
  --green: #215a41;
  --green-dark: #184331;
  --line: #dfe8dc;
  --serif: Georgia, 'Noto Serif SC', 'Songti SC', SimSun, serif;
  --sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.5rem; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--sans);
}
#main { flex: 1 0 auto; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--green); text-decoration-thickness: .08em; text-underline-offset: .22em; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 1.4rem; height: 1.4rem; flex: none; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.12; }
:lang(zh-Hans) h1, :lang(zh-Hans) h2 { font-family: var(--sans); font-weight: 700; }
:focus-visible { outline: 3px solid #347954; outline-offset: 4px; }

.shell { width: min(100% - 4rem, 73.75rem); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%);
}
.skip-link { position: absolute; top: .65rem; left: .65rem; z-index: 2; padding: .65rem 1rem; background: white; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 4.75rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; width: fit-content; color: var(--ink); font-size: 1.12rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; color: #eff8e3; background: var(--green); border-radius: .7rem; }
.brand-mark svg { width: 1.25rem; height: 1.25rem; }
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.65rem; }
.site-header nav { justify-content: center; column-gap: clamp(1rem, 2.2vw, 1.65rem); }
.site-header nav a, .site-footer nav a { color: var(--muted); font-weight: 600; text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"], .site-footer nav a:hover { color: var(--green); text-decoration: underline; }
.nav-toggle { display: none; }
.language { justify-self: end; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; color: var(--green-dark); font-weight: 650; font-size: .875rem; text-decoration: none; white-space: nowrap; }
.language:hover { background: #edf5e7; }

.hero { display: grid; grid-template-columns: .94fr 1.06fr; align-items: stretch; gap: clamp(1.75rem, 5vw, 5.25rem); padding-block: 2.9rem 2.65rem; }
.hero-copy { align-self: center; padding-block: .75rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; padding: .3rem .75rem; border-radius: 999px; color: var(--green-dark); background: #e8f2e2; font-size: .875rem; font-weight: 700; }
.eyebrow span { display: block; width: .55rem; height: .55rem; border-radius: 50%; background: #679260; }
.hero h1 { margin-block: .85rem 1.15rem; font-size: clamp(2.65rem, 5.55vw, 5rem); letter-spacing: -.07em; line-height: .99; }
:lang(zh-Hans) .hero h1 { font-size: clamp(2.35rem, 4.6vw, 4.35rem); letter-spacing: -.055em; line-height: 1.18; }
.hero-lead { max-width: 32rem; color: var(--muted); font-size: clamp(1rem, 1.55vw, 1.17rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.65rem; }
.button { display: inline-flex; min-height: 2.9rem; align-items: center; justify-content: center; padding: .55rem 1rem; border: 1px solid transparent; border-radius: .72rem; font-weight: 700; text-decoration: none; }
.primary { background: var(--green); color: #fff; }
.primary:hover { background: var(--green-dark); }
.secondary { background: var(--white); border-color: var(--line); color: var(--green-dark); }
.secondary:hover { background: #eef5eb; border-color: #c3d4c1; }
.hero-image { width: 100%; height: 100%; min-height: 20rem; max-height: 28rem; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 60%; border-radius: 1.4rem; background: #e1ead7; }

h2 { font-size: clamp(1.9rem, 3vw, 2.8rem); letter-spacing: -.048em; }
.plant-icon { display: inline-grid; place-items: center; border-radius: .7rem; width: 2.65rem; height: 2.65rem; }
.leaf { background: #e9f2db; color: #315c3a; }
.mint { background: #e2f2e8; color: #285f4a; }
.peach { background: #faecd9; color: #804b28; }
.rose { background: #f8e9eb; color: #873e59; }
.sage { background: #e9eee1; color: #4d6447; }

.plant-section { padding-block: 1.65rem 3.6rem; border-top: 1px solid var(--line); }
.intro { margin-top: .55rem; color: var(--muted); }
.directory-controls { max-width: 46rem; margin-block: 1.1rem; }
.directory-toolbar { display: flex; align-items: stretch; gap: .65rem; }
.directory-toolbar .search-field { flex: 1; }
.directory-toolbar .button[aria-expanded="true"] { background: #e8f2e2; border-color: #c3d4c1; }
.light-options { min-width: 0; margin: .7rem 0 0; padding: 0; border: 0; }
.light-choices { position: relative; display: flex; flex-wrap: wrap; gap: .4rem; }
.light-choice { display: inline-flex; cursor: pointer; }
.light-choice span { display: inline-flex; align-items: center; min-height: 2.55rem; padding: .32rem .76rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--green-dark); font-size: .875rem; font-weight: 650; }
.light-choice:hover span { background: #eef5eb; }
.light-choice input:checked + span { background: var(--green); border-color: var(--green); color: var(--white); }
.light-choice input:focus-visible + span { outline: 3px solid #347954; outline-offset: 3px; }
.filter-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: .65rem; margin-top: .6rem; padding: .85rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--white); }
.filter-field { display: grid; gap: .25rem; color: var(--muted); font-size: .875rem; font-weight: 650; }
.search-field, .select-field { position: relative; display: flex; align-items: center; min-width: 0; }
.search-field svg { position: absolute; left: .8rem; color: var(--muted); pointer-events: none; }
.search-field input, .select-field select { width: 100%; min-height: 2.9rem; padding: .55rem .85rem; border: 1px solid #cbd9cb; border-radius: .65rem; background: var(--white); color: var(--ink); font-size: 1rem; font-weight: 400; }
.search-field input { padding-left: 2.8rem; }
.search-field input::placeholder { color: #596c60; opacity: 1; }
.select-field select { appearance: none; padding-right: 2.1rem; cursor: pointer; }
.select-field::after { content: ''; pointer-events: none; position: absolute; right: .95rem; width: .45rem; height: .45rem; border: solid var(--muted); border-width: 0 2px 2px 0; transform: translateY(-.15rem) rotate(45deg); }
.active-filters { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .85rem; margin-top: .45rem; color: var(--muted); font-size: .875rem; }
.text-button { border: 0; padding: .25rem 0; background: none; color: var(--green); font-size: .875rem; font-weight: 650; text-decoration: underline; text-underline-offset: .2em; }
.plant-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.plant-card { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: .95rem; background: var(--white); overflow-wrap: anywhere; }
.plant-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .15rem .5rem; margin-bottom: .3rem; color: var(--muted); font-size: .875rem; }
.plant-category { font-weight: 650; }
.plant-card :is(h2, h3) { font: 700 1.15rem/1.3 var(--sans); letter-spacing: normal; text-wrap: pretty; }
.plant-card a { color: var(--ink); text-decoration: none; }
.plant-card a:hover { color: var(--green); text-decoration: underline; }
.plant-tip { margin-top: .65rem; color: var(--muted); line-height: 1.68; word-spacing: .025em; text-wrap: pretty; }
:lang(zh-Hans) .plant-tip { line-height: 1.8; letter-spacing: .015em; word-spacing: normal; }
.compact-plant-grid .plant-card { padding: 0; }
.compact-plant-grid .plant-card:hover, .compact-plant-grid .plant-card:focus-within { border-color: #a9bea9; }
.compact-plant-grid .plant-card-link { display: block; height: 100%; padding: 1.1rem 1.2rem; border-radius: inherit; }
.compact-plant-grid .plant-card-link:hover { text-decoration: none; }
.compact-plant-grid .plant-card-link:hover h3 { text-decoration: underline; }
.compact-plant-grid h3 { font-size: 1.25rem; }
.plant-light { margin-top: .25rem; color: var(--green); font-size: .875rem; }
.empty { padding: 1.4rem; border: 1px dashed #acbfae; border-radius: .85rem; color: var(--muted); }
.more { width: fit-content; margin: 1.2rem auto 0; display: flex; }

.growing-spaces { padding-block: 2rem 3rem; border-top: 1px solid var(--line); }
.growing-space-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.4rem; }
.growing-space { display: flex; flex-direction: column; gap: .6rem; padding-inline: clamp(1rem, 2.4vw, 2rem); }
.growing-space:first-child { padding-inline-start: 0; }
.growing-space:last-child { padding-inline-end: 0; }
.growing-space + .growing-space { border-inline-start: 1px solid var(--line); }
.growing-space h3 { font-size: 1.15rem; line-height: 1.35; }
.growing-space p { color: var(--muted); text-wrap: pretty; }
.growing-space-links { display: flex; flex-wrap: wrap; gap: 0 1rem; margin: auto 0 0; padding: 0; list-style: none; }
.growing-space-links a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 650; }

.guide-section { padding-block: 2.5rem 3rem; background: #edf4e8; }
.guide-section .shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 1rem 2rem; }
.guide-index-link { display: inline-block; margin-top: .6rem; font-weight: 650; }
.guide-links { margin: 0; padding: 0; list-style: none; }
.guide-links li + li { border-top: 1px solid #d3e1d0; }
.guide-links a { display: block; padding: .7rem 0; color: var(--ink); font-weight: 650; text-decoration: none; }
.guide-links a:hover { color: var(--green); text-decoration: underline; }
.site-footer { padding-block: 1.55rem; background: var(--white); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.footer-inner p { color: var(--muted); margin-top: .4rem; }

.inner-page { padding-block: 2rem 4rem; min-height: 60vh; }
.inner-page h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); letter-spacing: -.055em; margin-top: .45rem; overflow-wrap: anywhere; }
.plant-profile h1 { font-size: clamp(2rem, 5vw, 3.5rem); text-wrap: balance; }
.inner-page .plant-grid { margin-top: 1.6rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.2rem; color: var(--muted); font-size: .9rem; }
ol.breadcrumbs { margin-top: 0; padding: 0; list-style: none; }
.reading .breadcrumbs li { display: inline-flex; gap: .6rem; align-items: baseline; font-size: inherit; }
.breadcrumbs [aria-current="page"] { color: var(--ink); }
.reading { width: min(100% - 4rem, 46rem); }
.reading p, .reading li { font-size: 1.06rem; }
.reading h1 + p { margin-top: .65rem; }
.reading p + p { margin-top: .8rem; }
.contact-address { overflow-wrap: anywhere; }
.reading h2 { margin: 1.65rem 0 .5rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.reading ul { margin-block: .4rem; padding-inline-start: 1.45rem; }
.reading .article-byline { margin-block: .8rem 1.15rem; color: var(--muted); font-size: .9rem; }
.reading .profile-lead { line-height: 1.72; text-wrap: pretty; }
.reading .care-guide { font-size: .94rem; }
.article-byline a { font-weight: 650; }
.article-credit + .article-credit { margin-inline-start: .8rem; }
.credit-label { margin-inline-end: .35rem; }
.guide-photo { margin: 1.25rem 0 1.6rem; }
.guide-photo img { width: 100%; height: auto; border-radius: .75rem; }
.guide-photo figcaption { margin-top: .55rem; color: var(--muted); font-size: .9rem; }
.guide-case { margin-block: 1.8rem; padding: 1rem clamp(1rem, 3vw, 1.5rem) 1.2rem; background: #edf4e9; border-radius: .75rem; }
.guide-case h2 { margin-top: 0; }
.guide-table { width: 100%; margin-block: 1rem; border-collapse: collapse; background: var(--white); font-size: .9rem; }
.guide-table caption { padding-bottom: .45rem; color: var(--muted); text-align: start; }
.guide-table :is(th, td) { padding: .55rem clamp(.3rem, 1.4vw, .75rem); border: 1px solid var(--line); text-align: start; vertical-align: top; overflow-wrap: anywhere; }
.guide-table thead { background: #edf4e8; }
.guide-index .guide-links { margin-top: 1.45rem; padding: 0; border-top: 1px solid var(--line); }
.guide-index .guide-links li { padding-block: 1rem; border-bottom: 1px solid var(--line); }
.guide-index .guide-links li + li { border-top: 0; }
.guide-index .guide-links h2 { margin: 0; font: 700 1.15rem/1.4 var(--sans); letter-spacing: normal; }
.guide-index .guide-links a { padding: 0; }
.guide-index .guide-links p { margin-top: .28rem; color: var(--muted); }
.guide-index .guide-links .guide-audience { color: var(--green-dark); font-size: .9rem; font-weight: 650; }
.other-name { color: var(--muted); }
.fact { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; gap: .6rem 1.4rem; padding: .65rem 1rem; background: #e8f2e2; border-radius: .75rem; margin: 1rem 0; }
.fact > div { display: grid; gap: .15rem; }
.fact dt { color: var(--muted); font-size: .875rem; }
.fact dd { margin: 0; font-weight: 700; }
.profile-toc { margin-top: 1.5rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--white); }
.profile-toc h2 { margin: 0 0 .55rem; font-family: var(--sans); font-size: 1.1rem; letter-spacing: normal; }
.profile-toc ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem 1.45rem; }
.profile-toc li { font-size: .95rem; }
.profile-section { margin-block: 1.8rem; }
.profile-section h2 { margin-top: 0; }
.profile-section p { line-height: 1.72; }

@media (max-width: 64rem) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto auto; gap: .4rem .5rem; padding-block: .55rem; min-height: 0; }
  .nav-toggle { grid-row: 1; grid-column: 2; display: inline-flex; align-items: center; justify-content: center; gap: .28rem; min-width: 2.75rem; min-height: 2.75rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--white); color: var(--green-dark); font-size: .875rem; font-weight: 650; white-space: nowrap; }
  .nav-toggle svg { width: 1.1rem; height: 1.1rem; }
  .nav-toggle:hover, .nav-toggle[aria-expanded="true"] { background: #edf5e7; }
  .nav-toggle:not([hidden])[aria-expanded="false"] + nav { display: none; }
  .site-header nav { grid-row: 2; grid-column: 1 / -1; justify-content: start; padding-block: .25rem; border-top: 1px solid var(--line); font-size: .9rem; }
  .site-header nav a { padding: .45rem .15rem; }
  .language { grid-row: 1; grid-column: 3; }
}

@media (max-width: 58rem) {
  .hero { gap: 1.5rem; }
  .plant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 43rem) {
  .shell, .reading { width: calc(100% - 2rem); }
  .hero { grid-template-columns: 1fr; padding-block: 1.35rem 1.6rem; gap: 1.25rem; }
  .hero-copy { padding: 0; }
  .hero-image { max-height: 19rem; min-height: 13rem; aspect-ratio: 16 / 10; }
  .plant-grid { grid-template-columns: 1fr; }
  .growing-space-grid { grid-template-columns: 1fr; margin-top: .65rem; }
  .growing-space { padding: .9rem 0; gap: .4rem; }
  .growing-space + .growing-space { border-inline-start: 0; border-top: 1px solid var(--line); }
  .guide-section .shell { grid-template-columns: 1fr; gap: .5rem; }
  .profile-toc ul { grid-template-columns: 1fr; }
}

@media (max-width: 29rem) {
  .site-header .brand { gap: .35rem; font-size: 1rem; }
  .site-header .brand-mark { width: 1.9rem; height: 1.9rem; }
  .language { padding-inline: .55rem; }
  .site-header nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem .75rem; }
  .filter-fields { grid-template-columns: 1fr; }
}

@media (max-width: 22rem) {
  .nav-toggle-label { display: none; }
}
