/* ============ Tokens ============ */
:root {
  --font-ui: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --pad: 4vw;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --rain: #6dffa0;
  color-scheme: dark;
}
body[data-profile='build'] {
  --bg: #0b0707; --bg-2: #140c0c; --card: #1b1111; --line: rgba(255, 220, 210, .09);
  --text: #f7efe9; --muted: #b8a7a0; --accent: #ff2d40; --accent-2: #ff8a3d;
  --glow: rgba(255, 45, 64, .42);
  --font-display: 'Big Shoulders Display', 'Schibsted Grotesk', sans-serif;
}
body[data-profile='defend'] {
  --bg: #04070b; --bg-2: #08111b; --card: #0a1520; --line: rgba(120, 190, 255, .1);
  --text: #d8e6f2; --muted: #7d93a8; --accent: #3db4ff; --accent-2: #5cffb0; --alert: #ff3b5c;
  --glow: rgba(61, 180, 255, .38);
  --font-display: 'Martian Mono', 'IBM Plex Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #000; color: #e8e8e8; font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body[data-profile] { background: var(--bg); color: var(--text); transition: background .6s var(--ease); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: #fff; color: #000; font-weight: 600; text-decoration: none; border-radius: 4px; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent, #6dffa0); outline-offset: 3px; }

/* ============ Intro ============ */
#intro { position: relative; background: #000; }
#film-scroll { position: relative; height: 560vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#film { opacity: 0; }
#film, #rain, .wake, .beat, .choice, .scroll-cue { will-change: opacity; }
.grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,.75) 100%); }

.gate { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.gate[hidden] { display: none; }
.wake {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; text-align: center;
  padding: 0 20px; pointer-events: none;
}
.wake::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: min(980px, 120vw); height: 460px;
  transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(0,0,0,.92), rgba(0,0,0,0)); z-index: -1;
}
.typed {
  font-family: var(--font-mono); font-weight: 500; color: var(--rain); margin: 0;
  font-size: clamp(22px, 3.6vw, 46px); letter-spacing: .01em; min-height: 1.3em;
  text-shadow: 0 0 18px rgba(109, 255, 160, .45);
}
.typed .cursor { display: inline-block; width: .55em; height: 1em; background: var(--rain); vertical-align: -.12em; margin-left: .08em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.proof {
  margin: 26px auto 0; max-width: 760px; font-family: var(--font-mono); font-size: clamp(12px, 1.05vw, 14px);
  line-height: 1.8; color: #cfe9d9; opacity: 0; transform: translateY(8px); transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.proof b { color: #fff; font-weight: 600; }
.proof .dot { color: var(--rain); padding: 0 .5em; }
.direct { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; opacity: 0; transition: opacity 1s var(--ease) .3s; pointer-events: auto; }
.direct a {
  font-family: var(--font-mono); font-size: 13px; text-decoration: none; color: #e9fff1;
  padding: 9px 14px; border: 1px solid rgba(109,255,160,.28); border-radius: 2px; background: rgba(0,0,0,.4);
  transition: border-color .2s, background .2s;
}
.direct a:hover { border-color: var(--rain); background: rgba(109,255,160,.08); }
.direct a .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.wake.shown .proof { opacity: 1; transform: none; }
.wake.shown .direct { opacity: 1; }
.wake.gone .direct { pointer-events: none; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: rgba(207,233,217,.7);
}
.scroll-cue::after { content: ''; display: block; width: 1px; height: 34px; margin: 10px auto 0; background: linear-gradient(var(--rain), transparent); animation: cue 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0%{transform:scaleY(0)} 60%{transform:scaleY(1);opacity:1} 100%{opacity:0} }

.beat {
  position: absolute; left: 0; right: 0; top: var(--beat-top, 84%); text-align: center; pointer-events: none; opacity: 0;
  font-family: var(--font-mono); color: #eafff2; padding: 0 20px;
}
.beat p { margin: 0; font-size: clamp(22px, 2.8vw, 40px); font-weight: 500; color: #fff; text-shadow: 0 2px 18px #000, 0 0 40px #000; }
.beat small { display: block; margin-top: 12px; font-size: 13px; color: #b6d6c3; letter-spacing: .04em; }

.choice { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .7s var(--ease); }
.choice.on { opacity: 1; }
.choice.on .pill { pointer-events: auto; }
.choice-h {
  position: absolute; left: 0; right: 0; top: 11%; margin: 0; text-align: center; font-family: var(--font-mono);
  color: #f2fff7; font-size: clamp(13px, 1.1vw, 15px); letter-spacing: .32em; text-transform: uppercase;
}
.choice-h span { display: block; margin-top: 10px; letter-spacing: .04em; text-transform: none; color: #a9c7b5; font-size: 13px; }
.pill {
  position: absolute; transform: translate(-50%, -50%); width: 120px; height: 120px; border-radius: 50%;
  display: grid; place-items: center; pointer-events: none;
}
.pill { --rgb: 255, 75, 92; --beat: 2.2s; --phase: 0s; }
.pill-blue { --rgb: 76, 192, 255; --phase: -.55s; }
/* breathing glow that sits over the pill and spills onto the glove */
.pill .glow {
  position: absolute; left: 50%; top: 50%; width: 220%; height: 220%; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--rgb), .75) 0%, rgba(var(--rgb), .32) 22%, rgba(var(--rgb), .08) 46%, transparent 66%);
  mix-blend-mode: screen; opacity: .35; animation: breathe-glow var(--beat) ease-in-out var(--phase) infinite;
}
@keyframes breathe-glow { 0%, 100% { opacity: .28; transform: scale(.82); } 45% { opacity: 1; transform: scale(1.12); } }
/* two staggered shockwave rings */
.pill::before, .pill::after {
  content: ''; position: absolute; inset: 18px; border-radius: 50%; pointer-events: none;
  border: 3px solid rgba(var(--rgb), .95);
  box-shadow: 0 0 18px rgba(var(--rgb), .8), inset 0 0 14px rgba(var(--rgb), .5);
  opacity: 0; animation: ring var(--beat) cubic-bezier(.15, .6, .3, 1) var(--phase) infinite;
}
.pill::after { animation-delay: calc(var(--phase) + var(--beat) / 2); }
@keyframes ring { 0% { transform: scale(.45); opacity: 0; } 10% { opacity: 1; } 65% { opacity: .55; } 100% { transform: scale(2.1); opacity: 0; } }
.pill:hover, .pill:focus-visible { --beat: 1.3s; }
.pill:hover .glow, .pill:focus-visible .glow { opacity: 1; }
.pill-red { color: #ff4b5c; }
.pill-blue { color: #4cc0ff; }
.pill .tag {
  position: absolute; white-space: nowrap;
  font-family: var(--font-mono); color: #fff; pointer-events: none;
}
.pill .tag { left: 50%; top: calc(50% + var(--offy, 120px)); transform: translateX(-50%); text-align: center; }
.tag .k { display: block; font-size: clamp(22px, 2.4vw, 34px); font-weight: 600; letter-spacing: .14em; color: currentColor; }
.pill-red .tag .k { color: #ff5a68; text-shadow: 0 0 24px rgba(255,45,64,.6); }
.pill-blue .tag .k { color: #5cc6ff; text-shadow: 0 0 24px rgba(61,180,255,.6); }
.tag .l { display: block; margin-top: 4px; font-size: 13px; color: #e6e6e6; text-shadow: 0 1px 10px #000; }
.tag .go { display: block; margin-top: 10px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #9fb3a8; }

/* intro chrome */
.chrome {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad); pointer-events: none; transition: opacity .5s;
}
.chrome > * { pointer-events: auto; }
.chrome .mark { font-family: var(--font-mono); font-size: 12px; letter-spacing: .3em; color: #cfe9d9; text-decoration: none; }
.chrome .right { display: flex; gap: 10px; align-items: center; }
.ghost {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: #f1f1f1;
  padding: 9px 14px; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.45); border-radius: 2px;
  display: inline-flex; gap: 8px; align-items: center; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.ghost svg { width: 15px; height: 15px; }
.loadbar { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--rain); z-index: 31; transition: width .3s, opacity .6s; box-shadow: 0 0 10px var(--rain); }

/* branch film */
#branch { position: fixed; inset: 0; z-index: 40; background: #000; opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); }
#branch.on { opacity: 1; pointer-events: auto; }
#branch video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
#branch video.framed { object-fit: fill; transform-origin: 0 0; will-change: transform; }
#branch .skip { position: absolute; right: var(--pad); bottom: 40px; }

/* ============ App (Netflix-style) ============ */
#app[hidden] { display: none; }
#app { min-height: 100vh; position: relative; }
body[data-profile='defend'] #app::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .5;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
}

.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--header-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--pad);
  background: linear-gradient(rgba(0,0,0,.72), transparent); transition: background .4s;
}
.hdr.solid { background: var(--bg); box-shadow: 0 1px 0 var(--line); }
.logo { font-family: 'Big Shoulders Display', sans-serif; font-weight: 900; font-size: 30px; letter-spacing: .02em; color: var(--accent); text-decoration: none; line-height: 1; text-shadow: 0 0 22px var(--glow); }
body[data-profile='defend'] .logo { font-family: 'Martian Mono', monospace; font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variation-settings: 'wdth' 75; }
body[data-profile='defend'] .logo::after { content: '_'; animation: blink 1.1s steps(1) infinite; }
.nav { display: flex; gap: 20px; font-size: 14px; white-space: nowrap; }
@media (max-width: 1100px) { .nav { display: none; } }
.nav a { text-decoration: none; color: #e5e5e5; opacity: .85; transition: opacity .2s; }
.nav a:hover { opacity: 1; }
.hdr .spacer { flex: 1; }
.hdr .res { font-size: 14px; text-decoration: none; opacity: .9; }
.replay { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 16%, transparent); transition: background .2s, transform .2s; white-space: nowrap; }
.replay:hover, .replay:focus-visible { background: color-mix(in srgb, var(--accent) 34%, transparent); transform: translateY(-1px); }
.replay svg { width: 16px; height: 16px; color: var(--accent); }
.replay .short { display: none; }
body[data-profile='defend'] .replay { font-family: var(--font-mono); font-weight: 500; font-size: 12px; border-radius: 2px; }
.bb-replay { margin-top: 18px; align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text);
  padding: 8px 14px 8px 10px; border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.18); transition: border-color .2s, background .2s; }
.bb-replay:hover, .bb-replay:focus-visible { border-color: var(--accent); background: rgba(0,0,0,.55); }
.bb-replay svg { width: 20px; height: 20px; color: var(--accent); }
.bb-replay span { font-weight: 400; color: var(--muted); font-size: 12px; }
.bb-replay span::before { content: '\00b7'; padding-right: 8px; }
body[data-profile='defend'] .bb-replay { font-family: var(--font-mono); font-weight: 500; font-size: 13px; border-radius: 2px; }
.prof { position: relative; }
.prof-btn { display: flex; align-items: center; gap: 8px; }
.prof-btn img { width: 34px; height: 34px; border-radius: 4px; object-fit: cover; }
.prof-btn .car { width: 0; height: 0; border: 5px solid transparent; border-top-color: #fff; margin-top: 5px; transition: transform .2s; }
.prof.open .car { transform: rotate(180deg); margin-top: -5px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 14px); min-width: 230px; background: #0b0b0b; z-index: 30;
  border: 1px solid rgba(255,255,255,.12); padding: 10px 0; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: .2s var(--ease);
}
.prof.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 16px; font-size: 13px; text-decoration: none; color: #ddd; text-align: left; }
.menu a:hover, .menu button:hover { text-decoration: underline; color: #fff; }
.menu img { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; }
.menu hr { border: 0; border-top: 1px solid rgba(255,255,255,.12); margin: 8px 0; }

/* billboard */
.bb { position: relative; min-height: min(92vh, 900px); display: flex; overflow: hidden; }
.bb-art { position: absolute; inset: 0; }
.bb-art img { position: absolute; right: 0; top: 0; height: 100%; width: 62%; object-fit: cover; object-position: 30% 22%; }
.bb-art::before { content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, var(--bg) 34%, color-mix(in srgb, var(--bg) 70%, transparent) 52%, transparent 78%),
    linear-gradient(0deg, var(--bg) 0%, transparent 32%),
    radial-gradient(60% 70% at 22% 55%, var(--glow), transparent 70%);
}
.bb-copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; max-width: 760px;
  padding: calc(var(--header-h) + 4vh) var(--pad) calc(16vh + 56px); }
.bb-tag { font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.bb-tag::before { content: ''; width: 22px; height: 2px; background: currentColor; }
.bb-title { font-family: var(--font-display); margin: 14px 0 10px; line-height: .86; text-transform: uppercase; }
body[data-profile='build'] .bb-title { font-weight: 900; font-size: clamp(56px, min(9vw, 15vh), 150px); letter-spacing: -.005em; }
body[data-profile='defend'] .bb-title { font-weight: 700; font-size: clamp(38px, min(6vw, 10vh), 96px); letter-spacing: -.04em; font-variation-settings: 'wdth' 75; line-height: .95; }
.bb-title span { display: block; }
body[data-profile='build'] .bb-title span:last-child { color: transparent; -webkit-text-stroke: 1.5px var(--text); }
body[data-profile='defend'] .bb-title span:last-child { color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; color: var(--muted); margin: 6px 0 18px; }
.meta .hi { color: #46d369; font-weight: 600; }
body[data-profile='defend'] .meta .hi { color: var(--accent-2); }
.meta .box { border: 1px solid rgba(255,255,255,.4); padding: 1px 6px; font-size: 12px; color: var(--text); }
.bb-syn { font-size: clamp(15px, 1.15vw, 18px); line-height: 1.55; margin: 0 0 24px; text-shadow: 0 1px 12px rgba(0,0,0,.6); max-width: 620px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 11px 26px 11px 20px; border-radius: 4px; font-weight: 600; font-size: 17px; text-decoration: none; transition: background .2s, transform .2s; }
.btn svg { width: 22px; height: 22px; }
.btn-play { background: #fff; color: #000; }
.btn-play:hover { background: rgba(255,255,255,.78); }
.btn-info { background: rgba(109,109,110,.6); color: #fff; }
.btn-info:hover { background: rgba(109,109,110,.4); }
body[data-profile='defend'] .btn { border-radius: 2px; font-family: var(--font-mono); font-size: 14px; font-weight: 500; letter-spacing: .02em; }
body[data-profile='defend'] .btn-play { background: var(--accent); color: #001018; }
body[data-profile='defend'] .btn-play:hover { background: #8ad3ff; }
.bb-status { position: absolute; z-index: 2; right: 0; bottom: 30%; display: flex; align-items: center; gap: 12px; padding: 6px 60px 6px 14px; background: rgba(51,51,51,.6); border-left: 3px solid #dcdcdc; font-size: 14px; }
body[data-profile='defend'] .bb-status { font-family: var(--font-mono); font-size: 12px; border-left-color: var(--accent-2); background: rgba(8,17,27,.75); }
body[data-profile='defend'] .bb-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); animation: blink 1.6s steps(1) infinite; }

/* rows */
.rows { position: relative; z-index: 3; margin-top: -16vh; padding-bottom: 60px; }
.row { margin: 0 0 3.2vw; }
.row-h { padding: 0 var(--pad); margin: 0 0 12px; font-size: clamp(16px, 1.4vw, 22px); font-weight: 700; display: flex; align-items: baseline; gap: 12px; }
body[data-profile='defend'] .row-h { font-family: var(--font-mono); font-weight: 500; font-size: clamp(14px, 1.15vw, 18px); letter-spacing: .01em; }
body[data-profile='defend'] .row-h::before { content: '//'; color: var(--accent); }
.row-h .more { font-size: 12px; font-weight: 600; color: var(--accent); opacity: 0; transform: translateX(-6px); transition: .3s var(--ease); }
.row:hover .row-h .more { opacity: 1; transform: none; }
.slider { position: relative; }
.track { display: flex; gap: .45vw; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scroll-padding: 0 var(--pad); padding: 8px var(--pad) 10px; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.track { cursor: grab; }
.card { touch-action: pan-x pan-y; -webkit-tap-highlight-color: transparent; }
.track.dragging { cursor: grabbing; user-select: none; }
.track:active { cursor: grabbing; }
.track.dragging .card { pointer-events: none; }
.track img { -webkit-user-drag: none; user-select: none; }
@media (hover: none) { .arrow { opacity: 1; } }
.arrow { position: absolute; top: 8px; bottom: 10px; width: calc(var(--pad) - 6px); z-index: 4; background: rgba(0,0,0,.5); display: grid; place-items: center; opacity: 0; transition: opacity .25s, background .2s; }
.arrow svg { width: min(26px, 90%); height: 26px; transition: transform .2s; }
.arrow:hover { background: rgba(0,0,0,.72); }
.arrow:hover svg { transform: scale(1.25); }
.arrow.l { left: 0; } .arrow.r { right: 0; }
.slider:hover .arrow { opacity: 1; }
.arrow[disabled] { visibility: hidden; }

.card {
  position: relative; flex: 0 0 calc((100vw - 2 * var(--pad) - 5 * .45vw) / 6); aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden;
  background: var(--card); text-align: left; display: block; padding: 0;
}
.card img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card .ttl { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 30px 10px 8px; background: linear-gradient(transparent, rgba(0,0,0,.72) 40%, rgba(0,0,0,.92)); }
.card .ttl b { display: block; font-family: var(--font-display); text-transform: uppercase; line-height: 1; }
body[data-profile='build'] .card .ttl b { font-weight: 800; font-size: clamp(15px, 1.35vw, 22px); letter-spacing: .01em; }
body[data-profile='defend'] .card .ttl b { font-weight: 600; font-size: clamp(11px, .95vw, 15px); letter-spacing: -.02em; font-variation-settings: 'wdth' 80; }
.card .ttl i { display: block; font-style: normal; font-size: 11px; color: #cfcfcf; margin-top: 4px; }
.card .badge { position: absolute; z-index: 3; top: 8px; right: 8px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 6px; background: #d9192c; color: #fff; border-radius: 2px; }
body[data-profile='defend'] .card .badge { font-family: var(--font-mono); font-weight: 500; background: rgba(2,8,14,.82); color: var(--accent-2); border: 1px solid currentColor; }
.card .pairmark { position: absolute; top: 8px; left: 8px; width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(90deg, #ff2d40 50%, #3db4ff 50%); box-shadow: 0 0 0 2px rgba(0,0,0,.5); }

/* typographic key art */
.art { position: absolute; inset: 0; overflow: hidden; }
.art { container-type: inline-size; }
.art { --as: 1; }
.art .w { position: absolute; font-family: var(--font-display); font-weight: 900; line-height: .8; white-space: nowrap; text-transform: uppercase; font-size: calc(var(--base, 22cqi) * var(--k, 1) * var(--as)); left: 7%; top: 13%; }
.art-gov { background: radial-gradient(120% 90% at 85% 10%, #4a0e14, #170708 60%); }
.art-gov .w { --base: 22cqi; color: rgba(255,255,255,.06); -webkit-text-stroke: 1px rgba(255,120,120,.4); }
.art-gov .ring { position: absolute; width: 58%; aspect-ratio: 1; right: -12%; top: -30%; border-radius: 50%; border: 1px solid rgba(255,140,120,.25); box-shadow: inset 0 0 0 10px rgba(255,140,120,.04), 0 0 0 18px rgba(255,140,120,.04); }
.art-brand { background: linear-gradient(135deg, #ff2d40, #8f0c19 70%); }
.art-brand .w { --base: 24cqi; color: rgba(0,0,0,.25); }
.art-ai { background: #0d0909; }
.art-ai::before { content: ''; position: absolute; inset: -20%; background-image: linear-gradient(rgba(255,45,64,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255,45,64,.16) 1px, transparent 1px); background-size: 22px 22px; transform: perspective(300px) rotateX(55deg) translateY(30%); }
.art-ai::after { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 80% at 70% 30%, rgba(255,90,60,.35), transparent 65%); }
.art-ai .w { --base: 20cqi; color: #fff; z-index: 1; text-shadow: 0 0 30px rgba(255,45,64,.7); }
.art-upwork { background: radial-gradient(90% 90% at 20% 20%, #3a1410, #0e0808); }
.art-upwork .w { --base: 24cqi; color: var(--accent-2); }
.art-three { background: radial-gradient(circle at 70% 40%, #ff8a3d 0, #ff2d40 14%, #3c0910 34%, #0c0606 60%); }
.art-three .w { --base: 22cqi; color: rgba(255,255,255,.92); }

.art-ops { background: linear-gradient(160deg, #0a1928, #04070b 70%); }
.art-ops::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(61,180,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(61,180,255,.08) 1px, transparent 1px); background-size: 16px 16px; }
.art-ops .w { --base: 15cqi; font-family: 'Martian Mono', monospace; font-weight: 700; color: var(--accent); letter-spacing: -.05em; font-variation-settings: 'wdth' 75; }
.art-ops .ping { position: absolute; right: 10%; top: 30%; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 0 rgba(92,255,176,.6); animation: ping 2.2s infinite; }
@keyframes ping { 0%{box-shadow:0 0 0 0 rgba(92,255,176,.55)} 80%,100%{box-shadow:0 0 0 22px rgba(92,255,176,0)} }
.art-ops .coord { position: absolute; right: 8%; top: 46%; font-family: var(--font-mono); font-size: 9px; color: rgba(160,200,230,.55); }
.art-classified { background: #0c1218; }
.art-classified .bars { position: absolute; left: 9%; right: 44%; top: 16%; display: grid; gap: 6px; }
.art-classified .bars i { height: 6px; background: rgba(200,220,240,.14); }
.art-classified .bars i:nth-child(2n) { background: #000; height: 8px; width: 70%; }
.art-classified .bars i:nth-child(3) { width: 85%; }
.art-classified .stamp { position: absolute; right: 7%; top: 36%; font-family: var(--font-mono); font-size: clamp(8px, 4.4cqi, 12px); font-weight: 600; letter-spacing: .14em; color: var(--alert); border: 1.5px solid var(--alert); padding: 3px 6px; transform: rotate(-8deg); opacity: .85; }
.art-classified .w { --base: 11cqi; right: auto; left: 9%; top: auto; bottom: 34%; font-family: 'Martian Mono', monospace; font-weight: 700; color: rgba(216,230,242,.18); font-variation-settings: 'wdth' 75; }
.art-ai-d { background: radial-gradient(70% 90% at 75% 30%, rgba(61,180,255,.35), transparent 60%), #05090e; }
.art-ai-d .w { --base: 17cqi; font-family: 'Martian Mono', monospace; font-weight: 700; color: #e6f5ff; text-shadow: 0 0 26px rgba(61,180,255,.9); font-variation-settings: 'wdth' 75; }
.art-cert { background: linear-gradient(135deg, #0c1a28, #05090e); }
.art-cert .w { --base: 14cqi; font-family: 'Martian Mono', monospace; font-weight: 700; color: var(--accent-2); font-variation-settings: 'wdth' 75; }
.art-cert .seal { position: absolute; right: 8%; top: 18%; width: 30%; aspect-ratio: 1; border-radius: 50%; border: 1px dashed rgba(92,255,176,.45); }
.art-coming { background: repeating-linear-gradient(-45deg, #071019 0 12px, #091521 12px 24px); }
.art-coming .w { --base: 16cqi; font-family: 'Martian Mono', monospace; font-weight: 700; color: rgba(216,230,242,.85); font-variation-settings: 'wdth' 75; }

/* top 10 */
.card.top10 { flex-basis: calc((100vw - 2 * var(--pad) - 4 * .45vw) / 5); background: transparent; display: flex; align-items: stretch; overflow: visible; aspect-ratio: auto; height: calc((100vw - 2 * var(--pad)) / 5 * 9 / 16); }
.top10 .rank { flex: 0 0 46%; position: relative; display: flex; align-items: flex-end; justify-content: flex-end; padding-right: .08em; font-family: 'Big Shoulders Display', sans-serif; font-weight: 900; font-size: calc((100vw - 2 * var(--pad)) / 5 * 9 / 16 * 1.08); line-height: .82; color: var(--bg); -webkit-text-stroke: 3px rgba(255,255,255,.55); }
.top10 .stat { flex: 1; border-radius: 4px; background: linear-gradient(160deg, var(--card), var(--bg-2)); border: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; }
.top10 .stat::before { content: ''; position: absolute; inset: 0; background: radial-gradient(80% 60% at 80% 0%, var(--glow), transparent 70%); opacity: .6; }
.top10 .num { position: relative; font-family: var(--font-display); font-weight: 900; font-size: clamp(22px, 2.3vw, 38px); line-height: 1; color: var(--accent); }
body[data-profile='defend'] .top10 .num { font-weight: 700; font-variation-settings: 'wdth' 75; letter-spacing: -.04em; font-size: clamp(16px, 1.8vw, 28px); }
body[data-profile='defend'] .top10 .rank { font-family: 'Martian Mono', monospace; font-variation-settings: 'wdth' 75; letter-spacing: -.04em; -webkit-text-stroke: 2px rgba(61,180,255,.5); }
.top10 .lbl { position: relative; font-size: 12px; font-weight: 600; margin-top: 4px; }
.top10 .sub { position: relative; font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.3; }

/* tools */
.card.tool { aspect-ratio: auto; height: calc((100vw - 2 * var(--pad)) / 6 * 9 / 16 * .62); background: var(--card); border: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; }
.tool b { font-family: var(--font-mono); font-weight: 600; font-size: clamp(12px, 1vw, 15px); color: var(--text); }
.tool i { font-style: normal; font-size: 11px; color: var(--muted); margin-top: 4px; }
.tool::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); opacity: .7; }

/* hover preview: the card expands in place */
.preview {
  position: fixed; z-index: 60; border-radius: 6px; overflow: hidden; background: var(--bg-2);
  box-shadow: 0 22px 60px rgba(0,0,0,.8), 0 0 0 1px var(--line); opacity: 0; pointer-events: none; cursor: pointer;
  transition: opacity .18s var(--ease), transform .32s var(--ease);
}
.preview.on { opacity: 1; pointer-events: auto; }
.pv-media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--card); }
.pv-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.75), transparent 45%); pointer-events: none; }
.pv-name { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 10px; font-family: var(--font-display); text-transform: uppercase; line-height: .95; color: #fff; }
body[data-profile='build'] .pv-name { font-weight: 900; font-size: 26px; }
body[data-profile='defend'] .pv-name { font-weight: 700; font-size: 17px; font-variation-settings: 'wdth' 75; letter-spacing: -.03em; }
.pv-badge { position: absolute; z-index: 3; top: 10px; right: 10px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 6px; background: #d9192c; color: #fff; border-radius: 2px; }
body[data-profile='defend'] .pv-badge { font-family: var(--font-mono); font-weight: 500; background: rgba(0,0,0,.5); color: var(--accent-2); border: 1px solid currentColor; }
.pv-body { padding: 12px 16px 16px; }
.pv-actions { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.circ { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); display: grid; place-items: center; background: rgba(30,30,30,.6); transition: border-color .15s, background .15s; }
.circ:hover { border-color: #fff; }
.circ.solid { background: #fff; color: #000; border-color: #fff; }
.circ.solid:hover { background: rgba(255,255,255,.8); }
.circ svg { width: 16px; height: 16px; }
.circ.end { margin-left: auto; }
.pv-meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pv-meta .hi { color: #46d369; font-weight: 700; }
body[data-profile='defend'] .pv-meta .hi { color: var(--accent-2); }
.pv-meta .box { border: 1px solid rgba(255,255,255,.4); padding: 0 5px; color: var(--text); }
.pv-syn { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pv-genres { margin-top: 10px; font-size: 12px; color: var(--muted); }
.pv-genres span + span::before { content: '\2022'; color: #666; padding: 0 6px; }

/* trailers */
.trailer { position: absolute; inset: 0; overflow: hidden; }
.trailer img { width: 100%; display: block; }
.trailer.pan img { position: absolute; left: 0; top: 0; height: auto; will-change: transform; }
.trailer.pan img.rolling { animation: pan 10s ease-in-out 1s infinite alternate; }
@keyframes pan { 0%, 8% { transform: translateY(0); } 92%, 100% { transform: translateY(var(--dist)); } }
.trailer.zoom img { height: 100%; object-fit: cover; object-position: top center; animation: kb 9s ease-out 0.6s infinite alternate; transform-origin: 30% 30%; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.14); } }
.trailer.live .art { animation: kb 8s ease-out .4s infinite alternate; }
.trailer.live .art .w { animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .72; filter: brightness(1.35); } }

/* More Like This */
.mlt { grid-column: 1 / -1; margin-top: 8px; }
.mlt h4 { font-size: 22px; margin: 6px 0 14px; }
body[data-profile='defend'] .mlt h4 { font-family: var(--font-mono); font-size: 16px; font-weight: 500; }
.mlt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mlt-card { text-align: left; background: var(--card); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s var(--ease), box-shadow .2s; }
.mlt-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 0 1px var(--line); }
.mlt-media { position: relative; aspect-ratio: 16/9; display: block; overflow: hidden; }
.mlt-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.mlt-media .art { --as: 1; }
.mlt-body { padding: 12px 14px 16px; display: block; }
.mlt-meta { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 8px; }
.mlt-meta .box { border: 1px solid rgba(255,255,255,.4); padding: 0 5px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.mlt-syn { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.7); display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; padding: 32px 12px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.modal.on { opacity: 1; pointer-events: auto; }
.sheet { width: min(880px, 100%); background: var(--bg-2); border-radius: 8px; overflow: hidden; transform: translateY(20px) scale(.98); transition: transform .3s var(--ease); box-shadow: 0 20px 80px rgba(0,0,0,.8); }
.modal.on .sheet { transform: none; }
.sh-media { position: relative; aspect-ratio: 16/8; overflow: hidden; }
.sh-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.sh-media .art { --as: .72; }
.sh-media .art .w { top: 9%; left: 5%; }
.sh-media .art-classified .w { display: none; }
.sh-media::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, var(--bg-2) 0%, color-mix(in srgb, var(--bg-2) 82%, transparent) 30%, transparent 72%); }
.sh-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; background: #181818; display: grid; place-items: center; }
.sh-close svg { width: 20px; height: 20px; }
.sh-head { position: absolute; left: 44px; right: 44px; bottom: 26px; z-index: 2; }
.sh-head h3 { text-shadow: 0 2px 18px rgba(0,0,0,.8); margin: 0 0 4px; font-family: var(--font-display); text-transform: uppercase; line-height: .9; }
body[data-profile='build'] .sh-head h3 { font-weight: 900; font-size: clamp(36px, 5.5vw, 64px); }
body[data-profile='defend'] .sh-head h3 { font-weight: 700; font-size: clamp(26px, 4vw, 46px); font-variation-settings: 'wdth' 75; letter-spacing: -.04em; }
.sh-head p { margin: 0 0 16px; color: #d7d7d7; font-size: 15px; }
.sh-body { padding: 4px 44px 40px; display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.sh-body .meta { margin-top: 0; }
.syn { font-size: 16px; line-height: 1.55; margin: 0; }
.note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.side-l { font-size: 14px; line-height: 1.55; color: var(--muted); }
.side-l b { color: #8c8c8c; font-weight: 400; }
body[data-profile='defend'] .side-l b { color: #7d93a8; }
.side-l span { color: var(--text); }
.eps { grid-column: 1 / -1; }
.eps h4 { font-size: 22px; margin: 6px 0 12px; }
body[data-profile='defend'] .eps h4 { font-family: var(--font-mono); font-size: 16px; font-weight: 500; }
.ep { display: grid; grid-template-columns: 50px 1fr; gap: 16px; align-items: center; padding: 18px 16px; border-bottom: 1px solid var(--line); border-radius: 4px; }
.ep:first-of-type { background: rgba(255,255,255,.05); }
.ep .n { font-size: 24px; color: #d2d2d2; text-align: center; }
.ep p { margin: 0; font-size: 14px; line-height: 1.5; }
.pairbtn { margin-top: 20px; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; font-size: 14px; background: rgba(255,255,255,.03); }
.pairbtn:hover { border-color: var(--accent); }
.pairbtn .pairmark { position: static; width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(90deg, #ff2d40 50%, #3db4ff 50%); }

/* footer */
.foot { padding: 50px var(--pad) 60px; max-width: 1100px; color: var(--muted); font-size: 13px; }
.foot .q { font-size: 16px; color: var(--text); margin: 0 0 22px; }
.foot .q a { color: var(--text); }
.foot ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 20px; }
.foot ul a, .foot ul button { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-align: left; padding: 0; font-size: 13px; }
.foot ul a:hover, .foot ul button:hover { color: var(--text); }
.foot small { display: block; line-height: 1.6; }

/* profile switch flash */
.flash { position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: 0; }
.flash.go { animation: flash .9s var(--ease); }
@keyframes flash { 0%{opacity:0} 35%{opacity:1} 100%{opacity:0} }

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .card { flex-basis: calc((100vw - 2 * var(--pad) - 3 * .45vw) / 4); }
  .card.top10 { flex-basis: calc((100vw - 2 * var(--pad)) / 3.2); height: calc((100vw - 2 * var(--pad)) / 3.2 * 9 / 16); }
  .top10 .rank { font-size: calc((100vw - 2 * var(--pad)) / 3.2 * 9 / 16 * 1.08); }
  .card.tool { height: 78px; }
}
@media (max-width: 760px) {
  :root { --pad: 16px; --header-h: 58px; }
  .nav { display: none; }
  .hdr { gap: 12px; }
  .replay { padding: 6px 10px; }
  .replay .long { display: none; }
  .replay .short { display: inline; }
  .res-tag { display: none; }
  .hdr .res { white-space: nowrap; }
  .bb-replay span { display: none; }
  .card { flex-basis: 42vw; }
  .card.top10 { flex-basis: 64vw; height: calc(64vw * 9 / 16); }
  .top10 .rank { font-size: calc(64vw * 9 / 16 * 1.05); }
  .card.tool { flex-basis: 44vw; height: 70px; }
  .track { gap: 6px; }
  .arrow { width: 34px; background: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.2)); opacity: 1; }
  .arrow.r { background: linear-gradient(270deg, rgba(0,0,0,.75), rgba(0,0,0,.2)); }
  .arrow svg { width: 22px; }
  .bb { min-height: 86vh; }
  .bb-art img { width: 100%; opacity: .55; object-position: 40% 20%; }
  .bb-art::before { background: linear-gradient(0deg, var(--bg) 18%, color-mix(in srgb, var(--bg) 40%, transparent) 60%, transparent), radial-gradient(80% 50% at 30% 70%, var(--glow), transparent 70%); }
  .bb-copy { justify-content: flex-end; padding-top: 34vh; padding-bottom: calc(14vh + 40px); }
  .bb-status { display: none; }
  .rows { margin-top: -14vh; }
  .sh-head { left: 20px; right: 20px; }
  .sh-body { grid-template-columns: 1fr; padding: 0 20px 30px; gap: 18px; }
  .mlt-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sh-media .art .w { display: none; }
  .foot ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pill { width: 96px; height: 96px; }
  .tag .k { font-size: 20px; }
  .pill .tag { white-space: normal; width: 44vw; }
  .tag .l { font-size: 11px; }
  .tag .go { letter-spacing: .1em; font-size: 10px; }
  .chrome .mark { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
