/* Encore's design system: colours, type, surfaces and buttons shared by every page.
   Loaded before each page's own stylesheet.
   Look: "Thermal" (Kevin's pick, 2026-11-08), like a heat camera. The three brand colours,
   black #02070A, blue #0297DE and orange #FC734D, become one heat scale from cold to hot.
   Heat glows behind the page, panel edges run warm, the main button is the scale itself,
   and a warm spot follows the mouse over panels and buttons (heat.js). Panels are frosted
   glass with a sensor-like grain. Orange marks what you act on or what's live, blue carries
   information (links, charts, times), green and rose are for scores. One brand look, so
   the old colour and background pickers are gone. */

:root {
  color-scheme: dark;
  /* Blue: links, charts, times, structure */
  --main: #0297de;
  --deep: #035e8b;          /* tags with white text: passes 4.5:1 */
  --tint: rgba(2, 151, 222, 0.14);
  /* The heat scale: cold blue up to white-hot peach. */
  --heat: linear-gradient(90deg, #035e8b, #0297de 30%, #fc734d 72%, #ffcdb5);
  --bar: rgba(2, 7, 10, 0.6); /* top bar glass */
  /* Orange: the main action, live states, the word being discussed */
  --accent: #fc734d;
  --accent-deep: #b2401f;   /* button edge */
  --accent-ink: #fd8a6a;    /* orange text on glass */
  --accent-text: var(--accent-ink);
  --accent-mark: #fc734d;   /* dots, underlines, lights */
  --accent-tint: rgba(252, 115, 77, 0.18);
  --on-accent: #02070a;     /* the brand black on the orange button: about 7:1 */
  /* Score bands. Low is rose, not red, so it never reads as the orange. */
  --good: #4fd19a;
  --bad: #f25c7e;
  /* Black and glass */
  --bg: #02070a;
  --card: rgba(6, 16, 22, 0.82); /* nearly solid, so the heat glow behind barely shows through */
  --solid: #0b151c;         /* menus and dialogs: glass that needs to be readable over anything */
  --ink: #eef5f9;
  --ink-2: #9aabb8;         /* secondary text: passes 4.5:1 on the page and on glass */
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --wash: rgba(255, 255, 255, 0.06);
  --highlight: var(--accent-tint);        /* filler words */
  --highlight-strong: var(--accent-mark);
  /* Type (Nithik's call, 2026-11-04): one font for everything, Sofia Sans Semi Condensed (the practice
     card's font), so all three tokens point at it. Only the Home / Practice / Progress tabs use Noto Sans
     (--font-nav). Weights and sizes are in type.css. Digits are fixed-width (tabular-nums on body),
     so a running timer doesn't jitter. */
  --font-display: "Sofia Sans Semi Condensed", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: var(--font-display);
  --font-mono: var(--font-display);
  --font-nav: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-card: 20px;
  --radius-inner: 12px;
  /* Glass: a lit top edge, a faint rim all round, and a soft drop. */
  /* A faint warm wash at the top of each panel, cooling to blue. */
  --glass-fill: linear-gradient(180deg, rgba(252, 115, 77, 0.07), rgba(2, 151, 222, 0.04) 40%, transparent 70%);
  /* Panel edges: a warm top line, a cool blue rim and a soft orange glow. */
  --shadow-card: inset 0 1px 0 rgba(252, 115, 77, 0.55), inset 0 0 0 1px rgba(2, 151, 222, 0.22), 0 0 40px -18px rgba(252, 115, 77, 0.45), 0 24px 48px -28px rgba(0, 0, 0, 0.75);
  --shadow-float: inset 0 1px 0 rgba(252, 115, 77, 0.5), inset 0 0 0 1px rgba(2, 151, 222, 0.25), 0 18px 40px -16px rgba(0, 0, 0, 0.7);
  /* Fine grain: light specks for glass and the page, dark specks for the orange button and paper. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.05 0 0 0 0 0 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-light: var(--grain);
}

*,
*::before,
*::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* The page: brand black with grain, and two heat glows that stay put while you scroll: a
   hot spot in the top right corner and a cool blue one in the bottom left. The glows are
   their own layer (body::before) fixed to the window. Painting them as a "fixed" page
   background instead made Chrome repaint the whole screen on every step of scrolling,
   which is what made the page lag. A layer that never changes is drawn once and reused. */
body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: clip; /* the top bar's band reaches past the page column */
  background: var(--grain), var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(24.5% 32.5% at 84% 9%, rgba(255, 205, 181, 0.21), rgba(252, 115, 77, 0.3) 32%, rgba(2, 151, 222, 0.16) 63%, transparent 83%),
    radial-gradient(40% 50% at 8% 92%, rgba(2, 151, 222, 0.34), rgba(3, 94, 139, 0.2) 50%, transparent 80%);
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-mark); outline-offset: 3px; }
::selection { background: rgba(252, 115, 77, 0.35); }
.muted { color: var(--ink-2); }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums lining-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--wash);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  font: 500 11px/1.6 var(--font-mono);
  text-align: center;
}

/* ---------- Header ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
/* The "on air" light. */
.wordmark::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--heat); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5); }
/* Page tabs: a glass pill with the current page raised inside it. */
.nav-pills {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav-pills a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.nav-pills a:hover { color: var(--ink); }
.nav-pills a[aria-current="page"] {
  color: var(--ink);
  background: var(--grain), linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  box-shadow: inset 0 -2px 0 #fc734d, inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 10px -2px rgba(252, 115, 77, 0.5);
}

/* ---------- Heat under the mouse ----------
   A warm glow follows the mouse anywhere on the page, like a heat camera tracking your hand.
   It's one round light laid over the whole page (heat.js adds it and moves it). It can't
   be clicked, so everything under it still works. It's faint enough to blend normally (a
   special blend mode made the browser recombine the whole page every time it moved), and
   will-change keeps it on its own layer, so moving it is cheap. The orange and glass buttons also get
   a smaller hot spot of their own (--mx, --my, see the buttons below). */
.heat-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9000;
  width: 424px;
  height: 424px;
  margin: -212px 0 0 -212px; /* so its centre sits on the mouse */
  border-radius: 50%;
  background: radial-gradient(circle closest-side, rgba(252, 115, 77, 0.16), rgba(2, 151, 222, 0.05) 45%, transparent 70%);
  pointer-events: none;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.3s;
}
.heat-glow[data-on="true"] { opacity: 1; }

/* ---------- Surfaces ----------
   Panels are nearly solid (--card is 82% opaque), so they don't blur what's behind them:
   the blur barely showed, but the browser had to redo it on every frame while scrolling. */
.card {
  background: var(--grain), var(--glass-fill), var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.rule { border-top: 1px solid var(--line); }

/* ---------- Buttons ----------
   One orange button per screen: the main thing to do. Solid orange, grained, and it presses down. */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  /* One solid orange (Nithik's call, 2026-11-19: it used to blend blue to orange to peach,
     with a gloss band and a white spot under the mouse). The lit top edge and the darker
     bottom lip in the shadows below keep it looking raised. */
  background: var(--grain-dark), var(--accent);
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 0 rgba(0, 0, 0, 0.14), 0 3px 0 var(--accent-deep), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary kbd { background: rgba(0, 0, 0, 0.14); box-shadow: none; color: var(--on-accent); }

/* Glass buttons: frosted, a lit top edge, grain. */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--grain), radial-gradient(100px circle at var(--mx, -999px) var(--my, -999px), rgba(252, 115, 77, 0.3), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 4px 10px -6px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-outline:hover { background: var(--grain), radial-gradient(100px circle at var(--mx, -999px) var(--my, -999px), rgba(252, 115, 77, 0.3), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07)); }

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--line-strong);
  cursor: pointer;
}
.btn-text:hover { text-decoration-color: currentColor; }
.btn-text svg { width: 18px; height: 18px; }
.btn-danger { color: var(--bad); }

/* ---------- Button motion (2026-11-05: buttons lift on hover and press down firmly on click) ----------
   Uses the separate translate and scale properties so it never fights a button's own transform
   (the drill tab is centred with one). The press is near instant and the release springs back a
   touch, like a real key. The lift only happens with a mouse: on a phone a tap would leave it stuck up. */
:root {
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.36, 0.64, 1);
}
.btn-primary, .btn-outline, .play-btn, .icon-btn, .segmented button, .chip, .drill-tab {
  transition: translate 0.24s var(--ease-spring), scale 0.24s var(--ease-spring), box-shadow 0.24s var(--ease-out-soft), background 0.2s, filter 0.2s, color 0.2s;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  /* The orange button rises 2px and its bottom edge grows 2px, so it reads as lifting off its base. */
  .btn-primary:hover:not(:disabled) {
    translate: 0 -2px;
    filter: brightness(1.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(0, 0, 0, 0.14), 0 5px 0 var(--accent-deep), 0 14px 18px -8px rgba(0, 0, 0, 0.65);
  }
  .btn-outline:hover:not(:disabled) {
    translate: 0 -2px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 12px 20px -10px rgba(0, 0, 0, 0.75);
  }
  .play-btn:hover, .icon-btn:hover { translate: 0 -1px; }
  .segmented button:hover:not(:disabled), .chip:hover:not(:disabled) { translate: 0 -1px; }
  .drill-tab:hover { translate: -3px 0; }
}

/* Pressed. These come last so they win over the hover lift while the mouse is held down.
   The orange button sinks onto its edge (the edge shrinks to nothing); glass and small buttons squeeze. */
.btn-primary:active:not(:disabled) { translate: 0 3px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.14), 0 0 0 var(--accent-deep), 0 4px 6px -4px rgba(0, 0, 0, 0.5); }
.btn-outline:active:not(:disabled) { translate: 0 1px; scale: 0.98; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 1px 3px -1px rgba(0, 0, 0, 0.6); }
.play-btn:active, .icon-btn:active { translate: 0 1px; scale: 0.92; }
.segmented button:active:not(:disabled), .chip:active:not(:disabled) { translate: 0 1px; scale: 0.95; }
.drill-tab:active { translate: -1px 0; scale: 0.97; }
/* Pressing uses this short time; letting go uses the longer springy one above. */
.btn-primary:active:not(:disabled), .btn-outline:active:not(:disabled), .play-btn:active, .icon-btn:active,
.segmented button:active:not(:disabled), .chip:active:not(:disabled), .drill-tab:active { transition-duration: 0.07s; }

/* ---------- Coach notes ----------
   Pip, the mascot, is switched off in this look (the files stay, so it can come back).
   Its speech bubble is now a plain coach note. */
.bubble {
  position: relative;
  background: var(--grain), var(--glass-fill), var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px 22px;
}

/* ---------- The stage ----------
   The one hero surface on a screen (the prompt on Home and Setup, the sign-in and landing
   heroes): a raised panel with heat in its corners, warm top right and cool bottom left,
   and a warm glowing edge.
   Setup's stage is picked by screen because the same element steps aside on Prep and
   Speaking. */
.stage-surface,
body[data-screen="setup"] .stage {
  background: var(--grain), radial-gradient(70% 90% at 100% 0%, rgba(252, 115, 77, 0.16), transparent 60%), radial-gradient(60% 80% at 0% 100%, rgba(2, 151, 222, 0.14), transparent 60%), #071117;
  box-shadow: inset 0 1px 0 rgba(255, 205, 181, 0.6), inset 0 0 0 1px rgba(252, 115, 77, 0.25), 0 0 60px -20px rgba(252, 115, 77, 0.5), 0 30px 60px -30px rgba(0, 0, 0, 0.85);
}
.on-dark { color: var(--ink); }
/* Paper: the white example card on the landing page. */
.on-paper {
  --ink: #02070a;
  --ink-2: #4a5864;
  --main: #0274ab;          /* the brand blue, darkened to pass 4.5:1 on white */
  --accent-text: #bd3f1c;   /* the brand orange, darkened to pass 4.5:1 on white */
  --tint: #e1f1fa;
  --card: #ffffff;
  --line: rgba(2, 7, 10, 0.1);
  --line-strong: rgba(2, 7, 10, 0.18);
  --wash: rgba(2, 7, 10, 0.05);
  --highlight: #ffe5dc;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.13 0 0 0 0 0.2 0 0 0 0.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --glass-fill: linear-gradient(transparent, transparent);
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* "Skip to content": the first thing the keyboard reaches on each page. It stays out of
   sight until it has the focus, then drops into the top left corner. */
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; transform: translateY(-160%); transition: transform 0.2s ease; }
main[tabindex="-1"]:focus { outline: none; }
.skip-link:focus, .skip-link:focus-visible { transform: none; outline: 2px solid var(--accent-mark); outline-offset: 2px; }
