/* MTM Media — palette measured for this app, not inherited.
   Every pair used for text is asserted >= 4.5:1 in tests/test_css.py.
   The dark palette is written ONCE per token: a token defined twice drifts, and
   is then wrong only for system-default users, who are the majority path. */

:root {
  --gsu-blue: #0039a6;
  --gsu-blue-ink: #ffffff;

  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceef2;

  --ink: #14171c;
  --ink-2: #3d4450;
  --ink-3: #555c69;

  --line: #d7dbe2;
  --line-strong: #b6bcc7;

  --accent: #0039a6;
  --accent-ink: #ffffff;
  --accent-soft: #e4ebfa;

  --good: #1c6b3f;
  --good-soft: #dff0e5;
  --warn: #7d4b00;
  --warn-soft: #fbeed5;
  --danger: #a3231f;
  --danger-soft: #fbe3e2;

  --shadow: 0 1px 2px rgba(20, 23, 28, 0.09), 0 6px 18px rgba(20, 23, 28, 0.06);
  --radius: 10px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101318;
    --surface: #191d24;
    --surface-2: #222831;
    --ink: #eef1f5;
    --ink-2: #c2cad5;
    --ink-3: #9aa4b2;
    --line: #2c333d;
    --line-strong: #3d4550;
    --accent: #8fb4ff;
    --accent-ink: #0b0f15;
    --accent-soft: #1b2740;
    --good: #6cd39a;
    --good-soft: #12291d;
    --warn: #e8b563;
    --warn-soft: #2c2213;
    --danger: #f08b86;
    --danger-soft: #2e1817;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  --bg: #101318;
  --surface: #191d24;
  --surface-2: #222831;
  --ink: #eef1f5;
  --ink-2: #c2cad5;
  --ink-3: #9aa4b2;
  --line: #2c333d;
  --line-strong: #3d4550;
  --accent: #8fb4ff;
  --accent-ink: #0b0f15;
  --accent-soft: #1b2740;
  --good: #6cd39a;
  --good-soft: #12291d;
  --warn: #e8b563;
  --warn-soft: #2c2213;
  --danger: #f08b86;
  --danger-soft: #2e1817;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- header */

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  height: 56px;
  background: var(--gsu-blue);
  color: var(--gsu-blue-ink);
}

.brand {
  font-weight: 650;
  letter-spacing: -0.01em;
  font-size: 16px;
}

.brand-ver {
  font: 11px/1 var(--mono);
  opacity: 0.85;
  margin-left: 8px;
}

.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--gsu-blue-ink);
  font: inherit;
  padding: 7px 13px;
  border-radius: 7px;
  cursor: pointer;
}

.nav button:hover { background: rgba(255, 255, 255, 0.14); }
.nav button[aria-current="page"] { background: rgba(255, 255, 255, 0.24); font-weight: 600; }

/* ---------------------------------------------------------------- layout */

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}

/* The project map is a spreadsheet — 18 columns — and the reading measure that
   suits every other view clips it while leaving dead space beside the clip.
   Set on <body> so the footer tracks the same width. */
body.wide main, body.wide footer { max-width: none; }

h1 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.sub {
  color: var(--ink-3);
  margin: 0 0 22px;
  font-size: 14px;
}

section { margin-bottom: 34px; }

h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-3);
  margin: 0 0 10px;
  font-weight: 650;
}

/* ---------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 17px;
  box-shadow: var(--shadow);
  margin-bottom: 9px;
}

.card-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.card-title {
  font-weight: 600;
  font-size: 15px;
}

.card-meta {
  color: var(--ink-3);
  font-size: 13px;
}

.card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ------------------------------------------------------- ball in court */
/* The app's core question, so it reads as words rather than a colour code. */

.ball {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.ball[data-court="creator"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.ball[data-court="reviewer"] { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.ball[data-court="faculty"] { background: var(--surface-2); color: var(--ink-2); border-color: var(--line-strong); }
.ball[data-court="locked"] { background: var(--good-soft); color: var(--good); border-color: var(--good); }

/* ---------------------------------------------------------------- gates */
/* All three shown together, always. A video that looks done because two of
   three are green is the exact failure this app exists to prevent. */

.gates {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.gate {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink-2);
  white-space: nowrap;
}

.gate[data-met="yes"] { background: var(--good-soft); color: var(--good); border-color: var(--good); }
.gate[data-met="no"] { background: var(--surface-2); color: var(--ink-2); }
.gate[data-met="help"] { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); font-weight: 600; }

.gate::before { content: "✕ "; font-weight: 700; }
.gate[data-met="yes"]::before { content: "✓ "; }
.gate[data-met="help"]::before { content: "! "; }

/* ---------------------------------------------------------------- table */

table { border-collapse: collapse; width: 100%; font-size: 14px; }

th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-strong);
  font-weight: 650;
}

td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

td.primary { color: var(--ink); font-weight: 550; }

.wrap { overflow-x: auto; }

/* ---------------------------------------------------------------- misc */

.pill {
  font: 11.5px/1 var(--mono);
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.empty {
  color: var(--ink-3);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
}

footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 40px;
  color: var(--ink-3);
  font-size: 12.5px;
}

button.act {
  appearance: none;
  font: inherit;
  font-size: 13.5px;
  padding: 6px 13px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

button.act:hover { background: var(--surface-2); }

button.act.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}

@media (max-width: 620px) {
  .topbar { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 10px; }
  .nav { margin-left: 0; width: 100%; overflow-x: auto; }
  main { padding: 18px 14px 50px; }
}

/* ---------------------------------------------------------------- calendar
   Promoted from the mockups so the live screens and the pictures Ben approved
   are the same design, not two that drift. */

.month { margin-bottom: 30px; }
.month-head {
  display: flex; align-items: baseline; gap: 12px;
  border-bottom: 2px solid var(--line-strong); padding-bottom: 7px; margin-bottom: 12px;
}
.month-name { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.month-count { color: var(--ink-3); font-size: 13px; }

.prod {
  display: grid; grid-template-columns: 58px 1fr auto; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--line); align-items: start;
  width: 100%; text-align: left; background: none; border-left: 0; border-right: 0;
  border-top: 0; font: inherit; color: inherit; cursor: pointer;
}
.prod:last-child { border-bottom: 0; }
.prod:hover { background: var(--surface-2); }
.datebox { text-align: center; padding-top: 2px; }
.datebox .dow { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.datebox .dnum { font-size: 21px; font-weight: 650; line-height: 1.1; }
.prod-title { font-weight: 600; font-size: 15px; }
.prod-meta { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.prod-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.prog { text-align: right; min-width: 130px; }
.prog-num { font: 600 13px/1.3 var(--sans); color: var(--ink-2); }
.bar { height: 5px; border-radius: 3px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--good); }
.bar.warn span { background: var(--warn); }
.bar.none span { background: var(--line-strong); }

/* ------------------------------------------------------------- production */

.facts {
  display: flex; gap: 26px; flex-wrap: wrap; margin: 0 0 26px; padding: 15px 17px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.fact-k { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.fact-v { font-size: 14.5px; font-weight: 600; margin-top: 3px; }

.crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.crew-slot { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; }
.crew-role { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.crew-name { font-weight: 600; margin-top: 3px; }
.crew-slot.unstaffed { border-style: dashed; border-color: var(--line-strong); }
.crew-slot.unstaffed .crew-name { color: var(--ink-3); font-weight: 500; font-style: italic; }

.track-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.track-name { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; font-weight: 650; color: var(--ink-3); }
.track-note { font-size: 13px; color: var(--ink-3); }

.rounds { display: flex; gap: 5px; align-items: center; margin-top: 9px; flex-wrap: wrap; }
.round { font: 11.5px/1 var(--mono); padding: 4px 8px; border-radius: 5px;
         background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.round.done { background: var(--good-soft); color: var(--good); border-color: var(--good); }
.round.now { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 700; }
.arrow { color: var(--ink-3); font-size: 11px; }

.noteline { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
            font-size: 13.5px; color: var(--ink-2); }
.noteline b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ queue */

.headline {
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: var(--radius); padding: 15px 18px; margin-bottom: 26px;
}
.headline-num { font-size: 26px; font-weight: 700; color: var(--accent); letter-spacing: -.02em; }
.headline-txt { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.prod-ctx { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.acts { display: flex; gap: 7px; margin-top: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ forms */

.backlink {
  appearance: none; border: 0; background: none; padding: 0; font: inherit;
  color: var(--accent); cursor: pointer; font-size: 13.5px; margin-bottom: 10px;
}
.form { display: grid; gap: 10px; max-width: 460px; }
.form label { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.form input, .form select {
  font: inherit; padding: 8px 10px; border-radius: 7px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); width: 100%;
}
.form-row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.err { color: var(--danger); font-size: 13.5px; }

/* ---------------------------------------------------------------- project map
   Ben's sheet: one row per song, stages across. The table scrolls inside its
   own box — the PAGE must never scroll sideways, or the sticky columns are
   scrolling against the thing they are pinned to. */

.maphead { display: flex; gap: 18px; align-items: flex-start;
           justify-content: space-between; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px;
          color: var(--ink-2); white-space: nowrap; padding-top: 6px; }

.sheet { border-collapse: separate; border-spacing: 0; font-size: 13px;
         white-space: nowrap; width: 100%; }
.sheet th {
  background: var(--surface-2); color: var(--ink-2);
  font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  padding: 9px 10px; text-align: left; white-space: nowrap;
}

/* The two parallel tracks, banded across the top. 18 flat headers gave no hint
   that Bumpers belongs to video and Mixer to audio. */
.sheet thead tr.bands th {
  font-size: 10px; letter-spacing: .11em; font-weight: 700;
  color: var(--ink-3); padding: 7px 10px; border-bottom: 1px solid var(--line);
}
.sheet thead tr.bands th.b-video { background: var(--accent-soft); color: var(--ink-2); }
.sheet thead tr.bands th.b-audio { background: var(--good-soft); color: var(--ink-2); }

.sheet thead tr.cols th {
  position: sticky; top: 0; z-index: 3;
  border-bottom: 2px solid var(--line-strong);
}

/* Carries each band's boundary all the way down the table, so a column can be
   traced back to the track that owns it without scrolling up. */
.sheet .edge { border-left: 1px solid var(--line-strong); }
.sheet td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sheet tbody tr:hover td { background: var(--surface-2); }

/* The two columns you read the row by stay put while the stages scroll. */
.sheet th.stick, .sheet td.stick {
  position: sticky; background: var(--surface); z-index: 2;
  border-right: 1px solid var(--line);
}
.sheet th.stick { z-index: 5; background: var(--surface-2); }
.c-proj { left: 0; min-width: 168px; }
/* The shadow is the only thing that says "there is more to the right" — without
   it the table looks complete when half of it is off-screen. */
.c-song { left: 168px; min-width: 190px; font-weight: 600; color: var(--ink);
          box-shadow: 6px 0 8px -6px rgba(0, 0, 0, .28); }

.sheet .grp td {
  background: var(--surface-2); font-weight: 700; font-size: 11px;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
  border-top: 2px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.sheet tr.done td { color: var(--ink-3); }
.sheet tr.done .c-song { text-decoration: line-through; color: var(--ink-3); font-weight: 500; }

.tick { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; vertical-align: -3px; }
.tick:disabled { cursor: default; opacity: .55; }
.sheet td.mid { text-align: center; }

.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink);
           cursor: pointer; text-align: left; }
.linkish:hover { color: var(--accent); text-decoration: underline; }

.lnk {
  font: 600 10.5px/1 var(--sans); letter-spacing: .04em;
  padding: 4px 8px; border-radius: 5px; text-decoration: none;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent);
}
.lnk.ghost { background: transparent; color: var(--ink-3); border-color: var(--line-strong); font-weight: 500; }
.dash { color: var(--line-strong); }
.sheet .who { font-size: 12.5px; color: var(--ink-2); }

/* `.pri` is gone with the Pri column — every row read "2" under a heading that
   already said "Priority 2". */

.sealed { color: var(--good); font-weight: 700; }
.flag { margin-left: 5px; font: 600 10px/1 var(--sans); text-transform: uppercase;
        letter-spacing: .05em; color: var(--warn); background: var(--warn-soft);
        border-radius: 4px; padding: 3px 5px; vertical-align: 1px; }

/* A 54px sliver with no number cannot distinguish 2/5 from 3/5, so the count
   leads and the bar backs it up. */
.prog { display: inline-flex; align-items: center; gap: 8px; }
.prog b { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 12px;
          color: var(--ink-2); }
.rowbar { width: 46px; height: 6px; border-radius: 3px; background: var(--line);
          overflow: hidden; display: inline-block; vertical-align: middle; }
.rowbar span { display: block; height: 100%; background: var(--good); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px;
          color: var(--ink-3); margin: 16px 0 0; align-items: center; }
