/* ============================================================================
   Quiet Green, on the web.

   The palette, type scale, spacing steps and the hairline rule come from the
   app's own system (lib/shared/app_theme.dart, written up in
   docs/design-system.html). No colour here is invented.

   Where this departs from the app, and why: the app is product UI, where the
   system's job is to get out of the way. This is a landing page, where the
   job is to be looked at. So the marketing bands use full-bleed colour,
   display-scale numerals and asymmetric composition, while the legal and
   support documents keep the quiet treatment. The system allows exactly this
   distinction: "Staggered entrances are for marketing pages."
   ========================================================================= */

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

/* --- Tokens ------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  --canvas:      #F4F9F5;
  --field:       #FFFFFF;
  --chrome:      #CFE6D6;
  --sunken:      #E6F0E9;
  --hairline:    #DCE9DF;
  --hairline-hi: #B9D2C0;
  --ink:         #131714;
  --ink-muted:   #545E53;
  --ink-faint:   #9AA39A;
  --accent:      #2E6B41;
  --accent-ink:  #FFFFFF;
  --wash:        #E1F0E6;
  --brand:       #81C784;
  --danger:      #B0433A;

  /* The deep green is a FIXED ground in both themes: it is the app icon's
     ground and the splash ground, the one surface that must not flip.
     White on it is 6.4:1 either way. */
  --ground:      #2E6B41;
  --ground-ink:  #FFFFFF;
  --ground-mute: #E1F0E6;
  /* Two line weights on the deep ground, because they do different jobs.
     --ground-line is a decorative divider (2.1:1, visible without shouting).
     --ground-edge bounds an actual control and therefore clears the 3:1
     WCAG floor for UI components. The old single #4A8159 measured 1.39:1
     and was doing both. */
  --ground-line: #66A379;
  --ground-edge: #93BEA0;
  /* The panels sit inside the fixed band, so they are fixed too: a raised
     white surface reads as raised in both themes. Taking --field here made
     them recede in dark, where --field is near-black. */
  --ground-panel:      #FFFFFF;
  --ground-panel-ink:  #2E6B41;
  --ground-panel-mute: #545E53;

  /* The score ramp, stop for stop from RatingScore.colorFor in
     lib/screens/feed/post_card.dart. Every stop is darkened to clear 4.5:1,
     because the figure itself takes the colour and not just the meter. */
  --score-80: #2E6B41;
  --score-60: #5A8433;
  --score-40: #96751A;
  --score-20: #A85F27;
  --score-00: #B0433A;

  --s2: 2px;  --s4: 4px;  --s6: 6px;  --s8: 8px;
  --s12: 12px; --s14: 14px; --s16: 16px; --s20: 20px;
  --s24: 24px; --s32: 32px; --s44: 44px; --s64: 64px; --s96: 96px;

  --r-tag: 6px; --r-ui: 8px; --r-group: 10px; --r-rule: 2px;

  --measure: 68ch;
  --wide: 1040px;
  --page: 760px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0F1511; --field: #161D18; --chrome: #1B2620; --sunken: #141B16;
    --hairline: #263329; --hairline-hi: #37493C;
    --ink: #E6EFE8; --ink-muted: #A3B0A5; --ink-faint: #748076;
    --accent: #7FBF8F; --accent-ink: #0F1511; --wash: #17251B; --danger: #E28C82;
    --score-80: #7FBF8F; --score-60: #A8C96F; --score-40: #D8B65C;
    --score-20: #E0A46A; --score-00: #E28C82;
  }
}
:root[data-theme="dark"] {
  --canvas: #0F1511; --field: #161D18; --chrome: #1B2620; --sunken: #141B16;
  --hairline: #263329; --hairline-hi: #37493C;
  --ink: #E6EFE8; --ink-muted: #A3B0A5; --ink-faint: #748076;
  --accent: #7FBF8F; --accent-ink: #0F1511; --wash: #17251B; --danger: #E28C82;
  --score-80: #7FBF8F; --score-60: #A8C96F; --score-40: #D8B65C;
  --score-20: #E0A46A; --score-00: #E28C82;
}

/* --- Base --------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Skip link: the hero is tall, and a keyboard user should not have to tab
   through it to reach the content. Off-screen until focused. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--ground-panel); color: var(--ground-panel-ink);
  font-weight: 600; padding: 12px 18px;
  border-radius: 0 0 var(--r-ui) 0; text-decoration: none;
}
.skip:focus { left: 0; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The surfaces we did not draw still belong to the design. */
::selection { background: var(--wash); color: var(--ink); }
:root { accent-color: var(--accent); caret-color: var(--accent); }
* { scrollbar-color: var(--hairline-hi) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hairline-hi); border: 3px solid var(--canvas); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-rule); }
.band-hero :focus-visible { outline-color: var(--ground-ink); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; }

/* --- Type --------------------------------------------------------------- */
h1 {
  font-size: clamp(38px, 7.2vw, 68px);
  font-weight: 700; letter-spacing: -0.045em; line-height: 1.0;
  text-wrap: balance; margin: 0;
}
h2 {
  font-size: clamp(26px, 3.8vw, 38px);
  font-weight: 700; letter-spacing: -0.032em; line-height: 1.12;
  text-wrap: balance; margin: 0 0 var(--s16);
}
h3 {
  font-size: clamp(17px, 1.9vw, 20px);
  font-weight: 600; letter-spacing: -0.018em; line-height: 1.3;
  margin: 0 0 var(--s8);
}

p { margin: 0 0 var(--s14); max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul { margin: 0 0 var(--s14); padding-left: 19px; max-width: var(--measure); }
li { margin-bottom: var(--s8); color: var(--ink-muted); }
li:last-child { margin-bottom: 0; }
li strong, p strong { color: var(--ink); font-weight: 600; }

.lede {
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.45; color: var(--ink-muted);
  max-width: 46ch; letter-spacing: -0.014em;
}
.small { font-size: 14px; color: var(--ink-muted); }

/* The short rule under a heading: the only job --brand has. Too light to
   carry text (2.0:1), so never a button and never a ground. */
.rule { width: 34px; height: 3px; border-radius: var(--r-rule); background: var(--brand); margin: var(--s16) 0 var(--s24); }

/* ========================================================================
   MARKETING BANDS
   Full-bleed grounds with contained content. This is what the document
   layout was missing: the page changes ground under you as you scroll, so
   sections read as places rather than as more paragraphs.
   ===================================================================== */
.band { padding: var(--s96) var(--s24) 104px; }
.band > .inner { max-width: var(--wide); margin: 0 auto; }

.band-hero   { background: var(--ground); color: var(--ground-ink); padding-top: var(--s44); }
.band-canvas { background: var(--canvas); }
.band-field  { background: var(--field); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.band-chrome { background: var(--chrome); color: var(--ink); }

.band-hero h1, .band-hero h2, .band-hero h3, .band-hero strong { color: var(--ground-ink); }
.band-hero p, .band-hero .lede, .band-hero li { color: var(--ground-mute); }
.band-hero p a, .band-hero li a, .band-hero .note a { color: var(--ground-ink); }

@media (max-width: 720px) {
  .band { padding: var(--s64) var(--s16); }
  .band-hero { padding-top: var(--s32); }
}

/* --- Masthead ----------------------------------------------------------- */
.mark { display: block; width: 40px; height: 40px; border-radius: var(--r-ui); }
.masthead { display: flex; align-items: center; gap: var(--s12); margin-bottom: var(--s64); }
.masthead .wordmark { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.band-hero .masthead { margin-bottom: var(--s44); }
.band-hero .masthead .wordmark { color: var(--ground-ink); }
/* On the deep ground the icon's own green field merges with the band, so it
   gets a hairline of its own. A boundary is a hairline, never a shadow. */
.band-hero .mark { box-shadow: 0 0 0 1px var(--ground-line); }

.hero-head { max-width: 15ch; }
.hero-lede { margin-top: var(--s24); }

/* --- The two panels ----------------------------------------------------
   The page's primary action, and the only filled containers on the site.
   Two genuinely separate objects, which is the one thing the system
   reserves a box for. */
.panels { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s16); margin-top: var(--s44); }
@media (max-width: 720px) { .panels { grid-template-columns: 1fr; } }

.panel {
  display: flex; flex-direction: column; gap: var(--s6);
  background: var(--ground-panel); border: 1px solid var(--ground-panel);
  border-radius: var(--r-group); padding: var(--s24);
  text-decoration: none; min-height: 136px;
  transition: transform 160ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.panel-icon {
  display: block;
  fill: var(--ground-panel-ink);
  margin-bottom: var(--s8);
}
/* Optically matched, not mathematically. Chrome is a solid disc and carries
   more weight than the Apple mark at the same pixel size, so the disc is set
   a step smaller and the Apple mark a step larger to read as equal. */
.panel-icon.ic-chrome { width: 28px; height: 28px; }
.panel-icon.ic-apple  { width: 31px; height: 31px; }
.panel-name {
  font-size: clamp(20px, 2.6vw, 26px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1; color: var(--ground-panel-ink);
}
.panel-sub { font-size: 14.5px; font-weight: 500; color: var(--ground-panel-mute); }
.panel-state {
  margin-top: auto; display: inline-flex; align-items: center; gap: var(--s8);
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-muted);
}
/* A dot carrying real state (this listing is pending), not decoration. The
   word beside it says the same thing for anyone who cannot see colour. */
.panel-state::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: #96751A; flex: none; }
a.panel:hover { transform: translateY(-2px); }
a.panel:active { transform: translateY(0); }
a.panel .panel-state::before { background: #2E6B41; }

/* --- The ramp ----------------------------------------------------------
   The product's entire vocabulary as one object: five stops, the range, and
   the sentence each range stands for. No other review app has this, so it
   is what the page is built around. */
.ramp { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s8); margin-top: var(--s44); }
.stop { display: flex; flex-direction: column; gap: var(--s8); }
.stop-bar { height: 6px; border-radius: var(--r-rule); background: var(--stop-c); transform-origin: left center; }
.stop-n {
  font-size: clamp(22px, 3.4vw, 34px); font-weight: 700; letter-spacing: -0.04em;
  line-height: 1; color: var(--stop-c); font-variant-numeric: tabular-nums;
}
.stop-w { font-size: 13.5px; line-height: 1.35; color: var(--ink-muted); }
.stop.c00 { --stop-c: var(--score-00); }
.stop.c20 { --stop-c: var(--score-20); }
.stop.c40 { --stop-c: var(--score-40); }
.stop.c60 { --stop-c: var(--score-60); }
.stop.c80 { --stop-c: var(--score-80); }

/* The one authored moment: the five bars draw in left to right, the order
   the ramp is read in. Transform only; the no-script default is finished. */
.js .stop-bar { transform: scaleX(0); transition: transform 420ms cubic-bezier(0.2, 0.7, 0.3, 1); }
.js .ramp.shown .stop-bar { transform: scaleX(1); }
.js .ramp.shown .stop:nth-child(1) .stop-bar { transition-delay: 0ms; }
.js .ramp.shown .stop:nth-child(2) .stop-bar { transition-delay: 70ms; }
.js .ramp.shown .stop:nth-child(3) .stop-bar { transition-delay: 140ms; }
.js .ramp.shown .stop:nth-child(4) .stop-bar { transition-delay: 210ms; }
.js .ramp.shown .stop:nth-child(5) .stop-bar { transition-delay: 280ms; }

@media (max-width: 720px) {
  .ramp { grid-template-columns: 1fr; gap: 0; margin-top: var(--s32); }
  .stop {
    display: grid; grid-template-columns: 72px 1fr; align-items: center;
    column-gap: var(--s16); row-gap: var(--s8);
    padding: var(--s14) 0; border-bottom: 1px solid var(--hairline);
  }
  .stop:last-child { border-bottom: 0; }
  .stop-bar { grid-column: 1 / -1; height: 4px; }
  .stop-n { font-size: 26px; }
}

/* --- Steps -------------------------------------------------------------
   Not three equal cards. One wide item, then two beside it, so the eye gets
   an order rather than a menu. */
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s44); margin-top: var(--s44); }
.step:first-child { grid-column: 1 / -1; max-width: 54ch; }
.step:first-child h3 { font-size: clamp(21px, 2.9vw, 29px); letter-spacing: -0.03em; }
.step:first-child p { font-size: clamp(16px, 1.8vw, 18.5px); max-width: 52ch; }
.step:first-child .step-mark { width: 40px; }
.step h3 { color: var(--ink); }
.step p { color: var(--ink-muted); max-width: 42ch; margin: 0; }
.step-mark { width: 26px; height: 3px; border-radius: var(--r-rule); background: var(--brand); margin-bottom: var(--s14); }
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; gap: var(--s32); }
  .step:first-child { max-width: none; }
}

/* --- Statement ---------------------------------------------------------
   One sentence at display scale, carrying the claim that actually
   differentiates the product. Not a card, not a callout. Just scale. */
.statement {
  font-size: clamp(24px, 4.2vw, 40px); font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.14;
  max-width: 20ch; margin: 0; text-wrap: balance;
}
.statement + p { margin-top: var(--s24); }

/* --- Facts -------------------------------------------------------------- */
.facts { margin-top: var(--s44); border-top: 1px solid var(--hairline-hi); }
.fact { padding: var(--s20) 0; border-bottom: 1px solid var(--hairline-hi); }
.fact:last-child { border-bottom: 0; }
.fact h3 { margin-bottom: var(--s4); }
.fact p { color: var(--ink-muted); margin: 0; }
@media (min-width: 721px) {
  .fact { display: grid; grid-template-columns: 32ch 1fr; gap: var(--s32); align-items: start; }
  .fact h3 { margin-bottom: 0; }
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s8);
  font: 600 16px/1 Inter, sans-serif; letter-spacing: -0.01em;
  padding: 15px 22px; border-radius: var(--r-ui);
  border: 1px solid transparent; background: var(--accent); color: var(--accent-ink);
  text-decoration: none; cursor: pointer; transition: background-color 160ms ease-out;
}
.btn:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn.secondary { background: var(--field); color: var(--ink); border-color: var(--hairline-hi); }
.btn.secondary:hover { background: var(--sunken); }

/* --- Tags --------------------------------------------------------------- */
.tag {
  display: inline-block; padding: 5px 9px; border-radius: var(--r-tag);
  border: 1px solid var(--hairline-hi); background: var(--field);
  color: var(--ink-muted); font-size: 12.5px; font-weight: 500; white-space: nowrap;
}

/* --- Note --------------------------------------------------------------- */
.note {
  background: var(--sunken); border: 1px solid var(--hairline);
  border-radius: var(--r-group); padding: var(--s16) var(--s20);
  margin: var(--s24) 0; font-size: 15px; color: var(--ink-muted); max-width: var(--measure);
}
.note strong { color: var(--ink); }
.band-hero .note { background: transparent; border-color: var(--ground-line); color: var(--ground-mute); }
.band-hero .note strong, .band-hero .note a { color: var(--ground-ink); }

/* ========================================================================
   DOCUMENTS (privacy, terms, support, extension privacy, 404)
   Quiet on purpose. A policy is read, not looked at.
   ===================================================================== */
.page { max-width: var(--page); margin: 0 auto; padding: var(--s44) var(--s16) var(--s96); }
.page.narrow { max-width: 440px; }

.doc h1 { font-size: clamp(32px, 5.2vw, 46px); }
.doc h2 {
  font-size: clamp(19px, 2.6vw, 23px);
  margin-top: var(--s44); padding-top: var(--s20);
  border-top: 1px solid var(--hairline);
}
.doc h3 { margin-top: var(--s24); font-size: 17px; }
.doc h2 + h3 { margin-top: var(--s14); }
.doc ul { margin-bottom: var(--s16); }
.updated { color: var(--ink-muted); font-size: 14px; margin: 0 0 var(--s24); }

.actions { display: grid; gap: var(--s12); margin-top: var(--s32); }
.actions .btn { width: 100%; }

/* --- Footer ------------------------------------------------------------- */
footer:not(.band), .endmatter {
  margin-top: var(--s44); padding-top: var(--s20);
  border-top: 1px solid var(--hairline);
  font-size: 14px; color: var(--ink-muted);
}
footer:not(.band) nav, .endmatter nav {
  display: flex; flex-wrap: wrap; gap: var(--s6) var(--s16); margin-bottom: var(--s12);
}
footer:not(.band) a, .endmatter a { color: var(--ink-muted); }
footer:not(.band) a:hover, .endmatter a:hover { color: var(--ink); }
.band-hero .endmatter {
  border-top-color: var(--ground-line); color: var(--ground-mute); margin-top: var(--s64);
}
.band-hero .endmatter a { color: var(--ground-mute); }
.band-hero .endmatter a:hover { color: var(--ground-ink); }

/* --- Code --------------------------------------------------------------- */
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em; background: var(--sunken);
  border: 1px solid var(--hairline); border-radius: var(--r-tag);
  padding: 1px 5px; word-break: break-word;
}

/* --- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .js .stop-bar { transform: scaleX(1); }
}

.spaced-top { margin-top: var(--s44); }

/* --- Share landing ------------------------------------------------------
   The page the app itself sends people to, so it is one decision wide and
   sits on the brand ground rather than on a document page. */
.share-band { display: flex; align-items: center; min-height: 100dvh; }
.share-inner { max-width: 460px; }
.share-head { font-size: clamp(32px, 8vw, 46px); }
.share-band .actions { margin-top: var(--s44); }
/* On the deep ground the filled accent button would be green on green, so
   the primary action inverts: white ground, deep green label. */
.share-open { background: var(--ground-ink); color: var(--ground); }
.share-open:hover { background: var(--ground-mute); }
.share-band .btn.secondary {
  background: transparent; color: var(--ground-ink); border-color: var(--ground-edge);
}
.share-band .btn.secondary:hover { background: rgba(255, 255, 255, 0.08); }
.share-band footer { margin-top: var(--s44); }

/* The panels become <a class="panel"> when the listings go live. Pin the
   label colours so inheriting a link colour can never repaint them, and the
   swap stays a one-word edit. */
a.panel, a.panel:hover { color: inherit; text-decoration: none; }
a.panel .panel-name { color: var(--ground-panel-ink); }
a.panel .panel-sub, a.panel .panel-state { color: var(--ground-panel-mute); }
