/* The Tour — the docs' front page. The top (what Tubcal is, the install
   command, a guide to what's in it), then one stop per part, most with a demo. */

/* ── the slim bar ─────────────────────────────────────────────────────────── */
.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  transform: translateY(-110%);
  transition: transform 0.35s var(--hand);
  padding: 10px 16px 0;
  pointer-events: none;
}
.bar.show {
  transform: none;
}
.bar-in {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(var(--shell) + 40px);
  margin: 0 auto;
  padding: 7px 8px 7px 16px;
  border-radius: var(--r-modal);
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--ink-2) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}
.bar-mark {
  font-size: 24px;
}
.bar .chswitch {
  flex: none;
  width: 170px;
}
.bar-stops {
  display: flex;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.bar-stops::-webkit-scrollbar {
  display: none;
}
.bar-stops a {
  flex: none;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--paper-faint);
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.bar-stops a:hover {
  color: var(--paper);
}
.bar-stops a.on {
  color: var(--paper);
  background: var(--surface-hover);
  box-shadow: inset 0 -2px 0 var(--stop-c, var(--signal));
}
.bar-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
  margin-left: auto;
}
.bar .searchbtn {
  width: 150px;
}
@media (max-width: 1100px) {
  .bar-stops {
    display: none;
  }
}
@media (max-width: 720px) {
  .bar {
    padding: 8px 8px 0;
  }
  .bar-in {
    gap: 8px;
    padding: 6px 6px 6px 12px;
  }
  .bar .chswitch {
    width: auto;
  }
  .bar .searchbtn {
    width: auto;
  }
  .bar-search-l,
  .bar .searchbtn kbd,
  .bar-skin-l {
    display: none;
  }
}
@media (max-width: 420px) {
  .bar-mark {
    display: none;
  }
}

/* ── the top: what it is, and how to get it ───────────────────────────────── */
.hero {
  position: relative;
  padding-top: var(--space-4);
  padding-bottom: var(--space-6);
}
.hero-top {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule);
}
.skinlink {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--paper-faint);
  transition: color 0.15s ease;
}
.skinlink:hover {
  color: var(--signal);
}
.hero-toplinks {
  display: flex;
  gap: 18px;
}
.hero-toplinks a {
  color: var(--paper-faint);
  transition: color 0.15s ease;
}
.hero-toplinks a:hover {
  color: var(--signal);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas: 'main guide' 'facts facts';
  gap: var(--space-6) var(--space-7);
  align-items: start;
  margin-top: var(--space-7);
}
.hero-main {
  grid-area: main;
  min-width: 0;
}
.hero-guide {
  grid-area: guide;
  min-width: 0;
}
.hero-facts {
  grid-area: facts;
}
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'main' 'facts' 'guide';
    margin-top: var(--space-6);
  }
}
.hero-mark {
  font-size: clamp(64px, 9vw, 112px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  animation: rise 0.7s var(--hand) both;
}
.hero-tag {
  margin-top: var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-style: italic;
  font-weight: 420;
  line-height: 1.25;
  color: var(--paper);
  animation: rise 0.7s var(--hand) 0.06s both;
}
.hero-sub {
  max-width: 52ch;
  margin-top: var(--space-3);
  font-size: 16.5px;
  color: var(--paper-dim);
  animation: rise 0.7s var(--hand) 0.1s both;
}
.hero-install {
  margin-top: var(--space-5);
  animation: rise 0.7s var(--hand) 0.14s both;
}
.hero-install .codeblock {
  margin: 0;
}
/* show the whole command rather than a scroll: people read it before pasting */
.hero-install pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.nobr {
  white-space: nowrap;
}
.hero-note {
  max-width: 60ch;
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--paper-faint);
}
.hero-note a {
  color: var(--signal);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--signal) 40%, transparent);
  text-underline-offset: 3px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--space-5);
  animation: rise 0.7s var(--hand) 0.18s both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* the guide: the app's rooms and views, like a TV listing */
.set {
  --ch: var(--signal);
  padding: 12px;
  border-radius: 26px;
  background:
    repeating-linear-gradient(92deg, transparent 0 7px, color-mix(in srgb, var(--paper) 2.5%, transparent) 7px 8px),
    linear-gradient(160deg, var(--ink-3), var(--ink-2) 55%, var(--ink));
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-card), inset 0 1px 0 color-mix(in srgb, var(--paper) 10%, transparent);
  animation: rise 0.7s var(--hand) 0.16s both;
}
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5) var(--space-4);
  border-radius: 18px / 22px;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--ch) 12%, transparent), transparent 65%),
    var(--ink);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--ch) 20%, transparent),
    inset 0 0 50px rgba(0, 0, 0, 0.45);
  isolation: isolate;
}
.scan {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.14) 2px 3px);
  mix-blend-mode: multiply;
}
.hg-head,
.hg-ch {
  position: relative;
  z-index: 2;
}
.hg-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.hg-head .kicker {
  color: var(--signal);
}
.hg-hint,
.hg-chhead span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
.hg-chhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.hg-chhead b {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--paper);
}
.hg-rooms {
  display: grid;
  gap: 1px;
  margin: 0 -8px;
  padding: 0;
  list-style: none;
}
.hg-rooms a {
  display: grid;
  grid-template-columns: 26px 168px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 9px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}
.hg-rooms a:hover,
.hg-rooms a:focus-visible {
  background: color-mix(in srgb, var(--room-c) 15%, transparent);
  outline: none;
}
.hg-no {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--room-c);
}
.hg-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--paper);
}
.hg-what {
  font-size: 13px;
  line-height: 1.4;
  color: var(--paper-dim);
}
.hg-what small {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
@media (max-width: 560px) {
  .hg-rooms a {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 2px 8px;
  }
  .hg-what {
    grid-column: 2;
  }
  .hg-hint {
    display: none;
  }
}
.hg-channels {
  position: relative;
  z-index: 2;
  display: grid;
  gap: var(--space-4);
}

/* the short facts under both columns */
.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  animation: rise 0.7s var(--hand) 0.22s both;
}
.hero-facts > div {
  padding: 14px 16px;
  border-radius: var(--r-card);
  border: 1px solid var(--rule);
  background: var(--surface);
}
.hero-facts dt {
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
}
.hero-facts dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--paper-dim);
}
@media (max-width: 980px) {
  .hero-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .hero-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}
.hint {
  margin-top: var(--space-6);
  text-align: center;
  font-size: 13px;
  line-height: 2;
  color: var(--paper-faint);
}
@media (max-width: 560px) {
  .hint {
    display: none; /* keyboard shortcuts mean little on a phone */
  }
}

.jp {
  display: inline-block;
  white-space: nowrap;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.42em;
  font-weight: 500;
  color: var(--paper-dim);
  vertical-align: middle;
  margin-left: 6px;
}

/* ── tour sections ────────────────────────────────────────────────────────── */
.tour-sec {
  position: relative;
  padding-top: var(--space-8);
}
.tour-sec h3 {
  font-size: 24px;
}

/* a demo or a note inside a stop, under its screenshots */
.tour-sub {
  margin-top: var(--space-8);
  scroll-margin-top: 70px;
}
.tour-subhead {
  margin-bottom: var(--space-5);
}
.tour-subhead h3 {
  margin: 6px 0 8px;
  font-size: 26px;
}
.tour-subhead p {
  max-width: 64ch;
  font-size: 15px;
}
.tour-note {
  max-width: 76ch;
  margin-top: var(--space-4);
  font-size: 14px;
}

/* ===================================================================== *
 * 01 · HOME — the three channels' layouts (screenshots are styled below)
 * ===================================================================== */
.presses.presses-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .presses.presses-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}
.presses.presses-3 li {
  border-top-color: var(--press-c, var(--signal));
  font-size: 13.5px;
}
.presses.presses-3 li .kicker {
  color: var(--press-c, var(--signal));
  text-transform: uppercase;
}
.presses.presses-3 li span + span {
  margin-top: 2px;
}

/* ===================================================================== *
 * 06 · SAVED & SETTINGS — Settings → Rooms, a group per channel
 * ===================================================================== */
.sr-chans {
  display: grid;
  gap: var(--space-4);
}
.sr-chans .sr-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .sr-chans .sr-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.sr-chname {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ch-c, var(--paper-faint));
}
.sr-fixed {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-faint);
  white-space: nowrap;
}
.settings-rooms {
  margin-top: var(--space-5);
  padding: var(--space-5);
}
.sr-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 8px 32px;
  align-items: end;
  margin-bottom: var(--space-4);
}
@media (max-width: 760px) {
  .sr-head {
    grid-template-columns: minmax(0, 1fr);
  }
}
.sr-head h3 {
  margin-top: 4px;
}
.sr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px 18px;
}
.sr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--surface);
}
.sr-item .sr-no {
  min-width: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--paper-faint);
}
.sr-item .sr-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 15px;
}
.sr-item.off .sr-name {
  color: var(--paper-faint);
}

/* ===================================================================== *
 * 02 · SOCIAL — the Edition demo: the degradation ladder + the paper
 * ===================================================================== */
.ladder {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}
@media (max-width: 920px) {
  .ladder {
    grid-template-columns: minmax(0, 1fr);
  }
}
.ladder-ctl {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}
.ladder-ctl .switch > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.ladder-ctl .switch b {
  font-weight: 600;
  font-size: 14px;
}
.ladder-ctl .switch small {
  font-size: 12px;
  color: var(--paper-faint);
}
.rungs {
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.rungs li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--rule);
  font-size: 12.5px;
  color: var(--paper-faint);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.rungs li span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rungs li.lit {
  color: var(--paper);
  border-color: color-mix(in srgb, var(--signal) 50%, var(--rule));
  background: var(--signal-soft);
}
.rungs li.lit span {
  color: var(--signal);
}
.ladder-note {
  font-size: 13px;
  color: var(--paper-dim);
}

.paper {
  position: relative;
  padding: 22px 24px 20px;
  border-radius: var(--r-card);
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--ink-2) 70%, transparent);
  box-shadow: var(--shadow-card);
  container-type: inline-size;
}
.paper.setting > * {
  animation: setType 0.5s var(--hand) both;
}
@keyframes setType {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.np-plate {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 3px double var(--rule-strong);
}
.np-ear {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-faint);
  line-height: 1.5;
}
.np-ear:last-child {
  text-align: right;
}
.np-name {
  font-family: var(--font-display);
  font-size: clamp(30px, 5cqi, 46px);
  font-weight: 650;
  line-height: 1;
  text-align: center;
}
.np-status {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: var(--signal);
}
.np-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 22px;
  margin-top: 16px;
}
@container (max-width: 560px) {
  .np-plate {
    grid-template-columns: 1fr 1fr;
  }
  .np-name {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .np-ear br {
    display: none;
  }
  .np-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .np-rail {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid var(--rule);
    padding-top: 12px;
  }
  .np-brief {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
.np-kick {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
}
.np-lede .np-pic {
  position: relative;
  aspect-ratio: 16 / 7;
  margin-bottom: 10px;
  border-radius: var(--r-media);
  background:
    radial-gradient(50% 70% at 30% 40%, color-mix(in srgb, var(--c-youtube) 45%, transparent), transparent),
    radial-gradient(40% 60% at 75% 60%, color-mix(in srgb, var(--signal) 40%, transparent), transparent),
    linear-gradient(135deg, var(--ink-3), var(--ink));
  overflow: hidden;
}
.np-pic::after {
  content: '▶';
  position: absolute;
  left: 14px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 70%, transparent);
  color: var(--paper);
  font-size: 12px;
}
.np-lede h4 {
  margin: 4px 0 6px;
  font-size: clamp(22px, 3.6cqi, 30px);
  line-height: 1.08;
}
.np-dek {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--paper-dim);
}
.np-body {
  margin-top: 8px;
  font-size: 14px;
  color: var(--paper-dim);
}
.np-body::first-letter {
  float: left;
  margin: 4px 8px 0 0;
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 650;
  line-height: 0.8;
  color: var(--signal);
}
.cite {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  margin: 0 1px;
  padding: 0 3px;
  border-radius: 4px;
  background: var(--signal-soft);
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 9.5px;
  vertical-align: 2px;
}
.np-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--paper-faint);
}
.np-numbers b {
  color: var(--paper);
  font-weight: 500;
}
.np-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.np-src {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--rule);
  font-size: 11.5px;
  color: var(--paper-dim);
}
.np-src::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--src-c, var(--signal));
}
.np-src.joined {
  border-color: color-mix(in srgb, var(--src-c) 60%, var(--rule));
  animation: joinPulse 1.2s ease 1;
}
@keyframes joinPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--src-c) 60%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}
.np-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 18px;
  border-left: 1px solid var(--rule);
}
.np-rail h5 {
  margin: 3px 0 4px;
  font-size: 17px;
  line-height: 1.15;
}
.np-rail p {
  font-size: 13px;
  color: var(--paper-dim);
}
.np-brief {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.np-brief h6 {
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
.np-brief p {
  font-size: 12.5px;
  color: var(--paper-dim);
}
.np-brief p + p {
  margin-top: 4px;
}
.np-stamp {
  position: absolute;
  right: 18px;
  bottom: -14px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--rule-strong);
  background: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--success);
}

.presses {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: press;
}
@media (max-width: 900px) {
  .presses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .presses {
    grid-template-columns: minmax(0, 1fr);
  }
}
.presses li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-top: 2px solid var(--signal);
  background: var(--surface);
  border-radius: 0 0 var(--r-card) var(--r-card);
  font-size: 13px;
  color: var(--paper-dim);
}
.presses li b {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 560;
  color: var(--paper);
}
.presses .kicker {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: none;
  overflow-wrap: anywhere;
}

/* ===================================================================== *
 * 04 · VIDEO — the player demo: theatre, seek ridge, programme notes, dock
 * ===================================================================== */
.theatre {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  padding: 18px;
  border-radius: calc(var(--r-modal) + 6px);
  background: color-mix(in srgb, #000 55%, var(--ink));
  border: 1px solid var(--rule);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.6);
  outline: none;
  transition: box-shadow 0.2s ease;
}
.theatre:focus-visible,
.theatre.focused {
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.6), 0 0 0 2px color-mix(in srgb, var(--c-youtube) 60%, transparent);
}
@media (max-width: 1000px) {
  .theatre {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }
}
.th-stage {
  position: relative;
  min-width: 0;
  min-height: 200px;
}
.th-card {
  --ch-c: var(--c-youtube);
  position: relative;
  transition: width 0.4s var(--hand), transform 0.4s var(--hand);
}
.th-glow {
  position: absolute;
  inset: 4% 6% 30%;
  z-index: 0;
  border-radius: 40px;
  background: var(--ch-c);
  filter: blur(46px);
  opacity: calc(0.28 + var(--glow-strength) * 0.12);
  transition: background 0.8s ease;
  pointer-events: none;
}
.th-picture {
  position: relative;
  z-index: 1;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-media);
  background: #000;
  cursor: pointer;
  isolation: isolate;
}
.th-scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(14px, 4%, 36px);
  background:
    radial-gradient(70% 90% at 25% 30%, color-mix(in srgb, var(--ch-c) 70%, transparent), transparent 70%),
    radial-gradient(60% 70% at 80% 80%, color-mix(in srgb, var(--ch-c) 35%, #000), transparent 70%),
    linear-gradient(160deg, #1a1210, #050404);
  transition: background 0.8s ease;
  color: #f4ead6;
}
.th-scene .no {
  font-family: var(--font-mono);
  font-size: clamp(9px, 1.4vw, 12px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.75;
}
.th-scene .nm {
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 54px);
  font-weight: 650;
  line-height: 1;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.th-scene svg {
  position: absolute;
  right: 6%;
  top: 10%;
  width: 34%;
  height: auto;
  opacity: 0.9;
}
.th-beam {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.07) 80%, rgba(255, 255, 255, 0.16));
  opacity: 0;
}
.th-card.playing .th-beam {
  opacity: 1;
  animation: beam 2.4s linear infinite;
}
@keyframes beam {
  from { transform: translateY(-100%); }
  to { transform: translateY(560%); }
}
.th-picture .scan {
  opacity: 0.8;
}
.th-osd {
  position: absolute;
  right: 14px;
  top: 12px;
  z-index: 3;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.th-osd.show {
  opacity: 1;
}
.th-bigplay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 22px;
  padding-left: 4px;
  transition: opacity 0.2s ease, transform 0.2s var(--hand);
}
.th-bigplay:hover {
  transform: translate(-50%, -50%) scale(1.06);
}
.th-card.playing .th-bigplay {
  opacity: 0;
  pointer-events: none;
}
.th-controls {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas: 'seek seek seek seek' 'play time chap dock';
  align-items: center;
  gap: 4px 10px;
  margin-top: 10px;
}
.th-play {
  grid-area: play;
  color: var(--paper);
}
.th-time {
  grid-area: time;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-dim);
  white-space: nowrap;
}
.th-chap {
  grid-area: chap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--paper);
}
.th-chap::before {
  content: '·';
  margin-right: 8px;
  color: var(--paper-faint);
}
.th-dockbtn {
  grid-area: dock;
  font-size: 18px;
}
.th-seek {
  grid-area: seek;
  position: relative;
  height: 40px;
  cursor: pointer;
  touch-action: none;
}
.th-ridge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  width: 100%;
  height: 26px;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.th-seek:hover .th-ridge {
  opacity: 0.9;
}
.th-ridge path {
  fill: color-mix(in srgb, var(--paper) 22%, transparent);
  stroke: color-mix(in srgb, var(--paper) 50%, transparent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.th-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  display: flex;
  gap: 3px;
  height: 5px;
  transition: height 0.15s ease;
}
.th-seek:hover .th-bar {
  height: 7px;
}
.th-bar .sg {
  position: relative;
  height: 100%;
  border-radius: 3px;
  overflow: hidden;
  background: color-mix(in srgb, var(--paper) 22%, transparent);
}
.th-bar .sg i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--c-youtube);
}
.th-bar .knob {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--c-youtube);
  transform: translateY(-50%);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c-youtube) 70%, transparent);
  pointer-events: none;
}
.th-tip {
  position: absolute;
  bottom: 30px;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--ink-2);
  border: 1px solid var(--rule-strong);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.th-tip b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--c-youtube);
  margin-right: 6px;
}
.th-seek:hover .th-tip {
  opacity: 1;
}
.th-info {
  position: relative;
  z-index: 2;
  margin-top: 8px;
}
.th-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 600;
  line-height: 1.15;
}
.th-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  font-size: 13px;
}
.th-meta > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  margin-right: auto;
}
.th-meta small {
  color: var(--paper-faint);
}
.th-face {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-youtube), var(--signal));
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.th-sub.on {
  background: var(--surface-hover);
  color: var(--paper-dim);
}
.th-dockhint {
  display: none;
  padding: 40px 20px;
  text-align: center;
  color: var(--paper-faint);
  font-size: 14px;
}
/* docked: tucked into the corner of the stage, still playing */
.th-card.docked {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: min(300px, 70%);
  padding: 8px;
  border-radius: 14px;
  background: var(--ink-2);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-modal);
  cursor: pointer;
  animation: dockIn 0.4s var(--hand) both;
}
@keyframes dockIn {
  from { opacity: 0.4; transform: scale(1.4) translate(-20%, -20%); }
  to { opacity: 1; transform: none; }
}
.th-card.docked .th-info,
.th-card.docked .th-glow,
.th-card.docked .th-chap,
.th-card.docked .th-bigplay {
  display: none;
}
.th-card.docked .th-picture {
  border-radius: 9px;
}
.th-card.docked .th-controls {
  margin-top: 4px;
}
.th-card.docked .th-ridge {
  display: none;
}
.th-card.docked .th-seek {
  height: 18px;
}
.th-card.docked .th-bar {
  bottom: 4px;
}
.th-stage.is-docked {
  min-height: 300px;
}
.th-stage.is-docked .th-dockhint {
  display: block;
}

.th-notes {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: 540px;
  border-radius: var(--r-card);
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--ink-2) 80%, transparent);
  overflow: hidden;
}
@media (max-width: 1000px) {
  .th-notes {
    max-height: 340px;
  }
}
.th-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-bottom: 1px solid var(--rule);
}
.th-tabs button {
  flex: 1;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--paper-faint);
}
.th-tabs button[aria-selected='true'] {
  color: var(--paper);
  background: var(--surface-hover);
  box-shadow: inset 0 -2px 0 var(--c-youtube);
}
.th-pane {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.th-chapter {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: left;
  color: var(--paper-dim);
  transition: background 0.15s ease;
}
.th-chapter:hover {
  background: var(--surface-hover);
}
.th-chapter span:first-child {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--c-youtube);
}
.th-chapter.on {
  color: var(--paper);
  background: color-mix(in srgb, var(--c-youtube) 14%, transparent);
}
.th-line {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 10px;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--paper-faint);
  transition: color 0.3s ease, background 0.3s ease;
}
.th-line span:first-child {
  font-family: var(--font-mono);
  font-size: 11px;
  padding-top: 2px;
}
.th-line:hover {
  background: var(--surface-hover);
}
.th-line.on {
  color: var(--paper);
  background: var(--surface);
  box-shadow: inset 2px 0 0 var(--c-youtube);
}
.th-key {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--paper-dim);
  transition: background 0.2s ease, color 0.2s ease;
}
.th-key.hit {
  background: color-mix(in srgb, var(--c-youtube) 22%, transparent);
  color: var(--paper);
}
.th-key.hit kbd {
  border-color: var(--c-youtube);
  color: var(--c-youtube);
}
.th-caption {
  margin-top: 14px;
  font-size: 13.5px;
  text-align: center;
}

/* ===================================================================== *
 * SCREENSHOTS of the real app, one at a time (every stop uses these)
 * ===================================================================== */
.shots {
  display: grid;
  gap: 16px;
}
.shots-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.shots-tabs[hidden] {
  display: none;
}
.shots-tab {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 14px 7px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--rule);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--paper-dim);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.shots-tab small {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--paper-faint);
}
.shots-tab:hover {
  color: var(--paper);
  border-color: var(--rule-strong);
}
.shots-tab[aria-selected='true'] {
  color: var(--ink);
  background: var(--tab-c, var(--accent-strong));
  border-color: transparent;
}
.shots-tab[aria-selected='true'] small {
  color: color-mix(in srgb, var(--ink) 72%, transparent);
}
.shots-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 22px;
  align-items: start;
  margin: 0;
}
@media (max-width: 980px) {
  .shots-stage {
    grid-template-columns: minmax(0, 1fr);
  }
}
.shots-frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 9px;
  border-radius: 20px;
  border: 1px solid var(--rule-strong);
  background: linear-gradient(160deg, color-mix(in srgb, var(--paper) 9%, var(--ink)), var(--ink) 70%);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
  cursor: zoom-in;
}
.shots-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: var(--surface);
}
.shots-zoom {
  position: absolute;
  right: 20px;
  bottom: 20px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.shots-frame:hover .shots-zoom,
.shots-frame:focus-visible .shots-zoom {
  opacity: 1;
}
.shots-cap {
  padding-top: 4px;
}
.shots-cap h3 {
  margin: 8px 0 8px;
  font-size: 25px;
}
.shots-cap p {
  font-size: 14.5px;
  color: var(--paper-dim);
}
.shots-nav {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* the lightbox */
.shotbox {
  /* as wide as the picture can be: by the window's width, or by its height at 16:10 */
  width: min(96vw, 1800px, calc((94vh - 56px) * 1.6));
  max-width: none;
  max-height: 96vh;
  margin: auto; /* the base reset zeroes a dialog's own centring */
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
}
.shotbox::backdrop {
  background: rgba(0, 0, 0, 0.84);
}
.shotbox img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(94vh - 56px);
  object-fit: contain;
  border-radius: 10px;
  cursor: zoom-out;
}
/* above the picture, so it never sits beside a close button inside the screenshot */
.shotbox-x {
  position: absolute;
  top: -48px;
  right: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ===================================================================== *
 * 07 · THE LOOK — each card wears its own skin
 * ===================================================================== */
.skins {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.skincard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  min-height: 210px;
  border-radius: var(--r-card);
  border: 1px solid var(--rule-strong);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  text-align: left;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--hand), box-shadow 0.25s ease;
}
.skincard:hover {
  transform: translateY(-4px);
}
.skincard[aria-pressed='true'] {
  box-shadow: 0 0 0 3px var(--signal), var(--shadow-card);
}
.skincard .sk-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.skincard > *:not(.sk-bg) {
  position: relative;
  z-index: 1;
}
/* Cutting Mat's card: a window on the mat, with a frame of mat showing round it */
.skincard[data-theme='bench']::after {
  content: '';
  position: absolute;
  inset: 8px;
  z-index: 0;
  border: 1px solid var(--bench-edge);
  border-radius: 7px;
  background: var(--bench-window);
  pointer-events: none;
}
.sk-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
.sk-on {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--signal);
}
.sk-on i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
}
.skincard .tc-wordmark {
  font-size: 34px;
}
.sk-keys {
  display: flex;
  gap: 5px;
}
.sk-keys span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 24px;
  border-radius: min(7px, var(--r-input));
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--paper-faint);
}
.sk-keys span.on {
  background: var(--signal);
  color: var(--ink);
  border-color: transparent;
}
.sk-name {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.1;
}
.sk-blurb {
  font-size: 12.5px;
  color: var(--paper-dim);
}
.skincard .kicker {
  font-size: 9px;
}
.skins-foot {
  margin-top: 16px;
  font-size: 13.5px;
  text-align: center;
}
.skincard[data-theme='terminal'] {
  text-shadow: 0 0 3px rgba(54, 255, 106, 0.28);
}
.skincard[data-theme='bauhaus'] {
  border: 2px solid #111;
}
.skincard[data-theme='bauhaus'] .sk-name {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

/* ===================================================================== *
 * 08 · PRIVACY — the wiring
 * ===================================================================== */
.wiring {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
  align-items: center;
}
@media (max-width: 860px) {
  .wiring {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}
.machine {
  position: relative;
  margin-right: 28px;
  padding: 20px 22px;
  border-color: color-mix(in srgb, var(--c-dev) 50%, var(--rule));
}
.machine-addr {
  margin: 6px 0 12px;
  font-family: var(--font-mono);
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 600;
  color: var(--paper);
}
.machine-addr span {
  color: var(--paper-faint);
}
.machine ul {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--paper-dim);
}
.machine li {
  padding-left: 14px;
  border-left: 2px solid var(--rule-strong);
}
.lines {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 0 20px;
  list-style: none;
}
/* the bus: machine → spine → one wire per platform */
.machine::after {
  content: '';
  position: absolute;
  right: -29px;
  top: 50%;
  width: 28px;
  height: 2px;
  background: var(--c-dev);
  box-shadow: 0 0 8px var(--c-dev);
}
.lines::before {
  content: '';
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--c-youtube), var(--c-reddit), var(--c-hn), var(--c-github), var(--accent-strong), var(--paper-faint));
  opacity: 0.7;
}
.lines li {
  --l: var(--signal);
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 9px 14px 9px 56px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--paper-dim);
}
.lines li b {
  color: var(--paper);
  font-weight: 600;
}
/* the wire from the spine, with a packet running along it */
.lines li::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  width: 66px;
  height: 2px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--l) 30%, transparent), var(--l));
}
.lines li::after {
  content: '';
  position: absolute;
  left: 0;
  top: calc(50% - 3px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--l);
  box-shadow: 0 0 8px var(--l);
  animation: packet 2.6s ease-in-out infinite;
  --run: 40px;
  animation-delay: calc(var(--n, 0) * 0.35s);
}
@keyframes packet {
  0% { transform: translateX(-20px); opacity: 0; }
  15% { opacity: 1; }
  70% { transform: translateX(var(--run)); opacity: 1; }
  100% { transform: translateX(var(--run)); opacity: 0; }
}
.lines li.cut {
  border-style: dashed;
  background: transparent;
}
.lines li.cut::before {
  background: repeating-linear-gradient(90deg, var(--danger) 0 4px, transparent 4px 8px);
}
.lines li.cut::after {
  content: '✕';
  width: auto;
  height: auto;
  top: calc(50% - 9px);
  left: 18px;
  background: none;
  box-shadow: none;
  color: var(--danger);
  font-size: 13px;
  animation: none;
}
.lines li.cut b {
  color: var(--danger);
}
@media (max-width: 860px) {
  .machine {
    margin-right: 0;
  }
  .machine::after,
  .lines::before {
    display: none;
  }
  .lines {
    padding-left: 0;
  }
  .lines li {
    padding-left: 44px;
  }
  .lines li::before {
    left: 0;
    width: 34px;
  }
}
@media (max-width: 520px) {
  .lines li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

/* ===================================================================== *
 * 09 · TUNE IN
 * ===================================================================== */
.tune-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
.tune-grid pre {
  font-size: 12.5px;
}
.tune-then {
  margin-top: 10px;
}
@media (max-width: 860px) {
  .tune-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.tune-cta p {
  font-size: 16px;
  color: var(--paper-dim);
}
.tune-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.tune {
  padding-bottom: var(--space-6);
}

@media (prefers-reduced-motion: reduce) {
  .lines li::after {
    animation: none;
  }
}

/* captions (C) over the picture */
.th-scene .cap {
  position: absolute;
  left: 50%;
  bottom: 8%;
  z-index: 2;
  max-width: 86%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(11px, 1.6vw, 15px);
  line-height: 1.35;
  text-align: center;
}
.th-scene .cap[hidden] {
  display: none;
}

@media (max-width: 860px) {
  .lines li::after {
    --run: 22px;
  }
}
@media (max-width: 560px) {
  .hero-top .skinlink {
    display: none;
  }
  .hero-top {
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  .skins {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .skincard {
    min-height: 180px;
    padding: 11px;
  }
  .skincard .tc-wordmark {
    font-size: 24px;
  }
  .sk-top > span:first-child,
  .sk-blurb {
    display: none;
  }
  .sk-keys span {
    width: 24px;
    height: 20px;
    font-size: 9px;
  }
  .sk-name {
    font-size: 16px;
  }
}
