/* MISSION369
   Built to sit next to systemisbroken.xyz, not next to a generic crypto dashboard.
   Their identity: pure black, zinc cards, one saturated gold carrying every important
   number, heavy tight caps with a bloom on the wordmark, Inter + JetBrains Mono.
   This page borrows that family resemblance and keeps one idea of its own: the pot is
   both the headline and the thing that answers you when you reveal.

   Two accents, one job each, never mixed:
     --gold    the pot, and any live number the protocol is moving
     --ember   you acting, and anything irreversible (commit, burn) */

:root {
  --black:    #000000;
  --card:     #18181B;
  --card-2:   #101012;
  --line:     #27272A;
  --line-lit: #3F3F46;
  --text:     #FAFAFA;
  --dim:      #A1A1AA;
  --dimmer:   #71717A;

  --gold:     #F5B01A;
  --gold-lit: #FFC53D;
  --ember:    #F97316;

  --ui: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(1rem, 4vw, 1.5rem);
  --measure: 44rem;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--ui);
  font-size: 0.9375rem;
  line-height: 1.5;
  min-height: 100svh;
}

main { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter) 2rem; }

/* ---------- masthead ---------- */

.bar {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.75rem var(--gutter) 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;          /* at 320px the wordmark and the button will not share a line */
}

.wordmark {
  font-family: var(--ui);
  font-size: clamp(1.5rem, 8vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 28px rgba(245, 176, 26, 0.45);
}

.wordmark-num { color: var(--gold-lit); }

.tagline {
  margin: 0.5rem 0 0;
  font-family: var(--ui);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--dim);
  text-transform: uppercase;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0.875rem 0 0;
  padding: 0.1875rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: var(--dim);
  text-transform: uppercase;
}

.live::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 6px var(--ember);
}

/* ---------- the pot ---------- */

.pot {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 5vw, 2.5rem) clamp(1.25rem, 4vw, 2rem);
  margin: 0 0 1rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.875rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dimmer);
}

.pot-figure {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pot-digits {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(2.5rem, 12vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 32px rgba(245, 176, 26, 0.35);
  transition: color 200ms ease, text-shadow 200ms ease;
}

.pot-unit {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--dimmer);
}

.pot-meta {
  margin: 1rem 0 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--dim);
}

.pot-note { margin: 0.625rem 0 0; font-size: 0.875rem; color: var(--dimmer); }

/* the reveal: the figure itself answers, so it carries the only real motion on the page */
.pot-digits[data-state="rolling"] { color: var(--text); text-shadow: none; }
.pot-digits[data-state="won"] { color: var(--gold-lit); text-shadow: 0 0 44px rgba(255, 197, 61, 0.6); }

/* ---------- cards ---------- */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 1.75rem);
  margin: 0 0 1rem;
}

.panel-head { display: flex; align-items: center; gap: 0.625rem; margin: 0 0 1.25rem; }

/* their section markers are small coloured tiles; this is that device, drawn in CSS */
.tile {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  color: #18181B;
  flex: none;
}

.tile-commit { background: linear-gradient(150deg, var(--gold-lit), var(--ember)); }
.tile-tickets { background: linear-gradient(150deg, #52525B, #27272A); color: var(--dim); }

.panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ---------- commit form ---------- */

.field { margin: 0 0 1.25rem; }

.field-label {
  display: block;
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dimmer);
}

.input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8125rem 1rem;
}

.input-row:focus-within { border-color: var(--gold); }

.input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 500;
  padding: 0;
}

.input:focus { outline: none; }

.input-unit {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--dimmer);
}

.breakdown { margin: 0 0 1.125rem; }

.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.breakdown-row dt { color: var(--dim); }
.breakdown-row dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }

/* The one destination that is permanent gets the permanence colour. This rule must sit
   AFTER the generic dd rule: same specificity, so source order decides. */
.breakdown-row--burn dd { color: var(--ember); }

.odds {
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}

.odds strong { color: var(--gold); font-weight: 700; }

/* ---------- buttons ---------- */

.btn {
  font-family: var(--ui);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.btn-ghost {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.5rem 0.875rem;
  white-space: nowrap;
}

.btn-ghost:hover { border-color: var(--line-lit); }

.btn-solid {
  display: block;
  width: 100%;
  background: var(--gold);
  border: 1px solid var(--gold);
  color: #18181B;
  padding: 0.8125rem 1rem;
}

.btn-solid:hover:not(:disabled) { background: var(--gold-lit); border-color: var(--gold-lit); }

.btn-solid:disabled {
  background: var(--card-2);
  border-color: var(--line);
  color: var(--dimmer);
  cursor: not-allowed;
}

.status {
  margin: 0.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--dim);
}

.status[data-tone="error"] { color: var(--ember); }

/* ---------- tickets ---------- */

.tickets { display: flex; flex-direction: column; gap: 0.625rem; }

.empty { margin: 0; font-size: 0.875rem; color: var(--dimmer); }

.ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.875rem 1rem;
}

.ticket-id { font-family: var(--mono); font-size: 0.8125rem; font-weight: 500; color: var(--text); }

.ticket-odds {
  display: block;
  margin-top: 0.1875rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--dimmer);
}

.ticket-action { display: flex; align-items: center; gap: 0.75rem; }

.ticket-wait { font-family: var(--mono); font-size: 0.625rem; color: var(--dimmer); }

.btn-reveal {
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.4375rem 0.9375rem;
}

.btn-reveal:hover:not(:disabled) { background: var(--gold); color: #18181B; }
.btn-reveal:disabled { border-color: var(--line); color: var(--dimmer); cursor: not-allowed; }

/* ---------- footer ---------- */

.foot { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter) 3rem; }

.foot-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.foot-num {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ember);
  font-variant-numeric: tabular-nums;
}

.foot-label { font-family: var(--mono); font-size: 0.6875rem; color: var(--dim); }

.foot-note { margin: 0.875rem 0 0; font-family: var(--mono); font-size: 0.625rem; color: var(--dimmer); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
