/* demo.utc.dance — the one authored stylesheet.
   fonts.css and tokens/utc-tokens.css are copied verbatim from the product's design-token build;
   everything below maps those tokens onto the demo-site anatomy. */
@import url('./fonts/fonts.css');
@import url('./tokens/utc-tokens.css');

:root {
    /* Product tokens, renamed locally so the mapping is visible at every use site. */
    --site-bg: var(--background);
    --site-fg: var(--foreground);
    --site-card: var(--card);
    --site-line: var(--border);
    --site-crimson: var(--primary);
    --site-crimson-hi: hsl(348 72% 57%);
    --site-dim: var(--muted-foreground);

    /* Surfaces the token layer does not name: the video well, the chip ink and the hairline dot. */
    --site-well: #0e0c0d;
    --site-soft: #c9c3bf;
    --site-faint: #3b3437;

    --site-gutter: 96px;
    --site-radius-card: var(--radius-card);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background: var(--site-bg);
}

body {
    margin: 0;
    background: var(--site-bg);
    color: var(--site-fg);
    font-family: Archivo, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3 {
    margin: 0;
}

:focus-visible {
    outline: 2px solid var(--site-crimson);
    outline-offset: 3px;
    border-radius: 4px;
}

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

.display {
    font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 0.92;
    letter-spacing: -0.01em;
    /* The Barlow Condensed faces ship italic outlines under `font-style: normal`
       (see fonts.css) — asking for italic here would double-slant them. */
    font-style: normal;
}

.eyebrow {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--site-crimson);
    font-weight: 500;
}

.mono {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--site-dim);
}

.dot {
    color: var(--site-faint);
}

.stop {
    color: var(--site-crimson);
}

/* ---------------------------------------------------------------- shell */

.wrap {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--site-gutter);
}

.masthead {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--site-bg);
    border-bottom: 1px solid var(--site-line);
}

.masthead-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wordmark {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.wordmark .display {
    font-size: 28px;
}

.masthead-host {
    justify-self: end;
}

/* ---------------------------------------------------------------- segmented control */

.seg {
    display: inline-flex;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    padding: 3px;
    background: var(--site-card);
}

.seg a {
    padding: 8px 20px;
    border-radius: 999px;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--site-dim);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.seg a[aria-current='page'] {
    background: var(--site-fg);
    color: var(--site-bg);
    font-weight: 600;
}

/* ---------------------------------------------------------------- chips */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--site-soft);
    background: var(--site-card);
    cursor: pointer;
}

.chip b {
    font-weight: 500;
    opacity: 0.6;
}

.chip[aria-pressed='true'] {
    background: var(--site-crimson);
    border-color: var(--site-crimson);
    color: #ffffff;
}

.rc {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 9.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--site-soft);
    background: var(--site-bg);
    white-space: nowrap;
}

.rc.sub {
    color: var(--site-dim);
    border-style: dashed;
}

/* ---------------------------------------------------------------- home hero */

.hero {
    padding-top: 72px;
    padding-bottom: 44px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hero h1 {
    font-size: clamp(46px, 7.5vw, 108px);
    max-width: 900px;
}

.hero p {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--site-dim);
    max-width: 620px;
}

.rolebar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.rolebar > .mono {
    margin-right: 8px;
}

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

.sections {
    padding-bottom: 48px;
    display: flex;
    flex-direction: column;
}

.chain-section {
    padding: 36px 0 44px;
    border-top: 1px solid var(--site-line);
}

.chain-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 24px;
}

.chain-section-head > div {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chain-section-head h2 {
    font-size: clamp(30px, 3.2vw, 44px);
}

.chain-section-head p {
    margin: 0;
    color: var(--site-dim);
    font-size: 14px;
}

.chain-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.chain-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 20px;
    align-items: end;
    padding: 22px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-card);
    background: var(--site-card);
    transition: border-color 150ms ease;
}

.chain-card:hover {
    border-color: var(--site-crimson);
}

.chain-card .eyebrow {
    grid-column: 1 / -1;
}

.chain-card .display {
    font-size: 30px;
}

.sec {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 36px 0;
    border-top: 1px solid var(--site-line);
}

.sec[hidden] {
    display: none;
}

.sec-head {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    width: 100%;
    cursor: pointer;
}

.sec-id {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sec-title {
    font-size: clamp(30px, 3.2vw, 44px);
}

.sec-line {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--site-dim);
    max-width: 460px;
}

.sec-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sec-count {
    margin-left: 10px;
}

.sec-toggle {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--site-dim);
    flex: 0 0 auto;
    cursor: pointer;
}

.sec-toggle svg {
    transition: transform 150ms ease;
}

.sec-toggle[aria-expanded='false'] svg {
    transform: rotate(180deg);
}

/* ---------------------------------------------------------------- cards */

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.grid.is-app {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid[hidden] {
    display: none;
}

.card {
    background: var(--site-card);
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card[hidden] {
    display: none;
}

a.card {
    transition: border-color 150ms ease;
}

a.card:hover {
    border-color: var(--site-crimson);
}

.thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--site-well);
    border-bottom: 1px solid var(--site-line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.grid.is-app .thumb {
    aspect-ratio: 4 / 5;
    padding: 22px 0 0;
}

.thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid.is-app .thumb .plate {
    position: relative;
    width: 150px;
    max-width: 62%;
    aspect-ratio: 150 / 320;
    border: 2px solid var(--site-line);
    border-radius: 26px;
    background: var(--site-well);
    overflow: hidden;
}

.grid.is-app .thumb .plate img {
    object-fit: cover;
}

.play {
    /* Absolute so it sits over the poster (web) or over the phone plate (app) rather than
       beside it in the thumb's flex flow. */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: var(--site-fg);
    color: var(--site-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.withheld {
    position: absolute;
    inset: 18px;
    border: 1px dashed var(--site-line);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    line-height: 1.5;
}

.card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-title {
    font-size: clamp(22px, 1.9vw, 26px);
    line-height: 0.95;
}

.card-line {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--site-dim);
}

.grid.is-app .card-title {
    font-size: 24px;
}

.grid.is-app .card-line {
    font-size: 13px;
}

.roles {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

/* ---------------------------------------------------------------- reel banner */

.reel-banner {
    margin-top: 36px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-card);
    background: var(--site-card);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.reel-banner .copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.reel-banner .display {
    font-size: 36px;
}

.reel-banner p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--site-dim);
    max-width: 620px;
}

/* ---------------------------------------------------------------- journey page */

.crumbs {
    padding-top: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.crumbs .here {
    color: var(--site-fg);
}

.journey-head {
    padding-top: 28px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
}

.journey-head .titles {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 820px;
}

.journey-head h1 {
    font-size: clamp(34px, 5vw, 72px);
}

.journey-head p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--site-dim);
    max-width: 640px;
}

.pov {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    flex: 0 0 auto;
}

.pov-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stage {
    padding: 36px 0 0;
    display: grid;
    grid-template-columns: minmax(0, 880px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.stage[hidden] {
    display: none;
}

.player {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--site-well);
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-card);
    display: block;
}

.player.is-app video {
    aspect-ratio: 9 / 16;
    max-height: 70vh;
    margin: 0 auto;
    width: auto;
}

.player-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.download {
    padding: 6px 10px;
    border: 1px solid var(--site-line);
    border-radius: 6px;
    margin-left: auto;
}

.download:hover {
    border-color: var(--site-crimson);
}

.provenance {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid var(--site-line);
    border-radius: 8px;
    background: var(--site-card);
    flex-wrap: wrap;
}

.provenance .lead {
    color: var(--site-fg);
}

.provenance .mono {
    overflow-wrap: anywhere;
}

.provenance .tail {
    margin-left: auto;
}

.chain-caption {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 15px 16px;
    border-left: 2px solid var(--site-crimson);
    background: var(--site-card);
}

.chain-caption .display {
    font-size: 22px;
}

.chain-caption a:hover {
    color: var(--site-crimson);
}

.no-clip {
    margin: 0;
    border: 1px dashed var(--site-line);
    border-radius: var(--site-radius-card);
    background: var(--site-well);
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    line-height: 1.6;
}

.chapters {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chapters-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 14px 10px;
    gap: 12px;
}

.step {
    display: flex;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    align-items: flex-start;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.step:hover,
.step[aria-current='true'] {
    background: var(--site-card);
    border-color: var(--site-line);
}

.step-n {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 11px;
    color: var(--site-crimson);
    letter-spacing: 0.1em;
    flex: 0 0 28px;
    padding-top: 3px;
}

.step-t {
    font-size: 14px;
    line-height: 1.4;
    color: #e9e4e1;
    flex: 1;
}

.step-copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.journey-boundary {
    color: var(--site-crimson);
    line-height: 1.4;
}

.step-time {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 11px;
    color: var(--site-dim);
    flex: 0 0 auto;
    padding-top: 3px;
}

.crosslinks {
    padding-top: 40px;
    padding-bottom: 64px;
    display: flex;
    gap: 24px;
}

.xcard {
    flex: 1;
    background: var(--site-card);
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-card);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

a.xcard {
    transition: border-color 150ms ease;
}

a.xcard:hover {
    border-color: var(--site-crimson);
}

.xcard .display {
    font-size: 28px;
}

.xcard p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--site-dim);
}

/* ---------------------------------------------------------------- the complete workflow */

/* The home leads with one recording, as the hero itself: title, lede, the button, then the
   thumbnail. On a phone the button lands inside the first screen; the thumbnail follows it. */
.hero-workflow {
    padding-top: 56px;
    gap: 18px;
}

.hero-workflow h1 {
    font-size: clamp(40px, 6vw, 88px);
}

.hero-workflow p {
    font-size: 17px;
    max-width: 680px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.workflow-lead-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--site-fg);
    color: var(--site-bg);
    border-color: var(--site-fg);
}

.workflow-lead-action:hover {
    border-color: var(--site-crimson);
    background: var(--site-crimson);
    color: var(--site-fg);
}

.workflow-lead-thumb {
    display: block;
    max-width: 960px;
    margin-top: 8px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-card);
    overflow: hidden;
    transition: border-color 150ms ease;
}

.workflow-lead-thumb:hover {
    border-color: var(--site-crimson);
}

.workflow-lead-thumb .thumb {
    border-bottom: 0;
}

.workflow-lead-thumb .play {
    width: 64px;
    height: 64px;
}

.browse-link {
    color: var(--site-dim);
    text-decoration: none;
    margin-top: 4px;
}

.browse-link:hover {
    color: var(--site-fg);
}

/* The catalog under the workflow: its own heading, its coverage count, then the role bar. */
.browse {
    padding-bottom: 44px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.browse-head {
    padding-top: 32px;
    border-top: 1px solid var(--site-line);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.browse-head h2 {
    font-size: clamp(30px, 3.2vw, 44px);
}

.browse-head p {
    margin: 0;
    color: var(--site-dim);
    font-size: 14px;
    max-width: 620px;
}

.browse-head .coverage {
    color: var(--site-dim);
}

.browse-after {
    margin-top: 48px;
}

.workflow-stage .player video {
    aspect-ratio: 16 / 9;
}

.workflow-chapters {
    gap: 0;
}

.chapter-day {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 18px;
}

.chapter-day h2 {
    padding: 0 14px 4px;
    font-weight: 500;
}

.step-context {
    letter-spacing: 0.1em;
}

/* Every step is a link on the workflow page; give it the button's hit box and colours. */
a.step {
    color: inherit;
}

/* ---------------------------------------------------------------- the guided tour */

/* The site root once tour.json is published: written for an organizer who has a few minutes and
   no meeting. Films and loops are 16:9, swapped for their 9:16 cut on a portrait phone (the
   <source media> query and TALL_MEDIA in tour-page.mjs are the same query). */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 22px;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    transition:
        background 150ms ease,
        border-color 150ms ease,
        color 150ms ease;
}

.btn-primary {
    background: var(--site-crimson);
    border-color: var(--site-crimson);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--site-crimson-hi);
    border-color: var(--site-crimson-hi);
}

.btn-ghost {
    color: var(--site-fg);
}

.btn-ghost:hover {
    border-color: var(--site-fg);
}

.btn-small {
    height: 38px;
    padding: 0 16px;
    font-size: 11px;
}

.tour-nav {
    display: flex;
    gap: 28px;
    margin-left: auto;
}

.tour-nav a {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--site-dim);
}

.tour-nav a:hover {
    color: var(--site-fg);
}

.tour h2 {
    font-size: clamp(38px, 4.6vw, 68px);
}

.tour-section-head {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tour-section-head p,
.tour-proof p {
    margin: 0;
    max-width: 640px;
    font-size: 17px;
    line-height: 1.5;
    color: var(--site-dim);
}

.tour-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/* hero */

.tour-hero {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: 56px;
    padding-top: 72px;
    padding-bottom: 88px;
}

.tour-hero h1 {
    margin-top: 18px;
    font-size: clamp(60px, 8vw, 128px);
}

.tour-lede {
    margin: 22px 0 0;
    max-width: 520px;
    font-size: 19px;
    line-height: 1.5;
    color: var(--site-soft);
}

/* films and loops */

.film,
.frame {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--site-well);
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-card);
}

.film video,
.frame video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.film-sound {
    position: absolute;
    left: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: rgba(12, 10, 12, 0.74);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font:
        600 14px Archivo,
        'Helvetica Neue',
        Arial,
        sans-serif;
    cursor: pointer;
    transition: background 150ms ease;
}

.film-sound:hover {
    background: var(--site-crimson);
}

.film-sound .mono {
    color: rgba(255, 255, 255, 0.65);
    font-size: 10px;
}

.film-sound[hidden] {
    display: none;
}

.motion-toggle {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(12, 10, 12, 0.66);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #ffffff;
    cursor: pointer;
}

.motion-toggle:hover {
    background: rgba(12, 10, 12, 0.9);
}

.motion-toggle[hidden] {
    display: none;
}

.motion-toggle[data-state='playing'] > svg:not(.icon-pause),
.motion-toggle[data-state='paused'] > .icon-pause {
    display: none;
}

.film-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--site-crimson);
    font-weight: 600;
}

.film-link .mono {
    font-size: 10px;
}

.film-link:hover {
    color: var(--site-crimson-hi);
}

.film-dialog {
    width: 100%;
    max-width: min(1280px, 92vw);
    padding: 0;
    border: 0;
    background: transparent;
}

.film-dialog::backdrop {
    background: rgba(6, 5, 6, 0.9);
}

.film-dialog form {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.film-close {
    padding: 8px 0;
    border: 0;
    background: none;
    color: var(--site-fg);
    cursor: pointer;
}

.film-dialog video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: var(--site-radius-card);
}

/* before and after */

.tour-pains,
.tour-included,
.tour-dancers,
.tour-proof {
    padding-top: 88px;
    padding-bottom: 88px;
    border-top: 1px solid var(--site-line);
}

.pains {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    background: var(--site-line);
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-card);
}

.pains li {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 28px;
    background: var(--site-bg);
}

.pain-before {
    font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    font-size: 23px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    color: var(--site-dim);
    text-decoration: line-through;
    text-decoration-color: var(--site-crimson);
    text-decoration-thickness: 3px;
}

.pain-after {
    font-size: 17px;
    line-height: 1.45;
}

.pain-after::before {
    content: '→ ';
    color: var(--site-crimson);
}

/* the six steps */

.tour-steps {
    padding-top: 88px;
    border-top: 1px solid var(--site-line);
}

.step-rail {
    position: sticky;
    top: 64px;
    z-index: 10;
    margin-top: 40px;
    background: var(--site-bg);
    border-top: 1px solid var(--site-line);
    border-bottom: 1px solid var(--site-line);
}

.step-rail ol {
    display: flex;
    gap: 6px;
    margin: 0 auto;
    padding-top: 12px;
    padding-bottom: 12px;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
}

.step-rail ol::-webkit-scrollbar {
    display: none;
}

.step-rail a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--site-soft);
}

.step-rail a .mono {
    font-size: 10px;
}

.step-rail a[aria-current='step'] {
    background: var(--site-crimson);
    border-color: var(--site-crimson);
    color: #ffffff;
}

.step-rail a[aria-current='step'] .mono {
    color: rgba(255, 255, 255, 0.72);
}

.tour-step {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    align-items: center;
    gap: 56px;
    padding: 72px 0;
    border-bottom: 1px solid var(--site-line);
    scroll-margin-top: 128px;
}

.tour-step:last-child {
    border-bottom: 0;
}

.tour-step-kicker {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.tour-step-n {
    font-size: 56px;
    color: var(--site-crimson);
}

.tour-step h3 {
    margin-top: 12px;
    font-size: clamp(34px, 3.6vw, 52px);
}

.ticks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.ticks li {
    position: relative;
    padding-left: 26px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--site-soft);
}

.ticks li::before {
    content: '';
    position: absolute;
    left: 1px;
    top: 0.5em;
    width: 11px;
    height: 6px;
    border-left: 2px solid var(--site-crimson);
    border-bottom: 2px solid var(--site-crimson);
    transform: rotate(-45deg);
}

.tour-step-media {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}

.tour-step-media figcaption {
    font-size: 10px;
}

/* dancers, everything included, the real screens */

.tour-dancers {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: 56px;
}

.tour-dancers h2 {
    margin-top: 14px;
}

.tour-dancers-copy p {
    margin: 20px 0 0;
    font-size: 17px;
    line-height: 1.5;
    color: var(--site-soft);
}

.included-line {
    margin: 14px 0 0;
}

.included {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
}

.included li {
    padding: 18px 20px;
    background: var(--site-card);
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-card);
    font-size: 15px;
    line-height: 1.4;
}

.tour-proof {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tour-proof h2 {
    font-size: clamp(30px, 3.2vw, 44px);
}

.tour-proof .crosslinks {
    padding: 14px 0 0;
}

/* the close */

.tour-closing {
    padding: 104px 0;
    background: var(--site-crimson);
    color: #ffffff;
}

.tour-closing h2 {
    font-size: clamp(46px, 6.4vw, 104px);
}

.tour-closing .stop {
    color: #ffffff;
}

.tour-closing p {
    margin: 18px 0 0;
    max-width: 560px;
    font-size: 19px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
}

.tour-closing .btn-primary {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--site-crimson);
}

.tour-closing .btn-primary:hover {
    background: var(--site-fg);
}

.tour-closing .btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.tour-closing .btn-ghost:hover {
    border-color: #ffffff;
}

.tour-foot {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 28px;
    padding-bottom: 40px;
}

.tour-foot p {
    margin: 0;
}

.tour-foot a:hover {
    color: var(--site-fg);
}

@media (max-width: 1080px) {
    .tour-nav {
        display: none;
    }

    .tour-masthead .btn-small {
        margin-left: auto;
    }

    .tour-hero,
    .tour-step,
    .tour-dancers {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .tour-hero-copy,
    .tour-step-copy,
    .tour-dancers-copy {
        max-width: 680px;
    }

    .included {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .tour-hero {
        gap: 28px;
        padding-top: 36px;
        padding-bottom: 56px;
    }

    .tour-hero h1 {
        font-size: clamp(54px, 17vw, 76px);
    }

    .tour-lede,
    .tour-closing p {
        font-size: 17px;
    }

    .tour-actions .btn {
        flex: 1 1 auto;
    }

    .tour-pains,
    .tour-included,
    .tour-dancers,
    .tour-proof {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .tour-steps {
        padding-top: 56px;
    }

    .step-rail {
        margin-top: 28px;
    }

    .pains {
        grid-template-columns: minmax(0, 1fr);
    }

    .pains li {
        padding: 18px 20px;
    }

    .tour-step {
        gap: 26px;
        padding: 44px 0;
        scroll-margin-top: 120px;
    }

    .tour-step-n {
        font-size: 44px;
    }

    .included {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .included li {
        padding: 14px 16px;
    }

    .tour-closing {
        padding: 64px 0;
    }

    .tour-foot {
        flex-direction: column;
    }

    .tour-masthead .btn-small {
        height: 34px;
        padding: 0 12px;
    }
}

/* A portrait phone plays the 9:16 cut, as tall as fits under the masthead. */
@media (orientation: portrait) and (max-width: 767px) {
    .film.has-tall,
    .frame.has-tall {
        width: min(100%, calc(74svh * 9 / 16));
        margin-inline: auto;
        aspect-ratio: 9 / 16;
    }

    .film-dialog.has-tall {
        max-width: min(92vw, calc(82svh * 9 / 16));
    }

    .film-dialog.has-tall video {
        aspect-ratio: 9 / 16;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .film-sound {
        transition: none;
    }
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
    :root {
        --site-gutter: 48px;
    }

    .grid,
    .grid.is-app {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stage {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Once the chapters drop below the player, keep the player in view while a reader taps
       through sixteen chapters — the masthead is sticky too, so sit just under it. */
    .workflow-stage .player {
        position: sticky;
        top: 68px;
        z-index: 1;
        background: var(--site-bg);
        padding-bottom: 8px;
    }

    .crosslinks {
        flex-wrap: wrap;
    }

    .xcard {
        flex: 1 1 260px;
    }
}

@media (max-width: 860px) {
    :root {
        --site-gutter: 20px;
    }

    .masthead-host {
        display: none;
    }

    .seg a {
        padding: 8px 14px;
        font-size: 11px;
    }

    .hero {
        padding-top: 40px;
        padding-bottom: 32px;
    }

    .sec-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .chain-section-head,
    .chain-caption {
        flex-direction: column;
        align-items: flex-start;
    }

    .sec-right {
        margin-left: 0;
        width: 100%;
    }

    .sec-count {
        margin-left: 0;
    }

    .journey-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .reel-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 22px;
    }

    .hero-workflow {
        padding-top: 36px;
        gap: 14px;
    }

    .hero-workflow h1 {
        font-size: clamp(34px, 10vw, 40px);
    }

    .hero-workflow p {
        font-size: 16px;
    }

    .workflow-lead-action {
        width: 100%;
        justify-content: center;
    }

    .browse-head {
        padding-top: 24px;
    }

    .provenance {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .provenance .dot {
        display: none;
    }

    .provenance[data-provenance='human'] .build-fact,
    .provenance[data-provenance='edited'] .build-fact {
        font-size: 9px;
        letter-spacing: 0.1em;
    }

    .provenance .tail {
        margin-left: 0;
    }

    .download {
        margin-left: 0;
    }
}

@media (max-width: 700px) {
    .grid,
    .grid.is-app,
    .chain-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .grid.is-app .thumb .plate {
        max-width: 44%;
    }

    .chapters-head {
        padding: 0 0 10px;
    }

    .step {
        padding: 12px 0;
    }

    .chapter-day h2 {
        padding-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    a.card,
    .chain-card,
    a.xcard,
    .workflow-lead-thumb,
    .sec-toggle svg {
        transition: none;
    }
}
