/* Sinjal: studio tally-light interface.
   Red means "live" and nothing else; amber = recording being prepared;
   green = recording ready. Everything else stays calm console navy. */

@font-face { font-family: 'Big Shoulders Display'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/display/big-shoulders-display-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Big Shoulders Display'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/display/big-shoulders-display-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/text/onest-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/text/onest-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/text/onest-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/text/onest-latin-700-normal.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --paper: #edf0f4;
  --panel: #ffffff;
  --panel-2: #f5f7fa;
  --ink: #18213a;
  --ink-2: #4c5875;
  --ink-3: #6f7a94;
  --line: #d9dfe8;
  --line-2: #c5cdd9;
  --tally: #ee2b3f;
  --tally-ink: #c4142a;
  --tally-wash: #fde8ea;
  --amber: #f0a01a;
  --amber-wash: #fdf1dc;
  --green: #14a672;
  --green-ink: #0b7a52;
  --green-wash: #e1f5ec;
  --signal: #2a78d6;
  --signal-wash: rgba(42, 120, 214, 0.1);
  --lamp-off: #b6bfcd;
  --btn-ink: #18213a;
  --btn-ink-text: #ffffff;
  --shadow: 0 1px 2px rgba(24, 33, 58, 0.06), 0 8px 24px -12px rgba(24, 33, 58, 0.18);
  --radius: 14px;
  --radius-s: 9px;
  --display: 'Big Shoulders Display', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --text: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --heat-0: #e7ecf3;
  --heat-1: #cde2fb;
  --heat-2: #9ec5f4;
  --heat-3: #6da7ec;
  --heat-4: #3987e5;
  --heat-5: #256abf;
  --heat-6: #184f95;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme='light'])) {
    color-scheme: dark;
    --paper: #0d1322;
    --panel: #151d31;
    --panel-2: #1a2339;
    --ink: #e9edf6;
    --ink-2: #aab4cb;
    --ink-3: #8590aa;
    --line: #26304a;
    --line-2: #34405e;
    --tally: #ff3b4e;
    --tally-ink: #ff7a87;
    --tally-wash: rgba(255, 59, 78, 0.14);
    --amber: #f5b23a;
    --amber-wash: rgba(245, 178, 58, 0.14);
    --green: #2bc48a;
    --green-ink: #5fdcab;
    --green-wash: rgba(43, 196, 138, 0.14);
    --signal: #4a8ff0;
    --signal-wash: rgba(74, 143, 240, 0.14);
    --lamp-off: #4b5672;
    --btn-ink: #e9edf6;
    --btn-ink-text: #0d1322;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
    --heat-0: #1c2640;
    --heat-1: #1c3a66;
    --heat-2: #1f4f8c;
    --heat-3: #2a68b3;
    --heat-4: #3d84d6;
    --heat-5: #63a2ea;
    --heat-6: #9cc5f4;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 6px; }
h1, h2 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: 0.005em; margin: 0; }
h1 { font-size: clamp(2.3rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.05rem); }
h3 { font-size: 1.05rem; font-weight: 600; margin: 0; line-height: 1.35; }
p { margin: 0; }
small, .small { font-size: 0.875rem; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ---------- layout */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }
.page { padding: 28px 0 120px; }
@media (min-width: 720px) { .page { padding: 36px 0 72px; } }
/* Vertical rhythm set by the parent only (nested stacks keep their own spacing). */
.stack > * + * { margin-top: 16px; }
.stack-l > * + * { margin-top: 40px; }
.stack-s > * + * { margin-top: 8px; }
.stack-xs { display: grid; gap: 3px; justify-items: start; }
.stack-xs > * + * { margin-top: 0; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { justify-content: space-between; }
.cols-2 { display: grid; gap: 24px; }
@media (min-width: 900px) { .cols-2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin-top: 6px; max-width: 62ch; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

/* ---------- top bar */
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .container { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 1.6rem; text-decoration: none; letter-spacing: 0.01em; }
.brand .lamp { width: 12px; height: 12px; }
.nav { display: none; gap: 4px; margin-left: 8px; }
.nav a { padding: 7px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--ink); background: var(--panel-2); }
.nav a[aria-current='page'] { color: var(--ink); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
@media (min-width: 720px) { .nav { display: flex; } }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bell { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink-2); text-decoration: none; }
.bell:hover { background: var(--panel-2); color: var(--ink); }
.bell svg { width: 22px; height: 22px; }
.bell .count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--tally); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--panel); }

/* mobile tab bar */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 9px; text-decoration: none; color: var(--ink-3); font-size: 0.72rem; font-weight: 600; }
.tabs a svg { width: 22px; height: 22px; }
.tabs a[aria-current='page'] { color: var(--ink); }
.tabs a[aria-current='page'] svg { color: var(--tally); }
@media (min-width: 720px) { .tabs { display: none; } }

/* ---------- buttons & forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1; text-decoration: none; cursor: pointer;
  background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ink { background: var(--btn-ink); color: var(--btn-ink-text); box-shadow: none; }
.btn-ink:hover { background: var(--btn-ink); box-shadow: 0 0 0 4px var(--signal-wash); }
.btn-live { background: var(--tally); color: #fff; box-shadow: 0 6px 18px -8px var(--tally); }
.btn-live:hover { background: var(--tally); box-shadow: 0 0 0 4px var(--tally-wash), 0 6px 18px -8px var(--tally); }
.btn-ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--panel-2); color: var(--ink); box-shadow: none; }
.btn-danger { background: transparent; color: var(--tally-ink); box-shadow: inset 0 0 0 1px var(--tally-wash); }
.btn-danger:hover { background: var(--tally-wash); box-shadow: none; }
.btn-s { min-height: 34px; padding: 0 13px; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
form.inline { display: inline; margin: 0; }

.field { display: grid; gap: 6px; align-content: start; }
.field > label, .label { font-weight: 600; font-size: 0.92rem; }
.hint { color: var(--ink-3); font-size: 0.85rem; line-height: 1.45; }
input[type='text'], input[type='email'], input[type='password'], input[type='number'], input[type='url'], input[type='date'], input[type='search'], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.85rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-wash); }
input[type='file'] { font: inherit; font-size: 0.9rem; color: var(--ink-2); }
input[type='file']::file-selector-button {
  font: inherit; font-weight: 600; font-size: 0.875rem; color: var(--ink); cursor: pointer;
  margin-right: 12px; padding: 7px 14px; border-radius: 999px; border: 0; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2);
}
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ink); flex: none; }
.check span { display: grid; gap: 1px; }
.check small { color: var(--ink-3); }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; margin-bottom: 8px; }

/* ---------- panels & flashes */
.panel { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
@media (min-width: 720px) { .panel { padding: 24px; } }
.panel-tight { padding: 0; overflow: hidden; }
.panel h2 + *, .panel h3 + * { margin-top: 10px; }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-s); margin: 16px 0; font-weight: 500; }
.flash::before { content: ''; width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; }
.flash-ok { background: var(--green-wash); }
.flash-ok::before { background: var(--green); }
.flash-warn, .flash-error { background: var(--tally-wash); }
.flash-warn::before, .flash-error::before { background: var(--tally); }
.form-error { color: var(--tally-ink); font-weight: 500; }

/* ---------- tally lamps */
.lamp { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--lamp-off); flex: none; vertical-align: middle; }
.lamp.live { background: var(--tally); box-shadow: 0 0 0 3px var(--tally-wash), 0 0 10px 1px var(--tally); }
.lamp.processing { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-wash); }
.lamp.ready { background: var(--green); box-shadow: 0 0 0 3px var(--green-wash); }
.lamp.failed { background: transparent; box-shadow: inset 0 0 0 2px var(--ink-3); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.status.live { color: var(--tally-ink); }
.onair {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 6px;
  background: var(--tally); color: #fff; font-family: var(--display); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.06em; line-height: 1.2;
  box-shadow: 0 0 14px -2px var(--tally);
}
.onair::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; }

/* ---------- avatars */
.avatar {
  --size: 48px; --h: 220;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center; font-weight: 700; font-size: calc(var(--size) * 0.36);
  background: hsl(var(--h) 46% 88%); color: hsl(var(--h) 45% 26%);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme='light'])) .avatar { background: hsl(var(--h) 30% 24%); color: hsl(var(--h) 60% 82%); }
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.s { --size: 36px; }
.avatar.l { --size: 72px; }
.avatar.xl { --size: 104px; }
.avatar.is-live { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--tally), 0 0 22px 3px rgba(238, 43, 63, 0.45); animation: tally-glow 2.6s ease-in-out infinite; }
@keyframes tally-glow { 50% { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--tally), 0 0 10px 0 rgba(238, 43, 63, 0.3); } }

/* ---------- live board */
.board { display: grid; gap: 12px; }
.plate {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; align-items: center;
  background: var(--panel); border-radius: var(--radius); padding: 16px 16px 16px 20px; box-shadow: var(--shadow); overflow: hidden;
}
.plate::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--tally); box-shadow: 0 0 16px 2px var(--tally); }
.plate-main { display: grid; gap: 4px; min-width: 0; }
.plate-name { font-family: var(--display); font-weight: 800; font-size: 1.75rem; line-height: 1; text-decoration: none; }
.plate-title { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plate-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 0.9rem; }
.plate-meta strong { color: var(--ink); font-weight: 600; }
.plate-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.plate-preview { grid-column: 1 / -1; border-radius: var(--radius-s); overflow: hidden; aspect-ratio: 16 / 9; background: #0d1322; max-width: 420px; }
.plate-preview img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 720px) {
  .plate { grid-template-columns: auto minmax(0, 1fr) auto; padding: 18px 22px 18px 26px; }
  .plate-actions { grid-column: auto; justify-content: flex-end; }
  .plate.has-preview { grid-template-columns: 220px auto minmax(0, 1fr) auto; }
  .plate.has-preview .plate-preview { grid-column: auto; grid-row: 1; width: 220px; }
}
.board-quiet { display: flex; gap: 16px; align-items: center; padding: 22px; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.board-quiet .sign { font-size: 2.2rem; border-radius: 10px; padding: 0.06em 0.35em; border-width: 2px; }

/* ---------- the on-air sign (landing + empty board) */
.sign {
  display: inline-flex; align-items: center; justify-content: center; user-select: none;
  font-family: var(--display); font-weight: 800; font-size: clamp(4.5rem, 13vw, 8.5rem); line-height: 1; letter-spacing: 0.06em;
  padding: 0.08em 0.38em 0.1em; border-radius: 20px; border: 3px solid #2a3350;
  background: linear-gradient(180deg, #1b2236, #121828); color: #323c58;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.04), 0 18px 40px -22px rgba(13, 19, 34, 0.9);
}
.sign.is-on {
  border-color: #ff8592; color: #fff4f5;
  background: radial-gradient(120% 140% at 50% 40%, #ff5163 0%, #e8182e 62%, #b90f22 100%);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.55), 0 0 2px #fff;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.25), 0 0 0 6px rgba(238, 43, 63, 0.12), 0 0 46px 6px rgba(238, 43, 63, 0.45), 0 22px 50px -20px rgba(185, 15, 34, 0.9);
  animation: sign-power 1.1s steps(1, end) 0.25s 1 both;
}
@keyframes sign-power {
  0% { color: #323c58; background: #161d30; text-shadow: none; box-shadow: none; border-color: #2a3350; }
  12% { color: #fff4f5; background: #e8182e; }
  18% { color: #6b2633; background: #4d1420; text-shadow: none; box-shadow: none; }
  30% { color: #fff4f5; background: #e8182e; }
  36% { color: #6b2633; background: #4d1420; text-shadow: none; box-shadow: none; }
  50% { color: #fff4f5; }
}

/* ---------- recordings list */
.rec-list { display: grid; gap: 2px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.rec { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; background: var(--panel); padding: 12px; text-decoration: none; }
@media (min-width: 720px) { .rec { grid-template-columns: 168px minmax(0, 1fr) auto; padding: 14px 18px 14px 14px; gap: 18px; } }
a.rec:hover { background: var(--panel-2); }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .avatar { --size: 40px; }
.thumb .dur { position: absolute; right: 6px; bottom: 6px; background: rgba(13, 19, 34, 0.82); color: #fff; font-size: 0.75rem; font-weight: 600; padding: 1px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.thumb .lock { position: absolute; inset: auto 6px 6px auto; width: 22px; height: 22px; border-radius: 50%; background: rgba(13, 19, 34, 0.75); color: #fff; display: grid; place-items: center; }
.thumb .lock svg { width: 12px; height: 12px; }
.rec-body { display: grid; gap: 3px; min-width: 0; }
.rec-body h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--ink-2); font-size: 0.875rem; }
.rec-side { display: none; }
@media (min-width: 720px) { .rec-side { display: flex; } }

/* ---------- roster (catalog) */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.toolbar input[type='search'] { max-width: 340px; border-radius: 999px; padding-left: 16px; }
.toolbar .btn, .toolbar select { min-height: 44px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border-radius: 999px; text-decoration: none; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.chip[aria-current='true'] { background: var(--btn-ink); color: var(--btn-ink-text); box-shadow: none; }
.roster { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.tile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; background: var(--panel); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.tile-name { font-weight: 700; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-sub { color: var(--ink-2); font-size: 0.85rem; display: flex; gap: 10px; flex-wrap: wrap; }
.tile form, .tile .tile-action { grid-column: 1 / -1; }
.platforms { display: inline-flex; gap: 6px; align-items: center; }
.pf { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }
.pf svg { width: 13px; height: 13px; }
.pf.is-live { background: var(--tally); color: #fff; box-shadow: none; }

/* ---------- profile */
.profile-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 22px; align-items: center; margin-bottom: 28px; }
.profile-head h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
.profile-head .actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
@media (min-width: 720px) { .profile-head { grid-template-columns: auto minmax(0, 1fr) auto; } .profile-head .actions { grid-column: auto; } }
.links { display: flex; gap: 8px 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 0.92rem; margin-top: 8px; }
.links a { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- player */
.player { border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.player video { width: 100%; max-height: 72vh; background: #000; }
.locked { display: grid; gap: 12px; justify-items: start; padding: 28px; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.locked .icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.locked .icon svg { width: 20px; height: 20px; }

/* ---------- figures */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.figure { background: var(--panel); padding: 16px 18px; display: grid; gap: 2px; align-content: start; }
.figure .label { font-size: 0.85rem; font-weight: 500; color: var(--ink-2); }
.figure .value { font-size: 1.65rem; font-weight: 600; line-height: 1.2; }
.figure .sub { font-size: 0.82rem; color: var(--ink-3); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- charts */
.chart { margin: 0; display: grid; gap: 12px; }
.chart-title { font-weight: 600; }
.chart-frame { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 200px auto; column-gap: 10px; }
.chart-y { position: relative; width: 40px; font-size: 0.75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart-y span { position: absolute; right: 0; transform: translateY(50%); }
.chart-plot { position: relative; touch-action: pan-y; }
.chart-plot svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-base { stroke: var(--line-2); }
.chart-area { fill: var(--signal); opacity: 0.1; }
.chart-line { fill: none; stroke: var(--signal); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot, .chart-hover-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px var(--panel); pointer-events: none; }
.chart-note { position: absolute; transform: translate(-50%, -150%); font-size: 0.75rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; pointer-events: none; }
.chart-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); pointer-events: none; }
.chart-x { grid-column: 2; position: relative; height: 22px; font-size: 0.75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart-x span { position: absolute; top: 6px; transform: translateX(-50%); white-space: nowrap; }
.chart-x span:first-child { transform: none; }
.chart-x span:last-child { transform: translateX(-100%); }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--panel); border-radius: 8px; padding: 7px 10px; box-shadow: 0 0 0 1px var(--line), var(--shadow); display: grid; gap: 1px; min-width: 96px; font-size: 0.82rem; }
.chart-tip strong { font-size: 0.95rem; }
.chart-tip span { color: var(--ink-2); }
.chart-table summary { cursor: pointer; color: var(--ink-2); font-size: 0.85rem; }
.chart-table table { margin-top: 10px; }
.chart--empty p { padding: 18px 0; }

.cols-frame { position: relative; height: 180px; margin: 6px 0 22px 34px; }
.cols-grid { position: absolute; inset: 0; }
.col-grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.col-grid i { position: absolute; right: calc(100% + 8px); top: -0.6em; font-style: normal; font-size: 0.72rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.col:hover .col-bar, .col:focus-visible .col-bar { filter: brightness(1.15); }
.col-bar { position: relative; width: 100%; max-width: 24px; min-height: 0; background: var(--signal); border-radius: 4px 4px 0 0; }
.col-value { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-style: normal; font-size: 0.72rem; font-weight: 600; color: var(--ink-2); }
.col-label { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 0.68rem; color: var(--ink-3); white-space: nowrap; }

.heat { position: relative; display: grid; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat-row { display: grid; grid-template-columns: 34px repeat(24, minmax(10px, 1fr)); gap: 3px; align-items: center; min-width: 360px; }
.heat-day { font-size: 0.72rem; color: var(--ink-3); }
.heat-hours span { font-size: 0.66rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.heat-cell { aspect-ratio: 1; border-radius: 3px; background: var(--heat-0); display: block; }
.heat-cell.b1 { background: var(--heat-1); }
.heat-cell.b2 { background: var(--heat-2); }
.heat-cell.b3 { background: var(--heat-3); }
.heat-cell.b4 { background: var(--heat-4); }
.heat-cell.b5 { background: var(--heat-5); }
.heat-cell.b6 { background: var(--heat-6); }
.heat-cell:hover, .heat-cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }
.heat-legend { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--ink-3); }
.heat-legend .heat-cell { width: 14px; height: 14px; }
.heat-legend span:first-child { margin-right: 4px; }
.heat-legend span:last-child { margin-left: 4px; }

/* ---------- tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 0.82rem; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.panel-tight table th:first-child, .panel-tight table td:first-child { padding-left: 20px; }
.panel-tight table th:last-child, .panel-tight table td:last-child { padding-right: 20px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who a { font-weight: 600; text-decoration: none; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--panel-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.tag.good { background: var(--green-wash); color: var(--green-ink); box-shadow: none; }
.tag.bad { background: var(--tally-wash); color: var(--tally-ink); box-shadow: none; }
.tag.warn { background: var(--amber-wash); color: var(--ink); box-shadow: none; }

/* ---------- empty states */
.empty { display: grid; gap: 10px; justify-items: start; padding: 28px; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.empty p { max-width: 52ch; color: var(--ink-2); }

/* ---------- notifications */
.notes { display: grid; gap: 2px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; padding: 14px 18px; background: var(--panel); text-decoration: none; }
.note .lamp { margin-top: 8px; }
.note p { color: var(--ink-2); font-size: 0.92rem; }
.note time { grid-column: 2; color: var(--ink-3); font-size: 0.8rem; }
.note.unread { background: var(--panel-2); }

/* ---------- plans */
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.plan { display: grid; gap: 14px; align-content: start; background: var(--panel); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.plan.is-current { box-shadow: 0 0 0 2px var(--ink), var(--shadow); }
.plan-name { font-family: var(--display); font-weight: 800; font-size: 1.9rem; line-height: 1; }
.plan-price { font-size: 1.6rem; font-weight: 700; }
.plan-price small { font-size: 0.9rem; font-weight: 500; color: var(--ink-2); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.plan li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; font-size: 0.94rem; }
.plan li svg { width: 18px; height: 18px; margin-top: 2px; color: var(--green); }
.plan li.no { color: var(--ink-3); }
.plan li.no svg { color: var(--ink-3); }

/* ---------- auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; display: grid; gap: 22px; }
.auth-card .brand { justify-self: start; }
.auth-card .panel { display: grid; gap: 18px; }

/* ---------- landing */
.site-head { display: flex; align-items: center; gap: 16px; height: 68px; }
.site-head .topbar-end { gap: 6px; }
.hero { display: grid; gap: 40px; padding: 28px 0 56px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding: 56px 0 88px; } }
.hero h1 { font-size: clamp(3.1rem, 8.5vw, 6.2rem); line-height: 0.92; max-width: 11ch; }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 46ch; margin-top: 22px; }
.hero .form-actions { margin-top: 28px; }
.studio { display: grid; gap: 18px; justify-items: center; text-align: center; padding: 34px 22px; border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); }
.studio-caption { color: var(--ink-2); max-width: 36ch; }
.studio-list { width: 100%; display: grid; gap: 8px; text-align: left; }
.studio-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); }
.studio-item strong { font-weight: 700; }
.studio-item .muted { margin-left: auto; font-size: 0.85rem; }
.band { padding: 56px 0; border-top: 1px solid var(--line); }
.band h2 { margin-bottom: 26px; }
.steps { display: grid; gap: 22px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.steps li { display: grid; gap: 8px; align-content: start; }
.steps li::before { counter-increment: step; content: counter(step); font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--line-2); }
.steps p { color: var(--ink-2); max-width: 36ch; }
.faces { display: flex; flex-wrap: wrap; gap: 18px 22px; }
.face { display: grid; justify-items: center; gap: 8px; width: 84px; text-align: center; font-size: 0.85rem; font-weight: 600; }
.face .avatar { --size: 64px; }
.trust { display: grid; gap: 12px; max-width: 66ch; }
.trust p { color: var(--ink-2); }
.site-foot { padding: 32px 0 48px; color: var(--ink-3); font-size: 0.875rem; display: flex; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--line); }

/* ---------- admin shell */
.admin { display: grid; min-height: 100vh; }
@media (min-width: 960px) { .admin { grid-template-columns: 236px minmax(0, 1fr); } }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 14px 12px; display: grid; align-content: start; gap: 18px; }
@media (min-width: 960px) { .side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 14px; } }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px; }
.side nav { display: none; gap: 2px; }
.side.is-open nav { display: grid; }
@media (min-width: 960px) { .side nav { display: grid; } .side .menu-toggle { display: none; } }
.side nav a, .side nav .link-button { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.side nav .link-button { width: 100%; border: 0; background: none; font: inherit; font-weight: 500; cursor: pointer; text-align: left; }
.side nav a:hover, .side nav .link-button:hover { background: var(--panel-2); color: var(--ink); }
.side nav a[aria-current='page'] { background: var(--panel-2); color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.side nav .sep { height: 1px; background: var(--line); margin: 8px 6px; }
.side .count { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--tally); color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 20px; text-align: center; }
.admin-main { min-width: 0; padding: 22px 16px 80px; }
@media (min-width: 720px) { .admin-main { padding: 32px 36px 72px; } }
.admin-main > .flash:first-child { margin-top: 0; }
.grid-figures { display: grid; gap: 16px; }
@media (min-width: 1100px) { .grid-figures.two { grid-template-columns: 1fr 1fr; } }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.85em; overflow-wrap: anywhere; }
.steps-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.steps-log li { padding: 8px 12px; border-radius: 8px; background: var(--panel-2); font-size: 0.88rem; }
.log td:first-child { white-space: nowrap; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lvl-warn td:nth-child(2) { color: var(--ink); }
.lvl-error { background: var(--tally-wash); }
details.box { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
details.box > summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.box > summary::-webkit-details-marker { display: none; }
details.box > summary::after { content: '+'; font-size: 1.3rem; color: var(--ink-3); line-height: 1; }
details.box[open] > summary::after { content: '−'; }
details.box > .box-body { padding: 0 20px 20px; }
.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.save-bar { position: sticky; bottom: 0; z-index: 5; padding: 18px 0 14px; background: linear-gradient(to bottom, transparent, var(--paper) 40%); }
.danger { box-shadow: 0 0 0 1px var(--tally-wash), var(--shadow); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .lamp, .onair::before { forced-color-adjust: none; }
}
