/* MRIDI DOCK — broadcast design layer, loaded after ui.css on every page except overlays.
   Kept apart from ui.css so upstream Tramevia Dock changes to ui.css merge cleanly: this file only re-points tokens and
   flattens the few components that used glows and gradients. Stream output (overlay.html) never loads it.

   Language: control-room charcoal, hairline borders, 2–4 px radii, dense rows, tabular numbers, colour only for state
   (tally red = program/live, tally green = preview/ok, amber = warning), one steel-blue accent for focus and selection. */

:root {
  color-scheme: dark;
  --bg: #0e1012;
  --surface: #15181b;
  --surface-2: #1b1f23;
  --surface-3: #23282d;
  --border: #262b31;
  --border-strong: #353c44;
  --text: #e6e8eb;
  --muted: #a2a9b2;
  --faint: #7b838d;
  --accent: #5aa9f0;
  --accent-2: #62d0c8;
  --accent-text: #061420;
  --accent-soft: rgb(90 169 240 / 13%);
  --ok: #2fd16b;
  --warn: #f2b33d;
  --danger: #ff5a5a;
  --ok-soft: rgb(47 209 107 / 12%);
  --warn-soft: rgb(242 179 61 / 12%);
  --danger-soft: rgb(255 90 90 / 12%);
  --live: #ff3b3b;
  --live-soft: rgb(255 59 59 / 15%);
  --tally-program: #ff3b3b;
  --tally-preview: #2fd16b;
  --radius: 4px;
  --radius-sm: 3px;
  --shadow: 0 12px 32px -12px rgb(0 0 0 / 70%), 0 0 0 1px rgb(255 255 255 / 3%);
  --elev: none;
  /* System UI faces read best at small sizes; Manrope stays for overlays (overlay.css pins its own). */
  --font: "Inter", "SF Pro Text", -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Mono", ui-monospace, Consolas, monospace;
  --fs: 13px;
  --header-h: 40px;
  --rail-w: 208px;
  --rail-w-collapsed: 48px;
  --bar-h: 36px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e9ebee; --surface: #f8f9fa; --surface-2: #f0f2f4; --surface-3: #e3e6ea; --border: #d5d9de; --border-strong: #bcc2c9;
  --text: #16191d; --muted: #4c545d; --faint: #636b75; --accent: #1f6fc0; --accent-2: #0e7a73; --accent-text: #ffffff; --accent-soft: rgb(31 111 192 / 10%);
  --ok: #11823f; --warn: #8f5a00; --danger: #c42020; --ok-soft: rgb(17 130 63 / 10%); --warn-soft: rgb(143 90 0 / 10%); --danger-soft: rgb(196 32 32 / 9%);
  --live: #d21414; --live-soft: rgb(210 20 20 / 10%); --tally-program: #d21414; --tally-preview: #11823f;
  --shadow: 0 12px 32px -12px rgb(20 24 30 / 25%), 0 0 0 1px rgb(20 24 30 / 6%);
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    color-scheme: light;
    --bg: #e9ebee; --surface: #f8f9fa; --surface-2: #f0f2f4; --surface-3: #e3e6ea; --border: #d5d9de; --border-strong: #bcc2c9;
    --text: #16191d; --muted: #4c545d; --faint: #636b75; --accent: #1f6fc0; --accent-2: #0e7a73; --accent-text: #ffffff; --accent-soft: rgb(31 111 192 / 10%);
    --ok: #11823f; --warn: #8f5a00; --danger: #c42020; --ok-soft: rgb(17 130 63 / 10%); --warn-soft: rgb(143 90 0 / 10%); --danger-soft: rgb(196 32 32 / 9%);
    --live: #d21414; --live-soft: rgb(210 20 20 / 10%); --tally-program: #d21414; --tally-preview: #11823f;
    --shadow: 0 12px 32px -12px rgb(20 24 30 / 25%), 0 0 0 1px rgb(20 24 30 / 6%);
  }
}

/* Flat surfaces: no glow behind pages, no gradients on buttons, no coloured drop shadows. */
:root:not(.dock-mode) body:not([data-page="overlay"]) { background: var(--bg); }
body { font-variant-numeric: tabular-nums; }
h1 { font-size: 1.2rem; letter-spacing: -0.01em; }
h2 { font-size: 1rem; }
h1, h2, h3, h4 { font-weight: 650; }
.section-title { font-size: 0.7rem; letter-spacing: 0.12em; font-weight: 650; }
.brand { font-weight: 700; letter-spacing: 0.04em; font-size: 0.92rem; }
.brand img, .login-card img { filter: none; }
.brand img { width: 22px; height: 22px; }
.app-header { background: var(--surface); backdrop-filter: none; }
.nav a { border-radius: var(--radius-sm); padding: 5px 9px; }
.nav a[aria-current="page"] { background: var(--surface-3); box-shadow: inset 0 -2px 0 var(--accent); }
.demo-strip { background: var(--warn-soft); color: var(--warn); border-bottom-color: color-mix(in srgb, var(--warn) 30%, transparent); letter-spacing: 0.04em; }
.demo-strip::before { background: var(--warn); box-shadow: none; }

.card { padding: 12px; }
.btn { min-height: 30px; padding: 5px 11px; font-weight: 600; transition: background 0.12s, border-color 0.12s; }
.btn:active { transform: none; }
.btn.primary, .btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: none; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 86%, white); }
.btn.sm { min-height: 26px; }
.support::before { animation: none; opacity: 0; }
.segmented { border-radius: var(--radius); padding: 2px; }
.segmented button { border-radius: var(--radius-sm); }
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] { box-shadow: inset 0 0 0 1px var(--border-strong); }
.chip, .badge, .pill { border-radius: var(--radius-sm); }
.chips-input { border-radius: var(--radius-sm); }
.badge.live { border-radius: 2px; background: var(--live); color: #fff; box-shadow: none; }
.badge.live::before { background: #fff; box-shadow: none; }
.pf-icon { border-radius: var(--radius-sm); }
.toast { border-radius: var(--radius); }
dialog::backdrop { background: rgb(5 6 8 / 65%); backdrop-filter: none; }
:focus-visible { outline-offset: 1px; border-radius: 2px; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 2px var(--accent-soft); }
.source-link { letter-spacing: 0.02em; }

/* Pages shown inside the control room (/app frames them with ?embed=1): no header, no outer margins. */
:root.embedded .page { max-width: none; padding: 12px; }
:root.embedded { --header-h: 0px; }
/* The dashboard's own section menu is replaced by the control room's rail and tabs. */
:root.embedded .home-nav { display: none; }
:root.embedded .home { grid-template-columns: minmax(0, 1fr); max-width: 1280px; padding: 16px 16px 64px; }
