/* Fonts, served from /static/fonts (SIL Open Font License, texts next to the files). Latin and Latin Extended only. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-serif-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-serif-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Shared by the public pages and the dashboard: tokens, canvas, and the small components both use.
   Dark is the default. The light theme is set as <html data-theme="light"> by the small script in each
   page's head (stored choice, otherwise the system setting). `.on-dark` keeps an element dark in both
   themes, e.g. text over video footage. */
:root, .on-dark {
  color-scheme: dark;
  /* One violet-tinted ink ramp, one accent. */
  --bg: hsl(250 24% 9%);
  --surface: hsl(248 21% 12%);
  --surface-2: hsl(246 18% 15%);
  --line: hsl(246 11% 22%);
  --line-strong: hsl(246 8% 35%);
  --text: hsl(240 20% 97%);
  --text-2: hsl(246 10% 74%);
  --muted: hsl(246 6% 56%);
  --accent: hsl(270 60% 52%);
  --accent-ink: hsl(270 85% 78%);
  --accent-soft: hsl(270 45% 18%);
  --accent-line: hsl(270 45% 38%);
  /* Text uses --text, --text-2 and --muted only. --bad is reserved for real error messages. */
  --bad: hsl(0 72% 70%);
  --on-accent: hsl(240 20% 97%);
  --accent-border: hsl(270 70% 66%);
  --accent-hover: hsl(270 60% 57%);
  --mark: hsl(270 60% 52% / .32);
  --dot: hsl(246 11% 22%);
  --shadow: 0 24px 64px hsl(250 40% 3% / .45);
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --serif: "IBM Plex Serif", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
/* The page colour, declared on :root only, so it stays the page's even inside `.on-dark`. */
:root { --page: hsl(250 24% 9%); }
:root[data-theme="light"] {
  --page: hsl(250 33% 98%);
  color-scheme: light;
  --bg: hsl(250 33% 98%);
  --surface: hsl(0 0% 100%);
  --surface-2: hsl(250 30% 95.5%);
  --line: hsl(248 20% 89%);
  --line-strong: hsl(248 12% 76%);
  --text: hsl(250 28% 11%);
  --text-2: hsl(248 10% 32%);
  --muted: hsl(248 6% 45%);
  --accent: hsl(270 60% 52%);
  --accent-ink: hsl(270 58% 46%);
  --accent-soft: hsl(270 80% 95%);
  --accent-line: hsl(270 55% 80%);
  --bad: hsl(0 65% 42%);
  --accent-border: hsl(270 55% 45%);
  --accent-hover: hsl(270 60% 47%);
  --mark: hsl(270 60% 52% / .16);
  --dot: hsl(248 18% 86%);
  --shadow: 0 1px 2px hsl(250 30% 20% / .06), 0 24px 64px hsl(250 30% 30% / .12);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; color: var(--text); font: 14px/1.5 var(--sans);
  background-color: var(--bg);
  /* Dotted canvas. */
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
}
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line);
       background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; font-weight: 500; white-space: nowrap;
       transition: background-color .12s var(--ease), border-color .12s var(--ease), transform .12s var(--ease); }
.btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent-border); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: none; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.large { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .6; cursor: default; transform: none; pointer-events: none; }

/* Score ring */
.ring { position: relative; width: 48px; height: 48px; flex: none; }
.ring svg { width: 48px; height: 48px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .rail { stroke: var(--line); }
.ring .value { stroke: var(--line-strong); stroke-linecap: round; }
.ring.mid .value { stroke: hsl(270 45% 62%); }
.ring.high .value { stroke: var(--accent-ink); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 500 14px var(--mono); }

/* Chips, timestamps, highlighted brand term */
.chip { display: inline-block; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); font-size: 12px; line-height: 20px; color: var(--text-2); white-space: nowrap; }
.chip.accent { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
/* A spoken timestamp: a figure in mono, linking to that second of the video. */
.time { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line-strong);
        background: var(--surface-2); color: var(--text); font: 500 12px var(--mono); text-decoration: none;
        transition: background-color .12s var(--ease), border-color .12s var(--ease); }
a.time:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.time svg { width: 8px; height: 8px; fill: var(--muted); stroke: none; }
mark { background: var(--mark); color: var(--text); border-radius: 3px; padding: 0 3px; }

/* Form fields */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 13px; font-weight: 500; }
.field small { font-size: 12px; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); transition: border-color .12s var(--ease); }
.field select { height: 36px; padding-block: 0; font: inherit; color: var(--text); cursor: pointer; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent-ink); }
.field textarea { min-height: 60px; resize: vertical; font: 13px/1.5 var(--mono); }
::placeholder { color: var(--muted); }


/* Theme switch: a sun in the dark theme, a moon in the light one. */
.theme-toggle { display: grid; place-items: center; width: 36px; height: 36px; flex: none; padding: 0; border: 0; border-radius: 8px; background: none;
                color: var(--text-2); cursor: pointer; transition: color .12s var(--ease), background-color .12s var(--ease); }
.theme-toggle:hover { color: var(--text); background: var(--surface-2); }
.theme-toggle .moon, [data-theme="light"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }

/* Switching the theme: a short cross-fade of the whole page (static/theme.js). */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease), fill .45s var(--ease), stroke .45s var(--ease) !important; }
