/* ritmofuel.com: every page. Built by web/site/build.mjs; edit this file in web/site/src/.
   Colours are the app's tokens (design-tokens.json, the approved dark palette).
   Fonts are served from our own domain only: Archivo (display, Latin) and Noto Sans Arabic
   (Arabic pages). Body text uses the system sans. See web/README.md for the 3D stage. */

@font-face {
  font-family: "Archivo";
  src: url("archivo-latin-wdth-normal.e3a28eade2.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Arabic";
  src: url("NotoSansArabic-Regular.a4f310ea2b.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Arabic";
  src: url("NotoSansArabic-Bold.6c653e01c3.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #F6F3EB;          /* cream */
  --surface: #FFFFFF;
  --ink: #182421;         /* charcoal */
  --muted: #52665F;
  --line: #D1D9D2;
  --pine: #123B32;
  --mint: #BDE7C6;
  --mint-ink: #123B32;    /* text that sits on mint */
  --coral: #EF765D;
  --focus: #DC5F44;       /* focus ring: at least 3:1 on cream, white, pine and the dark backgrounds */
  --accent: #123B32;      /* links, ticks, focus fill */
  --food: #123B32;
  --food-mark: #BDE7C6;
  --notice: #FFF1CC;
  --notice-line: #E8CF8E;
  --on-notice: #5A4410;
  --road-bg: #123B32;
  --road-ink: #F6F3EB;
  --road-muted: #A9C9B9;
  --road-dim: #3D6458;
  --header: rgba(246, 243, 235, .86);
  --panel: rgba(246, 243, 235, .94);
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --display: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --arabic: "SF Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --head-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1A17;
    --surface: #17241F;
    --ink: #EEF1EC;
    --muted: #A3B4AC;
    --line: #2E3F39;
    --accent: #BDE7C6;
    --food: #BDE7C6;
    --food-mark: #2B5B4C;
    --notice: #3A3115;
    --notice-line: #6E5A26;
    --on-notice: #F5E3A8;
    --road-bg: #0B1411;
    --road-dim: #2C4A41;
    --header: rgba(15, 26, 23, .86);
    --panel: rgba(15, 26, 23, .94);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  overflow-x: clip;
}
/* Noto Sans Arabic (WOFF2, made from the app's TTF by the build) is downloaded only on Arabic pages; elsewhere the few Arabic
   words (language menu, dish names) use the system's Arabic font. */
html[lang="ar"] { --arabic: "Noto Sans Arabic", "SF Arabic", "Geeza Pro", Tahoma, sans-serif; }
html[lang="ar"] body { font-family: var(--arabic); line-height: 1.75; }
:lang(ar) { font-family: var(--arabic); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; }
h1, h2, h3 { font-family: var(--display); margin: 0; font-weight: 700; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-family: var(--arabic); letter-spacing: 0; }
p, ul, ol { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip { position: absolute; inset-inline-start: -999px; top: 8px; z-index: 60; }
.skip:focus { inset-inline-start: 8px; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 8px; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 30; background: var(--header); backdrop-filter: saturate(1.3) blur(12px); -webkit-backdrop-filter: saturate(1.3) blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.bar { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: var(--head-h); display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 760 1.15rem/1 var(--display); letter-spacing: -0.02em; min-height: 44px; }
.logo { width: 28px; height: 28px; flex: none; color: var(--pine); }
@media (prefers-color-scheme: dark) { .logo { color: var(--mint); } }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; padding: 8px 10px; border-radius: 999px; }
.nav a:hover { background: color-mix(in srgb, var(--mint) 45%, transparent); }
.langs { position: relative; }
.langs summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px; font-size: .92rem; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.langs[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.langs ul { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); list-style: none; padding: 6px; margin: 0; min-width: 160px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px -18px rgba(18, 59, 50, .45); }
.langs li a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.langs li a:hover { background: color-mix(in srgb, var(--mint) 40%, transparent); }
.langs li a[aria-current] { font-weight: 700; background: var(--mint); color: var(--mint-ink); }
.get { background: var(--coral); color: #182421; text-decoration: none; font-weight: 700; font-size: .95rem; padding: 10px 16px; border-radius: 999px; white-space: nowrap; }
.get:hover { background: #F28A74; }
.page .nav { margin-inline-start: auto; }
@media (max-width: 959px) {
  .home .nav { display: none; }
  .langs { margin-inline-start: auto; }
  .page .nav + .langs { margin-inline-start: 0; }
}
.langs-code { display: none; }
@media (max-width: 520px) {
  /* Phones: brand, language and the store button must fit in one row in every language
     ("Descarga la app" is the longest). The brand links home, so the page nav goes. */
  :root { --head-h: 58px; }
  .bar { gap: 8px; }
  .brand span { font-size: 1rem; }
  .page .nav { display: none; }
  .page .nav + .langs { margin-inline-start: auto; }
  .get { padding: 9px 12px; font-size: .86rem; }
  .langs summary { padding: 0 10px; min-width: 44px; justify-content: center; }
  .langs-now { display: none; }
  .langs-code { display: inline; font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
}
@media (max-width: 360px) {
  /* Very narrow: keep the logo, hide the wordmark visually (still read out). */
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .get { padding: 9px 10px; font-size: .82rem; }
}

/* ---------------------------------------------------------------- the 3D stage */
.stage { display: none; }
.stage-on .stage { display: block; position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .6s var(--ease); }
.stage.ready canvas { opacity: 1; }
.stage-light { position: absolute; width: 70vmin; height: 70vmin; left: calc(var(--lx, 70) * 1%); top: calc(var(--ly, 50) * 1%); transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--mint) 70%, transparent), transparent); opacity: var(--lo, .8); transition: opacity .5s; }
@media (prefers-color-scheme: dark) { .stage-light { background: radial-gradient(closest-side, rgba(189, 231, 198, .16), transparent); } }
.home main, .home .foot { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- chapters */
.ch { padding: clamp(64px, 9vw, 120px) 0; }
.ch-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.copy { display: grid; gap: 18px; align-content: start; max-width: 600px; }
h2 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.3rem); line-height: 1.04; letter-spacing: -0.03em; font-weight: 780; font-stretch: 100%; max-width: 16ch; }
h3 { font-size: 1.12rem; line-height: 1.3; letter-spacing: -0.01em; }
.copy h3 { margin-top: 8px; }
.lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.22rem); color: var(--muted); max-width: 52ch; }
.more { font-weight: 700; }
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-inline-start: 30px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .38em; width: 16px; height: 9px; border: solid var(--accent); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }

/* Still pictures: what you see without JavaScript, with reduced motion or without WebGL. */
.still { margin: 0; position: relative; display: flex; justify-content: center; align-items: center; gap: 16px; }
.slot:empty { display: none; }
/* The same modern phone as the 3D one: titanium band, slim even black bezel, pill island. Radii
   are given as width% / height% so the corners stay round at every size. */
.phone-still { position: relative; width: min(300px, 70vw); padding: 0; border: 3px solid transparent; border-radius: 15.5% / 7.4%; background: linear-gradient(#040506, #040506) padding-box, linear-gradient(135deg, #ecebe6 0%, #8e8b84 18%, #d7d4cd 42%, #6f6c67 68%, #c4c1ba 86%, #8e8b84 100%) border-box; box-shadow: 0 30px 60px -30px rgba(18, 59, 50, .55), 0 0 0 1px rgba(0, 0, 0, .28); }
.phone-still img { display: block; width: 95.6%; margin: 2.2%; border-radius: 12.6% / 5.8%; } /* margin % = of the phone's own width: an even bezel */
.phone-still::after { content: ""; position: absolute; top: 0; left: 50%; margin-top: 5%; width: 29%; aspect-ratio: 3.4; transform: translateX(-50%); border-radius: 99px; background: #000; }
.still-pair .phone-still { transform: rotate(-4deg); }
.still-pair .rimo-still { position: absolute; width: 46%; inset-inline-end: 0; bottom: -6%; }
.still-row .phone-still.small { width: 31%; border-width: 2px; }
.still-row .phone-still:nth-child(2) { transform: translateY(-18px); }
.rimo-still { width: min(360px, 70vw); }
.day-list { list-style: none; display: grid; gap: 22px; counter-reset: d; }
.day-list li { display: grid; gap: 4px; padding-inline-start: 18px; border-inline-start: 3px solid var(--mint); }
.day-list p { color: var(--muted); }
.day-list .phone-still.inline { width: min(240px, 60vw); margin-top: 12px; }
.goals { color: var(--muted); font-size: .95rem; }

/* Stage mode: stills step aside, their boxes become the places where the 3D scene sits. */
.stage-on .slot { display: block; position: sticky; top: calc(var(--head-h) + 6vh); height: 78vh; align-self: start; }
/* Until the scene has drawn its first frame (three.js still loading on a slow phone), the
   stills stay in their slots, so there is never an empty hole; stage-live swaps them out. */
.stage-on.stage-live .slot > * { visibility: hidden; }
.stage-on.stage-live .slot > .phone-still, .stage-on.stage-live .slot > .rimo-still { display: none; }
.stage-on:not(.stage-live) .slot { container-type: size; }
.stage-on:not(.stage-live) .slot.still { display: flex; }
.stage-on:not(.stage-live) .slot .phone-still { width: min(300px, 70vw, 42cqh); }
.stage:not(.ready) .stage-light { opacity: 0; }
.stage-on .day-list .phone-still.inline { display: none; }
.stage-on .ch { padding: 0; }
.stage-on .ch > .ch-in { min-height: 135vh; align-items: center; }
.stage-on .ch .slot { align-self: start; margin-top: 4vh; }
.stage-on .ch .copy { padding-block: 12vh; }

/* ---------------------------------------------------------------- hero */
.ch-hero { padding-top: clamp(28px, 6vw, 72px); }
.ch-hero .ch-in { grid-template-areas: "h slot" "l slot" "d slot" "s slot"; grid-template-rows: auto auto auto 1fr; row-gap: 22px; align-items: start; }
.ch-hero .copy { display: contents; }
.ch-hero h1 { grid-area: h; font: 800 clamp(2.5rem, 1.4rem + 4vw, 5rem)/.98 var(--display); letter-spacing: -0.045em; max-width: 12ch; }
html[lang="ar"] .ch-hero h1 { font-family: var(--arabic); font-weight: 700; line-height: 1.2; letter-spacing: 0; }
.ch-hero .lead { grid-area: l; }
.ch-hero .demo { grid-area: d; }
.ch-hero .stores { grid-area: s; }
.ch-hero .slot { grid-area: slot; }
.stage-on .ch-hero { padding: clamp(28px, 5vw, 64px) 0 10vh; }
.stage-on .ch-hero > .ch-in { min-height: calc(100svh - var(--head-h) - 10vh); align-items: start; }
.stage-on .ch-hero .copy { padding: 0; }
.stage-on .ch-hero .slot { position: sticky; top: calc(var(--head-h) + 4vh); height: min(80vh, 760px); }

.demo { margin: 6px 0 0; padding: clamp(18px, 2.4vw, 28px); background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 24px 60px -40px rgba(18, 59, 50, .5); max-width: 620px; }
.say { --step: 70ms; }
.say-head { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; font-size: .88rem; color: var(--muted); }
.say-mode { border: 1.5px solid var(--line); color: var(--ink); padding: 2px 12px; border-radius: 999px; }
.sentence { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: .26em; row-gap: .3em; font: 760 clamp(1.6rem, 1rem + 2vw, 2.6rem)/1.05 var(--display); letter-spacing: -0.035em; }
.say[dir="rtl"] .sentence { font-family: var(--arabic); letter-spacing: 0; line-height: 1.3; font-weight: 700; }
.tok { display: inline-flex; flex-direction: column; gap: .3em; }
.tok.punct { margin-inline-start: -.26em; }
.tok .w { position: relative; z-index: 0; }
.food .w { color: var(--food); }
.food .w::after { content: ""; position: absolute; z-index: -1; inset-inline: -.06em; bottom: .02em; height: .34em; background: var(--food-mark); border-radius: 4px; transform-origin: left center; }
.say[dir="rtl"] .food .w::after { transform-origin: right center; }
.tag { font: 500 .82rem/1.2 var(--sans); letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.tag b { color: var(--ink); }
.say-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.say-total { color: var(--muted); }
.say-total b { color: var(--ink); font-size: 1.25rem; margin-inline-end: 6px; }
.say-save { margin-inline-start: auto; background: var(--coral); color: #182421; font-weight: 700; padding: 9px 20px; border-radius: 999px; }
.say.saved .say-save { animation: tap .5s var(--ease); }
@keyframes tap { 40% { transform: scale(.92); } 100% { transform: none; } }
.demo figcaption { margin-top: 18px; display: grid; gap: 8px; }
.demo-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.demo-try { color: var(--muted); font-size: .9rem; margin-inline-end: 4px; }
.demo-langs button { font: inherit; font-size: .9rem; color: var(--ink); background: transparent; border: 1.5px solid var(--line); padding: 6px 14px; border-radius: 999px; cursor: pointer; min-height: 36px; }
.demo-langs button:hover { border-color: var(--ink); }
.demo-langs button[aria-pressed="true"] { background: var(--pine); color: #F6F3EB; border-color: var(--pine); font-weight: 700; }
@media (prefers-color-scheme: dark) { .demo-langs button[aria-pressed="true"] { background: var(--mint); color: var(--mint-ink); border-color: var(--mint); } }
.demo-langs .replay { border-style: dashed; color: var(--muted); }
.demo-note { font-size: .84rem; color: var(--muted); }

.js .say.play .tok { opacity: 0; transform: translateY(.18em); }
.js .say.play .tag { opacity: 0; }
.js .say.play .food .w::after { transform: scaleX(0); }
.js .say.play .say-foot { opacity: 0; }
.js .say.run .tok { opacity: 1; transform: none; transition: opacity .45s var(--ease), transform .45s var(--ease); transition-delay: calc(var(--i) * var(--step)); }
.js .say.run .food .w::after { transform: scaleX(1); transition: transform .5s var(--ease); transition-delay: calc(var(--n) * var(--step) + 250ms + var(--f) * 260ms); }
.js .say.run .tag { opacity: 1; transition: opacity .4s var(--ease); transition-delay: calc(var(--n) * var(--step) + 450ms + var(--f) * 260ms); }
.js .say.run .say-foot { opacity: 1; transition: opacity .5s var(--ease); transition-delay: calc(var(--n) * var(--step) + 600ms + var(--nf) * 260ms); }

.stores { display: grid; gap: 10px; align-content: start; }
.stores-title { font-weight: 700; }
.store-row { display: flex; flex-wrap: wrap; gap: 10px; }
.store { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 14px; border-radius: 16px; text-decoration: none; }
.store svg { width: 22px; height: 22px; flex: none; }
.store span { display: grid; line-height: 1.15; font-weight: 700; }
.store small { font-weight: 500; font-size: .78rem; color: var(--muted); }
.store.soon { border: 1.5px dashed var(--muted); color: var(--ink); }
.store.live { background: var(--ink); color: var(--bg); }
.stores-note { font-size: .88rem; color: var(--muted); }

/* ---------------------------------------------------------------- how, table, day */
.steps { list-style: none; display: grid; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; transition: border-color .3s, transform .3s var(--ease); }
.steps li::before { content: counter(s); grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); display: grid; place-items: center; font: 800 1.1rem/1 var(--display); }
.steps li p { color: var(--muted); }
.steps li.on, .day-list li.on { border-color: var(--coral); }
.steps li.on { transform: translateX(6px); }
[dir="rtl"] .steps li.on { transform: translateX(-6px); }

.ch-table { overflow: hidden; }
.ch-table .count { display: flex; align-items: baseline; gap: 12px; }
.ch-table .count b { font: 820 clamp(3.4rem, 2rem + 5vw, 6rem)/1 var(--display); letter-spacing: -0.05em; color: var(--accent); }
.ch-table .count span { color: var(--muted); max-width: 16ch; line-height: 1.3; }
.stage-on .ch-table { padding-bottom: 12vh; }
.stage-on .ch-table > .ch-in { min-height: 100vh; }
.dishes { margin-top: clamp(28px, 4vw, 48px); display: grid; gap: 10px; width: 100%; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.dish-row { overflow: hidden; }
.dish-run { display: flex; gap: 10px; width: max-content; animation: run 90s linear infinite; }
.dish-row[data-row="1"] .dish-run { animation-direction: reverse; animation-duration: 110s; }
.dish-row[data-row="2"] .dish-run { animation-duration: 130s; }
.dish-run span { white-space: nowrap; padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .95rem; }
.dish-row[data-row="1"] span:nth-child(3n) { background: var(--mint); color: var(--mint-ink); border-color: var(--mint); }
@keyframes run { to { transform: translateX(-50%); } }
[dir="rtl"] .dish-run { animation-name: run-rtl; }
@keyframes run-rtl { to { transform: translateX(50%); } }

/* ---------------------------------------------------------------- Rimo */
.level-read { min-height: 3.4em; }
.lvl-line b { font: 800 1.6rem/1.1 var(--display); color: var(--accent); display: block; }
html[lang="ar"] .lvl-line b { font-family: var(--arabic); }
.lvl-line span { color: var(--muted); }
.care { display: grid; gap: 8px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; max-width: 460px; }
.care label { font-weight: 700; }
.care input { width: 100%; accent-color: var(--coral); height: 28px; }
.care-scale { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); gap: 4px; }
.still-levels .rimo-still.enter { animation: pop .45s var(--ease); }
@keyframes pop { 0% { transform: scale(.9); } 60% { transform: scale(1.04); } 100% { transform: none; } }
.stays { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.stays li { padding: 7px 14px; border-radius: 999px; background: var(--mint); color: var(--mint-ink); font-size: .92rem; font-weight: 600; }

/* ---------------------------------------------------------------- plans */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plan { padding: 20px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.plan.plus { border: 2px solid var(--coral); }
.plan h3 { font-size: 1.4rem; }
.note { font-size: .9rem; color: var(--muted); }

/* ---------------------------------------------------------------- now in RitmoFuel */
.now-in { position: relative; }
.now-head { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 96px) var(--gutter) 0; }
.now-head h2 { max-width: none; }
.feature-title { font-size: clamp(1.7rem, 1.1rem + 2vw, 2.6rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 780; }
.ch-feature.arrived .copy { animation: arrive .8s var(--ease) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(24px); } }

/* ---------------------------------------------------------------- roadmap */
.roadmap { position: relative; z-index: 2; background: var(--road-bg); color: var(--road-ink); padding: clamp(64px, 8vw, 104px) 0; overflow: clip; }
.roadmap a { color: var(--mint); }
.road-pin { display: grid; gap: clamp(20px, 3vw, 36px); }
.road-head { max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 14px; }
.road-head h2 { color: var(--road-ink); max-width: 20ch; }
.road-head .lead { color: var(--road-muted); }
.road-ctl { display: flex; align-items: center; gap: 10px; }
.road-hint { color: var(--road-muted); font-size: .92rem; margin-inline-end: auto; }
.road-btn { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--road-dim); background: transparent; color: var(--road-ink); display: grid; place-items: center; cursor: pointer; }
.road-btn:hover:not(:disabled) { border-color: var(--mint); color: var(--mint); }
.road-btn:disabled { opacity: .35; cursor: default; }
.road-btn svg { width: 20px; height: 20px; }
.road-btn[data-road="back"] svg, [dir="rtl"] .road-btn[data-road="fwd"] svg { transform: scaleX(-1); }
[dir="rtl"] .road-btn[data-road="back"] svg { transform: none; }
.road-scroll { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--road-dim) transparent; padding: 8px 0 18px; cursor: grab; }
.road-scroll.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.road-scroll:focus-visible { outline-offset: -3px; border-radius: 0; }
.road { list-style: none; display: flex; width: max-content; padding: 0 max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
.stop { --node: 26px; --ny: 116px; position: relative; width: clamp(230px, 26vw, 290px); padding: calc(var(--ny) + 36px) 26px 0 0; scroll-snap-align: start; scroll-margin-inline-start: var(--gutter); display: grid; gap: 8px; align-content: start; }
[dir="rtl"] .stop { padding: calc(var(--ny) + 36px) 0 0 26px; }
/* the road: a segment from each stop's node to the next one */
.stop::before { content: ""; position: absolute; top: calc(var(--ny) + var(--node) / 2 - 3px); inset-inline-start: var(--node); inset-inline-end: 0; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--road-dim) 0 14px, transparent 14px 24px); }
.stop[data-state="done"]::before { background: var(--mint); box-shadow: 0 0 18px rgba(189, 231, 198, .55); }
.stop[data-state="done"]:has(+ .stop:not([data-state="done"]))::before { background: linear-gradient(90deg, var(--mint), var(--road-dim)); }
[dir="rtl"] .stop[data-state="done"]:has(+ .stop:not([data-state="done"]))::before { background: linear-gradient(270deg, var(--mint), var(--road-dim)); }
.stop:last-child::before { display: none; }
.node { position: absolute; top: var(--ny); inset-inline-start: 0; width: var(--node); height: var(--node); border-radius: 50%; border: 3px solid var(--road-dim); background: var(--road-bg); }
.stop[data-state="done"] .node { background: var(--mint); border-color: var(--mint); box-shadow: 0 0 0 6px rgba(189, 231, 198, .18), 0 0 28px rgba(189, 231, 198, .8); }
.stop[data-state="building"] .node { border-color: var(--coral); background: color-mix(in srgb, var(--coral) 35%, var(--road-bg)); animation: pulse 2.2s ease-in-out infinite; }
.stop-you .node { border-style: dashed; border-color: var(--coral); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 118, 93, .5); } 50% { box-shadow: 0 0 0 12px rgba(239, 118, 93, 0); } }
.phase { position: absolute; top: calc(var(--ny) - 112px); inset-inline-start: 0; font: 760 1.05rem/1 var(--display); color: var(--road-ink); padding-inline-start: 0; white-space: nowrap; }
html[lang="ar"] .phase { font-family: var(--arabic); }
.stop[data-first]:not(:first-child) .node::before { content: ""; position: absolute; inset-inline-start: -16px; top: -96px; height: 110px; border-inline-start: 1.5px solid var(--road-dim); }
.stop h3 { font-size: 1.08rem; color: var(--road-ink); }
.stop p { color: var(--road-muted); font-size: .94rem; line-height: 1.45; }
.stop[data-state="planned"] h3 { color: color-mix(in srgb, var(--road-ink) 72%, var(--road-bg)); }
.state { justify-self: start; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--road-dim); color: var(--road-muted); }
.stop[data-state="done"] .state { background: var(--mint); color: var(--mint-ink); border-color: var(--mint); }
.stop[data-state="building"] .state { border-color: var(--coral); color: #F6B5A6; }
.stop .see { font-weight: 700; font-size: .92rem; }
.road-rimo { position: absolute; top: calc(var(--ny) - 92px); inset-inline-start: -36px; width: 100px; height: auto; pointer-events: none; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); transition: transform .5s var(--ease); }
.road-rimo.hop { animation: hop .7s var(--ease); }
@keyframes hop { 40% { transform: translateY(-22px); } }
/* pinned: vertical scroll drives the track on wide screens */
.roadmap.pinned { height: calc(100vh + var(--road-extra, 0px)); padding: 0; }
.roadmap.pinned .road-pin { position: sticky; top: 0; height: 100vh; align-content: center; padding-top: var(--head-h); }
.roadmap.pinned .road-scroll { overflow-x: hidden; scroll-snap-type: none; cursor: default; }
.road-progress { height: 3px; background: var(--road-dim); margin: 0 auto; width: min(var(--max), calc(100% - 2 * var(--gutter))); border-radius: 2px; overflow: hidden; }
.road-progress i { display: block; height: 100%; width: 100%; background: var(--mint); transform-origin: left; transform: scaleX(var(--p, 0)); }
[dir="rtl"] .road-progress i { transform-origin: right; }

/* ---------------------------------------------------------------- idea box */
.ch-idea .copy { max-width: 620px; }
.idea-form { display: grid; gap: 16px; padding: clamp(18px, 2.4vw, 26px); background: var(--surface); border: 1px solid var(--line); border-radius: 26px; }
.kind { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kind legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.kind label { position: relative; }
.kind input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kind span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); }
.kind input:checked + span { background: var(--pine); color: #F6F3EB; border-color: var(--pine); font-weight: 700; }
@media (prefers-color-scheme: dark) { .kind input:checked + span { background: var(--mint); color: var(--mint-ink); border-color: var(--mint); } }
.kind input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.field textarea, .field input { font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; width: 100%; }
.field textarea { resize: vertical; min-height: 120px; }
.field textarea:focus, .field input:focus { border-color: var(--accent); outline: 3px solid var(--focus); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #B3402A; }
.hint { font-size: .86rem; color: var(--muted); display: flex; gap: 10px; justify-content: space-between; }
.count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.send { font: inherit; font-weight: 700; background: var(--coral); color: #182421; border: 0; border-radius: 999px; padding: 12px 28px; min-height: 48px; cursor: pointer; }
.send:hover { background: #F28A74; }
.send:disabled { opacity: .6; cursor: progress; }
.privacy-link { font-size: .9rem; }
.idea-status { min-height: 1.5em; font-weight: 600; }
.idea-status[data-kind="sent"] { color: var(--accent); }
.idea-status[data-kind="sent"]::before { content: ""; display: inline-block; width: 14px; height: 8px; margin-inline-end: 10px; border: solid currentColor; border-width: 0 0 2.5px 2.5px; transform: translateY(-3px) rotate(-45deg); }
.idea-status[data-kind="error"] { color: #B3402A; }
@media (prefers-color-scheme: dark) { .idea-status[data-kind="error"], .field [aria-invalid="true"] { color: #F6A08E; border-color: #F6A08E; } .field [aria-invalid="true"] { color: var(--ink); } }
.js .idea-nojs { display: none; }
.in-app { display: grid; gap: 10px; padding-top: 8px; }
.path { font-weight: 700; color: var(--accent); }
.in-app-list { list-style: none; display: grid; gap: 8px; }
.in-app-list li { color: var(--muted); }
.in-app-list b { color: var(--ink); }
.more-help { color: var(--muted); }

/* ---------------------------------------------------------------- FAQ, CTA, footer */
.ch-faq details { border-bottom: 1px solid var(--line); background: var(--panel); }
.ch-faq details:first-of-type { border-top: 1px solid var(--line); }
.ch-faq summary { cursor: pointer; font-weight: 700; padding: 16px 4px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.ch-faq summary::-webkit-details-marker { display: none; }
.ch-faq summary::after { content: "+"; font: 600 1.4rem/1 var(--display); color: var(--accent); }
.ch-faq details[open] summary::after { content: "\2212"; }
.ch-faq details p { padding: 0 4px 18px; color: var(--muted); }
.ch-cta h2 { font-size: clamp(2.2rem, 1.3rem + 3.4vw, 4.2rem); max-width: 14ch; }
.foot { background: var(--road-bg); color: var(--road-muted); font-size: .92rem; }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 44px var(--gutter) 48px; display: grid; gap: 14px; }
.foot .brand { color: var(--road-ink); }
.foot .logo { color: var(--mint); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { color: var(--road-ink); min-height: 40px; display: inline-flex; align-items: center; }

/* ---------------------------------------------------------------- phones and tablets */
@media (max-width: 959px) {
  .ch-in { grid-template-columns: minmax(0, 1fr); }
  .ch-hero .ch-in { grid-template-areas: "h" "l" "slot" "d" "s"; grid-template-rows: none; }
  .still { order: -1; }
  .ch-hero .still { order: 0; }
  .plan-grid { grid-template-columns: 1fr; }
  .still-pair { padding-inline-end: 18%; }
  .ch-hero .still-pair .phone-still { width: min(230px, 58vw); }
  .still-row .phone-still.small { width: 30%; }
  /* stage mode: the scene sits at the top of each chapter and the text slides over it */
  .stage-on .ch { padding: 0 0 8vh; }
  .stage-on .ch > .ch-in { min-height: 0; }
  .stage-on .ch .slot { margin-top: 0; }
  .stage-on .ch .copy { padding: 22px 20px 26px; }
  .stage-on .slot { order: -1; top: var(--head-h); height: 46svh; z-index: 0; }
  .stage-on .ch .copy { position: relative; z-index: 1; padding: 22px 20px 26px; margin-inline: -6px; background: var(--panel); border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 -18px 40px -30px rgba(18, 59, 50, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .stage-on .ch-hero .copy { padding: 0; margin: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .stage-on .ch-hero .slot { position: relative; top: auto; height: 44svh; }
  .stage-on .ch-hero .demo, .stage-on .ch-hero .stores { position: relative; z-index: 1; }
  .stage-on .ch-hero .stores { background: var(--panel); border-radius: 22px; padding: 14px; }
  .stage-on .ch-idea .slot, .stage-on .ch-faq .slot { display: none; }
  .stage-on .ch-idea .copy, .stage-on .ch-faq .copy { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .stage-on .ch-table .copy { margin-bottom: 0; }
  .stop { width: min(76vw, 270px); }
  .roadmap.pinned { height: auto; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .say-save { margin-inline-start: 0; }
  .demo { border-radius: 22px; }
  .tag { font-size: .74rem; }
}

/* ---------------------------------------------------------------- legal and help pages */
.page main { padding-bottom: 56px; }
.doc-band { height: clamp(96px, 11vw, 150px); background: var(--road-bg); position: relative; overflow: hidden; }
/* Rimo stands on the band's bottom edge, whole, never cropped. */
.doc-rimo { position: absolute; inset-inline-end: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); bottom: 0; height: calc(100% - 10px); width: auto; }
.doc-grid { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 240px minmax(0, 72ch); gap: clamp(28px, 5vw, 72px); justify-content: center; }
.doc-grid.no-toc { grid-template-columns: minmax(0, 72ch); }
.toc { position: sticky; top: calc(var(--head-h) + 24px); align-self: start; margin-top: 44px; max-height: calc(100vh - var(--head-h) - 48px); overflow: auto; font-size: .9rem; }
.toc-title { font-weight: 700; margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; display: grid; gap: 2px; border-inline-start: 2px solid var(--line); }
.toc a { display: block; padding: 6px 12px; color: var(--muted); text-decoration: none; margin-inline-start: -2px; border-inline-start: 2px solid transparent; }
.toc a:hover { color: var(--ink); border-inline-start-color: var(--coral); }
.doc { padding-top: 36px; line-height: 1.65; }
.doc h1 { font: 800 clamp(2.1rem, 1.4rem + 2.4vw, 3.3rem)/1.05 var(--display); letter-spacing: -0.035em; margin: 0 0 12px; }
html[lang="ar"] .doc h1 { font-family: var(--arabic); letter-spacing: 0; line-height: 1.3; }
.doc h2 { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.7rem); line-height: 1.2; letter-spacing: -0.02em; max-width: none; margin: 40px 0 10px; font-weight: 760; }
.doc h3 { margin: 24px 0 6px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc ul, .doc ol { padding-inline-start: 22px; }
.doc li { margin-bottom: 6px; }
.doc .meta { color: var(--muted); font-size: .92rem; }
.doc .card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 20px 22px; margin: 18px 0; }
.doc .notice { background: var(--notice); border: 1px solid var(--notice-line); color: var(--on-notice); border-radius: 16px; padding: 12px 16px; margin: 16px 0; }
.doc .notice a { color: inherit; }
.doc .steps { counter-reset: s; list-style: none; padding: 0; display: block; }
.doc .steps li { counter-increment: s; position: relative; padding: 0 0 0; padding-inline-start: 40px; min-height: 28px; margin-bottom: 10px; display: block; background: none; border: 0; border-radius: 0; }
.doc .steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.doc details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 16px; margin: 8px 0; }
.doc summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; padding: 12px 0; }
.doc details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: .94rem; margin: 8px 0 16px; }
.doc th, .doc td { text-align: start; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); }
.doc .table-scroll { overflow-x: auto; }
.doc .legal-identity { font-size: .9rem; color: var(--muted); line-height: 1.6; }
@media (max-width: 959px) {
  .doc-grid, .doc-grid.no-toc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; margin-top: 28px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
  /* One column: the page title (and its date line) comes first, then "On this page", then the text.
     The article's own markup is untouched; display: contents only lets the grid order its children. */
  .doc-grid { display: flex; flex-direction: column; }
  .doc { display: contents; }
  .doc > * { order: 3; }
  .doc > h1, .doc > h1 + .meta { order: 1; }
  .toc { order: 2; margin-top: 8px; margin-bottom: 8px; }
  .doc > h1 { margin-top: 28px; }
}

/* 404 */
.lost { max-width: 640px; margin: 0 auto; padding: 48px var(--gutter) 72px; display: grid; gap: 14px; justify-items: start; }
.lost-rimo { width: 160px; }
.lost h1 { font: 800 clamp(2.2rem, 1.6rem + 2vw, 3.2rem)/1.05 var(--display); letter-spacing: -0.03em; }
.lost ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.lost-links { display: flex !important; flex-wrap: wrap; gap: 6px 18px !important; margin-top: 10px; }

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .say.play .tok, .js .say.play .tag, .js .say.play .say-foot { opacity: 1 !important; transform: none !important; }
  .js .say.play .food .w::after { transform: none !important; }
  .js .say.run * { transition: none !important; }
  .dish-run, .stop[data-state="building"] .node, .road-rimo.hop, .still-levels .rimo-still.enter, .ch-feature.arrived .copy, .say.saved .say-save { animation: none !important; }
  .steps li, .road-rimo { transition: none; }
  .dishes { mask-image: none; -webkit-mask-image: none; }
  .dish-run { width: auto; flex-wrap: wrap; }
  .dish-run span:nth-child(n + 33) { display: none; }
}
