/* FORMIC · a monochrome lab: platinum ground, 1px rules, chamfered frames, obsidian actions, a chrome worker. */
@font-face { font-family: "Oxanium"; src: url(/fonts/oxanium.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans-italic.woff2) format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/fonts/plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #e9e9ec;          /* the hero ground */
  --sheet: #f4f4f6;       /* the pages below */
  --card: #fbfbfc;
  --ink: #0f0f11;
  --ink2: #2b2b31;
  --text: #34343b;
  --mute: #6c6c75;
  --faint: #9a9aa3;
  --line: rgba(15, 15, 17, 0.14);
  --line2: rgba(15, 15, 17, 0.08);
  --grid: rgba(15, 15, 17, 0.035);
  --ok: #1f8a55;
  --display: "Oxanium", "Instrument Sans", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gut: clamp(16px, 3.4vw, 44px);
  --hh: 72px;
  --cut: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.32, 0.5, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hh) + 24px); }
body {
  margin: 0; background: var(--sheet); color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
code { font-family: var(--mono); font-size: 0.88em; background: rgba(15, 15, 17, 0.06); padding: 0.1em 0.38em; border-radius: 2px; color: var(--ink); }
b, strong { color: var(--ink); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: #fff; }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--gut); }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--hh);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--gut);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.top.solid { background: rgba(244, 244, 246, 0.94); box-shadow: 0 1px 0 var(--line2); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); justify-self: start; }
.brand svg { width: 28px; height: 28px; fill: currentColor; flex: none; transition: transform 0.6s var(--spring); }
.brand:hover svg { transform: rotate(-6deg) translateY(-1px); }
.brand span { font: 600 17px/1 var(--display); letter-spacing: 0.24em; }
.nav { display: flex; gap: clamp(20px, 3vw, 48px); }
.nav a { position: relative; font-size: 14px; color: var(--ink2); padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease); }
.nav a:hover::after, .nav a.on::after { transform: scaleX(1); transform-origin: left; }
.nav a.on { color: var(--ink); }
.top-r { justify-self: end; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.5); transition: background-color 0.3s; }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { background: #fff; }
.connect {
  display: inline-flex; align-items: center; height: 44px; padding: 0 26px; background: #fff; color: var(--ink);
  font: 600 12.5px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; box-shadow: inset 0 0 0 1px var(--line2);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}
.connect:hover { background: var(--ink); color: #fff; }
.menu-btn { display: none; width: 44px; height: 44px; position: relative; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.6); }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform 0.45s var(--ease); }
.menu-btn span:first-child { top: 17px; } .menu-btn span:nth-child(2) { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 30px;
  font: 600 13px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}
.btn-sm { height: 42px; padding: 0 20px; font-size: 12px; }
.btn-cut { background: var(--ink); color: #fff; clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); overflow: hidden; }
.btn-cut::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.16) 50%, transparent 70%); transform: translateX(-110%); transition: transform 0.8s var(--ease); }
.btn-cut:hover::before { transform: translateX(110%); }
.btn-cut:hover { background: #24242a; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #24242a; }
.btn-paper { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-paper:hover { background: var(--ink); color: #fff; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn-line { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); padding: 6px 0; }
.btn-line::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform-origin: left; transition: transform 0.5s var(--ease); }
.btn-line:hover::after { transform: scaleX(0.35); }
.btn-line i { font-style: normal; transition: transform 0.5s var(--ease); }
.btn-line:hover i { transform: translateX(4px); }

/* ---------- labels ---------- */
.tag, .idx, .co { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); margin: 0; }
.tag .br { color: var(--faint); }
.idx { display: flex; align-items: center; gap: 12px; color: var(--ink2); }
.idx span { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border: 1px solid var(--line); color: var(--ink); }
.corner { position: absolute; width: 14px; height: 14px; border: 0 solid var(--ink); pointer-events: none; }
.corner.tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.corner.tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.corner.bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.corner.br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); position: relative; flex: none; }
.dot.on { background: var(--ok); }
.dot.on::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--ok); opacity: 0; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(0.4); opacity: 0.8; } 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: max(680px, min(100svh, 1000px)); background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px; background-position: -1px -1px;
  display: grid; grid-template-rows: 1fr auto; grid-template-columns: minmax(0, 1fr); padding-top: var(--hh); overflow: hidden;
}
.frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.frame path { fill: none; stroke: rgba(15, 15, 17, 0.32); stroke-width: 1; vector-effect: non-scaling-stroke; shape-rendering: geometricPrecision; }
.frame #frame-c { fill: var(--sheet); stroke: none; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); min-height: 0; }
.hero-copy { align-self: center; padding: 48px var(--gut) 40px max(var(--gut), calc((100vw - 1320px) / 2 + var(--gut))); max-width: 720px; }
.hero-copy .tag { margin-bottom: 26px; }
.hero h1 {
  margin: 0 0 26px; font: 300 clamp(44px, 5.2vw, 92px)/0.98 var(--display); letter-spacing: 0.005em; text-transform: uppercase; color: var(--ink);
}
.hero h1 .ln { display: block; white-space: nowrap; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero h1 .ln > span { display: block; }
.hero .lead { max-width: 470px; font-size: 15.5px; line-height: 1.65; color: var(--text); margin: 0 0 34px; }
.acts { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 30px; }
.hstats { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); margin-top: 54px; padding-bottom: 22px; border-bottom: 1px solid var(--line); max-width: 520px; }
.hs { display: flex; align-items: center; gap: 16px; }
.hs svg { width: 28px; height: 28px; fill: none; stroke: var(--ink2); stroke-width: 1; stroke-linejoin: round; stroke-linecap: round; }
.hs b { display: block; font: 500 clamp(24px, 2.2vw, 32px)/1 var(--display); color: var(--ink); letter-spacing: 0.01em; }
.hs span { display: block; font-size: 13px; color: var(--mute); margin-top: 6px; }
.vr { width: 1px; align-self: stretch; background: var(--line); }

.stage { position: relative; min-height: 420px; cursor: grab; touch-action: pan-y; }
.stage.grab { cursor: grabbing; }
#ant { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: scale(0.94); transition: opacity 1.4s var(--ease), transform 1.8s var(--ease); }
.ant-on #ant { opacity: 1; transform: none; }
.stage-ui { position: absolute; inset: 28px 28px 28px 32px; pointer-events: none; }
.stage-ui p { position: absolute; margin: 0; font: 500 10.5px/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink2); }
.stage-ui p span { color: var(--mute); }
.st-id { top: 14px; left: 22px; }
.st-xy { top: 14px; right: 22px; text-align: right; color: var(--mute) !important; }
.st-xy b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.st-hint { bottom: 14px; left: 22px; color: var(--mute) !important; }
.tele { position: absolute; right: var(--gut); bottom: 22px; margin: 0; display: flex; gap: 28px; align-items: end; z-index: 3; }
.tele > div { min-width: 0; }
.tele dt { font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); display: flex; align-items: center; gap: 8px; }
.tele dd { margin: 4px 0 0; font: 500 20px/1 var(--display); color: var(--ink); }
.tele-state dt { color: var(--ink2); }

.hero-bar { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 10px; padding: 0 var(--gut) 34px max(var(--gut), calc((100vw - 1320px) / 2 + var(--gut))); }

/* ---------- command chips ---------- */
.cmd { display: flex; align-items: center; min-height: 46px; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); max-width: 100%; }
.cmd .k { flex: none; align-self: stretch; display: grid; place-items: center; padding: 0 14px; font: 500 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); border-right: 1px solid var(--line2); }
.cmd code { flex: 1; min-width: 0; background: none; padding: 0 14px; font-size: 13px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.cmd code::-webkit-scrollbar { display: none; }
.copy {
  flex: none; align-self: stretch; padding: 0 16px; font: 600 11px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
  border-left: 1px solid var(--line2); transition: background-color 0.3s, color 0.3s;
}
.copy:hover { background: var(--ink); color: #fff; }
.copy.done { background: var(--ink); color: #fff; }

/* ---------- sections ---------- */
.sec {
  position: relative; padding: clamp(88px, 11vw, 150px) 0; border-top: 1px solid var(--line2);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px; background-position: -1px -1px;
}
#about { border-top: 0; }
.head { max-width: 760px; margin-bottom: clamp(44px, 5vw, 64px); }
.head .idx { margin-bottom: 22px; }
.h2 { margin: 0 0 18px; font: 400 clamp(32px, 4vw, 56px)/1.05 var(--display); letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.lead { margin: 0; font-size: 17px; line-height: 1.65; color: var(--text); max-width: 620px; }
.lead a { text-decoration: underline; text-underline-offset: 3px; }

.cell { position: relative; background: var(--card); padding: 28px 26px 30px; }
.cell::before, .cell::after { content: ""; position: absolute; width: 10px; height: 10px; border: 0 solid var(--ink); opacity: 0; transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); }
.cell::before { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; transform: translate(4px, 4px); }
.cell::after { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; transform: translate(-4px, -4px); }
.cell:hover::before, .cell:hover::after { opacity: 1; transform: none; }
.cell .co { display: block; margin-bottom: 40px; }
.cell h3 { margin: 0 0 10px; font: 500 20px/1.25 var(--display); color: var(--ink); letter-spacing: 0.005em; }
.cell p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.grid4, .flow, .metrics { display: grid; gap: 1px; background: var(--line2); box-shadow: 0 0 0 1px var(--line2); }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.need { margin-top: 28px; display: grid; grid-template-columns: 200px 1fr auto; align-items: center; gap: 28px; padding: 26px 28px; background: var(--ink); color: #d7d7dc; }
.need h3 { margin: 0; font: 500 20px/1.2 var(--display); color: #fff; }
.need ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.need li { display: grid; gap: 4px; font-size: 13.5px; line-height: 1.5; color: #a9a9b2; }
.need li .co { color: #7c7c86; }
.need li b { color: #fff; font-size: 15px; font-weight: 600; }
.need .btn-cut { background: #fff; color: var(--ink); }
.need .btn-cut:hover { background: #e6e6ea; }
.need .btn-cut::before { background: linear-gradient(100deg, transparent 30%, rgba(0, 0, 0, 0.08) 50%, transparent 70%); }

/* ---------- segmented control ---------- */
.seg { position: relative; display: inline-flex; margin-top: 30px; padding: 4px; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); }
.seg button { position: relative; z-index: 1; height: 38px; padding: 0 18px; font-size: 13.5px; color: var(--mute); transition: color 0.4s var(--ease); }
.seg button[aria-pressed="true"] { color: #fff; }
.seg-hl, .tab-hl { position: absolute; top: 4px; bottom: 4px; left: 0; background: var(--ink); transition: transform 0.55s var(--spring), width 0.55s var(--spring); will-change: transform; }

/* ---------- guide ---------- */
.guide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.rail { position: sticky; top: calc(var(--hh) + 32px); display: flex; gap: 18px; }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; flex: 1; }
.rail a { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 14px; color: var(--mute); transition: color 0.3s; }
.rail a i { font: 500 11px/1 var(--mono); font-style: normal; width: 30px; height: 22px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); color: var(--mute); transition: background-color 0.35s var(--ease), color 0.35s var(--ease); }
.rail a.done { color: var(--ink2); }
.rail a.done i { color: var(--ink); }
.rail a.on { color: var(--ink); }
.rail a.on i { background: var(--ink); color: #fff; box-shadow: none; }
.rail-bar { width: 1px; background: var(--line); position: relative; }
.rail-bar i { position: absolute; inset: 0; background: var(--ink); transform-origin: top; transform: scaleY(0); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line2); box-shadow: 0 0 0 1px var(--line2); }
.step { display: grid; grid-template-columns: 76px minmax(0, 1fr); background: var(--card); }
.step-n { padding: 30px 0 0 26px; font: 300 30px/1 var(--display); color: var(--faint); }
.step-b { padding: 28px 30px 32px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; justify-items: start; }
.step-b > * { margin: 0; max-width: 100%; }
.step-b h3 { font: 500 22px/1.25 var(--display); color: var(--ink); }
.step-b p { font-size: 15px; color: var(--text); }
.step-b a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }
.step-b .cmd { width: min(520px, 100%); }
.tip { font-size: 13.5px !important; color: var(--mute) !important; padding-left: 14px; border-left: 1px solid var(--line); }
.tip b { color: var(--ink2); }
.os-only { display: none; }
[data-os-now="win"] .os-only[data-for="win"], [data-os-now="mac"] .os-only[data-for="mac"], [data-os-now="linux"] .os-only[data-for="linux"] { display: block; }
.mini-term { margin: 0; width: min(520px, 100%); background: var(--ink); color: #e9e9ee; }
.mini-term pre, .term pre { margin: 0; padding: 18px 20px; font: 12.5px/1.55 var(--mono); white-space: pre; overflow-x: auto; }
.g { color: #85858f; } .w { color: #fff; } .p { color: #c9c9d1; } .a { color: #fff; } .ok { color: #57c98c; }
.inv { background: #fff; color: var(--ink); }
.caret { display: inline-block; width: 7px; height: 1.05em; vertical-align: -2px; background: #fff; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mini-auth { display: grid; gap: 10px; width: min(360px, 100%); padding: 20px; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); }
.ma-k { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.ma-code { font: 500 30px/1 var(--display); letter-spacing: 0.06em; color: var(--ink); }
.ma-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--mute); padding-top: 10px; border-top: 1px solid var(--line2); }
.ma-btns { display: flex; gap: 8px; }
.ma-btns i { font-style: normal; flex: 1; height: 36px; display: grid; place-items: center; font: 600 11.5px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.1em; }
.ma-btns .b1 { background: var(--ink); color: #fff; } .ma-btns .b2 { box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.term { margin: 0; width: 100%; max-width: 640px; background: var(--ink); color: #e9e9ee; }
.term-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.term-bar i { width: 8px; height: 8px; border-radius: 50%; background: #3a3a42; }
.term-bar span { margin-left: 10px; font: 500 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #7a7a84; }
.term pre { min-height: 236px; }

/* ---------- engine ---------- */
.lab { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); background: var(--card); box-shadow: 0 0 0 1px var(--line2); }
.lab-r { padding: 30px 30px 32px; border-right: 1px solid var(--line2); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }
.lab-r p { margin: 0; font-size: 14px; color: var(--text); }
.lab .big { font: 400 64px/1 var(--display); color: var(--ink); display: flex; align-items: baseline; gap: 12px; }
.lab .big small { font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.bits { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; }
.bits i { height: 18px; box-shadow: inset 0 0 0 1px var(--line); transition: background-color 0.25s; }
.bits i.on { background: var(--ink2); box-shadow: none; }
.bits i.hit { background: var(--ok); box-shadow: none; }
.lab-l { margin: 0; display: grid; align-content: center; }
.lab-l div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 18px 30px; border-bottom: 1px solid var(--line2); }
.lab-l div:last-child { border-bottom: 0; }
.lab-l dt { font: 500 11px/1.6 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.lab-l dd { margin: 0; font: 13px/1.6 var(--mono); color: var(--ink); word-break: break-all; }
.lab-l .z { background: var(--ink); color: #fff; }
.machines { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line2); box-shadow: 0 0 0 1px var(--line2); }
.mach { display: grid; gap: 20px; }
.mach .co { margin: 0; }
.mach-h { display: flex; justify-content: space-between; align-items: baseline; }
.mach-h h3 { margin: 0; }
.mach-h span { font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.mach dl { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mach dt { font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.mach dd { margin: 4px 0 0; font: 400 28px/1 var(--display); color: var(--ink); }
.mach dd small { font-size: 13px; color: var(--mute); }
.clock { height: 2px; background: var(--line2); position: relative; overflow: hidden; }
.clock i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); }

/* ---------- network ---------- */
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.m { position: relative; background: var(--card); padding: 26px 26px 28px; display: grid; gap: 10px; align-content: start; }
.m .co { margin-bottom: 26px; }
.m b { font: 400 clamp(36px, 3.6vw, 52px)/1 var(--display); color: var(--ink); letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 8px; }
.m b small { font: 500 12px/1 var(--mono); letter-spacing: 0.04em; color: var(--mute); }
.m .ml { font-size: 14px; font-weight: 600; color: var(--ink); }
.m p { margin: 0; font-size: 13.5px; color: var(--mute); }
.m::after { content: ""; position: absolute; top: 26px; right: 26px; width: 7px; height: 7px; border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); }
.board { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; scroll-margin-top: calc(var(--hh) + 24px); }
.tbl { background: var(--card); box-shadow: 0 0 0 1px var(--line2); min-width: 0; }
.tbl h3 { margin: 0; padding: 20px 22px; display: flex; justify-content: space-between; align-items: baseline; font: 500 17px/1.2 var(--display); color: var(--ink); border-bottom: 1px solid var(--line2); }
.tbl h3 span { font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.tbl-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); padding: 14px 22px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
td { padding: 13px 22px; border-bottom: 1px solid var(--line2); font-family: var(--mono); font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; }
td .y { color: var(--ink); font-weight: 500; }
td.empty { text-align: center; padding: 36px 22px; color: var(--mute); font-family: var(--sans); font-size: 14px; }
tbody tr { transition: background-color 0.25s; }
tbody tr:hover { background: rgba(15, 15, 17, 0.025); }

/* ---------- rules (tabs morph with view transitions) ---------- */
.tabs { position: relative; display: inline-flex; flex-wrap: wrap; padding: 4px; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); margin-bottom: 28px; }
.tabs button { position: relative; z-index: 1; height: 40px; padding: 0 18px; font-size: 14px; color: var(--mute); transition: color 0.4s var(--ease); }
.tabs button[aria-selected="true"] { color: #fff; }
.how { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3.5fr) minmax(0, 3.5fr); gap: 1px; background: var(--line2); box-shadow: 0 0 0 1px var(--line2); view-transition-name: how; }
.how .lead-cell { background: var(--ink); color: #c8c8cf; padding: 30px 30px 34px; display: grid; gap: 40px; align-content: space-between; min-height: 260px; }
.how .lead-cell .co { color: #85858f; }
.how .lead-cell h3 { margin: 0 0 12px; font: 400 30px/1.15 var(--display); color: #fff; }
.how .lead-cell p { margin: 0; font-size: 15px; line-height: 1.6; }
.how .cell { display: grid; align-content: start; gap: 10px; }
.how .cell .co { margin-bottom: 30px; }
.how .cell b { font: 500 18px/1.3 var(--display); }
::view-transition-old(how) { animation: 0.24s var(--ease) both vt-out; }
::view-transition-new(how) { animation: 0.6s var(--ease) both vt-in; }
::view-transition-group(how) { animation-duration: 0.6s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

/* ---------- supply ---------- */
.supply { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.supply .idx { margin-bottom: 22px; }
.facts { margin: 34px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.facts div { padding: 16px 16px 0 0; }
.facts dt { font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.facts dd { margin: 6px 0 0; font: 400 21px/1.2 var(--display); color: var(--ink); }
.chart { position: relative; margin: 0; padding: 26px 24px 18px; background: var(--card); }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart figcaption { margin-top: 10px; font: 500 10.5px/1.5 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.chart .grid { stroke: var(--line2); stroke-width: 1; shape-rendering: crispEdges; }
.chart .cap { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.45; }
.chart .ax { font: 10px var(--mono); fill: var(--mute); }
.chart .area { fill: url(#sg); }
.chart .ln { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.chart .dt { fill: var(--card); stroke: var(--ink); stroke-width: 1.2; }
.chart .now { fill: var(--ok); stroke: var(--card); stroke-width: 2; }

/* ---------- faq ---------- */
.faq { margin-top: clamp(96px, 12vw, 160px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); }
.faq .head { margin: 0; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font: 500 17px/1.35 var(--display); color: var(--ink); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; width: 12px; height: 12px; background: linear-gradient(var(--ink), var(--ink)) center / 12px 1px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 1px 12px no-repeat; transition: transform 0.5s var(--spring); }
.faq-list details[open] summary::after { transform: rotate(135deg); }
.ans { overflow: hidden; }
.ans p { margin: 0; padding: 0 40px 24px 0; font-size: 15px; color: var(--text); }

/* ---------- start ---------- */
.start-in { position: relative; padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 80px); background: var(--card); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 18px; }
.start-in .h2 { margin: 6px 0 0; }
.start-in .lead { color: var(--mute); font-size: 15px; }
.start-cmds { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: min(620px, 100%); margin: 18px 0 10px; text-align: left; }
.start-in .acts { justify-content: center; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #a7a7b0; padding: 80px 0 36px; }
.foot .brand { color: #fff; margin-bottom: 18px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.foot-grid p { margin: 0; font-size: 14px; max-width: 360px; }
.foot h4 { margin: 0 0 16px; font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: #6f6f79; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.foot ul a { transition: color 0.3s; } .foot ul a:hover { color: #fff; }
.specs { margin-top: 64px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.specs div { padding: 22px 16px 0 0; display: grid; gap: 4px; }
.specs b { font: 400 22px/1.1 var(--display); color: #fff; }
.specs span { font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #6f6f79; }
.fine { margin: 46px 0 0; font: 500 10.5px/1.6 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: #5d5d66; }

/* ---------- motion states ---------- */
.js-motion .rv { opacity: 0; transform: translate3d(0, 22px, 0); }
.js-motion .hero h1 .ln > span { transform: translate3d(0, 105%, 0); }
.js-motion .hero-copy .tag, .js-motion .hero .lead, .js-motion .hero .acts, .js-motion .hstats, .js-motion .hero-bar, .js-motion .tele, .js-motion .stage-ui { opacity: 0; }
.js-motion .frame path { stroke-dasharray: var(--len, 4000); stroke-dashoffset: var(--len, 4000); }
.js-motion .frame #frame-c { stroke-dasharray: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .need { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr 1fr; }
  .how .lead-cell { grid-column: 1 / -1; min-height: 0; }
}
@media (max-width: 900px) {
  :root { --hh: 64px; }
  .top { grid-template-columns: 1fr auto; }
  .nav {
    position: fixed; top: var(--hh); left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--gut) 20px; background: var(--sheet);
    box-shadow: 0 1px 0 var(--line2); clip-path: inset(0 0 100% 0); transition: clip-path 0.55s var(--ease);
  }
  .nav a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line2); }
  .nav a::after { display: none; }
  .top.open .nav { clip-path: inset(0 0 0 0); }
  .top.open { background: var(--sheet); }
  .menu-btn { display: block; }
  .connect { height: 44px; padding: 0 18px; }
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding: 40px var(--gut) 12px; }
  .stage { height: clamp(340px, 78vw, 560px); min-height: 0; margin: 0 var(--gut); }
  .stage-ui { inset: 12px; }
  .tele { position: absolute; left: 0; right: 0; bottom: 12px; justify-content: space-between; padding: 0 16px; }
  .hero-bar { padding: 22px var(--gut) 56px; }
  .guide { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .lab, .supply, .faq { grid-template-columns: minmax(0, 1fr); }
  .lab-r { border-right: 0; border-bottom: 1px solid var(--line2); }
  .machines { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .connect { display: none; }
  .grid4, .metrics { grid-template-columns: 1fr; }
  .need ul { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
  .step { grid-template-columns: minmax(0, 1fr); }
  .step-n { padding: 24px 22px 0; font-size: 22px; }
  .step-b { padding: 12px 22px 26px; }
  .lab-l div { grid-template-columns: 1fr; gap: 4px; padding: 14px 22px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .hstats { margin-top: 40px; }
  .tele { gap: 12px; }
  .tele dd { font-size: 16px; }
  .st-xy, .st-hint { display: none; }
  .tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs button { flex: none; }
}

/* ---------- app pages: dashboard and authorize ---------- */
.app-body { background: var(--bg); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 64px 64px; min-height: 100svh; }
.app-body .top { background: rgba(233, 233, 236, 0.92); box-shadow: 0 1px 0 var(--line2); grid-template-columns: 1fr auto; }
.app-page { padding: calc(var(--hh) + 48px) 0 96px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font: 300 clamp(40px, 5vw, 64px)/1 var(--display); text-transform: uppercase; color: var(--ink); }
.acc { display: inline-flex; align-items: center; gap: 10px; margin: 0; height: 40px; padding: 0 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); font: 500 12px/1 var(--mono); color: var(--ink2); }
.acc.ok .dot { background: var(--ok); }
.pane { position: relative; background: var(--card); box-shadow: 0 0 0 1px var(--line2); padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.pane > p { margin: 0; font-size: 14.5px; }
.pane-h { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--line2); }
.pane-h h2 { margin: 0; font: 500 20px/1.2 var(--display); color: var(--ink); }
.pane-h span { font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.gate { max-width: 640px; padding: 36px; }
.gate .h2 { font-size: clamp(28px, 3vw, 40px); margin: 0; }
.gate-top { display: flex; justify-content: space-between; align-items: center; }
.gate-top .eyebrow { margin: 0; }
.eyebrow { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); margin: 0; }
.gate-state { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.gate .btn { justify-self: start; }
.gate-steps { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--line2); }
.gate-steps li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.gate-steps b { font: 500 11px/1.8 var(--mono); color: var(--mute); }
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line2); box-shadow: 0 0 0 1px var(--line2); }
.dash .pane { box-shadow: none; }
.bal { margin: 4px 0; display: flex; align-items: baseline; gap: 12px; }
.bal b { font: 400 clamp(44px, 5vw, 64px)/1 var(--display); color: var(--ink); }
.bal span { font: 500 12px/1 var(--mono); color: var(--mute); }
.kv { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line2); box-shadow: 0 0 0 1px var(--line2); }
.kv div { background: var(--card); padding: 14px 16px; }
.kv dt { font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.kv dd { margin: 6px 0 0; font: 400 20px/1.1 var(--display); color: var(--ink); }
.keys, .wd-list, .wallets { list-style: none; margin: 0; padding: 0; }
.keys li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.keys li.empty { color: var(--mute); font-size: 14px; }
.keys .k-l { display: grid; gap: 3px; min-width: 0; }
.keys .k-l small { font: 11.5px/1.4 var(--mono); color: var(--mute); }
.keys .copy { height: 34px; box-shadow: inset 0 0 0 1px var(--line); border: 0; }
.wd-list li { padding: 8px 0; border-bottom: 1px solid var(--line2); font: 12px/1.5 var(--mono); color: var(--ink2); }
.wd-list a { text-decoration: underline; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field { height: 42px; width: 160px; padding: 0 14px; border: 0; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font: 14px var(--mono); color: var(--ink); border-radius: 0; }
.field:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ink); }
.note { margin: 0; font-size: 13.5px; color: var(--mute); }
.note:empty { display: none; }
.newkey { display: grid; gap: 10px; padding: 16px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--line2); }
.newkey p { margin: 0; font-size: 14px; }
.wallets { display: grid; gap: 6px; }
.wallets button { display: flex; align-items: center; gap: 12px; width: 100%; height: 48px; padding: 0 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: background-color 0.3s; }
.wallets button:hover { background: var(--sheet); }
.wallets img { width: 22px; height: 22px; }
.auth { min-height: 100svh; display: grid; place-items: center; padding: calc(var(--hh) + 32px) var(--gut) 48px; }
.auth-card { position: relative; width: min(520px, 100%); background: var(--card); box-shadow: 0 0 0 1px var(--line2); padding: 36px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.auth-card h1 { margin: 0; font: 400 30px/1.15 var(--display); color: var(--ink); }
.auth-code { margin: 6px 0 0; font: 400 clamp(38px, 8vw, 52px)/1 var(--display); letter-spacing: 0.06em; color: var(--ink); }
.auth-kv { margin: 0; border-top: 1px solid var(--line2); }
.auth-kv div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.auth-kv dt { color: var(--mute); }
.auth-kv dd { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--ink); text-align: right; word-break: break-all; }
.auth-fine { margin: 0; font-size: 13px; color: var(--mute); }
.auth-card.done .auth-code { color: var(--ok); }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.pill { justify-self: end; display: flex; gap: 8px; align-items: center; }
[hidden] { display: none !important; }

/* =========================================================================================
   FULL 3D: one world behind every page. Floating sections sit on it as spatial glass;
   dense sections are paper sheets that rise over it (the world stops drawing under them).
   ========================================================================================= */
body { background: var(--bg); }
#world { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0; transition: opacity 1.8s var(--ease); pointer-events: none; }
.world-on #world { opacity: 1; }
main, .foot { position: relative; z-index: 1; }
.hero { background: none; }
.frame #frame-c { display: none; }
.sec { background: none; border-top: 0; }
.no-webgl body { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 64px 64px; }

.sheet {
  background-color: var(--sheet);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px; background-position: -1px -1px;
  clip-path: polygon(64px 0, 100% 0, 100% 100%, 0 100%, 0 64px);
  transform-origin: 50% 0;
}
.sheet::before { content: ""; position: absolute; left: 0; top: 0; width: 91px; height: 1px; background: rgba(15, 15, 17, 0.35); transform: rotate(-45deg); transform-origin: 0 0; translate: 0 64px; }
.sheet::after { content: ""; position: absolute; left: 64px; right: 0; top: 0; height: 1px; background: rgba(15, 15, 17, 0.2); }
.sheet + .sheet, .foot { clip-path: none; }

/* ---------- liquid glass ----------
   Clear glass over the world: a light backdrop blur with boosted saturation (the world's colour bends through it),
   a bright rim that is thicker at the top-left and bottom-right like a lens edge, an inner caustic along the bottom,
   and a highlight that follows the pointer. Blur radius stays small and only panels get it; html.glass-lite (set by
   the world when a device cannot hold 60) swaps the blur for a denser fill so it never lags. */
:root { --lg-r: 20px; }
.sec:not(.sheet) .wrap { perspective: 1600px; }
.sec:not(.sheet) :is(.grid4, .flow, .metrics, .machines, .how) { gap: 14px; background: none; box-shadow: none; }
.lg, .sec:not(.sheet) :is(.cell, .m, .lab, .start-in, .round-hud, .tabs, .seg), .hero-bar .cmd, .tele, .nav, .connect, .icon-btn {
  border-radius: var(--lg-r);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.2) 42%, rgba(255, 255, 255, 0.32) 100%);
  -webkit-backdrop-filter: blur(10px) saturate(1.8) brightness(1.05);
  backdrop-filter: blur(10px) saturate(1.8) brightness(1.05);
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.95),
    inset -1px -1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    inset 0 -14px 26px -18px rgba(255, 255, 255, 0.9),
    inset 0 10px 22px -16px rgba(255, 255, 255, 0.85),
    0 0 0 1px rgba(15, 15, 17, 0.07),
    0 1px 2px rgba(15, 15, 17, 0.06),
    0 26px 50px -30px rgba(15, 15, 17, 0.42);
}
/* a lens edge: a thin rainbow-free refraction line just inside the rim */
.sec:not(.sheet) :is(.cell, .m, .lab, .start-in)::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 1; transform: none; border: 0; width: auto; height: auto;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 2px;
}
.sec:not(.sheet) :is(.cell, .m, .lab, .start-in)::after { display: none; }
.sec:not(.sheet) :is(.cell, .m) { padding: 28px 28px 30px; }
.sec:not(.sheet) :is(.cell, .m, .lab, .start-in, .round-hud) { position: relative; isolation: isolate; }
/* a soft veil behind copy that sits straight on the world, so workers passing behind never fight the text */
.sec:not(.sheet) .head, .hero-copy { position: relative; }
.sec:not(.sheet) .head::before, .hero-copy::before {
  content: ""; position: absolute; z-index: -1; inset: -60px -120px -50px -80px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(233, 233, 236, 0.92), rgba(233, 233, 236, 0.75) 55%, rgba(233, 233, 236, 0));
}
.hero-copy::before { inset: -40px -60px -20px -120px; }
.sec:not(.sheet) .lab { overflow: hidden; }
.sec:not(.sheet) .lab-r { border-right-color: rgba(255, 255, 255, 0.6); }
.sec:not(.sheet) .lab-l div { border-bottom-color: rgba(15, 15, 17, 0.06); }
.sec:not(.sheet) .need, .sec:not(.sheet) .how .lead-cell {
  border-radius: var(--lg-r);
  background: linear-gradient(150deg, rgba(22, 22, 26, 0.9), rgba(10, 10, 12, 0.94));
  -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4);
  box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.22), inset -1px -1px 0 rgba(255, 255, 255, 0.08), inset 0 -14px 26px -18px rgba(255, 255, 255, 0.18), 0 26px 50px -26px rgba(15, 15, 17, 0.55);
}
.sec:not(.sheet) .need .btn-cut { clip-path: none; border-radius: 999px; }
.sec:not(.sheet) :is(.tabs, .seg) { border-radius: 999px; padding: 5px; }
.sec:not(.sheet) :is(.tabs, .seg) button { border-radius: 999px; }
.sec:not(.sheet) :is(.tab-hl, .seg-hl) { border-radius: 999px; top: 5px; bottom: 5px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 14px -6px rgba(15, 15, 17, 0.5); }
.sec:not(.sheet) .clock { border-radius: 2px; }
.sec:not(.sheet) .bits i { border-radius: 3px; }
.sec:not(.sheet) .m::after { top: 28px; right: 28px; }
.start-in .corner, .sec:not(.sheet) .chart .corner { display: none; }
.sec:not(.sheet) .start-in { padding: clamp(48px, 7vw, 92px) clamp(24px, 6vw, 80px); }
.sec:not(.sheet) .start-cmds .cmd { border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.7); }
.sec:not(.sheet) .head { max-width: 640px; }
.sec:not(.sheet) .head .lead { color: var(--ink2); }

/* nav as a floating glass pill; the connect button and X icon as glass beads */
.nav { padding: 6px 8px; border-radius: 999px; gap: 2px; }
.nav a { padding: 8px 16px; border-radius: 999px; transition: background-color 0.35s var(--ease), color 0.35s var(--ease); }
.nav a::after { display: none; }
.nav a:hover { background: rgba(255, 255, 255, 0.55); }
.nav a.on { background: var(--ink); color: #fff; }
.connect { border-radius: 999px; background: linear-gradient(150deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.45)); }
.connect:hover { background: var(--ink); color: #fff; }
.icon-btn { border-radius: 50%; border: 0; }
.top.solid { background: none; box-shadow: none; }
.hero-bar .cmd { border-radius: 14px; overflow: hidden; }
.hero-bar .cmd .k { border-right-color: rgba(15, 15, 17, 0.07); }
.tele { padding: 14px 20px; border-radius: 16px; bottom: 26px; }
@media (max-width: 900px) {
  .nav { border-radius: 0 0 22px 22px; padding: 8px var(--gut) 18px; background: rgba(244, 244, 246, 0.96); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav a { border-radius: 12px; border-bottom: 0; }
  .tele { left: 10px; right: 10px; bottom: 10px; padding: 10px 14px; }
}

/* lite: same look, no live blur */
.glass-lite :is(.lg, .sec:not(.sheet) :is(.cell, .m, .lab, .start-in, .round-hud, .tabs, .seg), .hero-bar .cmd, .tele, .nav, .connect, .icon-btn) {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(150deg, rgba(252, 252, 253, 0.92) 0%, rgba(244, 244, 247, 0.86) 45%, rgba(249, 249, 251, 0.9) 100%);
}
.glass-lite .sec:not(.sheet) :is(.need, .how .lead-cell) { -webkit-backdrop-filter: none; backdrop-filter: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sec:not(.sheet) :is(.cell, .m, .lab, .start-in, .round-hud) { background: rgba(250, 250, 251, 0.9); }
}

/* the highlight that slides across a panel under the pointer */
.tilt { will-change: transform; }
.sheen { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.5s var(--ease); z-index: 1;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 60%); }
.need .sheen { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 60%); }
.tilt:hover .sheen { opacity: 1; }

/* the round, explained next to the live numbers */
.round-hud { margin-top: 14px; display: flex; gap: 18px; align-items: baseline; max-width: 680px; padding: 16px 22px; }
.round-hud .co { flex: none; }
.round-hud p { margin: 0; font-size: 13.5px; color: var(--text); }

/* the header goes to frosted glass once you leave the hero (a thin strip, so the blur is cheap) */

/* hero HUD over the world */
.stage { cursor: default; pointer-events: none; }
.hero .lead { color: var(--ink2); }
.js-motion .hero-copy { will-change: transform, opacity; }

@media (max-width: 900px) {
  .sheet { clip-path: polygon(36px 0, 100% 0, 100% 100%, 0 100%, 0 36px); }
  .sheet::before { width: 51px; translate: 0 36px; }
  .sheet::after { left: 36px; }
  .sec:not(.sheet) .head { margin-left: -16px; padding: 18px 16px 20px; }
  .round-hud { flex-direction: column; gap: 6px; }
}
main { overflow-x: clip; }
.menu-btn { border-radius: 50%; border: 0; background: linear-gradient(150deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3)); -webkit-backdrop-filter: blur(10px) saturate(1.6); backdrop-filter: blur(10px) saturate(1.6); box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.95), inset -1px -1px 0 rgba(255, 255, 255, 0.5), 0 0 0 1px rgba(15, 15, 17, 0.07), 0 10px 24px -14px rgba(15, 15, 17, 0.4); }
@media (max-width: 900px) {
  .sec:not(.sheet) .head::before, .hero-copy::before { inset: -30px -16px -20px -16px; }
}

/* ================= champagne: the crystal's light, carried into the interface ================= */
:root { --champ: #c9b28c; --champ-hi: #f3e6cf; --champ-lo: #8a7556; }
::selection { background: rgba(201, 178, 140, 0.32); color: var(--ink); }
:focus-visible { outline: 1.5px solid var(--champ); outline-offset: 3px; }

/* a hairline of champagne light runs along a glass panel's edge, brightest where the pointer is */
.sheen::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(243, 230, 207, 1), rgba(201, 178, 140, 0.55) 35%, rgba(201, 178, 140, 0) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* the main button: a bead of light travels its edge on hover, like a glint going round a cut stone */
@property --orbit { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.btn-cut::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; padding: 1px; opacity: 0; transition: opacity 0.45s var(--ease);
  background: conic-gradient(from var(--orbit), rgba(243, 230, 207, 0) 0deg, rgba(243, 230, 207, 0) 250deg, rgba(201, 178, 140, 0.7) 310deg, #fff7ea 345deg, rgba(243, 230, 207, 0) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.btn-cut:hover::after { opacity: 1; animation: orbit 2.4s linear infinite; }
@keyframes orbit { to { --orbit: 360deg; } }
.need .btn-cut::after { background: conic-gradient(from var(--orbit), transparent 0deg, transparent 250deg, rgba(138, 117, 86, 0.6) 310deg, var(--champ-lo) 345deg, transparent 360deg); }

/* the round countdown is a movement, not a label: each digit is a drum that rolls to its next number */
.odo { --h: 1.2em; display: inline-flex; line-height: var(--h); height: var(--h); overflow: hidden; vertical-align: bottom;
  -webkit-mask: linear-gradient(transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(transparent, #000 10%, #000 90%, transparent); font-variant-numeric: tabular-nums; }
.odo .drum { display: flex; flex-direction: column; transition: transform 0.62s cubic-bezier(0.3, 1.35, 0.5, 1); will-change: transform; }
.odo .drum span { height: var(--h); display: block; text-align: center; }
.odo .sep { padding: 0 0.04em; }
.odo .drum.snap { transition: none; }

/* a lens of glass that trails the pointer: it settles on what you can press */
.lens {
  position: fixed; left: 0; top: 0; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; pointer-events: none; z-index: 90;
  -webkit-backdrop-filter: blur(1.5px) saturate(1.7) brightness(1.06); backdrop-filter: blur(1.5px) saturate(1.7) brightness(1.06);
  box-shadow: inset 0 0 0 1px rgba(201, 178, 140, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.9), inset 0 -6px 10px -6px rgba(15, 15, 17, 0.18), 0 6px 18px -8px rgba(15, 15, 17, 0.35);
  opacity: 0; transition: opacity 0.35s var(--ease), width 0.45s var(--spring), height 0.45s var(--spring), margin 0.45s var(--spring), border-radius 0.45s var(--spring);
  will-change: transform;
}
.lens.on { opacity: 1; }
.lens.hot { width: 58px; height: 58px; margin: -29px 0 0 -29px; }
.lens.down { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.glass-lite .lens { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, 0.18); }
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) { .lens { display: none; } }
.tele dd .odo { margin: -0.1em 0; }
