/* ZipStream-Hub landing site: cinematic deep-blue to mint. Single stylesheet, no external resources. */
:root {
  --bg: #f3faf8;
  --bg-2: #e6f4f0;
  --card: #ffffff;
  --card-2: #f7fcfb;
  --border: #c9dcd8;
  --text: #0a1a3a;
  --text-2: #3e5273;
  --muted: #5d7190;
  --blue: #1d5fd1;
  --mint: #00a47c;
  --mint-ink: #007a5c;
  --accent-soft: rgba(0, 164, 124, .10);
  --grad: linear-gradient(100deg, #1d5fd1 0%, #0a8fb0 48%, #00a47c 100%);
  --btn: linear-gradient(135deg, #0b2a6b 0%, #0d5a8f 55%, #00946f 100%);
  --code-bg: #0a1730;
  --code-text: #d7e7ff;
  --shadow: 0 1px 2px rgba(10, 26, 58, .05), 0 18px 40px -18px rgba(10, 60, 90, .28);
  --glow-a: rgba(29, 95, 209, .16);
  --glow-b: rgba(0, 164, 124, .16);
  --sans: -apple-system, 'Segoe UI', system-ui, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #050c1d;
    --bg-2: #081329;
    --card: #0a1630;
    --card-2: #0c1a38;
    --border: #1a2f55;
    --text: #e8f1ff;
    --text-2: #a4b6d6;
    --muted: #8396ba;
    --blue: #4aa3ff;
    --mint: #2de2b0;
    --mint-ink: #5cf0c6;
    --accent-soft: rgba(45, 226, 176, .10);
    --grad: linear-gradient(100deg, #5db0ff 0%, #38cfd0 50%, #2de2b0 100%);
    --btn: linear-gradient(135deg, #1d5fd1 0%, #12a1b8 55%, #1fd1a0 100%);
    --code-bg: #040a18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 44px -18px rgba(0, 0, 0, .8);
    --glow-a: rgba(58, 130, 255, .22);
    --glow-b: rgba(45, 226, 176, .14);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--mint-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--mint); color: #04121f; padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }
.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 32px); margin-inline: auto; }
code, kbd, pre { font-family: var(--mono); }
p code, li code, td code, dd code { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--mint) 22%, transparent); padding: 1px 6px; border-radius: 6px; font-size: .88em; overflow-wrap: anywhere; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.5) blur(12px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; }
.nav { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--accent-soft); }
.nav a.gh { border: 1px solid var(--border); color: var(--text); margin-left: 6px; }
@media (max-width: 860px) { .nav a.hide-s { display: none; } }

/* hero */
.hero { position: relative; padding: clamp(44px, 8vw, 92px) 0 24px; text-align: center; isolation: isolate; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -10% -10% auto; height: 640px; z-index: -1;
  background: radial-gradient(48% 55% at 22% 0%, var(--glow-a), transparent 70%), radial-gradient(44% 50% at 80% 8%, var(--glow-b), transparent 70%); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mint-ink); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--mint) 30%, transparent); border-radius: 999px; padding: 4px 14px; font-weight: 600; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 var(--mint); }
h1 { font-weight: 850; letter-spacing: -.035em; line-height: 1.02; font-size: clamp(2.3rem, 6.2vw, 4.5rem); margin: 22px auto 18px; max-width: 19em; text-wrap: balance; }
h1 .grad { display: block; }
h1 .grad, h2 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-2); max-width: 46rem; margin: 0 auto 28px; text-wrap: pretty; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1 var(--sans); padding: 14px 22px; border-radius: 12px; text-decoration: none; border: 1px solid var(--border); color: var(--text); background: var(--card); transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--mint) 50%, var(--border)); }
.btn.primary { color: #fff; border-color: transparent; background: var(--btn); box-shadow: 0 10px 28px -10px rgba(0, 150, 130, .55); }
.btn svg { width: 18px; height: 18px; }
.install { display: grid; gap: 10px; max-width: 660px; margin: 28px auto 0; text-align: left; }
.cmd { display: flex; align-items: center; gap: 10px; background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px; padding: 4px 6px 4px 16px; font-size: 14px; color: var(--code-text); }
.cmd code { flex: 1; overflow-x: auto; white-space: nowrap; padding: 10px 0; }
.cmd .p { color: var(--mint); user-select: none; margin-right: 8px; }
.copy { appearance: none; cursor: pointer; font: 600 12px/1 var(--sans); color: var(--code-text); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; padding: 8px 12px; }
.copy:hover { background: rgba(45, 226, 176, .18); }
.js .copy { display: inline-block; }
.copy { display: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 34px auto 0; max-width: 900px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 10px; }
.stat b { display: block; font-size: clamp(1.3rem, 3vw, 1.8rem); letter-spacing: -.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 12.5px; color: var(--text-2); }
.fine { font-size: 12.5px; color: var(--muted); margin: 10px auto 0; max-width: 60ch; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* cinema panel with hero visual */
.cinema { position: relative; margin: 38px auto 0; border-radius: 22px; padding: 14px; background: linear-gradient(160deg, #0a1b44 0%, #071230 55%, #06241f 100%); border: 1px solid rgba(120, 190, 255, .22); box-shadow: 0 40px 90px -30px rgba(0, 80, 120, .55), inset 0 1px 0 rgba(255, 255, 255, .06); overflow: hidden; }
.cinema::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 80% at 80% 100%, rgba(45, 226, 176, .13), transparent 70%), radial-gradient(50% 70% at 10% 0%, rgba(74, 163, 255, .16), transparent 70%); pointer-events: none; }
.cinema figcaption { position: relative; font-size: 12.5px; color: #8fa7cf; text-align: center; padding: 8px 6px 2px; }
.cinema svg { position: relative; width: 100%; height: auto; }
.hero-m { display: none; }
@media (max-width: 760px) { .hero-d { display: none; } .hero-m { display: block; max-width: 420px; margin-inline: auto; } .cinema { padding: 10px; } }

/* hero svg palette (fixed, always on dark cinema panel) */
.t { font-family: var(--mono); fill: #b8cdf0; }
.t-h { font-family: var(--sans); font-weight: 700; fill: #e8f1ff; }
.t-d { font-family: var(--sans); fill: #8fa7cf; }
.t-m { fill: #2de2b0; }
.card-bg { fill: #0b1a3d; stroke: #24427a; stroke-width: 1.2; }
.proxy-bg { fill: #0a1f3f; stroke: #2de2b0; stroke-opacity: .55; stroke-width: 1.4; }
.flow { stroke: #2de2b0; stroke-opacity: .5; stroke-width: 1.6; stroke-dasharray: 5 7; fill: none; }
.flow-b { stroke: #4aa3ff; }
.packet { fill: #2de2b0; }
.packet-b { fill: #6fc0ff; }
.win { fill: rgba(45, 226, 176, .22); stroke: #2de2b0; stroke-width: 1.6; }
.ph, .win, .buf { will-change: transform; }

/* hero timing: 14 s loop. The base style is the static fallback (reduced motion / no animation). */
.hero-svg { --wb: 260px; --ws: 272px; }
.hero-m { --wb: 300px; --ws: 300px; }
.ph { transform: translateX(calc(var(--ws) * .34)); }
.win { transform: translateX(calc(var(--wb) * .95 * .34)); }
.buf { transform: translateX(calc(var(--ws) * .34)); }
.s0, .s1, .s2, .seek-chip { opacity: 0; }
.s3 { opacity: 1; }
.seek-chip { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .ph { animation: ph 14s infinite; }
  .win { animation: win 14s infinite; }
  .buf { animation: ph 14s infinite; }
  .s0 { animation: s0 14s infinite; }
  .s1 { animation: s1 14s infinite; }
  .s2 { animation: s2 14s infinite; }
  .s3 { animation: s3 14s infinite; }
  .seek-chip { animation: chip 14s infinite; opacity: 0; }
  .flow { animation: dash 1.1s linear infinite; }
  .eyebrow i { animation: ping 2.2s infinite; }
  .tail-glow { animation: tailg 14s infinite; }
  .pulse206 { animation: p206 2.4s ease-in-out infinite; }
  .buf-blk { animation: blk 2.4s ease-in-out infinite; }
  .buf-blk:nth-child(2) { animation-delay: .15s; } .buf-blk:nth-child(3) { animation-delay: .3s; } .buf-blk:nth-child(4) { animation-delay: .45s; }
  .buf-blk:nth-child(5) { animation-delay: .6s; } .buf-blk:nth-child(6) { animation-delay: .75s; } .buf-blk:nth-child(7) { animation-delay: .9s; } .buf-blk:nth-child(8) { animation-delay: 1.05s; }
  .aurora { animation: aur 14s ease-in-out infinite alternate; }
}
@keyframes dash { to { stroke-dashoffset: -24; } }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 9px transparent; } 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mint) 60%, transparent); } }
@keyframes p206 { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes blk { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes aur { from { transform: translateX(-14px); } to { transform: translateX(14px); } }
@keyframes tailg { 0% { opacity: .0; } 2% { opacity: 1; } 6.5% { opacity: 1; } 8% { opacity: .25; } 100% { opacity: .25; } }
/* playhead on the scrubber: play, SEEK forward, play, SEEK back, play */
@keyframes ph {
  0%, 7% { transform: translateX(0); }
  32.4% { transform: translateX(calc(var(--ws) * .24)); animation-timing-function: cubic-bezier(.2, .9, .1, 1); }
  33.2% { transform: translateX(calc(var(--ws) * .68)); }
  58.4% { transform: translateX(calc(var(--ws) * .80)); animation-timing-function: cubic-bezier(.2, .9, .1, 1); }
  59.2% { transform: translateX(calc(var(--ws) * .34)); }
  99.9%, 100% { transform: translateX(calc(var(--ws) * .56)); }
}
/* the byte window inside the archive follows the playhead (file data occupies 95% of the archive bar) */
@keyframes win {
  0%, 7% { transform: translateX(0); }
  32.4% { transform: translateX(calc(var(--wb) * .95 * .24)); animation-timing-function: cubic-bezier(.2, .9, .1, 1); }
  33.2% { transform: translateX(calc(var(--wb) * .95 * .68)); }
  58.4% { transform: translateX(calc(var(--wb) * .95 * .80)); animation-timing-function: cubic-bezier(.2, .9, .1, 1); }
  59.2% { transform: translateX(calc(var(--wb) * .95 * .34)); }
  99.9%, 100% { transform: translateX(calc(var(--wb) * .95 * .56)); }
}
@keyframes s0 { 0% { opacity: 0; } 1% { opacity: 1; } 6.5% { opacity: 1; } 7.5%, 100% { opacity: 0; } }
@keyframes s1 { 0%, 6.8% { opacity: 0; } 7.8% { opacity: 1; } 32.2% { opacity: 1; } 33% , 100% { opacity: 0; } }
@keyframes s2 { 0%, 32.8% { opacity: 0; } 33.6% { opacity: 1; } 58.2% { opacity: 1; } 59%, 100% { opacity: 0; } }
@keyframes s3 { 0%, 58.8% { opacity: 0; } 59.6%, 99% { opacity: 1; } 100% { opacity: 0; } }
@keyframes chip { 0%, 32.8% { opacity: 0; transform: translateY(4px); } 33.4%, 38% { opacity: 1; transform: none; } 40%, 58.8% { opacity: 0; } 59.4%, 64% { opacity: 1; transform: none; } 66%, 100% { opacity: 0; } }

/* sections */
section { padding: clamp(52px, 8vw, 92px) 0; }
section.alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--mint-ink); margin: 0 0 10px; }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.9rem); letter-spacing: -.03em; line-height: 1.08; margin: 0 0 14px; text-wrap: balance; font-weight: 800; }
h3 { font-size: 1.15rem; margin: 0 0 6px; letter-spacing: -.01em; }
.sub { color: var(--text-2); max-width: 46rem; font-size: 1.05rem; margin: 0 0 34px; text-wrap: pretty; }
.center { text-align: center; } .center .sub { margin-inline: auto; }

/* feature grid */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px 20px 18px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s; position: relative; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--mint) 45%, var(--border)); }
.card.wide { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; }
.card.wide .ico { margin: 0; flex: none; }
@media (max-width: 960px) { .card.wide { grid-column: auto; display: block; } .card.wide .ico { margin-bottom: 12px; } }
.card p { margin: 0; color: var(--text-2); font-size: .96rem; }
.ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 18%, transparent), color-mix(in srgb, var(--mint) 22%, transparent)); border: 1px solid color-mix(in srgb, var(--mint) 25%, transparent); }
.ico svg { width: 21px; height: 21px; stroke: var(--mint-ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* steps + zip layout */
.steps { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); counter-reset: s; margin: 0 0 30px; padding: 0; list-style: none; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 18px 16px 18px; position: relative; }
.steps li::before { content: counter(s); position: absolute; top: -13px; left: 16px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #04121f; background: var(--grad); }
.steps p { margin: 4px 0 0; color: var(--text-2); font-size: .95rem; }
.zip { display: flex; gap: 6px; padding: 14px; background: var(--code-bg); border: 1px solid var(--border); border-radius: 16px; margin: 0 0 8px; }
.seg { border-radius: 9px; padding: 10px 8px; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: #a9c1e8; border: 1px solid #22406f; background: #0d1d42; line-height: 1.3; position: relative; overflow: hidden; }
.seg b { color: #e8f1ff; font-size: 12.5px; display: block; }
.seg code { font-size: 11px; color: #7fa2d6; word-break: break-all; }
.seg.data { flex: 1 1 36%; background: repeating-linear-gradient(90deg, #0f2250 0 38px, #0c1b43 38px 40px); }
.seg.cd { flex: 1 1 18%; }
.seg.z64 { flex: 1 1 14%; }
.seg.loc { flex: 1 1 14%; }
.seg.eocd { flex: 1 1 14%; }
.seg .tag { color: #2de2b0; font-weight: 700; font-size: 11px; }
.seg.hot { border-color: #2de2b0; }
@media (prefers-reduced-motion: no-preference) {
  .seg.eocd { animation: hot 9s infinite 0s; } .seg.loc { animation: hot 9s infinite 1.4s; } .seg.z64 { animation: hot 9s infinite 2.8s; } .seg.cd { animation: hot 9s infinite 4.2s; } .seg.data { animation: hotd 9s infinite 5.8s; }
}
@keyframes hot { 0%, 14%, 100% { box-shadow: none; background-color: #0d1d42; border-color: #22406f; } 3%, 11% { box-shadow: 0 0 0 1px #2de2b0, 0 0 26px -2px rgba(45, 226, 176, .55); background-color: #0b3a45; border-color: #2de2b0; } }
@keyframes hotd { 0%, 14%, 100% { filter: none; } 3%, 11% { filter: brightness(1.6) saturate(1.3); } }
@media (max-width: 760px) {
  .zip { flex-direction: column-reverse; }
  .seg { min-height: 0; flex: none !important; }
  .seg.data { min-height: 74px; }
}
.legend { font-size: 13px; color: var(--muted); margin: 0 0 28px; }
.two { display: grid; gap: 20px; grid-template-columns: 1.1fr .9fr; align-items: start; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }
.formula { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
.formula pre { margin: 10px 0 0; padding: 14px 16px; background: var(--code-bg); color: var(--code-text); border-radius: 12px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; }
.formula pre .k { color: #2de2b0; } .formula pre .c { color: #6c85b3; }
.formula p { margin: 0 0 6px; color: var(--text-2); font-size: .96rem; }

/* architecture pipeline */
.pipe { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 0; align-items: stretch; margin-bottom: 26px; }
.node { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; position: relative; }
.node.core { border-color: color-mix(in srgb, var(--mint) 55%, var(--border)); box-shadow: 0 0 0 4px var(--accent-soft); }
.node h3 { font-size: 1rem; }
.node p { margin: 0; font-size: .9rem; color: var(--text-2); }
.node .file { display: inline-block; font-family: var(--mono); font-size: 12px; color: var(--mint-ink); margin-bottom: 6px; }
.arrow { width: 46px; position: relative; display: grid; place-items: center; }
.arrow::before { content: ''; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, var(--mint) 0 6px, transparent 6px 12px); background-size: 12px 2px; opacity: .8; }
.arrow::after { content: ''; position: absolute; right: 2px; top: calc(50% - 5px); border: 6px solid transparent; border-left: 9px solid var(--mint); border-right: 0; }
@media (prefers-reduced-motion: no-preference) { .arrow::before { animation: march 1s linear infinite; } }
@keyframes march { to { background-position: 12px 0; } }
@media (max-width: 960px) {
  .pipe { grid-template-columns: 1fr; }
  .arrow { width: auto; height: 34px; }
  .arrow::before { left: 50%; right: auto; top: 4px; bottom: 4px; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--mint) 0 6px, transparent 6px 12px); }
  .arrow::after { left: calc(50% - 5px); right: auto; top: auto; bottom: 0; border: 6px solid transparent; border-top: 9px solid var(--mint); border-bottom: 0; }
  @media (prefers-reduced-motion: no-preference) { .arrow::before { animation: none; } }
}
.mods { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .mods { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .mods { grid-template-columns: 1fr; } }
.mod { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.mod .file { font-family: var(--mono); font-size: 12px; color: var(--mint-ink); display: block; margin-bottom: 4px; }
.mod p { margin: 0; font-size: .92rem; color: var(--text-2); }

/* buffer */
.ring { position: relative; height: 54px; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--border); padding: 8px; overflow: hidden; margin: 16px 0 10px; }
.ring .track, .ring .fill { position: absolute; inset: 8px; border-radius: 6px; background: repeating-linear-gradient(90deg, #12285a 0 calc(100% / 24 - 4px), transparent calc(100% / 24 - 4px) calc(100% / 24)); }
.ring .fill { background: repeating-linear-gradient(90deg, #2de2b0 0 calc(100% / 24 - 4px), transparent calc(100% / 24 - 4px) calc(100% / 24)); clip-path: inset(0 40% 0 12%); }
.ring .cur { position: absolute; top: 3px; bottom: 3px; width: 3px; border-radius: 3px; background: #fff; left: 12%; box-shadow: 0 0 10px #fff; }
@media (prefers-reduced-motion: no-preference) {
  .ring .fill { animation: rfill 10s infinite; }
  .ring .cur { animation: rcur 10s infinite; }
}
@keyframes rfill { 0% { clip-path: inset(0 100% 0 0); } 6% { clip-path: inset(0 82% 0 0); } 58% { clip-path: inset(0 8% 0 0); } 60% { clip-path: inset(0 8% 0 0); } 61.5% { clip-path: inset(0 100% 0 70%); } 62% { clip-path: inset(0 100% 0 70%); } 64% { clip-path: inset(0 60% 0 70%); } 98%, 100% { clip-path: inset(0 8% 0 30%); } }
@keyframes rcur { 0% { left: 0; } 58% { left: 46%; } 60% { left: 46%; } 61.5% { left: 70%; } 100% { left: 83%; } }
.ring-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text-2); margin: 0; }
.ring-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: #2de2b0; }
.ring-legend span:nth-child(2)::before { background: var(--text); box-shadow: none; width: 3px; border-radius: 2px; margin-right: 9px; margin-left: 3px; height: 12px; }
.ring-legend span:nth-child(3)::before { background: #12285a; border: 1px solid #2c4a86; }
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: block; overflow-x: auto; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { background: var(--card-2); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl.fit { display: table; }
.tbl td code { white-space: nowrap; }

/* showcase */
.shot-main { max-width: 980px; margin: 0 auto 22px; }
.shots { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; align-items: center; max-width: 980px; margin: 0 auto; }
@media (max-width: 900px) { .shots { grid-template-columns: 1fr; } }
.shot { margin: 0; background: #070e20; border: 1px solid rgba(120, 190, 255, .25); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.shot .bar { display: flex; gap: 6px; padding: 10px 12px; background: #0b1530; border-bottom: 1px solid #1a2f55; }
.shot .bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a4377; }
.shot .bar span { margin-left: 8px; font: 12px var(--mono); color: #7f97c2; }
.shot img { width: 100%; }
.shot figcaption { padding: 12px 14px; font-size: 13px; color: #98aed4; border-top: 1px solid #1a2f55; }
.feat-list { columns: 1; margin: 12px 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: .96rem; }
.feat-list li { break-inside: avoid; padding-left: 22px; position: relative; margin-bottom: 8px; }
.feat-list li::before { content: ''; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 3px; background: var(--grad); }
@media (max-width: 620px) { .feat-list { columns: 1; } }

/* players */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.chips li { padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--card); border: 1px solid var(--border); }
.chips li small { font-weight: 500; color: var(--muted); margin-left: 4px; }

/* code blocks */
.codeblock { background: var(--code-bg); border: 1px solid var(--border); border-radius: 14px; margin: 0 0 14px; overflow: hidden; }
.codeblock .head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 14px; font-size: 12px; color: #8396ba; border-bottom: 1px solid rgba(255, 255, 255, .07); font-family: var(--sans); }
.codeblock pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: var(--code-text); font-size: 13.5px; line-height: 1.65; }
.codeblock .c { color: #6c85b3; } .codeblock .k { color: #2de2b0; } .codeblock .s { color: #ffd479; }
.cols { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.cols h3 { margin-bottom: 10px; }
.note { border-left: 3px solid var(--mint); background: var(--accent-soft); border-radius: 0 12px 12px 0; padding: 12px 16px; font-size: .94rem; color: var(--text-2); margin: 18px 0 0; }
.note b { color: var(--text); }

/* api */
.api td:first-child { white-space: nowrap; }
.m { font: 700 11.5px var(--mono); padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--blue) 16%, transparent); color: var(--blue); }
.m.post { background: color-mix(in srgb, var(--mint) 18%, transparent); color: var(--mint-ink); }
.m.other { background: color-mix(in srgb, #c98a00 18%, transparent); color: #a46f00; }
@media (prefers-color-scheme: dark) { .m.other { color: #ffc65c; } }

/* faq */
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 14px; margin: 0 0 10px; padding: 0; transition: border-color .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--mint) 45%, var(--border)); }
.faq summary { cursor: pointer; padding: 16px 48px 16px 18px; font-weight: 650; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; translate: 0 -50%; font-size: 22px; color: var(--mint-ink); transition: rotate .2s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details > div { padding: 0 18px 16px; color: var(--text-2); }
.faq details p { margin: 0 0 8px; }

/* more */
.more { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .more { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .more { grid-template-columns: 1fr; } }
.more a { display: block; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.more a:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--mint) 45%, var(--border)); }
.more b { display: block; font-size: 1rem; margin-bottom: 2px; }
.more span { font-size: .88rem; color: var(--text-2); }
.more-links { margin: 18px 0 0; font-size: 14px; color: var(--muted); }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 34px 0 44px; color: var(--text-2); font-size: 14px; }
.site-footer .row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; }
.site-footer p { margin: 0 0 8px; max-width: 72ch; }

/* reveal (progressive enhancement) */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .packets { display: none; }
  .card, .btn, .more a { transition: none; }
}

/* 404 */
.nf { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 0; }
.nf h1 { font-size: clamp(3rem, 12vw, 7rem); max-width: none; margin: 0 0 8px; }

/* overflow guards for narrow screens */
.two > *, .cols > *, .shots > *, .pipe > *, .grid > *, .mods > *, .more > * { min-width: 0; }
.install { grid-template-columns: minmax(0, 1fr); }
.formula pre, .codeblock pre { max-width: 100%; }
@media (max-width: 700px) { .tbl.fit { display: block; overflow-x: auto; } }
