:root { --bg: #ffffff; --card: #f6f8f6; --line: #e3e8e4; --text: #0d130f; --muted: #66706a; --accent: #15803d; --ok: #15803d; --bad: #c62828; --body: #2b332e; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body:not(.is-live) .only-live, body.is-live .only-pledge { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 "Inter Tight", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(21,128,61,.18); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main { max-width: 640px; margin: 0 auto; padding: 0 20px 80px; transition: opacity .2s; }
/* app.js shows the page once it knows the mode, so pledge copy never flashes on the live page; the animation shows it anyway if the script fails. */
main.boot { opacity: 0; animation: unboot 0s 1.5s forwards; }
@keyframes unboot { to { opacity: 1; } }
.acts { display: flex; gap: 8px; } .acts .btn { text-decoration: none; }
.bar { display: flex; justify-content: space-between; align-items: center; max-width: 640px; margin: 0 auto; padding: 18px 20px; }
.mark { color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.mark::after { content: "?"; color: #16a34a; }
h1 { font-size: clamp(36px, 8vw, 56px); line-height: 1.02; letter-spacing: -0.035em; margin: 8px 0 18px; font-weight: 600; text-wrap: balance; }
h2 { font-size: 18px; margin: 0 0 6px; font-weight: 600; }
.hero { padding: 12px 0 28px; }
.eyebrow { color: var(--accent); font-weight: 500; margin: 0; font-size: 14px; }
.lede { color: var(--body); font-size: 18px; margin: 0 0 10px; max-width: 34em; }
.muted { color: var(--muted); margin: 0 0 14px; }
.small { font-size: 13px; }
p a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(21,128,61,.35); text-underline-offset: 3px; }
p a:hover { text-decoration-color: currentColor; }
.clock { margin-top: 22px; display: flex; align-items: baseline; gap: 10px; }
.clock span { font: 500 28px "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; }
.clock small { color: var(--muted); }

/* live hero: one line, the countdown to the next lock, the round in flight */
.is-live h1 { font-size: clamp(30px, 6.4vw, 42px); line-height: 1.08; margin-bottom: 0; }
.lock { margin: 28px 0 0; color: var(--muted); font-size: 14px; }
.lock b { display: block; margin-top: 2px; color: var(--text); font: 500 clamp(56px, 15vw, 80px)/1.05 "JetBrains Mono", monospace; letter-spacing: -0.05em; }
.lock i { font-style: normal; margin: 0 -0.06em; }
.status { margin: 14px 0 0; color: var(--body); }
.status img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; vertical-align: -4px; margin: 0 6px 0 2px; }
#note { margin: 6px 0 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin: 12px 0 36px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
input { display: block; width: 100%; margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: 15px "Inter Tight", sans-serif; padding: 12px 14px; outline: none; transition: border-color .15s; min-width: 0; }
input:focus { border-color: var(--accent); }
.btn { background: var(--accent); color: #fff; border: 0; border-radius: 10px; font: 600 15px "Inter Tight", sans-serif; padding: 12px 18px; cursor: pointer; transition: transform .1s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: rgba(13,19,15,.04); }
#form .btn { width: 100%; margin-top: 4px; }
.msg { min-height: 1.5em; margin: 10px 0 0; font-size: 14px; }
.msg.ok { color: var(--ok); } .msg.bad { color: var(--bad); }
#mineMsg:empty { display: none; }
.warn { font-size: 13px; color: var(--body); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.coin { display: flex; align-items: center; gap: 10px; margin: -4px 0 12px; font-size: 14px; }
.coin img, .board img { width: 28px; height: 28px; border-radius: 50%; background: var(--line); object-fit: cover; flex: none; }
#claimBox { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
#claimBox summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.inline { display: flex; gap: 8px; } .inline input { margin: 0; } .inline .btn { flex: none; }
code { font: 13px "JetBrains Mono", monospace; color: var(--text); }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.board { list-style: none; padding: 0; margin: 8px 0 36px; }
.board li { position: relative; }
.board a, .board .row { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 -10px; border-radius: 6px; color: var(--text); text-decoration: none; transition: background .15s; }
.board a:hover { background: rgba(13,19,15,.04); }
.board a:hover .name { color: var(--accent); }
.board .rank { width: 18px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.board .main { flex: 1; min-width: 0; }
.board .name { font-weight: 600; transition: color .15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board .sub { color: var(--muted); font-size: 13px; }
.board .score { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
.board li.slot .rank { color: var(--accent); }
.board li.low { opacity: .45; }

/* one-line rows: this hour's Bag and earlier rounds */
.bag li > a, .compact a, .compact .row { padding-top: 8px; padding-bottom: 8px; }
.bag .name, .compact .name { flex: 1; min-width: 0; }
.bag .score { min-width: 4.5em; }
.bag.has-more li > a { padding-right: 46px; }
.board li.pick > a { background: rgba(21,128,61,.07); }
.board li.pick > a:hover { background: rgba(21,128,61,.1); }
.compact img { width: 22px; height: 22px; }
.compact .sub { flex: 1; }
.when { flex: none; width: 42px; color: var(--muted); font: 500 13px "JetBrains Mono", monospace; }
.chip { flex: none; font-size: 12px; font-weight: 500; line-height: 20px; padding: 0 7px; border-radius: 6px; background: rgba(13,19,15,.05); color: var(--body); }
.chip.go { background: rgba(21,128,61,.12); color: var(--accent); }

/* ··· menu for secondary links */
.more { position: absolute; right: -4px; top: 50%; transform: translateY(-50%); z-index: 3; } /* the transform makes a stacking context, so the z-index goes here */
.more summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 32px; height: 28px; border-radius: 6px; color: var(--muted); font-weight: 700; user-select: none; transition: background .15s, color .15s; }
.more summary::-webkit-details-marker { display: none; }
.more summary:hover, .more[open] summary { background: rgba(13,19,15,.06); color: var(--text); }
.more .menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 2; min-width: 172px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(13,19,15,.08); }
.more .menu a { display: block; margin: 0; padding: 8px 10px; font-size: 14px; }

/* the check */
.check { padding: 18px 22px; }
.check h2 { margin-bottom: 10px; }
.check p { margin: 4px 0 0; color: var(--body); }
.check p > span { display: inline-block; width: 1.5em; font-weight: 600; }
.check .yes > span { color: var(--accent); }
.check .no > span { color: var(--bad); }
.check .muted { margin-top: 12px; }

.how ol { padding-left: 20px; color: var(--body); } .how li { margin-bottom: 8px; }

/* live page (.cols, not .row: .row is a board row): wider, two columns on desktop (countdown | this hour's Bag, then form | backers, check | your bags, rounds | how) */
html { scroll-behavior: smooth; }
#nominate { scroll-margin-top: 20px; }
.is-live main, .is-live .bar { max-width: 1040px; }
@media (min-width: 860px) {
  .is-live .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; align-items: start; }
  .is-live .cols > * { min-width: 0; }
  .is-live .top { margin-bottom: 20px; }
  .is-live .top .hero { padding-top: 24px; }
  .is-live .top #bagWrap { padding-top: 30px; }
  .is-live .cols > .card { margin-top: 0; }
}
@media (max-width: 560px) {
  .acts { gap: 6px; }
  .acts .btn { padding: 8px 9px; font-size: 13px; white-space: nowrap; }
  .mark { font-size: 18px; }
  .acts:has(#walletBtn.on) #howBtn { display: none; } /* four buttons do not fit a phone: the page links to /how lower down */
  #walletBtn:not(.on) { display: none; } /* the form has its own Connect; the header keeps it only once a wallet is connected */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main { transition: none; }
  .btn:active { transform: none; }
}
@media (max-width: 420px) { #howBtn { display: none; } } /* smallest phones: the wordmark and the page's own links cover these */

/* X link in the top bars: an icon button the height of the other buttons */
.xbtn { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 10px; border: 1px solid var(--line); color: var(--text); transition: background .15s; }
.xbtn:hover { background: rgba(13,19,15,.05); }
@media (max-width: 560px) { .xbtn { width: 36px; height: 36px; } }
