/* ClickHouse proposal v2 — Co-team. Brand: ClickHouse (yellow #FAFF69 on black, Inter, JetBrains Mono).
   Layout: short, one idea per screen; dark and yellow bands alternate like ClickHouse's own social. */
@font-face { font-family: 'Inter'; src: url(fonts/inter.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(fonts/jbm-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(fonts/jbm-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
:root {
  --y: #faff69; --y-soft: #eef35c; --ink: #0a0a0a; --card: #151515; --card-2: #1d1d1d;
  --line: #2a2a2a; --line-2: #3a3a3a; --mute: #9a9a9a; --olive: #3f4213; --white: #fff;
  --r-m: 14px; --r-l: 22px; --wrap: 1320px; --gut: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--white); font: 400 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg, video, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--y); outline-offset: 3px; border-radius: 4px; }
.band-y :focus-visible { outline-color: var(--ink); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }
.num { font-variant-numeric: tabular-nums; }
.small { font-size: 14px; line-height: 1.45; }
.mute { color: var(--mute); }
.band-y .mute { color: var(--olive); }
section { position: relative; }
.dark { background: var(--ink); color: var(--white); }
.band-y { background: var(--y); color: var(--ink); }
.pad { padding-block: clamp(72px, 9vw, 136px); }

/* top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; height: 64px; display: flex; align-items: center; background: rgba(10,10,10,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.06); }
.top .wrap { display: flex; align-items: center; gap: 16px; }
.lockup { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.lockup .ch { width: 118px; height: 35px; color: var(--white); }
.lockup .x { width: 1px; height: 22px; background: var(--line-2); }
.lockup .ct { width: 86px; height: 14px; color: var(--white); opacity: .9; }
.top .meta { color: var(--mute); font-size: 14px; margin-left: auto; }
.top .btn { margin-left: 18px; }
@media (max-width: 720px) { .top .meta { display: none; } .top .btn { margin-left: auto; } .lockup .ch { width: 96px; } .lockup .ct { width: 70px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; transition: transform .2s var(--ease), background .2s, color .2s; }
.btn:active { transform: scale(.98); }
.btn-y { background: var(--y); color: var(--ink); } .btn-y:hover { background: #fff; }
.btn-k { background: var(--ink); color: var(--y); } .btn-k:hover { background: #262626; }
.btn-line { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px var(--line-2); } .btn-line:hover { box-shadow: inset 0 0 0 1px var(--white); }
.band-y .btn-line { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); } .band-y .btn-line:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn-s { height: 40px; padding: 0 16px; font-size: 15px; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 15px; font-weight: 500; }

/* type */
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.04em; text-wrap: balance; }
.h1 { font-size: clamp(46px, 8.2vw, 132px); line-height: .92; letter-spacing: -.055em; max-width: 12ch; }
.h2 { font-size: clamp(38px, 5.4vw, 80px); line-height: .96; letter-spacing: -.045em; }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; max-width: 34em; margin: 0; }

/* hero */
.hero { padding-block: clamp(64px, 9vw, 140px) clamp(64px, 8vw, 120px); overflow: hidden; }
.hero-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px 48px; margin-top: clamp(28px, 3.5vw, 44px); }
.hero-row .lead { color: #d2d2d2; flex: 1 1 420px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-field { position: relative; height: clamp(200px, 32vh, 380px); margin-top: clamp(48px, 6vw, 88px); }
.hero-field canvas { width: 100%; height: 100%; }
.hero-read { position: absolute; left: max(var(--gut), calc((100% - var(--wrap)) / 2 + var(--gut))); top: -30px; font: 13px var(--mono); color: var(--mute); }
.hero-read b { color: var(--y); font-weight: 400; }

/* hero globe and stats */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-text .lead { color: #d2d2d2; margin-top: clamp(24px, 3vw, 40px); }
.hero-text .hero-cta { margin-top: clamp(24px, 3vw, 36px); }
.hero-globe { width: 100%; max-width: 640px; justify-self: end; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.globe-box { position: relative; aspect-ratio: 1; }
.globe-box canvas { position: absolute; left: 14%; top: 14%; width: 72%; height: 72%; display: block; }
.fact { position: absolute; display: flex; align-items: center; gap: 12px; max-width: 46%; padding: 10px 14px 10px 12px; border-radius: 12px; background: rgba(21,21,21,.94); border: 1px solid var(--line); }
.fact b { flex: none; font-size: clamp(30px, 2.8vw, 40px); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--y); }
.fact span { font-size: 14px; line-height: 1.3; color: #d2d2d2; }
.fact.f1 { left: 0; top: 0; } .fact.f2 { right: 0; bottom: 0; }
.globe-cap { font: 14px var(--mono); color: var(--mute); white-space: nowrap; min-height: 1.4em; text-align: center; }
.globe-cap b { color: var(--y); font-weight: 500; margin-right: .6em; }
.hero .src { margin: 0; font: 12px/1.5 var(--mono); color: var(--mute); text-align: right; }
.hero .src a { color: inherit; }
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-globe { justify-self: center; max-width: 520px; }
}
@media (max-width: 600px) {
  .globe-box { aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .globe-box canvas { position: static; grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 1; }
  .fact { position: static; max-width: none; align-items: flex-start; flex-direction: column; gap: 4px; }
}

/* demo tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: clamp(28px, 3vw, 44px); }
.tab { height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: #bdbdbd; cursor: pointer; font-size: 16px; font-weight: 600; transition: background .15s, color .15s, border-color .15s; }
.tab:hover { color: #fff; border-color: #5a5a5a; }
.tab[aria-selected="true"] { background: var(--y); color: var(--ink); border-color: var(--y); }
.demo-body { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); grid-template-areas: 'p s'; gap: clamp(20px, 2.4vw, 32px) clamp(20px, 3vw, 44px); margin-top: 24px; align-items: start; }
.player-col { grid-area: p; } .demo-side { grid-area: s; }
.player { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--r-l); overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player .vposter { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s; pointer-events: none; }
.player.vplaying .vposter { opacity: 0; }
.vbar { position: absolute; right: 12px; top: 12px; display: flex; gap: 8px; opacity: 0; transition: opacity .2s; }
.player:hover .vbar, .vbar:focus-within { opacity: 1; }
@media (hover: none) { .vbar { opacity: 1; } }
.vbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(10,10,10,.62); color: var(--white); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.vbtn svg { width: 20px; height: 20px; fill: currentColor; }
.vbtn:focus-visible { outline: 2px solid var(--y); outline-offset: 2px; }
.player:fullscreen { border-radius: 0; background: #000; }
.player:fullscreen video, .player:fullscreen .vposter { object-fit: contain; }
.player:-webkit-full-screen { border-radius: 0; background: #000; }
.player:-webkit-full-screen video, .player:-webkit-full-screen .vposter { object-fit: contain; }
.player .pending { position: absolute; inset: 0; display: grid; place-items: center; }
.player .pending canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.player .pending span { position: relative; background: rgba(10,10,10,.8); color: #ddd; padding: 8px 14px; border-radius: 999px; font-size: 15px; }
.demo-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.demo-lead { margin: 0; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.4; color: #e6e6e6; letter-spacing: -.01em; }
.demo-tools { display: flex; flex-direction: column; gap: 10px; }
.toolchips { display: flex; flex-wrap: wrap; gap: 8px; }

/* chapters */
.player-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chapbar { display: flex; gap: 4px; height: 18px; align-items: center; }
.chapbar .seg { position: relative; height: 18px; padding: 0; border: 0; background: transparent; cursor: pointer; min-width: 0; }
.chapbar .seg::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 2px; background: var(--line-2); transition: height .15s, top .15s; }
.chapbar .seg i { position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 2px; background: var(--y); transform-origin: 0 50%; transform: scaleX(0); transition: height .15s, top .15s; }
.chapbar .seg:hover::before, .chapbar .seg:hover i { top: 5px; height: 8px; }
.chapbar .seg:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; border-radius: 4px; }
.chap-head { display: flex; justify-content: space-between; padding: 0 2px; }
.chaps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.chaps li { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.chaps .seek { display: flex; align-items: baseline; gap: 12px; min-width: 0; padding: 6px 0; border: 0; background: none; color: #cfcfcf; cursor: pointer; text-align: left; font: 600 16px/1.25 var(--sans); }
.chaps .seek .ts { font: 500 13px var(--mono); color: var(--mute); width: 34px; flex: none; }
.chaps .seek:hover .nm { color: var(--white); }
.chaps li.on .seek { color: var(--white); } .chaps li.on .seek .ts { color: var(--y); }
.chaps .cd { grid-column: 1 / -1; margin: 0 0 6px 46px; font-size: 14px; line-height: 1.45; color: var(--mute); display: none; }
.chaps li.on .cd { display: block; }
.chaps .fmt { margin: 0 0 6px 46px; font: 500 12.5px/1.4 var(--mono); color: #d8dc6a; display: none; }
.chaps li.on .fmt { display: block; }
.tdesc { font-size: 15px; color: var(--mute); margin: 4px 0 0; min-height: 4.4em; }
@media (max-width: 960px) { .demo-body { grid-template-columns: 1fr; grid-template-areas: 'p' 's'; } .tdesc { min-height: 0; } }

/* Try it: the Column Art lab */
.try-head { margin-bottom: clamp(16px, 2vw, 28px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 48px; }
.try-head .lead { color: #cfcfcf; flex: 0 1 32em; margin: 0; }
#labHost { min-height: 320px; }
.chaps .cd a { color: var(--y); }
.lab { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; }
.lab-stage { position: relative; border-radius: var(--r-l); overflow: hidden; aspect-ratio: 21 / 9; max-width: 100%; background: var(--ink); border: 1px solid var(--line); }
.lab-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lab-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.lab-tile { position: relative; padding: 0; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; background: var(--y); cursor: pointer; aspect-ratio: 4 / 3; transition: transform .2s var(--ease), border-color .2s; }
.lab-tile canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-tile span { position: absolute; left: 6px; bottom: 6px; padding: 3px 8px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: 12px; font-weight: 600; }
.lab-tile.dark { background: var(--ink); }
.lab-tile.dark span { background: var(--y); color: var(--ink); }
.lab-tile:hover { transform: translateY(-2px); }
.lab-tile[aria-pressed="true"] { outline: 2px solid var(--y); outline-offset: 3px; }
.lab-tile:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.lab-stage .readout { position: absolute; left: 14px; bottom: 12px; font: 12px/1.4 var(--mono); color: var(--mute); }
.lab-stage.on-y .readout { color: #53561b; background: rgba(250,255,105,.88); }
.lab-stage .readout { background: rgba(10,10,10,.8); padding: 3px 7px; border-radius: 5px; left: 10px; bottom: 10px; }
.lab-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.lab-panel .lbl { font-size: 13px; font-weight: 600; color: #cfcfcf; display: block; margin-bottom: 6px; }
.field { width: 100%; height: 42px; border-radius: 10px; border: 1px solid var(--line-2); background: #0f0f0f; padding: 0 12px; font: 600 16px var(--sans); color: #fff; }
.seg { display: flex; background: #0f0f0f; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; height: 32px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-size: 14px; font-weight: 600; color: #bdbdbd; }
.seg button[aria-pressed="true"] { background: var(--y); color: var(--ink); }
.lab-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lab-note { margin: 0; }
@media (max-width: 900px) { .lab { grid-template-columns: 1fr; } .lab-stage { aspect-ratio: 4 / 3; } }
@media (max-width: 600px) {
  .lab-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lab-tiles .lab-tile { grid-column: span 2; }
  .lab-tiles .lab-tile:nth-child(n+4) { grid-column: span 3; aspect-ratio: 16 / 9; }
  .lab-stage .readout { font-size: 11px; right: 14px; }
}

/* stack */
.stack-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 48px; }
.stack-head .h2 { max-width: 13ch; }
.stack-head .lead { color: #1d1d1d; flex: 0 1 30em; }
.more { margin-top: 16px; }
.more > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 15px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: '+'; font-size: 18px; line-height: 1; }
.more[open] > summary::after { content: '−'; }
.dark-more > summary { box-shadow: inset 0 0 0 1px var(--line-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; height: 34px; padding: 0 13px; border-radius: 999px; cursor: pointer; border: 1px solid rgba(0,0,0,.28); background: transparent; color: #26280a; font-size: 14px; font-weight: 500; }
.chip:hover { background: rgba(0,0,0,.06); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--y); font-weight: 600; }
.chip.seen::after { content: ''; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--y); }
.chip.seen[aria-pressed="true"]::after { background: var(--y); box-shadow: 0 0 0 2px var(--ink); }
.chip.add { border-style: dashed; }
.chip-input { height: 34px; width: 150px; border-radius: 999px; border: 1px solid var(--ink); background: rgba(255,255,255,.4); color: var(--ink); padding: 0 13px; font-size: 14px; }
.legend { grid-column: 1 / -1; font-size: 13px; color: var(--olive); }
.mv-line { margin: 28px 0 0; font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; letter-spacing: -.01em; max-width: 36em; }

/* time and money back, under the tool picker */
.row-actions { display: flex; gap: 20px; flex-wrap: wrap; }

/* calculator (inside "Adjust the numbers") */
.rate { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 15px; color: #cfcfcf; }
.rate .field { width: 86px; height: 38px; }


footer { padding-block: 48px 64px; color: var(--mute); font-size: 14px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
footer span { max-width: 44em; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }


@media (hover: none) {
  .chaps .add { height: 44px; padding: 0 14px 0 8px; }
  .chaps .seek { min-height: 44px; align-items: center; }
  .chapbar { height: 28px; } .chapbar .seg { height: 28px; }
  .chapbar .seg::before, .chapbar .seg i { top: 12px; }
  .seg button { min-height: 44px; }
}

/* how we work */
.how-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(24px, 4vw, 64px); align-items: end; }
.how-head .lead { color: #1d1d1d; }

/* moments from tools already running */
.cases-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px clamp(24px, 4vw, 64px); align-items: end; margin-bottom: clamp(28px, 3.4vw, 48px); }
.cases-h { font-size: clamp(36px, 4.6vw, 64px); font-weight: 800; letter-spacing: -.045em; line-height: 1; margin: 0; text-wrap: balance; }
.cases-head .lead { margin: 0; color: #cfcfcf; }
.mo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(14px, 2vw, 24px); }
.mo { margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mo-w { grid-column: 1 / -1; }
.mo-v { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--r-l); overflow: hidden; background: #e9e9ec; }
.mo-v video, .mo-v .vposter { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mo-v .vposter { z-index: 1; transition: opacity .4s; pointer-events: none; } .mo-v.vplaying .vposter { opacity: 0; }
.mo-v .vbtn { position: absolute; z-index: 2; right: 12px; top: 12px; opacity: 0; transition: opacity .2s; }
.mo-v:hover .vbtn, .mo-v .vbtn:focus-visible { opacity: 1; }
@media (hover: none) { .mo-v .vbtn { opacity: 1; } }
.mo-v:fullscreen video { object-fit: contain; } .mo-v:-webkit-full-screen video { object-fit: contain; }
.mo figcaption { display: grid; gap: 4px; max-width: 40em; }
.mo-k { font: 500 12px/1.4 var(--mono); color: var(--mute); }
.mo figcaption b { font-size: 17px; letter-spacing: -.015em; line-height: 1.3; }
.mo figcaption p { margin: 0; color: #b4b4b4; font-size: 14px; line-height: 1.5; }
.mo-w figcaption { max-width: 52em; }
@media (max-width: 760px) { .cases-head, .mo-grid { grid-template-columns: 1fr; } }

/* ---------- the cycle (VAST logic, ClickHouse colours) ---------- */
.cy { position: absolute; inset: 0; overflow: hidden; color: var(--white); }
.cy-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.cy-wide .cy-stage { width: 1600px; height: 1040px; }
.cy-ring .cy-stage { width: 360px; height: 360px; }
.cy-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cy-ln { fill: none; stroke: #fff; stroke-opacity: .28; stroke-width: 2; stroke-linecap: round; }
.cy-ln.fan { stroke-opacity: .16; stroke-width: 1.6; }
.cy-arr { fill: none; stroke: #fff; stroke-opacity: .5; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.cy-dot { fill: var(--y); opacity: 0; }
.cy-trail { fill: none; stroke: var(--y); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(250,255,105,.8)); }
.cy-head { fill: #fff; opacity: 0; }
.cy-n, .cy-nr, .cy-mail, .cy-close, .cy-make, .cy-out, .cy-lab, .cy-chip { position: absolute; opacity: 0; }
.cy-n { z-index: 2; border-radius: 22px; background: #161616; border: 1px solid #2c2c2c; box-shadow: 0 30px 60px rgba(0,0,0,.4); transition: box-shadow .4s, border-color .4s; }
.cy-lit .cy-L, .cy-lit .cy-P, .cy-lit .cy-S, .cy-lit .cy-H, .cy-lit .cy-R, .cy-lit .cy-nr { border-color: rgba(250,255,105,.55); box-shadow: 0 0 0 1px rgba(250,255,105,.35), 0 0 34px rgba(250,255,105,.18); }
.cy-hd { position: absolute; left: 24px; right: 24px; top: 22px; }
.cy-eb { display: block; font: 500 17px/1.4 var(--mono); color: #8d8d8d; white-space: nowrap; }
.cy-tt { display: block; margin-top: 8px; font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; white-space: nowrap; }
.cy-tk { display: inline-block; vertical-align: bottom; height: 1.4em; overflow: hidden; padding: 0; border: 0; background: none; color: var(--y); font: inherit; line-height: 1.4em; cursor: pointer; text-align: left; transition: width .45s cubic-bezier(.2,.7,.1,1); }
.cy-tkw { display: block; }
.cy-tkw > span { display: flex; align-items: center; gap: .35em; width: max-content; height: 1.4em; white-space: nowrap; }
.cy-si { width: 1em; height: 1em; flex: none; } .cy-si.ln { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cy-mono { display: grid; place-items: center; width: 1em; height: 1em; border-radius: .22em; font: 800 .62em/1 var(--sans); font-style: normal; flex: none; }
.cy-tt .cy-tk { color: var(--white); border-bottom: 2px solid var(--y); height: 1.3em; line-height: 1.3em; } .cy-tt .cy-tkw > span { height: 1.3em; }
.cy-tiles { position: absolute; left: 20px; right: 20px; top: 232px; bottom: 20px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
.cy-tile { position: relative; border-radius: 14px; background: #202020; overflow: hidden; }
.cy-tile .tl { position: absolute; left: 12px; bottom: 10px; font-size: 17px; font-weight: 600; }
.cy-tile .tc { position: absolute; right: 12px; bottom: 11px; font: 500 12px var(--mono); color: #8d8d8d; }
.cy-lg { position: absolute; left: 0; right: 0; top: 14px; display: grid; justify-items: center; gap: 10px; }
.cy-lg img { height: 20px; width: auto; filter: brightness(0) invert(1); }
.cy-ics { position: absolute; left: 14px; right: 14px; top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 4px; justify-items: center; }
.cy-ics svg, .cy-brg svg, .cy-row .th svg, .cy-chip svg { width: 24px; height: 24px; fill: none; stroke: var(--y); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cy-ph { position: absolute; left: 12px; right: 12px; top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cy-ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.cy-tags { position: absolute; left: 10px; right: 8px; top: 12px; display: flex; flex-wrap: wrap; gap: 5px; }
.cy-tags span { font: 600 12px/1 var(--sans); padding: 6px 9px; border-radius: 99px; border: 1px solid #3a3a3a; color: #d0d0d0; }
.cy-tags span.c { background: var(--y); color: var(--ink); border-color: var(--y); }
.cy-tags span.a { background: #fff; color: var(--ink); border-color: #fff; }
.cy-br { position: absolute; left: 20px; right: 20px; top: 214px; bottom: 20px; border-radius: 12px; background: #0e0e0e; border: 1px solid #2a2a2a; padding: 12px; }
.cy-brt { display: flex; gap: 6px; margin-bottom: 12px; } .cy-brt i { height: 6px; width: 40px; border-radius: 3px; background: #2e2e2e; } .cy-brt i:first-child { background: var(--y); width: 30px; }
.cy-brg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cy-brg span { aspect-ratio: 1; border-radius: 8px; background: #1d1d1d; display: grid; place-items: center; overflow: hidden; }
.cy-brg img { width: 70%; filter: brightness(0) invert(1); } .cy-brg .p img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.cy-T { padding: 14px 20px; display: grid; gap: 4px; border-style: dashed; border-color: #3a3a3a; }
.cy-T b { font-size: 24px; letter-spacing: -.02em; }
.cy-T .cy-tk { color: var(--white); }
.cy-H { background: var(--y); color: var(--ink); border-color: var(--y); }
.cy-H .cy-eb { color: #4b4d16; } .cy-H .cy-tk { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.cy-H .cy-tt, .cy-P .cy-tt { white-space: normal; max-width: 10em; }
.cy-eg { position: absolute; left: 20px; right: 20px; bottom: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cy-eg span { aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; background: var(--ink); }
.cy-eg img { width: 100%; height: 100%; object-fit: cover; }
.cy-nr { z-index: 2; border-radius: 20px; border: 1.5px dashed rgba(255,255,255,.28); display: flex; gap: 16px; padding: 12px 18px; }
.cy-nr i { width: 72px; height: 72px; border-radius: 16px; border: 1.5px dashed rgba(255,255,255,.2); }
.cy-nr span { position: absolute; left: 0; right: 0; bottom: -32px; text-align: center; font: 500 17px var(--mono); color: #b0b0b0; }
.cy-rows { position: absolute; left: 18px; right: 18px; top: 172px; display: grid; gap: 10px; }
.cy-row { position: relative; height: 40px; border-radius: 10px; background: #202020; display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.cy-row .th { width: 26px; height: 26px; border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: #2b2b2b; flex: none; }
.cy-row .th img { width: 100%; height: 100%; object-fit: cover; } .cy-row .th.lg { background: #fff; } .cy-row .th.lg img { object-fit: contain; padding: 3px; }
.cy-row .th svg { width: 18px; height: 18px; }
.cy-row .nm { font-size: 17px; font-weight: 500; }
.cy-row .bt, .cy-row .ok { margin-left: auto; height: 26px; border-radius: 99px; font: 600 12px/26px var(--sans); padding: 0 12px; }
.cy-row .bt { background: #333; color: #fff; }
.cy-row .ok { display: none; background: var(--y); color: var(--ink); align-items: center; gap: 5px; padding-left: 8px; }
.cy-row .ok svg { width: 14px; height: 14px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cy-row.done .bt { display: none; } .cy-row.done .ok { display: inline-flex; }
.cy-mail { z-index: 3; display: flex; align-items: center; gap: 6px; height: 48px; border-radius: 99px; background: #fff; color: var(--ink); padding: 0 20px 0 48px; font: 600 18px/48px var(--sans); white-space: nowrap; box-shadow: 0 12px 28px rgba(0,0,0,.35); }
.cy-mail > svg { position: absolute; left: 16px; top: 13px; width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.cy-mail .cy-tk { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cy-close { z-index: 5; display: flex; align-items: center; gap: 12px; padding: 16px 26px 16px 20px; border-radius: 999px; background: var(--y); color: var(--ink); font-size: 26px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; box-shadow: 0 18px 40px rgba(0,0,0,.4); }
.cy-close i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.cy-make { z-index: 3; display: grid; gap: 4px; white-space: nowrap; }
.cy-make .cy-eb { color: #8d8d8d; }
.cy-land { font-size: 19px; line-height: 1.4; color: #e0e0e0; white-space: nowrap; }
.cy-chip { z-index: 6; left: 0; top: 0; width: 72px; height: 72px; border-radius: 16px; overflow: hidden; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--y), 0 12px 26px rgba(0,0,0,.5); transform-origin: 50% 50%; }
.cy-chip img { width: 100%; height: 100%; object-fit: cover; } .cy-chip.lg img { object-fit: contain; padding: 10px; } .cy-chip.ic { background: #1d1d1d; } .cy-chip.ic svg { width: 36px; height: 36px; }

/* phone: one column, in the order of the loop */

.cy-ds { margin: 10px 0 0; font-size: 18px; line-height: 1.4; color: #b0b0b0; white-space: normal; max-width: 26em; }
.cy-ds .cy-tk { color: var(--y); }
.cy-H .cy-ds { color: #3f4213; } .cy-H .cy-ds .cy-tk { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.cy-T .cy-ds { margin-top: 2px; font-size: 15px; }
.cy-ds2 { display: block; font-size: 16px; color: #a8a8a8; margin-top: 2px; }

.cases-sec + #demo { border-top: 1px solid var(--line); }
.demo-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px clamp(24px, 4vw, 64px); align-items: end; }
.demo-head .lead { color: #cfcfcf; margin: 0; }
@media (max-width: 900px) { .demo-head { grid-template-columns: 1fr; } }
footer .wrap { display: flex; justify-content: center; }
.totop { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--white); text-decoration: none; font-weight: 600; }
.totop:hover { border-color: var(--y); color: var(--y); }
.totop svg { width: 18px; height: 18px; }


/* ---------- design at scale: one film in six parts ---------- */
@media (max-width: 900px) { .how-head { grid-template-columns: 1fr; } }
.film { margin-top: clamp(28px, 3vw, 44px); }
.film-ch { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.film-ch button { position: relative; display: flex; align-items: flex-start; gap: 8px; min-height: 64px; padding: 12px 14px 16px; border-radius: 14px; border: 1px solid rgba(10,10,10,.22); background: transparent; color: var(--ink); text-align: left; font: 600 15px/1.25 var(--sans); cursor: pointer; overflow: hidden; transition: background .2s, color .2s, border-color .2s; }
.film-ch button:hover { border-color: var(--ink); }
.film-ch .num { font: 500 12px/1.6 var(--mono); opacity: .55; flex: none; }
.film-ch .t { min-width: 0; text-wrap: balance; }
.film-ch .bar { position: absolute; left: 14px; right: 14px; bottom: 8px; height: 3px; border-radius: 2px; background: rgba(10,10,10,.14); overflow: hidden; }
.film-ch .bar b { position: absolute; inset: 0; background: currentColor; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.film-ch button[aria-selected="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.film-ch button[aria-selected="true"] .bar { background: rgba(255,255,255,.18); }
.film-ch button[aria-selected="true"] .bar b { background: var(--y); }
.film-box { margin-top: 10px; background: var(--ink); color: var(--white); border-radius: var(--r-l); overflow: hidden; }
.film-cap { display: grid; padding: clamp(20px, 2.4vw, 32px) clamp(20px, 2.6vw, 36px) 0; }
.film-cp { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px clamp(20px, 3vw, 48px); align-items: start; }
.film-cp[hidden] { display: grid !important; visibility: hidden; }
.film-cp b { font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; letter-spacing: -.03em; line-height: 1.12; color: var(--y); text-wrap: balance; }
.film-cp p { margin: 0; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.5; color: #d2d2d2; max-width: 46em; }
.film-view { position: relative; overflow: hidden; }
.film-vid { position: absolute; z-index: 20; transform-origin: 0 0; overflow: hidden; background: #faff69; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.film-vid video, .film-vid .vposter { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.film-vid .vposter { z-index: 1; transition: opacity .4s; pointer-events: none; } .film-vid.vplaying .vposter { opacity: 0; }
.film-vid .vbtn { position: absolute; z-index: 2; right: 12px; top: 12px; opacity: 0; transition: opacity .2s; }
.film-vid:hover .vbtn, .film-vid .vbtn:focus-visible { opacity: 1; }
@media (hover: none) { .film-vid .vbtn { opacity: 1; } }
.film-vid:fullscreen { border-radius: 0 !important; transform: none !important; } .film-vid:-webkit-full-screen { border-radius: 0 !important; transform: none !important; }
@media (max-width: 1100px) { .film-ch { grid-template-columns: repeat(3, minmax(0, 1fr)); } .film-cp { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .film-ch { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; } .film-ch button { min-height: 58px; font-size: 14px; padding: 10px 11px 15px; } .film-ch .bar { left: 11px; right: 11px; } .film-cp p { font-size: 15px; } }

/* focus on one stage: everything else steps back */
.cy-fx .cy-stage > * { transition: opacity .7s; }
.cy-focus .cy-stage > :not(.cy-f) { opacity: 0 !important; }
.cy-focus .cy-stage > .cy-lines { opacity: .06 !important; }

/* wide scheme nodes */
.cy-pl { display: inline-block; margin-top: 12px; height: 28px; padding: 0 11px; border-radius: 99px; background: var(--y); color: var(--ink); font: 600 13px/28px var(--sans); }
.cy-P .cy-tt { font-size: 30px; }
.cy-S .cy-tt { font-size: 28px; }
.cy-tp { position: absolute; left: 20px; right: 20px; bottom: 20px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--y); }
.cy-tp img { width: 100%; height: 100%; object-fit: cover; }
.cy-tp .g { position: absolute; inset: 7%; background: repeating-linear-gradient(90deg, rgba(10,10,10,.16) 0 1px, transparent 1px calc(100% / 12)); border: 1px solid rgba(10,10,10,.3); }
.cy-tp .sl { position: absolute; border: 1.5px dashed var(--ink); border-radius: 3px; }
.cy-tp .s1 { left: 7%; top: 18%; width: 48%; height: 34%; } .cy-tp .s2 { left: 7%; bottom: 7%; width: 22%; height: 13%; }
.cy-tp .an { position: absolute; font: 600 10px/1 var(--mono); padding: 4px 6px; border-radius: 4px; background: var(--ink); color: var(--y); white-space: nowrap; }
.cy-tp .a1 { left: 58%; top: 21%; } .cy-tp .a2 { left: 31%; bottom: 8%; }
.cy-out { position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; width: 268px; opacity: 0; }
.cy-out .th { flex: none; width: 108px; height: 68px; border-radius: 9px; overflow: hidden; background: #151515; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 12px 26px rgba(0,0,0,.45); }
.cy-out .th img { width: 100%; height: 100%; object-fit: cover; }
.cy-out .fm { display: grid; gap: 2px; min-width: 0; }
.cy-out .fm b { font-size: 15px; font-weight: 600; line-height: 1.25; color: #f2f2f2; }
.cy-out .fm span { font: 500 12.5px/1.3 var(--mono); color: #9d9d9d; }
.cy-lab { position: absolute; z-index: 3; font: 500 17px var(--mono); color: #d6d6d6; white-space: nowrap; background: var(--ink); padding: 2px 6px; border-radius: 4px; opacity: 0; }

/* narrow frames: the cycle as a ring, each stage opens as a card */
.cy-ringbase { fill: none; stroke: #fff; stroke-opacity: .1; stroke-width: 1.5; }
.cy-ring .cy-ln { stroke-opacity: .32; }
.cy-ring .cy-arr { stroke-opacity: .6; }
.cy-ring .cy-trail { stroke-width: 2.5; }
.cy-st { position: absolute; z-index: 2; width: 112px; height: 48px; display: grid; place-items: center; padding: 4px 8px; border-radius: 14px; background: #161616; border: 1px solid #333; text-align: center; font: 600 13px/1.15 var(--sans); color: #f0f0f0; opacity: 0; }
.cy-st[data-k="ST3"] { background: var(--y); border-color: var(--y); color: var(--ink); }
.cy-st[data-k="ST5"] { border-style: dashed; color: #c8c8c8; }
.cy-lit .cy-st { border-color: rgba(250,255,105,.55); }
.cy-mid { position: absolute; left: 90px; top: 154px; width: 180px; display: grid; gap: 4px; text-align: center; opacity: 0; }
.cy-mid b { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--y); }
.cy-mid span { font: 500 11px/1.3 var(--mono); color: #a0a0a0; }
.cy-cards { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.cy-card { position: absolute; left: 50%; top: 50%; width: min(calc(100% - 24px), 520px); max-height: calc(100% - 24px); display: flex; flex-direction: column; gap: 10px; visibility: hidden; opacity: 0; pointer-events: auto; }
.cy-card .cy-n, .cy-card .cy-make, .cy-card .cy-out { position: relative; left: auto; top: auto; opacity: 1; transform: none; }
.cy-card .cy-n { padding: 18px; box-shadow: none; }
.cy-card .cy-hd { position: static; }
.cy-card .cy-tt { font-size: 24px; white-space: normal; }
.cy-card .cy-eb { font-size: 13px; white-space: normal; }
.cy-card .cy-ds { font-size: 15px; }
.cy-card .cy-tiles, .cy-card .cy-br, .cy-card .cy-tp, .cy-card .cy-eg { position: relative; left: auto; right: auto; top: auto; bottom: auto; margin-top: 14px; }
.cy-card .cy-tiles { grid-template-rows: 104px 104px; }
.cy-card .cy-ph img { aspect-ratio: auto; height: 52px; }
.cy-card .cy-lg { top: 10px; gap: 6px; } .cy-card .cy-lg img { height: 16px; }
.cy-card .cy-tile .tl { font-size: 14px; }
.cy-card .cy-ics { gap: 4px 2px; } .cy-card .cy-ics svg { width: 20px; height: 20px; }
.cy-card .cy-brg span { aspect-ratio: 4 / 3; }
.cy-card .cy-T { padding: 14px 18px; } .cy-card .cy-T b { font-size: 20px; }
.cy-card .cy-eg { grid-template-columns: repeat(3, 1fr); }
.cy-card[data-card="5"] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; padding: 18px; border-radius: 22px; background: #161616; border: 1px solid #2c2c2c; }
.cy-card[data-card="5"].on { display: grid; }
.cy-card[data-card="5"] .cy-make { grid-column: 1 / -1; white-space: normal; }
.cy-card .cy-land { white-space: normal; font-size: 16px; }
.cy-card .cy-out { width: auto; flex-direction: column; align-items: stretch; gap: 6px; }
.cy-card .cy-out .th { width: 100%; height: auto; aspect-ratio: 16 / 10; }
.cy-card .cy-out .fm b { font-size: 12.5px; } .cy-card .cy-out .fm span { font-size: 10.5px; }
/* film controls: pause, play, five seconds back and forward; the bar under the current part scrubs */
.film-ctl { display: flex; justify-content: center; gap: 8px; padding: 6px 0 16px; }
.film-ctl .vbtn { background: #1d1d1d; }
.film-ctl .vbtn:hover { background: #2a2a2a; }
.film-ctl .vbtn svg { width: 18px; height: 18px; fill: currentColor; }
.film-ch button .bar-hit { position: absolute; left: 0; right: 0; bottom: 0; height: 20px; cursor: default; touch-action: none; }
.film-ch button[aria-selected="true"] .bar-hit { cursor: ew-resize; }
/* the demo categories run as one film: bars that fill and switch on their own */
.demo-ch { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: clamp(28px, 3vw, 44px); }
.demo-ch button { border-color: #333; color: #bdbdbd; }
.demo-ch button:hover { border-color: #6a6a6a; color: var(--white); }
.demo-ch .bar { background: #2a2a2a; }
.demo-ch button[aria-selected="true"] { background: #1d1d1d; color: var(--white); border-color: #1d1d1d; }
.demo-ch button[aria-selected="true"] .bar { background: #333; }
.demo-ch button[aria-selected="true"] .bar b { background: var(--y); }
@media (max-width: 1100px) { .demo-ch { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .demo-ch { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* two dark sections in a row share one gap, not two */
.dark.pad + .dark.pad { padding-top: clamp(32px, 4vw, 64px); }
#demo { padding-bottom: clamp(40px, 4.5vw, 72px); }

.lab-msg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#labMsg:disabled { opacity: .45; }
