/* Coaster's look beyond its theme. /rer-theme.css holds only what rer's theme reader takes (the --rer-* theme tokens
   and the faces; pnpm run onboard reads it), so everything else Coaster's pages wear is here: Base's other --rer-*
   names, Coaster's own tokens and the rules that dress Base's pages. The root document, /setup and the run site's
   own pages (src/base/font-head.ts), and the Lobby and Base's Run, contract and not-found pages (the edition
   identity's fonts) link this file before the theme; the sign-in pages (src/auth.server.ts) and the development
   sign-in and hand-off pages (src/server.dev.ts) add it after their own style. It declares no face (the theme
   does): rer's demo host inlines this path and the theme into the hosted demo's gate, and no other file. */

/* Base's extra --rer-* names (the code card, the wordmark, the pill buttons) and Coaster's own tokens, defined once:
   the app (public/app), the run site (src/site/styles) and the rules below read them with the theme tokens. */
:root {
  --rer-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --rer-button-radius: 999px;
  --rer-code-background: #16191e;
  --rer-code-text: #eef3ea;
  --rer-wordmark-weight: 800;
  --rer-wordmark-tracking: -.04em;

  --ink: var(--rer-text);
  --body: #3d4450;
  --soft: #5b6270;
  --faint: #8a909c;
  --line: #e4e7eb;
  --line-strong: #d3d7dd;
  --row: #f4f6f8;
  --tile: #f1f3f5;
  --grid: rgba(20, 23, 27, .05);
  --kelly: #0e8a3a;
  --lime: #9dcc1a;
  --gradient: linear-gradient(90deg, #0e8a3a 0%, #2fa22f 45%, #9dcc1a 100%);
  --green: #1faf4a;
  --green-ink: #157a34;
  --mint: #e2f6e1;
  --mint-strong: #cdeecb;
  --red: #e5383b;
  --red-ink: #c4232a;
  --red-tint: #fdeaea;
  --amber: #f39c12;
  --amber-ink: #8a5a00;
  --amber-tint: #ffe7b3;
  --lime-pill: #cff493;
  --sun-pill: #ffe58a;
  --sticky: #fff7ae;
  --sticky-edge: #f3e58a;
  --roll: #fec326;
  --roll-cap: #e19c02;
  --mark-ink: #2e1d00;
  --button: #14171b;
  --button-hover: #000000;

  /* The app (owner pick J, 18 Oct 2026): the app's kelly-to-lime pair, used only on the one gradient tile and the
     decision button; a pale lime wash for that tile; hairline cards; green done, amber waiting, red failed. */
  --app-kelly: #1e9e3a;
  --app-lime: #9acd32;
  --app-gradient: linear-gradient(110deg, #138c3b 0%, #1e9e3a 30%, #9acd32 100%);
  --app-tile-wash: linear-gradient(110deg, #c2f5a1 0%, #e0fc91 100%);
  --app-tile-edge: #b7e98f;
  --app-active: #f0faf2;
  --app-active-ink: #0b6b2e;
  --app-hairline: #e3e7ec;
  --app-hairline-soft: #edf0f3;
  --app-field: #d5dae1;
  --app-label: #4d5461;
  --app-done: #e6f8e9;
  --app-done-ink: #0c6a2a;
  --app-done-mark: #12993f;
  --app-wait: #fff4dc;
  --app-wait-ink: #8a4f00;
  --app-wait-mark: #ef8a00;
  --app-fail: #ffebee;
  --app-fail-edge: #ffd9df;
  --app-fail-ink: #c8101f;
  --app-fail-mark: #d81b2c;
  --app-quiet: #eef0f3;
  --app-quiet-ink: #3d4450;
  --app-shadow: 0 4px 20px rgba(20, 23, 27, .025);
  /* The app's grid is fainter and finer than the homepage's paper grid, as the pick draws it. */
  --app-grid: linear-gradient(rgba(20, 23, 27, .018) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, rgba(20, 23, 27, .018) 1px, transparent 1px) 0 0 / 56px 56px, #fff;
  --app-title: #050505;

  --font-head: var(--rer-font-heading);
  --font-body: var(--rer-font-body);
  --font-mono: var(--rer-font-mono);
  --font-print: 'Courier Prime', 'Courier New', ui-monospace, monospace;
  --font-hand: Kalam, 'Comic Sans MS', cursive;

  --radius-card: 18px;
  --radius-chip: 999px;
  --shadow-card: 0 1px 2px rgba(20, 23, 27, .05), 0 14px 34px -18px rgba(20, 23, 27, .22);
  --shadow-float: 0 2px 4px rgba(20, 23, 27, .05), 0 22px 46px -22px rgba(20, 23, 27, .30);
  --paper-grid: linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 64px 64px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 64px 64px, #ffffff;
}

/* The product name wherever Base or the app sets it ("Coaster Dev", "Coaster Demo") keeps an open word space in its tight tracking. */
[data-rer-name] { word-spacing: .16em; }

/* Sign-in, confirmation and first-run setup: one white card on the grid paper, the lockup centred, the ink pill. */
html.rer-themed { min-height: 100%; background: var(--app-grid); background-attachment: fixed; }
html.rer-themed body { background: none; color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
html.rer-themed main { border: 1px solid var(--app-hairline); border-radius: 14px; box-shadow: var(--app-shadow), 0 18px 40px -28px rgba(20, 23, 27, .22); }
html.rer-themed .brand, html.rer-themed .rer-brand { justify-content: center; font: 800 30px/1 var(--font-head); letter-spacing: -.045em; color: var(--ink); }
html.rer-themed .brand::before, html.rer-themed .rer-brand::before { width: 38px; height: 38px; }
html.rer-themed [data-rer-name]::after { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--app-active); color: var(--app-active-ink); font: 600 12px/18px var(--font-body); letter-spacing: .02em; vertical-align: 6px; }
html.rer-themed h1 { font: 800 34px/1.08 var(--font-head); letter-spacing: -.04em; word-spacing: .17em; text-align: center; }
html.rer-themed label { color: var(--app-label); font-size: 14px; font-weight: 500; }
html.rer-themed input:not([type=checkbox]) { border: 1px solid var(--app-field); border-radius: 10px; }
html.rer-themed input:not([type=checkbox]):focus-visible { outline: none; border-color: var(--app-kelly); box-shadow: 0 0 0 3px rgba(30, 158, 58, .18); }
html.rer-themed input[type=checkbox] { accent-color: var(--app-kelly); }
html.rer-themed button, html.rer-themed .action { border-radius: 10px; background: var(--button); color: #fff; font-weight: 600; }
html.rer-themed button:hover, html.rer-themed .action:hover { background: var(--button-hover); }
html.rer-themed button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); }

/* Base's Run page (/run) and not-found page in the homepage's look: grid paper, heavy display type with a gradient
   second line where there is one, white step cards with hairlines, ink numerals and a dark code card. */
body:has(> main > .intro), body:has(> main > .hero) { background: var(--paper-grid); }
body:has(> main) .bar .brand span { font-weight: 800; letter-spacing: -.04em; }
body:has(> main) .bar nav { font-weight: 500; }
body:has(> main > .intro) h1, body:has(> main > .hero) h1 { font-weight: 850; letter-spacing: -.045em; word-spacing: .14em; }
body:has(> main > .intro) .step { border-radius: var(--radius-card); border-color: var(--line); background: #fff; box-shadow: var(--shadow-card); backdrop-filter: none; }
body:has(> main > .intro) .num { background: var(--ink); color: #fff; font-weight: 800; }
body:has(> main > .intro) .step h2 { font-weight: 800; letter-spacing: -.03em; word-spacing: .1em; }
body:has(> main > .intro) .code { background: var(--rer-code-background); }
/* Base's /contract page: its card headings keep the same open word spaces as the site's. */
body:has(#progress) h2 { word-spacing: .08em; }
/* The one-line start keeps the repository whole: on its own line, scrolling sideways where the line cannot fit. */
body:has(> main > .intro) .alt code { display: block; width: fit-content; max-width: 100%; margin: 6px 0 0; overflow-x: auto; white-space: normal; }
body:has(> main > .intro) .btn, body:has(> main > .hero) .btn { background: var(--button); }
body:has(> main) .bar .brand { font-size: 36px; gap: 10px; }
body:has(> main) .bar .brand img { width: 44px; height: 44px; margin-top: -4px; }
body:has(> main) .bar nav { font-size: 18px; }
@media (max-width: 760px) { body:has(> main) .bar .brand { font-size: 26px; gap: 7px; } body:has(> main) .bar .brand img { width: 32px; height: 32px; } body:has(> main) .bar nav { font-size: 15.5px; gap: 16px; } }
