/* Campaign Desk. The campaign's colors and type, set for work rather than
 * for show: one column, big targets, the state of each page visible at a
 * glance. No JavaScript, and nothing loaded from anywhere else. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/desk-static/fonts/plus-jakarta-sans-latin-var.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Spline Sans Mono";
  src: url("/desk-static/fonts/spline-sans-mono-latin-var.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}

:root {
  --page: #F4F5F7;
  --surface: #FFFFFF;
  --tint: #E9EDF2;
  --ink: #1B2938;
  --heading: #13294B;
  --muted: #4A5563;
  --line: #DDE3EA;
  --edge: #C9D0D8;
  --field: #FFFFFF;
  --field-line: #8B95A1;
  --link: #1F4E8C;
  --accent: #C8102E;
  --navy: #13294B;
  --navy-deep: #0C1B33;
  --on-navy: #FFFFFF;
  --on-navy-muted: #C9D3E0;
  --live: #1D6B43;    --live-bg: #E3F2EA;
  --draft: #8A5A00;   --draft-bg: #FBF0D9;
  --stop: #A30D26;    --stop-bg: #FBE7EA;
  --note: #1F4E8C;    --note-bg: #E6EEF9;
  --shadow: rgba(19, 41, 75, 0.12);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0B1422; --surface: #15223A; --tint: #111D30; --ink: #E4EAF2;
    --heading: #F2F5FA; --muted: #A9B6C6; --line: #2A3A52; --edge: #050A14;
    --field: #0E1828; --field-line: #5F7088; --link: #8FB8F2; --accent: #FF8194;
    --navy: #102240; --navy-deep: #08111F; --on-navy: #FFFFFF; --on-navy-muted: #C9D3E0;
    --live: #7FD6A6; --live-bg: #12301F; --draft: #F2C46B; --draft-bg: #33270C;
    --stop: #FF97A6; --stop-bg: #3A1219; --note: #8FB8F2; --note-bg: #142844;
    --shadow: rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
.wrap { max-width: 920px; margin-inline: auto; padding-inline: 18px; }

/* the bar across the top */
.bar { background: var(--navy-deep); color: var(--on-navy); }
.bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; min-height: 58px; }
.brand { color: var(--on-navy); text-decoration: none; font-weight: 800; font-size: 18px;
  letter-spacing: 0.02em; text-transform: uppercase; }
.brand small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--on-navy-muted); }
.bar nav { display: flex; flex-wrap: wrap; gap: 4px 18px; flex: 1; }
.bar nav a { color: var(--on-navy); text-decoration: none; font-weight: 600; padding: 12px 0;
  border-bottom: 3px solid transparent; }
.bar nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.bar form { margin: 0; }
.bar button { background: transparent; color: var(--on-navy); border: 1px solid var(--on-navy-muted);
  border-radius: 8px; min-height: 40px; padding: 0 14px; font: inherit; font-weight: 600; cursor: pointer; }

.state { background: var(--navy); color: var(--on-navy-muted); font-size: 14px; }
.state-inner { display: flex; flex-wrap: wrap; gap: 4px 22px; padding-block: 8px; }
.state strong { color: var(--on-navy); font-weight: 700; }

main { padding-block: 26px 64px; display: flex; flex-direction: column; gap: 26px; }
h1 { margin: 0; font-weight: 800; font-size: clamp(26px, 5vw, 34px); line-height: 1.1;
  color: var(--heading); text-transform: uppercase; text-wrap: balance; }
h2 { margin: 0; font-weight: 800; font-size: 20px; color: var(--heading); text-transform: uppercase; }
h3 { margin: 0; font-size: 16px; color: var(--heading); }
p { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.93em; }
.link-once { word-break: break-all; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; box-shadow: 0 3px 0 var(--edge), 0 10px 20px var(--shadow);
  display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.flash { padding: 12px 16px; border-radius: 10px; background: var(--note-bg); color: var(--ink);
  border-left: 4px solid var(--note); }
.flash.bad { background: var(--stop-bg); border-left-color: var(--stop); }

/* lists of pages */
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.items li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 0;
  border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items a.name { font-weight: 700; color: var(--heading); text-decoration: none; flex: 1 1 260px; min-width: 0; }
.items a.name:hover { text-decoration: underline; }
.items .when { font-size: 13.5px; color: var(--muted); }
.empty { color: var(--muted); padding: 6px 0; }

.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px;
  font-weight: 700; white-space: nowrap; }
.chip.live { color: var(--live); background: var(--live-bg); }
.chip.draft { color: var(--draft); background: var(--draft-bg); }
.chip.stop { color: var(--stop); background: var(--stop-bg); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: 0 18px; border-radius: 8px; border: 2px solid var(--heading); background: transparent;
  color: var(--heading); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #1B0A0E; } }
.btn.quiet { border-color: var(--edge); color: var(--ink); }
.btn.danger { border-color: var(--stop); color: var(--stop); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, button:focus-visible { outline: 3px solid #F2B705; outline-offset: 2px; }

/* forms */
form.editor { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-weight: 700; color: var(--heading); }
.field .help { font-size: 13.5px; color: var(--muted); }
.field input[type="text"], .field input[type="url"], .field input[type="date"],
.field input[type="number"], .field input[type="password"], .field input[type="time"],
.field select, .field textarea {
  width: 100%; border: 1.5px solid var(--field-line); border-radius: 8px; background: var(--field);
  color: var(--ink); font: inherit; min-height: 46px; padding: 8px 12px;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field textarea.body { min-height: 340px; font-size: 15.5px; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex-shrink: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.fields-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* review */
.finding { border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.finding.stop { background: var(--stop-bg); }
.finding.confirm { background: var(--draft-bg); }
.finding.note { background: var(--note-bg); }
.finding pre { margin: 0; white-space: pre-wrap; font-family: var(--font); font-size: 14.5px; }
.readonly { white-space: pre-wrap; background: var(--tint); border-radius: 8px; padding: 12px 14px;
  font-size: 15px; max-height: 380px; overflow: auto; }

table.log { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.log th, table.log td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line);
  vertical-align: top; }
table.log th { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.scroll { overflow-x: auto; }

/* the login and duty screens */
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px 18px; background: var(--navy-deep); }
.center .panel { width: min(420px, 100%); }
.center h1 { font-size: 26px; }

/* videos */
.clip { display: block; width: auto; max-width: 100%; max-height: 70vh; margin-inline: auto; border-radius: 10px;
  background: #000; }
img.clip { background: none; height: auto; }

/* the studio */
form.inline { display: inline; margin: 0; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card a { text-decoration: none; color: var(--heading); display: flex; flex-direction: column; gap: 6px; }
.card-title { font-weight: 700; overflow-wrap: anywhere; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; color: var(--muted); }
.card.dim { opacity: .6; }
.poster { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--tint);
  border: 1px solid var(--line); display: block; }
.poster.sound { display: flex; align-items: center; justify-content: center; font-size: 42px; color: var(--muted); }
.links { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.steps { margin: 0; padding-left: 20px; }
.steps .bad, .bad { color: var(--stop); }
img.clip.page { max-width: 520px; background: #fff; }
audio { width: 100%; }
.said label { font-family: var(--mono); font-weight: 600; font-size: 13.5px; color: var(--muted); }
.said-text { color: var(--muted); font-style: italic; font-size: 14.5px; }
.timeline { display: block; border-radius: 6px; overflow: hidden; background: var(--tint); }
.shots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.shot { border: 1px solid var(--line); border-left: 6px solid var(--note); border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px; background: var(--page); }
.shot.kind-broll { border-left-color: var(--live); }
.shot.kind-document { border-left-color: var(--draft); }
.shot.kind-natural { border-left-color: #5B3E99; }
.shot.kind-title { border-left-color: var(--stop); }
.shot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.shot-head select { min-height: 40px; border: 1.5px solid var(--field-line); border-radius: 8px;
  background: var(--field); color: var(--ink); font: inherit; padding: 4px 10px; }
.moves { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.field textarea.short { min-height: 70px; }
.fields-row.checks { gap: 10px 22px; }
.row.add select { min-height: 40px; border: 1.5px solid var(--field-line); border-radius: 8px;
  background: var(--field); color: var(--ink); font: inherit; padding: 4px 10px; }
.said-list li { flex-wrap: wrap; }
.said-list .name { font-weight: 500; color: var(--ink); flex: 1 1 280px; }
.empty-poster { background: repeating-linear-gradient(45deg, var(--tint), var(--tint) 8px, var(--page) 8px, var(--page) 16px); }
.chips { gap: 6px; }
.stories li { flex-direction: column; align-items: flex-start; }
.stories li > *, .stories a.name { flex: 0 0 auto; }
.stories .moves { margin-left: 0; }
