@import './privacy-controls.css?build=1054';
@import url('/apps/web/select.css?build=1054');

/*
 * The site's palette. One file, four pages, no second copy.
 *
 * ## Why this exists
 *
 * `landing.css`, `login.css` and `legal.css` each carried the whole palette,
 * copied by hand, "and the copy is written down in `RUN.md`" — which is what
 * this repository says when it has decided to live with a duplication. That
 * decision held until update 81 made the marketing page dark-only and the other
 * two did not follow: a person went from a dark first page to a white sign-in
 * form, on any machine with a light system theme. Nothing failed, because three
 * files agreeing is not a thing a test was watching.
 *
 * The original argument against sharing is still right and this does not
 * contradict it: what must not be shared is a **layout**. `style.css` is ninety
 * kilobytes of panel chrome, `landing.css` is a page — and a sign-in form that
 * pulled either would pay for a features grid and a screenshot strip to get six
 * colours. What is shared here is only the colours, about forty declarations,
 * and every page that draws Flowi's chrome outside the editor links it.
 *
 * ## Why one theme, and why light
 *
 * The *editor* is where a theme choice belongs, because that is where somebody
 * works for hours (`docs/NEXT-SESSION.md` §0.2). Somebody reads a landing page
 * for ninety seconds and a sign-in form for twenty, and a site that renders in
 * two themes needs its product screenshots taken in two themes — which nobody
 * was ever going to maintain.
 *
 * Light since update 367, at the owner's word after reading pixso.net and
 * figma.com side by side: both are white pages with the product's dark chrome
 * shown *in* them, in a bezel with a shadow, and the contrast is what makes
 * the screenshots read as the product rather than as more page. The
 * screenshots stay dark — `tools/landing-shot.mjs` still opens the editor in
 * `colorScheme: 'dark'` — and the frame tokens below are what a dark picture
 * needs to sit on a white page: a shadow, not a lit rim.
 *
 * `color-scheme: light` is here rather than in each shell's `<meta>` so that
 * the browser's own furniture — scrollbars, the flash before first paint, the
 * autofill background Chromium paints into an `<input>` — matches on every
 * page from one place. The `<meta>` in each shell says the same thing, because
 * it is read before any stylesheet arrives and that first frame is the one
 * this is about.
 *
 * ## The editor is not here
 *
 * `apps/web/style.css` keeps its own light-plus-dark pair. It is the one
 * surface that will get a real switch, and pointing it at a dark-only file
 * would delete the light palette that already works — see §0.2, whose first
 * sentence is that the light theme is already written.
 */

:root {
  color-scheme: light;

  /* Legacy component names resolve to the approved public-site palette.
     Components using these names must not restore the earlier cool-blue theme. */
  --ink: var(--v-ink);
  --ink-soft: var(--v-muted);
  --ink-faint: var(--v-muted);

  /* Surfaces, lightest first. `--paper` is the page; a card sits on it in
     `--paper-raised`; `--paper-tint` is a band of section that is *not* a card
     and must not read as one; `--paper-lift` is the small chip or well inside a
     card, which needs to be darker than the card it is in. */
  --paper: var(--v-paper);
  --paper-raised: var(--v-control-paper);
  --paper-tint: var(--v-warm);
  --paper-lift: var(--v-community-surface);

  /* Edges. `--line` is a border somebody should see; `--line-soft` divides two
     regions without drawing attention to the division. */
  --line: var(--v-line);
  --line-soft: var(--v-line);

  /* The blue. `--accent-ink` is what goes *on* the accent: white on this blue
     is 5.6:1, which passes at every text size — the dark page needed a dark
     ink on a paler blue for the same reason, and the pair moved together. */
  --accent: var(--v-blue);
  --accent-deep: var(--v-blue-dark);
  --accent-ink: #ffffff;
  --accent-wash: var(--v-blue-wash);

  /* The second hue a gradient runs to. Only decoration — a headline's word, a
     bloom behind the hero — and one token so the two pages that draw one
     agree. */
  --accent-alt: #7c4dff;

  /* Something went wrong. Only the sign-in page uses it, and it lives here
     because the next page that needs one must not invent a second red. */
  --danger: #d93025;
  /* Small error text needs darker ink than a warning tint or border. */
  --danger-ink: var(--v-community-bug-ink);

  /* The letter inside the mark, which is a hole in a solid shape rather than a
     colour: it has to be the page under it. */
  --mark-ink: var(--v-paper);

  /* The bezel a product screenshot sits in. Only the marketing page draws one,
     and it is here rather than there because a page sheet declares no colours —
     see `browser-safety.test.ts`.

     The screenshots are dark and the page is light, so the frame is a
     *shadow*: a dark picture on white already has edges, and what it needs is
     to sit slightly above the page rather than to be outlined. The face is a
     hair darker than the page so the bezel reads as an object. */
  --frame-face: var(--v-dark);
  --frame-line: color-mix(in srgb, var(--v-ink) 12%, transparent);
  --frame-glow: color-mix(in srgb, var(--v-blue) 16%, transparent);

  /* Depth, in two sizes: a card at rest, and a card lifted under the pointer. */
  --shadow-card: none;
  --shadow-lift: none;
  --shadow-frame: var(--v-shadow);

  --radius: var(--v-radius);
  --radius-small: var(--v-control-radius);
  --radius-large: var(--v-radius);

  /* How wide a column of this site gets. Only the marketing page has one. */
  --page: var(--v-container);

  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
}

/* Marketing art direction: shared values, isolated from the application's themes. */
:root {
  --v-paper: #f9f8f4;
  --v-ink: #20211f;
  --v-muted: #60615b;
  --v-line: #deded6;
  --v-blue: #2448ed;
  --v-blue-dark: #1634bb;
  --v-orange: #f14e31;
  --v-warm: #f2dfce;
  --v-citron: #e9efad;
  --v-dark: #202322;
  --v-dark-soft: #303431;
  --v-on-dark: #f5f5ee;
  --v-on-dark-muted: #bfc4bb;
  --v-graph-line: #656d5e;
  /* Named-cursor demo: white labels retain contrast on every capture. */
  --v-peer-blue: #2849df;
  --v-peer-orange: #b93819;
  --v-peer-purple: #7640be;
  --v-space-1: 8px;
  --v-space-2: 16px;
  --v-space-3: 24px;
  --v-space-4: 32px;
  --v-space-6: 48px;
  --v-space-8: 64px;
  --v-space-12: 96px;
  --v-space-16: 128px;
  --v-container: 1600px;
  --v-radius: 8px;
  --v-control-radius: 4px;
  --v-control-height: 48px;
  --v-header-height: 80px;
  --v-fast: 140ms;
  --v-normal: 280ms;
  --v-slow: 650ms;
  --v-ease: cubic-bezier(.22, 1, .36, 1);
  --v-shadow: 0 24px 60px #20211f16, 0 2px 8px #20211f12;
}

/* Method badges in the developer reference retain readable white labels. */
:root {
  --v-method-get: #146246;
  --v-method-change: #805513;
}

/* Community controls use the same named marketing palette as the page. */
:root {
  --v-control-paper: #fff;
  --v-blue-wash: #e9edff;
  --v-community-surface: #f0efe9;
  --v-community-bug-ink: #af3624;
  --v-community-bug-paper: #fce7e0;
}
.v-community, .v-changelog {
  --ink: var(--v-ink); --ink-soft: var(--v-muted); --ink-faint: var(--v-muted);
  --paper: var(--v-paper); --paper-raised: var(--v-paper); --paper-tint: var(--v-warm);
  --paper-lift: var(--v-paper); --line: var(--v-line); --line-soft: var(--v-line);
  --accent: var(--v-blue); --accent-deep: var(--v-blue-dark); --accent-wash: var(--v-blue-wash);
}

/* Public workbench texture; editor/admin themes remain independent. */
:root {
 --site-grid: radial-gradient(circle at 1px 1px, #60718c15 1px, transparent 1.2px), linear-gradient(#61708b06 1px, transparent 1px), linear-gradient(90deg,#61708b06 1px,transparent 1px);
 --site-grid-size: 20px 20px,100px 100px,100px 100px;
 --site-panel: #ffffff;
 --site-field: #f0f2f5;
 --site-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Root aliases resolve together for public surfaces only; admin and editor retain their palette. */
:root:has(>body.landing),:root:has(>body.login),:root:has(>body.legal) {
 --v-paper:#f5f7f9; --v-ink:#20242c; --v-muted:#5d6675; --v-line:#dce1e8;
 --v-warm:#e8edf3; --v-citron:#dde7f0; --v-dark:#20242c; --v-dark-soft:#303742;
}
