/* CULT v2: the round as a ceremony. Night, Bone and one blue, and the blue only ever means USDC paid to the
   members (plus the button to join). Inter Tight for words, JetBrains Mono for every number. */
:root {
  --night: #0d0e10; --surface: #15171a; --raise: #1c1f23; --line: #24272c;
  --bone: #eceae4; --muted: #8e939c; --dim: #7a7f88;
  --blue: #2775ca; --blue-ink: #4b8fd8; --amber: #e9c46a;
  --sans: "Inter Tight", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --pad: 24px; --head: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--night); scroll-padding-top: calc(var(--head) + 12px); }
body { margin: 0; min-height: 100vh; background: var(--night); color: var(--bone); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
.n, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.blue { color: var(--blue-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 2px; border-radius: 4px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--night); }
.bar { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 28px; padding: 14px var(--pad); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--bone); text-decoration: none; flex: none; }
.hmark { width: 32px; height: 32px; flex: none; }
.word { display: block; height: 15px; width: auto; }
.net { font: 500 12px var(--mono); color: var(--muted); margin-left: -14px; white-space: nowrap; }
.nav { display: flex; gap: 24px; flex: 1; min-width: 0; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.nav a:hover { color: var(--bone); }
.acts { display: flex; align-items: center; gap: 20px; flex: none; }
.xlink { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.xlink:hover { color: var(--bone); }
.xlink svg { flex: none; }
.note { max-width: 1240px; margin: -4px auto 0; padding: 0 var(--pad) 12px; text-align: right; font-size: 14px; color: var(--bone); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 12px 22px; background: var(--surface); color: var(--bone); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s; }
.btn:hover { background: var(--raise); }
.btn.blue { background: var(--blue); color: #fff; }
.btn.blue:hover { background: #1f66b5; }
.btn.small { padding: 8px 14px; font-size: 13.5px; border-radius: 9px; }
.btn.ghost { background: none; color: var(--muted); }
.btn.ghost:hover { background: var(--raise); color: var(--bone); }
.btn:disabled { opacity: .45; cursor: default; }
#walletBtn.has-pfp { padding: 4px 12px 4px 4px; }
.hpfp { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* ---------- the round ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.round { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); column-gap: 56px; align-items: center; min-height: calc(100svh - var(--head)); padding: 20px 0 52px; }
.copy { min-width: 0; }
h1 { margin: 0; font: 700 clamp(32px, 3.05vw, 44px)/1.05 var(--sans); letter-spacing: -.032em; }
h1 span { color: var(--blue); }
.mech { margin: 16px 0 0; color: var(--muted); font-size: 17px; max-width: 29em; text-wrap: pretty; }

.clockrow { margin-top: 38px; }
.clock { font: 500 clamp(72px, 8.4vw, 120px)/.84 var(--mono); letter-spacing: -.05em; font-variant-numeric: tabular-nums; margin-left: -.05em; white-space: nowrap; }
.clock.words { font: 600 clamp(28px, 2.6vw, 36px)/1.15 var(--sans); letter-spacing: -.02em; margin-left: 0; white-space: normal; }
.clock-l { margin-top: 12px; color: var(--muted); }

/* The tally: one ruled line per fact, figures right-aligned in one column like a ledger. */
.tally { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin-top: 24px; border-top: 1px solid var(--line); }
.t { position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.t .n { font: 500 28px/1.1 var(--mono); font-variant-numeric: tabular-nums; text-align: right; padding-right: 18px; white-space: nowrap; }
.t .w { color: var(--muted); text-wrap: pretty; }
.t .w b { color: var(--bone); font-weight: 500; }
.t .w a { color: var(--bone); text-underline-offset: 3px; text-decoration-color: var(--dim); }
.t .w a:hover { text-decoration-color: var(--bone); }
.t.only .n { display: none; }
.t.only .w { grid-column: 1 / -1; color: var(--bone); }
.t.curve::after { content: ""; position: absolute; left: 0; bottom: -1px; width: var(--p, 0%); height: 2px; background: var(--muted); } /* the curve's progress, on its own rule */
.t.fresh .n { animation: fresh 2.4s ease-out; }
@keyframes fresh { 0%, 40% { color: var(--blue-ink); } 100% { color: inherit; } }
.bump { position: absolute; right: 0; top: 14px; font: 500 13px var(--mono); color: var(--blue-ink); opacity: 0; pointer-events: none; }
.bump.show { animation: bump 2.4s ease-out; }
@keyframes bump { 0% { opacity: 0; transform: translateY(6px); } 15% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-4px); } }

.act { margin-top: 26px; display: flex; align-items: center; gap: 16px 20px; flex-wrap: wrap; }
.cta { display: flex; gap: 10px; }
.cta .btn { min-width: 116px; }
.fine { margin: 0; color: var(--muted); font-size: 14px; }
.fine a { color: var(--bone); }

/* The stage: the hooded member, and the congregation seated round it as a second halo. One dot per member. */
.stage { position: relative; margin: 0; }
.ground { position: relative; aspect-ratio: 1.36; }
.stage.empty .ground { aspect-ratio: 2.2; }
.ground canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.figure { position: absolute; left: 50%; bottom: 0; width: 40%; aspect-ratio: 1; transform: translateX(-50%); }
.cap { position: absolute; left: 0; top: 0; width: 12.5em; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* ---------- price ---------- */
.market { border-top: 1px solid var(--line); padding: 26px 0 32px; }
.mhead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 8px; }
.mhead h2 { margin: 0; font: 500 15px var(--sans); color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 12px; }
.price .n { font-size: 24px; font-weight: 500; }
.price sub { font-size: .62em; vertical-align: -.1em; }
.chg { font: 500 13px var(--mono); color: var(--muted); white-space: nowrap; }
.mhead .seg { margin-left: auto; }
.chart { position: relative; height: 150px; outline: none; border-radius: 6px; touch-action: pan-y; }
.chart:focus-visible { box-shadow: 0 0 0 2px var(--line); }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart svg > path:not(.line) { display: none; } /* chart.js lays a gradient fill under the line: not on this page */
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--dim); font: 400 11px var(--mono); }
.chart .line { fill: none; stroke: var(--bone); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.chart .cross { stroke: var(--dim); stroke-width: 1; }
.chart .dot { fill: var(--bone); stroke: var(--night); stroke-width: 2; }
.tip { position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; background: var(--raise); border-radius: 8px; padding: 6px 9px; white-space: nowrap; display: flex; flex-direction: column; gap: 1px; }
.tip b { font: 500 13px var(--mono); }
.tip span { font-size: 11px; color: var(--muted); }

/* plain-word toggles: the one that's on is bone and underlined */
.seg { display: inline-flex; gap: 16px; }
.seg button { background: none; border: 0; padding: 4px 0; color: var(--muted); font-weight: 500; font-size: 13.5px; cursor: pointer; border-bottom: 1.5px solid transparent; }
.seg button:hover { color: var(--bone); }
.seg button[aria-pressed="true"] { color: var(--bone); border-bottom-color: var(--bone); }

/* ---------- the registers ---------- */
.regs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; border-top: 1px solid var(--line); padding: 34px 0 26px; }
.reg { min-width: 0; }
.reghead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.reg h2, .rules h2 { margin: 0; font: 600 21px/1.2 var(--sans); letter-spacing: -.015em; }
.sub { margin: 6px 0 16px; color: var(--muted); font-size: 14px; }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; width: 100%; padding: 9px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; }
.row.plain { grid-template-columns: minmax(0, 1fr) auto; }
button.row, a.row { cursor: pointer; }
button.row:hover .nm, a.row:hover .nm { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--dim); }
.row.you { box-shadow: inset 2px 0 0 var(--blue); padding-left: 8px; }
.rk { font: 400 12px var(--mono); color: var(--dim); text-align: right; }
.who { min-width: 0; display: flex; flex-direction: column; }
.nm { display: flex; align-items: center; gap: 8px; min-width: 0; font: 500 14px var(--mono); white-space: nowrap; }
.nm > span { overflow: hidden; text-overflow: ellipsis; }
.nm.x { font-family: var(--sans); font-weight: 600; }
.pfp { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface); }
.meta { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt { font: 500 14px var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.amt .arr { color: var(--dim); margin-left: 4px; }
.more { margin-top: 10px; background: none; border: 0; padding: 6px 0; color: var(--muted); font-weight: 500; cursor: pointer; }
.more:hover { color: var(--bone); }
.regnote { margin: 10px 0 0; color: var(--dim); font-size: 13px; }

/* ---------- rules + footer ---------- */
.rules { border-top: 1px solid var(--line); padding: 34px 0 44px; }
.rules ol { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: r; columns: 2; column-gap: 56px; }
.rules li { counter-increment: r; break-inside: avoid; display: grid; grid-template-columns: 28px minmax(0, 1fr); padding: 0 0 12px; color: var(--muted); }
.rules li::before { content: counter(r); font: 500 13px/1.7 var(--mono); color: var(--bone); }
.foot { width: min(1192px, calc(100% - 2 * var(--pad))); margin: 0 auto; padding: 24px 0 52px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot p { margin: 0 0 6px; }
.foot .dim { color: var(--dim); }

/* ---------- dialogs ---------- */
.sheet { width: min(420px, calc(100vw - 24px)); max-height: calc(100svh - 24px); overflow: auto; background: var(--surface); color: var(--bone); border: 0; border-radius: 16px; padding: 16px 20px 20px; }
.sheet::backdrop { background: rgba(0, 0, 0, .66); }
.sh-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sh-head .seg button { font-size: 16px; font-weight: 600; }
.x { background: none; border: 0; width: 34px; height: 34px; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 15px; flex: none; }
.x:hover { color: var(--bone); background: var(--raise); }
.dlg-label { display: block; color: var(--muted); font-size: 13px; margin: 18px 0 8px; }
.field { display: flex; align-items: center; gap: 8px; background: var(--night); border-radius: 10px; padding: 2px 14px; box-shadow: inset 0 0 0 1px var(--line); }
.field:focus-within { box-shadow: inset 0 0 0 1px var(--blue-ink); }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font: 500 24px var(--mono); font-variant-numeric: tabular-nums; padding: 10px 0; }
.field span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.chips { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.chips button { background: var(--raise); border: 0; border-radius: 7px; padding: 6px 10px; color: var(--muted); cursor: pointer; font: 500 12.5px var(--mono); }
.chips button:hover { color: var(--bone); }
.quote { margin-top: 14px; min-height: 44px; font-size: 14px; }
.quote .n { font-size: 18px; font-weight: 500; }
.quote .muted { color: var(--muted); }
.quote .impact { color: var(--muted); font-size: 12px; }
.quote .impact.high { color: var(--amber); }
.warn { margin: 12px 0 0; color: var(--amber); font-size: 13.5px; line-height: 1.5; }
.warn b { font-weight: 600; }
.warn.armed { padding-left: 12px; box-shadow: inset 2px 0 0 var(--amber); }
.btn.wide { width: 100%; margin-top: 16px; padding: 14px; }
.msg { margin: 12px 0 0; font-size: 14px; }
.msg-note { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.quote.stale, .warn.stale { opacity: .5; } /* the last quote, while the new amount's is on its way */

.phead { display: flex; align-items: center; gap: 14px; }
.ppfp { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--raise); }
.pname { margin: 0; font: 700 24px/1.15 var(--sans); letter-spacing: -.02em; overflow-wrap: anywhere; }
.pname.addr { font: 500 21px/1.2 var(--mono); letter-spacing: 0; }
.psub { color: var(--muted); font-size: 14px; margin-top: 3px; }
.psub a { color: var(--muted); }
.psub a:hover { color: var(--bone); }
.pstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 18px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pstats .n { font-size: 19px; font-weight: 500; }
.pstats .n.word { font-family: var(--sans); font-size: 17px; color: var(--muted); }
.pstats .l { color: var(--muted); font-size: 12.5px; }
.pactions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pnote { color: var(--muted); font-size: 13px; margin: 0; }
.lead { color: var(--muted); margin: 6px 0 18px; }

/* ---------- phone dock ---------- */
.dock { display: none; }

@media (max-width: 1023px) {
  .round { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 22px 0 40px; }
  .copy { display: contents; }
  h1 { order: 1; } .clockrow { order: 2; } .mech { order: 3; } .stage { order: 4; } .tally { order: 5; } .act { order: 6; }
  .stage { width: min(100%, 620px); margin: 22px auto 0; }
  .clockrow { margin-top: 22px; }
  .regs { grid-template-columns: minmax(0, 1fr); gap: 38px; }
  .rules ol { columns: 1; }
}
/* Below 1101px the nav, the X handle and Connect don't share one row: the nav takes a second row. */
@media (max-width: 1100px) {
  :root { --head: 88px; }
  .bar { flex-wrap: wrap; gap: 6px 14px; padding: 10px var(--pad) 8px; }
  .net { margin-left: -6px; }
  .nav { order: 3; flex-basis: 100%; gap: 20px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 2px; }
  .acts { margin-left: auto; gap: 14px; }
}
@media (max-width: 720px) {
  :root { --pad: 16px; }
  h1 { font-size: clamp(29px, 8.2vw, 34px); }
  .mech { order: 7; font-size: 15px; margin-top: 18px; }
  .stage { margin-top: 16px; }
  .cap { position: static; width: auto; margin-top: 8px; font-size: 12.5px; }
  .clockrow { margin-top: 16px; display: flex; align-items: baseline; gap: 14px; }
  .clock { font-size: clamp(54px, 16vw, 72px); }
  .clock.words + .clock-l { display: none; }
  .clock-l { margin-top: 0; max-width: 7.5em; line-height: 1.3; }
  .tally { margin-top: 16px; }
  .t { padding: 10px 0; }
  .t .n { font-size: 22px; padding-right: 14px; }
  .t .w { font-size: 14px; }
  .cta { display: none; }
  .dock:not([hidden]) { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--night); border-top: 1px solid var(--line); }
  .dock .btn { flex: 1; }
  body { padding-bottom: 80px; }
  .market .mhead .seg { margin-left: 0; }
  .chart { height: 130px; }
}
.bar.tight .xlink span { display: none; } /* set by v2.js only when the handle would push Connect onto a new line */
@media (max-width: 360px) {
  .nav { gap: 14px; }
  .nav a { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
