/* Emptly homepage. Colours, font and the list look follow the app
   (backend/app/static/style.css); light and dark follow the browser. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/bricolage-grotesque-5.2.8-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #f3f5ef;
  --surface: #ffffff;
  --soft: #f0f3ee;
  --text: #142019;
  --muted: #56635a;
  --faint: #647068;
  --line: #e3e8e1;
  --chipline: #dce3da;
  --accent: #1e7a4c;
  --accent-text: #ffffff;
  --accent-soft: #ddefe3;
  --accent-strong: #17603c;
  --inv: #142019;
  --on-inv: #ffffff;
  --on-inv-muted: #c3d1c7;
  --on-inv-accent: #7ee0a6;
  --pop: #ffc53d;
  --track: #e2e8e0;
  --check-line: #86938a;
  --fresh: #fff1c2;
  --frame: #1b231e;
  --todo: #fff1c2;
  --shadow: 0 6px 24px rgba(20, 32, 25, .14);
  --shadow-soft: 0 1px 2px rgba(20, 32, 25, .06), 0 8px 22px -16px rgba(20, 32, 25, .25);
  --shadow-phone: 0 40px 80px -30px rgba(20, 32, 25, .45), 0 12px 30px -12px rgba(20, 32, 25, .25);
  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.3, 1.6, .5, 1);
  --cat-0-bg: #e2f2d6; --cat-0-fg: #2f6b1f;
  --cat-1-bg: #fbe7cf; --cat-1-fg: #8f4e13;
  --cat-2-bg: #dceafb; --cat-2-fg: #205ea6;
  --cat-3-bg: #efe3fa; --cat-3-fg: #7139a3;
  --cat-4-bg: #fadce5; --cat-4-fg: #a82d57;
  --cat-5-bg: #d6f1ee; --cat-5-fg: #17675f;
  --gutter: 16px;
  --top-h: 64px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1411;
    --surface: #182019;
    --soft: #222b25;
    --text: #e8eee9;
    --muted: #9caaa1;
    --faint: #85928a;
    --line: #232c26;
    --chipline: #2c3630;
    --accent: #4cc282;
    --accent-text: #07140c;
    --accent-soft: #1c3326;
    --accent-strong: #7ee0a6;
    --inv: #e8eee9;
    --on-inv: #0f1411;
    --on-inv-muted: #46524a;
    --on-inv-accent: #17603c;
    --track: #26302a;
    --check-line: #627168;
    --fresh: #3a3417;
    --frame: #000000;
    --todo: #3a3417;
    --shadow: 0 6px 24px rgba(0, 0, 0, .55);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px -16px rgba(0, 0, 0, .7);
    --shadow-phone: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px #2c3630;
    --cat-0-bg: #22361a; --cat-0-fg: #9bdb7a;
    --cat-1-bg: #3a2a16; --cat-1-fg: #f2b97a;
    --cat-2-bg: #17293f; --cat-2-fg: #8cbcff;
    --cat-3-bg: #2d2140; --cat-3-fg: #cba8ff;
    --cat-4-bg: #3a1a26; --cat-4-fg: #ff9cbb;
    --cat-5-bg: #143330; --cat-5-fg: #7fd9cf;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.03em; line-height: 1.05; margin: 0; }
h2 { text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.todo { background: var(--todo); border-radius: 6px; padding: 0 .2em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 16px; background: var(--accent); color: var(--accent-text); font-weight: 700; text-decoration: none; transition: transform .25s var(--ease-spring), box-shadow .25s, background-color .2s; box-shadow: var(--shadow-soft); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn .i { width: 18px; height: 18px; }
.btn-small { min-height: 40px; padding: 0 16px; border-radius: 12px; font-size: .92rem; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--chipline); }
.btn-light { background: var(--on-inv); color: var(--inv); box-shadow: none; }

/* Header */
.top { position: relative; z-index: 20; display: flex; align-items: center; gap: 16px; height: var(--top-h); padding: 0 var(--gutter); max-width: 1200px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em; text-decoration: none; }
.brand img { border-radius: 9px; }
.top-nav { display: none; margin-left: auto; gap: 4px; }
.top-nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .95rem; text-decoration: none; transition: color .2s, background-color .2s; }
.top-nav a:hover { color: var(--text); background: var(--soft); }
.top > .btn { margin-left: auto; }
/* Language switch (DE/EN) next to the button. */
.top > .lang { margin-left: auto; padding: 8px 10px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: .9rem; text-decoration: none; }
.top > .lang:hover { color: var(--text); background: var(--soft); }
.top > .lang + .btn { margin-left: 4px; }

@media (max-width: 359px) {
  .top { gap: 8px; }
  .top > .lang { padding: 8px 6px; }
  .top > .lang + .btn { margin-left: 0; }
  .top > .btn { padding: 0 10px; }
}

/* The story: hero and steps scroll, the phone stays. Phones: the phone
   sticks at the top above the text; wide screens: on the right. */
.story { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.hero { padding: 28px 0 36px; }
.hero h1 { font-size: clamp(2.7rem, 11vw, 5.4rem); font-weight: 800; letter-spacing: -.045em; }
.hero h1 .accent { color: var(--accent); }
/* Part of the h1: the search term belongs in the main heading. */
h1 .what { display: block; margin-top: 20px; font: 700 1.35rem/1.35 var(--font-display); letter-spacing: -.015em; }
.lead { margin-top: 8px; font-size: 1.15rem; color: var(--muted); max-width: 30em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.phone-slot { display: contents; }
.phone-stage { position: sticky; top: 0; z-index: 5; display: flex; justify-content: center; padding: 10px 0 26px; margin: 0 calc(-1 * var(--gutter)); background: linear-gradient(var(--bg) calc(100% - 20px), transparent); }

.step { min-height: 64svh; display: flex; flex-direction: column; justify-content: flex-start; padding: 8px 0 0; }
.js .step { opacity: .3; transition: opacity .4s; }
.js .step.active { opacity: 1; }
.step-num { width: 32px; height: 32px; margin-bottom: 16px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem; }
.step h2 { font-size: clamp(1.9rem, 7vw, 2.9rem); font-weight: 800; }
.step p:not(.step-num) { margin-top: 14px; color: var(--muted); font-size: 1.08rem; max-width: 28em; }
.step:last-of-type { min-height: 56svh; }

/* The phone */
.phone { --w: 272px; width: var(--w); border-radius: 40px; padding: 9px; background: var(--frame); box-shadow: var(--shadow-phone); }
.phone-screen { position: relative; height: min(400px, max(320px, 46svh)); border-radius: 32px; background: var(--bg); padding: 30px 12px 12px; overflow: hidden; display: flex; flex-direction: column; }
.phone-screen::before { content: ""; position: absolute; top: 9px; left: 50%; width: 74px; height: 20px; margin-left: -37px; border-radius: 999px; background: var(--frame); z-index: 3; }

.ph-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px; }
.ph-head strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em; line-height: 1.1; }
.ph-head small { display: block; color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.ph-live { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-strong); font-weight: 700; }
.ph-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ph-live.pulse::before { animation: live-pulse 1.4s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

@property --ring { syntax: "<number>"; inherits: false; initial-value: 0; }
.ph-ring-wrap { position: relative; }
.ph-ring { width: 42px; height: 42px; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--ring) * 1%), var(--track) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  transition: --ring .8s var(--ease-out); }
.ph-ring-wrap span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .66rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.ph-add { display: grid; grid-template-columns: 1fr 38px; gap: 6px; margin-bottom: 10px; }
.ph-field { position: relative; display: flex; align-items: center; height: 38px; padding: 0 12px; border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-soft); font-size: .85rem; border: 1.5px solid transparent; transition: border-color .2s; }
.ph-field.typing { border-color: var(--accent); }
.ph-placeholder { color: var(--faint); }
.ph-caret { display: none; width: 1.5px; height: 17px; margin-left: 1px; background: var(--accent); animation: caret 1s steps(1) infinite; }
.ph-field.typing .ph-caret { display: inline-block; }
@keyframes caret { 50% { opacity: 0; } }
.ph-scan-btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; background: var(--accent); color: var(--accent-text); transition: transform .25s var(--ease-spring); }
.ph-scan-btn.press { transform: scale(.88); }
.ph-scan-btn .i { width: 19px; height: 19px; }

.ph-body { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 16px; }
.ph-rows { list-style: none; margin: 0; padding: 0; border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-soft); }
.ph-item { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s cubic-bezier(.4, 0, .2, 1), opacity .4s ease; }
.ph-inner { overflow: hidden; min-height: 0; }
.ph-item + .ph-item .ph-line { box-shadow: inset 0 1px 0 var(--line); }
.ph-item.gone { grid-template-rows: 0fr; opacity: 0; }
.ph-line { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 3px 10px 3px 2px; background: var(--surface); transition: transform .45s cubic-bezier(.4, 0, .2, 1); }
.ph-item.gone.done .ph-line { transform: translateX(60px); }
.ph-item.fresh .ph-line { animation: fresh 1.6s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes fresh { 0% { background-color: var(--fresh); transform: translateY(-12px) scale(.97); opacity: 0; } 25% { opacity: 1; transform: none; } 100% { background-color: var(--surface); } }
.ph-check { width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--accent-text); }
.ph-check > span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--check-line); display: inline-flex; align-items: center; justify-content: center; transition: background-color .2s, border-color .2s; }
.ph-check .i { width: 12px; height: 12px; stroke-width: 3.4; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .3s .1s; }
.ph-item.on .ph-check > span { background: var(--accent); border-color: var(--accent); animation: pop .5s var(--ease-spring); }
.ph-item.on .ph-check .i { stroke-dashoffset: 0; }
@keyframes pop { 0% { transform: scale(.55); } 55% { transform: scale(1.22); } 100% { transform: scale(1); } }
.ph-text { flex: 1; min-width: 0; line-height: 1.25; }
.ph-text b { display: inline-block; max-width: 100%; vertical-align: top; font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(currentColor, currentColor) 0 55% / 0 2px no-repeat; transition: background-size .35s var(--ease-out), color .3s; }
.ph-item.on .ph-text b { background-size: 100% 2px; color: var(--faint); }
.ph-text small { display: block; color: var(--muted); font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-qty { min-width: 30px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .75rem; font-variant-numeric: tabular-nums; }
.bump { animation: bump-pop .45s var(--ease-spring); }
@keyframes bump-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.ph-cart { display: flex; justify-content: center; padding-top: 10px; }
.ph-cart span { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--chipline); background: var(--surface); font-weight: 600; font-size: .78rem; }
.ph-cart .i { width: 16px; height: 16px; }
.ph-cart b { min-width: 22px; height: 22px; border-radius: 999px; background: var(--accent); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; }

.ph-chip { position: absolute; left: 50%; top: 40px; z-index: 4; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 20px); min-height: 34px; padding: 0 13px 0 5px; border-radius: 999px;
  background: var(--inv); color: var(--on-inv); font-size: .74rem; font-weight: 600; white-space: nowrap; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .5); animation: chip-in .5s cubic-bezier(.2, 1.5, .4, 1); }
.ph-chip > span { overflow: hidden; text-overflow: ellipsis; }
.ph-chip .i { width: 24px; height: 24px; padding: 5px; border-radius: 50%; background: var(--accent); color: var(--accent-text); stroke-width: 3; }
@keyframes chip-in { from { transform: translate(-50%, -10px) scale(.9); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

.ph-done { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 16px; background: var(--inv); color: var(--on-inv); text-align: center; overflow: hidden; animation: rise .6s var(--ease-out); }
.ph-done strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; margin-top: 10px; }
.ph-done small { color: var(--on-inv-muted); font-size: .8rem; }
.ph-done-mark { width: 62px; height: 62px; border-radius: 50%; background: var(--on-inv-accent); color: var(--inv); display: inline-flex; align-items: center; justify-content: center; animation: pop .6s .15s var(--ease-spring) both; }
.ph-done-mark .i { width: 30px; height: 30px; stroke-width: 3; }
@keyframes rise { from { transform: translateY(24px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; animation: fall 1.8s .2s ease-in both; }
.confetti i:nth-child(1) { left: 12%; background: var(--pop); animation-delay: .15s; }
.confetti i:nth-child(2) { left: 25%; background: var(--on-inv-accent); animation-delay: .35s; }
.confetti i:nth-child(3) { left: 38%; background: #ff9cbb; animation-delay: .05s; }
.confetti i:nth-child(4) { left: 52%; background: #8cbcff; animation-delay: .4s; }
.confetti i:nth-child(5) { left: 63%; background: var(--pop); animation-delay: .2s; }
.confetti i:nth-child(6) { left: 74%; background: #cba8ff; animation-delay: .5s; }
.confetti i:nth-child(7) { left: 85%; background: var(--on-inv-accent); animation-delay: .1s; }
.confetti i:nth-child(8) { left: 93%; background: #ff9cbb; animation-delay: .3s; }
@keyframes fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(330px) rotate(560deg); opacity: 0; } }

/* Camera view of the scan step */
.ph-camera { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #0b0f0c; color: #c3d1c7; animation: cam-in .35s ease-out; }
.ph-camera small { font-size: .74rem; }
@keyframes cam-in { from { opacity: 0; } to { opacity: 1; } }
.ph-viewfinder { position: relative; width: 190px; height: 130px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: radial-gradient(circle at 50% 40%, #2a332d, #111613 70%); }
.ph-barcode { width: 120px; height: 66px; padding: 6px; border-radius: 6px; background: #f4f1e8; fill: #111; transform: rotate(-4deg); }
.ph-sweep { position: absolute; left: 14px; right: 14px; top: 10%; height: 2px; border-radius: 2px; background: #7ee0a6; box-shadow: 0 0 12px 2px rgba(126, 224, 166, .7); animation: sweep 1.6s ease-in-out infinite; }
@keyframes sweep { 0%, 100% { top: 10%; } 50% { top: 88%; } }
.ph-corner { position: absolute; width: 22px; height: 22px; border: 3px solid #7ee0a6; }
.ph-corner.tl { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.ph-corner.tr { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.ph-corner.bl { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.ph-corner.br { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.ph-flash { position: absolute; inset: 0; background: #7ee0a6; opacity: 0; pointer-events: none; }
.ph-camera.hit .ph-flash { animation: flash .5s ease-out; }
.ph-camera.hit .ph-sweep { animation: none; top: 50%; }
@keyframes flash { 0% { opacity: .4; } 100% { opacity: 0; } }

/* Sections below the story */
.section { max-width: 1200px; margin: 0 auto; padding: 72px var(--gutter); }
.section-head h2, .split-head h2, .station-text h2, .price h2, .final h2 { font-size: clamp(2rem, 7vw, 3.2rem); font-weight: 800; }
.section-head { margin-bottom: 32px; }

/* Features: excerpts of the app instead of icon cards. The week tiles
   follow the app's weekly review, the rows its list. */
.feats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 72px; }
.feat-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
.feat h2 { font-size: 1.6rem; font-weight: 800; }
.feat-main h2 { font-size: clamp(2rem, 7vw, 3.2rem); }
.feat-text p { margin-top: 16px; color: var(--muted); font-size: 1.08rem; max-width: 28em; }
.feat-pair h2 { margin-top: 24px; }
.feat > p { margin-top: 8px; color: var(--muted); max-width: 30em; }
.feat-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px 24px; }

.week { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.w-tile { position: relative; padding: 16px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-soft); }
.w-tile small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.w-tile > b { display: block; margin-top: 8px; font: 800 2.9rem/1 var(--font-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.w-tile > b.s { font-size: 1.8rem; }
.w-tile > span { display: block; margin-top: 4px; font-size: .78rem; color: var(--muted); }
.w-hero, .w-cats { grid-column: 1 / -1; }
.w-hero { background: var(--accent); color: var(--accent-text); }
.w-hero small, .w-hero > span { color: inherit; }
.w-hero em { position: absolute; top: 12px; right: 12px; padding: 4px 12px; border-radius: 999px; font: 700 .75rem/20px system-ui, sans-serif; background: color-mix(in srgb, currentColor 16%, transparent); }
.w-row { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.w-ring { position: relative; flex: none; width: 136px; height: 136px; }
.w-ring > i { display: block; height: 100%; border-radius: 50%; background: conic-gradient(var(--cat-0-fg) 0 38.3%, transparent 38.3% 38.9%, var(--cat-1-fg) 38.9% 66.1%, transparent 66.1% 66.7%, var(--cat-2-fg) 66.7% 82.7%, transparent 82.7% 83.3%, var(--cat-3-fg) 83.3% 93.8%, transparent 93.8% 94.4%, var(--cat-4-fg) 94.4% 99.4%, transparent 99.4%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 22px), #000 calc(100% - 21px)); mask: radial-gradient(farthest-side, transparent calc(100% - 22px), #000 calc(100% - 21px)); }
.w-ring p { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .68rem; color: var(--muted); line-height: 1.2; }
.w-ring p b { font: 800 1.75rem/1 var(--font-display); color: var(--text); }
.w-row ul { list-style: none; flex: 1; min-width: 0; margin: 0; padding: 0; }
.w-row li { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: .82rem; font-weight: 600; }
.w-row li i { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.w-row li b { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.d0 { background: var(--cat-0-fg); } .d1 { background: var(--cat-1-fg); } .d2 { background: var(--cat-2-fg); } .d3 { background: var(--cat-3-fg); } .d4 { background: var(--cat-4-fg); }

/* App excerpts on a calm ground. */
.stage { height: 416px; padding: 24px 24px 0; border-radius: 28px; overflow: hidden; background: var(--accent-soft); }
.a-chips { display: flex; gap: 8px; margin-right: -24px; overflow: hidden; }
.a-chips span { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface); font-weight: 600; font-size: .88rem; }
.a-chips i { font-style: normal; opacity: .6; }
.a-chips .on { background: var(--inv); color: var(--on-inv); }
.a-group { display: flex; align-items: center; gap: 8px; margin: 20px 0 8px; font-size: .82rem; font-weight: 700; }
.a-group span { color: var(--muted); }
.a-group i { width: 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font: 800 .72rem system-ui, sans-serif; }
.a-group .c2 { background: var(--cat-2-bg); color: var(--cat-2-fg); } .a-group .c3 { background: var(--cat-3-bg); color: var(--cat-3-fg); }
.a-rows { list-style: none; margin: 0; padding: 0; border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-soft); }
.a-rows li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 4px 8px 4px 16px; }
.a-rows li + li { box-shadow: inset 0 1px 0 var(--line); }
.a-rows li > i { flex: none; width: 25px; height: 25px; border-radius: 50%; border: 2px solid var(--check-line); }
.a-rows p { flex: 1; font-size: .8rem; line-height: 1.35; color: var(--muted); }
.a-rows p b { display: block; font-size: .97rem; font-weight: 600; color: var(--text); }
.a-rows em { display: inline-flex; align-items: center; gap: 16px; padding: 0 16px; min-height: 40px; border-radius: 999px; background: var(--soft); font: 700 .9rem system-ui, sans-serif; }
.a-rows s { text-decoration: none; font-size: 1.1rem; color: var(--muted); }
.stage .a-brand { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.a-brand img { border-radius: 7px; }
.stage .a-title { margin-top: 12px; font: 800 2rem/1.1 var(--font-display); letter-spacing: -.03em; }
.stage .a-sum { margin: 4px 0 12px; font-size: .9rem; color: var(--muted); }

.more { margin: 0; display: grid; border-top: 1px solid var(--line); }
.more div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.more dt { font-weight: 700; }
.more dd { margin: 4px 0 0; color: var(--muted); }
/* Heading on one side, a plain list on the other. */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.split .more { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 359px) { .split-head h2 { font-size: 1.75rem; } }
.stage-shared .a-rows li { min-height: 52px; }
@media (max-width: 699px) {
  .stage { height: 408px; padding: 16px 16px 0; }
  .a-chips { margin-right: -16px; }
}
@media (max-width: 360px) {
  .w-row { flex-direction: column; align-items: stretch; }
  .w-ring { align-self: center; }
}

.station { display: grid; gap: 40px; align-items: center; }
.station-text > p { margin-top: 16px; color: var(--muted); font-size: 1.08rem; max-width: 32em; }
.howto { list-style: none; counter-reset: howto; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.howto li { counter-increment: howto; position: relative; padding-left: 46px; color: var(--muted); }
.howto li b { color: var(--text); }
.howto li::before { content: counter(howto); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; }

/* A drawn station: the device, a package passing in front, the light. */
.station-visual { position: relative; height: 300px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-soft); overflow: hidden; }
.station-device { position: absolute; left: 50%; top: 46px; width: 112px; height: 132px; margin-left: -56px; border-radius: 22px; background: linear-gradient(160deg, #3a4540, #1b231e); box-shadow: 0 22px 36px -16px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .15); }
.station-window { position: absolute; left: 22px; right: 22px; bottom: 14px; height: 18px; border-radius: 6px; background: #0b0f0c; box-shadow: inset 0 0 0 2px #2c3630; }
.station-led { position: absolute; left: 50%; top: 30px; width: 34px; height: 34px; margin-left: -17px; border-radius: 10px; background: #2c3630; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08); }
.station-beam { position: absolute; left: 50%; top: 178px; width: 90px; height: 40px; margin-left: -45px; background: linear-gradient(rgba(255, 80, 80, .45), transparent); clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); opacity: 0; }
.station-pack { position: absolute; left: 50%; top: 214px; width: 150px; height: 62px; margin-left: -75px; padding: 8px 14px; border-radius: 10px; background: #f4f1e8; box-shadow: 0 12px 20px -12px rgba(0, 0, 0, .45); transform: translateX(-260px) rotate(-6deg); }
.station-pack svg { width: 100%; height: 100%; fill: #111; }
.station-visual.seen .station-pack { animation: pack-pass 4.5s var(--ease-out) infinite; }
.station-visual.seen .station-beam { animation: beam 4.5s infinite; }
.station-visual.seen .station-led { animation: led 4.5s infinite; }
@keyframes pack-pass { 0% { transform: translateX(-260px) rotate(-6deg); } 25%, 60% { transform: translateX(0) rotate(-2deg); } 85%, 100% { transform: translateX(280px) rotate(4deg); } }
@keyframes beam { 0%, 22% { opacity: 0; } 26%, 38% { opacity: 1; } 42%, 100% { opacity: 0; } }
@keyframes led { 0%, 36% { background: #2c3630; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08); } 40%, 70% { background: #4cc282; box-shadow: 0 0 26px 6px rgba(76, 194, 130, .6); } 78%, 100% { background: #2c3630; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08); } }

.price { display: grid; gap: 28px; padding: 32px 24px; border-radius: 30px; background: var(--surface); box-shadow: var(--shadow-soft); }
.price-tag { margin-top: 20px; font-family: var(--font-display); font-size: 3.4rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.price-tag span { font-size: 1.1rem; color: var(--muted); letter-spacing: 0; font-weight: 600; }
.price-trial { margin: 14px 0 24px; color: var(--muted); }
.price-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; align-content: center; }
.price-list li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.price-list .i { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); stroke-width: 3; }
.price-note { grid-column: 1 / -1; color: var(--faint); font-size: .85rem; }
.price-note a { color: inherit; }

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-soft); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--muted); transition: transform .3s var(--ease-out); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details p { padding: 0 20px 20px; color: var(--muted); }

.final { max-width: 1200px; margin: 40px auto 0; padding: 64px 24px; border-radius: 34px 34px 0 0; background: var(--inv); color: var(--on-inv); text-align: center; }
.final p { margin: 14px 0 28px; color: var(--on-inv-muted); font-size: 1.1rem; }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; max-width: 1200px; margin: 0 auto; padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.foot .brand { font-size: 1.1rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
/* Required by the licence of Open Food Facts (ODbL). */
.foot-credit { flex-basis: 100%; margin: 0; color: var(--faint); font-size: .8rem; }
.foot-credit a { color: inherit; }
.foot nav a:hover { color: var(--text); text-decoration: underline; }
.foot nav a.social { display: inline-flex; align-items: center; gap: 6px; }
.foot nav a.social .i { width: 18px; height: 18px; }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 32px var(--gutter) 64px; }
.legal h1 { font-size: clamp(2.2rem, 8vw, 3.2rem); font-weight: 800; margin-bottom: 8px; }
.legal h2 { font-size: 1.45rem; font-weight: 700; margin: 38px 0 10px; }
.legal h3 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 6px; font-family: inherit; letter-spacing: 0; }
.legal p, .legal ul { margin: 10px 0; color: var(--muted); }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: 4px; }
.legal strong { color: var(--text); }
.legal .stand { color: var(--faint); font-size: .92rem; }
.legal address { font-style: normal; color: var(--text); line-height: 1.7; }
.legal a { color: var(--accent-strong); }

@media (min-width: 700px) {
  :root { --gutter: 28px; }
  .more { grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .price { grid-template-columns: 1.2fr 1fr; padding: 44px; }
  .final { border-radius: 40px; margin-bottom: 40px; }
}

@media (min-width: 960px) {
  .top { position: sticky; top: 0; }
  .top::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .top-nav { display: flex; }
  .top > .btn { margin-left: 8px; }
  .top > .lang { margin-left: 4px; }
  .top > .brand + .lang { margin-left: auto; }  /* no section nav before it (teaser.html) */

  .story { display: grid; grid-template-columns: 1.1fr 1fr; column-gap: 48px; }
  .story > .hero, .story > .step { grid-column: 1; }
  .hero { min-height: calc(100svh - var(--top-h)); display: flex; flex-direction: column; justify-content: center; padding: 0 0 6svh; opacity: 1; }
  .phone-slot { display: block; grid-column: 2; grid-row: 1 / span 6; }
  .phone-stage { top: calc(var(--top-h) + max(0px, (100svh - var(--top-h) - 660px) / 2)); margin: 0; padding: 24px 0; background: none; }
  .phone { --w: 330px; border-radius: 50px; padding: 11px; }
  .phone-screen { height: 590px; border-radius: 40px; padding: 40px 14px 14px; }
  .phone-screen::before { top: 12px; width: 92px; height: 26px; margin-left: -46px; }
  .ph-head strong { font-size: 1.6rem; }
  .ph-line { min-height: 56px; }
  .ph-text b { font-size: .98rem; }
  .ph-text small { font-size: .76rem; }
  .ph-chip { top: 50px; }
  .step { min-height: 88svh; justify-content: center; padding: 0; }
  .step:last-of-type { min-height: 88svh; padding: 0; }

  .feats { gap: 96px; }
  .feat-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
  .feat-pair { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .station { grid-template-columns: 1fr 1fr; gap: 64px; }
  .station-visual { height: 380px; }
  .station-device { top: 70px; }
  .station-beam { top: 202px; }
  .station-pack { top: 250px; }
}

/* Sub pages (scan-station.html) */
.page-hero { padding-top: 32px; }
.page-hero h1 { font-size: clamp(2.4rem, 9vw, 4.4rem); font-weight: 800; letter-spacing: -.045em; }
.setup .station-text h2 { font-size: clamp(1.7rem, 5vw, 2.2rem); }
.note { margin: 22px 0 0; color: var(--muted); max-width: 40em; }
.lights { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 820px; }
.lights li { display: grid; grid-template-columns: 14px 1fr; gap: 2px 12px; align-items: start; padding: 14px 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-soft); color: var(--muted); }
.lights li > span:last-child { grid-column: 2; }
.lights b { color: var(--text); }
@media (min-width: 640px) {
  .lights li { grid-template-columns: 14px 8em 1fr; }
  .lights li > span:last-child { grid-column: 3; }
}
.light { width: 14px; height: 14px; margin-top: 6px; border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.l-green { background: #2fb36a; color: #2fb36a; }
.l-yellow { background: #f2c200; color: #f2c200; }
.l-orange { background: #f08a24; color: #f08a24; }
.l-violet { background: #9b5de5; color: #9b5de5; }
.l-red { background: #e5484d; color: #e5484d; }
.l-blue { background: #3b82f6; color: #3b82f6; }
.station-text .btn { margin-top: 26px; }
.station.setup { align-items: start; }
.station-text .price-list { margin-top: 26px; }

/* Pre-launch page (teaser.html): hero text and a still phone side by side. */
.teaser { display: grid; gap: 34px; align-items: center; max-width: 1200px; margin: 0 auto; padding: 20px var(--gutter) 40px; }
.teaser h1 { font-size: clamp(2.7rem, 11vw, 5.4rem); font-weight: 800; letter-spacing: -.045em; }
.teaser h1 .accent { color: var(--accent); }
.teaser .phone-stage { position: static; margin: 0; padding: 0; background: none; }
.soon { margin: 0 0 12px; color: var(--accent-strong); font-weight: 700; }
.muted-note { margin: 12px 0 0; color: var(--muted); font-size: .95rem; }
.ph-ring.ring-40 { --ring: 40; }
@media (min-width: 960px) {
  .teaser { grid-template-columns: 1.1fr 1fr; column-gap: 48px; min-height: calc(100svh - var(--top-h)); padding-top: 0; }
  .teaser .phone { --w: 330px; border-radius: 50px; padding: 11px; }
  .teaser .phone-screen { height: 590px; border-radius: 40px; padding: 40px 14px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .station-pack { transform: rotate(-2deg); }
  .station-led { background: #4cc282; }
}
