/* Saffron Rider · the viewer side (/watch, /comic, /explore) and the Studio's frame.
   One instrument language, from the live site and the Chirp field kit: ink on stone underneath, hairlines,
   letterspaced mono labels in a left column, calibrated rulers, square corners. Saffron is the live signal only:
   the playing cut, the selected row, the playhead. Palette and type = canon §4 (landing.css, studio/site.css). */
:root {
  --bg: #0e0d0c; --bar: #141210; --stone: #171513; --line: #2e2a26; --hair: #3a342d;
  --fg: #efe9e1; --muted: #a39b91; --dim: #6f675e;
  --saffron: #f28c1e; --accent: #f6a04d; --ink: #090807; --paper: #eee3cd;
  --display: Anton, "Arial Narrow", sans-serif; --body: "IBM Plex Sans", Arial, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  --substrate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .93 0 0 0 0 .89 0 0 0 0 .82 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --graticule: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M0 .5H120M.5 0V120' stroke='%23efe9e1' stroke-opacity='.035'/%3E%3Cpath d='M56 .5h8M.5 56v8' stroke='%23efe9e1' stroke-opacity='.09'/%3E%3C/svg%3E");
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--fg); font: 15px/1.55 var(--body); }
body { margin: 0; min-height: 100vh; background: var(--substrate), var(--graticule), var(--bg); }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mono, .label { font: 500 11px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.label { color: var(--muted); }

/* The bar: wordmark, the viewer's four doors, then Studio set apart behind a hairline. */
.sr-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px;
          padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 0; background: rgb(20 18 16 / .96); border-bottom: 1px solid var(--line); }
.sr-mark { padding-bottom: 8px; font: 24px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; }
.sr-mark span { color: var(--saffron); }
.sr-nav { display: flex; align-items: stretch; order: 3; width: 100%; margin: 0 -8px; overflow-x: auto; scrollbar-width: none; }
.sr-nav a { position: relative; display: flex; align-items: baseline; gap: 7px; min-height: 44px; padding: 14px 8px 0; color: var(--muted);
            font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.sr-nav a small { color: var(--dim); font-size: 9px; letter-spacing: .08em; }
.sr-nav a:hover { color: var(--fg); }
.sr-nav a[aria-current] { color: var(--fg); }
.sr-nav a[aria-current]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: var(--saffron); }
.sr-nav a[aria-current] small { color: var(--saffron); }
.sr-nav .studio { margin-left: auto; padding-left: 12px; border-left: 1px solid var(--line); }
@media (max-width: 759px) { .sr-nav a small { display: none; } .sr-nav a { padding-left: 8px; padding-right: 8px; } }
@media (min-width: 760px) {
  .sr-bar { flex-wrap: nowrap; padding: 0 24px; gap: 28px; }
  .sr-mark { padding: 0; font-size: 26px; }
  .sr-nav { order: 0; width: auto; flex: 1 1 auto; margin: 0; }
  .sr-nav a { min-height: 54px; padding: 22px 12px 0; }
  .sr-nav a[aria-current]::after { left: 12px; right: 12px; }
}

/* Page head: crumb, display title, an italic lede. */
.sr-page { max-width: 1240px; margin: 0 auto; padding: 22px 16px 64px; }
.sr-crumb { margin: 0 0 14px; color: var(--dim); font: 500 10px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; }
.sr-crumb b { color: var(--muted); font-weight: 500; }
.sr-head { display: grid; gap: 8px 32px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sr-head h1 { margin: 0; font: clamp(40px, 9vw, 64px)/.95 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.sr-lede { margin: 0; max-width: 560px; color: #d8d0c5; font-style: italic; font-size: 16px; }
@media (min-width: 900px) { .sr-head { grid-template-columns: auto 1fr; align-items: end; } .sr-page { padding: 30px 24px 80px; } }

/* Registration marks: four L corners on whatever holds a picture. */
.reg { position: relative; }
.reg::before, .reg::after, .reg > .reg-b::before, .reg > .reg-b::after { content: ""; position: absolute; width: 12px; height: 12px; border: 0 solid var(--muted); pointer-events: none; }
.reg::before { left: -7px; top: -7px; border-left-width: 1px; border-top-width: 1px; }
.reg::after { right: -7px; top: -7px; border-right-width: 1px; border-top-width: 1px; }
.reg > .reg-b::before { left: -7px; bottom: -7px; border-left-width: 1px; border-bottom-width: 1px; }
.reg > .reg-b::after { right: -7px; bottom: -7px; border-right-width: 1px; border-bottom-width: 1px; }

/* Labelled rows: a mono label column, the value beside it, hairlines between. */
.rows { margin: 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); border-top: 1px solid var(--line); }
.rows > dt, .rows > dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rows > dt { color: var(--muted); font: 500 10px/1.9 var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.rows > dd { color: #ddd5cb; }

/* Square tags; the live one carries the only filled dot. */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px; border: 1px solid var(--hair); color: var(--muted);
       font: 500 10px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 50%; }
.tag.live { color: var(--fg); }
.tag.live::before { background: var(--saffron); border-color: var(--saffron); }

/* Segmented switch (frame 16:9 / 9:16, cut A / B): outlined, square, the chosen one inked in. */
.seg { display: inline-flex; border: 1px solid var(--hair); }
.seg button { min-height: 34px; padding: 0 12px; border: 0; border-left: 1px solid var(--hair); background: none; color: var(--muted);
              font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--ink); }
.seg button:disabled { color: var(--dim); cursor: default; text-decoration: line-through; }

/* The calibrated ruler under a cut: one tick a second, a long one every ten, numbered; the playhead is the signal. */
.ruler { position: relative; height: 34px; margin-top: 10px; cursor: pointer; touch-action: none; user-select: none; }
.ruler svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ruler .t { stroke: var(--dim); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ruler .t5 { stroke: var(--muted); }
.ruler .t10 { stroke: var(--fg); }
.ruler .base { stroke: var(--hair); vector-effect: non-scaling-stroke; }
.ruler .n { position: absolute; top: 22px; transform: translateX(-50%); color: var(--dim); font: 500 9px/1 var(--mono); letter-spacing: .06em; }
.ruler .run { position: absolute; left: 0; top: 0; height: 2px; background: var(--muted); }
.ruler .head { position: absolute; top: -4px; bottom: 12px; width: 0; border-left: 1px solid var(--muted); }
.ruler .head::before { content: ""; position: absolute; left: -4px; top: 0; border: 4px solid transparent; border-top-color: currentColor; }
.ruler.playing .run { background: var(--saffron); }
.ruler.playing .head { border-color: var(--saffron); color: var(--saffron); }
.readout { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 4px; color: var(--muted); font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.readout .state::before { content: "○ "; }
.readout .state.on { color: var(--saffron); }
.readout .state.on::before { content: "● "; }

.sr-foot { max-width: 1240px; margin: 0 auto; padding: 18px 16px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px;
           border-top: 1px solid var(--line); color: var(--dim); font: 500 10px/1.6 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.sr-foot a { color: var(--muted); text-decoration: none; margin-right: 14px; }
.sr-foot a:hover { color: var(--fg); }
@media (min-width: 900px) { .sr-foot { padding: 20px 24px 44px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
