/* Loop Forge. One stylesheet for every page; tools/build.py writes the HTML. */

:root {
  --paper: #f3f2f8;
  --paper-2: #e9e7f2;
  --sheet: #fbfbfe;
  --ink: #1c1a33;
  --ink-2: #57536f;
  --rule: #d9d6e6;
  --accent: #b8266f;
  --accent-ink: #fff;
  /* reference colours come from the logo's gradient; <Picture 1> is always pink, and so on */
  --p1: #d6338a; --p2: #8646d8; --p3: #2f63e0; --p4: #0f8fa6; --p5: #b86e00;
  --mark: rgba(214, 51, 138, .11);
  --mark-2: rgba(47, 99, 224, .1);
  --shadow: 0 1px 0 rgba(28, 26, 51, .04), 0 12px 32px -18px rgba(28, 26, 51, .28);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --script: "Courier Prime", "Courier New", ui-monospace, monospace;
  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
/* Dark follows the system unless the header toggle has stored a choice (data-theme on <html>).
   The same tokens appear twice because a media query and an attribute selector cannot share one rule. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #13121f; --paper-2: #1c1b2c; --sheet: #1a1929;
    --ink: #ecebf5; --ink-2: #a5a1bd; --rule: #2f2d45;
    --accent: #f06bb8; --accent-ink: #1a0b14;
    --p1: #f06bb8; --p2: #b58af5; --p3: #7ea2fa; --p4: #4fc9dd; --p5: #f0b35a;
    --mark: rgba(240, 107, 184, .16); --mark-2: rgba(126, 162, 250, .15);
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #13121f; --paper-2: #1c1b2c; --sheet: #1a1929;
  --ink: #ecebf5; --ink-2: #a5a1bd; --rule: #2f2d45;
  --accent: #f06bb8; --accent-ink: #1a0b14;
  --p1: #f06bb8; --p2: #b58af5; --p3: #7ea2fa; --p4: #4fc9dd; --p5: #f0b35a;
  --mark: rgba(240, 107, 184, .16); --mark-2: rgba(126, 162, 250, .15);
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: "opsz" 14;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; }

.wrap { max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--sheet); padding: 8px 12px; }

/* ------------------------------------------------------------------ top bar */

.top { border-bottom: 1px solid var(--rule); background: var(--paper); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700;
  font-size: 19px; letter-spacing: -.01em; font-variation-settings: "opsz" 32; }
.brand img { width: 38px; height: 38px; }
.top nav { margin-left: auto; display: flex; gap: 4px 20px; flex-wrap: wrap; }
.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--rule);
}
.theme-toggle:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-2); }
.theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.top nav a { text-decoration: none; color: var(--ink-2); font-size: 16px; padding: 6px 0; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }
.top nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 560px) {
  .top .wrap { gap: 2px 16px; padding-block: 10px; }
  .top nav { order: 3; flex-basis: 100%; margin-left: 0; gap: 0 16px; }
  .top nav a { font-size: 15px; padding: 4px 0; }
  .theme-toggle { margin-left: auto; }
}

/* ------------------------------------------------------------------ type */

.display {
  font-weight: 750;
  font-variation-settings: "opsz" 96, "wdth" 88;
  font-stretch: 88%;
  letter-spacing: -.022em;
  line-height: .95;
  margin: 0;
}
h1.display { font-size: clamp(46px, 8.4vw, 116px); }
h1.page-title { font-size: clamp(38px, 6vw, 76px); }
h2.section {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 700;
  font-variation-settings: "opsz" 48, "wdth" 85;
  font-stretch: 85%;
  letter-spacing: -.02em;
  line-height: 1.05;
  margin: 0 0 20px;
}
h3 { font-size: 20px; line-height: 1.25; margin: 0 0 6px; font-weight: 650; letter-spacing: -.01em; }
.lede { font-size: clamp(18px, 1.9vw, 21px); color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-2); }
.small { font-size: 14.5px; }

section.block { padding-block: clamp(44px, 7vw, 88px); border-top: 1px solid var(--rule); }
section.block:first-of-type { border-top: 0; }

/* ------------------------------------------------------------------ home banner */

/* A silent reel of generated clips behind the headline. The poster frame stands in until it plays,
   and stays for anyone who prefers reduced motion. */
.banner {
  /* no overflow clipping: the search results drop down past the banner's bottom edge */
  position: relative; z-index: 2; isolation: isolate; color: #fff; background: #0d0c17;
  min-height: clamp(520px, 78vh, 760px); display: grid; align-items: end;
}
.banner-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(13, 12, 23, .35) 0%, rgba(13, 12, 23, .12) 30%, rgba(13, 12, 23, .6) 62%, rgba(13, 12, 23, .92) 100%),
    linear-gradient(90deg, rgba(13, 12, 23, .5) 0%, rgba(13, 12, 23, 0) 60%);
}
.banner-body { width: 100%; padding-block: 120px clamp(56px, 8vw, 96px); }
.banner .display { font-size: clamp(44px, 7vw, 104px); max-width: 14ch; color: #fff; text-wrap: balance; }
.banner .lede { color: rgba(255, 255, 255, .86); margin-top: 22px; max-width: 54ch; }
.banner-credit {
  position: absolute; right: var(--gutter); bottom: 18px; font-size: 13.5px; color: rgba(255, 255, 255, .7);
  text-decoration: none;
}
.banner-credit:hover { color: #fff; }
.reel-toggle {
  position: absolute; right: var(--gutter); top: 18px; font: inherit; font-size: 14px; color: rgba(255, 255, 255, .85);
  background: rgba(13, 12, 23, .45); border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.reel-toggle:hover { color: #fff; background: rgba(13, 12, 23, .7); }
@media (max-width: 560px) {
  .banner-body { padding-bottom: 76px; }
  .banner-credit { left: var(--gutter); right: auto; }
}

/* ------------------------------------------------------------------ search */

.finder { position: relative; max-width: 620px; margin-top: 30px; }
.finder input {
  width: 100%; font: inherit; font-size: 18px; padding: 16px 20px 16px 52px; border-radius: 14px; border: 0;
  color: var(--ink); box-shadow: var(--shadow);
  background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%238a86a3%22 stroke-width=%222.2%22 stroke-linecap=%22round%22%3E%3Ccircle cx=%2210.5%22 cy=%2210.5%22 r=%226.5%22/%3E%3Cpath d=%22m20 20-4.6-4.6%22/%3E%3C/svg%3E") no-repeat 18px center / 22px;
}
.finder input:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.finder-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; max-height: min(70vh, 560px); overflow: auto;
  background: var(--sheet); color: var(--ink); border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55);
  padding: 6px; text-align: left;
}
.finder-results a {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 10px;
  text-decoration: none; color: var(--ink);
}
.finder-results a:hover, .finder-results a:focus-visible { background: var(--paper-2); outline: none; color: var(--ink); }
.finder-results img { width: 72px; height: 46px; object-fit: cover; border-radius: 6px; background: var(--paper-2); }
.finder-results b { display: block; font-weight: 600; line-height: 1.25; }
.finder-results small { display: block; color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.finder-results .none { padding: 12px 10px; color: var(--ink-2); margin: 0; }

/* ------------------------------------------------------------------ home sections */

.hero { padding-block: clamp(48px, 8vw, 104px) clamp(28px, 4vw, 48px); }
.hero .display { max-width: 15ch; }
.hero .lede { margin-top: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 28px; }

.button {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font-weight: 600; font-size: 16px; padding: 12px 20px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: inherit;
}
.button:hover { background: var(--accent); color: var(--accent-ink); }
.button.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.button.quiet:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); background: transparent; }

.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.block-head h2 { margin: 0; }
.block-head a { font-weight: 600; }

.latest { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px clamp(28px, 5vw, 64px); align-items: center; }
.latest-thumb { display: block; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); background: #000; }
.latest-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s ease; }
.latest-thumb:hover img { transform: scale(1.02); }
.section-label { font-size: 16px; font-weight: 600; color: var(--accent); margin: 0 0 4px; }
.when { font-size: 15px; color: var(--ink-2); margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.latest-title { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.05; letter-spacing: -.02em; font-weight: 700;
  font-variation-settings: "opsz" 48, "wdth" 90; font-stretch: 90%; margin: 0 0 14px; }
.latest-title a { text-decoration: none; }
.latest .lede { font-size: 18px; }
.count { font-size: 15px; color: var(--ink-2); }
@media (max-width: 860px) { .latest { grid-template-columns: 1fr; } }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 40px 28px; }
.video-card { display: block; text-decoration: none; min-width: 0; }
.video-card .thumb { border-radius: 10px; overflow: hidden; background: #000; margin-bottom: 14px; }
.video-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s ease; }
.video-card:hover img { transform: scale(1.03); }
.video-card h3 { font-size: 22px; line-height: 1.15; letter-spacing: -.015em; margin: 0 0 8px; }
.video-card:hover h3 { color: var(--accent); }
.video-card p { color: var(--ink-2); margin: 0 0 8px; font-size: 15.5px; line-height: 1.5; }
.video-card .when { margin-bottom: 4px; }
.video-card .count { margin: 0; }

.browse { display: grid; gap: 22px; }
.browse h3 { font-size: 16px; font-weight: 600; color: var(--ink-2); margin: 0 0 10px; }

.about { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(24px, 5vw, 72px); align-items: start; }
.about p { max-width: 58ch; font-size: 18px; }
.about .facts { margin-top: 64px; }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; } .about .facts { margin-top: 0; } }

/* ------------------------------------------------------------------ findings, on video pages */

.topics { display: grid; }
.topic {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px clamp(24px, 5vw, 72px);
  padding-block: clamp(28px, 4vw, 44px); border-top: 1px solid var(--rule); scroll-margin-top: 24px;
}
.topic:first-child { border-top: 0; padding-top: 4px; }
.question {
  font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; line-height: 1.08; letter-spacing: -.02em;
  font-variation-settings: "opsz" 48, "wdth" 88; font-stretch: 88%; margin: 0; max-width: 20ch;
}
.topic-a { max-width: 64ch; }
.topic-a p { font-size: 18px; line-height: 1.6; margin-bottom: 16px; }
.topic-links { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 16px; }
.topic-links a { font-weight: 600; }
@media (max-width: 800px) { .topic { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; font-size: 15px;
  padding: 7px 14px; border-radius: 999px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule);
  color: var(--ink); cursor: pointer; font-family: inherit; border: 0;
}
.chip small { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.chip[aria-pressed="true"] small { color: inherit; opacity: .7; }

.repos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; }
.repos a { display: block; padding: 16px 0; border-top: 1px solid var(--rule); text-decoration: none; }
.repos a b { display: block; font-weight: 650; }
.repos a span { color: var(--ink-2); font-size: 15px; }
.repos a:hover b { color: var(--accent); }

/* ------------------------------------------------------------------ contact sheet (prompt grids) */

.sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 28px 18px; }
.sheet.portrait { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.frame { display: block; text-decoration: none; min-width: 0; }
.frame .img { position: relative; border-radius: 6px; overflow: hidden; background: var(--paper-2); aspect-ratio: 16 / 10; }
.sheet.portrait .frame .img { aspect-ratio: 9 / 14; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.frame:hover img { transform: scale(1.03); }
.frame .code {
  position: absolute; left: 8px; bottom: 8px; font-size: 12.5px; padding: 2px 8px; border-radius: 4px;
  background: rgba(19, 18, 31, .72); color: #fff; font-variant-numeric: tabular-nums;
}
.frame h3 { font-size: 17px; margin: 10px 0 2px; font-weight: 600; }
.frame:hover h3 { color: var(--accent); }
.frame p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.group + .group { margin-top: clamp(40px, 6vw, 64px); }
.group > header { margin-bottom: 18px; max-width: var(--measure); }
.group > header h2 { margin-bottom: 6px; }

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

.crumbs { font-size: 15px; color: var(--ink-2); padding-top: 28px; }
.crumbs a { color: var(--ink-2); }
.col-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px clamp(24px, 5vw, 72px);
  padding-block: 20px clamp(40px, 6vw, 72px); align-items: start; }
.col-head .page-title { margin-bottom: 26px; }
.col-head.single { grid-template-columns: 1fr; }
.col-head .summary p { max-width: 62ch; }
.col-head .summary p:first-child { font-size: clamp(18px, 1.8vw, 21px); }
@media (max-width: 900px) { .col-head { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 24px 0 0; font-size: 15.5px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .facts { gap: 6px 14px; } }

.notice { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin: 24px 0 0; max-width: 62ch; }

/* The video is a thumbnail that opens YouTube, so plays happen where viewers can subscribe */
.yt { position: relative; display: grid; place-items: end start; padding: 14px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  background: #000; box-shadow: var(--shadow); text-decoration: none; }
.yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.yt .play { position: relative; display: inline-flex; align-items: center; gap: 10px; background: rgba(19, 18, 31, .82);
  color: #fff; padding: 12px 20px 12px 16px; border-radius: 999px; font-size: 16px; font-weight: 600; }
.yt .play::before { content: ""; width: 0; height: 0; border-left: 13px solid currentColor;
  border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.yt:hover .play, .yt:focus-visible .play { background: var(--accent); color: var(--accent-ink); }
.yt-caption { font-size: 14.5px; color: var(--ink-2); margin-top: 10px; }

.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 18px; }
.ref { margin: 0; }
.ref a { display: block; border-radius: 6px; overflow: hidden; background: var(--paper-2); }
.ref img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.ref figcaption { font-size: 14.5px; margin-top: 6px; line-height: 1.3; }
.ref figcaption span { display: block; color: var(--ink-2); font-size: 13.5px; }

.links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; max-width: 760px; }
.links a { display: block; padding: 13px 0; border-top: 1px solid var(--rule); text-decoration: none; }
.links li:last-child a { border-bottom: 1px solid var(--rule); }
.links a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ prompt page */

.p-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 28px clamp(24px, 4vw, 56px);
  padding-block: 18px 40px; align-items: start; }
.p-head .page-title { grid-column: 1 / -1; max-width: 22ch; }
.p-head .code-line { grid-column: 1 / -1; margin: -12px 0 0; color: var(--ink-2); font-size: 16px; }
.still { margin: 0; }
.still img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); background: var(--paper-2); }
.still.portrait img { max-height: 78vh; width: auto; margin-inline: auto; }
.outputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 14px; margin: 0; }
.outputs figure { margin: 0; }
.outputs img { width: 100%; border-radius: 8px; background: var(--paper-2); }
.outputs figcaption { font-size: 14.5px; margin-top: 6px; }
.outputs .won { color: var(--accent); font-weight: 650; }
.aside > * + * { margin-top: 26px; }
.aside .facts { margin-top: 0; grid-template-columns: max-content 1fr; }
.watch { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.watch::before { content: ""; width: 0; height: 0; border-left: 11px solid var(--accent);
  border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
@media (max-width: 900px) { .p-head { grid-template-columns: 1fr; } }

.wiring { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.wiring li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; font-size: 15px; line-height: 1.3; }
.wiring img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; background: var(--paper-2); }
.wiring .blank { width: 52px; height: 52px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--rule); }
.wiring small { display: block; color: var(--ink-2); font-size: 13.5px; }

/* The prompt itself */
.script-wrap { padding-block: 8px clamp(48px, 7vw, 88px); }
.script-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 24px; margin-bottom: 14px; max-width: 900px; }
.script-bar h2 { margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs [role="tab"] {
  font: inherit; font-size: 15px; border: 0; cursor: pointer; padding: 8px 14px; border-radius: 8px;
  background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--rule);
}
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.script-bar .button { margin-left: auto; }
.variant-note { max-width: var(--measure); color: var(--ink-2); margin: 0 0 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14.5px; color: var(--ink-2); margin: 0 0 14px; }
.legend span::before { content: ""; display: inline-block; width: 26px; height: 10px; margin-right: 8px; border-radius: 2px; vertical-align: 1px; }
.legend .l-gear::before { background: var(--mark-2); box-shadow: inset 0 -2px 0 var(--p3); }
.legend .l-clause::before { background: var(--mark); box-shadow: inset 0 -2px 0 var(--p1); }

.script {
  font-family: var(--script);
  font-size: 16.5px;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--sheet);
  color: var(--ink);
  padding: clamp(20px, 4vw, 52px) clamp(18px, 5vw, 64px);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 900px;
  margin: 0;
  tab-size: 2;
}
@media (max-width: 520px) { .script { font-size: 14.5px; line-height: 1.65; } }
.script .k { font-weight: 700; color: var(--ink); }
.script .shot { font-weight: 700; color: var(--ink-2); }
.script .t {
  --c: var(--ink-2);
  color: var(--c);
  font-weight: 700;
  border-radius: 3px;
  transition: background-color .15s;
}
.script .t.pic { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--c) 45%, transparent); }
.script .t.lit { background: color-mix(in srgb, var(--c) 18%, transparent); }
.script .d { font-style: italic; }
.script .h-gear { background: var(--mark-2); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--p3) 55%, transparent); }
.script .h-clause { background: var(--mark); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--p1) 55%, transparent); }
.c1, .script .t.c1 { --c: var(--p1); } .c2, .script .t.c2 { --c: var(--p2); } .c3, .script .t.c3 { --c: var(--p3); }
.c4, .script .t.c4 { --c: var(--p4); } .c5, .script .t.c5 { --c: var(--p5); }
.tagdot { display: inline-block; font-weight: 700; color: var(--c, var(--ink-2)); font-size: 14px; }

.notes { max-width: var(--measure); }
.verdict { max-width: var(--measure); border-left: 3px solid var(--accent); padding-left: 18px; }
.verdict b { display: block; font-size: 22px; letter-spacing: -.01em; margin-bottom: 4px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-block: 28px 64px; border-top: 1px solid var(--rule); }
.pager a { text-decoration: none; display: block; }
.pager a span { display: block; font-size: 14.5px; color: var(--ink-2); }
.pager a b { font-weight: 600; font-size: 18px; }
.pager a:hover b { color: var(--accent); }
.pager .next { text-align: right; grid-column: 2; }

.copied { color: var(--accent); }

/* Affiliate links always carry their disclosure right underneath */
.affiliate a { font-weight: 600; }
.affiliate small { display: block; color: var(--ink-2); font-size: 13.5px; line-height: 1.4; margin-top: 2px; }
.affiliate.inline { margin: 4px 0 0; font-size: 15px; }
.links .affiliate { padding: 13px 0; border-top: 1px solid var(--rule); margin: 0; }
.links .affiliate a { display: inline; padding: 0; border: 0; }
.plain { padding-bottom: clamp(32px, 5vw, 56px); }
.aside-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 12px; }
.group-title { font-size: 24px; font-weight: 700; letter-spacing: -.015em; margin: 0 0 6px; }

/* ------------------------------------------------------------------ footer */

.foot { border-top: 1px solid var(--rule); padding-block: 36px 56px; font-size: 15px; color: var(--ink-2); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.foot a { color: var(--ink-2); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
