/* ==========================================================================
   Saksı Bitkisi — Modern plant-care field guide
   Design contract stylesheet (maps 1:1 to a WordPress FSE theme.json)
   --------------------------------------------------------------------------
   Token groups below are named to mirror theme.json:
     :root custom props  -> settings.color.palette / typography / spacing
     component classes    -> Gutenberg block patterns
   No JS required for layout. Fast: system fonts, no shadows-on-everything.
   ========================================================================== */

/* ----- 1. Design tokens (theme.json: settings) -------------------------- */
:root {
  /* color.palette */
  --bg:        oklch(98.5% 0.010 110);   /* warm paper cream            */
  --surface:   oklch(100% 0 0);          /* card white                  */
  --surface-2: oklch(96.5% 0.014 120);   /* tinted panel / sage wash    */
  --fg:        oklch(27% 0.030 155);     /* deep forest ink             */
  --muted:     oklch(48% 0.022 150);     /* secondary text              */
  --border:    oklch(90% 0.012 130);     /* hairline                    */
  --green:     oklch(47% 0.095 150);     /* primary — forest            */
  --green-soft:oklch(93% 0.035 150);     /* primary tint bg             */
  --earth:     oklch(60% 0.115 55);      /* warm accent — terracotta    */
  --earth-soft:oklch(94% 0.035 60);      /* accent tint bg              */

  /* status (problem severity) */
  --ok:    oklch(52% 0.10 150);
  --warn:  oklch(68% 0.13 75);
  --warn-soft: oklch(95% 0.04 80);
  --danger:oklch(56% 0.16 30);
  --danger-soft: oklch(95% 0.035 35);

  /* typography */
  --font-display: 'Iowan Old Style', 'Charter', 'Hoefler Text', 'Georgia', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* fluid type scale (clamp: min, vw, max) */
  --t-eyebrow: 0.78rem;
  --t-body: clamp(1rem, 0.97rem + 0.18vw, 1.0625rem);
  --t-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --t-h3: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --t-h2: clamp(1.5rem, 1.3rem + 1vw, 2.05rem);
  --t-h1: clamp(2rem, 1.55rem + 2.2vw, 3.25rem);
  --t-display: clamp(2.4rem, 1.7rem + 3.4vw, 4.25rem);

  /* spacing (theme.json: spacingSizes) */
  --sp-1: 0.5rem;
  --sp-2: 0.875rem;
  --sp-3: 1.25rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4.5rem;
  --sp-7: 6.5rem;

  /* shape */
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --maxw: 1180px;
  --maxw-prose: 720px;

  --shadow-card: 0 1px 2px oklch(27% 0.03 155 / 0.04), 0 8px 24px oklch(27% 0.03 155 / 0.05);
}

/* ----- 2. Reset / base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
p { margin: 0 0 1em; text-wrap: pretty; }

/* ----- 3. Layout helpers ------------------------------------------------ */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }
.section { padding-block: clamp(2.75rem, 6vw, var(--sp-6)); }
.eyebrow {
  font-family: var(--font-mono); font-size: var(--t-eyebrow);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--green);
  margin: 0 0 0.6rem; font-weight: 500;
}
.eyebrow.earth { color: var(--earth); }
.lead { font-size: var(--t-lead); color: var(--muted); line-height: 1.55; }
.section-head { max-width: 640px; margin-bottom: clamp(1.5rem, 3vw, var(--sp-4)); }
.section-head.center { margin-inline: auto; text-align: center; }

/* ----- 4. Buttons / chips ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.72rem 1.3rem; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 0.95rem; border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: oklch(42% 0.10 150); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--fg); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-earth { background: var(--earth); color: #fff; }
.btn-earth:hover { background: oklch(54% 0.12 55); }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.95rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 0.875rem; font-weight: 500; color: var(--fg);
  transition: all 0.16s ease;
}
.chip:hover { border-color: var(--green); color: var(--green); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.chip[aria-pressed="true"] .dot { background: #fff; }

/* ----- 5. Header / nav -------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(98.5% 0.010 110 / 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: var(--sp-3); height: 68px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.015em; }
.brand .leaf {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  background: var(--green); display: grid; place-items: center; color: #fff;
}
.brand .leaf svg { width: 18px; height: 18px; }
.nav { display: flex; align-items: center; gap: 0.3rem; margin-inline-start: auto; }
.nav a {
  padding: 0.5rem 0.85rem; border-radius: 9px; font-size: 0.94rem; font-weight: 500;
  color: var(--muted); transition: color 0.15s, background 0.15s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--green); background: var(--green-soft); }
.header-search {
  display: flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-pill); padding: 0.4rem 0.5rem 0.4rem 0.9rem;
}
.header-search input { border: none; background: none; outline: none; font: inherit; font-size: 0.9rem; width: 150px; color: var(--fg); }
.header-search button { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--green); color: #fff; display: grid; place-items: center; }
.nav-toggle { display: none; margin-inline-start: auto; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }

/* ----- 6. Footer -------------------------------------------------------- */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--border); margin-top: var(--sp-6); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--sp-4); padding-block: var(--sp-5) var(--sp-4); }
.footer-grid h4 { font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.9rem; font-weight: 600; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-grid a { color: var(--muted); font-size: 0.94rem; }
.footer-grid a:hover { color: var(--green); }
.footer-about { max-width: 320px; }
.footer-about p { color: var(--muted); font-size: 0.94rem; }
.footer-bottom { border-top: 1px solid var(--border); padding-block: 1.3rem; display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.85rem; }

/* ----- 7. Hero ---------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, var(--sp-5)); align-items: center; padding-block: clamp(2.5rem, 6vw, var(--sp-6)); }
.hero h1 { font-size: var(--t-display); }
.hero .lead { margin-top: 1.1rem; max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.hero-figure {
  aspect-ratio: 4 / 3.4; border-radius: var(--radius-lg); position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 80% 10%, var(--green-soft), transparent 60%),
    linear-gradient(160deg, var(--surface-2), oklch(94% 0.03 145));
  border: 1px solid var(--border);
}
/* leaf-vein illustrative placeholder, very light */
.hero-figure .veins { position: absolute; inset: 0; opacity: 0.5; }
.hero-figure .pot-label {
  position: absolute; left: 18px; bottom: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 0.4rem 0.85rem; font-size: 0.82rem; font-weight: 600; display: flex; gap: 0.45rem; align-items: center;
}
.hero-figure .pot-label .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--earth); }

/* ----- 8. Big search box ------------------------------------------------ */
.searchbox { display: flex; align-items: center; gap: 0.6rem; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-pill); padding: 0.55rem 0.6rem 0.55rem 1.25rem; box-shadow: var(--shadow-card); }
.searchbox:focus-within { border-color: var(--green); }
.searchbox svg.ico { width: 22px; height: 22px; color: var(--muted); flex: none; }
.searchbox input { flex: 1; border: none; outline: none; background: none; font: inherit; font-size: 1.05rem; color: var(--fg); min-width: 0; }
.searchbox .btn { flex: none; }
.search-suggest { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.search-suggest a { font-size: 0.85rem; color: var(--muted); border-bottom: 1px dashed var(--border); }
.search-suggest a:hover { color: var(--green); border-color: var(--green); }

/* ----- 9. Image placeholder (alt-text slot pattern) -------------------- */
.imgph {
  position: relative; background: var(--surface-2); overflow: hidden;
  display: grid; place-items: center;
  background-image:
    radial-gradient(circle at 30% 30%, oklch(92% 0.04 145), transparent 55%),
    radial-gradient(circle at 75% 70%, var(--earth-soft), transparent 50%);
}
.imgph::after { content: attr(data-alt); position: absolute; left: 10px; bottom: 8px; font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); background: oklch(100% 0 0 / 0.7); padding: 2px 6px; border-radius: 5px; max-width: calc(100% - 20px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imgph svg { width: 38%; max-width: 70px; opacity: 0.35; color: var(--green); }

/* ----- 10. Category grid ------------------------------------------------ */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-3); }
.cat-card {
  display: flex; flex-direction: column; gap: 0.75rem; padding: var(--sp-3);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: var(--shadow-card); }
.cat-card .ico-wrap { width: 46px; height: 46px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.cat-card .ico-wrap svg { width: 24px; height: 24px; }
.cat-card h3 { font-size: 1.05rem; }
.cat-card .count { font-size: 0.82rem; color: var(--muted); font-family: var(--font-mono); }

/* ----- 11. Problem strip ----------------------------------------------- */
.problem-strip { background: var(--earth-soft); border: 1px solid oklch(88% 0.04 60); border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, var(--sp-4)); }
.problem-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); margin-top: var(--sp-3); }
.problem-pill {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-weight: 600; font-size: 0.95rem;
  transition: border-color 0.15s, transform 0.15s;
}
.problem-pill:hover { border-color: var(--earth); transform: translateY(-2px); }
.problem-pill .sym { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--earth-soft); color: var(--earth); display: grid; place-items: center; }
.problem-pill .sym svg { width: 19px; height: 19px; }

/* ----- 12. Article cards / guide grid ----------------------------------- */
.guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.article-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.16s, box-shadow 0.16s; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.article-card .imgph { aspect-ratio: 16 / 10; }
.article-card .body { padding: var(--sp-3); display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.article-card .kicker { display: flex; gap: 0.6rem; align-items: center; font-size: 0.78rem; color: var(--muted); font-family: var(--font-mono); }
.article-card .kicker .tag { color: var(--green); }
.article-card h3 { font-size: 1.15rem; }
.article-card p { font-size: 0.92rem; color: var(--muted); margin: 0; }
.article-card .meta { margin-top: auto; padding-top: 0.6rem; font-size: 0.8rem; color: var(--muted); display: flex; gap: 0.9rem; }
.article-card.wide { grid-column: span 2; flex-direction: row; }
.article-card.wide .imgph { aspect-ratio: auto; width: 44%; flex: none; }

/* ----- 13. Seasonal block ---------------------------------------------- */
.seasonal { background: var(--green); color: oklch(97% 0.02 145); border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, var(--sp-5)); display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--sp-4); align-items: center; }
.seasonal h2 { color: #fff; }
.seasonal .eyebrow { color: oklch(86% 0.06 145); }
.seasonal .lead { color: oklch(90% 0.03 145); }
.seasonal ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.seasonal li { display: flex; gap: 0.75rem; align-items: flex-start; background: oklch(52% 0.08 150); border-radius: var(--radius); padding: 0.85rem 1rem; }
.seasonal li .n { font-family: var(--font-mono); font-weight: 600; color: oklch(88% 0.07 90); flex: none; }

/* ----- 14. Newsletter --------------------------------------------------- */
.newsletter { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.8rem, 4vw, var(--sp-5)); max-width: 680px; margin-inline: auto; }
.newsletter form { display: flex; gap: 0.6rem; max-width: 420px; margin: 1.4rem auto 0; }
.newsletter input { flex: 1; border: 1.5px solid var(--border); border-radius: var(--radius-pill); padding: 0.72rem 1.1rem; font: inherit; outline: none; background: var(--bg); }
.newsletter input:focus { border-color: var(--green); }
.newsletter .fine { font-size: 0.8rem; color: var(--muted); margin-top: 0.8rem; }

/* ----- 15. Breadcrumbs -------------------------------------------------- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.84rem; color: var(--muted); padding-block: 1rem; }
.breadcrumbs a:hover { color: var(--green); }
.breadcrumbs .sep { opacity: 0.5; }
.breadcrumbs [aria-current] { color: var(--fg); font-weight: 500; }

/* ----- 16. Article layout ----------------------------------------------- */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: clamp(1.5rem, 4vw, var(--sp-5)); align-items: start; }
.article-hero h1 { font-size: var(--t-h1); max-width: 18ch; margin-bottom: 0.8rem; }
.article-hero .summary { font-size: var(--t-lead); color: var(--muted); max-width: 60ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin-top: 1.1rem; font-size: 0.86rem; color: var(--muted); }
.article-meta span { display: inline-flex; gap: 0.4rem; align-items: center; }
.article-meta svg { width: 16px; height: 16px; color: var(--green); }
.article-cover { aspect-ratio: 21 / 9; border-radius: var(--radius-lg); margin-block: var(--sp-3); }

/* quick answer */
.quick-answer { background: var(--green-soft); border: 1px solid oklch(86% 0.05 150); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-block: var(--sp-3); }
.quick-answer .eyebrow { margin-bottom: 0.4rem; }
.quick-answer p { margin: 0; font-size: 1.05rem; color: var(--fg); }

/* prose */
.prose { font-size: 1.0625rem; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { margin-top: 2.2rem; padding-top: 0.4rem; scroll-margin-top: 88px; }
.prose h3 { margin-top: 1.6rem; scroll-margin-top: 88px; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0; display: grid; gap: 0.5rem; }
.prose li::marker { color: var(--green); }
.prose figure { margin: 1.6rem 0; }
.prose figure .imgph { aspect-ratio: 16 / 9; border-radius: var(--radius); }
.prose figcaption { font-size: 0.84rem; color: var(--muted); margin-top: 0.5rem; }
.prose blockquote { margin: 1.6rem 0; padding: 0.4rem 0 0.4rem 1.2rem; border-left: 3px solid var(--earth); font-family: var(--font-display); font-size: 1.2rem; color: var(--fg); }
.callout { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; display: flex; gap: 0.9rem; }
.callout .ico { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--earth-soft); color: var(--earth); display: grid; place-items: center; }
.callout .ico svg { width: 18px; height: 18px; }
.callout p:last-child { margin: 0; }

/* ----- 17. Sidebar: fact card + TOC ------------------------------------ */
.sidebar { position: sticky; top: 88px; display: grid; gap: var(--sp-3); }
.fact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.fact-card .head { padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.6rem; }
.fact-card .head h3 { font-size: 1rem; }
.fact-card .head .leaf-mini { width: 26px; height: 26px; border-radius: 7px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.fact-card .head .leaf-mini svg { width: 16px; height: 16px; }
.fact-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.85rem 1.2rem; border-bottom: 1px solid var(--border); }
.fact-row:last-child { border-bottom: none; }
.fact-row .ico { width: 32px; height: 32px; flex: none; border-radius: 8px; background: var(--surface-2); color: var(--green); display: grid; place-items: center; }
.fact-row .ico svg { width: 18px; height: 18px; }
.fact-row .k { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fact-row .v { font-weight: 600; font-size: 0.95rem; }
.fact-row .meter { display: flex; gap: 3px; margin-top: 3px; }
.fact-row .meter i { width: 14px; height: 5px; border-radius: 3px; background: var(--border); }
.fact-row .meter i.on { background: var(--green); }
.badge-pet { font-size: 0.78rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); }
.badge-pet.safe { background: var(--green-soft); color: var(--green); }
.badge-pet.toxic { background: var(--danger-soft); color: var(--danger); }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.toc h4 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: grid; gap: 0.15rem; }
.toc a { display: block; padding: 0.4rem 0.6rem; border-radius: 8px; font-size: 0.9rem; color: var(--muted); border-left: 2px solid transparent; }
.toc a:hover { color: var(--green); background: var(--green-soft); }
.toc a.is-active { color: var(--green); font-weight: 600; background: var(--green-soft); border-left-color: var(--green); }

/* ----- 18. FAQ accordion ------------------------------------------------ */
.faq { display: grid; gap: 0.7rem; max-width: var(--maxw-prose); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq details[open] { border-color: var(--green); }
.faq summary { list-style: none; cursor: pointer; padding: 1.05rem 1.3rem; display: flex; align-items: center; gap: 1rem; font-weight: 600; font-size: 1.02rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ph { margin-inline-start: auto; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; transition: transform 0.2s; }
.faq details[open] summary .ph { transform: rotate(45deg); }
.faq .answer { padding: 0 1.3rem 1.2rem; color: var(--muted); }
.faq .answer p:last-child { margin: 0; }

/* ----- 19. Author / reviewer box --------------------------------------- */
.author-box { display: flex; gap: 1.1rem; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.author-box .avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.3rem; }
.author-box .who { font-weight: 600; }
.author-box .role { font-size: 0.85rem; color: var(--muted); }
.author-box p { font-size: 0.92rem; color: var(--muted); margin: 0.5rem 0 0; }
.author-box .reviewed { margin-top: 0.6rem; font-size: 0.8rem; color: var(--green); display: inline-flex; gap: 0.4rem; align-items: center; }

/* ----- 20. Category hub ------------------------------------------------- */
.hub-hero { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: var(--sp-4); align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, var(--sp-5)); }
.hub-hero .imgph { aspect-ratio: 5 / 4; border-radius: var(--radius); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; padding-block: var(--sp-3); position: sticky; top: 68px; background: oklch(98.5% 0.010 110 / 0.9); backdrop-filter: blur(8px); z-index: 20; }
.filter-bar .label { font-size: 0.82rem; color: var(--muted); font-weight: 600; margin-right: 0.3rem; }
.qcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; display: flex; gap: 0.8rem; align-items: center; transition: border-color 0.15s; }
.qcard:hover { border-color: var(--green); }
.qcard .q { font-weight: 600; font-size: 0.96rem; }
.qcard .arw { margin-inline-start: auto; color: var(--green); flex: none; }
.q-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.related-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
.related-cats a { padding: 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-weight: 600; display: flex; align-items: center; gap: 0.6rem; transition: all 0.15s; }
.related-cats a:hover { border-color: var(--green); color: var(--green); transform: translateY(-2px); }

/* ----- 21. Problem solver ---------------------------------------------- */
.diag-hero { background: var(--earth-soft); border: 1px solid oklch(88% 0.04 60); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, var(--sp-5)); }
.diag-hero h1 { max-width: 16ch; }
.symptom-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.symptom-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-3); }
.symptom-card .imgph { aspect-ratio: 16 / 10; border-radius: 10px; margin-bottom: 0.9rem; }
.symptom-card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.symptom-card p { font-size: 0.9rem; color: var(--muted); margin: 0; }

.tree { display: grid; gap: 0.7rem; counter-reset: step; max-width: var(--maxw-prose); }
.tree .step { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; align-items: start; }
.tree .step .num { width: 36px; height: 36px; border-radius: 10px; background: var(--green); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; }
.tree .step h4 { font-family: var(--font-body); font-size: 1.02rem; margin-bottom: 0.25rem; }
.tree .step p { margin: 0; font-size: 0.92rem; color: var(--muted); }
.tree .step .yn { display: flex; gap: 0.5rem; margin-top: 0.7rem; }
.tree .step .yn span { font-size: 0.8rem; font-weight: 600; padding: 0.25rem 0.7rem; border-radius: var(--radius-pill); }
.tree .step .yn .y { background: var(--green-soft); color: var(--green); }
.tree .step .yn .n { background: var(--surface-2); color: var(--muted); }

.cause { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; background: var(--surface); }
.cause + .cause { margin-top: 0.8rem; }
.cause .top { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.5rem; }
.cause h3 { font-size: 1.1rem; }
.sev { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.25rem 0.65rem; border-radius: var(--radius-pill); margin-inline-start: auto; }
.sev.low { background: var(--green-soft); color: var(--ok); }
.sev.mid { background: var(--warn-soft); color: oklch(48% 0.12 70); }
.sev.high { background: var(--danger-soft); color: var(--danger); }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.action-card { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--green); border-radius: var(--radius); padding: var(--sp-3); }
.action-card .n { font-family: var(--font-mono); font-size: 0.8rem; color: var(--green); font-weight: 600; }
.action-card h3 { font-size: 1.05rem; margin: 0.4rem 0; }
.action-card p { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* ----- 22. Search results page ----------------------------------------- */
.search-hero { padding-block: clamp(2rem, 5vw, var(--sp-5)); max-width: 760px; margin-inline: auto; text-align: center; }
.search-hero .searchbox { margin-top: 1.4rem; text-align: left; }
.results-head { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; justify-content: space-between; padding-block: 1.2rem; border-bottom: 1px solid var(--border); }
.results-head .count { color: var(--muted); font-size: 0.9rem; }
.results-head .count b { color: var(--fg); }
.type-filters { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.results-list { display: grid; gap: 0.8rem; padding-block: var(--sp-3); }
.result-card { display: grid; grid-template-columns: 84px 1fr auto; gap: 1.1rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; transition: border-color 0.15s, transform 0.15s; }
.result-card:hover { border-color: var(--green); transform: translateX(2px); }
.result-card .thumb { width: 84px; height: 64px; border-radius: 10px; }
.result-card .type-badge { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); }
.type-badge.guide { background: var(--green-soft); color: var(--green); }
.type-badge.problem { background: var(--earth-soft); color: var(--earth); }
.type-badge.category { background: var(--surface-2); color: var(--muted); }
.type-badge.faq { background: oklch(93% 0.04 250); color: oklch(48% 0.12 250); }
.result-card h3 { font-size: 1.08rem; margin: 0.35rem 0 0.25rem; }
.result-card p { font-size: 0.9rem; color: var(--muted); margin: 0; }
.result-card .go { color: var(--green); flex: none; }
.empty-state { text-align: center; padding: var(--sp-6) var(--sp-3); }
.empty-state .ico { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 1.2rem; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.empty-state .ico svg { width: 38px; height: 38px; }
.empty-state .suggest { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 1.4rem; }

/* ----- 23. Page launcher index (overview) ------------------------------ */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-3); }

/* ----- 24. Responsive --------------------------------------------------- */
@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .article-card.wide { grid-column: span 3; }
}
@media (max-width: 900px) {
  .nav, .header-search { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { order: -1; aspect-ratio: 16 / 10; }
  .article-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; order: -1; grid-template-columns: 1fr; }
  .seasonal { grid-template-columns: 1fr; }
  .hub-hero { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .guides-grid { grid-template-columns: repeat(2, 1fr); }
  .symptom-grid, .action-grid { grid-template-columns: repeat(2, 1fr); }
  .related-cats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .site-header .wrap { height: 60px; gap: 0.8rem; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .problem-row { grid-template-columns: 1fr 1fr; }
  .guides-grid { grid-template-columns: 1fr; }
  .article-card.wide { flex-direction: column; grid-column: auto; }
  .article-card.wide .imgph { width: 100%; aspect-ratio: 16 / 10; }
  .symptom-grid, .action-grid, .q-grid, .related-cats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .newsletter form { flex-direction: column; }
  .result-card { grid-template-columns: 64px 1fr; }
  .result-card .thumb { width: 64px; height: 52px; }
  .result-card .go { display: none; }
  .tree .step { grid-template-columns: 36px 1fr; gap: 0.7rem; }
}

/* ----- 25. Mobile nav drawer ------------------------------------------- */
.mobile-drawer { position: fixed; inset: 0; z-index: 100; display: none; }
.mobile-drawer.open { display: block; }
.mobile-drawer .scrim { position: absolute; inset: 0; background: oklch(20% 0.03 155 / 0.4); }
.mobile-drawer .panel { position: absolute; top: 0; right: 0; height: 100%; width: min(82%, 340px); background: var(--bg); padding: 1.4rem; box-shadow: -8px 0 30px oklch(27% 0.03 155 / 0.12); display: flex; flex-direction: column; gap: 0.4rem; overflow-y: auto; }
.mobile-drawer .panel .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.mobile-drawer .panel a { padding: 0.85rem 0.6rem; border-radius: 10px; font-weight: 500; border-bottom: 1px solid var(--border); }
.mobile-drawer .panel a:hover { color: var(--green); }
.mobile-drawer .panel .searchbox { margin-top: 1rem; }
.drawer-close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; }

/* reduce motion */
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; transition: none !important; } }
