@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --sand: #f1e7d8;
  --line: #e6ddcf;
  --text: #1c2a27;
  --muted: #59685f;
  --primary: #0e5e5a;
  --primary-2: #0a4542;
  --primary-soft: #e0efeb;
  --mint: #cfe7e0;
  --accent: #d2603a;
  --accent-2: #b54a26;
  --accent-soft: #fbe7dd;
  --warn-bg: #fff3e3;
  --warn-line: #efb36a;
  --info-bg: #e9f3f6;
  --info-line: #a8cdd8;
  --low: #1d7342;
  --low-bg: #e1f3e7;
  --medium: #8a5a00;
  --medium-bg: #fcefd2;
  --high: #b3261e;
  --high-bg: #fde6e3;
  --radius: 16px;
  --radius-lg: 26px;
  --shadow: 0 1px 2px rgba(28, 42, 39, .05), 0 10px 30px -12px rgba(28, 42, 39, .16);
  --shadow-lg: 0 2px 4px rgba(28, 42, 39, .05), 0 24px 50px -20px rgba(28, 42, 39, .28);
  --max: 1160px;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101816;
    --surface: #17221f;
    --surface-2: #1d2b27;
    --sand: #22302b;
    --line: #2d3d38;
    --text: #e9f0ed;
    --muted: #a9b9b3;
    --primary: #5cc6bb;
    --primary-2: #86dbd1;
    --primary-soft: #18352f;
    --mint: #1d3c36;
    --accent: #f08a62;
    --accent-2: #f6a283;
    --accent-soft: #3a2219;
    --warn-bg: #2c2114;
    --warn-line: #84612f;
    --info-bg: #13262c;
    --info-line: #2f5866;
    --low: #82d8a0;
    --low-bg: #163020;
    --medium: #f1c66b;
    --medium-bg: #33290f;
    --high: #ff958c;
    --high-bg: #3a1a18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .5);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 50px -20px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17.5px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
svg { max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 1.6em 0 .5em; letter-spacing: -.012em; }
h1 { font-size: clamp(2rem, 4.6vw, 3rem); margin-top: .2em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin: .4em 0; }
li::marker { color: var(--primary); }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.small { font-size: .9rem; color: var(--muted); }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 46em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (max-width: 520px) { .wrap { padding: 0 16px; } body { font-size: 17px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 20; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 6px; }

/* Header */
.top { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 1.45rem; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.logo b { font-weight: 600; color: var(--accent); }
.logo-mark { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; padding: 7px 13px; border-radius: 999px; font-size: .97rem; font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
@media (max-width: 780px) {
  .top { position: static; }
  .top .wrap { padding-top: 10px; padding-bottom: 8px; gap: 8px; }
  .nav { margin: 0 -8px; width: calc(100% + 16px); overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .nav a { white-space: nowrap; }
}

main { padding: 18px 0 64px; overflow-x: clip; }
.crumbs { font-size: .9rem; color: var(--muted); margin: 8px 0 4px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: #fff; border: 2px solid var(--primary); border-radius: 999px; padding: 11px 22px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn:hover { background: var(--primary-2); border-color: var(--primary-2); color: #fff; transform: translateY(-1px); }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-2); border-color: var(--accent-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.ghost), :root:not([data-theme="light"]) .btn:not(.ghost):hover { color: #0b1f1c; } }
.btn.ghost { background: transparent; color: var(--primary); box-shadow: none; }
.btn.ghost:hover { background: var(--primary-soft); color: var(--primary-2); }
.btn.danger { color: var(--high); border-color: var(--high); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0; }
label { display: block; font-weight: 600; margin: 12px 0 5px; }
label.inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin-right: 16px; }
input[type="search"], input[type="text"], input[type="email"], input:not([type]), input[type="time"], input[type="datetime-local"], select {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; min-height: 48px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
input[type="range"] { width: 100%; accent-color: var(--primary); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 14px 0; padding: 8px 16px 12px; background: var(--surface); }
legend { font-weight: 700; padding: 0 6px; }
fieldset label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 9px 0; }
fieldset label input { margin-top: 4px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; align-items: end; }

/* Cards and panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow); }
.panel > h2:first-child, .panel > noscript + h2, .plan > h2 { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, border-color .18s; overflow: hidden; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); color: var(--text); }
.card h3 { margin: .1em 0 .35em; font-size: 1.22rem; color: var(--text); }
a.card:hover h3 { color: var(--primary); }
.card p { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.6; }
.card .icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--primary-soft); margin-bottom: 12px; }
.card.photo { padding: 0; }
.card.photo .card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--sand); }
.card.photo .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
a.card.photo:hover .card-img img { transform: scale(1.04); }
.card.photo .card-img.emoji { display: grid; place-items: center; font-size: 3rem; background: linear-gradient(135deg, var(--primary-soft), var(--sand)); }
.card.photo .card-body { padding: 16px 20px 20px; }
.card.product { gap: 6px; }
.card.product .btn { margin-top: auto; align-self: flex-start; }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 3px 11px; align-self: flex-start; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 56px 0 18px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.band { background: var(--surface-2); border-radius: var(--radius-lg); padding: 8px 28px 32px; margin: 56px 0; }
.band .section-head { margin-top: 28px; }
@media (max-width: 520px) { .band { padding: 4px 16px 22px; margin-left: -4px; margin-right: -4px; } }

/* Hero */
.hero { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center; margin: 10px 0 30px; padding: 26px 0 10px; }
.hero::before { content: ""; position: absolute; inset: -40px -200px auto auto; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, var(--mint), transparent 65%); opacity: .7; z-index: -1; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.7rem); line-height: 1.07; margin: .15em 0 .35em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-search { margin-top: 6px; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px 16px 16px; box-shadow: var(--shadow); }
.hero-search label { margin-top: 0; font-size: .95rem; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; border-radius: 999px; }
.hero-visual { position: relative; }
.hero-visual .hero-img { border-radius: 32px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 4.4; background: var(--sand); }
.hero-visual .hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .hero-img.illustration { aspect-ratio: auto; background: none; box-shadow: none; }
.tip-card { position: absolute; left: -36px; bottom: -28px; max-width: 300px; background: var(--surface); border-radius: 20px; padding: 16px 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.tip-card .eyebrow { margin: 0 0 2px; }
.tip { font-size: 1.02rem; font-weight: 600; margin: 0; line-height: 1.45; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 22px 0 0; padding: 0; list-style: none; font-size: .92rem; color: var(--muted); }
.trust li { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
.trust li::before { content: "✓"; color: var(--low); font-weight: 800; }
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 6px; }
  .hero-visual .hero-img { aspect-ratio: 16 / 10; }
  .tip-card { position: relative; left: auto; bottom: auto; margin: -40px 14px 0; max-width: none; }
}
.food-day { display: flex; gap: 16px; align-items: center; text-decoration: none; color: var(--text); }
.food-day .big-emoji { font-size: 2.4rem; width: 70px; height: 70px; border-radius: 20px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); flex: none; }
.food-day strong { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }

/* Feature strip (tools) */
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 980px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tools-grid { grid-template-columns: 1fr; } }
.tool-card .icon { background: var(--accent-soft); }
.tool-card:nth-child(2) .icon { background: var(--primary-soft); }
.tool-card:nth-child(3) .icon { background: var(--medium-bg); }
.tool-card:nth-child(4) .icon { background: var(--high-bg); }
.more { font-weight: 650; text-decoration: none; white-space: nowrap; }
.more::after { content: " →"; }

/* Boxes */
.box { border-radius: var(--radius); padding: 16px 20px; margin: 22px 0; border: 1px solid; }
.box > :last-child { margin-bottom: 0; }
.box h2 { font-size: 1.2rem; margin-top: .1em; }
.box.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.box.info { background: var(--info-bg); border-color: var(--info-line); }
.box.compact { display: flex; gap: 14px; align-items: flex-start; }
.box.compact::before { content: "!"; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; margin-top: 1px; }
.box.compact p { margin: 0; }
.note-medical { margin: 40px 0 10px; padding: 14px 18px; border-left: 4px solid var(--primary); background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0; font-size: .92rem; color: var(--muted); }

/* Page header for guides and tools */
.page-head { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; margin: 4px 0 30px; padding: 30px 34px; background: linear-gradient(135deg, var(--primary-soft), var(--sand)); border-radius: var(--radius-lg); }
.page-head.no-photo { grid-template-columns: 1fr; }
.page-head h1 { margin: .1em 0 .3em; font-size: clamp(1.9rem, 4vw, 2.7rem); }
.page-head .lead { margin-bottom: .6em; color: var(--text); opacity: .85; }
.page-head .head-img { border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow-lg); }
.page-head .head-img img { width: 100%; height: 100%; object-fit: cover; }
.page-head .head-emoji { font-size: 5rem; text-align: center; }
.page-head .byline { border: 0; padding: 0; margin: 0; }
@media (max-width: 820px) { .page-head { grid-template-columns: 1fr; padding: 22px 20px; gap: 20px; } .page-head .head-img { aspect-ratio: 16 / 9; } }
.credit { font-size: .75rem; color: var(--muted); margin-top: 6px; }
.credit a { color: var(--muted); }

/* Articles */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 52px; align-items: start; }
.article { max-width: 740px; }
.article.narrow { margin: 0 auto; }
.article > .lead:first-child { font-size: 1.22rem; }
.article h2 { padding-top: .2em; }
.byline { font-size: .9rem; color: var(--muted); }
.side { position: sticky; top: 92px; display: grid; gap: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font-size: .93rem; box-shadow: var(--shadow); }
.side-card h2 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.side-card ol, .side-card ul { margin: 0; padding-left: 1.1em; }
.side-card li { margin: .3em 0; }
.side-card a { text-decoration: none; }
.side-card a:hover { text-decoration: underline; }
.side-card.cta { background: var(--primary); border-color: var(--primary); color: #fff; }
.side-card.cta h2, .side-card.cta p { color: #fff; opacity: .92; }
.side-card.cta a.btn { background: #fff; color: var(--primary); border-color: #fff; box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .side-card.cta { background: var(--primary-soft); border-color: var(--line); } }
@media (max-width: 980px) { .article-layout { grid-template-columns: 1fr; gap: 10px; } .side { position: static; } }
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; margin: 10px 0; box-shadow: var(--shadow); }
details > summary { cursor: pointer; font-weight: 650; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--primary); transition: transform .2s; }
details[open] > summary::after { transform: rotate(45deg); }
details[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
details > :last-child { margin-bottom: 16px; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
figure.illustration { margin: 26px 0; }
figure.illustration svg { width: 100%; height: auto; border-radius: 20px; box-shadow: var(--shadow); }
figure.illustration figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
figure.photo { margin: 26px 0; }
figure.photo img { border-radius: 20px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; box-shadow: var(--shadow); }
.sources { margin-top: 40px; font-size: .88rem; color: var(--muted); background: var(--surface-2); border-radius: var(--radius); padding: 4px 20px 12px; }
.sources h2 { font-size: 1.1rem; }
.sources li { margin: .45em 0; }
.sources a { color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.pager a { display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; font-weight: 650; box-shadow: var(--shadow); }
.pager a small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.pager a.next { text-align: right; grid-column: 2; }
.checklist { list-style: none; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.checklist li.done { background: var(--low-bg); border-color: transparent; }
.defs dt { font-weight: 700; margin-top: 14px; }
.defs dd { margin: 2px 0 0; color: var(--muted); }
.ladder { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 8px; counter-reset: step; }
.ladder li { counter-increment: step; display: flex; gap: 14px; align-items: center; margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ladder li::before { content: counter(step); flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--primary); }
.ladder li:nth-child(2) { margin-left: 4%; } .ladder li:nth-child(3) { margin-left: 8%; } .ladder li:nth-child(4) { margin-left: 12%; } .ladder li:nth-child(5) { margin-left: 16%; }
.ladder li:nth-child(5)::before { background: var(--accent); }
@media (max-width: 520px) { .ladder li { margin-left: 0 !important; } }

/* Risk badges */
.risk { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 3px 11px; white-space: nowrap; }
.risk span { font-weight: 900; }
.risk-low { color: var(--low); background: var(--low-bg); }
.risk-medium { color: var(--medium); background: var(--medium-bg); }
.risk-high { color: var(--high); background: var(--high-bg); }
.verdict .risk { font-size: 1rem; padding: 7px 16px; }
.risk-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.risk-dot.risk-low { background: var(--low); }
.risk-dot.risk-medium { background: var(--medium); }
.risk-dot.risk-high { background: var(--high); }

/* Food checker */
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 0 14px; align-items: end; margin: 18px 0 24px; }
.filters label { margin-top: 0; }
.filters .count { margin: 0 0 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 720px) { .filters { grid-template-columns: 1fr 1fr; } .filters > div:first-child { grid-column: 1 / -1; } .filters .count { grid-column: 1 / -1; margin-top: 8px; } }
.grid.foods { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.food-card { padding: 16px 18px; }
.food-card .food-top { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.food-card .food-emoji { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem; background: var(--surface-2); flex: none; }
.food-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.food-card p { font-size: .92rem; }
.food-hero { display: flex; gap: 22px; align-items: center; }
.food-hero .food-emoji { width: 110px; height: 110px; border-radius: 30px; display: grid; place-items: center; font-size: 3.6rem; background: var(--surface); box-shadow: var(--shadow); flex: none; }
@media (max-width: 520px) { .food-hero { flex-direction: column; align-items: flex-start; } .food-hero .food-emoji { width: 84px; height: 84px; font-size: 2.8rem; } }
.chips, .filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: .93rem; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.empty { color: var(--muted); font-style: italic; }
.swap { display: flex; gap: 14px; align-items: center; background: var(--low-bg); border-radius: var(--radius); padding: 14px 18px; }
.swap::before { content: "⇄"; font-size: 1.4rem; color: var(--low); font-weight: 800; }

/* Research */
.papers { list-style: none; padding: 0; display: grid; gap: 12px; }
.paper { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0; box-shadow: var(--shadow); }
.paper > a { font-weight: 650; text-decoration: none; color: var(--text); }
.paper > a:hover { color: var(--primary); text-decoration: underline; }
.paper-meta { font-size: .86rem; color: var(--muted); margin-top: 6px; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); background: var(--primary-soft); border-radius: 6px; padding: 2px 8px; }

/* FAQ */
.faq details p { margin-top: 0; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }
@media (max-width: 820px) { .faq-grid { grid-template-columns: 1fr; } }

/* Diary */
.diary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.diary > section:last-child { grid-column: 1 / -1; }
@media (max-width: 860px) { .diary { grid-template-columns: 1fr; } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; padding: 4px; background: var(--surface-2); border-radius: 999px; width: fit-content; max-width: 100%; }
.tabs button { font: inherit; font-size: .95rem; border: 0; background: transparent; color: var(--text); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--primary); font-weight: 700; box-shadow: var(--shadow); }
.diary-form .btn { margin-top: 16px; }
.diary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.entries { list-style: none; padding: 0; display: grid; gap: 8px; }
.entries li { display: flex; gap: 12px; align-items: baseline; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; margin: 0; }
.entries time { font-size: .86rem; color: var(--muted); min-width: 5.5em; font-variant-numeric: tabular-nums; }
.entries .what { flex: 1; }
.entries button { font: inherit; font-size: .85rem; background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }
.entries .day { background: none; border: 0; padding: 12px 0 0; font-weight: 700; font-family: var(--serif); font-size: 1.05rem; }
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--high)); border-radius: 4px; }
.insight-list { list-style: none; padding: 0; }
.insight-list li { margin: 12px 0; }

/* Planner */
.plan ol { list-style: none; padding: 0; margin: 0; position: relative; }
.plan li { display: grid; grid-template-columns: 5.2em 1fr; gap: 14px; padding: 12px 0; margin: 0; border-bottom: 1px dashed var(--line); }
.plan li:last-child { border-bottom: 0; }
.plan time { font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; background: var(--primary-soft); border-radius: 8px; padding: 2px 8px; height: fit-content; text-align: center; }
.plan .why { display: block; font-size: .9rem; color: var(--muted); }
.planner-form { margin-bottom: 18px; }

/* Doctor check */
.dc-result { border-radius: var(--radius); padding: 14px 18px; margin: 14px 0; background: var(--surface-2); }
.dc-result.emergency { background: var(--high-bg); color: var(--high); }
.dc-result.soon { background: var(--warn-bg); }
.dc-result.routine { background: var(--info-bg); }
.dc-result p { margin: 0; }
.tool { margin: 24px 0; }

/* Footer */
footer { background: #0c3b38; color: #cfe2dd; padding: 44px 0 40px; font-size: .93rem; margin-top: 30px; }
.foot-top { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 24px; }
.foot-brand p { margin: 10px 0 0; color: #a9c6c0; max-width: 22em; }
.foot-brand .logo { color: #fff; }
.foot-brand .logo b { color: #f4a27f; }
footer h2 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin: 6px 0 10px; color: #fff; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin: .35em 0; }
footer a { color: #cfe2dd; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
.foot-note { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .84rem; color: #a9c6c0; }
@media (max-width: 900px) { .foot-top { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* Print */
@media print {
  .top, footer, .nav, .side, .crumbs, .actions, .diary-form, .diary-actions, .entries button, .pager, .note-medical, .planner-form, [data-print], .skip, .head-img, .credit { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .page-head { background: none; padding: 0; }
  .panel, .card, .paper, details, .entries li { border-color: #999; box-shadow: none; break-inside: avoid; }
  .diary { display: block; }
  a { color: #000; text-decoration: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.recent { color: var(--muted); font-size: .95rem; margin: -8px 0 18px; }
.signup .row { gap: 0 16px; align-items: start; }
.signup .consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: .93rem; margin: 16px 0; }
.signup .consent input { margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reset-band { display: grid; grid-template-columns: 1fr 1.1fr; gap: 30px; align-items: center; background: linear-gradient(135deg, var(--accent-soft), var(--sand)); border-radius: var(--radius-lg); padding: 28px 30px; margin: 56px 0; }
.reset-band h2 { margin-top: 0; }
@media (max-width: 820px) { .reset-band { grid-template-columns: 1fr; padding: 22px 18px; } }
.ingredients { list-style: none; padding: 0; columns: 2; column-gap: 28px; }
.ingredients li { break-inside: avoid; padding: 6px 0 6px 22px; margin: 0; border-bottom: 1px dashed var(--line); position: relative; }
.ingredients li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@media (max-width: 600px) { .ingredients { columns: 1; } }
