/* ==========================================================
   Bowlwise design system
   ========================================================== */
:root {
  --bg: #F7F5EF;
  --ink: #173E32;
  --ink-2: #526159;
  --sage: #E4E9D8;
  --sage-2: #CFD8BF;
  --apricot: #F4C8A6;
  --apricot-2: #F8DCC4;
  --card: #FFFEFA;
  --border: #D8DDD2;
  --focus: #1F6FD1;

  --ok-bg: #E2F0E3; --ok-ink: #1C5530; --ok-bd: #B5D6BB;
  --warn-bg: #FFF0D2; --warn-ink: #6F4500; --warn-bd: #EBCF94;
  --avoid-bg: #FDE3D1; --avoid-ink: #8F360A; --avoid-bd: #EFBB98;
  --tox-bg: #F8DCDB; --tox-ink: #8A1A1A; --tox-bd: #E6ADAB; --tox-solid: #7E1717;
  --na-bg: #ECEDEA; --na-ink: #474D49; --na-bd: #D3D6D0;

  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --r-sm: 12px; --r: 20px; --r-lg: 28px; --r-pill: 999px;
  --shadow: 0 1px 2px rgba(23, 62, 50, .05), 0 8px 24px -12px rgba(23, 62, 50, .18);
  --max: 1240px;
  --read: 68ch;
  --header-h: 72px;
  --bottom-nav-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 var(--s4); }
ul, ol { margin: 0 0 var(--s4); padding-left: 1.25em; }
li { margin-bottom: var(--s2); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 var(--s4); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4.1rem); }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); }
h4 { font-family: var(--sans); font-size: 1rem; font-weight: 650; letter-spacing: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.eyebrow { font: 650 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 var(--s3); }
.lede { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: var(--ink-2); max-width: 52ch; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }
.section { padding: clamp(40px, 6vw, 88px) 0; }
.section-tight { padding: clamp(28px, 4vw, 52px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.icon { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.2em; }
.preview-banner { background: var(--ink); color: #F7F5EF; font-size: .85rem; text-align: center; padding: 8px 16px; }
.preview-banner a { color: #fff; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r-pill); border: 1.5px solid transparent; font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn-primary { background: var(--ink); color: #FFFEFA; }
.btn-primary:hover { background: #0F2D24; }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-emergency { background: var(--apricot); color: #4A1F0A; border-color: #E9AE84; }
.btn-emergency:hover { background: #EFB88E; }
.btn-danger { background: var(--tox-solid); color: #fff; }
.btn-danger:hover { background: #631111; }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; padding: 0 12px; }
.btn-ghost:hover { background: var(--sage); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .92rem; }
.icon-btn { width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 14px; border: 1.5px solid var(--border); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn .icon { width: 22px; height: 22px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(247, 245, 239, .94); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--border); }
.header-row { height: var(--header-h); display: flex; align-items: center; gap: var(--s4); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.45rem/1 var(--serif); letter-spacing: -0.01em; }
.logo-mark { width: 34px; height: 34px; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); text-decoration: none; font-weight: 550; font-size: .97rem; }
.main-nav a:hover { background: var(--sage); }
.main-nav a[aria-current="page"] { background: var(--sage); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-emergency { margin-left: 8px; }
.mobile-only { display: none !important; }
@media (max-width: 960px) {
  :root { --header-h: 64px; --bottom-nav-h: 68px; }
  .main-nav, .header-emergency { display: none !important; }
  .mobile-only { display: inline-flex !important; }
  .header-actions { margin-left: auto; }
  .logo { font-size: 1.3rem; }
}

/* mobile emergency pill */
.pill-emergency { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); background: var(--apricot); color: #4A1F0A; font-weight: 650; font-size: .9rem; text-decoration: none; border: 1.5px solid #E9AE84; }

/* ---------- Drawer menu ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; display: none; }
.drawer.open { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 35, 28, .45); }
.drawer-panel { position: absolute; top: 0; right: 0; height: 100%; width: min(92vw, 380px); background: var(--bg); padding: 16px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; overflow-y: auto; box-shadow: -10px 0 40px rgba(0,0,0,.15); }
.drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer nav a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 12px; border-radius: 14px; text-decoration: none; font-weight: 600; font-size: 1.08rem; }
.drawer nav a:hover, .drawer nav a[aria-current="page"] { background: var(--sage); }
.drawer .divider { height: 1px; background: var(--border); margin: 8px 0; }
@media (prefers-reduced-motion: no-preference) {
  .drawer.open .drawer-panel { animation: slideIn .2s ease-out; }
  @keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* ---------- Bottom nav ---------- */
.bottom-nav { display: none; }
@media (max-width: 960px) {
  .bottom-nav { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--card); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 64px; text-decoration: none; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
  .bottom-nav a .icon { width: 22px; height: 22px; }
  .bottom-nav a[aria-current="page"] { color: var(--ink); }
  .bottom-nav a[aria-current="page"] .icon { stroke-width: 2.4; }
}

/* ---------- Search ---------- */
.search-form { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-pill); padding: 6px 6px 6px 20px; box-shadow: var(--shadow); max-width: 600px; }
.search-form:focus-within { border-color: var(--ink); }
.search-form .icon { color: var(--ink-2); }
.search-form input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 1.05rem/1.2 var(--sans); color: var(--ink); padding: 12px 4px; }
.search-form input::placeholder { color: #6B7770; }
.search-form input:focus { outline: none; }
.search-form .btn { min-height: 48px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: var(--s4); }
.chips-label { font-size: .9rem; color: var(--ink-2); margin-right: 4px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--border); text-decoration: none; font-weight: 550; font-size: .95rem; }
.chip:hover { border-color: var(--ink); }
@media (max-width: 520px) {
  .search-form { padding-left: 14px; }
  .search-form .btn-label { display: none; }
  .search-form .btn { width: 48px; padding: 0; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(20px, 4vw, 56px) 0 clamp(36px, 5vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero h1 { margin-bottom: var(--s4); }
.hero-art { justify-self: end; width: 100%; max-width: 520px; }
.hero-art svg { width: 100%; height: auto; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: 2; max-width: 340px; justify-self: center; }
}
@media (max-width: 520px) {
  .hero-art { max-width: 240px; }
}

/* ---------- Status badge ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 10px; border-radius: var(--r-pill); font: 650 .85rem/1.2 var(--sans); border: 1px solid; white-space: nowrap; }
.status .icon { width: 16px; height: 16px; }
.status-lg { font-size: 1rem; padding: 8px 16px 8px 12px; }
.status-lg .icon { width: 20px; height: 20px; }
.status-generally_suitable { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-bd); }
.status-use_caution { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-bd); }
.status-avoid { background: var(--avoid-bg); color: var(--avoid-ink); border-color: var(--avoid-bd); }
.status-toxic { background: var(--tox-bg); color: var(--tox-ink); border-color: var(--tox-bd); }
.status-insufficient_information, .status-neutral { background: var(--na-bg); color: var(--na-ink); border-color: var(--na-bd); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1080px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 380px) { .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.food-card { position: relative; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.food-card:hover { border-color: #AEB9AA; box-shadow: var(--shadow); }
.food-card .media { aspect-ratio: 4 / 3; background: var(--sage); }
.food-card .media img { width: 100%; height: 100%; object-fit: cover; }
.food-card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.food-card :is(h2,h3) { font-size: 1.3rem; margin: 0; }
.food-card :is(h2,h3) a { text-decoration: none; }
.food-card :is(h2,h3) a:hover { text-decoration: underline; }
.food-card :is(h2,h3) a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.food-card :is(h2,h3) a:focus-visible { outline: none; }
.food-card:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.food-card .note { font-size: .93rem; color: var(--ink-2); margin: 0; }
.food-card .variant-note { font-size: .88rem; font-weight: 600; color: var(--ink); margin: 0; }
.food-card .status { align-self: flex-start; }
@media (max-width: 560px) {
  .food-card .body { padding: 12px 14px 16px; }
  .food-card :is(h2,h3) { font-size: 1.12rem; }
  .grid-4 .food-card .note { display: none; }
}

.cat-card { display: flex; align-items: center; gap: 14px; padding: 18px; text-decoration: none; min-height: 84px; transition: border-color .15s; }
.cat-card:hover { border-color: var(--ink); }
.cat-card .cat-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--sage); flex: none; }
.cat-card:nth-child(4n+2) .cat-icon, .cat-card:nth-child(4n+3) .cat-icon { background: var(--apricot-2); }
.cat-card .cat-icon .icon { width: 26px; height: 26px; }
.cat-card strong { display: block; font-size: 1.05rem; }
.cat-card span.count { font-size: .88rem; color: var(--ink-2); }

.steps { counter-reset: step; }
.step { padding: 24px; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 600 1.05rem/1 var(--serif); margin-bottom: 14px; }

.guide-card { padding: 24px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; position: relative; transition: border-color .15s; }
.guide-card:hover { border-color: var(--ink); }
.guide-card h3 { margin: 0; }
.guide-card .meta { font-size: .85rem; color: var(--ink-2); margin-top: auto; display: flex; align-items: center; gap: 6px; }

.band { background: var(--sage); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 48px); }
.band-apricot { background: var(--apricot-2); }
.band-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
@media (max-width: 860px) { .band-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #E7ECE5; margin-top: clamp(40px, 6vw, 80px); padding: 56px 0 32px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font: 650 .8rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #BFD0C5; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li a { display: inline-flex; min-height: 36px; align-items: center; text-decoration: none; }
.footer-grid li a:hover { text-decoration: underline; }
.footer-logo { color: #fff; }
.footer-note { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 20px; font-size: .88rem; color: #C6D3CA; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .9rem; color: var(--ink-2); padding: 16px 0 4px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.breadcrumbs li { margin: 0; display: inline-flex; align-items: center; gap: 4px; }
.breadcrumbs li + li::before { content: '/'; color: #9AA59F; margin: 0 4px; }
.breadcrumbs a { text-decoration: none; padding: 6px 2px; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ---------- Food detail ---------- */
.food-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(20px, 4vw, 56px); align-items: start; padding: 12px 0 24px; }
.food-hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.6rem); }
.food-hero .media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/3; background: var(--sage); border: 1px solid var(--border); }
.answer-box { display: flex; flex-direction: column; gap: 14px; }
.answer-box .short { font-size: clamp(1.08rem, 1rem + .4vw, 1.3rem); line-height: 1.5; margin: 0; }
.status-explain { font-size: .92rem; color: var(--ink-2); margin: 0; }
.answer-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 860px) {
  .food-hero { grid-template-columns: 1fr; }
  .food-hero .media { max-height: 180px; aspect-ratio: auto; }
  .food-hero .media img { height: 180px; width: 100%; object-fit: cover; }
}
.critical { display: flex; gap: 14px; align-items: flex-start; background: var(--tox-solid); color: #fff; border-radius: var(--r); padding: 18px 20px; margin: 4px 0; }
.critical .icon { width: 26px; height: 26px; margin-top: 2px; }
.critical p { margin: 0 0 10px; font-weight: 550; }
.critical a.btn { background: #fff; color: var(--tox-solid); min-height: 44px; }
.critical-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.warning-soft { background: var(--avoid-bg); color: var(--avoid-ink); border: 1px solid var(--avoid-bd); }
.warning-soft a.btn { background: var(--avoid-ink); color: #fff; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 20px); background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 18px 10px; }
.toc h2 { font: 650 .8rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: 7px 0; text-decoration: none; font-size: .95rem; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 960px) { .detail-layout { grid-template-columns: 1fr; } .toc { display: none; } }

.d-section { padding: 28px 0; border-top: 1px solid var(--border); }
.d-section:first-child { border-top: 0; }
.d-section h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); }
.prose { max-width: var(--read); }

.takeaways { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.takeaways li { margin: 0; display: flex; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; }
.takeaways .icon { color: var(--ink); margin-top: 3px; }
@media (max-width: 640px) { .takeaways { grid-template-columns: 1fr; } }

.prep-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.prep-tab { min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); background: var(--card); border: 1.5px solid var(--border); font: 600 .95rem/1 var(--sans); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.prep-tab:hover { border-color: var(--ink); }
.prep-tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.prep-tab .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-generally_suitable { background: #2F8048; } .dot-use_caution { background: #C98A12; } .dot-avoid { background: #D2611F; } .dot-toxic { background: #A41E1E; } .dot-insufficient_information { background: #8A908C; }
.prep-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: clamp(18px, 3vw, 28px); }
.prep-panel[hidden] { display: none; }
.prep-panel .prep-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.prep-panel h3 { margin: 0; }
.prep-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 12px; }
@media (max-width: 640px) { .prep-cols { grid-template-columns: 1fr; } }
.prep-sources { font-size: .88rem; color: var(--ink-2); border-top: 1px dashed var(--border); margin-top: 16px; padding-top: 12px; }
.hazard-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.hazard-tags li { margin: 0; padding: 4px 12px; border-radius: var(--r-pill); background: var(--sage); font-size: .85rem; font-weight: 600; }

.faq details { border: 1px solid var(--border); background: var(--card); border-radius: var(--r-sm); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--ink-2); }
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 18px 16px; }

.source-list { list-style: none; padding: 0; }
.source-list li { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; }
.source-list .pub { font-size: .82rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.source-list a { font-weight: 600; word-break: break-word; }
.source-list .supports { font-size: .9rem; color: var(--ink-2); margin: 6px 0 0; }
.source-list .supports li { background: none; border: 0; padding: 0; margin: 2px 0; }

.editorial { background: var(--sage); border-radius: var(--r); padding: 18px 20px; font-size: .93rem; }
.editorial dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.editorial dt { font-weight: 650; }
.editorial dd { margin: 0; }
@media (max-width: 480px) { .editorial dl { grid-template-columns: 1fr; } .editorial dd { margin-bottom: 8px; } }

.save-btn[aria-pressed="true"] { background: var(--sage); border-color: var(--ink); }

/* ---------- Directory ---------- */
.dir-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.filters legend { font: 650 .8rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: .97rem; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.check .count { margin-left: auto; color: var(--ink-2); font-size: .85rem; }
.dir-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin: 0 0 18px; }
.dir-toolbar .result-count { font-weight: 600; margin: 0; }
.select { min-height: 44px; border: 1.5px solid var(--border); border-radius: 12px; padding: 0 12px; background: var(--card); font: 500 .95rem var(--sans); color: var(--ink); }
.dir-search { max-width: none; box-shadow: none; margin-bottom: 18px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.active-filters button { min-height: 36px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--sage); padding: 0 12px; font: 600 .85rem var(--sans); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.filter-toggle { display: none; }
.notice { border-radius: var(--r); padding: 16px 18px; margin-bottom: 18px; border: 1px solid var(--border); background: var(--card); }
.notice h2 { font-family: var(--sans); font-size: 1.05rem; font-weight: 650; margin: 0 0 6px; }
.notice p:last-child { margin-bottom: 0; }
.notice-warn { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-ink); }
.notice-warn a { color: inherit; font-weight: 650; }
.variant-results { display: grid; gap: 12px; margin-bottom: 18px; }
.variant-result { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 14px 16px; text-decoration: none; position: relative; }
.variant-result img { width: 84px; height: 63px; border-radius: 12px; object-fit: cover; flex: none; }
.variant-result strong { display: block; font-size: 1.05rem; }
.variant-result .vr-body { display: flex; flex-direction: column; gap: 6px; }
.empty { text-align: center; padding: 48px 20px; background: var(--card); border: 1px dashed var(--border); border-radius: var(--r); }
.empty h2 { font-size: 1.6rem; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--card); text-decoration: none; font-weight: 600; padding: 0 12px; }
.pagination [aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 960px) {
  .dir-layout { grid-template-columns: 1fr; }
  .filter-toggle { display: inline-flex; }
  .filters { display: none; position: fixed; inset: auto 0 0 0; top: auto; z-index: 70; border-radius: 24px 24px 0 0; max-height: 85vh; overflow-y: auto; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 50px rgba(0,0,0,.2); }
  .filters.open { display: block; }
  .filters-backdrop { position: fixed; inset: 0; background: rgba(15,35,28,.45); z-index: 65; }
  .filters-head { display: flex !important; }
}
.filters-head { display: none; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.filters-head h2 { font-size: 1.35rem; margin: 0; }
.filters-foot { display: flex; gap: 10px; }

/* ---------- Emergency ---------- */
.em-hero { background: var(--tox-solid); color: #fff; border-radius: var(--r-lg); padding: clamp(24px, 4vw, 48px); margin: 16px 0 28px; }
.em-hero h1 { color: #fff; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); }
.em-hero .lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); font-weight: 600; max-width: 40ch; }
.em-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.em-card { background: #fff; color: var(--ink); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.em-card h2 { font-size: 1.3rem; margin: 0; }
.em-card .btn { align-self: stretch; min-height: 56px; font-size: 1.08rem; white-space: normal; text-align: center; }
.em-card .tel { font: 600 1.6rem/1.1 var(--serif); }
@media (max-width: 760px) { .em-actions { grid-template-columns: 1fr; } }
.em-vet-form { display: flex; gap: 8px; flex-wrap: wrap; }
.em-vet-form input { flex: 1 1 160px; min-height: 48px; border: 1.5px solid var(--border); border-radius: 12px; padding: 0 14px; font: 400 1rem var(--sans); }
.em-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .em-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field textarea, .field select { min-height: 48px; border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 14px; font: 400 1rem var(--sans); color: var(--ink); background: #fff; }
.field textarea { min-height: 96px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.check-list { list-style: none; padding: 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .icon { margin-top: 4px; }

/* ---------- Misc ---------- */
.page-head { padding: 20px 0 8px; }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); }
.article { max-width: 760px; }
.article h2 { margin-top: 36px; }
.callout { background: var(--card); border: 1px solid var(--border); border-left: 5px solid var(--ink); border-radius: var(--r-sm); padding: 16px 18px; margin: 20px 0; }
.kv { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .kv { grid-template-columns: 1fr; } }
.kv > div { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
table.data { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--r-sm); overflow: hidden; font-size: .93rem; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { background: var(--sage); font-weight: 650; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-sm); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom-nav-h) + 20px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 80; font-weight: 600; font-size: .95rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .bottom-nav, .site-footer, .toc, .answer-actions { display: none !important; } }

/* ---------- Layout fixes (min-content overflow, mobile density) ---------- */
.hero-grid > *, .dir-layout > *, .detail-layout > *, .food-hero > *, .band-grid > * { min-width: 0; }
.pill-emergency { white-space: nowrap; }
@media (max-width: 400px) { .pill-emergency { padding: 0 12px; font-size: .85rem; } .logo span { font-size: 1.2rem; } }
@media (max-width: 340px) { .pill-emergency span { display: none; } }
.preview-banner .long { display: inline; }
@media (max-width: 640px) { .preview-banner .long { display: none; } }
[data-results].grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1080px) { [data-results].grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 960px) { [data-results].grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { [data-results].grid-3 { grid-template-columns: repeat(2, 1fr); } [data-results] .food-card .note { display: none; } }
@media (max-width: 330px) { [data-results].grid-3 { grid-template-columns: 1fr; } }
.preview-banner .short { display: none; }
@media (max-width: 640px) { .preview-banner .short { display: inline; } }
.active-filters:empty, .variant-results:empty, [data-search-notice]:empty, .pagination:empty { display: none; }

/* ==========================================================
   v2 — photographic redesign
   ========================================================== */
h1 { font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.25rem); font-weight: 500; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.4rem); }
.page-head h1, .dir-head h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); }

/* compact preview note */
.preview-banner { background: var(--sage); color: var(--ink); font-size: .78rem; padding: 5px 16px; }
.preview-banner a { color: var(--ink); }

/* hero */
.hero { padding: clamp(16px, 3vw, 40px) 0 clamp(28px, 4vw, 56px); }
.hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); }
.hero-copy .lede { margin-bottom: 22px; }
.hero-media picture, .hero-media img { display: block; width: 100%; }
.hero-media img { aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow); background: var(--sage); height: auto; }
.chips-label { font-weight: 600; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero-media { order: 2; }
  .hero-media img { aspect-ratio: 16 / 10; border-radius: var(--r); }
  .hero h1 { font-size: clamp(2.5rem, 1.6rem + 4vw, 3rem); margin-bottom: 10px; }
  .hero-copy .lede { margin-bottom: 16px; font-size: 1.05rem; }
  .chips { margin-top: 12px; gap: 6px; }
  .chip { min-height: 40px; padding: 0 14px; font-size: .92rem; }
}

/* status badges: never clipped — wrap instead */
.status { white-space: normal; max-width: 100%; min-width: 0; text-align: left; line-height: 1.2; overflow-wrap: anywhere; }
.status > span { min-width: 0; }
.food-card .body { min-width: 0; }
.food-card .status { font-size: .8rem; padding: 4px 10px 4px 8px; }

/* food cards */
.food-card .media { aspect-ratio: 4 / 3; overflow: hidden; }
.food-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
@media (prefers-reduced-motion: no-preference) { .food-card:hover .media img { transform: scale(1.03); } }
.food-card :is(h2, h3) { font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem); line-height: 1.2; }
.food-card .note { font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 720px) {
  [data-results] .food-card .note, .grid-4 .food-card .note { display: -webkit-box !important; -webkit-line-clamp: 2; }
  .food-card .body { padding: 12px 12px 14px; gap: 8px; }
}
@media (max-width: 359px) { [data-results].grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* directory */
.dir-head { padding-bottom: 4px; }
.dir-head .lede { margin-bottom: 6px; }
.meta-line { font-size: .92rem; color: var(--ink-2); margin: 0; }
.dir-search { margin-bottom: 12px; }
.dir-toolbar { margin-bottom: 12px; }
.labels-help { margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--card); }
.labels-help summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 14px; font-weight: 600; font-size: .93rem; }
.labels-help > div { padding: 0 14px 12px; }
.labels-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 10px; }
.labels-list li { display: grid; grid-template-columns: minmax(0, max-content) 1fr; gap: 10px; align-items: start; margin: 0; font-size: .9rem; }
@media (max-width: 520px) { .labels-list li { grid-template-columns: 1fr; gap: 4px; } }
.active-filters button { background: var(--ink); color: #fff; border-color: var(--ink); }

/* search result: preparation-specific match */
.variant-result { align-items: stretch; gap: 14px; padding: 12px; }
.vr-media { position: relative; flex: none; width: 120px; }
.vr-media img { width: 120px; height: 90px; object-fit: cover; border-radius: 12px; }
.vr-photo-note { display: block; font-size: .7rem; color: var(--ink-2); margin-top: 4px; line-height: 1.2; }
.vr-kicker { font: 650 .72rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.vr-note { font-size: .85rem; color: var(--ink-2); }
.vr-body { min-width: 0; }
@media (max-width: 400px) { .vr-media, .vr-media img { width: 96px; } .vr-media img { height: 72px; } }

/* food detail */
.food-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding: 8px 0 20px; gap: clamp(20px, 4vw, 56px); }
.food-hero h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); margin-bottom: 4px; }
.answer-box { gap: 12px; }
.answer-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.label-link { font-size: .85rem; color: var(--ink-2); }
.answer-box .short { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); }
.answer-actions { margin-top: 2px; align-items: center; }
.text-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; font-size: .95rem; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.food-hero .media { margin: 0; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; border: 0; box-shadow: var(--shadow); max-height: none; }
.food-hero .media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .food-hero { grid-template-columns: 1fr; gap: 16px; }
  .food-hero .media { order: 0; aspect-ratio: 16 / 10; max-height: none; border-radius: var(--r); }
  .food-hero .media img { height: 100%; }
  .food-hero h1 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.25rem); }
}
.glance { background: var(--sage); border-radius: var(--r); padding: clamp(18px, 3vw, 28px); margin: 0 0 8px; }
.glance h2 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); margin-bottom: 14px; }
.glance-sub { font-family: var(--sans); font-size: .9rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.glance-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.glance-list li { margin: 0; display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: var(--r-sm); padding: 14px; font-size: .97rem; line-height: 1.45; }
.glance-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 600 .95rem/1 var(--serif); }
.glance-num .icon { width: 16px; height: 16px; }
.glance-warn { background: var(--avoid-bg); }
.glance-warn .glance-num { background: var(--avoid-ink); }
@media (max-width: 760px) { .glance-list { grid-template-columns: 1fr; gap: 8px; } .glance-list li { padding: 12px; } }

/* emergency */
.em-alert { display: flex; gap: 16px; align-items: flex-start; background: var(--tox-solid); color: #fff; border-radius: var(--r); padding: clamp(18px, 3vw, 28px); margin: 12px 0 16px; }
.em-alert h1 { color: #fff; font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); margin-bottom: 6px; }
.em-alert .lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); font-weight: 600; margin: 0; max-width: 46ch; }
.em-alert-icon .icon { width: 32px; height: 32px; }
.em-actions { margin: 0 0 32px; gap: 14px; }
.em-card { border: 1px solid var(--border); box-shadow: none; padding: 18px; gap: 8px; }
.em-card h2 { font-size: 1.25rem; }
.em-card p { margin: 0; }
.em-card-primary { border: 2px solid var(--tox-solid); }
.em-card .tel { font: 600 clamp(1.6rem, 1.3rem + 1vw, 2rem)/1.1 var(--serif); color: var(--tox-solid); }
.btn-xl { min-height: 56px; font-size: 1.1rem; }
.em-vet-form { flex-direction: column; align-items: stretch; }
.em-vet-form .btn { white-space: normal; text-align: center; line-height: 1.25; padding: 10px 18px; }
@media (max-width: 520px) { .em-alert-icon { display: none; } }

/* bottom nav never covers the last content */
@media (max-width: 960px) { .site-footer { padding-bottom: calc(32px + var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px)); } body { padding-bottom: 0; } }

/* photo credits */
.media-fig { margin: 0; min-width: 0; }
.photo-credit { font-size: .74rem; color: var(--ink-2); margin-top: 6px; line-height: 1.35; }
.photo-credit a { color: inherit; }
.hero-media .photo-credit { text-align: right; }
.prep-photo { margin: 0 0 14px; max-width: 320px; }
.prep-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); }
h1, h2, h3 { letter-spacing: -0.012em; }
.em-vet-form input { flex: none; height: 48px; }
.vr-body .status { align-self: flex-start; }
.vr-body { display: flex; flex-direction: column; gap: 6px; }
.table-wrap { max-width: 100%; }
table.data th, table.data td { overflow-wrap: anywhere; }
@media (max-width: 480px) { table.data th, table.data td { padding: 10px; font-size: .86rem; } }
.logo-mark { flex: none; }

/* ==========================================================
   v3 — consistency pass
   ========================================================== */
:root { --space-section: clamp(36px, 5vw, 72px); --space-tight: clamp(24px, 3vw, 44px); --control-h: 48px; --control-h-sm: 44px; }
.section { padding: var(--space-section) 0; }
.section-tight { padding: var(--space-tight) 0; }
.hero { padding: clamp(12px, 2.5vw, 32px) 0 clamp(16px, 2.5vw, 28px); }
.hero .eyebrow { margin-bottom: 14px; }
.hero h1 { margin-bottom: 14px; }
.hero-copy .lede { margin-bottom: 24px; }
.hero + .section-tight { padding-top: clamp(12px, 2vw, 24px); }
.section-head { margin-bottom: 20px; }
.btn { min-height: var(--control-h); }
.btn-sm { min-height: var(--control-h-sm); }
.card { border-radius: var(--r); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* preparation picker */
.prep-picker { border: 0; padding: 0; margin: 2px 0 6px; min-width: 0; }
.prep-picker legend { font: 650 .75rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.prep-options { display: flex; flex-wrap: wrap; gap: 8px; }
.prep-option { position: relative; cursor: pointer; }
.prep-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.prep-option-body { display: flex; flex-direction: column; gap: 2px; min-height: var(--control-h); justify-content: center; padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--card); transition: border-color .15s, background-color .15s; }
.prep-option-label { font-weight: 650; font-size: .95rem; line-height: 1.2; }
.prep-option-status { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink-2); line-height: 1.2; }
.prep-option:hover .prep-option-body { border-color: var(--ink); }
.prep-option input:checked + .prep-option-body { border-color: var(--ink); background: var(--sage); box-shadow: inset 0 0 0 1px var(--ink); }
.prep-option input:focus-visible + .prep-option-body { outline: 3px solid var(--focus); outline-offset: 2px; }
.answer-variant { display: flex; flex-direction: column; gap: 12px; }
.answer-variant[hidden], .guidance-variant[hidden], .serving-variant[hidden], .eaten-variant[hidden] { display: none; }
.selected-prep { font-size: .95rem; color: var(--ink-2); }
.answer-box .critical { margin: 0; }

/* practical guidance */
.guidance h2, .serving-variant h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.h-sub { font-family: var(--sans); font-size: .95rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.guidance-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 720px) { .guidance-grid { grid-template-columns: 1fr; } }
.steps-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps-list li { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm); }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 600 .9rem/1 var(--serif); }
.step-n .icon { width: 16px; height: 16px; }
.risk-box { background: var(--sage); border-radius: var(--r-sm); padding: 14px 16px; }
.risk-box h3 { font-family: var(--sans); font-size: .8rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.risk-box ul { margin-bottom: 8px; }
.cite-line { font-size: .85rem; color: var(--ink-2); margin: 0; }
.cite { font-size: .85em; }
.section-note { color: var(--ink-2); font-size: .95rem; margin-top: -6px; }
.callout-toxic { border-left-color: var(--tox-solid); }
details.compare summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
details.compare summary::-webkit-details-marker { display: none; }
details.compare summary::after { content: '+'; font-size: 1.6rem; color: var(--ink-2); }
details.compare[open] summary::after { content: '–'; }
details.compare summary h2 { margin: 0; }
details.compare[open] summary { margin-bottom: 14px; }
.status-disabled [data-count-status], .status-disabled .check:has(input[name="status"]) { opacity: .55; }
.correction { margin: 10px 0 0; }

/* toc active */
.toc a[aria-current] { font-weight: 650; box-shadow: inset 3px 0 0 var(--ink); padding-left: 10px; }
.toc { max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; }

/* guide cards */
.guide-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.guide-media { aspect-ratio: 16 / 9; background: var(--sage); overflow: hidden; }
.guide-media img { width: 100%; height: 100%; object-fit: cover; }
.guide-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.guide-body .eyebrow { margin: 0; }
.guide-body h3 { margin: 0; font-size: 1.25rem; }
.guide-body h3 a { text-decoration: none; }
.guide-body h3 a::after { content: ''; position: absolute; inset: 0; }
.guide-body p { margin: 0; }
.guide-covers { font-size: .85rem; color: var(--ink-2); margin-top: auto !important; padding-top: 6px; }
.guide-card:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.guide-card:hover { border-color: var(--ink); }
.grid-2 .guide-media { aspect-ratio: 21 / 9; }
/* narrow phones: keep header within the viewport */
.header-row { min-width: 0; }
.logo { min-width: 0; }
@media (max-width: 380px) {
  .header-row { gap: 8px; }
  .logo { font-size: 1.15rem; gap: 6px; }
  .logo-mark { width: 30px; height: 30px; }
  .pill-emergency { padding: 0 10px; font-size: .82rem; gap: 4px; }
  .header-actions { gap: 6px; }
  .icon-btn { width: 44px; height: 44px; }
}

/* ==========================================================
   v4 — editorial homepage, categories, search suggestions
   ========================================================== */
.h-small { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); }
.btn-light { background: #FFFEFA; color: var(--ink); }
.btn-light:hover { background: var(--sage); }
.btn-outline-light { background: transparent; color: #FFFEFA; border-color: rgba(255,255,255,.55); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.eyebrow-light { color: #C9D8CE; }

/* orientation row */
.orient { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--card); }
.orient-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.orient-item { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px; }
.orient-item + .orient-item { border-left: 1px solid var(--border); }
.orient-item > .icon { width: 22px; height: 22px; margin-top: 2px; color: var(--ink); }
.orient-item strong { display: block; font-size: .95rem; }
.orient-item span { font-size: .87rem; color: var(--ink-2); line-height: 1.4; }
@media (max-width: 960px) { .orient-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .orient-item:nth-child(3) { border-left: 0; } .orient-item:nth-child(n+3) { border-top: 1px solid var(--border); } }
@media (max-width: 520px) { .orient-item { padding: 14px 10px; gap: 8px; } .orient-item span { display: none; } }

/* featured 6 */
.featured-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* category photo tiles */
.cat-section { background: var(--sage); }
.cat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 18px); }
.cat-tile { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; text-decoration: none; background: var(--ink); isolation: isolate; }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; z-index: -1; }
.cat-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,30,24,0) 35%, rgba(10,30,24,.78) 100%); z-index: -1; }
.cat-tile-label { position: absolute; left: 14px; right: 14px; bottom: 12px; color: #fff; display: flex; flex-direction: column; }
.cat-tile-label strong { font: 500 clamp(1.15rem, 1rem + .6vw, 1.45rem)/1.15 var(--serif); }
.cat-tile-label span { font-size: .85rem; opacity: .92; }
.cat-tile:hover img { transform: scale(1.04); }
.cat-tile:focus-visible { outline-offset: 3px; }
.cat-tiles-sm .cat-tile { aspect-ratio: 16 / 10; }
@media (max-width: 860px) { .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* preparation demo */
.prep-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.prep-demo-media { position: relative; }
.demo-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.demo-caption { position: absolute; left: 12px; bottom: 12px; background: rgba(255,254,250,.92); font-size: .78rem; padding: 4px 10px; border-radius: 8px; }
.demo-answer { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 18px; }
.demo-answer p { margin: 0; max-width: 52ch; }
.demo-answer[hidden], .demo-photo[hidden] { display: none; }
@media (max-width: 860px) { .prep-demo { grid-template-columns: 1fr; } .prep-demo-media { order: 2; } }

/* learn the essentials */
.learn-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.learn-lead { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.learn-lead-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.learn-lead-body { padding: 20px 22px 24px; }
.learn-lead-body h3 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); margin-bottom: 8px; }
.learn-lead-body p:last-child { margin: 0; color: var(--ink-2); }
.learn-lead h3 a, .learn-item h3 a { text-decoration: none; }
.learn-lead h3 a::after, .learn-item h3 a::after { content: ''; position: absolute; inset: 0; }
.learn-lead:hover, .learn-item:hover { border-color: var(--ink); }
.learn-lead:has(a:focus-visible), .learn-item:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.learn-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.learn-item { position: relative; display: flex; gap: 14px; align-items: flex-start; margin: 0; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm); }
.learn-thumb { flex: none; width: 104px; }
.learn-thumb img { width: 104px; height: 78px; object-fit: cover; border-radius: 10px; }
.learn-item h3 { font-size: 1.1rem; margin: 0 0 4px; }
.learn-item p { margin: 0 0 4px; }
@media (max-width: 860px) { .learn-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .learn-thumb { width: 80px; } .learn-thumb img { width: 80px; height: 60px; } }

/* forest trust band */
.trust-band { background: var(--ink); color: #E9EFE9; padding: var(--space-section) 0; margin-top: var(--space-tight); }
.trust-band h2 { color: #FFFEFA; }
.trust-band a:not(.btn) { color: #fff; }
.trust-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.trust-facts { display: grid; gap: 14px; margin: 0; }
.trust-facts div { border-top: 1px solid rgba(255,255,255,.18); padding-top: 12px; }
.trust-facts dt { font: 500 clamp(2rem, 1.6rem + 1.6vw, 2.8rem)/1 var(--serif); color: #FFFEFA; }
.trust-facts dd { margin: 4px 0 0; color: #C9D8CE; }
.trust-band + .site-footer { margin-top: 0; border-top: 1px solid rgba(255,255,255,.12); }
@media (max-width: 860px) { .trust-grid { grid-template-columns: 1fr; } }

/* recently viewed */
.recent-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.recent-item { flex: none; display: flex; gap: 10px; align-items: center; padding: 8px 14px 8px 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm); text-decoration: none; scroll-snap-align: start; }
.recent-item img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.recent-item span { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.recent-item .status { font-size: .75rem; padding: 2px 8px 2px 6px; }
.recent-item:hover { border-color: var(--ink); }

/* category page hero */
.cat-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(20px, 4vw, 56px); align-items: center; padding: 12px 0 8px; }
.cat-hero h1 { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem); }
.cat-hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.cat-tip { display: flex; gap: 10px; align-items: flex-start; background: var(--sage); padding: 12px 14px; border-radius: var(--r-sm); font-size: .95rem; }
.cat-tip .icon { margin-top: 3px; }
.cat-status-row { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.cat-status-row li { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 650; }
@media (max-width: 860px) { .cat-hero { grid-template-columns: 1fr; } .cat-hero-media { order: -1; } .cat-hero-media img { aspect-ratio: 16 / 9; } }

/* directory category nav */
.cat-nav { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; margin: 0 -2px; scrollbar-width: thin; }
.cat-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--border); background: var(--card); border-radius: 12px; text-decoration: none; font-size: .9rem; font-weight: 600; }
.cat-chip .icon { width: 16px; height: 16px; }
.cat-chip:hover { border-color: var(--ink); }

/* search suggestions */
.has-suggest { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 45; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: 0 16px 40px -12px rgba(23,62,50,.28); padding: 6px; max-height: min(420px, 60vh); overflow-y: auto; }
.suggest-opt { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; text-decoration: none; min-height: 52px; }
.suggest-opt[aria-selected="true"], .suggest-opt:hover { background: var(--sage); }
.suggest-opt img, .suggest-thumb-empty { width: 48px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; background: var(--sage); }
.suggest-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.suggest-text strong { font-size: .97rem; }
.suggest-prep { font-size: .82rem; color: var(--ink-2); }
.status-xs { font-size: .74rem; padding: 2px 8px 2px 6px; flex: none; }
.status-xs .icon { width: 13px; height: 13px; }
.suggest-note { font-size: .85rem; color: var(--ink-2); margin: 4px 10px 6px; }
.suggest-all { font-weight: 650; font-size: .92rem; padding-left: 4px; }
.footer-emergency { display: flex; gap: 8px; align-items: flex-start; }
.footer-emergency .icon { margin-top: 3px; flex: none; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
main:has(> .trust-band:last-child) + .site-footer { margin-top: 0; border-top: 1px solid rgba(255,255,255,.12); }
.demo-photo img { aspect-ratio: 5 / 4; max-height: 440px; }
.learn-lead-media img { aspect-ratio: 2 / 1; }
picture { display: contents; }

/* Food photographs: one landscape 4:3 frame everywhere (derivatives are 4:3, so nothing is cropped).
   No fixed heights or viewport-based sizing. */
.food-hero .media, .food-card .media { aspect-ratio: 4 / 3; max-height: none; height: auto; }
.food-hero .media img, .food-card .media img { width: 100%; height: 100%; object-fit: cover; }
.demo-photo img, .cat-hero-media img, .prep-photo img { aspect-ratio: 4 / 3; max-height: none; height: auto; width: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .food-hero .media { aspect-ratio: 4 / 3; }
  .cat-hero-media img { aspect-ratio: 4 / 3; }
  .prep-demo-media { max-width: 560px; }
}
/* "Learn the essentials" lead and guide cards show food photos too: same 4:3 frame.
   The img carries width/height attributes, so its height must be auto (set globally above)
   or the attribute height (e.g. 1080px) would override aspect-ratio. */
.learn-lead-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sage); }
.learn-lead-media img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.guide-media, .grid-2 .guide-media { aspect-ratio: 4 / 3; }
.cat-tiles-sm .cat-tile { aspect-ratio: 4 / 3; }
