/* quorum - the floor is the screen. a rail on the left instead of a masthead, no snap, no title block.
   navy ground, one ballot colour for a taken seat, green for a coin that exists, red for refunds.
   Tanker (wordmark, counts, big words) / Switzer (prose, labels, buttons) / Spline Sans Mono (addresses, chain chrome). */

:root {
  --bg: #0d1330; --plate: #0a0f27; --raise: #141b3d; --ink: #ecebe4; --ink2: #a9abb8; --dim: #6c7088; --dim2: #3b4160; --rule: #222a4d;
  --seat: #f2c94c; --seat-d: #5d4d1c; --empty: #1c2450; --live: #57d39a; --fail: #e0584c;
  --disp: "Tanker", "Switzer", system-ui, sans-serif; --sans: "Switzer", system-ui, sans-serif; --mono: "Spline Sans Mono", ui-monospace, Menlo, monospace;
  --rail: 72px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.6; font-variant-numeric: tabular-nums lining-nums; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a.l { color: var(--seat); text-decoration: underline; text-decoration-color: rgba(242,201,76,.35); text-underline-offset: 2px; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.mono { font-family: var(--mono); }
.act { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; border: 0; cursor: pointer; }
.act:hover { background: #fff; }
.act.ghost { background: transparent; color: var(--ink2); border: 1px solid var(--dim2); font-weight: 500; }
.act.ghost:hover { color: var(--ink); border-color: var(--ink2); }
.act[disabled] { opacity: .35; cursor: default; }

/* the rail */
.rail { position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail); border-right: 1px solid var(--rule); background: var(--bg); z-index: 30; display: flex; flex-direction: column; align-items: center; padding: 18px 0; gap: 26px; }
.rail .wm { font-family: var(--disp); font-size: 30px; color: var(--seat); margin-bottom: 10px; }
.rail a:not(.wm) { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); display: flex; align-items: center; gap: 8px; }
.rail a:not(.wm):hover { color: var(--ink); }
.rail a i { font-style: normal; color: var(--dim); }
.rail a.go { color: var(--seat); }
.rail .net { margin-top: auto; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--mono); font-size: 10.5px; color: var(--dim); display: flex; gap: 10px; }
.rail .net b { font-weight: 400; color: var(--ink2); }
.rail .net em { font-style: normal; }

/* the floor: the seat field fills the viewport, text is laid over it */
.floor { position: relative; margin-left: var(--rail); height: 100vh; min-height: 720px; background: var(--plate); overflow: hidden; }
.field { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(20, 1fr); gap: 6px; padding: 6px; }
.field i { display: block; background: var(--empty); transition: background 220ms; }
.field i.on { background: var(--seat); }
.field i.on.me { background: var(--ink); }
.field i.settled { background: var(--live); }
.field i.back { background: var(--fail); }
.over { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; padding: 40px 48px 36px; pointer-events: none; }
.over > * { pointer-events: auto; }
.tl { grid-column: 1; max-width: 720px; }
.tl h1 { font-family: var(--disp); font-weight: 400; font-size: clamp(56px, 6vw, 96px); line-height: 1.02; letter-spacing: .01em; margin: 10px 0 0; text-transform: uppercase; }
.tl h1 span { background: rgba(10,15,39,.92); padding: 0 .14em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tl h1 em { font-style: normal; color: var(--seat); }
.tl .lede { margin-top: 20px; font-size: 16px; color: var(--ink2); max-width: 54ch; background: rgba(10,15,39,.78); padding: 10px 12px; display: inline-block; }
.tl .k { background: rgba(10,15,39,.78); padding: 4px 8px; display: inline-block; }
.bl { grid-column: 1; grid-row: 2; background: rgba(10,15,39,.88); padding: 18px 20px; max-width: 560px; }
.bl .nm { font-family: var(--disp); font-size: 26px; letter-spacing: .03em; line-height: 1.1; }
.bl .nm small { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-left: 8px; letter-spacing: .06em; }
.st { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-top: 4px; }
.st.open { color: var(--seat); } .st.met, .st.live { color: var(--live); } .st.fail { color: var(--fail); }
.count { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.count b { font-family: var(--disp); font-weight: 400; font-size: 72px; line-height: .9; color: var(--seat); }
.count span { font-family: var(--disp); font-size: 26px; color: var(--dim); }
.count em { font-style: normal; margin-left: 12px; font-size: 12px; color: var(--dim); }
.facts { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; font-size: 12.5px; }
.facts div { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--rule); padding: 5px 0; }
.facts span { color: var(--dim); }
.facts b { font-family: var(--mono); font-weight: 400; color: var(--ink2); font-size: 12px; text-align: right; }
.br { grid-column: 2; grid-row: 2; justify-self: end; align-self: end; background: rgba(10,15,39,.88); padding: 18px 20px; width: 420px; display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.pledge { display: flex; gap: 10px; }
.pledge input { width: 140px; height: 36px; border: 1px solid var(--dim2); background: var(--bg); padding: 0 12px; font-family: var(--mono); font-size: 14px; color: var(--ink); outline: none; }
.pledge input:focus { border-color: var(--seat); }
.say { font-size: 12.5px; color: var(--ink2); text-align: right; line-height: 1.55; min-height: 18px; }
.say.err { color: var(--fail); }

/* body */
.body { margin-left: var(--rail); padding: 64px 48px 56px; max-width: 1400px; }
.hd { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.hd h2 { font-family: var(--disp); font-weight: 400; font-size: 32px; letter-spacing: .05em; text-transform: uppercase; margin: 0; }
.hd .r { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--dim); }

/* proposals as rows of seats, not a table */
.prows { display: flex; flex-direction: column; }
.prow { display: grid; grid-template-columns: 56px 1fr 260px 120px 130px 180px; gap: 18px; align-items: center; padding: 16px 0; border-top: 1px solid var(--rule); cursor: pointer; }
.prow:last-child { border-bottom: 1px solid var(--rule); }
.prow:hover { background: rgba(236,235,228,.03); }
.prow .i { font-family: var(--mono); color: var(--dim2); font-size: 11px; }
.prow .nm { font-family: var(--disp); font-size: 22px; letter-spacing: .03em; }
.prow .nm small { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-left: 8px; }
.prow .by { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.mini { display: grid; grid-template-columns: repeat(25, 1fr); gap: 2px; }
.mini i { display: block; aspect-ratio: 1; background: var(--empty); }
.mini i.on { background: var(--seat); } .mini i.set { background: var(--live); } .mini i.back { background: var(--fail); }
.prow .cnt { font-family: var(--disp); font-size: 24px; }
.prow .cnt span { font-size: 14px; color: var(--dim); }
.prow .when { font-family: var(--mono); font-size: 12px; color: var(--ink2); }
.prow .lk { text-align: right; font-size: 12.5px; }
.norows { color: var(--dim); padding: 18px 0; }

/* how: one paragraph with the three words bold */
.how { margin-top: 72px; }
.how .one { font-size: 18px; line-height: 1.6; color: var(--ink2); max-width: 78ch; }
.how .one b { color: var(--ink); font-family: var(--disp); font-weight: 400; font-size: 24px; letter-spacing: .03em; text-transform: uppercase; margin-right: 4px; }

/* notes: footnotes in two columns */
.notes { margin-top: 64px; columns: 2; column-gap: 56px; max-width: 1200px; }
.fn { break-inside: avoid; display: grid; grid-template-columns: 22px 1fr; gap: 10px; margin-bottom: 22px; }
.fn i { font-family: var(--mono); font-style: normal; font-size: 12px; color: var(--seat); padding-top: 3px; }
.fn p { font-size: 13.5px; color: var(--ink2); line-height: 1.6; }
.fn b { color: var(--ink); font-weight: 600; }

.foot { margin-top: 56px; display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: var(--dim); border-top: 1px solid var(--rule); padding-top: 18px; }
.foot a { color: var(--ink2); }
.xl { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.xl .xg { color: var(--seat); }
.rail a.xr { writing-mode: horizontal-tb; transform: none; color: var(--seat); }
.rail a.xr .xg { width: 16px; height: 16px; }
.foot .mono { font-size: 11.5px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 7px 14px; font-size: 12px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 60; }
.toast.on { opacity: 1; }

/* propose sheet: same structure as before, shifted for the rail */
.mast { position: fixed; right: 24px; top: 18px; z-index: 31; border: 0; background: transparent; }
.mast .in { display: flex; gap: 12px; align-items: center; }
.mast nav, .mast .live { display: none; }
.sheet { margin-left: var(--rail); padding: 0 48px; }
.sheet2 { display: grid; grid-template-columns: 1fr 440px; gap: 72px; padding: 48px 0 40px; }
.sheet2 > div:first-child { max-width: 760px; }
.sheet2 h1 { font-family: var(--disp); font-weight: 400; font-size: 34px; letter-spacing: .05em; text-transform: uppercase; margin: 0 0 10px; }
.sheet2 .intro { font-size: 14px; color: var(--ink2); max-width: 62ch; line-height: 1.65; }
.form { margin-top: 28px; }
.f { margin-bottom: 16px; }
.f > .k { display: block; margin-bottom: 7px; }
.f input[type=text], .f input[type=number], .f textarea { width: 100%; height: 36px; border: 0; border-bottom: 1px solid var(--dim2); background: transparent; padding: 0 2px; font: inherit; font-size: 14px; color: var(--ink); outline: none; }
.f textarea { height: 62px; padding: 6px 2px; resize: vertical; line-height: 1.55; }
.f input:focus, .f textarea:focus { border-bottom-color: var(--seat); }
.f input::placeholder, .f textarea::placeholder { color: var(--dim2); }
.f .h { font-size: 11.5px; color: var(--dim); margin-top: 6px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.trio { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.pick { border: 1px dashed var(--dim2); padding: 13px; text-align: center; color: var(--dim); font-size: 12.5px; cursor: pointer; }
.pick.has { border-style: solid; border-color: var(--rule); color: var(--ink2); }
.pick img { max-height: 80px; display: block; margin: 0 auto 7px; }
.go { margin-top: 28px; }
.go .act { width: 100%; justify-content: space-between; height: 46px; padding: 0 18px; font-size: 13px; }
.go .act .c { font-weight: 400; opacity: .6; letter-spacing: 0; text-transform: none; }
.status { font-size: 12.5px; color: var(--ink2); margin-top: 12px; min-height: 18px; }
.status.err { color: var(--fail); }
.receipt { margin-top: 20px; border-top: 1px solid var(--rule); padding-top: 14px; }
.receipt .f2 { display: grid; grid-template-columns: 88px 1fr; gap: 5px 12px; font-size: 12px; }
.receipt .f2 .k2 { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding-top: 2px; }
.receipt .f2 .v2 { word-break: break-all; color: var(--ink2); }
.aside { position: sticky; top: 40px; align-self: start; }
.aside .t { font-family: var(--disp); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.aside .big { font-family: var(--disp); font-size: 64px; color: var(--seat); line-height: 1; }
.aside .cap2 { font-size: 12.5px; color: var(--dim); margin-top: 8px; line-height: 1.6; }
.aside .rows { margin-top: 20px; border-top: 1px solid var(--rule); }
.aside .rows .r { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 12.5px; }
.aside .rows .r span:first-child { color: var(--dim); }
.aside .rows .r span:last-child { color: var(--ink2); font-family: var(--mono); font-size: 12px; }
.wallet { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin-bottom: 14px; }
.wallet em { font-style: normal; color: var(--ink2); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
