:root {
  --bg: #fff;
  --fg: #111;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --n50: #fafafa;
  --n200: #e5e5e5;
  --n300: #d4d4d4;
  --n500: #737373;
  --n600: #525252;
  --n700: #404040;
  --n800: #262626;
  --n900: #171717;
  --hero: #111;
  --green-400: #43a047;
  --green-500: #2e7d32;
  --green-700: #1b5e20;
  --green-50: #e8f5e9;
  --sans: Inter, system-ui, "Segoe UI", sans-serif;
  --pad: 1.5rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 80;
  background: var(--hero);
  color: #fff;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.875rem;
}
.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

a {
  color: var(--green-700);
  text-decoration: none;
}
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5rem;
  z-index: 40;
  background: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease, backdrop-filter 0.2s ease;
}

.header-inner {
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.dot { color: var(--green-400); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}
.nav a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.nav a:hover { color: #fff; text-decoration: none; }
.nav-ext {
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  opacity: 0.75;
}

.header-scrolled {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 0 var(--n200);
}
.header-scrolled .wordmark { color: var(--fg); }
.header-scrolled .dot { color: var(--green-700); }
.header-scrolled .nav a { color: var(--n700); }
.header-scrolled .nav a:hover { color: var(--fg); }

.hero {
  position: relative;
  min-height: 28rem;
  padding: 5.5rem 0 3.5rem;
  background: var(--hero);
  color: #fff;
  overflow: hidden;
}

.hero-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(720px 420px at 92% -8%, color-mix(in oklab, var(--green-700) 28%, transparent), transparent 62%),
    radial-gradient(520px 320px at 88% 8%, color-mix(in oklab, var(--green-500) 20%, transparent), transparent 58%);
}

.hero-inner { position: relative; z-index: 1; }

.kicker {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-400);
}

.throne-grid {
  display: grid;
  grid-template-columns: minmax(6rem, 0.32fr) 1fr;
  gap: 1.25rem 2.25rem;
  align-items: end;
}

.throne-num {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(5.5rem, 14vw, 9.5rem);
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.throne-body h3 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.throne-body h3 a { color: #fff; }
.throne-body h3 a:hover { color: var(--green-400); text-decoration: none; }

.throne-body .empty-line {
  margin: 0 0 1.1rem;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.throne-body .one-liner {
  margin: 0 0 1.15rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 36rem;
}

.throne-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 1.75rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}
.throne-stats span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.throne-stats strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.2rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.btn,
.claim-for,
.take,
.submit,
#decay-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:active,
.claim-for:active,
.take:active,
.submit:active,
#decay-btn:active { transform: scale(0.97); }

.claim-for {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  padding: 0.62rem 1.1rem;
  font-size: 0.92rem;
}
.claim-for:hover,
.claim-for:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

main { background: var(--n50); }

.ticket { padding: 2.5rem 0 1.25rem; }

.card {
  background: #fff;
  border: 1px solid var(--n200);
  border-radius: 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 1.5rem 1.5rem 1.6rem;
}

.ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.ticket-head h2,
.board-head h2,
.rules h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.demo-flag {
  margin: 0;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: var(--n50);
  border: 1px solid var(--n200);
  color: var(--n600);
  font-size: 0.75rem;
  font-weight: 500;
}

.fields {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.7fr;
  gap: 0.9rem 1rem;
}
.field-wide { grid-column: 1 / -2; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field span {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--n600);
}
.field em {
  font-style: normal;
  color: var(--n500);
  font-variant-numeric: tabular-nums;
}

.field input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--n300);
  border-radius: 0.85rem;
  background: #fff;
  color: var(--fg);
  font: inherit;
  font-size: 0.98rem;
}
.field input::placeholder { color: var(--n500); }
.field input:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--green-700) 16%, transparent);
}

.ticket-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
}

.rank-live {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}

.btn-fill,
.submit {
  border: 0;
  background: var(--green-700);
  color: #fff;
  padding: 0.7rem 1.2rem;
  font-size: 0.92rem;
}
.btn-fill:hover,
.submit:hover { background: var(--green-500); }

.form-err {
  margin: 0.85rem 0 0;
  color: #b42318;
  font-size: 0.9rem;
}

.board-wrap { padding: 1.25rem 0 2.25rem; }

.board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.board-count {
  margin: 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.board-card { padding: 0.65rem 1.1rem 0.4rem; }

.blotter-head,
.blotter-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1.5fr) 7.2rem 7.2rem 5rem 6.4rem minmax(9rem, 0.9fr);
  gap: 0.55rem 0.7rem;
  align-items: baseline;
}

.blotter-head {
  padding: 0.55rem 0.35rem 0.5rem;
  border-bottom: 1px solid var(--n200);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--n500);
}

.num { text-align: right; }
.act { text-align: right; }

.blotter {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blotter-row {
  padding: 0.78rem 0.35rem;
  border-bottom: 1px solid var(--n200);
}
.blotter-row:last-child { border-bottom: 0; }

.blotter-row.flash {
  background: var(--green-50);
  border-radius: 0.75rem;
}

.blotter-row.ghost { color: var(--n300); }

.r-rank {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--n800);
}
.ghost .r-rank { color: var(--n300); }

.r-name { min-width: 0; }
.r-name a,
.r-name .n {
  display: block;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.r-name a:hover { color: var(--green-700); }
.r-name small {
  display: block;
  color: var(--ink-2);
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ghost .frei {
  font-size: 0.84rem;
  color: var(--n500);
}

.r-val,
.r-paid,
.r-clicks,
.r-time {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 0.95rem;
  color: var(--n700);
}
.r-val { color: var(--fg); font-weight: 500; }
.r-sub { display: none; }

.take {
  justify-self: end;
  border: 1px solid var(--n300);
  background: #fff;
  color: var(--green-700);
  font-size: 0.78rem;
  padding: 0.32rem 0.7rem;
  white-space: nowrap;
}
.take:hover,
.take:focus-visible {
  border-color: var(--green-700);
  background: var(--green-50);
  outline: none;
}

.rules {
  padding: 0 0 3rem;
  background: var(--n50);
}
.rules ol {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 42rem;
  counter-reset: rule;
}
.rules li {
  position: relative;
  padding: 0.7rem 0 0.7rem 2.1rem;
  border-bottom: 1px solid var(--n200);
  color: var(--ink);
}
.rules li::before {
  content: counter(rule);
  counter-increment: rule;
  position: absolute;
  left: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--green-700);
}

.foot {
  background: #fff;
  border-top: 1px solid var(--n200);
  color: var(--ink-2);
}
.foot-grid {
  padding-top: 1.75rem;
  padding-bottom: 1.85rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
}
.foot p { margin: 0.2rem 0; font-size: 0.9rem; }
.foot-brand {
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.foot .dot { color: var(--green-700); }
address { font-style: normal; }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--green-700); }

.ops { background: var(--n50); padding-bottom: 2rem; }
.ops-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-2);
  font-size: 0.8rem;
}
.ops p { margin: 0; }

.ops-tag {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--n200);
  background: #fff;
  font-size: 0.68rem;
  font-weight: 500;
}

#decay-btn {
  border: 1px solid var(--n300);
  background: #fff;
  color: var(--n600);
  font-size: 0.75rem;
  padding: 0.32rem 0.75rem;
}
#decay-btn:hover,
#decay-btn:focus-visible {
  border-color: var(--n500);
  color: var(--n800);
  outline: none;
}

@media (max-width: 860px) {
  .nav-ext { display: none; }
  .ticket-foot,
  .ops-inner,
  .foot-grid {
    flex-direction: column;
    align-items: flex-start;
  }
  .throne-grid,
  .fields,
  .foot-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .blotter-head { display: none; }
  .blotter-row {
    grid-template-columns: 2.4rem minmax(0, 1fr) auto;
    grid-template-areas:
      "rank who val"
      "rank who take"
      "rank sub sub";
  }
  .r-rank { grid-area: rank; }
  .r-name { grid-area: who; }
  .r-val { grid-area: val; }
  .r-paid,
  .r-clicks,
  .r-time { display: none; }
  .r-sub {
    display: block;
    grid-area: sub;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink-2);
  }
  .ghost .r-sub,
  .ghost .take { display: none; }
  .take {
    grid-area: take;
    justify-self: end;
    margin-top: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .claim-for, .take, .submit, #decay-btn { transition: none; }
}
