/* POKUT ON THE WEB. One stylesheet, no build step, no dependency, no webfont.
 *
 * EVERY NUMBER IN THIS FILE IS READ OUT OF THE PRODUCT, not approximated by eye. The colours are
 * `packages/mobile-app/global.css`, the washes and radii are `components/ui/surfaces.ts`, the type
 * scale is global.css's own, and `scripts/site-matches-the-app.sh` fails if the colours here stop
 * agreeing with the app's. That gate is the only reason it is honest to hand-copy them.
 *
 * DARK ONLY, because the app is: `app.config.js` sets `userInterfaceStyle: 'dark'` and
 * `UIUserInterfaceStyle: 'Dark'`, and `design/system/README.md` says the canvas these drawings came
 * from is dark and the light scheme is its counterpart. The LIGHT values are not discarded -- they
 * are at the bottom of this file, in `@media print`, so a privacy policy somebody prints comes out
 * black on white instead of costing them a cartridge.
 *
 * NO WEBFONT, AND THAT IS A DECISION RATHER THAN A SHORTCUT. `design/system/tokens.json` names
 * Instrument Sans for display type, and the repository ships no font file -- so honouring it would
 * mean fetching one from a third party, on the two pages whose whole claim is that they load
 * nothing from anybody. The `sans` token is the one that stays. */

/* ---------------------------------------------------------------------------------------------
 * THE SIXTEEN COLOUR TOKENS, dark values, from global.css's `prefers-color-scheme: dark` block.
 * `--danger` and `--danger-fg` are declared and USED NOWHERE, deliberately: danger means a
 * REFUSAL -- "the thing you asked for did not happen" -- and never a debt. There is no refusal on
 * a landing page, so there is no red on it. Do not reach for it to make a legal heading look grave.
 * ------------------------------------------------------------------------------------------- */
:root {
  --surface: #05050A;
  --surface-muted: #121218;
  --text: #F2F2F7;
  --text-muted: #9A9AAE;
  --border: #26262E;
  --accent: #47E6FF;
  --accent-fg: #05050A;
  --danger: #FF5470;
  --danger-fg: #1A0008;
  --placeholder: #757589;
  --credit: #4BFFB3;
  --price: #FFC24B;
  --authority: #FF4FD8;
  --delegate: #47E6FF;
  --glass: #0D2027;
  --glass-border: #298191;

  /* THE TYPE SCALE, raised on the user's word that "the fonts in general are rather small" -- px
   * and not rem, for global.css's own reason: a phone has no root font size to be a fraction of. */
  --text-xs: 14px;
  --text-sm: 15px;
  --text-base: 17px;
  --text-lg: 20px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 32px;
  --text-4xl: 40px;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* THE WASHES, from `surfaces.ts`. Every surface in this design is a tint of `--text` over the
   * ground rather than an opaque card, which is what lets the hero's glow show THROUGH a card
   * instead of stopping at it. `tintOf(#F2F2F7, a)` is rgba(242,242,247,a). */
  --wash-card: rgba(242, 242, 247, 0.055);
  --wash-quiet: rgba(242, 242, 247, 0.035);
  --wash-control: rgba(242, 242, 247, 0.06);
  --wash-note: rgba(242, 242, 247, 0.03);
  --wash-face: rgba(242, 242, 247, 0.05);
  --hair-card: rgba(242, 242, 247, 0.1);
  --hair-card-top: rgba(242, 242, 247, 0.17);
  --hair-quiet: rgba(242, 242, 247, 0.07);
  --hair-row: rgba(242, 242, 247, 0.08);
  --hair-control: rgba(242, 242, 247, 0.14);
  --hair-note: rgba(242, 242, 247, 0.14);
  --ring-face: rgba(242, 242, 247, 0.12);
}

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

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

body {
  margin: 0;
  position: relative;
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 24px;
  /* The ground is near-black rather than pure black for global.css's stated reason: 21:1 reads as
   * glare at the sizes a balance is set in. */
}

a { color: var(--accent); text-decoration-color: rgba(71, 230, 255, 0.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

/* ---------------------------------------------------------------------------------------------
 * TYPE
 * ------------------------------------------------------------------------------------------- */

h1, h2, h3 { font-weight: 600; margin: 0; }
h1 { font-size: var(--text-4xl); line-height: 46px; letter-spacing: -0.02em; }
h2 { font-size: var(--text-2xl); line-height: 34px; letter-spacing: -0.02em; }
h3 { font-size: var(--text-lg); line-height: 26px; }

p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

/* THE SMALL UPPERCASE LABEL, declared once -- `surfaces.ts`'s `A_LABEL` plus
 * `THE_LABELS_TRACKING`. Nine places in the app drew this and no two agreed; there is one of it
 * here from the start. */
.label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.1px;
  margin: 0;
}

.muted { color: var(--text-muted); }
.lede { font-size: var(--text-xl); line-height: 30px; color: var(--text-muted); }
.small { font-size: var(--text-sm); line-height: 21px; }

/* ---------------------------------------------------------------------------------------------
 * LAYOUT. Separation is a BORDER, never a shadow -- the system's own rule. Shadows in this file
 * are glows, which is a different job: they light the ground, they do not divide anything.
 * ------------------------------------------------------------------------------------------- */

.page { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.prose { max-width: 680px; }

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}
.masthead nav { display: flex; gap: 20px; font-size: var(--text-sm); }
.masthead nav a { color: var(--text-muted); text-decoration: none; }
.masthead nav a:hover { color: var(--text); }

section { padding: 40px 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: 0; }

/* THE LOCKUP, proportioned from `components/brand/Lockup.tsx`: the wordmark's size is the mark's
 * 0.17, its line height equals its size, its tracking is 0.15em, and it sits 6px below the mark
 * when stacked. Here it sits BESIDE the mark, which is the `mark-beside-label` size the app also
 * uses, so the proportions come from the same two numbers. */
.lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.lockup img { display: block; width: 36px; height: 36px; }
.wordmark {
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--delegate);
}

/* ---------------------------------------------------------------------------------------------
 * THE HERO AND ITS GROUND
 *
 * `NeonGround` is SVG in the app and stays SVG here -- the three washes and the eight stars are
 * inline in the page, on the artboard's own 390x844 viewBox with `preserveAspectRatio="none"`, so
 * the ellipses stretch with the viewport exactly as they stretch with a taller phone.
 * ------------------------------------------------------------------------------------------- */

.hero { border-top: 0; }

/* THE GROUND BELONGS TO THE PAGE, NOT TO THE HERO, which is what the app does: `Screen.tsx`
 * renders `NeonGround` behind the WHOLE screen and every screen gets it by being a screen. Clipped
 * to a hero instead, the amber wash ends in a horizontal seam across the page -- tried, and it
 * read as a band rather than as light. */
.hero-ground {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1200px;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  /* THE THREE WASHES. Colours and the 0.86 cut-off are `NeonGround`'s own stops; the geometry
   * follows the look the app SHIPS rather than the CSS it was ported from -- blooms higher and
   * tighter, the cyan centred near the top edge instead of a fifth of the way down. The component's
   * header records that both were shown on a device and this one was chosen, so this is the one to
   * match. Drawn in CSS because `rx`/`ry` on an SVG gradient is a react-native-svg extension no
   * browser implements; see the note in index.html.
   *
   * ORDER MATTERS: pink is painted over cyan, as in the app, so the two mix where they overlap. */
  /* IN PIXELS AND NOT PERCENTAGES, which is the app's own behaviour rather than a web habit: the
   * blooms are a fixed size on a 390-point board and are WIDER THAN THE BOARD -- the cyan's
   * horizontal radius is the full board width. A percentage would make them grow with a desktop
   * window and turn the page lilac. */
  background:
    radial-gradient(820px 360px at 22% 170px, rgba(255, 79, 216, 0.26), transparent 86%),
    radial-gradient(900px 290px at 50% 120px, rgba(71, 230, 255, 0.22), transparent 86%),
    radial-gradient(700px 250px at 18% 950px, rgba(255, 194, 75, 0.12), transparent 86%);
}
.hero-inner { padding: 56px 0 64px; text-align: center; }
/* THE MARK'S GLOW, PUT BACK AS A FILTER AFTER BEING TAKEN OUT OF THE ARTWORK.
 *
 * `scripts/site-mark.ts` removes the two full-board washes the app's logo.svg carries, because an
 * `<img>` is a rectangle and they filled it -- the mark arrived with a square of colour around it.
 * These two stops are those same two washes, in the same two colours, restored as `drop-shadow`:
 * a filter follows the artwork's ALPHA, so the light pools around the medallion's circle instead
 * of squaring off at the box. `surfaces.ts` records the same reasoning for `anIconLitBy`, which is
 * a filter and not a boxShadow for exactly this.
 *
 * CYAN TIGHT AND MAGENTA WIDE, which is the order the artwork drew them in: `rimBloom` was the
 * cyan ring and `underGlow` the magenta wash beneath it. */
.hero img.mark {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 auto 28px;
  filter:
    drop-shadow(0 0 18px rgba(71, 230, 255, 0.28))
    drop-shadow(0 0 60px rgba(255, 79, 216, 0.22));
}

/* The masthead and footer marks get a much tighter version of the same light -- at 36px and 28px a
 * 60px bloom is a haze around a logo rather than a glow on one. */
.lockup img { filter: drop-shadow(0 0 8px rgba(71, 230, 255, 0.3)); }
.hero h1 { max-width: 15em; margin: 0 auto 20px; }
.hero .lede { max-width: 30em; margin: 0 auto; }
.hero .means { margin-top: 20px; font-size: var(--text-sm); color: var(--text-muted); }

/* ---------------------------------------------------------------------------------------------
 * THE STORE BADGES.
 *
 * APPLE'S AND GOOGLE'S OWN ARTWORK, DOWNLOADED AND COMMITTED, not redrawn. Both companies'
 * guidelines require their supplied badge rather than a lookalike, and a hand-built replica would
 * be the one thing on this page with no upstream to be checked against. They are served from this
 * origin rather than hot-linked, so the page still loads nothing from a third party -- which is a
 * claim the privacy policy makes and this must not quietly falsify.
 *
 * EQUAL HEIGHT, UNEQUAL WIDTH, and that is correct rather than a misalignment: Apple's badge box is
 * 119.66 x 40 and Google's is 564 x 168, so at one height they come out 161px and 181px wide. Every
 * app site in the world shows them this way, because the alternative is distorting one of them.
 *
 * 54px IS THE APP'S OWN COMMITTING-CONTROL HEIGHT (`h-[54px]` on the sign-in screen's primary
 * button), which is the nearest thing this page has to the gesture a badge performs.
 *
 * THE GAP IS CLEAR SPACE AND NOT TASTE. Both guidelines ask for a quarter of the badge's height
 * free on every side; at 54px that is 13.5px, so 16px between them and 16px of margin clears both.
 * ------------------------------------------------------------------------------------------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}
.hero .stores { justify-content: center; }

.store { display: block; text-decoration: none; }
.store img {
  display: block;
  height: 54px;
  width: auto;
}
/* BIGGER IN THE HERO, because that is the one place on the page where getting the app is the
 * whole point. 64px keeps the clear space below satisfied by the same 16px gap. */
.hero .store img { height: 64px; }
.store:hover img { opacity: 0.86; }

/* BOTH BADGES ARE LINKS, AND THE PLAY ONE DOES NOT RESOLVE YET -- the user's instruction of
 * 2026-11-04, "do it even though it does not work today, will fix later". There was a
 * `.store-soon` modifier here that drew a COMING SOON caption instead; it is deleted rather than
 * left unused, for the same reason `.pill` below is. The state of the Android listing is recorded
 * in the comment above the markup in index.html, which is where somebody wondering about it will
 * be standing. */

/* THERE IS NO BUTTON ON THIS PAGE, and there was one until the store badges arrived. It was
 * `A_QUIET_CONTROL` -- outlined, never filled, because D-7 reserves the one FILLED accent control
 * for the thing that COMMITS and a landing page has nothing to commit. The badges replace it
 * outright rather than sitting beside it: two ways to get the same app is a choice nobody wants to
 * make, and Apple's and Google's artwork is more recognisable than anything this file could draw.
 * The rule is deleted rather than left unused -- a stylesheet with no build step has no tree
 * shaking, so dead CSS here is dead weight that ships. */

/* ---------------------------------------------------------------------------------------------
 * THE SURFACES, from `surfaces.ts`, with the one piece of the canvas's glass that survives having
 * no backdrop filter: A LIT TOP RIM, brighter than the other three edges, which is what says "this
 * pane is tilted into the light".
 * ------------------------------------------------------------------------------------------- */

.card {
  background: var(--wash-card);
  border: 1px solid var(--hair-card);
  border-top-color: var(--hair-card-top);
  border-radius: 20px;
  padding: 24px;
}

.quiet-card {
  background: var(--wash-quiet);
  border: 1px solid var(--hair-quiet);
  border-radius: 14px;
  padding: 20px;
}

.note {
  background: var(--wash-note);
  border: 1px dashed var(--hair-note);
  border-radius: 16px;
  padding: 20px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--wash-quiet);
  border: 1px solid var(--hair-row);
  border-radius: 12px;
  padding: 10px 14px;
}

.cards { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.cards h3 { margin-bottom: 8px; }
.cards p { font-size: var(--text-sm); line-height: 22px; color: var(--text-muted); }

/* ---------------------------------------------------------------------------------------------
 * THE MOCK OF THE APP, built from the real primitives rather than screenshotted.
 *
 * THE DIRECTION IS IN THE WORDS AND NOT IN A COLOUR, which is the system's sharpest rule: a
 * balance reads YOU OWE or YOU ARE OWED beside the figure, and no figure here is red. The glow
 * behind the big one is `aFigureLitBy` -- the GLYPHS glow, in the colour of what the figure means,
 * while the figure itself stays `--text`.
 * ------------------------------------------------------------------------------------------- */

.standing { text-align: center; padding: 8px 0 4px; }
.figure {
  display: block;
  margin: 10px 0 0;
  font-size: var(--text-4xl);
  line-height: 46px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  /* `aFigureLitBy(--price)`: one stop, the wider of the canvas's two, at an opacity between them. */
  text-shadow: 0 0 48px rgba(255, 194, 75, 0.28);
}
.figure-credit { text-shadow: 0 0 48px rgba(75, 255, 179, 0.28); }

/* `A_TILE` -- the small figures under the standing, which the canvas draws as their own small card
 * rather than as bare text in a row. */
.tiles { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 20px; }
.tile {
  background: var(--wash-quiet);
  border: 1px solid var(--hair-row);
  border-radius: 14px;
  padding: 14px;
}
.tile .amount {
  display: block;
  margin-top: 6px;
  font-size: var(--text-xl);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* `aWordLitBy(colour)` COLOURS the word, which is the other of the two figure treatments. */
.in-credit { color: var(--credit); text-shadow: 0 0 27px rgba(75, 255, 179, 0.225); }
.at-price { color: var(--price); text-shadow: 0 0 27px rgba(255, 194, 75, 0.225); }

.ranking { display: grid; gap: 8px; margin-top: 20px; }
.ranking .who { flex: 1; }
.ranking .owes { font-variant-numeric: tabular-nums; color: var(--text-muted); }

/* THE AVATAR'S OWN DISC, `A_FACE`: a 0.05 wash with a 0.12 ring, so a face sits on the same wash
 * on every surface rather than on whatever each row happened to pass. The disc is CSS and the face
 * inside it is drawn by `cast.js`, which means a page with JavaScript off shows empty discs and
 * loses nothing it needed. */
.face {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--wash-face);
  box-shadow: inset 0 0 0 2px var(--ring-face);
  overflow: hidden;
}
.face svg { display: block; }

/* `aRowTintedBy(--delegate)` -- a row painted in what it MEANS, for the viewer's own line. A 0.12
 * fill over a 0.43 hairline, lit at a row's scale by `aRowLitBy`. This is what replaced a solid
 * `bg-accent` in the app: a row is never a button. */
.row-mine {
  background: rgba(71, 230, 255, 0.12);
  border-color: rgba(71, 230, 255, 0.43);
  box-shadow: 0 0 18px 6px rgba(71, 230, 255, 0.16), 0 0 190px 56px rgba(71, 230, 255, 0.1);
}

/* ---------------------------------------------------------------------------------------------
 * THE BADGES. `aBadgeTintedBy(colour)`: a 0.13 fill over a 0.3 hairline, fully rounded. A role's
 * colour is not decorative -- `authority` runs the group, `delegate` may record but not run it,
 * and somebody with neither GETS NO COLOUR. That last one is why `.badge-plain` exists.
 * ------------------------------------------------------------------------------------------- */

.roles { display: grid; gap: 14px; }
.role { display: flex; align-items: baseline; gap: 14px; }
.badge {
  flex: none;
  min-width: 92px;
  text-align: center;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.1px;
}
.badge-authority { background: rgba(255, 79, 216, 0.13); border-color: rgba(255, 79, 216, 0.3); color: var(--authority); }
.badge-delegate { background: rgba(71, 230, 255, 0.13); border-color: rgba(71, 230, 255, 0.3); color: var(--delegate); }
.badge-plain { background: var(--wash-control); border-color: var(--hair-control); color: var(--text-muted); }
.role p { font-size: var(--text-sm); line-height: 22px; color: var(--text-muted); margin: 0; }

/* ---------------------------------------------------------------------------------------------
 * THE POLICY PAGES
 * ------------------------------------------------------------------------------------------- */

.doc { padding: 24px 0 64px; }
.doc h1 { font-size: var(--text-3xl); line-height: 38px; margin-bottom: 12px; }
.doc h2 { font-size: var(--text-xl); line-height: 28px; margin: 36px 0 12px; }
.doc .effective { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 28px; }
.doc ul { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc .quiet-card { margin: 24px 0; }
.doc .quiet-card h3 { margin-bottom: 8px; }
.doc dl { margin: 0 0 16px; }
.doc dt { font-weight: 600; margin-top: 16px; }
.doc dd { margin: 4px 0 0; color: var(--text-muted); }

.foot {
  border-top: 1px solid var(--border);
  padding: 28px 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--text-muted); }

/* ---------------------------------------------------------------------------------------------
 * NARROW. 390px is the artboard every one of these drawings was composed on, so it is the width
 * worth being right at rather than a breakpoint picked off a list.
 * ------------------------------------------------------------------------------------------- */

@media (max-width: 640px) {
  h1 { font-size: var(--text-3xl); line-height: 38px; }
  .hero-inner { padding: 36px 0 44px; }
  .hero img.mark { width: 104px; height: 104px; margin-bottom: 22px; }
  .lede { font-size: var(--text-lg); line-height: 28px; }
  .cards { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .role { display: block; }
  .badge { display: inline-block; min-width: 0; margin-bottom: 8px; }
  section { padding: 32px 0; }
}

/* ---------------------------------------------------------------------------------------------
 * PRINT: THE LIGHT SCHEME, which is the other half of every one of the sixteen tokens rather than
 * an invention. Somebody who prints the privacy policy should get black on white -- and the light
 * values exist precisely because none of the canvas's four neons is legible as text on white
 * (#4BFFB3 on #FFFFFF is 1.5:1).
 *
 * The washes become flat greys here: a 5%-white tint over near-black is a surface, and the same
 * tint over paper is nothing at all.
 * ------------------------------------------------------------------------------------------- */

@media print {
  :root {
    --surface: #FFFFFF;
    --surface-muted: #F4F4F5;
    --text: #18181B;
    --text-muted: #52525B;
    --border: #D4D4D8;
    --accent: #1D4ED8;
    --accent-fg: #FFFFFF;
    --danger: #B42318;
    --danger-fg: #FFFFFF;
    --placeholder: #6E6E78;
    --credit: #065F46;
    --price: #92400E;
    --authority: #86198F;
    --delegate: #155E75;
    --glass: #E4EAFA;
    --glass-border: #829EE9;

    --wash-card: #F4F4F5;
    --wash-quiet: #F4F4F5;
    --wash-control: #F4F4F5;
    --wash-note: #FFFFFF;
    --wash-face: #F4F4F5;
    --hair-card: #D4D4D8;
    --hair-card-top: #D4D4D8;
    --hair-quiet: #D4D4D8;
    --hair-row: #D4D4D8;
    --hair-control: #D4D4D8;
    --hair-note: #D4D4D8;
    --ring-face: #D4D4D8;
  }
  body { background: #FFFFFF; color: #18181B; font-size: 11pt; line-height: 1.5; }
  .hero-ground, .masthead nav, .stores { display: none; }
  .figure, .in-credit, .at-price, .row-mine { text-shadow: none; box-shadow: none; }
  .hero img.mark, .lockup img { filter: none; }
  .row-mine { background: #F4F4F5; border-color: #D4D4D8; }
  a { color: #18181B; }
  .doc h2 { page-break-after: avoid; }
}
