:root {
  --paper: #f6ebdd;
  --ink: #1a1a1a;
  --muted: #6b625a;
  --rule: #e14b3b;
  --card: #fffaf3;
  --line: #d9cbb8;
  --ok: #2f7d4a;
  --no: #b3342b;
  --shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17140f; --ink: #f1e9dc; --muted: #a79c8e; --card: #221d16; --line: #3a3128;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font: 17px/1.5 -apple-system, "Helvetica Neue", Arial, sans-serif; }
main { max-width: 1120px; margin: 0 auto; padding: 32px 16px 64px; }
h1 { font-size: 40px; letter-spacing: -.02em; margin: 0 0 6px; }
h1 span { display: block; height: 4px; background: var(--rule); width: 72px; margin-top: 10px; }
h2 { font-size: 20px; margin: 40px 0 12px; }
p.lede { color: var(--muted); margin: 0 0 24px; }
.strip img, video { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow); background: #000; }
.strip img { background: var(--card); }
nav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 24px 0 0; }
a.btn, button { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer; }
a.btn.primary, button.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
button.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
button.no { background: var(--no); color: #fff; border-color: var(--no); }
button[disabled] { opacity: .5; cursor: default; }
.tabs { display: flex; gap: 6px; margin: 16px 0 24px; flex-wrap: wrap; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 0 0 18px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 4px; font-size: 19px; }
.card .sub { color: var(--muted); margin: 0 0 12px; }
.card .desc { white-space: pre-wrap; margin: 0 0 12px; }
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 0 0 14px; }
.imgs figure { margin: 0; }
.imgs img { width: 100%; height: auto; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.imgs figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions input { font: inherit; flex: 1 1 200px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.pill { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill.approved { color: var(--ok); border-color: var(--ok); }
.pill.denied { color: var(--no); border-color: var(--no); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; word-break: break-all; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar .who { color: var(--muted); font-size: 15px; }
footer { color: var(--muted); font-size: 14px; margin-top: 48px; }
body { -webkit-font-smoothing: antialiased; }
.err { color: var(--no); }
/* studio additions */
h1 em { font-style: normal; color: var(--muted); font-weight: 500; }
a.plain { color: inherit; text-decoration: none; }
.count { display: inline-block; font-size: 13px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--rule); color: #fff; vertical-align: middle; }
details.show { margin: 0 0 20px; }
details.show summary { cursor: pointer; list-style: none; }
details.show summary::-webkit-details-marker { display: none; }
details.show summary h2 { display: inline-block; margin: 8px 0; padding-bottom: 4px; border-bottom: 3px solid var(--rule); }
details.show summary::before { content: "▸ "; color: var(--muted); }
details.show[open] summary::before { content: "▾ "; }
h3.type { margin: 18px 0 10px; font-size: 16px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.gallery.tight { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery.tight img { background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.card h4 { margin: 16px 0 6px; font-size: 15px; }
table.procs { width: 100%; border-collapse: collapse; font-size: 14px; }
table.procs td { padding: 4px 8px 4px 0; border-top: 1px solid var(--line); vertical-align: top; }
table.procs td:first-child { white-space: nowrap; color: var(--muted); width: 1%; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: var(--muted); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(47,125,74,.2); }
.dot.off { background: var(--no); }
/* homepage */
.hero { padding: 24px 0 8px; }
.hero h1 { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-size: clamp(40px, 7vw, 68px); letter-spacing: -.01em; line-height: 1; }
.hero p.lede { font-size: 20px; max-width: 34em; }
.frame { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.frame figcaption { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; padding: 10px 4px 0; }
figure { margin: 0; }
.kicker { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--rule); font-weight: 700; margin: 40px 0 8px; }
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.trio div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.trio b { display: block; margin-bottom: 4px; }
.trio p { margin: 0; color: var(--muted); font-size: 15px; }
footer.site { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
button.chip { padding: 7px 14px; border-radius: 999px; font-weight: 500; }
button.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
button.chip .count { background: transparent; color: inherit; opacity: .7; padding: 0; }
h2.gallery-title { margin: 8px 0 14px; padding-bottom: 6px; border-bottom: 3px solid var(--rule); display: inline-block; }
h2.gallery-title em { font-style: normal; color: var(--muted); font-weight: 500; }
.banner { background: #fff3cd; color: #5c4400; border: 1px solid #e6c25a; border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .banner { background: #3a2e05; color: #f5dd8a; border-color: #7a6220; } }
/* the strip: whole on a wide screen, one panel per row on a phone */
.strip-stack { display: none; }
.strip-stack img { display: block; width: 100%; height: auto; border-radius: 6px; }
.strip-stack img + img { margin-top: 10px; }
@media (max-width: 700px) {
  .strip-wide { display: none; }
  .strip-stack { display: block; }
  main { padding: 20px 16px 48px; }
  .hero { padding: 8px 0 4px; }
  .hero p.lede { font-size: 17px; }
  .frame { padding: 10px; }
  .kicker { margin-top: 28px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery.tight { grid-template-columns: repeat(2, 1fr); }
  .imgs { grid-template-columns: repeat(2, 1fr); }
}
.episode .ep-title { font-weight: 600; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; text-transform: capitalize; }
details.versions { margin-top: 8px; font-size: 14px; color: var(--muted); }
details.versions summary { cursor: pointer; }
details.versions .version { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
