/* Papaya Studio. A neutral light table so renders read true; papaya-ripe yellow marks picks. */
:root {
  --table: #dcdcd9;      /* page: neutral grey, no colour cast on the work */
  --sheet: #f2f2ef;      /* panels */
  --sheet-2: #e7e7e3;
  --ink: #1d1e20;
  --ink-2: #5d5f61;
  --rule: #c5c5c1;
  --ripe: #f5c518;       /* picks, selection */
  --ripe-ink: #231c1a;   /* papaya seed */
  --leaf: #2f6b3a;       /* thumbs up, saved */
  --coral: #c9472f;      /* thumbs down, problems */
  --mat: #cfcfcb;        /* behind images */
  --focus: #1d1e20;
  --radius-xs: 4px;
  --radius-s: 6px;
  --radius-m: 12px;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --table: #2b2c2d; --sheet: #343537; --sheet-2: #3d3e40; --ink: #ececea; --ink-2: #a9aaa7;
    --rule: #4a4b4d; --leaf: #6fbf7c; --coral: #f0846c; --mat: #252627; --focus: #f5c518; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --table: #2b2c2d; --sheet: #343537; --sheet-2: #3d3e40; --ink: #ececea; --ink-2: #a9aaa7;
  --rule: #4a4b4d; --leaf: #6fbf7c; --coral: #f0846c; --mat: #252627; --focus: #f5c518; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--table); color: var(--ink); font: 400 15px/1.5 var(--font); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 14px 16px;
  display: flex; flex-direction: column; gap: 20px; border-right: 1px solid var(--rule); }
.main { padding: 28px 40px 120px; min-width: 0; outline: none; }
.brand { display: flex; align-items: center; text-decoration: none; font-weight: 800;
  font-size: 18px; letter-spacing: -0.01em; padding: 0 6px; }
.nav-group h2 { font-size: 13px; font-weight: 500; color: var(--ink-2); margin: 0 6px 6px; }
.nav > a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: var(--radius-s);
  text-decoration: none; font-size: 14px; }
.nav > a:hover { background: var(--sheet-2); }
.nav > a[aria-current="page"] { background: var(--sheet); font-weight: 650; }
.nav .count { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.nav .char { font-weight: 650; font-size: 15px; }
.nav .sub { padding-left: 18px; }
.nav.tools > a { justify-content: flex-start; align-items: center; gap: 10px; padding: 7px 8px; }
.nav.tools svg { width: 28px; height: 28px; flex: none; padding: 6px; border-radius: var(--radius-s); background: var(--ripe); color: var(--ripe-ink); }
.nav.tools b { display: block; font-weight: 650; }
.nav.tools small { display: block; font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.side-foot { margin-top: auto; font-size: 13px; color: var(--ink-2); padding: 0 6px; display: grid; gap: 8px; }
.notice { background: var(--sheet); border-radius: var(--radius-s); padding: 10px; color: var(--ink); }
.notice b { font-weight: 650; }
.notice code, .help code { font-size: 12px; background: var(--sheet-2); padding: 1px 4px; border-radius: var(--radius-xs); }
.quiet { background: none; border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 3px 8px;
  cursor: pointer; font-size: 13px; color: var(--ink-2); justify-self: start; text-decoration: none; }
.side-note { margin: 4px 8px 0; }

/* ---------- headings ---------- */
.crumbs { font-size: 14px; color: var(--ink-2); margin: 0 0 6px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 800;
  margin: 0 0 10px; }
.char-name { font-size: clamp(64px, 10vw, 128px); letter-spacing: -0.045em; line-height: .9; margin-bottom: 14px; }
.lede { font-size: 18px; max-width: 60ch; margin: 0 0 18px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; color: var(--ink-2);
  margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px;
  font-size: 13px; font-weight: 500; background: var(--sheet); color: var(--ink); text-decoration: none; }
.chip.review { background: var(--ink); color: var(--table); }
h3.section { font-size: 20px; letter-spacing: -0.01em; margin: 36px 0 12px; font-weight: 650; }

/* ---------- stage rail: the real sequence of the workflow ---------- */
.rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 26px 0 8px;
}
.stage { position: relative; padding: 14px 14px 12px 0; text-decoration: none; border-top: 3px solid var(--rule); }
.stage.has { border-top-color: var(--ink); }
.stage .n { font-size: 13px; color: var(--ink-2); }
.stage .name { display: block; font-weight: 650; font-size: 17px; }
.stage .what { font-size: 13px; color: var(--ink-2); }
.stage:hover .name { text-decoration: underline; }

/* ---------- round list ---------- */
.rounds { display: grid; gap: 10px; }
.round-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center;
  background: var(--sheet); border-radius: var(--radius-m); padding: 14px 16px; text-decoration: none; }
.round-row:hover { background: var(--sheet-2); }
.round-row h4 { margin: 0 0 2px; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.round-row p { margin: 0; font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; max-width: 70ch; }
.round-row .facts { display: flex; gap: 12px; font-size: 13px; color: var(--ink-2); margin-top: 6px; flex-wrap: wrap; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin: 8px 0 20px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; text-decoration: none; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .count { font-variant-numeric: tabular-nums; margin-left: 4px; }

/* ---------- take grid ---------- */
.toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; }
.toolbar label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 14px; }
.take { position: relative; margin: 0; }
.take .frame { display: block; position: relative; aspect-ratio: 9 / 16; background: var(--mat); text-decoration: none; color: inherit;
  border-radius: var(--radius-s); overflow: hidden; }
.take img, .take video { width: 100%; height: 100%; object-fit: cover; display: block; }
.take.picked .frame { box-shadow: 0 0 0 3px var(--ripe); }
.take.scratch .frame { outline: 1px dashed var(--ink-2); outline-offset: 3px; }
.badge { position: absolute; left: 8px; bottom: 8px; background: var(--ripe); color: var(--ripe-ink);
  font-size: 12px; font-weight: 650; padding: 1px 8px; border-radius: 999px; }
.take figcaption { padding: 8px 2px 0; font-size: 13px; line-height: 1.4; }
.take .file { font-weight: 650; font-size: 14px; word-break: break-all; }
.take .tool { color: var(--ink-2); }
.take .why { margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.take .tally { display: flex; gap: 10px; color: var(--ink-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.pick-box { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid #fff; background: rgba(0,0,0,.35); cursor: pointer; display: grid; place-items: center;
  color: #fff; font-size: 14px; opacity: 0; transition: opacity .12s; }
.take:hover .pick-box, .pick-box:focus-visible, .pick-box[aria-pressed="true"] { opacity: 1; }
.pick-box[aria-pressed="true"] { background: var(--ink); border-color: var(--ripe); }
.ph { display: grid; place-items: center; text-align: center; padding: 12px; font-size: 13px; color: var(--ink-2);
  height: 100%; }
.ph code { font-size: 12px; }

/* ---------- take detail overlay ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; background: var(--table); display: grid;
  grid-template-columns: minmax(0, 1fr) 400px; }
.overlay[hidden] { display: none; }
.stagearea { position: relative; display: grid; place-items: center; padding: 24px 64px; min-height: 0;
  background: var(--mat); }
.stagearea img, .stagearea video { max-width: 100%; max-height: calc(100vh - 48px); object-fit: contain;
  border-radius: var(--radius-s); }
.panel { background: var(--sheet); overflow-y: auto; padding: 20px 22px 32px; border-left: 1px solid var(--rule); }
.panel h2 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.015em; word-break: break-all; }
.close { position: absolute; top: 14px; left: 14px; }
.step { position: absolute; top: 50%; transform: translateY(-50%); }
.step.prev { left: 14px; } .step.next { right: 14px; }
.btn { white-space: nowrap; border: 1px solid var(--rule); background: var(--sheet); border-radius: var(--radius-s); padding: 6px 12px;
  cursor: pointer; font-weight: 500; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.btn:hover { background: var(--sheet-2); }
.btn.primary { background: var(--ink); color: var(--table); border-color: var(--ink); }
.btn.primary:hover { opacity: .9; }
.btn.round { border-radius: 999px; width: 40px; height: 40px; justify-content: center; padding: 0; font-size: 18px; }
.btn[disabled] { opacity: .5; cursor: default; }
.pickline { background: var(--ripe); color: var(--ripe-ink); border-radius: var(--radius-s); padding: 8px 10px;
  margin: 12px 0; font-size: 14px; }
.pickline.no { background: var(--sheet-2); color: var(--ink); }
dl.record { display: grid; grid-template-columns: 84px 1fr; gap: 6px 10px; font-size: 14px; margin: 14px 0; }
dl.record dt { color: var(--ink-2); }
dl.record dd { margin: 0; word-break: break-word; }
dl.record dt.prompt, dl.record dd.prompt { grid-column: 1 / -1; }
dl.record dd.prompt { white-space: pre-wrap; background: var(--table); padding: 8px 10px; border-radius: var(--radius-s); margin-bottom: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }

/* ---------- feedback ---------- */
.fb { margin-top: 22px; }
.fb h3 { font-size: 16px; margin: 0 0 10px; font-weight: 650; }
.reacts { display: flex; gap: 6px; margin-bottom: 8px; }
.react { border: 1px solid var(--rule); background: var(--sheet); border-radius: 999px; padding: 3px 12px; cursor: pointer;
  font-size: 15px; font-variant-numeric: tabular-nums; }
.react[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--table); }
.composer { display: grid; gap: 8px; }
.composer textarea { width: 100%; min-height: 70px; resize: vertical; border: 1px solid var(--rule); border-radius: var(--radius-s);
  background: var(--table); padding: 8px 10px; }
.composer .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.thread { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.thread li { font-size: 14px; }
.thread .who { font-weight: 650; }
.thread .when { color: var(--ink-2); font-size: 12px; margin-left: 6px; }
.thread .local { font-size: 12px; color: var(--coral); margin-left: 6px; }
.thread .on { font-size: 12px; color: var(--ink-2); }
.r-up { color: var(--leaf); } .r-down { color: var(--coral); } .r-heart { color: var(--coral); }

/* ---------- storyboard: the phone animatic ---------- */
.board { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: start; }
.phone { position: sticky; top: 24px; width: min(340px, 80vw); aspect-ratio: 9 / 16; background: var(--ripe-ink);
  border-radius: 34px; padding: 10px; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.screen { position: relative; width: 100%; height: 100%; border-radius: 26px; overflow: hidden; background: #000; }
.screen img, .screen video { width: 100%; height: 100%; object-fit: cover; display: block; }
.segments { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; }
.segments span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.segments i { display: block; height: 100%; width: 0; background: #fff; }
.caption { position: absolute; left: 16px; right: 16px; bottom: 18%; text-align: center; color: #fff; font-weight: 800;
  font-size: 19px; line-height: 1.2; text-shadow: 0 0 3px #000, 0 1px 2px #000, 0 0 12px rgba(0,0,0,.6); z-index: 2; }
.player-bar { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; font-size: 14px;
  color: var(--ink-2); font-variant-numeric: tabular-nums; }
.shots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shot { display: grid; grid-template-columns: 34px 64px minmax(0, 1fr); gap: 12px; padding: 10px; border-radius: var(--radius-m);
  background: var(--sheet); cursor: pointer; align-items: start; border: 2px solid transparent; }
.shot[aria-current="true"] { border-color: var(--ink); }
.shot .num { font-weight: 800; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.shot .thumb { width: 64px; aspect-ratio: 9 / 16; border-radius: var(--radius-xs); overflow: hidden; background: var(--mat); }
.shot .thumb img, .shot .thumb video { width: 100%; height: 100%; object-fit: cover; }
.shot .act { font-weight: 500; }
.shot .line { font-size: 13px; color: var(--ink-2); }
.shot .line b { color: var(--ink); font-weight: 500; }
.problems { background: var(--sheet); border-left: 3px solid var(--coral); padding: 10px 14px; border-radius: var(--radius-xs);
  font-size: 14px; margin-bottom: 16px; }

/* ---------- pages (markdown) ---------- */
.doc-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.doc-pills a { padding: 5px 12px; border-radius: 999px; background: var(--sheet-2); text-decoration: none; font-size: 14px; }
.doc-pills a:hover { background: var(--sheet); }
.doc-pills a[aria-current="page"] { background: var(--ink); color: var(--table); font-weight: 650; }
.page-wrap { display: grid; grid-template-columns: 170px minmax(0, 880px); gap: 32px; align-items: start; }
.page-wrap.no-outline { grid-template-columns: minmax(0, 880px); }
.no-outline .outline { display: none; }
.page-fb { position: sticky; top: 20px; background: var(--sheet); border-radius: var(--radius-m); padding: 16px 18px;
  max-height: calc(100vh - 40px); overflow-y: auto; }
.page-fb .fb { margin-top: 0; }
.page-fb details { margin-top: 14px; }
.page-fb summary { cursor: pointer; }
#doc mark { background: color-mix(in srgb, var(--ripe) 45%, transparent); color: inherit; border-radius: 3px; cursor: pointer; padding: 0 1px; }
.select-pop { position: absolute; z-index: 15; transform: translateX(-50%); display: flex; gap: 6px; padding: 4px;
  background: var(--sheet); border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.select-pop .btn { border-radius: 999px; }
.select-pop[hidden] { display: none; }
.fb-quote blockquote, .thread blockquote.q { margin: 0 0 6px; padding: 4px 10px; border-left: 3px solid var(--ripe); background: var(--table);
  font-size: 13px; color: var(--ink-2); border-radius: 0 4px 4px 0; }
.thread blockquote.q { cursor: pointer; }
.fb-quote .clear { background: none; border: 0; padding: 0; font-size: 12px; color: var(--ink-2); text-decoration: underline; cursor: pointer; }
.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { outline: 3px solid var(--ripe); outline-offset: 2px; } to { outline: 3px solid transparent; outline-offset: 2px; } }
.prose { background: var(--sheet); border-radius: var(--radius-m); padding: 28px 36px; line-height: 1.6; }
.prose p, .prose li, .prose blockquote { max-width: 72ch; }
.prose h1 { font-size: 30px; } .prose h2 { font-size: 22px; margin: 1.6em 0 .4em; } .prose h3 { font-size: 17px; margin: 1.4em 0 .3em; }
.table-wrap { overflow-x: auto; margin: 1em 0; }
.prose table { border-collapse: collapse; font-size: 14px; }
.prose td, .prose th { border-top: 1px solid var(--rule); padding: 6px 10px; text-align: left; vertical-align: top; }
.prose code { font-size: .9em; background: var(--sheet-2); padding: 1px 4px; border-radius: var(--radius-xs); }
.prose pre { background: var(--sheet-2); padding: 12px; border-radius: var(--radius-s); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1em 0; padding-left: 14px; border-left: 3px solid var(--rule); color: var(--ink-2); }
.prose img { max-width: 100%; cursor: zoom-in; border-radius: var(--radius-xs); }

/* ---------- compare tray + view ---------- */
.tray { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 10; background: var(--ink);
  color: var(--table); border-radius: 999px; padding: 6px 6px 6px 18px; display: flex; gap: 12px; align-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 14px; }
.tray[hidden] { display: none; }
.tray .btn { background: var(--ripe); color: var(--ripe-ink); border: 0; border-radius: 999px; font-weight: 650; }
.tray .clear { background: transparent; color: var(--table); border: 0; cursor: pointer; text-decoration: underline; }
.compare { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 16px; padding: 64px 20px 20px;
  height: 100vh; overflow-x: auto; grid-column: 1 / -1; }
.compare figure { margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; min-width: 200px; min-height: 0; }
.compare .cmedia { position: relative; background: var(--mat); border-radius: var(--radius-s); min-height: 0; overflow: hidden; }
.compare .cmedia img, .compare .cmedia video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.compare figcaption { font-size: 13px; }

/* ---------- misc ---------- */
.empty { color: var(--ink-2); max-width: 60ch; }
.help { font-size: 14px; color: var(--ink-2); max-width: 70ch; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 30; background: var(--ink); color: var(--table); padding: 10px 14px;
  border-radius: var(--radius-s); font-size: 14px; opacity: 0; transform: translateY(8px); transition: opacity .15s, transform .15s;
  pointer-events: none; max-width: 360px; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 100px; }
  .stage { padding-right: 6px; } .stage .name { font-size: 14px; } .stage .what { display: none; }
  .round-row { grid-template-columns: 1fr; }
  .overlay { grid-template-columns: 1fr; grid-template-rows: 55vh auto; overflow-y: auto; }
  .stagearea { padding: 56px 12px 12px; }
  .stagearea img, .stagearea video { max-height: calc(55vh - 68px); }
  .panel { border-left: 0; overflow: visible; }
  .board { grid-template-columns: 1fr; }
  .phone { position: static; margin: 0 auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .menu-btn { display: inline-flex; position: sticky; top: 0; z-index: 9; margin: 12px 16px 0; }
  .side { display: none; }
  body.menu-open .side { display: flex; position: fixed; inset: 0; z-index: 20; height: 100vh; flex-direction: column;
    background: var(--table); padding: 20px 16px; overflow-y: auto; }
  body.menu-open .side .nav-group h2, body.menu-open .side-foot { display: block; }
  body.menu-open .nav { display: grid; }
  .prose { padding: 18px; }
  .review-drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 70vh; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- calm reading ---------- */
.outline { position: sticky; top: 20px; display: grid; gap: 2px; font-size: 13px; }
.outline p { margin: 0 0 6px; color: var(--ink-2); }
.outline a { text-decoration: none; color: var(--ink-2); padding: 3px 0 3px 10px; border-left: 2px solid var(--rule); }
.outline a:hover { color: var(--ink); border-left-color: var(--ink); }
.review-drawer { position: fixed; top: 16px; right: 16px; bottom: 16px; width: min(380px, calc(100vw - 32px)); max-height: none;
  z-index: 12; box-shadow: 0 12px 40px rgba(0,0,0,.22); padding-top: 18px; }
.review-drawer[hidden] { display: none; }
.drawer-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; font-size: 18px; }
.review-drawer .fb h3 { padding-right: 40px; }
.review-toggle { position: fixed; right: 20px; bottom: 20px; z-index: 11; border: 0; border-radius: 999px; padding: 10px 18px;
  background: var(--ink); color: var(--table); font-weight: 650; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.review-toggle[hidden] { display: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 1em 0 1.4em; }
.card { position: relative; background: var(--table); border-radius: var(--radius-m); padding: 14px 16px; }
.card h4 { margin: 0 0 4px; font-size: 16px; padding-right: 40px; line-height: 1.3; }
.card-id { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ripe); color: var(--ripe-ink); font-weight: 800; font-size: 14px; }
.card dl { margin: 0; }
.card dt { font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.card dd { margin: 0; font-size: 14px; line-height: 1.45; }
.lightbox { grid-column: 1 / -1; height: 100vh; display: grid; place-items: center; align-content: center; padding: 56px 72px 24px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: var(--radius-s); }
.lightbox p { color: var(--ink-2); margin: 10px 0 0; text-align: center; font-size: 14px; }
.quiet-notice { font-size: 13px; }
.quiet-notice summary { cursor: pointer; list-style: none; }
.quiet-notice summary::-webkit-details-marker { display: none; }
.quiet-notice .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); margin-right: 6px; }
.quiet-notice p { margin: 6px 0; }
.menu-btn { display: none; }
@media (max-width: 1100px) { .page-wrap { grid-template-columns: minmax(0, 1fr); } .outline { display: none; } }

/* ---------- bring work in ---------- */
dialog.ask { border: 0; border-radius: var(--radius-m); padding: 22px 24px; width: min(460px, calc(100vw - 32px));
  background: var(--sheet); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.ask::backdrop { background: rgba(0,0,0,.35); }
dialog.ask h2 { margin: 0 0 14px; font-size: 20px; letter-spacing: -0.01em; }
dialog.ask label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
dialog.ask input { font-size: 15px; color: var(--ink); background: var(--table); border: 1px solid var(--rule);
  border-radius: var(--radius-s); padding: 8px 10px; }
dialog.ask small { font-size: 12px; }
dialog.ask .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.filecard { height: 100%; display: grid; align-content: center; justify-items: start; gap: 6px; padding: 16px; font-size: 13px;
  color: var(--ink-2); background: var(--sheet-2); }
.filecard b { color: var(--ink); font-size: 14px; word-break: break-word; }
.filecard .ext { font-weight: 800; font-size: 12px; letter-spacing: .02em; color: var(--ink); background: var(--table);
  border-radius: var(--radius-xs); padding: 2px 6px; }
.filecard.link .ext { background: var(--ripe); color: var(--ripe-ink); }
.filecard audio { width: 100%; }
.stagearea .filecard { width: min(420px, 90%); height: auto; border-radius: var(--radius-m); }
iframe.pdf { width: 100%; height: calc(100vh - 48px); border: 0; border-radius: var(--radius-s); background: #fff; }
body.dropping::after { content: "Drop to add to this round"; position: fixed; inset: 12px; z-index: 30; display: grid;
  place-items: center; font-size: 22px; font-weight: 650; color: var(--ink); background: color-mix(in srgb, var(--ripe) 22%, transparent);
  border: 3px dashed var(--ink); border-radius: var(--radius-m); pointer-events: none; }

/* ---------- scale: round cards, search ---------- */
.round-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.round-card { display: grid; grid-template-rows: auto 1fr; background: var(--sheet); border-radius: var(--radius-m); overflow: hidden;
  text-decoration: none; }
.round-card:hover { background: var(--sheet-2); }
.round-card .cover { aspect-ratio: 9 / 16; background: var(--mat); display: grid; place-items: center; overflow: hidden; }
.round-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.round-card .cover span { color: var(--ink-2); font-weight: 650; }
.round-card .body { padding: 12px 14px 14px; }
.round-card h4 { margin: 0 0 4px; font-size: 16px; line-height: 1.3; letter-spacing: -0.01em; }
.round-card .facts { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.search input { width: 100%; font-size: 14px; padding: 7px 10px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--sheet); }
.hits { display: grid; gap: 8px; max-width: 820px; }
.hit { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 14px; background: var(--sheet); border-radius: var(--radius-m); text-decoration: none; }
.hit:hover { background: var(--sheet-2); }
.hit-kind { font-size: 12px; color: var(--ink-2); padding-top: 2px; }
.hit b { font-weight: 650; }
.hit-round { font-size: 12px; color: var(--ink-2); margin-left: 8px; }
.hit p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }

/* ---------- hover notes ---------- */
.note { position: relative; display: inline-block; width: 8px; height: 8px; margin: 0 2px 0 3px; vertical-align: 0.35em;
  border-radius: 50%; background: var(--ink-2); opacity: .55; cursor: help; }
.note:hover, .note:focus { opacity: 1; outline: none; }
.note::after { content: attr(data-note); position: absolute; left: 50%; bottom: 150%; transform: translateX(-50%);
  width: max-content; max-width: 280px; padding: 6px 10px; border-radius: var(--radius-s); background: var(--ink); color: var(--table);
  font-size: 13px; line-height: 1.4; font-weight: 400; white-space: normal; z-index: 5; pointer-events: none;
  opacity: 0; transition: opacity .12s; }
.note:hover::after, .note:focus::after { opacity: 1; }

/* ---------- videos ---------- */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 380px)); gap: 20px; }
.vid { margin: 0; background: var(--sheet); border-radius: var(--radius-m); overflow: hidden; }
.vid video { display: block; width: 100%; max-height: 72vh; background: #000; }
.vid.picked { box-shadow: 0 0 0 3px var(--ripe); }
.vid.scratch { outline: 1px dashed var(--ink-2); outline-offset: 3px; }
.vid figcaption { padding: 10px 12px 12px; font-size: 13px; display: grid; gap: 4px; }
.vid figcaption a { font-size: 13px; }
.vid figcaption .badge { justify-self: start; }

.script { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 14px; }
.script th, .script td { text-align: left; vertical-align: top; padding: 6px 10px; border-bottom: 1px solid var(--rule); }
.script td:nth-child(3) { min-width: 18ch; }

/* Tags, and the search / filter / sort bar over round lists */
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--rule); border-radius: 999px; padding: 1px 9px;
  font-size: 12px; line-height: 1.6; color: var(--ink-2); background: none; }
.tag.on { background: var(--ripe); color: var(--ripe-ink); border-color: var(--ripe); }
.tag.auto { border-style: dashed; }
.tag small { opacity: .7; }
.tag button { border: 0; background: none; padding: 0 0 0 2px; cursor: pointer; color: inherit; font-size: 14px; line-height: 1; }
.tags.editor { margin: -4px 0 12px; }
.tag.add, .tags.filter .tag { cursor: pointer; }
.tag.add:hover, .tags.filter .tag:hover { border-color: var(--ink-2); }
.list-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 16px; }
.list-bar input[type=search] { flex: 1 1 240px; max-width: 360px; border: 1px solid var(--rule); background: var(--sheet);
  border-radius: var(--radius-s); padding: 6px 10px; }
.list-bar select { border: 1px solid var(--rule); background: var(--sheet); border-radius: var(--radius-s); padding: 6px 8px; }
.list-bar .tags.filter { flex-basis: 100%; margin: 0; }

/* Small layout helpers used by the templates (instead of inline styles) */
.badge.inline { position: static; }
.prose.narrow { max-width: 520px; }
.fill { height: 100%; }
.center { text-align: center; }
.gap-top { margin-top: 20px; } .gap-top-s { margin-top: 8px; }
.ph.on-dark { color: #fff; }
.help.tight { margin: 0 0 6px; }
.section.small { font-size: 16px; margin: 26px 0 0; }
.crumbs.flush { margin: 0; }
.pick-box .tick:empty { display: none; }

/* Segmented choice (Sketch's length and model) and inline form checks */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; border: 1px solid var(--rule); border-radius: 999px; padding: 5px 14px; font-size: 14px; background: var(--sheet); }
.seg input:checked + span { background: var(--ripe); color: var(--ripe-ink); border-color: var(--ripe); font-weight: 650; }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.num { width: 5em; font: inherit; padding: 3px 6px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--sheet); color: var(--ink); }
#sk-write > label { display: grid; gap: 6px; }

/* Admin page */
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn + .btn { margin-left: 6px; }

/* Hosted sign-in page */
body.signin { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.signin-card { width: min(400px, 100%); background: var(--sheet); border-radius: var(--radius-m); padding: 28px 28px 24px; }
.signin-card h1 { margin: 0 0 4px; }
.signin-card .btn.wide { display: flex; justify-content: center; width: 100%; padding: 10px 12px; }
.signin-card .or { text-align: center; color: var(--ink-2); font-size: 13px; margin: 18px 0 10px; }
.signin-card label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.signin-card input { font: inherit; font-size: 15px; color: var(--ink); background: var(--table); border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 8px 10px; }
