/* Minh's system (comprehend/src/index.css), reworked as a research publication:
   serif for reading, mono for metadata, Replenish navy as the accent. */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #fbfbfd;
  --bg-secondary: #f5f5f7;
  --panel: #ffffff;
  --border: rgba(0, 0, 0, 0.07);
  --text: #1d1d1f;
  --text-secondary: #55555a;
  --muted: #86868b;
  --accent: #1e2b44;
  --accent-hover: #2c3d5e;
  --success: #0f8a6c;
  --success-soft: rgba(16, 163, 127, 0.07);
  --warning: #a2510a;
  --warning-soft: rgba(245, 158, 11, 0.08);
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.008em;
}
a { color: inherit; }
img { height: auto; }   /* width/height attributes reserve space; CSS keeps images responsive */
p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 56px; }
.wrap > header, .wrap > section, .wrap > article { max-width: 760px; }

/* Labels and metadata read like a journal */
.mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em; color: var(--muted); }
.eyebrow { font-family: var(--mono); font-size: 0.82rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.eyebrow b { color: var(--accent); font-weight: 700; margin-right: 10px; }
.section { border-top: 1px solid var(--border); padding: 3.5rem 0; }
.h2 { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; margin: 0 0 12px; }
.lede { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 28px; max-width: 560px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 0.92rem; padding: 11px 20px; border-radius: 10px;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-hover); }
.btn--outline { background: transparent; color: var(--text); border: 1px solid rgba(0,0,0,0.14); }
.btn--outline:hover { background: var(--bg-secondary); }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 0 1rem; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 22px; height: 26px; object-fit: contain; }
.brand span { font-weight: 600; font-size: 0.98rem; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; }
.nav-links a:hover { color: var(--text); }

.social { display: inline-flex; align-items: center; color: var(--text-secondary); text-decoration: none; transition: color 0.15s; }
.social:hover { color: #0a66c2; }
.footer-right { display: inline-flex; align-items: center; gap: 14px; }

/* Why — the opening */
.why { padding: 4.5rem 0 3.5rem; }
/* Hero: the WHY on the left, the app on the right */
.wrap > header.why { max-width: none; display: grid; grid-template-columns: minmax(0, 760px) 250px; justify-content: space-between; align-items: center; gap: 56px; }
.why-phone { margin: 0; }
.why h1 { font-family: var(--serif); font-weight: 500; font-size: 2.6rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 28px; }
.why .body p { font-family: var(--serif); font-size: 1.2rem; line-height: 1.6; color: var(--text-secondary); max-width: 600px; }
.why .body p + p { margin-top: 16px; }
.why .btns { margin-top: 36px; }

/* NutrAI mascot, from the app */
.with-mascot { display: flex; align-items: center; gap: 14px; }
.with-mascot .h2 { margin-bottom: 12px; }
.with-mascot--right { display: block; position: relative; }
.with-mascot--right .mascot-side { position: absolute; right: 0; bottom: 0; }
.with-mascot--right .h2 { padding-right: 84px; }          /* room for the mascot beside the heading */
.with-mascot--wide .h2 { padding-right: 190px; }
.mascot-avatar { width: 52px; height: auto; flex-shrink: 0; margin-bottom: 10px; }
.mascot-side { height: auto; flex-shrink: 0; margin-bottom: 6px; }
.says { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; font-size: 0.82rem; font-weight: 600; color: #0b758f; }
.says img { width: 28px; height: auto; }

/* Team */
.team { display: grid; grid-template-columns: 1fr; gap: 0; }
.person { display: grid; grid-template-columns: 96px 1fr; gap: 22px; padding: 1.5rem 0; border-top: 1px solid var(--border); align-items: start; }
.person:last-child { border-bottom: 1px solid var(--border); }
.person img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--bg-secondary); box-shadow: 0 0 0 1px rgba(0,0,0,0.08); }
.person-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; }
.person .flag { width: 18px; height: 13.5px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); vertical-align: 1px; margin-left: 6px; object-fit: cover; }
.person-role { font-size: 0.88rem; color: var(--text); margin-top: 2px; }
.person-cred { margin-top: 6px; line-height: 1.5; }
.person-bio { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-top: 10px; max-width: 560px; }

/* Mission world map */
.map { margin: 0 0 3.5rem; }
.map img { display: block; width: 100%; height: auto; }
.map-canvas { position: relative; }
.marker { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; padding: 0; border-radius: 50%; border: 2px solid var(--bg); background: #0b758f; box-shadow: 0 0 0 1px rgba(11,117,143,0.35); cursor: pointer; }
.marker::after { content: ""; position: absolute; inset: -10px; }   /* bigger tap area */
.marker--hq { width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; background: var(--accent); }
.marker:hover, .marker:focus-visible { transform: scale(1.25); outline: none; }
.marker .tip { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); white-space: nowrap; background: var(--panel); color: var(--text-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-family: var(--sans); font-size: 0.75rem; line-height: 1.35; text-align: left; box-shadow: 0 6px 20px rgba(0,0,0,0.08); opacity: 0; pointer-events: none; transition: opacity 0.15s; z-index: 2; }
.marker .tip b { display: block; color: var(--text); font-weight: 600; }
.marker.tip-left .tip { left: auto; right: -6px; transform: none; }
.marker.tip-right .tip { left: -6px; transform: none; }
.marker:hover .tip, .marker:focus .tip { opacity: 1; }
.map-legend { display: flex; gap: 20px; margin-top: 14px; font-size: 0.8rem; color: var(--text-secondary); }
.map-legend i { display: inline-block; width: 22px; height: 0; vertical-align: middle; margin-right: 8px; border-top: 2px solid var(--accent); }
.map-legend i.lg-future { border-top: 2px dashed #0b758f; }
.map-places { margin-top: 8px; line-height: 1.6; }
@media (max-width: 600px) { .marker .tip { white-space: normal; width: max-content; max-width: 190px; } .marker { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-width: 1.5px; } .marker--hq { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; } }

/* Headline statistic */
.stat { font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; max-width: 640px; margin-bottom: 22px; color: var(--text); }
.stat-num { font-weight: 600; color: #0b758f; }
.stat--inline { font-size: 1.15rem; margin: -6px 0 28px; }
.stat-src { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.stat-src:hover { text-decoration: underline; }
.map--density { margin-top: -1rem; }
.fig a { color: inherit; }

/* Long-form text (Mission) */
.prose p { font-family: var(--serif); font-size: 1.15rem; line-height: 1.65; color: var(--text-secondary); max-width: 620px; }
.prose p + p { margin-top: 14px; }
.prose p:first-child { color: var(--text); }
.step .v a { color: var(--accent); }

/* Publications index */
.pub { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 1.4rem 0; border-top: 1px solid var(--border); text-decoration: none; }
.pub:last-child { border-bottom: 1px solid var(--border); }
.pub .meta { padding-top: 4px; }
.pub .meta span { display: block; }
.pub h3 { font-family: var(--serif); font-weight: 500; font-size: 1.22rem; line-height: 1.3; margin: 0 0 6px; letter-spacing: -0.01em; }
.pub p { font-size: 0.88rem; color: var(--text-secondary); }
.pub .read { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-top: 8px; }
.pub:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag { font-family: var(--mono); font-size: 0.64rem; color: var(--text-secondary); border: 1px solid var(--border); background: var(--panel); border-radius: 4px; padding: 1px 6px; }

.meta .peer, .titles .peer { color: var(--success); }
.credential { margin-top: 18px; font-size: 0.82rem; color: var(--muted); }
.credential a { color: var(--text-secondary); }

/* Landing research teaser: titles only */
.titles { list-style: none; margin: 8px 0 0; padding: 0; }
.titles li { border-top: 1px solid var(--border); }
.titles li:last-child { border-bottom: 1px solid var(--border); }
.titles a { display: block; padding: 1rem 0; text-decoration: none; font-family: var(--serif); font-size: 1.18rem; line-height: 1.35; }
.titles a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.titles .mono { display: block; font-family: var(--mono); margin-bottom: 4px; }
.byline { font-size: 0.85rem; color: var(--text-secondary); margin-top: 14px; }
.byline a, .person-bio a { color: var(--accent); }
.more { display: inline-block; margin-top: 18px; font-size: 0.88rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.more:hover { text-decoration: underline; }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* Method */
.step { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 1.2rem 0; border-top: 1px solid var(--border); }
.step:last-child { border-bottom: 1px solid var(--border); }
.step b { display: block; font-size: 0.92rem; }
.step .v { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* Figures */
figure { margin: 0; }
figcaption.fig { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }
figcaption.fig b { color: var(--text); font-weight: 500; }
.demo { background: var(--bg-secondary); border-radius: 14px; padding: 18px 16px; border: 1px solid var(--border); }
.demo-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.demo-head strong { font-size: 0.8rem; }
.pill { font-family: var(--mono); font-size: 0.64rem; color: var(--muted); background: var(--panel); padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.row { border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--border); background: var(--panel); }
.row:last-child { margin-bottom: 0; }
.row .label { font-size: 0.76rem; margin-bottom: 3px; font-weight: 600; }
.row .body { font-size: 0.86rem; line-height: 1.5; }
.row .dose { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); margin-top: 2px; }
.row--match { background: var(--success-soft); border-color: rgba(16,163,127,0.18); }
.row--match .label { color: var(--success); }
.row--unknown { background: var(--warning-soft); border-color: rgba(245,158,11,0.2); }
.row--unknown .label { color: var(--warning); }
.row--none .label { color: var(--text-secondary); }
/* Showcase: full-bleed band with large phones, the first glimpse of the app */
html, body { overflow-x: clip; }
.showcase {
  /* Full bleed from a left-anchored column: undo the centering gutter plus the wrap padding. */
  width: 100vw; margin: 2.5rem 0 3rem calc(-1 * (max(0px, (100vw - 1160px) / 2) + 56px));
  padding: 3.75rem 0 3rem;
  background: radial-gradient(120% 90% at 50% 0%, #e6ebf3 0%, #f1f3f7 55%, var(--bg) 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.phones { max-width: 1160px; margin: 0 auto; padding: 0 56px; display: flex; justify-content: flex-start; align-items: stretch; gap: 22px; }
.phone { flex: 0 1 205px; margin: 0; }
.bezel {
  background: #101218; padding: 6px; border-radius: 30px;
  box-shadow: 0 2px 6px rgba(15,23,42,0.08), 0 30px 60px -12px rgba(15,23,42,0.28);
}
.bezel img { display: block; width: 100%; border-radius: 25px; background: #fff; }
.phone figcaption { font-family: var(--mono); font-size: 0.7rem; color: var(--text-secondary); text-align: center; margin-top: 16px; letter-spacing: 0.02em; }
@media (max-width: 760px) {
  .showcase { padding: 2.5rem 0 2rem; }
  .phones { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 20px 12px; gap: 16px; scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phone { flex: 0 0 62%; scroll-snap-align: center; }
}

.screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 2.5rem; }
.screens img { width: 100%; display: block; border-radius: 16px; border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 2px 4px rgba(0,0,0,0.04), 0 12px 32px rgba(0,0,0,0.06); background: #fff; }
.screens span { display: block; font-family: var(--mono); font-size: 0.66rem; color: var(--muted); text-align: center; margin-top: 8px; }

/* Statement + comparison */
.statement { text-align: left; }
.statement p { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; max-width: 560px; margin: 0; line-height: 1.4; letter-spacing: -0.01em; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 2.5rem; }
.card { background: var(--bg-secondary); border-radius: 12px; padding: 20px; }
.card .k { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.card .big { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; margin-bottom: 4px; }
.card .small { font-size: 0.84rem; color: var(--text-secondary); }
.card--us { border: 2px solid var(--accent); }
.card--us .k { color: var(--accent); text-transform: none; letter-spacing: 0.01em; }  /* keep the NutrAI wordmark as written */

/* Pricing */
.tier { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 1.2rem 0; border-top: 1px solid var(--border); }
.tier:last-child { border-bottom: 1px solid var(--border); }
.tier b { display: block; font-size: 0.92rem; }
.tier .price { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); }
.tier .free { font-size: 0.85rem; color: var(--success); margin-bottom: 3px; }
.tier .paid { font-size: 0.85rem; color: var(--text-secondary); }

/* CTA */
.cta { text-align: left; }
.cta .h2 { margin-bottom: 8px; }
.cta .sub { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 26px; }
.cta .btns { justify-content: flex-start; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 1.6rem 0 2.6rem; }
.footer .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer .top .brand img { width: 15px; height: 18px; }
.footer .top .brand span { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); }
.footer .legal { font-size: 0.7rem; color: var(--muted); line-height: 1.55; }

/* Article pages */
.article-head { padding: 3.5rem 0 2rem; border-bottom: 1px solid var(--border); }
.article-head h1 { font-family: var(--serif); font-weight: 500; font-size: 2.3rem; line-height: 1.2; letter-spacing: -0.02em; margin: 10px 0 14px; }
.article-head .dek { font-family: var(--serif); font-size: 1.15rem; color: var(--text-secondary); line-height: 1.5; }
.article { font-family: var(--serif); font-size: 1.15rem; line-height: 1.7; padding: 2.5rem 0 3rem; }
.article p, .article ul { margin: 0 0 1.2em; }
.article h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; margin: 2.2em 0 0.7em; }
.article a { color: var(--accent); text-decoration: none; }
.article a:hover { text-decoration: underline; }
.article sup a { font-family: var(--mono); font-size: 0.7em; }
.article li { margin-bottom: 0.4em; }
.back { display: inline-block; margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; }

@media (max-width: 960px) {
  .wrap > header.why { display: block; max-width: 760px; }
  .why-phone { display: none; }
}
@media (max-width: 600px) {
  .person { grid-template-columns: 72px 1fr; gap: 16px; }
  .person img { width: 72px; height: 72px; }
  .mascot-side--wide { width: 110px; }
  .with-mascot--wide .h2 { padding-right: 118px; }
  .wrap { padding: 0 20px; }
  .showcase { margin-left: -20px; }
  .why { padding: 3rem 0 2.5rem; }
  .why h1 { font-size: 2rem; }
  .why .body p { font-size: 1.08rem; }
  .nav-links a.hide-sm { display: none; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.8rem; }
  .brand span { font-size: 0.92rem; }
  .pub, .step, .tier { grid-template-columns: 1fr; gap: 6px; }
  .pub .meta span { display: inline; margin-right: 10px; }
  .compare { grid-template-columns: 1fr; }
  .screens { grid-template-columns: repeat(2, 1fr); }
  .footer .top { flex-direction: column; align-items: flex-start; }
  .article-head h1 { font-size: 1.8rem; }
  .article { font-size: 1.06rem; }
}

/* Five menu links: on small phones the logo carries the brand alone */
@media (max-width: 480px) {
  .nav .brand span { display: none; }
}

/* Mission: team teaser, an overlapping row of faces */
.team-teaser { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; text-decoration: none; }
.faces { display: flex; }
.faces img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg); margin-left: -14px; box-shadow: 0 0 0 1px rgba(0,0,0,0.06); background: var(--bg-secondary); }
.faces img:first-child { margin-left: 0; }
.team-teaser p { font-family: var(--serif); font-size: 1.2rem; line-height: 1.4; }
.team-teaser .more { margin-top: 2px; display: block; font-family: var(--sans); }
.team-teaser:hover .more { text-decoration: underline; }

/* Phones: bigger tap targets (at least ~40px tall) without changing the look */
@media (max-width: 760px) {
  .nav-links a { padding: 10px 0; }
  .social { padding: 10px 0 10px 4px; }
  .more, .read, .byline a, .back { padding: 8px 0; display: inline-block; }
}
/* Narrowest phones (320–400px): eight faces must fit on one row */
@media (max-width: 400px) {
  .faces img { width: 38px; height: 38px; margin-left: -11px; border-width: 2px; }
  .faces img:first-child { margin-left: 0; }
}


/* FAQ */
.faq { border-top: 1px solid var(--border); }
.qa { border-bottom: 1px solid var(--border); }
.qa summary { cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; position: relative; font-family: var(--serif); font-size: 1.2rem; line-height: 1.35; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 4px; top: 1.05rem; font-family: var(--sans); font-size: 1.2rem; color: var(--muted); transition: transform 0.15s; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.65; padding: 0 0 1.2rem; max-width: 620px; }

/* Footer links */
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 10px; font-size: 0.78rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; padding: 6px 0; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }

/* Waitlist */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.waitlist { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.waitlist input[type="email"] { flex: 1 1 260px; min-width: 0; font: inherit; font-size: 16px; padding: 11px 14px; border: 1px solid rgba(0,0,0,0.14); border-radius: 10px; background: var(--panel); color: var(--text); }
.waitlist input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30,43,68,0.12); }
.waitlist .btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.92rem; }
.waitlist .btn[disabled] { opacity: 0.6; cursor: default; }
.waitlist .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; }
.waitlist-note { flex-basis: 100%; font-size: 0.78rem; color: var(--muted); }
.waitlist-note a { color: var(--text-secondary); }
.waitlist-status { flex-basis: 100%; font-size: 0.9rem; font-weight: 600; min-height: 1.2em; }
.waitlist-status.ok { color: var(--success); }
.waitlist-status.err { color: #b42318; }
