/* Features: hero, measured numbers, a sticky tab bar, then one section per panel tab. Each section opens with its
   interactive demos (text beside a live demo, alternating sides), then small cards with animated pictures. */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: rgba(3, 5, 11, .8); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 50; background: var(--ink); }
.site-head .wordmark .mark { font-size: 1.5em; }
.wrap { max-width: 1280px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--horizon); opacity: .9; }
.hero canvas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46%; opacity: .55; }
.hero .wrap { position: relative; padding-block: clamp(56px, 10vw, 140px) clamp(48px, 8vw, 110px); display: grid; gap: 22px; }
.hero h1 { margin: 0; font: 600 clamp(2.6rem, 7vw, 5.8rem)/.98 var(--display); letter-spacing: -.055em; color: var(--white); max-width: 15ch; text-wrap: balance; }
.hero p { margin: 0; max-width: 58ch; font-size: clamp(1rem, 1.4vw, 1.2rem); color: var(--grey-200); }

.numbers { padding-block: 48px 24px; }
.num-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ncard { position: relative; overflow: hidden; min-height: 190px; border-radius: 4px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; background: var(--night); box-shadow: inset 0 0 0 1px var(--line); }
.ncard.blue { background: var(--blue-500); box-shadow: none; } .ncard.paper { background: var(--paper); box-shadow: none; }
.ncard .k { position: relative; z-index: 1; font: 500 .78rem/1.3 var(--body); color: var(--grey-300); }
.ncard.blue .k { color: var(--blue-100); } .ncard.paper .k { color: var(--grey-600); }
.ncard .v { position: relative; z-index: 1; font: 500 clamp(1.7rem, 2.8vw, 2.5rem)/1 var(--display); letter-spacing: -.05em; color: var(--white); font-variant-numeric: tabular-nums; }
.ncard.paper .v { color: var(--ink); }
.ncard .s { position: relative; z-index: 1; font-family: var(--mono); font-size: .66rem; color: var(--grey-400); margin-top: 6px; }
.ncard.blue .s { color: var(--blue-100); } .ncard.paper .s { color: var(--grey-500); }
.ncard canvas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 60%; opacity: .75; }

.tabbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 65px); z-index: 30; background: rgba(3, 5, 11, .86); backdrop-filter: blur(12px); border-block: 1px solid var(--line); }
.tabbar .wrap { display: flex; gap: 4px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.tabbar a { flex: none; display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: var(--t-sm); color: var(--grey-400); padding: 7px 12px; border-radius: var(--pill); transition: color .2s, background .2s; }
.tabbar a::before { content: ""; width: 6px; height: 6px; transform: rotate(45deg); background: var(--grey-700); }
.tabbar a:hover { color: var(--white); }
.tabbar a.on { color: var(--white); background: rgba(46, 124, 255, .14); }
.tabbar a.on::before { background: var(--blue-500); box-shadow: 0 0 10px var(--blue-500); }

section.group { scroll-margin-top: 130px; padding-block: 64px 24px; display: grid; gap: 28px; }
.ghead { display: grid; gap: 10px; max-width: 70ch; }
.ghead h2 { margin: 0; font: 600 clamp(1.9rem, 3.6vw, 2.8rem)/1.04 var(--display); letter-spacing: -.045em; color: var(--white); text-wrap: balance; }
.ghead p { margin: 0; color: var(--grey-300); font-size: 1.02rem; }
.demo-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 56px); align-items: center; padding-block: 18px; border-top: 1px solid var(--line); }
.demo-row.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.demo-row.flip .dtext { order: 2; }
.dtext { display: grid; gap: 12px; align-content: center; min-width: 0; }
.dtext h3 { margin: 0; font: 600 clamp(1.4rem, 2.2vw, 1.85rem)/1.1 var(--display); letter-spacing: -.035em; color: var(--white); }
.dtext p { margin: 0; color: var(--grey-300); line-height: 1.6; }
.dtext .stat { justify-self: start; font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; color: var(--blue-200); background: rgba(46, 124, 255, .12); border: 1px solid rgba(90, 155, 255, .3); border-radius: var(--pill); padding: 5px 11px; }
.dbox { min-width: 0; display: grid; gap: 12px; padding: 18px; border-radius: 18px; background: linear-gradient(180deg, rgba(14, 20, 34, .85), rgba(7, 11, 22, .95)); box-shadow: inset 0 0 0 1px var(--line), 0 40px 100px -50px rgba(46, 124, 255, .55); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card { min-width: 0; display: grid; grid-template-rows: 130px auto; overflow: hidden; border-radius: var(--r); background: linear-gradient(180deg, rgba(14, 20, 34, .9), rgba(7, 11, 22, .9)); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .3s, transform .3s var(--ease); }
.card:hover { box-shadow: inset 0 0 0 1px rgba(90, 155, 255, .45), 0 20px 60px -30px rgba(46, 124, 255, .6); transform: translateY(-2px); }
.card .pic { position: relative; background: radial-gradient(120% 100% at 50% 120%, rgba(46, 124, 255, .18), transparent 70%); border-bottom: 1px solid var(--line); }
.card canvas.viz { position: absolute; inset: 0; width: 100%; height: 100%; }
.card .txt { display: grid; gap: 8px; align-content: start; padding: 16px 18px 18px; }
.card h3 { margin: 0; font: 600 1.02rem/1.25 var(--display); letter-spacing: -.02em; color: var(--white); }
.card p { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--grey-300); }
.card .m { font-family: var(--mono); font-size: .68rem; color: var(--blue-300); }
.group.paper .inner { background: var(--paper); border-radius: 22px; padding: clamp(22px, 4vw, 44px); display: grid; gap: 28px; }
.group.paper .ghead h2, .group.paper .dtext h3 { color: var(--ink); } .group.paper .ghead p, .group.paper .dtext p { color: var(--grey-600); }
.group.paper .label { color: var(--grey-500); } .group.paper .demo-row { border-color: #dde3ef; }
.group.paper .card { background: var(--white); box-shadow: inset 0 0 0 1px #dde3ef; } .group.paper .card .pic { background: #0b1222; }
.group.paper .card h3 { color: var(--ink); } .group.paper .card p { color: var(--grey-600); } .group.paper .card .m { color: var(--blue-600); }
.group.paper .dtext .stat { color: var(--blue-600); }
.group.paper .dbox { background: #0b1222; }

/* ---------- widget kit ---------- */
.w-canvas { position: relative; width: 100%; height: 260px; border-radius: 12px; overflow: hidden; background: rgba(3, 5, 11, .6); box-shadow: inset 0 0 0 1px var(--line); }
.w-canvas.tall { height: 340px; }
.w-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }
.w-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.w-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 18px; }
.w-slider { display: grid; gap: 6px; font-size: .8rem; color: var(--grey-300); min-width: 160px; flex: 1; }
.w-sl-top { display: flex; justify-content: space-between; gap: 8px; }
.w-sl-top output { font-family: var(--mono); font-size: .72rem; color: var(--blue-200); }
.w-slider input { width: 100%; accent-color: var(--blue-500); }
.w-btn { font: 500 .82rem/1 var(--body); color: var(--white); background: rgba(46, 124, 255, .1); border: 1px solid var(--line-strong); border-radius: var(--pill); padding: 9px 14px; cursor: pointer; transition: background .2s, border-color .2s, transform .15s var(--ease); }
.w-btn:hover:not(:disabled) { border-color: var(--blue-400); background: rgba(46, 124, 255, .2); }
.w-btn:active:not(:disabled) { transform: scale(.96); }
.w-btn:disabled { opacity: .45; cursor: default; }
.w-btn.primary { background: var(--blue-500); border-color: var(--blue-500); } .w-btn.primary:hover:not(:disabled) { background: var(--blue-400); }
.w-btn.chip { padding: 7px 12px; font-size: .78rem; color: var(--grey-200); }
.w-btn.chip.on { color: var(--white); background: rgba(46, 124, 255, .3); border-color: var(--blue-400); }
.w-btn.icon { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; flex: none; }
.w-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 18px; background: rgba(3, 5, 11, .6); box-shadow: inset 0 0 0 1px var(--line); justify-self: start; }
.w-seg button { font: 500 .76rem/1 var(--body); color: var(--grey-300); background: none; border: 0; border-radius: var(--pill); padding: 7px 12px; cursor: pointer; }
.w-seg button.on { color: var(--white); background: var(--blue-500); }
.w-readout { font-family: var(--mono); font-size: .74rem; color: var(--blue-200); margin-left: auto; }
.w-note { margin: 0; font-size: .82rem; color: var(--grey-400); line-height: 1.5; }
.w-label { font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--grey-500); }
.w-chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* auto */
.w-auto { display: grid; gap: 10px; }
.w-plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; min-height: 40px; }
.w-plan li { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; font-size: .86rem; color: var(--grey-100); background: rgba(23, 30, 47, .7); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; animation: wIn .35s var(--ease) both; }
.w-plan li .st { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--grey-600); }
.w-plan li.run .st { border-color: var(--blue-400); border-top-color: transparent; animation: wSpin .7s linear infinite; }
.w-plan li.done .st { background: var(--blue-500); border-color: var(--blue-500); box-shadow: inset 0 0 0 3px var(--night); }
.w-plan li.done { border-color: rgba(46, 124, 255, .35); }
.w-plan li .v { font-family: var(--mono); font-size: .7rem; color: var(--grey-400); }
.w-skills { display: flex; flex-wrap: wrap; gap: 6px; }
@keyframes wSpin { to { transform: rotate(360deg); } }
@keyframes wIn { from { opacity: 0; transform: translateY(6px); } }
/* search */
.w-search { display: grid; gap: 8px; }
.w-sbox { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 14px; border-radius: 12px; background: var(--night); box-shadow: inset 0 0 0 1px var(--line-strong); }
.w-sbox:focus-within { box-shadow: inset 0 0 0 1px var(--blue-400), 0 0 0 3px rgba(46, 124, 255, .25); }
.w-sbox .k { font-family: var(--mono); font-size: .7rem; color: var(--grey-400); border: 1px solid var(--line-strong); border-radius: 5px; padding: 2px 6px; }
.w-sbox input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--white); font: 400 1rem var(--body); padding: 10px 4px; }
.w-slist { list-style: none; margin: 0; padding: 4px; display: grid; gap: 2px; min-height: 250px; align-content: start; border-radius: 12px; background: rgba(3, 5, 11, .5); box-shadow: inset 0 0 0 1px var(--line); }
.w-slist li { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; font-size: .9rem; color: var(--grey-200); cursor: pointer; min-width: 0; }
.w-slist li .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-slist li.sel { background: rgba(46, 124, 255, .2); color: var(--white); }
.w-slist li mark { background: none; color: var(--blue-300); font-weight: 600; }
.w-slist li .kd { margin-left: auto; flex: none; font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--grey-500); }
.w-slist li.empty { color: var(--grey-500); cursor: default; }
.w-toast { justify-self: center; font-family: var(--mono); font-size: .74rem; color: var(--white); background: var(--blue-600); border-radius: var(--pill); padding: 7px 14px; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease); }
.w-toast.in { opacity: 1; transform: none; }
/* loudness */
.w-loud { display: grid; gap: 14px; }
.w-meters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; height: 250px; }
.w-meter { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; text-align: center; min-width: 0; }
.w-meter .trk { position: relative; border-radius: 6px; background: repeating-linear-gradient(0deg, rgba(170, 190, 230, .07) 0 1px, transparent 1px 10px), rgba(3, 5, 11, .6); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.w-meter .before, .w-meter .after { position: absolute; bottom: 0; width: 38%; border-radius: 3px 3px 0 0; transition: height .7s var(--ease); }
.w-meter .before { left: 10%; background: var(--grey-600); }
.w-meter .after { right: 10%; background: linear-gradient(0deg, var(--blue-700), var(--blue-400)); }
.w-meter .after.held { background: linear-gradient(0deg, #7a5310, var(--amber)); }
.w-meter .tgt { position: absolute; left: 0; right: 0; height: 2px; background: var(--white); box-shadow: 0 0 8px var(--blue-300); transition: bottom .5s var(--ease); }
.w-meter .nm { font-size: .7rem; color: var(--grey-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-meter .vl { font-family: var(--mono); font-size: .68rem; color: var(--blue-200); }
/* animate */
.w-anim { display: grid; gap: 8px; }
.w-stage { position: relative; height: 210px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(160deg, #0c3fae, #03050b 70%); box-shadow: inset 0 0 0 1px var(--line); }
.w-card { display: grid; gap: 4px; padding: 16px 22px; border-radius: 12px; background: rgba(255, 255, 255, .95); color: var(--ink); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .7); }
.w-card small { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; color: var(--blue-600); }
.w-card b { font: 600 1.4rem/1.1 var(--display); letter-spacing: -.03em; }
.w-card span { font-size: .82rem; color: var(--grey-600); }
.w-keys { position: relative; height: 18px; border-top: 1px solid var(--line); }
.w-keys i { position: absolute; top: 4px; width: 10px; height: 10px; margin-left: -5px; background: var(--blue-300); transform: rotate(45deg); }
/* sfx */
.w-sfx { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 300px; overflow-y: auto; }
.w-sfx li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) 120px auto; gap: 12px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(23, 30, 47, .55); border: 1px solid var(--line); font-size: .86rem; color: var(--grey-100); overflow: hidden; }
.w-sfx li .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-sfx li canvas { width: 120px; height: 26px; }
.w-sfx li .kd { font-family: var(--mono); font-size: .66rem; color: var(--grey-500); white-space: nowrap; }
.w-sfx li.play::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--blue-200); animation: wPlay var(--dur, 1s) linear forwards; }
.w-sfx li.empty { display: block; color: var(--grey-500); }
@keyframes wPlay { to { left: 100%; } }
/* organize */
.w-org { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); min-height: 300px; border-radius: 12px; overflow: hidden; background: rgba(3, 5, 11, .5); box-shadow: inset 0 0 0 1px var(--line); }
.w-org .loose { list-style: none; margin: 0; padding: 8px; display: grid; align-content: start; gap: 1px; border-right: 1px solid var(--line); min-width: 0; }
.w-org .loose li, .w-org .ghost { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; font-size: .8rem; color: var(--grey-200); max-height: 28px; transition: opacity .35s, max-height .4s, padding .4s; }
.w-org .loose li .nm, .w-org .ghost .nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-org .dot { width: 7px; height: 7px; border-radius: 2px; background: var(--grey-600); flex: none; }
.w-org .loose li.gone { opacity: 0; max-height: 0; padding-block: 0; }
.w-org .loose li.strike .nm { text-decoration: line-through; color: var(--grey-500); }
.w-org .ghost { position: absolute; z-index: 3; pointer-events: none; background: rgba(46, 124, 255, .25); }
.w-org .bins { display: grid; align-content: start; gap: 5px; padding: 10px; }
.w-org .bin { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; background: rgba(23, 30, 47, .7); border: 1px solid var(--line); font-size: .82rem; color: var(--white); }
.w-org .bin i { width: 12px; height: 10px; border-radius: 2px; clip-path: polygon(0 0, 45% 0, 55% 22%, 100% 22%, 100% 100%, 0 100%); }
.w-org .bin .bn { flex: 1; } .w-org .bin .bc { font-family: var(--mono); font-size: .74rem; color: var(--blue-200); }
/* undo */
.w-undo { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; }
.w-tl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; align-content: center; padding: 18px 10px; border-radius: 12px; background: rgba(3, 5, 11, .55); box-shadow: inset 0 0 0 1px var(--line); }
.w-tl .clip { position: relative; height: 70px; border-radius: 6px; padding: 6px; background: var(--grey-700); display: grid; align-content: space-between; transition: background .3s; overflow: hidden; }
.w-tl .clip.graded { background: linear-gradient(135deg, var(--blue-600), #ff9a6b); }
.w-tl .clip.fade::before, .w-tl .clip.fade::after { content: ""; position: absolute; top: 0; bottom: 0; width: 26%; }
.w-tl .clip.fade::before { left: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .7), transparent); }
.w-tl .clip.fade::after { right: 0; background: linear-gradient(-90deg, rgba(0, 0, 0, .7), transparent); }
.w-tl .clip .nm { position: relative; z-index: 1; font-family: var(--mono); font-size: .66rem; color: var(--white); }
.w-tl .clip .badges { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 2px; }
.w-tl .clip .badges b { font: 500 .58rem/1 var(--mono); color: var(--ink); background: var(--blue-100); border-radius: 3px; padding: 2px 3px; animation: wIn .3s both; }
.w-stack { display: grid; align-content: start; gap: 4px; padding: 12px; border-radius: 12px; background: rgba(3, 5, 11, .55); box-shadow: inset 0 0 0 1px var(--line); }
.w-stack .item { font-size: .78rem; color: var(--grey-300); padding: 6px 8px; border-radius: 6px; background: rgba(23, 30, 47, .7); animation: wIn .3s both; }
.w-stack .item.top { color: var(--white); box-shadow: inset 2px 0 0 var(--blue-400); }
.w-stack .item.empty { background: none; color: var(--grey-500); }

.req { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.req div { padding: 18px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); }
.req b { display: block; color: var(--white); font-weight: 600; margin-bottom: 4px; }
.req span { color: var(--grey-300); font-size: .92rem; }
.soon-card { display: grid; gap: 6px; padding: 20px; border-radius: var(--r); background: linear-gradient(135deg, rgba(18, 87, 230, .28), rgba(7, 11, 22, .9) 70%); box-shadow: inset 0 0 0 1px rgba(90, 155, 255, .3); }
.soon-card p { margin: 0; color: var(--grey-200); }
footer.site-foot { margin-top: 48px; border-top: 1px solid var(--line); }
footer.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 28px; color: var(--grey-500); font-size: var(--t-sm); }

@media (max-width: 1100px) { .num-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
    .demo-row, .demo-row.flip { grid-template-columns: minmax(0, 1fr); }
    .demo-row.flip .dtext { order: 0; }
    .w-meters { gap: 6px; }
    .w-undo { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
    .num-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tabbar { top: calc(env(safe-area-inset-top, 0px) + 62px); }
    .dbox { padding: 12px; }
    .w-canvas.tall { height: 280px; }
    .w-sfx li { grid-template-columns: 30px minmax(0, 1fr) auto; } .w-sfx li canvas { display: none; }
    .w-org { grid-template-columns: 1fr; } .w-org .loose { border-right: 0; border-bottom: 1px solid var(--line); }
    .w-meter .nm { font-size: .6rem; }
}
