/* Magic 4: your brand is the star. Shared by Home and the product pages.
   The run track is in the layout from the first paint at its final height; the theme is the only thing that arrives. */
.takeover { --tb-bg: var(--studio); --tb-ink: var(--ink); --tb-accent: var(--amber); --tb-accent2: var(--navy); --tb-display: var(--display); --tb-body: var(--body); --tb-on-accent: var(--navy); padding-block: clamp(56px, 8vw, 110px) 0; }
/* the brand's tokens: the whole section once themed, and the run's own view always (it is drawn on the brand ground from the
   first paint, so its cards, labels and logo carry the brand ink too and never fall back to Jinn's gray on a dark ground) */
.takeover.is-themed, .to-run .track__view { --card: color-mix(in srgb, var(--tb-bg) 86%, var(--tb-ink) 14%); --rule: color-mix(in srgb, var(--tb-ink) 25%, transparent); --muted: color-mix(in srgb, var(--tb-ink) 90%, var(--tb-bg)); --ink-2: var(--tb-ink); --amber-ink: var(--tb-ink); --on-dark-2: var(--tb-ink); }
.takeover.is-themed { background: var(--tb-bg); color: var(--tb-ink); font-family: var(--tb-body); }
/* r4 fix 28/30: the display face and body type change with the ground and ink, headings included */
.takeover.is-themed :is(h2, h3, .to-form label) { font-family: var(--tb-display); color: var(--tb-ink); }
.takeover.is-themed :is(p, .lede, .to-caption, dd) { font-family: var(--tb-body); }
.to-run .track__view :is(.label, .to-room-cap, .to-art-none p, .small, .to-ctx, .dlv-lines) { color: var(--tb-ink); }
/* every label in the brand's clothes stays readable (G14): small text keeps the brand ink */
.takeover.is-themed .label, .takeover.is-themed .notice, .takeover.is-themed .to-room-cap, .takeover.is-themed .to-art-none p, .takeover.is-themed .to-note, .takeover.is-themed .small, .takeover.is-themed .to-ctx, .takeover.is-themed .dlv-lines { color: var(--tb-ink); }
.takeover.is-themed .to-chip { background: var(--card); color: var(--tb-ink); border-color: var(--rule); }
.takeover.is-themed .to-field input { background: var(--card); color: var(--tb-ink); border-color: var(--rule); }
.takeover.is-themed .to-field input::placeholder { color: var(--muted); }
.takeover.is-themed .btn--primary { background: var(--tb-accent); border-color: var(--tb-accent); color: var(--tb-on-accent); }
.takeover.is-themed .to-head, .takeover.is-themed .to-record, .takeover.is-themed .to-return, .takeover.is-themed .to-ctx { font-family: var(--tb-body); }
.takeover.is-themed .to-chip.is-on { background: var(--tb-accent); border-color: var(--tb-accent); color: var(--tb-on-accent); }
.to-intro { margin-bottom: 28px; }
.to-form label { display: block; font-family: var(--head); font-weight: 700; font-size: 1.15rem; margin-bottom: 10px; }
.to-field { display: flex; gap: 10px; flex-wrap: wrap; max-width: 620px; }
.to-field input { flex: 1 1 280px; min-height: 48px; font-size: 1rem; padding: 0 16px; border-radius: 999px; border: 2px solid var(--rule); background: var(--card); color: inherit; font-family: var(--ui); }
.takeover .notice { margin: 10px 0 0; padding: 0; background: none; font-family: var(--ui); font-size: .92rem; color: var(--muted); }
.to-note { margin: 6px 0 0; min-height: 1.4em; color: var(--amber-ink); }
/* Round four W4 (data-live on the section): the kicker over the heading, the example link under the box, the line before the run */
.to-intro--live .to-kicker { display: block; margin-bottom: 8px; }
.to-intro--live h2 { max-width: 26ch; }
.to-alt { margin: 10px 0 0; }
.to-example { appearance: none; background: none; border: 0; padding: 0; min-height: 44px; font: inherit; font-family: var(--ui); font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.to-example:hover { text-decoration-thickness: 2px; }
.to-then { margin: 24px 0 0; max-width: 60ch; }
.takeover.is-themed .to-example { color: var(--tb-ink); font-family: var(--tb-body); }
.to-chip { cursor: pointer; background: var(--card); min-height: 44px; font-family: var(--ui); font-size: .92rem; }
.to-chip.is-on { background: var(--amber); border-color: var(--amber); color: var(--navy); }
.to-wait { display: grid; grid-template-columns: 480px 1fr; gap: 28px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; min-height: 320px; }
/* the wait stage (H30, F13, F14): Ping and Wire side by side, each in a square frame, figures drawn at the same height.
   Wire's loop is a wide 16:9 video with the figure in its middle; it is scaled so the figure matches Ping's and the empty sides are cut away. */
.to-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.to-ping, .to-wire { position: relative; aspect-ratio: 1; }
.to-ping .uwee { width: 100%; }
.to-ping .pose { width: 100%; height: auto; }
.to-wire { overflow: hidden; }
.to-wire .uwee { position: absolute; width: 209.4%; left: -54.7%; top: 0; z-index: 1; }
.to-wire .uwee .shadow { display: none; }
.to-wire::after { content: ""; position: absolute; left: 24%; right: 24%; bottom: 2%; height: 7%; border-radius: 50%; background: rgba(17,22,39,.22); z-index: 0; }
.to-wait-copy h3 { font-size: 1.5rem; min-height: 2.2em; margin: 6px 0; }
.to-caption { min-height: 3.2em; }
.to-explore { margin-top: 10px; }
.to-explore-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.to-explore-chips .to-chip { min-height: 44px; font-size: .85rem; }

/* the run: record first, then each piece shown whole beside the room that made it, the words above saying what it is */
.to-run-wrap { margin-top: 40px; }
.to-run { --per: 70vh; } /* the run reserves its full height from first paint (fix 10); 70vh of scroll per panel keeps that reserve a third shorter than the station track */
.to-run .track__view { background: var(--tb-bg); color: var(--tb-ink); }
/* the site header (68px) is sticky over the pinned run, so the run head sits below it, not under it */
.to-head { position: absolute; left: var(--gutter); top: 82px; z-index: 6; display: flex; gap: 6px 16px; align-items: baseline; flex-wrap: wrap; }
.to-logo-small { font-size: 1.5rem; font-weight: 700; }
.to-quiet { font-weight: 500; }
/* H32/H66/F15: content starts right under the run head instead of floating in the middle of the panel */
.to-panel-in { height: 100%; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-content: start; align-items: start; gap: 16px clamp(20px, 3vw, 44px); padding: 124px var(--gutter) 24px; }
/* Build eight SB (Sarah wjfJSKkXW_8J on Images, bWwuH59CMsER on Writing How, both at 1792: "reduce the negative space at
   the bottom of this section by about 2/3rds"). On a product page the pinned view was a full screen tall while its
   tallest panel ends about a fifth of the way up from the bottom, so 179 px (1440 x 900) to 205 px (1792 x 1010) of
   empty view sat between the last panel and the section after it. There the view takes its tallest panel's height
   (never more than the screen) and keeps 64 px under it. The run's height and scroll length are unchanged, so nothing
   below moves while pictures load; the section after it rises into that space as the run ends. Home's run (data-live)
   keeps its full-screen view, and the stacked run (phones, motion reduced) is untouched. */
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
  .takeover:not([data-live]) .to-run .track__view { height: auto; max-height: 100vh; }
  .takeover:not([data-live]) .to-panel-in { padding-bottom: 64px; }
}
/* Fix pass H5 (Dan 2026-11-16: "can we keep the size but mak the container smaller so it fits better?", then on the
   trial "yes agreed. this is much better"; plan 2026-11-16-1345 H5). Every picture, card and word keeps its size. While
   a run is held its box is only as tall as its tallest panel plus 64px above and below, and takeover.js (JINN.runPin)
   pins it at --to-pin, the middle of the room under the site header, so the rest of the window is plain page ground
   split evenly above and below. The panels sit in one row as tall as the tallest, so a shorter panel is centered in
   the box. The box no longer runs under the header, so the 124px that cleared it (and the run head's 82px) drop by
   the header's 60px: the head keeps its 5px to the content. takeover.js sets data-snug only when the box fits under
   the header; on a short window, a phone or with motion reduced none of this applies and the run is as above. */
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
  .takeover .to-run[data-snug] .track__view { top: var(--to-pin, 0px); height: auto; max-height: none; }
  .takeover .to-run[data-snug] .track__rail { display: grid; grid-auto-flow: column; height: auto; }
  .takeover .to-run[data-snug] .track__panel { height: auto; }
  .takeover .to-run[data-snug] .to-head { top: 22px; }
  .takeover .to-run[data-snug] .to-panel-in { padding-top: 64px; padding-bottom: 64px; align-content: center; }
}
.to-cap { grid-column: 1 / -1; }
.to-cap-row { display: flex; gap: 10px 12px; align-items: center; flex-wrap: wrap; }
.to-kind { font-size: clamp(1.7rem, 2.8vw, 2.4rem); font-weight: 700; line-height: 1.1; margin-right: 6px; }
.to-ctx { margin: 6px 0 0; max-width: 72ch; font-size: 1.05rem; line-height: 1.45; color: var(--ink-2); }
.to-work { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; justify-items: start; }
.to-art { margin: 0; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); max-height: calc(100vh - 350px); transform: scale(.96); transform-origin: left top; transition: transform .7s var(--ease); }
/* H68 / rule 9: the frame hugs the picture, no white bands beside a tall image */
.to-art { justify-self: start; width: fit-content; max-width: 100%; background: transparent; }
.to-art img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 350px); }
.to-panel--post .to-art, .to-panel--collage .to-art, .to-panel--film .to-art { max-height: none; }
.to-panel.is-live .to-art { transform: scale(1); }
.to-panel .placeholder.to-art { min-height: 360px; }
/* H35: the roller rink becomes a collage: tall picture, wide picture, and a note that says what both are */
.to-art.dlv-art--collage { display: grid; grid-template-columns: 43.4% minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 8px; width: min(100%, calc((100vh - 360px) * 1.72)); aspect-ratio: 1.72; box-shadow: none; border-radius: 0; overflow: visible; }
.to-art.dlv-art--collage img { width: 100%; height: 100%; max-height: none; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); }
.to-art.dlv-art--collage .c-tall { grid-row: 1 / span 2; }
.to-art.dlv-art--collage .c-wide { height: auto; aspect-ratio: 2; }
.to-art .c-note { background: none; border: 0; padding: 8px 4px; display: grid; align-content: start; gap: 6px; font-size: 1rem; }
.to-art .c-note b { font-family: var(--tb-display); font-size: 1.3rem; }
/* a film shown as three frames: the opening frame large, the next two stacked beside it */
.to-art.dlv-art--film { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: 8px; width: min(100%, calc((100vh - 370px) * 2.667)); aspect-ratio: 2.667; box-shadow: none; border-radius: 0; overflow: visible; }
.to-art.dlv-art--film img { width: 100%; height: 100%; max-height: none; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); }
.to-art.dlv-art--film .f0 { grid-row: 1 / span 2; }
.to-art-none { box-shadow: none; background: var(--card); border: 1px dashed var(--rule); min-height: 140px; display: grid; align-items: center; padding: 22px 26px; }
.to-art-none p { margin: 0; max-width: 44ch; font-size: 1.05rem; color: var(--ink-2); }
.to-side { display: grid; gap: 8px; align-self: start; }
.to-room { border-radius: 14px; }
.to-room video { display: none; }
.to-room.is-acting video { display: block; }
.to-room-cap { margin: 0; font-size: .92rem; color: var(--muted); }
/* the record panel: the card is as tall as the room picture beside it (H66, F15) */
.to-panel-record .to-panel-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); grid-template-rows: auto auto; align-items: stretch; }
.to-panel-record .to-side { display: contents; }
.to-panel-record .to-record { grid-column: 1; grid-row: 1; }
.to-panel-record .to-room { grid-column: 2; grid-row: 1; align-self: start; }
.to-panel-record .to-room-cap { grid-column: 2; grid-row: 2; }
.to-record { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; display: grid; align-content: start; gap: 12px; }
.to-rec-top { display: flex; gap: 6px 14px; align-items: baseline; flex-wrap: wrap; }
.to-logo { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 700; line-height: 1; }
.to-sw { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.to-sw i { display: block; width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(0,0,0,.12); }
.to-sw code { display: none; }
.to-sw.is-named { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.to-sw.is-named i { width: 100%; height: 34px; }
.to-sw.is-named b, .to-sw.is-named code { display: block; font-family: var(--ui); font-size: .78rem; line-height: 1.3; margin-top: 4px; }
.to-sw.is-named code { margin-top: 0; } /* full ink, no opacity: the hex codes keep AA on every ground */
.to-facts { margin: 0; display: grid; gap: 6px; }
.to-facts > div { display: grid; grid-template-columns: 72px 1fr; gap: 10px; }
.to-facts dt { font-family: var(--ui); font-weight: 700; font-size: .85rem; }
.to-facts dd { margin: 0; font-size: .95rem; line-height: 1.4; }
.to-record .small { margin: 0; }
/* F20: the return sits in the last run panel under the room (right column); the takeover ends where the run ends */
.to-return { visibility: hidden; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--rule); }
.to-return-line { margin: 0 0 12px; font-size: 1.05rem; line-height: 1.45; }
.to-return .doors { margin: 0; }
.takeover.is-done .to-return { visibility: visible; }
/* Build six part two FIX-7: the wait card stacks on narrow screens only. It used to stack under reduced motion too, which
   left Ping, Wire and four short lines in the left third of a 1200px card at 1024 and 1440; with motion reduced it now
   keeps the two columns it has with motion on (the run below still stacks, as before). */
@media (max-width: 860px) {
  .to-wait { grid-template-columns: 1fr; }
  .to-stage { max-width: 440px; }
}
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .to-chip, .to-explore-chips .to-chip { min-height: 44px; }
  .to-head { position: static; padding: 16px var(--gutter) 0; }
  .to-run .track__view { background: var(--tb-bg); }
  .to-panel-in, .to-panel-record .to-panel-in { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; padding: 24px var(--gutter); gap: 14px; }
  .to-panel-record .to-record, .to-panel-record .to-room, .to-panel-record .to-room-cap { grid-column: auto; grid-row: auto; }
  .to-art { transform: none; max-height: none; }
  .to-art img { max-height: none; }
  .to-art.dlv-art--collage, .to-art.dlv-art--film { width: 100%; }
  /* Build six part two FIX-7: stacked, the collage is one block: the tall and the wide picture side by side at one
     height, the note under both. The columns are in the pictures' own proportions (896 x 1200 is .7467 wide per unit of
     height, 1280 x 640 is 2), so both keep their whole shape with no crop, and no blank sits under the note. */
  .to-art.dlv-art--collage { grid-template-columns: minmax(0, .7467fr) minmax(0, 2fr); grid-template-rows: auto auto; aspect-ratio: auto; align-items: start; }
  .to-art.dlv-art--collage img, .to-art.dlv-art--collage .c-wide { height: auto; }
  .to-art.dlv-art--collage .c-tall { grid-row: 1; grid-column: 1; }
  .to-art.dlv-art--collage .c-wide { grid-row: 1; grid-column: 2; }
  .to-art.dlv-art--collage .c-note { grid-row: 2; grid-column: 1 / -1; padding: 6px 2px 0; }
  .to-panel { scroll-snap-align: start; }
}
/* rule 2 (FIX-F2 r1): phone collage keeps both pictures whole, no crop inside the frame. FIX-7: side by side at one height
   they would stand about 130px tall at 390, so on phones they stack at full width, the note under both. */
@media (max-width: 560px) {
  .to-art.dlv-art--collage { grid-template-columns: minmax(0, 1fr); }
  .to-art.dlv-art--collage .c-tall { grid-row: 1; grid-column: 1; }
  .to-art.dlv-art--collage .c-wide { grid-row: 2; grid-column: 1; }
  .to-art.dlv-art--collage .c-note { grid-row: 3; grid-column: 1; }
}
