/* Qloat · the galaxy, the treasury crown, the Falcon key, on top of Float's own tokens (app.css) */
:root { --sky: #01040c; --ice: #cfe0ff; --blue2: #6aa6ff; --warm: #ffcf96; }
body { background: var(--bg); }
/* a fixed sky behind every page: its own composited layer, painted once */
.qsky { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url(/assets/sky.webp) center / cover no-repeat; opacity: .5; transform: translateZ(0); }
body.on-home .qsky { opacity: .62; }
.hdr { z-index: 25; }
body.on-home .hdr { position: absolute; left: 0; right: 0; }
.brand span { letter-spacing: .14em; font-weight: 700; }

/* ---------------------------------------------------------------- hero: the Q-ring galaxy */
.qh { position: relative; height: clamp(680px, 100svh, 1100px); overflow: hidden; background: radial-gradient(60% 55% at 50% 40%, #071533 0%, #030a1d 52%, var(--sky) 100%); }
.gx { position: absolute; inset: 0; }
.gx canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease; }
.gx.live canvas { opacity: 1; }
.gx.nogl canvas { display: none; }
.qh::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; pointer-events: none; background: linear-gradient(rgba(1, 4, 12, 0), rgba(1, 4, 12, .62) 46%, var(--bg)); z-index: 1; }
.qcopy { position: absolute; z-index: 2; left: 50%; bottom: clamp(6rem, 10.5vh, 7.6rem); transform: translateX(-50%); width: min(860px, calc(100% - 2.5rem)); text-align: center; pointer-events: none; }
.qcopy a, .qcopy button { pointer-events: auto; }
.qh1 { margin: 0; font-size: clamp(2.4rem, 5.6vw, 4.5rem); line-height: .98; font-weight: 700; letter-spacing: -.048em; text-wrap: balance; color: #f4f7ff; }
.qsub { margin: 1rem auto 0; max-width: 37rem; color: #a7b5d4; font-size: 1rem; line-height: 1.55; text-wrap: pretty; }
.qbtns { display: flex; gap: .7rem; justify-content: center; margin-top: 1.7rem; flex-wrap: wrap; }
.qbtns .cta { margin: 0; width: auto; min-width: 13.5rem; box-shadow: 0 10px 40px -12px rgba(61, 139, 255, .7); }
.qbtns .btn2 { min-width: 10rem; background: rgba(5, 15, 34, .55); }
.qbuilt { position: absolute; z-index: 2; right: 1.5rem; bottom: 1.6rem; display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--faint); }
.qbuilt img { width: 18px; height: 18px; border-radius: 5px; }
.qbuilt b { color: var(--muted); font-weight: 700; }
.qh .hcue { position: absolute; z-index: 2; left: 1.5rem; bottom: 1.6rem; font: 600 .7rem var(--mono); color: var(--faint); letter-spacing: .04em; }
#hero-pill { margin-top: 1rem; display: flex; justify-content: center; }
#hero-pill:empty { display: none; }

/* ---------------------------------------------------------------- shared section bits */
.qs { max-width: 1160px; margin: 0 auto; padding: 6.5rem 1.25rem 0; }
.qs h2 { margin: 0; font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.04; letter-spacing: -.04em; font-weight: 700; text-wrap: balance; }
.qs .qp { margin: 1.1rem 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.62; max-width: 36rem; text-wrap: pretty; }
.qs .qp b { color: var(--text); font-weight: 600; }
.qs .qp + .qp { margin-top: .8rem; }
.qn { display: block; font: 600 .74rem var(--mono); color: var(--blue2); letter-spacing: .06em; margin-bottom: 1rem; }
.qsrc { margin-top: 1.1rem; font-size: .74rem; color: var(--faint); line-height: 1.5; }
.qsrc a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(141, 156, 186, .35); text-underline-offset: 2px; }

/* 01 · threat */
.qthreat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 3.5rem; align-items: center; }
.qbars { padding: 1.6rem 1.6rem 1.3rem; background: radial-gradient(120% 90% at 100% 0%, rgba(61, 139, 255, .12), transparent 60%), var(--card); }
.qbars h3 { margin: 0; font-size: .95rem; font-weight: 600; color: var(--text); }
.qbars h3 small { display: block; margin-top: .25rem; font-weight: 500; font-size: .8rem; color: var(--faint); }
.qb { margin-top: 1.4rem; }
.qb .lab { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.qb .lab span { font-size: .82rem; color: var(--muted); }
.qb .lab b { font: 700 clamp(1.5rem, 3.6vw, 2.25rem) var(--font); letter-spacing: -.04em; color: var(--text); white-space: nowrap; }
.qb .lab b small { font-size: .5em; color: var(--muted); font-weight: 600; letter-spacing: -.01em; margin-left: .2rem; }
.qb .bar { position: relative; height: 10px; margin-top: .55rem; border-radius: 999px; background: var(--surface); overflow: hidden; border: 1px solid var(--border); }
.qb .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, #1f4fa8, var(--accent)); transition: width 1.6s cubic-bezier(.2, .7, .1, 1); }
.qb.now .bar i { background: linear-gradient(90deg, #3d8bff, #cfe0ff); }
.qb .qwho { margin-top: .4rem; font-size: .72rem; color: var(--faint); }
.qbars.in .qb .bar i { width: var(--w); }
.qb.now .lab span { color: var(--text); }
.qedge { display: flex; gap: .9rem; align-items: flex-start; margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border); font-size: .84rem; color: var(--muted); line-height: 1.55; }
.qedge .sol { width: 30px; height: 30px; border-radius: 50%; flex: none; }

/* 02 · treasury crown */
.qtreas { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0; margin-top: 2.6rem; overflow: hidden; padding: 0; }
.crown { position: relative; min-height: 520px; background: radial-gradient(80% 70% at 50% 45%, #0a1a3d 0%, #040b1c 70%); }
.crown canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.crown .cap { position: absolute; left: 1.1rem; top: 1rem; right: 1.1rem; display: flex; justify-content: space-between; font: 600 .7rem var(--mono); color: var(--faint); letter-spacing: .04em; pointer-events: none; }
.crown .cap b { color: var(--muted); font-weight: 600; }
.qcon { padding: 1.8rem 1.8rem 1.6rem; display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.qcon h3 { margin: 0; font-size: 1.15rem; letter-spacing: -.02em; }
.qcon > p { margin: .5rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.qlog { margin-top: 1.2rem; display: flex; flex-direction: column; gap: .1rem; font: 500 .78rem/1.5 var(--mono); }
.qlog div { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: .8rem; padding: .5rem 0; border-bottom: 1px solid rgba(22, 41, 74, .7); opacity: .38; transition: opacity .4s; }
.qlog div.on { opacity: 1; }
.qlog span { color: var(--faint); }
.qlog b { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.qlog b em { font-style: normal; color: var(--blue2); }
.qlog .ok b { color: var(--good); }
.qrun { margin-top: auto; padding-top: 1.3rem; display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.qrun .cta { margin: 0; width: auto; min-width: 12rem; }
.qrun small { color: var(--faint); font-size: .76rem; }
.qpol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 2.6rem; }
.qpol div { border-top: 1px solid var(--border-strong); padding-top: 1rem; }
.qpol b { display: block; font-size: 1rem; letter-spacing: -.01em; }
.qpol p { margin: .45rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }

/* 03 · Falcon key */
.qkey { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.kv { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; justify-self: center; }
.kv canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.kv .kc { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.kv .kc img { width: 15%; opacity: .95; filter: drop-shadow(0 0 18px rgba(61, 139, 255, .5)); }
.kfacts { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; margin-top: 1.5rem; font-size: .84rem; color: var(--muted); }
.kfacts b { color: var(--text); font: 700 .95rem var(--mono); }
.kfp { margin-top: 1.2rem; font: 500 .78rem var(--mono); color: var(--faint); overflow-wrap: anywhere; min-height: 2.4em; }
.kfp b { color: var(--blue2); font-weight: 600; }
.kbtns { display: flex; gap: .7rem; margin-top: 1.4rem; flex-wrap: wrap; align-items: center; }
.kbtns .cta { margin: 0; width: auto; min-width: 12rem; }

/* 04 · launch on Float */
.qlaunch { margin-top: 2.4rem; padding: 1.6rem; }
.qlaunch .sbar { height: 64px; }
.sbar .s-c { flex: 5; background: linear-gradient(180deg, #5aa0ff, #2f6fe0); box-shadow: 0 0 34px -4px var(--accent); }
.qlaunch .skey .hl b { color: var(--blue2); }
.mstrip { position: relative; margin-top: 1.6rem; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mstrip .row { display: flex; gap: .55rem; width: max-content; animation: drift 60s linear infinite; }
.mstrip .row.r2 { animation-duration: 75s; animation-direction: reverse; margin-top: .55rem; }
.mstrip .mk { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .75rem .4rem .45rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font: 700 .76rem var(--mono); color: var(--muted); white-space: nowrap; }
.mstrip .mk img { width: 22px; height: 22px; border-radius: 50%; }
@keyframes drift { to { transform: translateX(-50%); } }
.qlaunch .foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.qlaunch .foot p { margin: 0; color: var(--muted); font-size: .86rem; max-width: 34rem; }
.qlaunch .foot .cta { margin: 0; width: auto; min-width: 12rem; }

/* 06 · rules */
.qrules { list-style: none; margin: 2.2rem 0 0; padding: 0; counter-reset: r; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.qrules li { counter-increment: r; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: .8rem; padding: 1.15rem 0; border-top: 1px solid var(--border); font-size: .95rem; color: var(--muted); line-height: 1.55; }
.qrules li::before { content: counter(r, decimal-leading-zero); font: 600 .82rem var(--mono); color: var(--blue2); padding-top: .15rem; }
.qrules li b { color: var(--text); font-weight: 600; }
.qmore { display: inline-flex; margin-top: 1.8rem; }

/* create: treasury policy + creator key */
.pol { margin-top: .9rem; }
.pol .ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-bottom: .55rem; }
.pol .ends b { color: var(--text); font: 700 .95rem var(--mono); }
.polbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin-top: .7rem; gap: 2px; }
.polbar i { display: block; height: 100%; transition: flex-grow .3s ease; }
.polbar .b { background: var(--accent); }
.polbar .r { background: #22406f; }
.keyc { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 1rem; align-items: center; margin-top: .9rem; padding: .8rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.keyc canvas { width: 74px; height: 74px; display: block; }
.keyc b { display: block; font-size: .9rem; }
.keyc small { display: block; color: var(--faint); font: 500 .72rem var(--mono); overflow-wrap: anywhere; margin-top: .2rem; }
.keyc .kst { margin-top: .35rem; font-size: .76rem; color: var(--muted); }
.keyc .kst.ok { color: var(--good); }
.keyrow { display: flex; gap: .5rem; margin-top: .7rem; flex-wrap: wrap; }
.chk { display: flex; gap: .6rem; align-items: flex-start; margin-top: .8rem; font-size: .82rem; color: var(--muted); cursor: pointer; }
.chk input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-strong); background: var(--surface); flex: none; margin-top: 1px; display: grid; place-items: center; cursor: pointer; }
.chk input:checked { background: var(--accent); border-color: var(--accent); }
.chk input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }

/* coin page: the treasury card */
.qtc .vrow { display: flex; align-items: center; gap: .6rem; margin-top: .9rem; padding: .7rem .8rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: .84rem; }
.qtc .vrow.ok { border-color: rgba(110, 231, 160, .35); }
.qtc .vrow.ok b { color: var(--good); }
.qtc .vrow.bad b { color: var(--bad); }
.qtc .vrow small { margin-left: auto; color: var(--faint); font: 500 .72rem var(--mono); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.vrow.ok .dot { background: var(--good); box-shadow: 0 0 8px var(--good); }
.vrow.bad .dot { background: var(--bad); }
.cc .pol-mini { display: flex; align-items: center; gap: .35rem; margin-left: auto; font: 700 .7rem var(--mono); color: var(--muted); white-space: nowrap; }
.cc .pol-mini i { width: 34px; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--accent) var(--b), #22406f var(--b)); display: block; }
.cc .qrow { display: flex; align-items: center; gap: .5rem; margin-top: .75rem; font-size: .74rem; color: var(--faint); }
.cc .qrow b { color: var(--muted); font-family: var(--mono); font-weight: 600; }

/* protocol doc */
.spec { margin: 1rem 0 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.spec div { display: grid; grid-template-columns: minmax(9rem, .8fr) minmax(0, 1.6fr); gap: 1rem; padding: .65rem .9rem; font-size: .84rem; border-top: 1px solid var(--border); }
.spec div:first-child { border-top: 0; }
.spec span { color: var(--muted); }
.spec code { font: 500 .8rem var(--mono); color: var(--text); overflow-wrap: anywhere; }
.doc pre { margin: 1rem 0 0; padding: 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font: 500 .78rem/1.6 var(--mono); color: #c3d1ee; overflow-x: auto; white-space: pre; }
.doc h3 { margin: 1.6rem 0 .4rem; font-size: 1.02rem; letter-spacing: -.01em; }
.doc .refs li { font-size: .84rem; }
.doc a.l { color: var(--accent); }

/* responsive */
@media (max-width: 980px) {
  .qthreat, .qkey { grid-template-columns: 1fr; gap: 2.2rem; }
  .qtreas { grid-template-columns: 1fr; }
  .qcon { border-left: 0; border-top: 1px solid var(--border); }
  .crown { min-height: 420px; }
  .qpol { grid-template-columns: 1fr; gap: 1.2rem; }
  .qrules { grid-template-columns: 1fr; }
  .kv { max-width: 420px; }
}
@media (max-width: 640px) {
  .qh { height: max(700px, 100svh); }
  .qcopy { bottom: 6.6rem; }
  .qsub { font-size: .95rem; }
  .qbtns .cta, .qbtns .btn2 { min-width: 0; flex: 1 1 100%; }
  .qbuilt { right: 50%; transform: translateX(50%); bottom: 5.3rem; display: none; }
  .qh .hcue { display: none; }
  .qs { padding-top: 4.6rem; }
  .qbars, .qcon, .qlaunch { padding: 1.2rem; }
  .crown { min-height: 360px; }
  .qlog div { grid-template-columns: 5.4rem minmax(0, 1fr); gap: .6rem; }
  .spec div { grid-template-columns: 1fr; gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) { .mstrip .row { animation: none; } }
/* app.css's send-page rule `.fld label {display:block}` must not flatten the image drop box */
.fld label.upbox { display: flex; font-size: inherit; color: inherit; font-weight: inherit; }
.fld label.upbox b { color: var(--text); }
.page .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .page .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* a fixed dock over a moving WebGL sky: solid fill instead of backdrop blur (no repaint per frame) */
.dock-in { background: rgba(5, 15, 34, .94); backdrop-filter: none; -webkit-backdrop-filter: none; }
