/* ================================================================
   AYUVO — site stylesheet
   ----------------------------------------------------------------
   Two stocks: INK (dark, hero / privacy / CTA) and PAPER (long reads;
   follows the reader's light or dark setting). Fraunces (display),
   Manrope (body), JetBrains Mono (data), all self-hosted from
   /assets/fonts. The site makes no third-party requests and uses no
   inline styles (CSP style-src 'self').
   ================================================================ */

/* ---------------------------------------------------------------
   FONTS (OFL, see assets/fonts/OFL-*.txt)
--------------------------------------------------------------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("assets/fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

/* ---------------------------------------------------------------
   TOKENS
--------------------------------------------------------------- */
:root {
  /* Light, calm palette: white and pale sky (clean, clinical, trustworthy), blue accent, teal for health.
     "ink" is the name of the tinted section stock and "cream" the text on it; both are light/dark-on-light now. */
  --ink: #eef6fd;
  --ink-2: #e3f0fb;
  --ink-3: #d5e8f8;
  --paper: #ffffff;

  --accent: #1673e6;
  --accent-deep: #0b57c2;
  --accent-soft: rgba(22, 115, 230, 0.12);
  --accent-2: #17a398;

  --cream-text: #0f2a47;
  --cream-dim: rgba(15, 42, 71, 0.74);
  --cream-faint: rgba(15, 42, 71, 0.56);
  --hair-on-ink: rgba(15, 42, 71, 0.14);

  --surface: #ffffff;
  --surface-2: #f2f7fc;
  --surface-3: #e4eef8;
  --fg: #0f2a47;
  --fg-dim: rgba(15, 42, 71, 0.74);
  --fg-faint: rgba(15, 42, 71, 0.56);
  --line: rgba(15, 42, 71, 0.14);
  --accent-text: #0b57c2;
  --code-bg: rgba(15, 42, 71, 0.07);

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  --nav-h: 64px;
  --pad: clamp(20px, 4.5vw, 56px);
  --radius: 20px;
  --ease-snap: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

/* ---------------------------------------------------------------
   RESET / BASE
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--cream-text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 500; color: var(--accent); }
ul, ol { margin: 0; padding-left: 1.25em; }
code { font-family: var(--mono); font-size: 0.88em; padding: 0.08em 0.4em; border-radius: 6px; background: var(--code-bg); }
.container { width: min(1180px, 100% - 2 * var(--pad)); margin-inline: auto; }
.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------
   NAV
--------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--hair-on-ink); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 20px; }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.02em; }
.nav-brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: clamp(12px, 2vw, 26px); font-weight: 600; font-size: 0.93rem; color: var(--cream-dim); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--cream-text); }
.nav-cta { padding: 8px 16px; border-radius: 999px; background: var(--accent); color: #fff !important; font-weight: 700; }
.nav-cta:hover { background: var(--accent-deep); }
.has-menu { position: relative; }
.has-menu > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.menu {
  position: absolute; top: 100%; left: -18px; min-width: 300px; padding: 10px;
  display: none; flex-direction: column;
  background: rgba(255, 255, 255, 0.98); border: 1px solid var(--hair-on-ink); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 42, 71, 0.16);
}
.has-menu:hover .menu, .has-menu:focus-within .menu { display: flex; }
.menu a { padding: 9px 12px; border-radius: 10px; color: var(--cream-dim); }
.menu a:hover { background: rgba(15, 42, 71, 0.06); color: var(--cream-text); }
.menu small { display: block; font-weight: 500; font-size: 0.8rem; color: var(--cream-faint); }
.nav-toggle { display: none; padding: 10px; margin-right: -10px; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--cream-text); border-radius: 2px; }
@media (max-width: 980px) {
  .js .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
    background: var(--ink-2); border-bottom: 1px solid var(--hair-on-ink);
  }
  .js .nav-links { display: none; }
  .js .nav-links.open { display: flex; }
  .nav-links a { padding: 13px var(--pad); border-top: 1px solid var(--hair-on-ink); }
  .nav-cta { margin: 12px var(--pad); text-align: center; border-top: 0 !important; }
  .has-menu > a::after { display: none; }
  .menu { position: static; display: flex; min-width: 0; padding: 0; background: none; border: 0; box-shadow: none; }
  .menu a { padding-left: calc(var(--pad) + 14px); border-radius: 0; }
  .menu small { display: none; }
}

/* ---------------------------------------------------------------
   BUTTONS / BADGES
--------------------------------------------------------------- */
.cta-group { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.store-btn { display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: 0.98rem; background: var(--accent); color: #fff; transition: transform 0.25s var(--ease-snap), background 0.25s; }
.store-btn:hover { transform: translateY(-2px); background: var(--accent-deep); }
.store-btn.secondary { background: transparent; color: var(--cream-text); border: 1px solid var(--hair-on-ink); }
.store-btn.secondary:hover { background: rgba(15, 42, 71, 0.06); }
.store-btn .icon { width: 1.3em; height: 1.3em; }
.store-btn.dark { background: var(--fg); color: var(--surface); }
.badge { display: inline-flex; align-items: center; }
.badge img { height: 44px; width: auto; }
.badge.play img { height: 64px; margin: -10px -8px; }
.soon { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 12px; border: 1px dashed var(--hair-on-ink); color: var(--cream-dim); font-weight: 600; font-size: 0.92rem; }
.soon .icon { width: 1.25em; height: 1.25em; }
.cta-note { margin-top: 18px; font-size: 0.86rem; color: var(--cream-faint); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); }
.link-arrow::after { content: "→"; transition: transform 0.25s var(--ease-snap); }
.link-arrow:hover::after { transform: translateX(4px); }
.paper .link-arrow { color: var(--accent-text); }

/* ---------------------------------------------------------------
   PHONE FRAME — keeps a 588 x 1280 capture in a bezel
--------------------------------------------------------------- */
.phone-frame { width: min(300px, 78vw); aspect-ratio: 588 / 1280; border-radius: 46px; padding: 9px; background: linear-gradient(160deg, #323842, #090b0f); box-shadow: 0 30px 70px rgba(15, 42, 71, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.09); }
.phone-screen { width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: #000; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-caption { margin-top: 14px; text-align: center; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--fg-faint); }
.ink .phone-caption { color: var(--cream-faint); }
.phones { display: flex; justify-content: center; align-items: flex-end; gap: clamp(12px, 2.2vw, 28px); }
.phones .phone-frame { width: min(250px, 30vw); }
.phones.pair .phone-frame { width: min(240px, 42vw); }
.phones .phone-frame:nth-child(even) { margin-bottom: clamp(0px, 3vw, 44px); }
.phones.fan { align-items: center; }
.phones.fan .phone-frame { width: min(230px, 28vw); }
.phones.fan .phone-frame:nth-child(2) { width: min(300px, 38vw); z-index: 2; margin: 0; }
.phones.fan .phone-frame:first-child { transform: rotate(-4deg) translateY(28px); }
.phones.fan .phone-frame:last-child { transform: rotate(4deg) translateY(28px); }
.single .phone-frame { margin-inline: auto; }
@media (max-width: 640px) {
  .phones .phone-frame { width: min(200px, 44vw); }
  .phones.fan .phone-frame:first-child, .phones.fan .phone-frame:last-child { display: none; }
  .phones.fan .phone-frame:nth-child(2) { width: min(260px, 70vw); }
  .phones .phone-frame:nth-child(3) { display: none; }
  .phones.fan .phone-frame:nth-child(3) { display: none; }
}

/* ---------------------------------------------------------------
   HERO
--------------------------------------------------------------- */
.hero { padding: calc(var(--nav-h) + 64px) 0 0; background: radial-gradient(1100px 600px at 50% -10%, rgba(22, 115, 230, 0.16), transparent 62%), radial-gradient(800px 420px at 92% 18%, rgba(23, 163, 152, 0.12), transparent 60%), var(--ink); overflow: hidden; }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cream-faint); margin-bottom: 30px; }
.hero-meta .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.hero-center { text-align: center; max-width: 900px; margin-inline: auto; }
.hero-title { font-size: clamp(2.7rem, 7vw, 5.6rem); line-height: 1.02; }
.hero-lede { font-size: clamp(1.05rem, 1.5vw, 1.28rem); color: var(--cream-dim); max-width: 62ch; margin: 24px auto 32px; }
.hero-center .cta-group { justify-content: center; }
.hero-stage { margin-top: clamp(36px, 6vw, 72px); }
.hero-stage .phones { margin-bottom: -60px; }
.hero.compact { padding-bottom: clamp(48px, 7vw, 88px); }
.hero.compact .hero-stage .phones { margin-bottom: 0; }
.hero-split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-split .hero-title { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
.hero-split .hero-lede { margin-left: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 22px; padding: 0; list-style: none; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.04em; color: var(--cream-faint); }
.crumbs li + li::before { content: "/"; margin-right: 10px; opacity: 0.6; }
.crumbs a:hover { color: var(--cream-text); }
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-split .hero-visual { order: -1; }
}

/* ---------------------------------------------------------------
   PRIVACY BAND
--------------------------------------------------------------- */
.pband { border-top: 1px solid var(--hair-on-ink); border-bottom: 1px solid var(--hair-on-ink); background: var(--ink-2); position: relative; z-index: 3; }
.pband .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.pband-item { display: flex; align-items: center; gap: 14px; padding: 22px 0; font-weight: 700; font-size: 0.97rem; }
.pband-item + .pband-item { border-left: 1px solid var(--hair-on-ink); padding-left: 24px; }
.pband-item .icon { width: 1.5em; height: 1.5em; color: var(--accent); }
.pband-item small { display: block; font-weight: 500; font-size: 0.84rem; color: var(--cream-dim); line-height: 1.4; }
@media (max-width: 900px) {
  .pband .container { grid-template-columns: repeat(2, 1fr); }
  .pband-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .pband-item:nth-child(n+3) { border-top: 1px solid var(--hair-on-ink); }
}
@media (max-width: 520px) {
  .pband .container { grid-template-columns: 1fr; }
  .pband-item + .pband-item { border-left: 0; border-top: 1px solid var(--hair-on-ink); padding-left: 0; }
}

/* ---------------------------------------------------------------
   SECTIONS
--------------------------------------------------------------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.paper { background: var(--surface); color: var(--fg); }
.paper code { background: var(--code-bg); }
.paper.alt { background: var(--surface-2); }
.ink { background: var(--ink); color: var(--cream-text); }
.ink.raised { background: var(--ink-2); }
.section-head { max-width: 780px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.5rem); margin-top: 14px; }
.section-head p { margin-top: 16px; color: var(--fg-dim); font-size: 1.08rem; }
.ink .section-head p { color: var(--cream-dim); }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.eyebrow .num { padding: 3px 8px; border: 1px solid currentColor; border-radius: 6px; }
.ink .eyebrow { color: var(--accent); }

/* split: text + media, alternating */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.split + .split { margin-top: clamp(56px, 8vw, 110px); }
.split.reverse .split-media { order: -1; }
.split h2, .split h3 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin: 12px 0 16px; }
.split p { color: var(--fg-dim); font-size: 1.06rem; }
.ink .split p { color: var(--cream-dim); }
.split ul, .ticks { list-style: none; padding: 0; display: grid; gap: 10px; margin: 18px 0 26px; }
.split li, .ticks li { display: flex; gap: 12px; align-items: flex-start; color: var(--fg-dim); font-size: 1rem; }
.ink .split li, .ink .ticks li { color: var(--cream-dim); }
.split li::before, .ticks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 0.28em; border-radius: 50%; background: var(--accent-soft) url("assets/icons/check.svg") center / 12px no-repeat; }
.split-media { display: flex; justify-content: center; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
}

/* bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { position: relative; grid-column: span 2; display: flex; flex-direction: column; min-height: 300px; padding: 26px 26px 0; border-radius: 28px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; color: var(--fg); transition: transform 0.35s var(--ease-snap), border-color 0.25s; }
.tile:hover { transform: translateY(-4px); border-color: var(--accent); }
.tile.wide { grid-column: span 3; }
.tile.tall { grid-row: span 2; }
.tile h3 { font-size: 1.45rem; margin: 6px 0 8px; }
.tile p { color: var(--fg-dim); font-size: 0.97rem; margin: 0 0 18px; max-width: 34ch; }
.tile .eyebrow { font-size: 0.7rem; }
.tile-art { margin-top: auto; display: flex; justify-content: center; }
.tile-art .phone-frame { width: 190px; margin-bottom: -150px; border-radius: 36px; padding: 7px; }
.tile-art .phone-screen { border-radius: 30px; }
.tile.text-only { min-height: 0; padding-bottom: 26px; }
.tile.text-only p { margin-bottom: 0; }
.tile.text-only .tile-glyph { width: 40px; height: 40px; margin-bottom: 12px; color: var(--accent-text); }
@media (max-width: 980px) { .bento { grid-template-columns: repeat(2, 1fr); } .tile, .tile.wide { grid-column: span 1; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .tile.tall { grid-row: auto; } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.stat { padding: 22px 24px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.8); border: 1px solid var(--hair-on-ink); }
.stat strong { display: block; font-family: var(--display); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; color: var(--cream-text); }
.stat span { display: block; margin-top: 8px; font-size: 0.88rem; color: var(--cream-dim); }
.paper .stat { background: var(--surface-2); border-color: var(--line); }
.paper .stat strong { color: var(--fg); }
.paper .stat span { color: var(--fg-dim); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.panel { padding: 26px 28px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); color: var(--fg); }
.panel h3 { font-size: 1.35rem; margin-bottom: 10px; }
.panel p, .panel li { color: var(--fg-dim); font-size: 0.98rem; }
.panel p:last-child { margin-bottom: 0; }
.panel ul { padding-left: 1.1em; display: grid; gap: 6px; }
.ink .panel { background: rgba(255, 255, 255, 0.8); border-color: var(--hair-on-ink); color: var(--cream-text); }
.ink .panel p, .ink .panel li { color: var(--cream-dim); }
.panel .kicker { display: block; margin-bottom: 10px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.ink .panel .kicker { color: var(--accent); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

/* works-with row */
.works-with { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0 6px; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font-weight: 700; font-size: 0.95rem; }
.chip .icon { width: 1.3em; height: 1.3em; color: var(--accent-text); }
.chip small { display: block; font-weight: 500; font-size: 0.74rem; color: var(--fg-faint); line-height: 1.2; }
.ink .chip { background: rgba(255, 255, 255, 0.8); border-color: var(--hair-on-ink); color: var(--cream-text); }
.ink .chip small { color: var(--cream-faint); }
.ink .chip .icon { color: var(--accent); }

/* tables */
.table-wrap { overflow-x: auto; margin: 18px 0 28px; border-radius: 16px; border: 1px solid var(--line); }
.data-table, .legal-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.data-table th, .data-table td, .legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.data-table tr:last-child td, .legal-table tr:last-child td { border-bottom: 0; }
.data-table th, .legal-table th { font-weight: 700; color: var(--fg); background: var(--surface-2); white-space: nowrap; }
.data-table td, .legal-table td { color: var(--fg-dim); }
.data-table td strong { color: var(--fg); }
.data-table .num { text-align: right; font-family: var(--mono); font-size: 0.86rem; white-space: nowrap; }
.ink .table-wrap { border-color: var(--hair-on-ink); }
.ink .data-table th { background: rgba(255, 255, 255, 0.7); color: var(--cream-text); }
.ink .data-table td { color: var(--cream-dim); border-color: var(--hair-on-ink); }
.ink .data-table td strong { color: var(--cream-text); }
.ink .data-table th { border-color: var(--hair-on-ink); }
.data-table .hl td { background: var(--accent-soft); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-family: var(--mono); font-size: 0.72rem; border: 1px solid currentColor; color: var(--accent-text); white-space: nowrap; }
.ink .tag { color: var(--accent); }
.tag.plain { color: var(--fg-faint); }
.ink .tag.plain { color: var(--cream-faint); }

/* comparison pages */
.compare-table th[scope="row"] { white-space: normal; min-width: 9.5rem; background: var(--surface-2); }
.compare-table td { min-width: 15rem; }
.compare-table sup a, .prose sup a { color: var(--accent-text); font-weight: 700; padding: 0 2px; }
@media (max-width: 720px) {
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table th, .compare-table td { display: block; }
  .compare-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare-table tr { border-bottom: 1px solid var(--line); }
  .compare-table tr:last-child { border-bottom: 0; }
  .compare-table th[scope="row"] { min-width: 0; border-bottom: 0; }
  .compare-table td { min-width: 0; border-bottom: 0; padding-top: 6px; padding-bottom: 6px; }
  .compare-table td:last-child { padding-bottom: 14px; }
  .compare-table td::before { content: attr(data-label); display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
}
.hero-lede.verdict { font-size: clamp(1.05rem, 1.4vw, 1.2rem); }
.src-list { padding-left: 1.4em; display: grid; gap: 8px; margin: 12px 0 8px; }
.src-list li { color: var(--fg-dim); }
.src-list a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
a.chip { transition: border-color 0.25s, transform 0.25s var(--ease-snap); }
a.chip:hover { border-color: var(--accent); transform: translateY(-2px); }

/* disclaimer */
.disclaimer { margin: 26px 0 0; padding: 18px 22px; border-radius: 16px; border: 1px solid var(--line); border-left: 4px solid var(--accent-2); background: var(--surface-2); color: var(--fg-dim); font-size: 0.93rem; }
.disclaimer strong { color: var(--fg); }
.disclaimer p:last-child { margin-bottom: 0; }
.ink .disclaimer { background: rgba(255, 255, 255, 0.8); border-color: var(--hair-on-ink); border-left-color: var(--accent-2); color: var(--cream-dim); }
.ink .disclaimer strong { color: var(--cream-text); }

/* model catalogue card */
.catalog { border-radius: 28px; border: 1px solid var(--hair-on-ink); background: #fff; color: var(--cream-text); overflow: hidden; box-shadow: 0 18px 44px rgba(15, 42, 71, 0.08); }
.catalog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--hair-on-ink); font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cream-faint); }
.catalog-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 22px; border-bottom: 1px solid var(--hair-on-ink); }
.catalog-row:last-child { border-bottom: 0; }
.catalog-row strong { font-size: 1rem; color: var(--cream-text); }
.catalog-row span { font-family: var(--mono); font-size: 0.78rem; color: var(--cream-dim); }
.catalog-row .meta { grid-column: 1 / -1; font-family: var(--body); font-size: 0.84rem; color: var(--cream-faint); }
.catalog-row.spot { background: linear-gradient(90deg, rgba(22, 115, 230, 0.12), transparent); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.steps.three { grid-template-columns: repeat(3, 1fr); }
.step { padding: 26px 24px 28px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); color: var(--fg); }
.step-num { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.08em; color: var(--accent-text); }
.step h3 { font-size: 1.5rem; margin: 10px 0 8px; }
.step p { color: var(--fg-dim); font-size: 0.96rem; margin: 0; }
.ink .step { background: rgba(255, 255, 255, 0.8); border-color: var(--hair-on-ink); color: var(--cream-text); }
.ink .step p { color: var(--cream-dim); }
.ink .step-num { color: var(--accent); }
@media (max-width: 900px) { .steps, .steps.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps, .steps.three { grid-template-columns: 1fr; } }

/* CTA */
.cta-section { background: radial-gradient(900px 500px at 20% 120%, rgba(23, 163, 152, 0.14), transparent 60%), radial-gradient(900px 500px at 90% -20%, rgba(22, 115, 230, 0.14), transparent 60%), var(--ink-2); border-top: 1px solid var(--hair-on-ink); border-bottom: 1px solid var(--hair-on-ink); text-align: center; }
.cta-content { max-width: 760px; margin-inline: auto; }
.cta-content h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin: 14px 0 18px; }
.cta-content p { color: var(--cream-dim); font-size: 1.08rem; margin-bottom: 28px; }
.cta-content .cta-group { justify-content: center; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.faq-item { padding: 24px 26px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); color: var(--fg); }
.faq-item h3 { font-size: 1.25rem; margin-bottom: 10px; }
.faq-item p { color: var(--fg-dim); font-size: 0.97rem; margin: 0; }
.faq-item a, .prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 800px) { .faq-grid { grid-template-columns: 1fr; } }

/* prose (feature-page detail sections) */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 14px; }
.prose h3 { font-family: var(--body); font-weight: 700; font-size: 1.1rem; letter-spacing: 0; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--fg-dim); }
.prose ul { display: grid; gap: 8px; margin-bottom: 1em; }
.prose strong { color: var(--fg); }

.prose.wide { max-width: none; }
.prose.wide > .section-head { margin-bottom: 28px; }
.split + .prose, .prose + .prose, .prose + .split { margin-top: clamp(48px, 7vw, 96px); }
ol.steps-list { counter-reset: s; }
ol.steps-list li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 24px; height: 24px; margin-top: 0.2em; background: var(--accent-soft); color: var(--accent-text); font-family: var(--mono); font-size: 0.78rem; font-weight: 700; }

/* open-source */
.repo { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 22px 26px; border-radius: var(--radius); border: 1px solid var(--hair-on-ink); background: rgba(255, 255, 255, 0.8); }
.repo code { font-size: 0.95rem; }
.gh-btn { display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; }
.gh-btn:hover { background: var(--accent-deep); }
.gh-btn .icon { width: 1.3em; height: 1.3em; }
.tree { margin: 0; padding: 22px 24px; border-radius: 16px; background: #fff; border: 1px solid var(--hair-on-ink); font-family: var(--mono); font-size: 0.82rem; line-height: 1.7; color: var(--cream-dim); overflow-x: auto; }
.tree b { color: var(--cream-text); font-weight: 600; }

/* ---------------------------------------------------------------
   FOOTER
--------------------------------------------------------------- */
.footer { background: var(--ink); color: var(--cream-dim); padding: 64px 0 36px; border-top: 1px solid var(--hair-on-ink); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand-mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--cream-text); margin-bottom: 14px; }
.footer-brand-mark img { width: 30px; height: 30px; }
.footer-brand p { font-size: 0.93rem; max-width: 40ch; }
.footer-col .footer-h { margin: 0 0 14px; font-weight: 700; font-family: var(--body); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream-faint); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 10px; font-size: 0.93rem; }
.footer-col a:hover { color: var(--cream-text); }
.footer-legal { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--hair-on-ink); font-size: 0.78rem; line-height: 1.6; color: var(--cream-faint); max-width: 110ch; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 22px; font-size: 0.84rem; color: var(--cream-faint); }
@media (max-width: 980px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------
   LEGAL / SUPPORT PAGES
--------------------------------------------------------------- */
.page { background: var(--surface); color: var(--fg); padding: calc(var(--nav-h) + 56px) 0 80px; min-height: 60vh; }
.page-content { max-width: 800px; }
.page-content h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 10px; }
.page-date { display: block; font-family: var(--mono); font-size: 0.8rem; color: var(--fg-faint); margin-bottom: 36px; }
.page-content h2 { font-size: 1.7rem; margin: 44px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.page-content h3 { font-family: var(--body); font-weight: 700; font-size: 1.05rem; margin: 26px 0 8px; }
.page-content p, .page-content li { color: var(--fg-dim); font-size: 1rem; }
.page-content ul { display: grid; gap: 8px; margin-bottom: 1em; }
.page-content a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.page-content strong { color: var(--fg); }
.page-content code { background: var(--code-bg); }
.summary { padding: 22px 24px; border-radius: var(--radius); background: var(--surface-2); border-left: 4px solid var(--accent); margin-bottom: 28px; }
.summary p:last-child { margin-bottom: 0; }
.legal-table { margin: 0; }
.toc { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 0.95rem; margin-bottom: 8px; }
.toc a { text-decoration: none; }
.notice { font-family: var(--mono); font-size: 0.82rem; white-space: pre-wrap; padding: 18px 20px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg-dim); }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 20px 0 30px; }
.card { padding: 22px 24px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.mail-btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; background: var(--fg); color: var(--surface); font-weight: 700; text-decoration: none; }
.page-content .mail-btn { color: var(--surface); text-decoration: none; }
@media (max-width: 680px) { .card-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------
   404
--------------------------------------------------------------- */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: calc(var(--nav-h) + var(--pad)) var(--pad) var(--pad); }
.notfound img { width: 84px; height: 84px; margin: 0 auto 22px; }
.notfound h1 { font-size: clamp(2rem, 7vw, 3.4rem); margin-bottom: 10px; }
.notfound p { color: var(--cream-dim); }
.notfound ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin: 22px 0 28px; font-weight: 600; color: var(--cream-dim); }
.notfound ul a:hover { color: var(--cream-text); }

/* ---------------------------------------------------------------
   REVEAL (only applied by site.js, so content is never hidden without it)
--------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease-snap), transform 0.7s var(--ease-snap); }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .store-btn, .tile, .link-arrow::after { transition: none; }
}

/* ---------------------------------------------------------------
   NUTRIENT GUIDES (/nutrients, scripts/web/nutrient_pages.py)
   Inline SVG diagrams are styled here: the CSP allows no inline styles.
--------------------------------------------------------------- */
.nglyph { width: 1.4em; height: 1.4em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nt-hero .hero-lede sup a, .nt-caption sup a, .nt-card sup a, .nt-lede sup a, .nt-too sup a, .data-table sup a, .nt-limit sup a { color: var(--accent-text); font-weight: 700; padding: 0 2px; }
.nt-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 4px; }
.nt-meta span { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--hair-on-ink); background: rgba(255, 255, 255, 0.7); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--cream-dim); }
.nt-photo { margin: 0; }
.nt-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 28px; box-shadow: 0 30px 70px rgba(15, 42, 71, 0.22); }
.nt-photo figcaption { margin-top: 10px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.02em; color: var(--cream-faint); text-align: right; }
.nt-photo figcaption a { text-decoration: underline; text-underline-offset: 2px; }
.nt-hero .hero-title { font-size: clamp(2.3rem, 5vw, 4rem); }

/* "what it does" cards */
.nt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.nt-cards-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.nt-cards-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 28px; }
.nt-card { padding: 22px 22px 20px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); color: var(--fg); }
.nt-card h3 { font-size: 1.2rem; margin: 14px 0 6px; }
.nt-card p { margin: 0; color: var(--fg-dim); font-size: 0.95rem; line-height: 1.5; }
.nt-card-row { display: flex; gap: 16px; align-items: flex-start; }
.nt-card-row h3 { margin-top: 2px; }
.nt-ico { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.nt-ico .nglyph { width: 26px; height: 26px; }
.nt-cards .nt-card:nth-child(3n+2) .nt-ico { background: rgba(23, 163, 152, 0.14); color: #0f7f76; }
.nt-cards .nt-card:nth-child(3n) .nt-ico { background: rgba(232, 146, 38, 0.16); color: #a4580b; }
.nt-caption { margin: 14px 0 0; font-size: 0.9rem; color: var(--fg-faint); max-width: 90ch; }
.ink .nt-caption { color: var(--cream-dim); }
.nt-lede { font-size: 1.06rem; color: var(--fg-dim); max-width: 75ch; }

/* body flow diagram */
.flow-wrap { border-radius: 24px; background: var(--surface); border: 1px solid var(--line); padding: clamp(12px, 2.4vw, 28px); }
.flow { width: 100%; height: auto; }
.flow-tall { display: none; max-width: 420px; margin-inline: auto; }
@media (max-width: 720px) { .flow-wide { display: none; } .flow-tall { display: block; } }
.flow-node rect { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.2; }
.flow-node.is-first rect { fill: #e6f0fd; stroke: rgba(22, 115, 230, 0.45); }
.flow-node.is-last rect { fill: #e2f5f2; stroke: rgba(23, 163, 152, 0.5); }
.flow-num { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; fill: var(--accent-text); }
.flow-node.is-last .flow-num { fill: #0f7f76; }
.flow-label { font-family: var(--body); font-weight: 800; font-size: 17px; fill: var(--fg); }
.flow-tall .flow-label { font-size: 17px; }
.flow-sub { font-family: var(--body); font-weight: 500; font-size: 13.5px; fill: var(--fg-dim); }
.flow-tall .flow-sub { font-size: 13.5px; }
.flow-arrow { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.flow-arrow-head { fill: var(--accent); }
.flow-dash { fill: none; stroke: #c9771c; stroke-width: 2; stroke-dasharray: 5 5; stroke-linecap: round; }
.flow-dash-head { fill: #c9771c; }
.flow-side rect { fill: #fdf3e6; stroke: #e4a860; stroke-width: 1.2; stroke-dasharray: 5 4; }
.flow-side-label { font-family: var(--body); font-weight: 800; font-size: 13.5px; fill: #8a4a0a; }
.flow-tall .flow-side-label { font-size: 12.5px; }
.flow-side-sub { font-family: var(--body); font-weight: 500; font-size: 12.5px; fill: #8a4a0a; opacity: 0.85; }
.flow-verb { font-family: var(--mono); font-size: 12px; fill: #a4580b; }

/* food sources */
.nt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.nt-chips.center { justify-content: center; margin-top: 8px; }
.nt-chip { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: 0.88rem; color: var(--fg); }
.ink .nt-chip { background: rgba(255, 255, 255, 0.8); border-color: var(--hair-on-ink); color: var(--cream-text); }
a.nt-chip:hover { border-color: var(--accent); }
.nt-food-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.nt-food h3 { display: flex; align-items: center; gap: 10px; font-family: var(--body); font-size: 1rem; font-weight: 800; letter-spacing: 0; }
.nt-food h3 .nglyph { color: var(--accent-2); }
.nt-food .table-wrap { margin: 10px 0 0; }
.food-table th[scope="row"] { white-space: normal; background: transparent; font-weight: 600; color: var(--fg); }
.food-table td.num { color: var(--fg); font-weight: 600; }
@media (max-width: 820px) { .nt-food-grid { grid-template-columns: 1fr; } }

/* how much you need */
.nt-howmuch { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.nt-howmuch .table-wrap { margin-top: 0; background: rgba(255, 255, 255, 0.85); }
.table-wrap.narrow { max-width: 360px; }
.amount-table td.num { color: var(--cream-text); font-weight: 600; }
.amount-table small { font-weight: 500; color: var(--cream-faint); }
.amount-table tr.hl th, .amount-table tr.hl td { background: rgba(22, 115, 230, 0.08); }
.nt-limit { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.85); border: 1px solid var(--hair-on-ink); margin-bottom: 18px; color: var(--cream-dim); }
.nt-limit-v { font-family: var(--display); font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 600; line-height: 1.05; color: var(--cream-text); }
.nt-limit-info .nt-limit-v { font-size: 1.6rem; }
.gauge { margin: 0; padding: 20px 20px 16px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.85); border: 1px solid var(--hair-on-ink); }
.gauge svg { width: 100%; height: auto; }
.g-track { fill: var(--ink-3); }
.g-low { fill: #f3d9a4; }
.g-ok { fill: #8fd6c9; }
.g-high { fill: #f2a9a0; }
.g-outline { fill: none; stroke: rgba(15, 42, 71, 0.2); stroke-width: 1; }
.g-tick { stroke: var(--cream-text); stroke-width: 1.6; }
.g-tick-ul { stroke: #b3372a; stroke-width: 2; }
.g-label { font-family: var(--body); font-weight: 700; font-size: 16px; fill: var(--cream-text); }
.g-label-ul { fill: #9c2b1f; }
.g-axis { font-family: var(--mono); font-size: 13px; fill: var(--cream-faint); }
.gauge-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; font-size: 0.82rem; color: var(--cream-dim); }
.gl { display: inline-flex; align-items: center; gap: 7px; }
.gl::before { content: ""; width: 12px; height: 12px; border-radius: 3px; }
.gl-low::before { background: #f3d9a4; }
.gl-ok::before { background: #8fd6c9; }
.gl-high::before { background: #f2a9a0; }
@media (max-width: 900px) { .nt-howmuch { grid-template-columns: 1fr; } }

/* too little / too much */
.nt-too-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.nt-too-grid.one { grid-template-columns: 1fr; max-width: 640px; }
.nt-too { padding: 24px 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.nt-too-low { border-top: 5px solid #e8a33d; }
.nt-too-high { border-top: 5px solid #d2503f; }
.nt-too-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.nt-too-head h3 { font-size: 1.5rem; }
.nt-too-low .nt-too-head .nglyph { color: #b86e12; width: 32px; height: 32px; }
.nt-too-high .nt-too-head .nglyph { color: #b3372a; width: 32px; height: 32px; }
.nt-too p { color: var(--fg-dim); font-size: 0.97rem; }
.nt-too-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.nt-too-list li { padding: 7px 13px; border-radius: 12px; font-size: 0.9rem; font-weight: 600; color: var(--fg); }
.nt-too-low .nt-too-list li { background: #fbf0dc; }
.nt-too-high .nt-too-list li { background: #fbe4e0; }
@media (max-width: 800px) { .nt-too-grid { grid-template-columns: 1fr; } }

/* blood marker */
.nt-marker { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 36px); align-items: start; }
.nt-marker-ico { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 24px; background: var(--accent-soft); color: var(--accent-text); }
.nt-marker-ico .nglyph { width: 44px; height: 44px; }
.nt-marker .section-head { margin-bottom: 18px; }
.nt-marker > div { min-width: 0; }
.nt-food-grid > *, .nt-howmuch > * { min-width: 0; }   /* let a wide lab table scroll inside .table-wrap instead of widening the page */
.marker-wrap { max-width: 720px; }
.marker-table th.num { text-align: left; white-space: nowrap; }
@media (max-width: 640px) { .nt-marker { grid-template-columns: 1fr; } .nt-marker-ico { width: 64px; height: 64px; } }

/* remember five */
.nt-remember { list-style: none; padding: 0; margin: 0; counter-reset: rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.nt-remember li { counter-increment: rem; padding: 22px 22px 20px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.85); border: 1px solid var(--hair-on-ink); color: var(--cream-text); font-weight: 600; font-size: 0.98rem; line-height: 1.45; }
.nt-remember li::before { content: counter(rem, decimal-leading-zero); display: block; margin-bottom: 10px; font-family: var(--display); font-size: 2.2rem; font-weight: 600; line-height: 1; color: var(--accent); }

/* hub */
.nt-hub-group + .nt-hub-group { margin-top: clamp(48px, 7vw, 84px); }
.nt-hub-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.nt-hub-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.nt-hub-head p { margin: 0; color: var(--fg-dim); }
.nt-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.nt-hub-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg); transition: transform 0.3s var(--ease-snap), border-color 0.25s; }
.nt-hub-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.nt-hub-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.nt-hub-body { position: relative; padding: 16px 18px 18px; }
.nt-hub-body h3 { font-size: 1.3rem; margin-bottom: 6px; padding-right: 64px; }
.nt-hub-body p { margin: 0; font-size: 0.92rem; color: var(--fg-dim); line-height: 1.45; }
.nt-style { position: absolute; top: 18px; right: 16px; padding: 2px 9px; border-radius: 999px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.04em; border: 1px solid currentColor; }
.nt-style-target { color: #0f7f76; }
.nt-style-limit { color: #b3372a; }
.nt-style-info { color: var(--fg-faint); }
.nt-src { display: inline-block; white-space: nowrap; margin-top: 8px; margin-right: 6px; padding: 2px 9px; border-radius: 999px; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.03em; color: var(--fg-dim); background: var(--surface-3, rgba(127, 127, 127, 0.12)); }
.nt-hub-note { margin: 0 0 28px; max-width: 70ch; font-size: 0.95rem; }
.nt-hub-note .nt-src { margin: 0 2px; vertical-align: 1px; }
.nt-illus { margin: 0; width: 100%; padding: 18px 18px 12px; border-radius: 24px; background: rgba(255, 255, 255, 0.9); border: 1px solid var(--hair-on-ink); }
.nt-illus svg { width: 100%; height: auto; }
.nt-illus figcaption { font-family: var(--mono); font-size: 0.72rem; color: var(--cream-faint); margin-top: 6px; }
.ci-axis { stroke: var(--hair-on-ink); stroke-width: 1.5; }
.ci-bar { fill: var(--accent); opacity: 0.85; }
.ci-bar.ci-over { fill: #d2503f; }
.ci-day { font-family: var(--mono); font-size: 13px; fill: var(--cream-faint); }
.ci-rec { stroke: #17a398; stroke-width: 2.2; stroke-dasharray: 7 6; }
.ci-ul { stroke: #d2503f; stroke-width: 2.2; }
.ci-lab { font-family: var(--body); font-weight: 700; font-size: 14px; }
.ci-lab-rec { fill: #0f7f76; }
.ci-lab-ul { fill: #9c2b1f; }
.nt-howmuch.single { grid-template-columns: minmax(0, 760px); }
.nt-notes { margin: 14px 0 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: 0.9rem; color: var(--cream-dim); }
.nt-howmuch > div { min-width: 0; }
.food-table tr:last-child th, .amount-table tr:last-child th, .marker-table tr:last-child th { border-bottom: 0; }
@media (max-width: 560px) {
  .nt-cards:not(.nt-cards-2):not(.nt-cards-3) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .nt-cards:not(.nt-cards-2):not(.nt-cards-3) .nt-card { padding: 16px 14px; }
  .nt-card h3 { font-size: 1.08rem; }
  .nt-card p { font-size: 0.9rem; }
  .flow-wrap { padding: 10px; border-radius: 18px; }
  .gauge { padding: 14px 12px 12px; }
  .nt-remember { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .amount-table small { display: block; }
  .amount-table th, .amount-table td { padding: 10px 10px; }
}
@media (max-width: 560px) {
  .nt-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .nt-hub-body { padding: 12px 12px 14px; }
  .nt-hub-body h3 { font-size: 1.05rem; padding-right: 0; }
  .nt-hub-body p { font-size: 0.82rem; }
  .nt-style { position: static; display: inline-block; margin-top: 8px; }
}
