/* ══════════════════════════════════════════════════════════════════
   PlantPedia v4 — all-lifes.com/plants/
   Modern botanical editorial: warm paper surfaces, Fraunces display
   headings, automatic dark mode, soft depth. Self-contained.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #f7f6f0;
  --surface: #ffffff;
  --surface2: #efeee5;
  --border: #e4e2d6;
  --border-strong: #d2d0c0;
  --green: #2e7d4f;
  --green-dark: #1d5738;
  --green-deep: #143d27;
  --green-light: #5aa878;
  --green-soft: #e7f1e9;
  --accent: #c96f4a;
  --text: #1b241e;
  --text2: #4a5850;
  --text3: #7d8a81;
  --safe: #2e7d4f;
  --safe-bg: #e4f2e8;
  --safe-line: #bcdcc6;
  --toxic: #b25a1c;
  --toxic-bg: #f9ede0;
  --toxic-line: #ecd2b4;
  --hdr-bg: rgba(255, 255, 255, .86);
  --tab-bg: rgba(255, 255, 255, .95);
  --shadow: 0 8px 28px -16px rgba(20, 61, 39, .30);
  --shadow-hover: 0 16px 36px -16px rgba(20, 61, 39, .38);
  --radius: 18px;
  --maxw: 920px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Malgun Gothic', sans-serif;
  --font-display: 'Fraunces', 'Inter', Georgia, serif;
}
:root[data-theme="dark"],
:root.dark-vars {
  --bg: #10160f; --surface: #1a221a; --surface2: #212b21; --border: #2b372c; --border-strong: #3a473b;
  --green: #56a877; --green-dark: #7fc39c; --green-deep: #a9d8bd; --green-light: #6db58a; --green-soft: #1f2e22;
  --accent: #d98a63; --text: #e9efe8; --text2: #b3c0b4; --text3: #7e8c80;
  --safe: #7fc39c; --safe-bg: #1c2f22; --safe-line: #2f4a37; --toxic: #dfa268; --toxic-bg: #33271a; --toxic-line: #4d3a24;
  --hdr-bg: rgba(16, 22, 15, .82); --tab-bg: rgba(20, 27, 19, .95);
  --shadow: 0 8px 28px -16px rgba(0, 0, 0, .6); --shadow-hover: 0 16px 36px -16px rgba(0, 0, 0, .7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10160f; --surface: #1a221a; --surface2: #212b21; --border: #2b372c; --border-strong: #3a473b;
    --green: #56a877; --green-dark: #7fc39c; --green-deep: #a9d8bd; --green-light: #6db58a; --green-soft: #1f2e22;
    --accent: #d98a63; --text: #e9efe8; --text2: #b3c0b4; --text3: #7e8c80;
    --safe: #7fc39c; --safe-bg: #1c2f22; --safe-line: #2f4a37; --toxic: #dfa268; --toxic-bg: #33271a; --toxic-line: #4d3a24;
    --hdr-bg: rgba(16, 22, 15, .82); --tab-bg: rgba(20, 27, 19, .95);
    --shadow: 0 8px 28px -16px rgba(0, 0, 0, .6); --shadow-hover: 0 16px 36px -16px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: 118px; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.65; -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--green-dark); color: var(--bg); padding: 10px 16px; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }

/* ── Header ── */
.hdr {
  position: sticky; top: 0; z-index: 100; background: var(--hdr-bg);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.hdr-in { max-width: var(--maxw); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.2rem; color: var(--text); letter-spacing: -.02em; }
.logo svg { width: 27px; height: 27px; border-radius: 7px; flex-shrink: 0; }
.logo span { color: var(--green); }
.logo:hover { text-decoration: none; }
.hdr-nav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.hdr-nav a { font-size: .86rem; font-weight: 600; color: var(--text2); padding: 7px 13px; border-radius: 999px; }
.hdr-nav a:hover { background: var(--green-soft); color: var(--green-dark); text-decoration: none; }
.lang-switch { display: flex; gap: 3px; align-items: center; font-size: .74rem; margin-left: 6px; }
.lang-switch a { padding: 5px 8px; border-radius: 999px; color: var(--text3); font-weight: 700; }
.lang-switch a.on { background: var(--green); color: #fff; }

/* ── Sticky in-page TOC ── */
.toc {
  position: sticky; top: 57px; z-index: 90; background: var(--hdr-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); margin: 0 -20px;
}
.toc-in { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 9px 20px; }
.toc-in::-webkit-scrollbar { display: none; }
.toc a {
  flex-shrink: 0; font-size: .76rem; font-weight: 600; color: var(--text2);
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
}
.toc a:hover { border-color: var(--green-light); color: var(--green-dark); text-decoration: none; }

/* ── Layout ── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px 96px; }
.bc { font-size: .78rem; color: var(--text3); padding: 16px 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.bc a { color: var(--green); }
.bc span { opacity: .5; }

/* ── Hero ── */
.hero { padding: 14px 0 10px; }
.hero-media {
  border-radius: 24px; overflow: hidden; background: var(--surface2);
  aspect-ratio: 16 / 9; margin-bottom: 22px; position: relative; box-shadow: var(--shadow);
}
.hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 62%, rgba(10, 24, 15, .38)); pointer-events: none; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media .noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--green-light); background: linear-gradient(135deg, var(--green-soft), var(--surface2)); }
.hero-media .credit { position: absolute; bottom: 10px; right: 12px; z-index: 2; font-size: .64rem; color: rgba(255,255,255,.92); background: rgba(0,0,0,.42); padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(3px); }
.hero-media .credit a { color: #fff; text-decoration: underline; }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(30px, 5.4vw, 46px); font-weight: 700;
  line-height: 1.08; margin: 0 0 8px; letter-spacing: -.015em; color: var(--text);
}
.hero .sci { font-style: italic; color: var(--text3); font-size: 1rem; margin: 0 0 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  font-size: .73rem; font-weight: 700; padding: 6px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text2);
}
.badge.safe { background: var(--safe-bg); color: var(--safe); border-color: var(--safe-line); }
.badge.toxic { background: var(--toxic-bg); color: var(--toxic); border-color: var(--toxic-line); }

/* ── Care profile card ── */
.care-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin: 14px 0 26px;
}
.care-card h2 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; margin: 0 0 18px; color: var(--green-dark); }
.care-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 16px; }
.care-item { display: flex; gap: 11px; align-items: flex-start; }
.care-item .ic {
  font-size: 1.3rem; line-height: 1; flex-shrink: 0; width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; background: var(--green-soft);
}
.care-item .lbl { font-size: .68rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .07em; }
.care-item .val { font-size: .9rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.care-item .val.safe { color: var(--safe); }
.care-item .val.toxic { color: var(--toxic); }

/* ── Effort meter ── */
.effort { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin: 0 0 26px; }
.effort .e-lbl { font-size: .72rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
.effort .e-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.effort .e-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-light), var(--green)); }
.effort .e-val { font-size: .86rem; font-weight: 800; color: var(--green-dark); white-space: nowrap; }

/* ── Pros & cons ── */
.pc-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 6px 0 26px; }
.pc-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.pc-col h3 { margin: 0 0 12px; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.pc-col.pros h3 { color: var(--safe); }
.pc-col.cons h3 { color: var(--toxic); }
.pc-col ul { margin: 0; padding: 0; list-style: none; }
.pc-col li { padding: 6px 0 6px 26px; position: relative; font-size: .92rem; color: var(--text2); }
.pc-col.pros li::before { content: '✓'; position: absolute; left: 2px; color: var(--safe); font-weight: 800; }
.pc-col.cons li::before { content: '✕'; position: absolute; left: 2px; color: var(--toxic); font-weight: 800; }

/* ── Article body ── */
.body { font-size: 1.02rem; line-height: 1.78; color: var(--text2); }
.body h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--text); margin: 40px 0 14px; letter-spacing: -.01em; }
.body h2 .em { margin-right: 9px; font-size: 1.15rem; }
.body h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin: 24px 0 8px; }
.body p { margin: 0 0 16px; }
.body .lead {
  font-size: 1.1rem; color: var(--text); background: var(--green-soft);
  border-radius: 16px; padding: 18px 22px; margin: 0 0 26px; border: 1px solid var(--safe-line);
}
.body ol.steps { margin: 4px 0 26px; padding-left: 4px; list-style: none; counter-reset: st; }
.body ol.steps li { counter-increment: st; margin-bottom: 12px; padding-left: 42px; position: relative; line-height: 1.65; }
.body ol.steps li::before {
  content: counter(st); position: absolute; left: 0; top: 1px; width: 28px; height: 28px;
  border-radius: 999px; background: var(--green-soft); color: var(--green-dark);
  font-size: .82rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* ── Tables (modern: row separators, no cell grid) ── */
.tbl { width: 100%; border-collapse: collapse; margin: 6px 0 24px; font-size: .92rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.tbl th, .tbl td { padding: 12px 15px; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid var(--border); }
.tbl thead th { background: var(--surface2); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--text3); }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td { color: var(--text2); line-height: 1.55; }
.tbl tbody th[scope="row"] { color: var(--text); font-weight: 700; background: transparent; }
.tbl.facts th[scope="row"] { width: 38%; }
.tbl .hl td, .tbl .hl th { background: var(--green-soft); }

/* ── Gallery ── */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 8px 0 26px; }
.gallery figure { margin: 0; border-radius: 14px; overflow: hidden; position: relative; background: var(--surface2); aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery figure:hover img { transform: scale(1.045); }
.gallery figcaption { position: absolute; bottom: 6px; right: 8px; font-size: .6rem; color: rgba(255,255,255,.9); background: rgba(0,0,0,.42); padding: 2px 8px; border-radius: 999px; }
.gallery figcaption a { color: #fff; }

/* ── Safety callout ── */
.safety-box { border-radius: 16px; padding: 18px 22px; margin: 6px 0 24px; font-size: .96rem; line-height: 1.7; }
.safety-box.safe { background: var(--safe-bg); border: 1px solid var(--safe-line); color: var(--safe); }
.safety-box.toxic { background: var(--toxic-bg); border: 1px solid var(--toxic-line); color: var(--toxic); }
.safety-box .disc { font-size: .78rem; margin-top: 10px; opacity: .8; }

/* ── FAQ ── */
.faq details { border: 1px solid var(--border); border-radius: 14px; padding: 15px 19px; margin-bottom: 10px; background: var(--surface); }
.faq summary { font-weight: 700; color: var(--text); cursor: pointer; list-style: none; font-size: .96rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '＋'; color: var(--green); font-weight: 900; margin-right: 9px; }
.faq details[open] summary::before { content: '－'; }
.faq details p { font-size: .92rem; color: var(--text2); line-height: 1.7; margin: 12px 0 0; }

/* ── Plant cards ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; margin: 12px 0; }
.pcard { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--green-light); text-decoration: none; }
.pcard .thumb { aspect-ratio: 4 / 3; background: var(--green-soft); overflow: hidden; }
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.pcard:hover .thumb img { transform: scale(1.06); }
.pcard .thumb .noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--green-light); }
.pcard .pc-body { padding: 14px 16px 16px; }
.pcard .pc-name { font-size: 1rem; font-weight: 800; color: var(--text); margin: 0 0 2px; letter-spacing: -.01em; }
.pcard .pc-sci { font-size: .73rem; font-style: italic; color: var(--text3); }
.pcard .pc-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pcard .pc-tag { font-size: .66rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--surface2); color: var(--text2); }
.pcard .pc-tag.safe { background: var(--safe-bg); color: var(--safe); }
.pcard .pc-tag.toxic { background: var(--toxic-bg); color: var(--toxic); }

/* ── Category tiles ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 14px; margin: 12px 0 26px; }
.tile { display: flex; flex-direction: column; gap: 5px; padding: 21px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .2s, box-shadow .2s, border-color .2s; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--green-light); text-decoration: none; }
.tile .te { font-size: 1.9rem; line-height: 1; }
.tile .th { font-size: 1.03rem; font-weight: 800; color: var(--text); margin-top: 7px; letter-spacing: -.01em; }
.tile .td { font-size: .82rem; color: var(--text2); line-height: 1.5; }
.tile .tn { font-size: .72rem; color: var(--green); font-weight: 800; margin-top: 5px; }

/* ── Home hero ── */
.home-hero { text-align: center; padding: 44px 0 26px; }
.home-hero .h-emoji { font-size: 3rem; }
.home-hero h1 { font-family: var(--font-display); font-size: clamp(32px, 6.4vw, 52px); font-weight: 700; letter-spacing: -.02em; margin: 10px 0 10px; }
.home-hero p { font-size: 1.1rem; color: var(--text2); max-width: 580px; margin: 0 auto; }

.sec-h { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; margin: 34px 0 6px; letter-spacing: -.01em; }
.sec-sub { color: var(--text3); font-size: .9rem; margin: 0 0 14px; }

/* ── Finder quiz ── */
.quiz { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 26px 26px 22px; margin: 10px 0 30px; }
.quiz h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin: 0 0 4px; }
.quiz .q-sub { color: var(--text3); font-size: .9rem; margin: 0 0 18px; }
.quiz .q-row { margin-bottom: 14px; }
.quiz .q-lbl { font-size: .78rem; font-weight: 800; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.quiz .q-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz .q-opt { font-family: inherit; font-size: .86rem; font-weight: 600; padding: 9px 16px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--border-strong); color: var(--text2); cursor: pointer; transition: all .15s; }
.quiz .q-opt:hover { border-color: var(--green-light); }
.quiz .q-opt.on { background: var(--green); color: #fff; border-color: var(--green); }
.quiz .q-res-h { font-size: .95rem; font-weight: 800; color: var(--green-dark); margin: 18px 0 4px; }

/* ── Compare pages ── */
.vs-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin: 12px 0 24px; }
.vs-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-align: center; transition: transform .2s, box-shadow .2s; }
.vs-side:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); text-decoration: none; }
.vs-side .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--green-soft); }
.vs-side .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vs-side .vs-name { font-weight: 800; color: var(--text); padding: 12px 14px 4px; font-size: 1.02rem; }
.vs-side .vs-sci { font-size: .73rem; font-style: italic; color: var(--text3); padding: 0 14px 14px; }
.vs-mid { align-self: center; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--text3); }
.choose-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin: 8px 0 26px; }
.choose { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.choose h3 { margin: 0 0 12px; font-size: 1rem; font-weight: 800; color: var(--green-dark); }
.choose ul { margin: 0; padding: 0; list-style: none; }
.choose li { padding: 6px 0 6px 26px; position: relative; font-size: .92rem; color: var(--text2); }
.choose li::before { content: '→'; position: absolute; left: 0; color: var(--green); font-weight: 800; }
@media (max-width: 620px) { .vs-head { grid-template-columns: 1fr; } .vs-mid { text-align: center; padding: 2px 0; } }

/* ── Filter chips + search ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.chip { font-family: inherit; font-size: .82rem; font-weight: 700; padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text2); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--green-light); }
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.filter-wrap { position: relative; margin: 6px 0 20px; }
.filter { width: 100%; padding: 14px 16px 14px 44px; font-size: .95rem; font-family: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; }
.filter:focus { outline: none; border-color: var(--green-light); box-shadow: 0 0 0 3px var(--green-soft); }
.filter::placeholder { color: var(--text3); }
.filter-ico { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); opacity: .55; }

/* ── CTA ── */
.cta { margin: 44px 0 0; padding: 34px 28px; border-radius: 24px; text-align: center; background: linear-gradient(135deg, var(--green-soft), var(--surface2)); border: 1px solid var(--border); }
.cta h2 { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; margin: 0 0 8px; color: var(--green-dark); }
.cta p { color: var(--text2); margin: 0 0 18px; font-size: .95rem; }
.cta .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn { font-size: .9rem; font-weight: 700; padding: 13px 26px; border-radius: 999px; }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); text-decoration: none; }
@media (prefers-color-scheme: dark) { .btn.primary:hover { color: var(--bg); } }
.btn.ghost { background: var(--surface); color: var(--green-dark); border: 1px solid var(--border-strong); }
.btn.ghost:hover { border-color: var(--green-light); text-decoration: none; }

/* ── Footer ── */
.ft { border-top: 1px solid var(--border); background: var(--surface); margin-top: 48px; }
.ft-in { max-width: var(--maxw); margin: 0 auto; padding: 34px 20px 44px; font-size: .84rem; color: var(--text3); }
.ft-in .logo { font-size: 1.05rem; }
.ft-in p { margin: 12px 0 0; line-height: 1.6; max-width: 640px; }
.ft-links { display: flex; gap: 16px; flex-wrap: wrap; margin: 18px 0 0; }
.ft-links a { color: var(--text2); font-weight: 600; }

/* ── Mobile tab bar ── */
.tabbar { display: none; }
@media (max-width: 720px) {
  .wrap { padding-bottom: 88px; }
  .hdr-nav .hide-m { display: none; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: var(--tab-bg); backdrop-filter: blur(12px); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .62rem; font-weight: 700; color: var(--text3); padding: 6px 0; }
  .tabbar a .ti { font-size: 1.25rem; }
  .tabbar a.on { color: var(--green); }
  .tabbar a:hover { text-decoration: none; }
  .care-grid { grid-template-columns: repeat(2, 1fr); }
  .tbl { font-size: .84rem; }
  .tbl th, .tbl td { padding: 9px 10px; }
  .toc { top: 53px; }
}
@media (max-width: 400px) { .care-grid { grid-template-columns: 1fr; } .tbl.facts th[scope="row"] { white-space: normal; } }

/* ── Ads ── */
.ad { margin: 32px 0 8px; min-height: 250px; display: flex; align-items: center; justify-content: center; }
.ad .adsbygoogle { width: 100%; }
.ad-top { margin: 10px 0 22px; }
.ad-bottom { margin: 40px 0 4px; }

/* ── Header search + theme toggle ── */
.hdr-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text2); cursor: pointer; font-size: 1rem; padding: 0; }
.icon-btn:hover { border-color: var(--green-light); color: var(--green-dark); }
.search-pop { position: relative; }
.search-box { position: absolute; right: 0; top: 46px; width: min(340px, 78vw); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-hover); padding: 10px; display: none; z-index: 300; }
.search-box.open { display: block; }
.search-box input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); font-family: inherit; font-size: .95rem; }
.search-box input:focus { outline: none; border-color: var(--green-light); }
.search-res { margin-top: 8px; max-height: 320px; overflow-y: auto; }
.search-res a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--text); }
.search-res a:hover { background: var(--green-soft); text-decoration: none; }
.search-res a img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.search-res .sr-n { font-weight: 700; font-size: .9rem; }
.search-res .sr-s { font-size: .72rem; font-style: italic; color: var(--text3); }
.search-res .sr-empty { padding: 12px; color: var(--text3); font-size: .88rem; }

/* ── TL;DR box ── */
.tldr { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--green); border-radius: 0 16px 16px 0; padding: 16px 20px; margin: 0 0 22px; }
.tldr h2 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; color: var(--green-dark); }
.tldr ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tldr li { position: relative; padding-left: 24px; font-size: .93rem; color: var(--text2); font-weight: 500; }
.tldr li .ic { position: absolute; left: 0; top: 0; }

/* ── Also known as ── */
.aka { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 0 0 22px; }
.aka .aka-lbl { font-size: .74rem; font-weight: 800; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; }
.aka .aka-pill { font-size: .82rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--surface2); color: var(--text2); }

/* ── Taxonomy + meta row ── */
.meta-row { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: .82rem; color: var(--text3); margin: 0 0 16px; }
.meta-row .rt { display: inline-flex; align-items: center; gap: 5px; }

/* ── Sources ── */
.sources { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 22px; margin: 8px 0 24px; }
.sources h2 { font-size: 1rem !important; margin: 0 0 10px !important; }
.sources ul { margin: 0 0 8px; padding-left: 20px; }
.sources li { margin-bottom: 6px; font-size: .9rem; }
.sources .src-note { font-size: .8rem; color: var(--text3); margin: 8px 0 0; }

/* ── Watering reminder ── */
.reminder { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; background: linear-gradient(135deg, var(--green-soft), var(--surface2)); border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; margin: 8px 0 26px; }
.reminder .rm-txt { flex: 1; min-width: 180px; }
.reminder .rm-h { font-weight: 800; color: var(--green-dark); font-size: .98rem; }
.reminder .rm-n { font-size: .8rem; color: var(--text3); margin-top: 2px; }
.reminder a.btn { flex-shrink: 0; }

/* ── Floating reader toolbar ── */
.rtoolbar { position: fixed; right: 16px; bottom: 84px; z-index: 150; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 721px) { .rtoolbar { bottom: 24px; } }
.rtoolbar button { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text2); box-shadow: var(--shadow); cursor: pointer; font-size: 1.15rem; display: none; align-items: center; justify-content: center; }
.rtoolbar button.show { display: flex; }
.rtoolbar button:hover { border-color: var(--green-light); color: var(--green-dark); }
.rtoolbar button.on { background: var(--green); color: #fff; border-color: var(--green); }

/* ── Reading progress ── */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--green); z-index: 500; transition: width .1s linear; }

/* ── Save heart on cards ── */
.pcard { position: relative; }
.card-save { position: absolute; top: 8px; right: 8px; z-index: 3; width: 32px; height: 32px; border-radius: 999px; border: 0; background: rgba(255,255,255,.85); color: #b04a4a; cursor: pointer; font-size: .95rem; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.card-save:hover { background: #fff; }
.card-save.on { background: #b04a4a; color: #fff; }
@media (prefers-color-scheme: dark) { .card-save { background: rgba(20,27,19,.8); } }

/* ── Tool forms ── */
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 26px; margin: 10px 0 26px; }
.tool label { display: block; font-size: .78rem; font-weight: 800; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 7px; }
.tool select, .tool input[type=search] { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); font-family: inherit; font-size: .95rem; }
.tool select:focus, .tool input:focus { outline: none; border-color: var(--green-light); }
.tool-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-opts .q-opt { font-family: inherit; font-size: .86rem; font-weight: 600; padding: 9px 15px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--border-strong); color: var(--text2); cursor: pointer; }
.tool-opts .q-opt.on { background: var(--green); color: #fff; border-color: var(--green); }
.tool-result { margin-top: 20px; padding: 20px; border-radius: 16px; background: var(--green-soft); text-align: center; }
.tool-result.safe { background: var(--safe-bg); } .tool-result.toxic { background: var(--toxic-bg); }
.tool-result .tr-big { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--green-dark); }
.tool-result .tr-msg { font-size: .98rem; color: var(--text); margin-top: 4px; }
.tool-result.toxic .tr-msg, .tool-result.toxic .tr-big { color: var(--toxic); }
.tool-result.safe .tr-msg, .tool-result.safe .tr-big { color: var(--safe); }
.tool-result .tr-tip { font-size: .82rem; color: var(--text3); margin-top: 8px; }

/* ── Symptom page ── */
.diag { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 4px 24px; margin: 8px 0 26px; }
.diag .dg { padding: 18px 0; border-bottom: 1px solid var(--border); }
.diag .dg:last-child { border-bottom: 0; }
.diag .dg-h { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 6px; }
.diag .dg-b { font-size: 1.02rem; color: var(--text); line-height: 1.7; }

/* ── Print ── */
@media print {
  .hdr, .toc, .tabbar, .rtoolbar, .progress, .ad, .cta, .card-save, .search-pop, #related, .badges { display: none !important; }
  body { background: #fff; color: #000; }
  .care-card, .tldr, .tbl, .body { box-shadow: none; border-color: #ccc; }
  a { color: #000; text-decoration: none; }
  .wrap { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pcard, .tile, .vs-side, .gallery img, .pcard .thumb img, .progress { transition: none; }
}

/* ── Viral share card (v6) ── */
.sharecard{margin:34px 0 12px;padding:16px 20px;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:var(--shadow)}
.sharecard-in{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.sc-h{font-weight:700;color:var(--text)}
.share-row{display:flex;gap:10px;flex-wrap:wrap}
.sbtn{width:42px;height:42px;border:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:#fff;text-decoration:none;padding:0;transition:transform .12s ease,filter .12s ease;box-shadow:0 2px 6px -2px rgba(0,0,0,.35)}
.sbtn:hover{transform:translateY(-2px);filter:brightness(1.08)}
.sbtn:focus-visible{outline:3px solid var(--green-light);outline-offset:2px}
.sbtn svg{width:20px;height:20px;fill:#fff}
.sbtn-t{font-weight:800;font-size:.92rem;line-height:1;color:#fff}
.pp-toast{position:fixed;left:50%;bottom:84px;transform:translateX(-50%) translateY(12px);background:var(--text);color:var(--bg);padding:10px 18px;border-radius:999px;font-weight:600;font-size:.9rem;opacity:0;transition:opacity .25s,transform .25s;z-index:9999;pointer-events:none;box-shadow:0 8px 24px rgba(0,0,0,.3)}
.pp-toast.on{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:640px){.sharecard{margin:26px 0 8px;padding:14px 16px}.sc-h{width:100%}}
@media print{.sharecard,.pp-toast{display:none!important}}

/* ── Plant Doctor (v10) ── */
.dx-prompt{font-weight:700;color:var(--text);margin:2px 0 14px}
.symgrid{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:22px}
.sym-btn{display:inline-flex;align-items:center;gap:7px;padding:9px 15px;border:1px solid var(--border-strong);border-radius:999px;background:var(--surface);color:var(--text);font-weight:600;font-size:.92rem;cursor:pointer;transition:all .14s ease}
.sym-btn:hover{border-color:var(--green);transform:translateY(-1px)}
.sym-btn.on{background:var(--green);border-color:var(--green);color:#fff}
.sym-btn .se{font-size:1.05rem}
.dx-list{display:flex;flex-direction:column;gap:10px}
details.dx{border:1px solid var(--border);border-radius:13px;background:var(--surface);overflow:hidden}
details.dx>summary{cursor:pointer;padding:14px 18px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:9px;list-style:none}
details.dx>summary::-webkit-details-marker{display:none}
details.dx[open]>summary{border-bottom:1px solid var(--border);background:var(--surface2)}
.dx-body{padding:14px 18px}
.dx-body p{margin:.35em 0}
.dx-aff{margin:12px 0 6px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.dx-aff-h{font-size:.82rem;color:var(--text3);font-weight:600;margin-right:2px}
.chip-a{display:inline-block;padding:4px 11px;border-radius:999px;background:var(--green-soft);color:var(--green-dark);font-size:.82rem;font-weight:600;text-decoration:none}
.chip-a:hover{background:var(--green);color:#fff}
.dx-guide{display:inline-block;margin-top:8px;color:var(--green);font-weight:700;text-decoration:none}
.dx-guide:hover{text-decoration:underline}
.btn-link{display:inline-block;padding:9px 16px;border-radius:10px;background:var(--green-soft);color:var(--green-dark);font-weight:700;text-decoration:none}
.btn-link:hover{background:var(--green);color:#fff}
