/* ============================================================
   meetbibi — 100 Bites
   Layout language inherited from Daruma Japan Life: oversized tight
   display type, generous white space, soft pastel panels with large
   radii. The palette is the app's own (src/theme.ts), so the site and
   the screenshots inside it are the same product.

   The panel tints are the food-category colours rather than arbitrary
   pastels — a screenshot of the Fruit tab sits in a Fruit-tinted panel
   and reads as one object rather than a photo pasted onto a card.
   ============================================================ */

:root {
  --ink: #2C2C2C;
  --paper: #FAF3EB;
  --surface: #ffffff;
  --stone: #6E6A64;
  --vermillion: #F17F29;      /* brand orange, used for solid fills */
  --accent-text: #C9601A;     /* darkened for 4.5:1 on cream */
  --rule: #EBE2D6;

  /* Text on a pastel panel never inverts — the panels stay light in dark
     mode because the screenshots inside them are light. */
  --on-tint: #2C2C2C;
  --on-tint-soft: #5C574F;

  /* One per feature row, drawn from the app's food-category hues. */
  --tint-today:   #FDE4C8;
  --tint-explore: #FBD9B4;
  --tint-track:   #E7EFD6;
  --tint-watch:   #FBD3C4;
  --tint-share:   #E2E6F4;

  --r-panel: 3rem;
  --r-card: 1.75rem;
  --r-btn: 1rem;

  --shadow-soft: 0 2px 92px rgba(44, 44, 44, .07);
  --shadow-lift: 0 18px 40px rgba(44, 44, 44, .13);

  /* Outfit and Plus Jakarta Sans are the two faces the app already ships
     in frontend/assets/fonts, so type matches between site and product. */
  --display: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wide: 78rem;
  --measure: 46rem;

  --gap-section: clamp(3.5rem, 9vh, 8rem);
  --gap-lead: clamp(2rem, 5vh, 3.5rem);
}

/* Neither theme is a flat fill. The page carries a soft vertical wash and
   the hero band a stronger one on top of it, so light mode reads as warm
   kitchen light rather than as white. */
:root {
  color-scheme: light;
  --page: linear-gradient(180deg, #FEFBF7 0%, #FAF3EB 55%, #F7E9D8 100%);
  --band: linear-gradient(180deg, #FDE7D0 0%, #FDEFE0 34%, #FBF4EB 64%, transparent 100%);
}

/* Declared twice on purpose: once for visitors who expressed no preference,
   scoped so it cannot beat an explicit light choice, and once for the
   toggle. CSS cannot OR a media query with a selector. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #F4EEE6;
    --paper: #1A1714;
    --surface: #241F1A;
    --stone: #A69E93;
    --rule: #3A332C;
    --accent-text: #F79B4E;
    --shadow-soft: 0 2px 92px rgba(0, 0, 0, .35);
    --shadow-lift: 0 18px 40px rgba(0, 0, 0, .45);
    --page: linear-gradient(180deg, #1A1714 0%, #16130F 55%, #221C16 100%);
    --band: linear-gradient(180deg, #40301F 0%, #2C241B 38%, #1F1A15 68%, transparent 100%);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #F4EEE6;
  --paper: #1A1714;
  --surface: #241F1A;
  --stone: #A69E93;
  --rule: #3A332C;
  --accent-text: #F79B4E;
  --shadow-soft: 0 2px 92px rgba(0, 0, 0, .35);
  --shadow-lift: 0 18px 40px rgba(0, 0, 0, .45);
  --page: linear-gradient(180deg, #1A1714 0%, #16130F 55%, #221C16 100%);
  --band: linear-gradient(180deg, #40301F 0%, #2C241B 38%, #1F1A15 68%, transparent 100%);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 0 4rem;
  /* Fixed attachment so the wash belongs to the window rather than sliding
     past; --paper stays as the flat fallback and as the colour other
     surfaces blend against. */
  background: var(--paper) var(--page) no-repeat fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--accent-text); }

.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;
}

/* ---------- Display type ----------
   One scale, used by every section heading. The hero takes the top
   of the clamp; section headings sit one step down. */

.display,
.hero h1,
.section-title,
.showcase-row h2,
.cta-panel h2 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
}

/* The hero headline is two full sentences, so it caps lower than
   Lightly's four-word one would — otherwise it runs to five lines. */
.hero h1 { font-size: clamp(2.125rem, 5.4vw, 4.25rem); }
.accent { color: var(--accent-text); }
.section-title { font-size: clamp(2rem, 5.4vw, 4rem); }
.showcase-row h2 { font-size: clamp(1.9rem, 3.6vw, 3.25rem); }
.cta-panel h2 { font-size: clamp(1.9rem, 4.4vw, 3.5rem); }

/* ---------- Nav ---------- */

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; max-width: var(--wide); margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--display); font-weight: 700; font-size: 1.15rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.02em;
}
.brand img { border-radius: 10px; }
.nav nav { display: flex; align-items: center; gap: 1.5rem; }
.nav nav a { color: var(--stone); text-decoration: none; font-size: .9375rem; font-weight: 500; }
.nav nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--accent-text); font-weight: 600; }

/* ---------- Theme toggle ---------- */

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 auto;
  padding: 0; border: 0; cursor: pointer;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--rule);
  transition: transform .2s, box-shadow .2s;
}
.theme-toggle:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--rule), var(--shadow-lift); }
.theme-toggle:focus-visible { outline: 2px solid var(--vermillion); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; display: block; }

/* Show the icon for the theme you would switch *to*, so the control reads
   as an action rather than as a status readout. */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* Without JS the control cannot do anything, so it is not offered. */
html:not(.js) .theme-toggle { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--vermillion); color: #fff;
  padding: 1rem 2rem; border-radius: var(--r-btn);
  text-decoration: none; font-weight: 600; font-size: 1.0625rem;
  border: 0; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-ghost {
  background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--rule);
}

.micro { font-size: .875rem; color: var(--stone); margin: 1rem 0 0; }

/* ---------- Hero ---------- */

/* Full-bleed tinted sky that fades into the page, with the nav
   sitting inside it. Sakura-over-paper rather than a hard band. */
/* Light and dark both travel through two hues before settling into the
   page colour, so neither reads as a flat band with a fade on it:
   sakura → peach → paper, mirroring plum → navy → ink. */
/* The band used to be a wrapper div, which forced the header, hero and stats
   to sit outside <main>. It is now a background layer on the home page,
   painted over the top of the page wash and sized to fade out below the stat
   pills — so the DOM can be ordered for meaning rather than for painting.
   Ends at transparent so it composites rather than cutting a flat edge. */
body.home {
  background-image: var(--band), var(--page);
  background-repeat: no-repeat, no-repeat;
  background-size: 100% clamp(680px, 104vh, 940px), auto;
  background-position: top center, top center;
  background-attachment: scroll, fixed;
}

/* Keyboard users should not have to tab the whole nav on every page. */
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  padding: .65rem 1rem; border-radius: var(--r-btn);
  background: var(--vermillion); color: #fff;
  text-decoration: none; font-weight: 600; font-size: .9375rem;
  transition: top .15s;
}
.skip-link:focus { top: 1rem; }

.hero {
  position: relative;
  max-width: var(--wide); margin: 0 auto;
  padding: clamp(2rem, 5vh, 4.5rem) 1.5rem 0; text-align: center;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .75rem;
  font-weight: 700; color: var(--accent-text); margin: 0 0 1.25rem;
}
.hero .lede {
  max-width: 44rem; margin: clamp(1.25rem, 3vh, 2rem) auto 0;
  font-size: clamp(1.0625rem, 1.6vw, 1.4375rem);
  line-height: 1.5; color: var(--stone);
}
.hero .lede strong { color: var(--ink); font-weight: 600; }
.hero-actions { margin-top: clamp(1.5rem, 4vh, 2.5rem); display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Floating mascots, the way Lightly floats its clouds. Purely
   decorative, so they sit behind the copy and never trap a click.
   They flank the lede and buttons rather than the headline, and only
   appear once there is genuinely room beside the text column. */
.hero-float { position: absolute; z-index: 0; pointer-events: none; display: none; }
.hero-float img { width: 100%; height: auto; }
.float-left  { width: 128px; top: 15rem; left: 0;  animation: float-a 17s ease-in-out infinite; }
.float-right { width: 148px; top: 12rem; right: 0; animation: float-b 21s ease-in-out infinite; }
.hero > *:not(.hero-float) { position: relative; z-index: 1; }

@media (min-width: 1140px) { .hero-float { display: block; } }

@keyframes float-a {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-18px) rotate(3deg); }
}
@keyframes float-b {
  0%, 100% { transform: translateY(-10px) rotate(4deg); }
  50%      { transform: translateY(14px) rotate(-3deg); }
}

/* ---------- Stat pills ---------- */

.stats {
  max-width: var(--wide); margin: var(--gap-lead) auto 0; padding: 0 1.5rem clamp(2.5rem, 5vh, 4rem);
  display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap;
}
.stat {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border-radius: 2.25rem;
  padding: 1rem 1.75rem 1rem 1.25rem;
  box-shadow: var(--shadow-soft);
}
.stat-figure {
  font-family: var(--display); font-weight: 700;
  font-size: 2rem; line-height: 1; letter-spacing: -0.02em;
  color: var(--accent-text); white-space: nowrap;
}
.stat-label { font-size: .9375rem; line-height: 1.3; color: var(--stone); }

/* ---------- Section headings ---------- */

.section-head {
  max-width: 60rem; margin: var(--gap-section) auto 0; padding: 0 1.5rem; text-align: center;
}
.section-head .lede {
  margin: 1.5rem auto 0; max-width: 42rem;
  color: var(--stone); font-size: clamp(1rem, 1.4vw, 1.25rem); line-height: 1.6;
}

/* ---------- Showcase rows (alternating screenshot + copy) ---------- */

.showcase { max-width: var(--wide); margin: var(--gap-lead) auto 0; padding: 0 1.5rem; }
.showcase-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
  margin-top: var(--gap-section);
}
.showcase-row:first-child { margin-top: 0; }
/* Odd rows put the art on the right, even rows on the left. */
.showcase-row:nth-child(odd) .showcase-art { order: 2; }

.showcase-art {
  border-radius: var(--r-panel);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  /* Tint matches the screenshot's own gradient, so the panel edge
     disappears into the image instead of framing it. */
  background: var(--tint, var(--surface));
  /* The shots are phone-shaped (0.59:1). Left at full column width
     they tower over the copy beside them, so the panel is capped and
     centred in its column instead. */
  width: 100%; max-width: 400px;
  justify-self: center;
}
.showcase-art img { width: 100%; height: auto; }

.showcase-copy { padding: 0 1rem; }
.showcase-copy .kicker {
  font-family: var(--display); font-weight: 700; font-size: .8125rem;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent-text); margin: 0 0 1rem;
}
.showcase-copy p {
  margin: 1.5rem 0 0; color: var(--stone);
  font-size: clamp(1rem, 1.3vw, 1.1875rem); line-height: 1.6;
}
.showcase-copy p strong { color: var(--ink); font-weight: 600; }

/* ---------- Tinted feature cards ---------- */

.cards {
  max-width: var(--wide); margin: 3.5rem auto 0; padding: 0 1.5rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
.card {
  background: var(--tint, var(--surface));
  border-radius: var(--r-card);
  padding: 2.5rem;
  color: var(--on-tint);
}
/* The art is square with generous internal padding, so Bibi reads much
   smaller than the box width suggests. */
.card img { width: 112px; height: auto; margin: -.5rem 0 .75rem -.5rem; }
.card h3 {
  font-family: var(--display); font-weight: 700;
  font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.02em;
  margin: 0 0 .75rem;
}
.card p { margin: 0; color: var(--on-tint-soft); font-size: 1rem; line-height: 1.6; }
.card p strong { color: var(--on-tint); font-weight: 600; }

/* ---------- Prose sections on plain background ---------- */

.prose-section {
  max-width: var(--measure); margin: var(--gap-section) auto 0; padding: 0 1.5rem;
}
.prose-section h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem); line-height: 1.08;
  letter-spacing: -0.03em; margin: 0 0 1.5rem;
}
.prose-section p { color: var(--stone); line-height: 1.7; margin: 0 0 1rem; }
.prose-section p strong { color: var(--ink); font-weight: 600; }

.prose-section.with-art {
  max-width: var(--wide);
  display: grid; grid-template-columns: 280px 1fr; gap: 3.5rem; align-items: center;
}
.prose-section.with-art img { width: 100%; max-width: 280px; height: auto; }

/* ---------- Mascot row ---------- */

.fun { max-width: var(--measure); margin: var(--gap-section) auto 0; padding: 0 1.5rem; text-align: center; }
.fun h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem); line-height: 1.08;
  letter-spacing: -0.03em; margin: 0 0 1.25rem;
}
.fun p { color: var(--stone); line-height: 1.7; margin: 0 auto 2.5rem; }
.fun-row { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
/* The wrapper carries the entrance pop so the image is free to run the
   hover wiggle — one element cannot hold two animations on one property
   without the hover ending in a replay of the entrance. */
.fun-row .pose { display: block; }
.fun-row img { width: 84px; height: auto; }

/* ---------- Gradient CTA panel ---------- */

.cta-wrap { max-width: var(--wide); margin: var(--gap-section) auto 0; padding: 0 1.5rem; }
/* Jumping to #waitlist otherwise parks the panel flush against the top
   edge, which reads as the page having been cut off rather than scrolled. */
#waitlist { scroll-margin-top: clamp(1.5rem, 6vh, 4rem); }
.cta-panel {
  border-radius: var(--r-panel);
  padding: 5rem 3rem;
  text-align: center;
  color: var(--on-tint);
  background: linear-gradient(225deg, #fcdcc4 0%, #fbbdb4 50%, #e4daf7 100%);
}
.cta-panel p { margin: 1.5rem auto 0; max-width: 34rem; color: var(--on-tint-soft); font-size: 1.125rem; }
.cta-panel .micro { color: var(--on-tint-soft); opacity: .8; }
.cta-panel .micro a { color: var(--on-tint); }

#waitlist-form {
  display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap;
  margin: 2.5rem auto 0; max-width: 32rem;
}
#waitlist-form input {
  flex: 1 1 17rem; min-width: 0;
  padding: 1rem 1.25rem; font: inherit; font-size: 1rem;
  border: 0; border-radius: var(--r-btn);
  background: #fff; color: var(--on-tint);
  box-shadow: 0 1px 2px rgba(25, 40, 65, .08);
}
#waitlist-form input::placeholder { color: #98a1b2; }
#waitlist-form input:focus { outline: 2px solid var(--vermillion); outline-offset: 2px; }
#waitlist-form button[disabled] { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.form-msg { min-height: 1.4em; margin: 1rem 0 0; font-size: .9375rem; font-weight: 600; color: var(--on-tint); }
.form-msg.error { color: #B3402A; }

/* ---------- Footer ---------- */

footer {
  max-width: var(--wide); margin: 6rem auto 0;
  padding: 2rem 1.5rem 0; border-top: 1px solid var(--rule);
  color: var(--stone); font-size: .9375rem;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
footer a { color: var(--stone); text-decoration: none; margin-right: 1.75rem; }
footer a:hover { color: var(--ink); }
footer .footer-badge {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  margin-right: 0;
  opacity: .85;
  border-radius: 8px;
  transition: opacity .2s, transform .2s;
}
footer .footer-badge:hover {
  opacity: 1;
  transform: translateY(-1px);
}
footer .footer-badge:focus-visible {
  outline: 2px solid var(--vermillion);
  outline-offset: 3px;
}
footer .footer-badge img {
  height: 38px;
  width: auto;
  display: block;
}
footer .footer-badge .badge-dark { display: none; }
footer .footer-badge .badge-light { display: block; }
:root[data-theme="dark"] footer .footer-badge .badge-light { display: none; }
:root[data-theme="dark"] footer .footer-badge .badge-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) footer .footer-badge .badge-light { display: none; }
  :root:not([data-theme="light"]) footer .footer-badge .badge-dark { display: block; }
}
.footer-note { display: block; margin-top: 1rem; opacity: .8; }

/* ============================================================
   Article pages — blog posts, privacy, terms. These share the
   tokens above but keep a narrow measure and quieter type.
   ============================================================ */

/* Privacy and terms keep the narrow measure. The landing page (.wide) and
   guide articles (.article) lay out their own full-width containers. */
body:not(.wide):not(.article) { padding: 0 1.25rem 5rem; }
body:not(.wide):not(.article) main { max-width: var(--measure); margin: 3rem auto 0; }
body:not(.wide):not(.article) .nav { padding-left: 0; padding-right: 0; }
body:not(.wide):not(.article) footer { padding-left: 0; padding-right: 0; }

main h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.08;
  letter-spacing: -0.03em; margin: 0 0 .5rem;
}
.post h2 {
  font-family: var(--display); font-weight: 700;
  font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.025em;
  margin: 2.75rem 0 .75rem;
}
.post h3 { font-size: 1.15rem; font-weight: 600; margin: 2rem 0 .5rem; }
.post p, .post li { color: var(--stone); }
.post strong { color: var(--ink); }
.updated { color: var(--stone); font-size: .875rem; margin: 0 0 2.5rem; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9375rem; }
th, td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; }
.wrap { overflow-x: auto; }
ul { padding-left: 1.15rem; }
li { margin: .35rem 0; }

.note {
  background: color-mix(in srgb, var(--vermillion) 8%, transparent);
  border-left: 3px solid var(--vermillion);
  padding: 1rem 1.25rem; margin: 1.75rem 0;
  font-size: .9375rem; border-radius: 0 12px 12px 0;
}

/* ============================================================
   Guides index
   ============================================================ */

.guides-head {
  max-width: var(--wide); margin: var(--gap-lead) auto 0; padding: 0 1.5rem; text-align: center;
}
.guides-head .lede {
  margin: 1.5rem auto 0; max-width: 40rem;
  color: var(--stone); font-size: clamp(1rem, 1.4vw, 1.25rem); line-height: 1.6;
}

.chip {
  display: inline-block; align-self: flex-start;
  font-family: var(--display); font-weight: 700;
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .12em;
  padding: .35rem .7rem; border-radius: 999px;
  background: rgba(25, 40, 65, .08); color: var(--on-tint);
}

.guides-featured { max-width: var(--wide); margin: var(--gap-lead) auto 0; padding: 0 1.5rem; }

.feature-card, .guide-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .9rem;
  background: var(--tint, var(--surface));
  border-radius: var(--r-card);
  padding: 2.5rem;
  color: var(--on-tint); text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
/* The featured card runs the full container width, so the copy is paired
   with art rather than trailing off into half a card of empty tint. */
.feature-card {
  padding: clamp(2rem, 4.5vh, 3.5rem); border-radius: var(--r-panel);
  flex-direction: row; align-items: center; justify-content: space-between; gap: 3rem;
}
.feature-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; }
.feature-card-art { width: 200px; height: auto; flex: 0 0 auto; }
.feature-card:hover, .guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.feature-card h2, .guide-card h2 {
  font-family: var(--display); font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.12; margin: 0;
}
.feature-card h2 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
.guide-card h2 { font-size: 1.35rem; }

.feature-card p, .guide-card p { margin: 0; color: var(--on-tint-soft); line-height: 1.6; }
.feature-card p { font-size: 1.125rem; max-width: 44rem; }
.guide-card p { font-size: .9375rem; }

.card-meta { font-size: .8125rem; letter-spacing: .01em; color: var(--on-tint-soft); }

.guides-grid {
  max-width: var(--wide); margin: 1.5rem auto 0; padding: 0 1.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}

/* ============================================================
   Guide article — the reading flow
   ============================================================ */

.read-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: transparent; pointer-events: none;
}
.read-progress span {
  display: block; height: 100%; width: 100%;
  background: var(--vermillion);
  transform: scaleX(0); transform-origin: 0 50%;
}

/* 44rem prose + 4rem gap + 17rem rail — matches .article-grid exactly so the
   headline starts on the same line as the body copy below it. */
.article-head {
  max-width: 65rem; margin: clamp(1.5rem, 4vh, 2.5rem) auto 0; padding: 0 1.5rem;
}
.crumbs { font-size: .875rem; color: var(--stone); margin-bottom: 1.5rem; }
.crumbs a { color: var(--stone); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { margin: 0 .5rem; opacity: .5; }

.article-head h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.06;
  letter-spacing: -0.032em; margin: 0; max-width: 22ch;
}
.article-head .deck {
  margin: 1.25rem 0 0; max-width: 46rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.55; color: var(--stone);
}
.article-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.25rem;
  margin: 1.75rem 0 0; font-size: .875rem; color: var(--stone);
}
.article-meta .chip { background: color-mix(in srgb, var(--accent-text) 12%, transparent); color: var(--accent-text); }

/* Columns are sized rather than fractional, and the pair is centred, so the
   rail sits beside the prose instead of drifting to the window edge. */
.article-grid {
  max-width: var(--wide); margin: clamp(2rem, 5vh, 3rem) auto 0; padding: 0 1.5rem;
  display: grid; grid-template-columns: minmax(0, 44rem) 17rem; gap: 4rem;
  justify-content: center; align-items: start;
}

/* The column is wider than comfortable line length, so the prose is capped
   inside it rather than letting the grid decide the measure. */
.article-grid .post { max-width: 44rem; }

.toc-rail { position: sticky; top: 2rem; }
.toc {
  background: var(--surface); border-radius: var(--r-card);
  padding: 1.5rem 1.5rem 1.5rem 1.25rem;
  box-shadow: var(--shadow-soft);
}
.toc-title {
  font-family: var(--display); font-weight: 700; font-size: .9375rem;
  margin: 0 0 1rem; padding-left: .75rem;
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.toc li { margin: 0; }
.toc a {
  display: block; padding: .4rem 0 .4rem .75rem;
  border-left: 2px solid var(--rule);
  color: var(--stone); text-decoration: none;
  font-size: .875rem; line-height: 1.4;
  transition: color .15s, border-color .15s;
}
.toc a:hover { color: var(--ink); }
.toc a.is-current { color: var(--ink); border-left-color: var(--vermillion); font-weight: 600; }

.takeaways {
  background: var(--tint, var(--surface));
  border-radius: var(--r-card);
  padding: 2rem 2.25rem;
  margin: 0 0 3rem;
  color: var(--on-tint);
}
.takeaways h2 {
  font-family: var(--display); font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.02em; margin: 0 0 1rem;
}
.takeaways ul { margin: 0; padding: 0; list-style: none; }
.takeaways li {
  position: relative; padding-left: 1.75rem; margin: .75rem 0;
  color: var(--on-tint-soft); line-height: 1.6; font-size: .9375rem;
}
.takeaways li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent-text); font-weight: 700;
}

/* Anchored headings need clearance so the progress bar and a smooth jump
   do not leave the heading welded to the top edge. */
.post h2[id] { scroll-margin-top: 2rem; }

/* ---------- Partner placement ----------
   Deliberately quiet: no brand colours of its own, no button, no border
   heavier than the surrounding prose. It should read as a recommendation
   from the author, clearly labelled, not as an ad slot. */

.partner {
  margin: 3.5rem 0 0; padding: 1.75rem 2rem;
  border: 1px solid var(--rule); border-radius: var(--r-card);
  background: var(--surface);
}
.partner-label {
  font-family: var(--display); font-weight: 700; font-size: .6875rem;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--stone); margin: 0 0 .6rem;
}
.partner-name {
  font-family: var(--display); font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.02em; margin: 0 0 .6rem; color: var(--ink);
}
.partner p { margin: 0 0 .9rem; color: var(--stone); font-size: .9375rem; line-height: 1.65; }
.partner p:last-child { margin: 0; }
.partner-link { font-weight: 600; text-decoration: none; font-size: .9375rem; }
.partner-link:hover { text-decoration: underline; }

/* ---------- Related guides ---------- */

.related { margin: 3.5rem 0 0; padding-top: 2rem; border-top: 1px solid var(--rule); }
.related-title {
  font-family: var(--display); font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.02em; margin: 0 0 1.25rem;
}
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.related li { margin: 0; }
.related a {
  display: grid; gap: .45rem; justify-items: start;
  padding: 1.1rem 1.25rem; border-radius: var(--r-card);
  border: 1px solid var(--rule); text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.related a:hover { border-color: var(--vermillion); transform: translateY(-2px); }
.related a strong {
  font-family: var(--display); font-weight: 700; font-size: 1.0625rem;
  line-height: 1.25; letter-spacing: -0.02em; color: var(--ink);
}
/* The base .chip is styled for pastel panels and hard-codes navy text.
   Here it sits on the page itself, so it has to follow the theme. */
.related .chip {
  font-size: .625rem; padding: .25rem .55rem;
  color: var(--stone);
  background: color-mix(in srgb, var(--stone) 15%, transparent);
}
.related-desc { font-size: .875rem; line-height: 1.5; color: var(--stone); }

@media (prefers-reduced-motion: reduce) {
  .related a:hover { transform: none; }
}

.article-cta {
  margin: 3.5rem 0 0; padding: 2rem 2.25rem;
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--vermillion) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--vermillion) 18%, transparent);
}
.article-cta p { margin: 0 0 1.25rem; color: var(--ink); }
.article-cta .btn { padding: .8rem 1.5rem; font-size: .9375rem; }

.article-standards {
  margin: 2.5rem 0 0; padding-top: 1.75rem; border-top: 1px solid var(--rule);
  font-size: .875rem; line-height: 1.65; color: var(--stone);
}

.article-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin: 3rem 0 0;
}
.article-nav-item {
  display: flex; flex-direction: column; gap: .4rem;
  padding: 1.25rem 1.5rem; border-radius: var(--r-card);
  border: 1px solid var(--rule); text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.article-nav-item:hover { border-color: var(--vermillion); transform: translateY(-2px); }
.article-nav-item span { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--stone); font-weight: 600; }
.article-nav-item strong {
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  line-height: 1.25; letter-spacing: -0.02em; color: var(--ink);
}
.article-nav-item.next { text-align: right; align-items: flex-end; }

.to-top {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 50;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--vermillion); color: #fff; text-decoration: none;
  font-size: 1.1rem; line-height: 1;
  box-shadow: var(--shadow-lift);
  opacity: 0; visibility: hidden;
  transition: opacity .2s, visibility .2s, transform .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { transform: translateY(-3px); }

@media (max-width: 980px) {
  .guides-grid { grid-template-columns: repeat(2, 1fr); }
  /* The rail becomes a collapsible-height block above the article rather
     than a sticky column with nothing to stick beside. */
  .article-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .toc-rail { position: static; order: -1; }
}

/* Below this the copy column is too narrow to sit beside the art, and the
   title starts wrapping one word per line. */
@media (max-width: 820px) {
  .feature-card { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .feature-card-art { width: 128px; align-self: center; }
}

@media (max-width: 720px) {
  .guides-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 2rem; border-radius: var(--r-card); }
  .guide-card { padding: 1.75rem; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav-item.next { text-align: left; align-items: flex-start; }
  .to-top { right: 1rem; bottom: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .feature-card:hover, .guide-card:hover,
  .article-nav-item:hover, .to-top:hover { transform: none; }
}

.post-list { max-width: var(--measure); margin: 0 auto; padding: 2rem 0 0; list-style: none; }
.post-list li { padding: 1.75rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.post-list h2 {
  font-family: var(--display); font-weight: 700;
  font-size: 1.4rem; letter-spacing: -0.025em; line-height: 1.2; margin: 0 0 .5rem;
}
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent-text); }
.post-list p { margin: 0; color: var(--stone); font-size: .9375rem; line-height: 1.6; }
.post-meta { font-size: .8125rem; color: var(--stone); margin-top: .5rem; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .showcase-row { grid-template-columns: 1fr; gap: 2rem; margin-top: 4rem; }
  .showcase-row:nth-child(odd) .showcase-art { order: 0; }
  .showcase-copy { padding: 0; }
  .prose-section.with-art { grid-template-columns: 1fr; gap: 2rem; justify-items: center; text-align: center; }
  .prose-section.with-art img { max-width: 200px; }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hero { padding-top: 3rem; }
  .hero-float { display: none; }
  /* Two buttons of different widths stacked centre-aligned read as a
     mistake, so they go full width instead. */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .stats { flex-direction: column; align-items: stretch; gap: 1rem; margin-top: 3.5rem; }
  .cta-panel { padding: 3rem 1.5rem; border-radius: 1.75rem; }
  .showcase-art { border-radius: 1.75rem; }
  .card { padding: 2rem; }
  .fun-row img { width: 60px; }
  footer a { display: inline-block; margin-bottom: .5rem; }
  footer .footer-badge { display: inline-flex; margin-bottom: 0; }
}

/* ============================================================
   Scroll reveals. The start state is scoped to .reveal-ready,
   which _reveal.js only adds once it can also remove it — so
   without JS the page renders normally rather than blank.
   ============================================================ */

.reveal-ready [data-reveal] { opacity: 0; transform: translateY(20px); }
.reveal-ready [data-reveal].is-visible {
  opacity: 1; transform: none;
  transition: opacity .7s cubic-bezier(.22,.61,.36,1),
              transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal-ready .cards > [data-reveal]:nth-child(2).is-visible { transition-delay: .08s; }
.reveal-ready .cards > [data-reveal]:nth-child(3).is-visible { transition-delay: .16s; }
.reveal-ready .cards > [data-reveal]:nth-child(4).is-visible { transition-delay: .24s; }

@keyframes bibi-pop {
  0%   { transform: scale(.72) translateY(10px); opacity: 0; }
  60%  { transform: scale(1.06) translateY(0);   opacity: 1; }
  100% { transform: scale(1)    translateY(0);   opacity: 1; }
}
.reveal-ready .fun-row .pose { opacity: 0; }
.reveal-ready [data-reveal].is-visible .fun-row .pose {
  animation: bibi-pop .5s cubic-bezier(.34,1.56,.64,1) forwards;
}
.reveal-ready [data-reveal].is-visible .fun-row .pose:nth-child(1) { animation-delay: .05s; }
.reveal-ready [data-reveal].is-visible .fun-row .pose:nth-child(2) { animation-delay: .13s; }
.reveal-ready [data-reveal].is-visible .fun-row .pose:nth-child(3) { animation-delay: .21s; }
.reveal-ready [data-reveal].is-visible .fun-row .pose:nth-child(4) { animation-delay: .29s; }
.reveal-ready [data-reveal].is-visible .fun-row .pose:nth-child(5) { animation-delay: .37s; }

/* ---------- Hover wiggle ----------
   Bibi is a round little fruit with feet, so he rocks about a pivot near
   his base rather than about his centre — the same low origin the daruma
   version used, for the same reason. */
@keyframes bibi-wiggle {
  0%   { transform: rotate(0deg); }
  22%  { transform: rotate(-8deg); }
  45%  { transform: rotate(6deg); }
  68%  { transform: rotate(-3.5deg); }
  85%  { transform: rotate(1.5deg); }
  100% { transform: rotate(0deg); }
}
.brand img,
.hero-float img,
.card img,
.fun-row img,
.prose-section.with-art img {
  transform-origin: 50% 85%;
}
.brand img:hover,
.hero-float img:hover,
.card img:hover,
.fun-row img:hover,
.prose-section.with-art img:hover {
  animation: bibi-wiggle .6s ease-in-out;
}
/* The floaters are decorative and the container ignores pointer events,
   so the image has to opt back in to be hoverable at all. */
.hero-float img { pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .hero-float { animation: none; }
  .btn:hover { transform: none; }
  .brand img:hover, .hero-float img:hover, .card img:hover,
  .fun-row img:hover, .prose-section.with-art img:hover { animation: none; }
  .reveal-ready [data-reveal],
  .reveal-ready .fun-row .pose { opacity: 1; transform: none; animation: none; }
}

/* ---------- App Store badge ----------
   Apple's own artwork, self-hosted. Their marketing guidelines require the
   badge lockup for the "Download on the App Store" wording, so this is not a
   styled text button. Fixed aspect, and it must not be recoloured or cropped. */

.store-badge {
  display: inline-flex; align-items: center;
  line-height: 0; border-radius: 8px;
  transition: transform .2s, box-shadow .2s;
}
.store-badge img { width: auto; height: 50px; display: block; }
.store-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.store-badge:focus-visible { outline: 2px solid var(--vermillion); outline-offset: 3px; }

.cta-panel .store-badge img { height: 56px; }
.cta-store { margin-top: 2rem; }

/* The hero pairs the badge with a ghost button; match their heights so the
   row does not look accidentally ragged. */
.hero-actions .store-badge img { height: 54px; }
.hero-actions .btn { padding-block: .95rem; }

@media (max-width: 720px) {
  .hero-actions .store-badge { justify-content: center; }
  .hero-actions .store-badge img { height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .store-badge:hover { transform: none; }
}

/* ---------- Android capture, demoted ----------
   The App Store badge is the action on this page now that there is an app to
   download. The Android list still earns its place — it is the only read on
   whether Android is worth building — but it sits below a rule, in quieter
   type, so it reads as a footnote rather than a second, competing ask. */
.cta-secondary {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid color-mix(in srgb, var(--on-tint) 14%, transparent);
}
.cta-secondary .micro { margin-top: 0; }
.btn-quiet {
  background: transparent;
  color: var(--on-tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-tint) 28%, transparent);
  font-size: 1rem;
  padding: .85rem 1.5rem;
}
.btn-quiet:hover { background: color-mix(in srgb, var(--on-tint) 6%, transparent); }

/* Screenshot strip, used by the launch post.
   Scrolls horizontally rather than wrapping: five phone screens stacked in a
   column on mobile is a very long article, and a row you can flick through
   reads the way the App Store listing they came from does. */
.screens {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  margin: 2rem 0;
  padding-bottom: .75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.screens img {
  width: 220px;
  height: auto;
  flex: 0 0 auto;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  scroll-snap-align: center;
}
.screens-caption {
  margin: -1rem 0 2rem;
  font-size: .8125rem;
  color: var(--stone);
  text-align: center;
}

/* ---------------------------------------------------------------------------
   Press kit (/press)
   A reference page, not a landing page: dense, scannable, and deliberately
   plainer than the marketing pages it sits beside.
   --------------------------------------------------------------------------- */
.press-lede {
  font-size: 1.125rem; line-height: 1.6; color: var(--stone);
  margin: 0 0 2rem; max-width: 40rem;
}
.press-contact {
  border: 1px solid var(--rule); border-radius: 14px;
  padding: 1.25rem 1.5rem; margin: 2rem 0;
  background: color-mix(in srgb, var(--ink) 3%, transparent);
}
.press-contact p { margin: 0 0 .4rem; }
.press-contact p:last-child { margin-bottom: 0; }
.press-contact .btn { margin-top: .75rem; }

/* The fact sheet is the section journalists actually copy from, so it is a
   real table: label left, value right, scannable without reading prose. */
.press-facts { overflow-x: auto; margin: 1rem 0 2rem; }
.press-facts table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.press-facts th, .press-facts td {
  text-align: left; vertical-align: top;
  padding: .7rem .9rem .7rem 0; border-bottom: 1px solid var(--rule);
}
.press-facts th {
  width: 12rem; font-weight: 600; color: var(--stone);
  white-space: nowrap; padding-right: 1.5rem;
}
.press-features { padding-left: 1.15rem; }
.press-features li { margin-bottom: .6rem; line-height: 1.6; }

/* Scrolls sideways rather than wrapping. Nine phone screens stacked in a
   column buries the sections below them. */
.press-shots {
  display: flex; gap: 1rem; overflow-x: auto;
  margin: 1.25rem 0 2rem; padding-bottom: .75rem;
  scroll-snap-type: x mandatory;
}
.press-shot { flex: 0 0 auto; margin: 0; width: 160px; scroll-snap-align: center; }
.press-shot img {
  width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--rule);
}
.press-shot figcaption {
  font-size: .75rem; line-height: 1.4; color: var(--stone); margin-top: .5rem;
}
@media (min-width: 700px) { .press-shot { width: 200px; } }
/* Nested price table inside the fact sheet. A single yen figure is useless to
   a desk outside Japan, so the six biggest storefronts are shown outright. */
.press-prices { margin: .75rem 0 .5rem; font-size: .875rem; }
.press-prices th, .press-prices td { padding: .35rem .9rem .35rem 0; border-bottom: none; }
.press-prices thead th {
  width: auto; font-size: .6875rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--stone); white-space: nowrap;
}
.press-prices tbody th { width: auto; font-weight: 500; color: var(--ink); }
.press-price-note { font-size: .8125rem; color: var(--stone); margin: .25rem 0 0; }
