/* Qubit. A calm night sky, pearl type, square-cut panels of dark glass. Cool light: cyan, ice and violet.
   Layout: one column of content over a fixed canvas; panels are the only boxes. */
@font-face { font-family: "Syncopate"; src: url("/fonts/syncopate-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Syncopate"; src: url("/fonts/syncopate-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
:root {
  --night: #03040c; --glass: rgba(9, 13, 36, .66); --glass-2: rgba(14, 20, 52, .78); --line: rgba(150, 195, 255, .17); --line-2: rgba(150, 215, 255, .38);
  --ink: #eaf2ff; --soft: #9aa8cf; --cyan: #7ff3e8; --ice: #cfe9ff; --violet: #a9a2ff; --rose: #ff9ad8; --bad: #ff8fa0; --good: #7ff3c0;
  --display: "Syncopate", "Avenir Next", "Segoe UI", system-ui, sans-serif; --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gut: clamp(16px, 4vw, 44px); --wide: 1120px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* (no background on body: the night is html's. A background here would be painted over the sky's canvas behind it.) */
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--ink); font: 16px/1.55 var(--body); overflow-x: hidden; }
/* the sky: the canvas when WebGL runs, a still gradient when it doesn't */
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background: radial-gradient(60% 50% at 22% 30%, rgba(20, 110, 150, .30), transparent 70%), radial-gradient(55% 50% at 78% 62%, rgba(70, 60, 200, .30), transparent 72%), var(--night); }
#sky { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.sky-on #sky { opacity: 1; }
a { color: var(--ice); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
h1, h2, h3, legend, .kicker, .brand b, nav a, .btn, .chip, dt, th, .tag { font-family: var(--display); text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.45rem, 1rem + 2.6vw, 2.9rem); line-height: 1.12; letter-spacing: .04em; font-weight: 700; text-wrap: balance;
  background: linear-gradient(176deg, #fff 10%, #e6f4ff 45%, #a9dcff 72%, #9a98ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { margin: 0 0 .7em; font-size: .86rem; letter-spacing: .2em; font-weight: 700; color: var(--ice); }
h3 { margin: 1.6em 0 .6em; font-size: .74rem; letter-spacing: .2em; font-weight: 700; color: var(--cyan); }
p { margin: 0 0 1em; }
.muted { color: var(--soft); }
.small { font-size: .87rem; }
.mono { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }
.grow { flex: 1; }
[hidden] { display: none !important; }

/* ---- the bar ---- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: clamp(12px, 2.4vw, 30px); min-height: 62px; padding: 8px var(--gut); background: linear-gradient(rgba(3, 4, 12, .88), rgba(3, 4, 12, .62)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { display: block; }
.brand b { font-size: .98rem; letter-spacing: .3em; font-weight: 700; }
nav { display: flex; gap: clamp(10px, 1.9vw, 26px); flex: 1; }
nav a { font-size: .66rem; letter-spacing: .2em; font-weight: 700; color: var(--soft); text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; }
nav a:hover { color: var(--ink); }
nav a[aria-current] { color: var(--cyan); border-bottom-color: var(--cyan); }
.top-right { position: relative; display: flex; align-items: center; gap: 10px; }
.id-dot { width: 9px; height: 9px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.btn.burger { display: none; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; display: flex; flex-direction: column; background: var(--glass-2); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.menu-title { padding: 12px 14px 8px; font-family: var(--display); text-transform: uppercase; font-size: .58rem; letter-spacing: .2em; color: var(--cyan); border-bottom: 1px solid var(--line); }
.row-btn { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.row-btn:last-child { border-bottom: 0; }
.row-btn:hover { background: rgba(140, 200, 255, .09); }

/* ---- buttons, chips, fields ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: 1px solid transparent; background: linear-gradient(176deg, #fff, #d7ecff 55%, #b9c6ff); color: #050818; font-size: .7rem; letter-spacing: .2em; font-weight: 700; text-decoration: none; cursor: pointer; transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.08); color: #050818; }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: rgba(160, 180, 220, .16); color: var(--soft); cursor: not-allowed; filter: none; }
.btn-line { background: rgba(10, 14, 40, .5); color: var(--ink); border-color: var(--line-2); }
.btn-line:hover { color: #fff; background: rgba(140, 200, 255, .10); filter: none; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .62rem; }
.btn-wide { width: 100%; }
.link { background: none; border: 0; padding: 0; margin-left: 12px; color: var(--cyan); font: inherit; font-size: .86rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link.lock { display: block; margin: 22px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 14px; background: rgba(10, 14, 40, .5); border: 1px solid var(--line); color: var(--soft); font-size: .6rem; letter-spacing: .18em; font-weight: 700; cursor: pointer; }
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip[aria-selected="true"] { color: #050818; background: var(--ice); border-color: var(--ice); }
input, textarea, .select { width: 100%; min-height: 46px; padding: 11px 13px; background: rgba(3, 5, 18, .7); border: 1px solid var(--line); color: var(--ink); font: 15px/1.4 var(--body); border-radius: 0; }
input[type="file"] { padding: 9px; }
input[type="radio"], input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; padding: 0; margin: 3px 0 0; accent-color: var(--cyan); flex: none; }
input:focus, textarea:focus, .select:focus { outline: none; border-color: var(--cyan); }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; width: auto; min-width: 150px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span { font-family: var(--display); text-transform: uppercase; font-size: .6rem; letter-spacing: .2em; color: var(--soft); }
.field small, fieldset small { color: var(--soft); font-size: .84rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pick { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick.off { opacity: .55; cursor: default; }
.pick b { font-family: var(--display); text-transform: uppercase; font-size: .68rem; letter-spacing: .16em; color: var(--ice); }
fieldset { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
legend { padding: 0; margin-bottom: 12px; font-size: .74rem; letter-spacing: .2em; font-weight: 700; color: var(--cyan); }
.inline { display: flex; gap: 10px; margin-bottom: 20px; }
.form.locked fieldset, .form.locked #terms { opacity: .4; pointer-events: none; }

/* ---- the page ---- */
main { flex: 1; width: 100%; max-width: calc(var(--wide) + 2*var(--gut)); margin: 0 auto; padding: clamp(26px, 5vw, 56px) var(--gut) 70px; display: flex; flex-direction: column; gap: clamp(22px, 3vw, 34px); }
.panel { background: var(--glass); border: 1px solid var(--line); padding: clamp(18px, 2.6vw, 30px); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
.narrow { max-width: 640px; }
.page-head { max-width: 760px; }
.lede { margin-top: 14px; font-size: clamp(1rem, .95rem + .3vw, 1.14rem); color: #c8d6f6; max-width: 62ch; }
.kicker { margin: 0 0 16px; font-size: .64rem; letter-spacing: .32em; color: var(--cyan); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.note { margin: 16px 0 0; padding: 12px 14px; border-left: 2px solid var(--cyan); background: rgba(60, 200, 220, .07); font-size: .93rem; }
.note.bad { border-left-color: var(--bad); background: rgba(255, 120, 150, .08); color: #ffd2da; }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(18px, 2.4vw, 30px); align-items: start; }
.split.even { grid-template-columns: 1fr 1fr; }

.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: center; min-height: min(62vh, 560px); }
.hero h1 { font-size: clamp(1.5rem, .9rem + 2.3vw, 2.65rem); }
.hero-mark { aspect-ratio: 1; width: 100%; max-width: 480px; justify-self: center; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 34px 0 0; }
.facts dt { font-size: .56rem; letter-spacing: .22em; color: var(--soft); }
.facts dd { margin: 4px 0 0; font-family: var(--mono); color: var(--ice); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.trio p { margin: 0; color: #c2d0f0; font-size: .96rem; }
.soon { margin: 0; padding: 14px 18px; border: 1px dashed var(--line-2); color: #c2d0f0; font-size: .94rem; background: rgba(8, 12, 34, .45); }
.soon b { font-family: var(--display); text-transform: uppercase; font-size: .62rem; letter-spacing: .22em; color: var(--violet); margin-right: 8px; }

.board-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.board-head h2 { margin: 0; }
.board .chips { margin-bottom: 16px; }
.coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.coins.compact { margin-top: 16px; }
.coin { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--glass); border: 1px solid var(--line); color: var(--ink); text-decoration: none; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); min-width: 0; }
a.coin:hover { border-color: var(--line-2); background: var(--glass-2); color: var(--ink); }
.coin-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.coin-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: .9rem; white-space: nowrap; }
.logo { display: inline-grid; place-items: center; flex: none; background: linear-gradient(150deg, #16204e, #0a0e2a); border: 1px solid var(--line-2); color: var(--ice); font-family: var(--display); font-weight: 700; letter-spacing: .06em; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo.seal { color: var(--violet); border-style: dashed; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.tag { padding: 3px 7px; border: 1px solid var(--line-2); font-size: .5rem; letter-spacing: .18em; font-weight: 700; color: var(--soft); }
.tag.q { color: var(--cyan); border-color: rgba(127, 243, 232, .5); } .tag.war { color: var(--rose); border-color: rgba(255, 154, 216, .5); } .tag.r { color: var(--good); border-color: rgba(127, 243, 192, .5); } .tag.s { color: var(--violet); border-color: rgba(169, 162, 255, .5); }
.empty { grid-column: 1 / -1; margin: 0; padding: 34px 18px; text-align: center; color: var(--soft); border: 1px dashed var(--line); }

.rows { margin: 0; display: grid; gap: 0; }
.rows > div { display: grid; grid-template-columns: minmax(110px, 190px) minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rows > div:last-child { border-bottom: 0; }
.rows dt { font-size: .58rem; letter-spacing: .2em; color: var(--soft); padding-top: 4px; }
.rows dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.meter { display: inline-block; vertical-align: middle; width: 120px; height: 6px; margin-left: 12px; background: rgba(150, 195, 255, .15); }
.meter.big { display: block; width: 100%; margin: 14px 0 0; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width .15s linear; }
.steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.steps li { position: relative; padding-left: 26px; color: var(--soft); font-size: .93rem; }
.steps li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 9px; border: 1px solid var(--soft); }
.steps li.now { color: var(--ink); } .steps li.now::before { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.steps li.done { color: #c2d0f0; } .steps li.done::before { border-color: var(--good); background: var(--good); }
.steps li.bad { color: #ffd2da; } .steps li.bad::before { border-color: var(--bad); background: var(--bad); }
.steps li[data-note]::after { content: " · " attr(data-note); color: var(--soft); }
.preview { display: flex; gap: 16px; align-items: flex-start; position: sticky; top: 84px; }
.preview p { margin: 6px 0 0; }

.coin-head { display: flex; gap: clamp(16px, 3vw, 30px); align-items: flex-start; }
.coin-head h1 span { -webkit-text-fill-color: var(--soft); font-size: .5em; letter-spacing: .1em; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stats .panel { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
.stats b { font-family: var(--mono); font-size: 1.15rem; color: var(--ice); }
.checks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; flex-direction: column; gap: 2px; padding-left: 30px; position: relative; }
.checks li::before { position: absolute; left: 0; top: 0; width: 20px; height: 20px; display: grid; place-items: center; font: 700 12px var(--mono); }
.checks li.ok::before { content: "✓"; color: #05130e; background: var(--good); } .checks li.no::before { content: "×"; color: #1a0508; background: var(--bad); }
.verdict { margin: 18px 0 0; padding: 14px 16px; font-family: var(--display); text-transform: uppercase; font-size: .68rem; letter-spacing: .14em; line-height: 1.7; }
.verdict.ok { border: 1px solid var(--good); color: var(--good); } .verdict.no { border: 1px solid var(--bad); color: var(--bad); }
#coin-verify { margin-top: 20px; }

main > *, .docs > *, .split > * { min-width: 0; }   /* a wide table or a line of code scrolls inside its own box and never widens the page */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(20px, 4vw, 50px); align-items: start; }
.toc { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 9px; padding: 0; background: none; border: 0; }
.toc a { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: .9rem; font-weight: 400; padding: 0; border: 0; color: var(--soft); }
.doc { max-width: 70ch; padding: 0 0 34px; margin: 0 0 34px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.doc h2 { font-size: .96rem; }
.doc li { margin-bottom: .5em; }
pre { margin: 0 0 1em; padding: 14px 16px; background: rgba(3, 5, 18, .72); border: 1px solid var(--line); overflow-x: auto; font-size: .82rem; line-height: 1.6; color: var(--ice); }
.scroll { overflow-x: auto; margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .56rem; letter-spacing: .2em; color: var(--soft); }

.foot { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; padding: 22px var(--gut) calc(22px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--soft); font-size: .86rem; background: rgba(3, 4, 12, .6); }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--soft); }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 40; transform: translate(-50%, 20px); max-width: min(92vw, 560px); padding: 13px 18px; background: var(--glass-2); border: 1px solid var(--cyan); color: var(--ink); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: var(--bad); }

/* ---- Montra's part of the page wears Montra's own colours: black and bone ---- */
:root { --bone: #ebe5d5; }
.built { display: none; align-items: center; gap: .5em; padding-left: clamp(12px, 1.6vw, 20px); border-left: 1px solid var(--line-2); font-family: var(--display); text-transform: uppercase; font-size: .56rem; letter-spacing: .22em; font-weight: 700; color: var(--soft); text-decoration: none; white-space: nowrap; }
.built b { color: var(--bone); }
.built:hover { color: var(--ink); }
nav a { white-space: nowrap; }
nav a.nav-montra { color: var(--bone); }
@media (min-width: 1181px) { .built { display: inline-flex; } nav a.nav-montra { display: none; } }
.montra { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); padding: clamp(20px, 3vw, 36px); background: rgba(5, 5, 5, .86); border: 1px solid rgba(235, 229, 213, .34); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
.montra-mark { margin: 0 0 14px; font-family: var(--display); text-transform: uppercase; font-size: .62rem; letter-spacing: .3em; font-weight: 700; color: var(--bone); }
.montra h2 { margin: 0 0 .6em; font-size: clamp(1.02rem, .86rem + .9vw, 1.5rem); letter-spacing: .08em; line-height: 1.22; color: #fff; text-wrap: balance; }
.montra-say p { margin: 0; color: #cfcabb; max-width: 52ch; }
.montra-steps { list-style: none; margin: 0; padding: 0; display: grid; align-content: center; counter-reset: step; }
.montra-steps li { counter-increment: step; display: grid; grid-template-columns: 1.6em minmax(0, 1fr); gap: 3px 12px; padding: 14px 0; border-top: 1px solid rgba(235, 229, 213, .16); }
.montra-steps li:first-child { border-top: 0; padding-top: 0; }
.montra-steps li::before { content: counter(step); grid-row: span 2; font-family: var(--mono); color: var(--bone); }
.montra-steps b { font-family: var(--display); text-transform: uppercase; font-size: .7rem; letter-spacing: .2em; color: #fff; }
.montra-steps span { color: #b9b4a6; font-size: .94rem; }
.montra-live { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px 44px; margin: 0; padding-top: 18px; border-top: 1px solid rgba(235, 229, 213, .16); }
.montra-live dt { font-size: .56rem; letter-spacing: .22em; color: #9b968a; }
.montra-live dd { margin: 4px 0 0; font-family: var(--mono); font-size: 1.15rem; color: var(--bone); font-variant-numeric: tabular-nums; }
.btn.btn-bone { background: var(--bone); color: #0a0a0a; }
.btn.btn-bone:hover { color: #0a0a0a; }
.kicker.bone, .tag.m { color: var(--bone); }
.tag.m { border-color: rgba(235, 229, 213, .5); }
@media (max-width: 900px) { .montra { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-mark { order: -1; max-width: 300px; }
  .trio, .split, .split.even, .docs { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  .preview { position: static; }
  .stats { grid-template-columns: 1fr 1fr; }
  .btn.burger { display: inline-flex; }
  nav { position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column; gap: 0; padding: 6px var(--gut) 14px; background: rgba(3, 4, 12, .96); border-bottom: 1px solid var(--line); }
  .nav-open nav { display: flex; }
  nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .7rem; }
}
@media (max-width: 560px) {
  .two { grid-template-columns: 1fr; }
  .rows > div { grid-template-columns: 1fr; gap: 2px; }
  .coin-head { flex-direction: column; }
  .brand b { font-size: .84rem; letter-spacing: .22em; }
  .inline { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
