/* Greedy site: the app's v3 look (src/design/tokens.ts), dark only.
 * Colours are pinned to the app tokens by src/design/__tests__/siteCssTokens.test.ts.
 * Karrik ships Regular only: hierarchy is size and colour, never weight (same rule as the app).
 * Fonts are self-hosted (both SIL OFL), so no page loads anything from another host. */

@font-face {
  font-family: "Karrik";
  src: url("/fonts/Karrik-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Cossette Titre";
  src: url("/fonts/CossetteTitre-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #000000;
  --surface: #212020;
  --glass: rgba(255,255,255,0.08);
  --glass-strong: rgba(255,255,255,0.12);
  --text: #FFFFFF;
  --text-2: rgba(255,255,255,0.48);
  --highlight: rgba(255,255,255,0.16);
  --lowlight: rgba(255,255,255,0.06);
  --bevel-top: rgba(255,255,255,0.12);
  --bevel-bottom: rgba(255,255,255,0.08);
  --glow: #FFFFFF;
  --brand: #FD4BED;
  --on-brand: #000000;
  --radius-artwork: 24px;
  --radius-container: 40px;
  --control-s: 56px;
  --ui: "Karrik", -apple-system, system-ui, sans-serif;
  --display: "Cossette Titre", "Karrik", -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--ui);
  font-weight: 400;
  font-synthesis: none;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
b, strong, h1, h2, h3 { font-weight: 400; }

/* The chassis: a card on the black canvas, like every app screen. */
.chassis {
  min-height: 100vh;
  min-height: 100svh;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
           max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  display: flex;
}
.card {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-container);
  box-shadow: inset 0 2px 2px var(--bevel-top), inset 0 -2px 2px var(--bevel-bottom);
  padding: 20px clamp(16px, 5vw, 40px) 28px;
  display: flex;
  flex-direction: column;
}
.card.center { text-align: center; align-items: center; }
.card.center > .body { margin: auto 0; max-width: 400px; width: 100%; }

.wm-link { display: block; align-self: center; line-height: 0; border-radius: 8px; }
.wm { width: 128px; height: auto; display: block; }

/* Feed Title: Cossette Titre + the neon glow (UI / Glow / Neon, white, radius 8). */
.neon {
  font-family: var(--display);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-shadow: 0 0 8px var(--glow);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
h1.neon { font-size: clamp(44px, 12vw, 88.89px); margin: clamp(40px, 10vh, 96px) 0 20px; }
.neon.long {
  font-size: clamp(32px, 7vw, 48px) !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  padding: 8px 4px;
  margin-left: -4px;
}
.card.center h1.neon { font-size: clamp(40px, 11vw, 56px); margin: 0 0 16px; }
.legal h1.neon { font-size: clamp(40px, 10vw, 64px); margin: 40px 0 12px; }

.lede { font-size: 20px; letter-spacing: -0.04em; color: var(--text-2); margin: 0 0 32px; max-width: 32em; }
.card.center .lede { margin: 0 auto 28px; }
.muted { color: var(--text-2); }
.small { font-size: 14px; color: var(--text-2); }

a { color: var(--text); text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* Glass card / rows (GLASS_CARD, LIST_ROW, TRACK_ROW). */
.glass {
  background: var(--glass);
  border-radius: var(--radius-artwork);
  box-shadow: inset 0 1px 1px var(--highlight), inset 0 -1px 1px var(--lowlight);
}
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; min-height: var(--control-s); padding: 12px 16px; }
.rank {
  flex: none;
  min-width: 32px;
  font-size: 48px;
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
}
.row .text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row .title, .row .meta { margin: 0; }
.row .title { font-size: 20px; line-height: 1.15; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.row .meta { font-size: 16px; line-height: 1.25; letter-spacing: -0.02em; color: var(--text-2); overflow-wrap: anywhere; }
.row .meta a { color: inherit; }

.note { padding: 16px; margin: 24px 0 0; font-size: 16px; color: var(--text-2); }
.note b { color: var(--text); }

/* Pill buttons (PILL_BUTTON: control S tall, space/24 sides, label Body/Meta 20). */
.btns { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-s);
  padding: 0 24px;
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.04em;
  text-decoration: none;
  text-align: center;
}
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-glass {
  background: var(--glass-strong);
  color: var(--text);
  box-shadow: inset 0 1px 1px var(--highlight), inset 0 -1px 1px var(--lowlight);
}
.btn-service { color: #FFFFFF; }

/* Legal pages: running text in the app's type, white for legibility. */
.legal .updated { margin: 0 0 32px; font-size: 16px; color: var(--text-2); }
.legal h2 { font-size: 28px; line-height: 1.05; letter-spacing: -0.04em; margin: 40px 0 12px; }
.legal p, .legal li { font-size: 17px; line-height: 1.5; color: rgba(255,255,255,0.86); max-width: 40em; }
.legal ul { padding-left: 20px; margin: 0 0 16px; }
.legal li { margin: 8px 0; }
.legal li::marker { color: var(--brand); }
.legal b { color: var(--text); }

footer { margin-top: auto; padding-top: 48px; font-size: 16px; color: var(--text-2); }
footer nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
/* Chip (CHIP: a glass pill a step below control S). */
footer nav a {
  text-decoration: none;
  color: var(--text);
  background: var(--glass);
  border-radius: 999px;
  padding: 12px 18px;
  line-height: 1;
  box-shadow: inset 0 1px 1px var(--highlight), inset 0 -1px 1px var(--lowlight);
}
.card.center footer nav { justify-content: center; }
footer p { margin: 0; }
.card.center footer { padding-top: 32px; }
