/* CATCH agents: the Pipeline Board. Navy, electric blue, chrome; Exo 2 for headings, Inter for text. */

@font-face { font-family: 'Exo 2'; src: url('/fonts/Exo2-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --navy: #0b1630;        /* page */
  --surface: #0f1e3e;     /* columns, dialogs */
  --raised: #172a52;      /* cards */
  --raised-hi: #1d3463;
  --line: #2a4072;
  --chrome: #d9e2ef;      /* body text: 13.9:1 on navy */
  --muted: #a3b3cc;       /* secondary text: 8.3:1 on navy, 6.9:1 on raised */
  --blue: #2f7bff;        /* accents */
  --blue-ink: #06102a;    /* text on blue: 4.9:1 */
  --blue-soft: rgba(47, 123, 255, 0.16);
  --focus: #9cc2ff;
  --amber: #f5c84b;
  --red: #ff8a8a;
  --red-soft: rgba(255, 122, 122, 0.14);
  --green: #5fd99a;
  --idle: #6f7f9c;

  --font-head: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --radius: 10px;
  --gutter: 24px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy);
  color: var(--chrome);
  font: 400 15px/1.5 var(--font-body);
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--focus); }
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--blue); color: var(--blue-ink); font-weight: 700; padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 8px;
  font: 700 14px/1 var(--font-body); color: var(--chrome);
  background: transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--blue); color: var(--blue-ink); }
.btn-primary:hover:not(:disabled) { background: #4d8eff; }
.btn-secondary { border-color: var(--line); background: var(--raised); }
.btn-secondary:hover:not(:disabled) { border-color: var(--blue); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover:not(:disabled) { color: var(--chrome); background: var(--raised); }
.btn-danger { border-color: rgba(255, 122, 122, 0.5); color: var(--red); }
.btn-danger:hover:not(:disabled) { background: var(--red-soft); }
.btn-icon { min-width: 38px; padding: 0; font-size: 20px; }
.btn-copy { min-height: 30px; padding: 0 10px; font-size: 13px; border: 1px solid var(--line); }

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

.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 22, 48, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 12px var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
}
.top-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.top-row-2 { gap: 16px; }

.brand { font-size: 20px; letter-spacing: 0.01em; color: var(--chrome); white-space: nowrap; }
.brand-mark { color: var(--blue); }

.agents { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; margin-right: auto; }
.agent {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 14px;
}
.agent .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--idle); flex: none; }
.agent-state { font-size: 12px; color: var(--muted); }
.agent.is-working { border-color: rgba(245, 200, 75, 0.45); }
.agent.is-working .dot { background: var(--amber); box-shadow: 0 0 0 0 rgba(245, 200, 75, 0.6); animation: pulse 1.8s ease-out infinite; }
.agent.is-working .agent-state { color: var(--amber); }
.agent.is-error { border-color: rgba(255, 122, 122, 0.5); }
.agent.is-error .dot { background: var(--red); }
.agent.is-error .agent-state { color: var(--red); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 200, 75, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(245, 200, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 200, 75, 0); }
}

.tabs { display: flex; gap: 4px; margin-right: auto; }
.tab {
  min-height: 38px; padding: 0 14px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font: 700 14px/1 var(--font-body); cursor: pointer;
}
.tab:hover { color: var(--chrome); background: var(--raised); }
.tab[aria-current='page'] { color: var(--chrome); background: var(--blue-soft); box-shadow: inset 0 -2px 0 var(--blue); }

.week { display: flex; align-items: center; gap: 2px; }
.week-label { min-width: 150px; color: var(--chrome); font-weight: 400; }
.week-label:disabled { opacity: 1; cursor: default; }

.budget { display: grid; gap: 5px; min-width: 190px; }
.budget-text { font-size: 13px; color: var(--muted); }
.budget-bar { display: block; height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.budget-fill { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 3px; transition: width 0.4s ease; }
.budget.is-over .budget-fill { background: var(--red); }
.budget.is-over .budget-text { color: var(--red); }

.banner {
  display: block; width: calc(100% - 2 * var(--gutter)); text-align: left; cursor: pointer;
  margin: 12px var(--gutter) 0; padding: 10px 14px; border-radius: 8px;
  border: 1px solid rgba(245, 200, 75, 0.4); background: rgba(245, 200, 75, 0.08); color: var(--amber);
  font: 700 14px/1.4 var(--font-body);
}
.banner:hover { background: rgba(245, 200, 75, 0.14); }
.banner::after { content: ' — show'; font-weight: 400; color: var(--muted); }

.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin: 12px var(--gutter) 0; padding: 8px 8px 8px 14px; border-radius: 8px;
  background: var(--blue-soft); font-size: 14px; font-weight: 700;
}

main { outline: none; }
.view { position: relative; padding: 20px var(--gutter) 48px; }
/* The board's heading is for screen readers, but shows as a tag while it holds focus ("Show all cards" sends it here). */
#board-heading:focus {
  position: absolute; top: 0; left: var(--gutter); z-index: 6; width: auto; height: auto; clip-path: none;
  padding: 2px 8px; border-radius: 6px; background: var(--raised); font-size: 12px; color: var(--chrome);
}
.view-head { display: grid; gap: 6px; margin-bottom: 20px; max-width: 70ch; }
.view-head h2 { font-size: 24px; }

/* ---------------------------------------------------------------- the board */

.board {
  display: flex; align-items: flex-start;
  overflow-x: auto; padding-bottom: 12px;
}

.col { flex: 1 1 0; min-width: 148px; padding: 0 5px; }
.col-side-first { margin-left: 22px; }

/* The track: one line through every column head, with a node per stage. Only the lanes waiting on Chris
   (Your tap, Ready to paste) light their node, and only while they hold cards. */
.col-head { position: relative; display: flex; align-items: center; gap: 0; padding: 4px 4px 14px; }
.col-head::before {
  content: ''; position: absolute; left: -5px; right: -5px; top: 15px; height: 2px; background: var(--line);
}
.col:first-child .col-head::before { left: 9px; }
.col:nth-child(7) .col-head::before { right: calc(100% - 14px); }
.col-side .col-head::before {
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 11px);
}
.col-side-first .col-head::before { left: 9px; }
.col:last-child .col-head::before { right: calc(100% - 14px); }

.node {
  position: relative; z-index: 1; flex: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--navy); border: 2px solid var(--line);
}
.col-tap.has-cards .node { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }

.col-name {
  position: relative; z-index: 1;
  font-size: 15px; background: var(--navy); margin-left: 4px; padding: 0 7px 0 6px; white-space: nowrap;
}
.col-count {
  position: relative; z-index: 1;
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: var(--navy); padding: 0 6px 0 0;
}
.col.has-cards .col-count { color: var(--chrome); }

.col-cards { list-style: none; display: grid; gap: 8px; }
.col-empty { font-size: 13px; color: var(--muted); padding: 10px 6px; border: 1px dashed var(--line); border-radius: var(--radius); }

.col-tap .col-cards, .col-tap .col-empty { background: var(--blue-soft); border-radius: 12px; padding: 6px; }
.col-tap .col-empty { border: 1px dashed rgba(47, 123, 255, 0.45); }

.tile {
  width: 100%; text-align: left; cursor: pointer;
  display: grid; gap: 6px; padding: 10px;
  background: var(--raised); color: var(--chrome);
  border: 1px solid #3a5591; border-radius: var(--radius);
  font: inherit;
}
.tile:hover { border-color: var(--blue); background: var(--raised-hi); }
.tile-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tile-title { font-weight: 700; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
/* The time and the round never break inside; on a narrow tile the round drops to its own line rather than being cut off. */
.tile-meta { font-size: 12.5px; color: var(--muted); }
.tile-meta > span { white-space: nowrap; }
.tile-round abbr { text-decoration: none; }
.slot.is-overdue { color: var(--red); font-weight: 700; }
.tile-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.thumb {
  width: 100%; height: 92px; object-fit: cover; border-radius: 6px;
  background: var(--navy); display: block; pointer-events: none;
  outline: 1px solid var(--line); outline-offset: -1px;
}

.chip {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
}
.chip-x { background: var(--chrome); color: var(--navy); }
.chip-tiktok { background: var(--blue-soft); color: #bcd3ff; box-shadow: inset 0 0 0 1px rgba(47, 123, 255, 0.55); }

.badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 5px; font-size: 12px; font-weight: 700; }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: rgba(245, 200, 75, 0.12); color: var(--amber); }

/* Phone only (see the phone section): the sticky row of column chips that replaces the track. */
.col-chips { display: none; }

/* ---------------------------------------------------------------- dialogs */

.sheet {
  width: min(1080px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  padding: 0; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--chrome);
  overflow: auto;
}
.sheet-small { width: min(560px, calc(100vw - 32px)); }
.sheet::backdrop { background: rgba(3, 8, 20, 0.72); }
.sheet > * { padding-left: 24px; padding-right: 24px; }
.sheet > .toasts.toasts { padding: 0; }

.sheet-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding-top: 16px; padding-bottom: 12px;
  background: var(--surface);
}
.sheet-head h2 { font-size: 20px; flex: 1; overflow-wrap: anywhere; outline-offset: 4px; }
.sheet-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13.5px; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.col-pill { color: var(--chrome); background: var(--raised); border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px; font-weight: 700; }
.sheet-body { padding-top: 16px; padding-bottom: 24px; display: grid; gap: 18px; }
.sheet-loading { padding: 24px; color: var(--muted); }
#job-form { padding-top: 0; padding-bottom: 20px; display: grid; gap: 16px; }

.sheet-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.sheet-main, .sheet-side { display: grid; gap: 18px; }
.sheet-section { display: grid; gap: 10px; }
.sheet-section > h3 { font-size: 16px; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* The card's actions: last in the DOM and drawn last, stuck to the bottom of the sheet so they stay in reach
   while Chris reads and copies. The send-back note and the cut confirmation open in the same place. */
.sheet-foot {
  position: sticky; bottom: 0; z-index: 2;
  padding-top: 12px; padding-bottom: 12px;
  background: var(--surface); border-top: 1px solid var(--line);
}
.sheet-foot .inline-form { padding: 0; border: 0; background: none; }
#card-dialog { scroll-padding-bottom: 96px; } /* a focused field is never hidden behind the action bar */

.copy-field { display: grid; gap: 6px; padding: 12px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); }
.copy-field-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.field-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.copy-text { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 68ch; }
.kv { display: grid; gap: 4px; }


.scenes summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.scenes ol { display: grid; gap: 8px; padding-left: 22px; }

.why { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.why dt { font-weight: 700; color: var(--muted); font-size: 13px; padding-top: 2px; }
.why dd { margin: 0; max-width: 60ch; }

.media { border-radius: var(--radius); overflow: hidden; background: #050b1a; border: 1px solid var(--line); }
.media video, .media img { display: block; width: 100%; max-height: 520px; object-fit: contain; background: #050b1a; }

.thread { list-style: none; display: grid; gap: 14px; }
.thread-round h4 { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.entries { list-style: none; display: grid; gap: 8px; border-left: 2px solid var(--line); padding-left: 12px; }
.entry { display: grid; gap: 6px; }
.entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.entry-who { font-weight: 700; font-size: 14px; color: var(--chrome); }
.entry-gist { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.verdict { padding: 1px 7px; border-radius: 5px; font-size: 12px; font-weight: 700; }
.verdict-pass { background: rgba(95, 217, 154, 0.14); color: var(--green); }
.verdict-fixes { background: var(--red-soft); color: var(--red); }
.fixes { display: grid; gap: 4px; font-size: 14px; }
.fixes-title { font-size: 12.5px; font-weight: 700; }
.fixes-must .fixes-title { color: var(--red); }
.fixes-should .fixes-title { color: var(--muted); }
.fixes ul { padding-left: 18px; display: grid; gap: 3px; }
.your-note { padding: 10px 12px; border-radius: 8px; background: var(--blue-soft); display: grid; gap: 4px; }

.lint { padding: 12px; border-radius: 8px; border: 1px solid var(--line); display: grid; gap: 8px; }
.lint-ok { border-color: rgba(95, 217, 154, 0.5); }
.lint-fail, .lint-warn { border-color: rgba(255, 122, 122, 0.5); }
.lint-title { font-weight: 700; }
.lint pre, pre.doc {
  margin: 0; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 13px/1.55 ui-monospace, 'Cascadia Mono', Consolas, monospace; color: var(--chrome);
  background: var(--navy); border: 1px solid var(--line); border-radius: 8px; padding: 12px;
  max-height: 420px; overflow: auto;
}

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

.field { display: grid; gap: 6px; }
input[type='text'], input[type='number'], textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--navy); color: var(--chrome);
  font: 400 15px/1.5 var(--font-body);
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible { border-color: var(--blue); }
.readonly { padding: 10px 0; font-weight: 700; }

.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choice legend { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0; margin-bottom: 6px; }
.choice-item {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--raised); cursor: pointer; font-weight: 700;
}
.choice-item:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.choice-item input { accent-color: var(--blue); width: 16px; height: 16px; margin: 0; }

.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-error { color: var(--red); background: var(--red-soft); padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.inline-form { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); }
.edit-form { display: grid; gap: 14px; }
.post-list { display: grid; gap: 12px; }
.post-row { display: grid; gap: 6px; justify-items: start; }

.settings { display: grid; gap: 18px; max-width: 760px; }
.settings-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

/* ---------------------------------------------------------------- design studio */

.runs { list-style: none; display: grid; gap: 10px; max-width: 900px; }
.run {
  width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--chrome);
  display: grid; gap: 8px; padding: 14px 16px;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
}
.run:hover { border-color: var(--blue); }
.run-top { display: flex; align-items: center; gap: 10px; }
.run-brief { font-weight: 700; overflow-wrap: anywhere; }
.run-error { color: var(--red); font-size: 14px; }
.runs-empty { display: grid; gap: 4px; padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius); }
.status { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); }
.status-running { color: var(--amber); border-color: rgba(245, 200, 75, 0.45); }
.status-queued { color: var(--muted); }
.status-done { color: var(--green); border-color: rgba(95, 217, 154, 0.45); }
.status-failed { color: var(--red); border-color: rgba(255, 122, 122, 0.5); }
.styles { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.style { padding: 3px 10px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line); color: var(--muted); }
.style.is-pick { color: var(--chrome); border-color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.pick-mark { font-weight: 400; color: var(--muted); }
.question { padding: 12px 14px; border-radius: var(--radius); background: var(--blue-soft); }

/* ---------------------------------------------------------------- toasts, logged out */

.toasts {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100;
  display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  padding: 12px 16px; border-radius: 10px; font-weight: 700; font-size: 14px;
  background: var(--chrome); color: var(--navy); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.toast-error { background: #ffd6d6; color: #5a0d0d; }

.logged-out { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; }

.char-count { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.char-count.is-over { color: var(--red); font-weight: 700; }
.post-row .char-count { margin-left: 0; }
.meta-note { flex-basis: 100%; color: var(--chrome); font-size: 14px; }

.doc-prose { display: grid; gap: 10px; font: 400 15px/1.6 var(--font-body); max-width: 68ch; }
.doc-prose h4, .doc-prose h5, .doc-prose h6 { font-family: var(--font-head); font-size: 16px; margin-top: 6px; }
.doc-prose h5, .doc-prose h6 { font-size: 15px; color: var(--muted); }
.doc-prose ul, .doc-prose ol { padding-left: 22px; display: grid; gap: 4px; }

/* ---------------------------------------------------------------- phone */

@media (max-width: 900px) {
  /* One column, with the video first: it is what Chris checks before copying the text. */
  .sheet-grid { grid-template-columns: 1fr; }
  .sheet-side { display: contents; }
  .media { order: -1; }
  .media video, .media img { max-height: 50vh; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  /* A sticky header would take half a phone screen; it scrolls away here. */
  .top { position: relative; padding-top: 10px; padding-bottom: 12px; gap: 8px; }
  .top-row { gap: 10px; }
  .agents { order: 3; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; overflow: visible; margin-right: 0; }
  .agent { justify-content: flex-start; padding: 6px 10px; }
  .brand { margin-right: auto; }
  /* Tabs on their own row; the week and the budget share the next one. */
  .top-row-2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; }
  .tabs { grid-column: 1 / -1; margin-right: 0; }
  .tab { flex: 1; padding: 0 8px; }
  .week { min-width: 0; }
  .week-label { flex: 1; min-width: 0; padding: 0 6px; }
  .budget { min-width: 0; }
  .budget-text { font-size: 12px; white-space: nowrap; }
  /* The budget bar becomes a 4 px strip along the bottom of the header. */
  .budget-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 0; }
  .budget-fill { border-radius: 0; }
  .wide-only { display: none; }
  .banner { min-height: 44px; }

  .btn, .tab, .choice-item, .btn-copy { min-height: 44px; }
  .btn-icon { min-width: 44px; }

  .board { scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 12px; }
  .col { flex: 0 0 88vw; min-width: 0; scroll-snap-align: start; }
  .col-side-first { margin-left: 16px; }
  .tile { padding: 12px; }
  .thumb { height: 120px; }

  .sheet { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; }
  .sheet > * { padding-left: 16px; padding-right: 16px; }
  .sheet-small { width: 100vw; }
  .settings-numbers { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 auto; }
  #card-dialog { scroll-padding-bottom: 136px; }

  /* The column chips replace the track header: one sticky row, so the board's header grows no taller. */
  /* The track heads stay for screen readers only, held inside their own column so they never widen the page. */
  .col { position: relative; }
  .col-head {
    position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .col-head::before { content: none; }
  .col-chips {
    display: flex; gap: 6px; position: sticky; top: 0; z-index: 5;
    margin: -8px calc(-1 * var(--gutter)) 10px; padding: 8px var(--gutter);
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    background: var(--navy); border-bottom: 1px solid var(--line);
  }
  .col-chips::-webkit-scrollbar { display: none; }
  .col-chip {
    flex: none; display: inline-flex; align-items: center; gap: 7px;
    min-height: 44px; padding: 0 12px; border-radius: 999px;
    border: 1px solid var(--line); background: transparent; color: var(--muted);
    font: 700 14px/1 var(--font-body); cursor: pointer; white-space: nowrap;
  }
  .col-chip.is-side { border-style: dashed; }
  .col-chip[aria-current='true'] { color: var(--chrome); border-color: var(--chrome); border-style: solid; }
  .col-chip-count {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; background: var(--raised); color: var(--chrome); font-variant-numeric: tabular-nums;
  }
  .col-chip.is-lit { color: var(--chrome); }
  .col-chip.is-lit .col-chip-count { background: var(--blue); color: var(--blue-ink); box-shadow: 0 0 0 3px var(--blue-soft); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .agent.is-working .dot { box-shadow: 0 0 0 3px rgba(245, 200, 75, 0.3); }
}
