/* Freshet website.
   Palette and type follow the app's DesignTokens.swift: dark and cold, colours
   drawn from meltwater. The piece map is drawn the way the app's seek bar
   draws it (PlayerView.swift): `ice` ticks on a translucent track, under an
   `ice` fill that runs up to the knob. */

:root {
  --deep: #0C1317;
  --surface: #16222A;
  --line: #243541;
  --ice: #E6EEF2;
  --ice-2: #C4D2D9;
  --mist: #8AA1AE;
  --melt: #4FC3E8;
  --system-accent: #0A84FF;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Inter Variable", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Inter Variable", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "JetBrains Mono", Consolas, monospace;
  /* The springs from SearchBarView.swift, sampled into CSS below. */
  --spring-fan: cubic-bezier(.3, 1.3, .5, 1);
  --spring-panel: cubic-bezier(.3, 1.4, .5, 1);
  --spring-soft: cubic-bezier(.22, .9, .3, 1);
  --wrap: 1180px;
  --gutter: 22px;
  color-scheme: dark;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* spring(response: 0.3, dampingFraction: 0.7) */
    --spring-fan: linear(0, .0337, .1179, .2308, .3562, .482, .6001, .7056, .7957, .8698, .9283, .9726, 1.0043, 1.0255, 1.0383, 1.0445, 1.046, 1.044, 1.0399, 1.0346, 1.0288, 1.023, 1.0177, 1.0129, 1.0089, 1.0056, 1.003, 1.001, .9996, .9987, .9982, .9979, 1);
    /* spring(response: 0.3, dampingFraction: 0.6) */
    --spring-panel: linear(0, .0458, .159, .3082, .4688, .6235, .7608, .8745, .9624, 1.0252, 1.0657, 1.0875, 1.0947, 1.0915, 1.0814, 1.0676, 1.0524, 1.0375, 1.0243, 1.0132, 1.0045, .9983, .9942, .9919, .9911, .9912, .9921, .9934, .9948, .9963, .9975, .9986, 1);
    --spring-soft: linear(0, .0229, .0806, .1592, .2488, .3419, .4334, .5198, .5991, .6702, .7325, .7864, .8321, .8703, .9018, .9274, .9479, .964, .9765, .986, .993, .9981, 1.0016, 1.0039, 1.0053, 1.0061, 1.0063, 1.0062, 1.0058, 1.0053, 1.0048, 1.0042, 1);
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--deep); scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--deep); color: var(--ice); font: 400 17px/1.47 var(--sans); letter-spacing: -.022em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
main { overflow-x: clip; }
img, svg, canvas { display: block; }
h1, h2, h3, p, dl, dd, ul, ol, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--melt); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--melt); outline-offset: 3px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 1em; height: 1em; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); letter-spacing: 0; }
b, strong { font-weight: 600; color: var(--ice); }
code { font: 500 .86em/1 var(--mono); letter-spacing: 0; color: var(--ice); background: rgba(230, 238, 242, .07); padding: .2em .42em; border-radius: 6px; white-space: nowrap; }
kbd { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 7px; background: linear-gradient(#1C2B35, #15212A); box-shadow: inset 0 0 0 1px rgba(230, 238, 242, .13), 0 1px 0 rgba(0, 0, 0, .45); font: 500 14px/1 var(--sans); color: var(--ice); letter-spacing: 0; }
.skip { position: absolute; left: 12px; top: -64px; z-index: 100; padding: 8px 14px; border-radius: 10px; background: var(--melt); color: var(--deep); font-weight: 600; }
.skip:focus { top: 12px; }

/* Type */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.sec { padding-block: clamp(96px, 12vw, 168px); }
h2 { font: 700 clamp(38px, 5.2vw, 64px)/1.05 var(--display); letter-spacing: -.028em; color: var(--ice); text-wrap: balance; }
h3 { font: 600 19px/1.3 var(--sans); letter-spacing: -.02em; color: var(--ice); }
p { text-wrap: pretty; }
.lead { max-width: 36em; font-size: clamp(19px, 1.55vw, 21px); line-height: 1.45; letter-spacing: -.018em; color: var(--ice-2); }
.body { color: var(--mist); }
.small, .fine { font-size: 14px; line-height: 1.45; letter-spacing: -.01em; color: var(--mist); }
.head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; }
@media (max-width: 900px) { .head { grid-template-columns: 1fr; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 980px; background: var(--melt); color: #06232D; font: 600 17px/1 var(--sans); letter-spacing: -.015em; text-decoration: none; transition: background-color .2s ease, transform .3s var(--spring-soft); }
.btn:hover { background: #74D2F0; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn .i { width: 18px; height: 18px; }
.btn-nav { min-height: 28px; padding: 0 13px; font-size: 12px; font-weight: 500; letter-spacing: -.01em; }
.btn-lg { min-height: 52px; padding: 0 30px; font-size: 19px; }
.btn-lg .i { width: 20px; height: 20px; }
.link { font-size: 17px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 15px; border: 1px solid rgba(230, 238, 242, .14); border-radius: 980px; background: rgba(230, 238, 242, .06); color: var(--ice); font-size: 14px; font-weight: 500; letter-spacing: -.01em; cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.chip:hover { background: rgba(230, 238, 242, .11); border-color: rgba(230, 238, 242, .24); }
.chip .i { width: 15px; height: 15px; color: var(--melt); }
.chip-sm { min-height: 28px; padding: 0 11px; font-size: 13px; }
.chip-sm .i { width: 13px; height: 13px; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(12, 19, 23, .72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(36, 53, 65, .85); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 52px; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.nav-brand { display: flex; align-items: center; gap: 9px; margin-right: auto; color: var(--ice); font: 600 19px/1 var(--display); letter-spacing: -.02em; }
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 22px; height: 22px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--ice-2); font-size: 12px; letter-spacing: -.01em; }
.nav-links a:hover { color: var(--ice); text-decoration: none; }
@media (max-width: 820px) { .nav-links { display: none; } }

/* Hero */
.hero { position: relative; isolation: isolate; padding-top: clamp(56px, 7vw, 96px); text-align: center; }
.hero::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: -52px; height: 960px; background: radial-gradient(55% 60% at 50% 0%, rgba(27, 110, 140, .42), rgba(27, 110, 140, 0) 70%); pointer-events: none; }
.hero-icon { width: clamp(104px, 11vw, 136px); height: auto; margin: 0 auto; overflow: visible; }
.hero-name { margin-top: 18px; font: 600 clamp(24px, 2.3vw, 30px)/1.1 var(--display); letter-spacing: -.02em; }
.hero-line { margin-top: 8px; font: 700 clamp(46px, 7.6vw, 96px)/1.02 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.hero-lead { max-width: 620px; margin: 22px auto 0; font-size: clamp(19px, 1.7vw, 22px); line-height: 1.42; letter-spacing: -.018em; color: var(--ice-2); }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 30px; margin-top: 32px; }
.hero .fine { margin-top: 18px; }
.js .hero-icon .bars rect { transform-box: fill-box; transform-origin: 0 50%; animation: bar-in .9s var(--spring-soft) both; animation-delay: calc(var(--d) * 55ms + .15s); }
@keyframes bar-in { from { transform: scaleX(0); opacity: 0; } 25% { opacity: 1; } to { transform: none; opacity: 1; } }

/* Stage: a 1280 x 800 virtual Mac screen, scaled to fit */
.stage-fig { margin-top: clamp(52px, 6vw, 84px); }
.stage { position: relative; overflow: hidden; aspect-ratio: var(--ar, 16 / 10); border-radius: clamp(12px, 1.7vw, 22px); background: #0B2330; box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 50px 120px -30px rgba(0, 0, 0, .85), 0 0 120px -30px rgba(79, 195, 232, .28); touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.stage:focus-visible { outline-offset: 5px; }
.no-js .stage-fig { display: none; }
.screen { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; transform-origin: 0 0; transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(var(--k, .5)); color: #fff; font: 400 13px/1.3 var(--sans); letter-spacing: -.01em; text-align: left; }
.wall { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(60% 55% at 20% 16%, rgba(79, 195, 232, .5), transparent 62%), radial-gradient(55% 65% at 84% 26%, rgba(27, 110, 140, .95), transparent 66%), radial-gradient(70% 60% at 58% 100%, #0D3B52, transparent 72%), radial-gradient(45% 45% at 6% 88%, rgba(62, 128, 176, .55), transparent 70%), linear-gradient(168deg, #1D6583 0%, #0F3749 46%, #0A1B25 100%); }
.wall-flow { position: absolute; inset: 0; width: 100%; height: 100%; }
.menubar { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 19px; height: 26px; padding: 0 16px; font-size: 13px; text-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
.menubar b { font-weight: 700; }
.mb-r { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.mb-r .i { width: 16px; height: 16px; }

/* Liquid Glass, approximated: blur, the app's dark scrim, and a white rim that fades downward (SearchBarView.swift) */
.glass { position: relative; background: rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(24px) saturate(165%); backdrop-filter: blur(24px) saturate(165%); box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 8px 16px rgba(0, 0, 0, .1); }
.glass::after { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, .1)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

/* The search bar */
.sb { position: absolute; left: 320px; top: 185px; width: 640px; height: 56px; transition: opacity .22s ease, transform .3s var(--spring-soft); }
.sb[data-hidden="1"] { opacity: 0; transform: translateY(-6px) scale(.97); pointer-events: none; }
.sb-pill { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 16px; width: 640px; height: 56px; padding: 0 12px 0 18px; border-radius: 28px; transition: width .424s var(--spring-fan); }
.sb[data-fan="1"] .sb-pill { width: 448px; }
/* The magnifier, the placeholder and the side glyphs share one tone, as in the app */
.sb-mag { width: 24px; height: 24px; color: rgba(255, 255, 255, .62); }
.sb-field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; height: 32px; overflow: hidden; font-size: 26px; letter-spacing: -.02em; white-space: nowrap; }
.sb-ph { overflow: hidden; text-overflow: ellipsis; color: rgba(255, 255, 255, .62); }
.sb-caret { position: absolute; left: 0; top: 2px; width: 2px; height: 28px; border-radius: 1px; background: #fff; animation: caret 1.06s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
/* Hovering a side button only previews its name in the placeholder; the button itself doesn't change */
.sb-btn { position: absolute; top: 1px; left: 585px; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: rgba(255, 255, 255, .62); opacity: 0; transform: scale(.4); pointer-events: none; transition: left .424s var(--spring-fan), transform .424s var(--spring-fan), opacity .18s ease; }
.sb-btn .i { width: 22px; height: 22px; }
.sb[data-fan="1"] .sb-btn { opacity: 1; transform: none; pointer-events: auto; }
.sb[data-fan="1"] .sb-btn:nth-child(2) { left: 458px; }
.sb[data-fan="1"] .sb-btn:nth-child(3) { left: 522px; transition-delay: .02s; }
.sb[data-fan="1"] .sb-btn:nth-child(4) { left: 586px; transition-delay: .04s; }

/* The player window */
.pw { position: absolute; left: 192px; top: 150px; width: 896px; height: 504px; overflow: hidden; border-radius: 16px; background: var(--deep); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 30px 90px rgba(0, 0, 0, .55), 0 10px 30px rgba(0, 0, 0, .35); opacity: 0; transform: scale(.94); pointer-events: none; transition: opacity .22s ease, transform .495s var(--spring-panel); }
.pw[data-open="1"] { opacity: 1; transform: none; pointer-events: auto; }
.pw[data-chrome="0"] { cursor: none; }
.pw-film { position: absolute; inset: 0; width: 100%; height: 100%; }
.pw-chrome { position: absolute; inset: 0; pointer-events: none; transition: opacity .25s ease; }
.pw-chrome > * { pointer-events: auto; }
.pw[data-chrome="0"] .pw-chrome { opacity: 0; }
.pw[data-chrome="0"] .pw-chrome > * { pointer-events: none; }
.lights { position: absolute; left: 14px; top: 14px; display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #FF5F57; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .2); }
.lights i:nth-child(2) { background: #FEBC2E; }
.lights i:nth-child(3) { background: #28C840; }
.pw-title { position: absolute; left: 16px; top: 38px; font: 600 15px/1.2 var(--sans); letter-spacing: -.01em; color: var(--ice); text-shadow: 0 0 6px rgba(0, 0, 0, .6), 0 1px 2px rgba(0, 0, 0, .5); }
.pw .ctl { position: absolute; left: 16px; right: 16px; bottom: 16px; }

/* The control bar, shared by both players */
.ctl { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 16px; background: rgba(22, 34, 42, .42); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 8px 24px rgba(0, 0, 0, .25); color: var(--ice); font-size: 14px; }
.ctl .i { width: 17px; height: 17px; }
.ctl-b { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; background: none; color: var(--ice); cursor: pointer; }
.ctl-t { font: 400 12px/1 var(--mono); letter-spacing: 0; color: var(--mist); font-variant-numeric: tabular-nums; white-space: nowrap; }
.seek { position: relative; flex: 1; min-width: 44px; height: 20px; cursor: pointer; touch-action: none; }
.seek canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.knob { position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 1px rgba(0, 0, 0, .6), 0 1px 3px rgba(0, 0, 0, .35); pointer-events: none; }
.tip { position: absolute; left: 0; bottom: calc(100% + 8px); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 10px; border-radius: 10px; background: rgba(22, 34, 42, .72); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 6px 16px rgba(0, 0, 0, .3); color: var(--ice); white-space: nowrap; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .12s ease; }
.tip.on { opacity: 1; }
.tip b { font: 500 13px/1.1 var(--mono); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.tip-nd { display: none; align-items: center; gap: 4px; font-size: 10px; font-weight: 500; letter-spacing: 0; color: var(--mist); }
.tip.nd .tip-nd { display: flex; }
.tip .tip-nd .i { width: 10px; height: 10px; }
.ctl-vol { display: flex; align-items: center; gap: 6px; color: var(--mist); }
.ctl .ctl-vol .i { width: 12px; height: 12px; }
.volbar { position: relative; width: 80px; height: 4px; border-radius: 2px; background: rgba(230, 238, 242, .28); }
/* A new player opens at full volume (PlayerModel.swift), so the knob rests at the end of the track */
.volbar i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(100% - 6px); border-radius: 2px; background: var(--ice); }
.volbar i::after { content: ""; position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 1px rgba(0, 0, 0, .6), 0 1px 3px rgba(0, 0, 0, .35); }

/* Buffering overlay: red while connecting, white while fetching (PlayerView.swift) */
.buf { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 80px; height: 80px; margin: -40px 0 0 -40px; border-radius: 16px; background: #000; opacity: 0; pointer-events: none; transition: opacity .2s ease; --glow: #fff; }
.buf.on { opacity: 1; }
.buf[data-stage="connecting"] { --glow: #FF453A; }
.buf::after { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--glow); border-radius: inherit; animation: glow .9s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .5; box-shadow: 0 0 4px var(--glow); } to { opacity: 1; box-shadow: 0 0 16px var(--glow); } }
.spin { width: 32px; height: 32px; animation: spin 1s steps(12) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.keyhud { position: absolute; left: 50%; top: 520px; display: flex; gap: 6px; padding: 10px 14px; border-radius: 18px; opacity: 0; transform: translateX(-50%) scale(.92); pointer-events: none; transition: opacity .2s ease, transform .3s var(--spring-fan); }
.keyhud.on { opacity: 1; transform: translateX(-50%); }
.keyhud kbd { min-width: 44px; height: 44px; padding: 0 10px; border-radius: 10px; background: rgba(255, 255, 255, .12); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .18); font-size: 22px; color: #fff; }
.ghost { position: absolute; left: 0; top: 0; z-index: 5; width: 26px; height: 26px; opacity: 0; transform: translate(1100px, 700px); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); pointer-events: none; transition: transform .6s cubic-bezier(.45, .05, .25, 1), opacity .25s ease, scale .12s ease; }
.ghost.on { opacity: 1; }
.ghost.press { scale: .84; }
.coach { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; margin-top: 24px; font-size: 15px; color: var(--ice-2); }
.coach-text { min-height: 1.4em; }
.stage-note { margin-top: 10px; font-size: 13px; color: var(--mist); text-align: center; }

/* Piece map */
.pm { margin-top: clamp(48px, 6vw, 72px); padding: clamp(22px, 3vw, 36px); border-radius: 28px; background: linear-gradient(180deg, rgba(22, 34, 42, .72), rgba(22, 34, 42, .35)); box-shadow: inset 0 0 0 1px rgba(36, 53, 65, .9); }
.pm-row + .pm-row { margin-top: 30px; }
.pm-label { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; font-size: 14px; color: var(--mist); }
.pm-label span:first-child { font-weight: 600; color: var(--ice); }
.pm-label span:last-child { text-align: right; }
.pbar { height: 6px; overflow: hidden; border-radius: 3px; background: var(--line); }
.pbar i { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--mist); }
/* The player's seek bar at twice its size: an 8px track and a 24px knob (4 and 12 in the app) */
.strip { position: relative; height: 32px; cursor: pointer; touch-action: none; }
.strip canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.strip .knob { top: 4px; width: 24px; height: 24px; box-shadow: 0 0 2px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .35); }
.pm-axis { display: flex; justify-content: space-between; margin-top: 8px; padding: 0 12px; font-size: 12px; color: var(--mist); }
.pm-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; color: var(--mist); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 8px; border-radius: 4px; background: rgba(230, 238, 242, .28); }
.legend .k-have { background: var(--ice); }
.legend .k-head { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 1px rgba(0, 0, 0, .6), 0 1px 3px rgba(0, 0, 0, .35); }
.pm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12px; color: var(--mist); }
.pm-file { font-size: 13px; font-weight: 600; color: var(--ice); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 56px; margin-top: 48px; color: var(--mist); }
.aside { margin-top: 28px; font-size: 14px; color: var(--mist); }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }

/* Scaled mock screens */
.vscreen { position: relative; overflow: hidden; aspect-ratio: var(--ar, 16 / 9); }
.vs-in { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: scale(var(--k, .5)); color: #fff; font: 400 13px/1.3 var(--sans); letter-spacing: -.01em; }

/* Paste */
.split { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.split-copy h2 { margin-bottom: 22px; }
.split-copy .body { margin-top: 18px; }
.tile { border-radius: clamp(16px, 2.2vw, 28px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 30px 80px -30px rgba(0, 0, 0, .8); }
.panel { position: absolute; left: 60px; top: 70px; width: 640px; height: 420px; overflow: hidden; border-radius: 22px; font-size: 14px; }
.panel-row { display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 12px 0 18px; }
.panel-row .sb-ph { flex: 1; font-size: 26px; letter-spacing: -.02em; white-space: nowrap; }
.panel-back { width: 34px; height: 34px; padding: 7px; color: rgba(255, 255, 255, .62); }
.panel-div { height: 1px; background: rgba(255, 255, 255, .12); }
.panel-head { padding: 12px 20px 4px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .55); }
.panel-list { padding: 6px 0; }
.panel-list li { display: flex; align-items: center; gap: 10px; margin: 0 8px 2px; padding: 8px 12px; border-radius: 10px; }
.panel-list .i { width: 17px; height: 17px; color: var(--melt); }
.panel-list li.on { background: var(--system-accent); }
.panel-list li.on .i { color: #fff; }
.panel-list .panel-del { margin-left: auto; color: rgba(255, 255, 255, .8); }
.keys { margin-top: 32px; border-top: 1px solid var(--line); }
.keys > div { display: grid; grid-template-columns: 124px 1fr; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.keys dt { display: flex; gap: 5px; }
.keys dd { color: var(--ice-2); font-size: 16px; }
.split-copy .small { margin-top: 20px; }

/* Player showcase */
.show { margin-top: clamp(48px, 6vw, 72px); }
.show-frame { border-radius: clamp(14px, 2vw, 28px); background: #0B2330; box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 40px 100px -30px rgba(0, 0, 0, .85); }
.sw { position: absolute; left: 0; top: 0; display: flex; width: 1280px; height: 720px; overflow: hidden; background: #000; transition: left .5s var(--spring-panel), top .5s var(--spring-panel), width .5s var(--spring-panel), height .5s var(--spring-panel), border-radius .4s ease, box-shadow .4s ease; }
.show[data-tab="pip"] .sw { left: 872px; top: 470px; width: 376px; height: 212px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 24px 60px rgba(0, 0, 0, .55); }
.sw-video { position: relative; flex: 1 1 auto; min-width: 0; height: 100%; overflow: hidden; }
.sw-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sw .ctl { position: absolute; left: 16px; right: 16px; bottom: 16px; transition: opacity .3s ease; }
.sw .lights, .sw .pw-title { transition: opacity .3s ease; }
.show[data-tab="pip"] .sw .ctl, .show[data-tab="pip"] .sw .lights, .show[data-tab="pip"] .sw .pw-title { opacity: 0; }
/* The playlist toggle is pinned to the window's top-right, level with the title, whenever a season is open */
.sw-sidebar { position: absolute; right: 16px; top: 36px; z-index: 1; width: 26px; height: 26px; padding: 4px; color: var(--ice); filter: drop-shadow(0 0 6px rgba(0, 0, 0, .6)); opacity: 0; transition: opacity .3s ease; }
.show[data-tab="subtitles"] .sw-sidebar, .show[data-tab="season"] .sw-sidebar { opacity: 1; }
/* mpv's default subtitle style: regular weight, 38px at 720p, a 3px black outline */
.sub { position: absolute; left: 0; right: 0; bottom: 120px; font: 400 38px/1.25 var(--sans); letter-spacing: 0; color: #fff; text-align: center; text-shadow: 3px 0 #000, 2.77px 1.15px #000, 2.12px 2.12px #000, 1.15px 2.77px #000, 0 3px #000, -1.15px 2.77px #000, -2.12px 2.12px #000, -2.77px 1.15px #000, -3px 0 #000, -2.77px -1.15px #000, -2.12px -2.12px #000, -1.15px -2.77px #000, 0 -3px #000, 1.15px -2.77px #000, 2.12px -2.12px #000, 2.77px -1.15px #000; opacity: 0; transition: opacity .3s ease; }
.show[data-tab="subtitles"] .sub { opacity: 1; }
.menu { position: absolute; left: 900px; bottom: 100px; width: 210px; padding: 5px; border-radius: 12px; background: rgba(30, 40, 48, .62); color: #fff; font-size: 13px; opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .35s var(--spring-soft); }
.show[data-tab="subtitles"] .menu { opacity: 1; transform: none; }
.mi { display: flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px 0 4px; border-radius: 6px; }
.mi .ck { width: 18px; font-size: 12px; font-weight: 600; text-align: center; }
.mi.hl { background: var(--system-accent); }
.mi .msub { width: 10px; height: 10px; margin-left: auto; color: rgba(255, 255, 255, .6); }
.mhead { padding: 4px 10px 2px 26px; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, .5); }
.msep { height: 1px; margin: 5px 8px; background: rgba(255, 255, 255, .14); }
.pipc { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: 10px; color: #fff; opacity: 0; transition: opacity .3s ease; }
.show[data-tab="pip"] .pipc { opacity: 1; transition-delay: .35s; }
.pipc .i { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: rgba(0, 0, 0, .4); }
.pipc .pipc-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; padding: 12px; }
/* The playlist sidebar (PlaylistPanel in PlayerView.swift): 280 wide, sliding in from the trailing edge */
.sw-list { flex: 0 0 auto; width: 0; height: 100%; overflow: hidden; background: var(--surface); box-shadow: inset 1px 0 0 var(--line); transition: width .28s ease-in-out; }
.show[data-tab="season"] .sw-list { width: 280px; }
.sw-list-in { width: 280px; padding: 44px 8px 12px; }
.sw-list-h { margin: 0 6px 10px; font-size: 13px; font-weight: 600; color: var(--ice); }
.sw-list li { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; padding: 8px 10px; border-radius: 8px; font-size: 12px; color: var(--mist); overflow-wrap: anywhere; }
.sw-list .n { flex: none; display: grid; place-items: center; width: 20px; font: 400 11px/1 var(--mono); color: var(--mist); }
.sw-list .n .i { width: 13px; height: 13px; color: var(--melt); }
.sw-list li.now { background: rgba(79, 195, 232, .16); color: var(--ice); }
.tabs { position: relative; display: flex; width: max-content; max-width: 100%; margin: 28px auto 0; padding: 4px; overflow-x: auto; border-radius: 980px; background: rgba(230, 238, 242, .07); box-shadow: inset 0 0 0 1px rgba(230, 238, 242, .1); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; z-index: 1; padding: 9px 18px; border: 0; border-radius: 980px; background: none; color: var(--mist); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color .2s ease; }
.tabs button:hover, .tabs button[aria-selected="true"] { color: var(--ice); }
.tabs-ind { position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: 980px; background: rgba(230, 238, 242, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); transition: transform .424s var(--spring-fan), width .424s var(--spring-fan); }
.show-cap { max-width: 640px; min-height: 5.9em; margin: 20px auto 0; color: var(--mist); text-align: center; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 48px; margin-top: clamp(64px, 8vw, 104px); }
.facts p { padding-top: 18px; border-top: 1px solid var(--line); color: var(--mist); }
.facts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(48px, 6vw, 72px); }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .facts, .facts-2 { grid-template-columns: 1fr; } }

/* How it works */
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 52px 40px; margin-top: clamp(56px, 7vw, 88px); }
.flow li { position: relative; padding-top: 40px; }
.flow li::before { content: ""; position: absolute; left: 32px; right: -34px; top: 11px; height: 1px; background: linear-gradient(90deg, rgba(79, 195, 232, .7), rgba(79, 195, 232, .12)); }
.flow li:nth-child(3n)::before { right: 0; background: linear-gradient(90deg, rgba(79, 195, 232, .7), rgba(79, 195, 232, 0)); }
.flow li:last-child::before { display: none; }
.fn { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--melt); color: var(--melt); font: 600 12px/1 var(--sans); letter-spacing: 0; }
.flow h3 { margin-bottom: 8px; }
.flow h3 code { font-size: .92em; }
.flow p { color: var(--mist); font-size: 16px; line-height: 1.5; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow li { padding: 0 0 34px 46px; }
  .flow li::before, .flow li:nth-child(3n)::before { left: 11px; right: auto; top: 30px; bottom: 6px; width: 1px; height: auto; background: linear-gradient(180deg, rgba(79, 195, 232, .6), rgba(79, 195, 232, .1)); }
}
.note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 48px; align-items: baseline; margin-top: clamp(56px, 7vw, 80px); padding-top: 32px; border-top: 1px solid var(--line); }
.note-big { font: 700 clamp(28px, 3.4vw, 40px)/1.1 var(--display); letter-spacing: -.025em; color: var(--ice); white-space: nowrap; }
.note p:last-child { max-width: 40em; color: var(--mist); }
@media (max-width: 760px) { .note { grid-template-columns: 1fr; } }

/* Specs */
.spec { margin-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--line); }
.spec > div { display: grid; grid-template-columns: minmax(150px, 280px) minmax(0, 1fr); gap: 6px 32px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-weight: 600; color: var(--ice); }
.spec dd { color: var(--mist); }
@media (max-width: 640px) { .spec > div { grid-template-columns: 1fr; } }

/* Download */
.get { position: relative; isolation: isolate; }
.get::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(50% 40% at 50% 22%, rgba(27, 110, 140, .32), transparent 70%); pointer-events: none; }
.get-main { text-align: center; }
.get-icon { width: clamp(112px, 12vw, 148px); height: auto; margin: 0 auto 26px; }
.get .lead { margin: 14px auto 0; }
.get .btn-lg { margin-top: 32px; }
.get .fine { max-width: 38em; margin: 18px auto 0; }
.get-links { display: flex; justify-content: center; gap: 22px; }
.get .get-links { margin-top: 8px; }
.get-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 44px; margin-top: clamp(64px, 8vw, 96px); text-align: left; }
.get-cols > div { padding-top: 20px; border-top: 1px solid var(--line); }
.get-cols h3 { margin-bottom: 10px; }
.get-cols p { color: var(--mist); font-size: 16px; }
.get-cols p + .chip { margin-top: 16px; }
.code { position: relative; margin-top: 14px; }
.code pre { overflow-x: auto; padding: 14px 16px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ice); font: 12.5px/1.65 var(--mono); letter-spacing: 0; }
.code .chip { margin-top: 12px; }
.get-cols .code-note { margin-top: 14px; font-size: 14px; line-height: 1.6; }
@media (max-width: 900px) { .get-cols { grid-template-columns: 1fr; } }

/* Footer */
.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); color: var(--mist); font-size: 12px; line-height: 1.55; letter-spacing: -.005em; }
.foot p + p { margin-top: 10px; }
.foot a { color: var(--ice-2); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.foot-links { display: flex; flex-wrap: wrap; row-gap: 6px; }
.foot-links a { padding: 0 10px; border-left: 1px solid var(--line); }
.foot-links a:first-child { padding-left: 0; border-left: 0; }
.foot .foot-credit { margin-top: 18px; }

.t-short { display: none; }
@media (max-width: 600px) {
  .keys > div { grid-template-columns: 96px 1fr; }
  .tabs button { padding: 8px 13px; font-size: 13px; }
  .t-long { display: none; }
  .t-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}
