/* SWARDBOW landing: live broadcast hero (full viewport) → gate (type your outlaw name on a wooden sign) → the programme
   (tournament-poster sections). Tokens come from shared/base.css; arena.css carries the HUD. Light only, bright meadow. */
html, body { background: var(--meadow); }
body.sw-landing { margin: 0; color: var(--ink); font-family: var(--body); overflow-x: hidden; }
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 1; }
html.nogl #stage, html.static #stage { display: none; }

/* ── hero ─────────────────────────────────────────── */
.hero { position: relative; z-index: 3; min-height: 100svh; min-height: 100vh; background: transparent; isolation: isolate; overflow: hidden; }
html.nogl .hero, html.static .hero { background: var(--sky); }
.hero-view { position: absolute; inset: 0; z-index: 0; background: transparent; }
.hero-view .fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
html.nogl .hero-view .fallback, html.static .hero-view .fallback { display: block; }
.hero-hud { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--nav-h, 64px) + var(--banner-h, 0px)); z-index: 2; }
.hero-copy { position: absolute; z-index: 4; left: 24px; top: calc(var(--nav-h, 64px) + var(--banner-h, 0px) + 18px); max-width: 440px; pointer-events: none; }
.hero-copy > * { pointer-events: auto; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: var(--chalk); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 11px; }
.hero-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bounty); }
.wordmark { font-family: var(--display); font-weight: 400; font-size: clamp(56px, 9vw, 108px); line-height: .9; margin: 0 0 10px; letter-spacing: .01em; color: var(--ink); text-shadow: 4px 4px 0 var(--chalk); }
.wordmark .bow { color: var(--bounty); }
.lede { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.4; margin: 0 0 14px; font-weight: 500; background: rgba(251,248,238,.86); padding: 8px 12px; border-radius: 10px; border-left: 4px solid var(--wood); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-launch { margin: 10px 0 0; font-size: 13px; font-weight: 600; color: var(--ink); background: rgba(251,248,238,.86); display: inline-block; padding: 5px 10px; border-radius: 8px; }

/* the lower-third / log move right of the gate on wide screens */
.hero-hud .ar-lower { left: auto; right: 16px; bottom: 18px; }
.hero-hud .ar-lower .ar-lt { align-self: flex-end; border-radius: 8px 8px 0 0; }
.hero-hud .ar-lower .ar-lt-kv { border-radius: 10px 0 10px 10px; }
.hero-hud .ar-log { left: auto; right: 16px; bottom: 118px; max-width: min(380px, calc(100% - 32px)); }
.hero-hud .ar-board { top: 8px; }
.hero-hud .ar-top { top: 8px; left: auto; right: 240px; }

/* ── gate: the wooden sign ───────────────────────── */
.gate { position: absolute; z-index: 5; left: 50%; bottom: 26px; transform: translateX(-50%); width: min(520px, calc(100% - 32px)); }
.sign { position: relative; background: var(--wood); border: 3px solid var(--wood-3, #5E3B18); border-radius: 14px; padding: 16px 20px 18px; box-shadow: 0 10px 0 var(--wood-3, #5E3B18), 0 18px 30px -12px rgba(30,42,22,.6); color: var(--chalk);
  background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 16px), repeating-linear-gradient(180deg, rgba(255,255,255,.04) 0 1px, transparent 1px 9px); }
.sign::before, .sign::after { content: ''; position: absolute; top: -22px; width: 10px; height: 26px; background: var(--wood-2); border: 2px solid var(--wood-3, #5E3B18); border-radius: 3px; }
.sign::before { left: 14%; } .sign::after { right: 14%; }
.sign-k { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.sign-q { margin: 0 0 10px; font-family: var(--display); font-size: clamp(24px, 4vw, 34px); line-height: 1; letter-spacing: .01em; }
.sign-field { position: relative; display: block; min-height: 54px; background: rgba(30,42,22,.35); border: 2px dashed rgba(251,248,238,.5); border-radius: 10px; cursor: text; }
.sign-field:focus-within { border-color: var(--gold); border-style: solid; }
.sign-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.01; font: 700 26px var(--display); color: transparent; caret-color: transparent; background: transparent; border: 0; outline: 0; padding: 0 16px; }
.sign-letters { position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); font-family: var(--display); font-size: clamp(26px, 4.6vw, 36px); line-height: 1; white-space: pre; overflow: hidden; display: flex; align-items: center; min-height: 40px; }
.sign-letters span { display: inline-block; color: var(--chalk); animation: burn .55s ease-out both; text-shadow: 0 0 10px rgba(232,185,49,.0); }
.sign-letters .caret { width: 3px; height: 1em; background: var(--gold); animation: blink 1s steps(2) infinite; margin-left: 2px; }
.sign-letters .ph { color: rgba(251,248,238,.45); animation: none; font-family: var(--body); font-size: 15px; font-weight: 600; }
@keyframes burn { 0% { color: #fff6c8; text-shadow: 0 0 18px #ffb347, 0 0 6px #ff4d1f; transform: translateY(-4px) scale(1.12); opacity: 0 } 25% { opacity: 1; color: #ffd27a; text-shadow: 0 0 14px #ff8a3d, 0 0 4px #ff4d1f } 70% { color: #e8c08a; text-shadow: 0 0 6px rgba(255,138,61,.6) } 100% { color: var(--chalk); text-shadow: 0 1px 0 rgba(0,0,0,.4); transform: none } }
@keyframes blink { 50% { opacity: 0 } }
.sign-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.sign-actions[hidden] { display: none; }
.sign-hint { margin: 8px 0 0; font-size: 12px; color: rgba(251,248,238,.8); }
.sign-hint kbd { font: 600 11px var(--body); border: 1px solid rgba(251,248,238,.6); border-radius: 4px; padding: 0 5px; }
.gate[data-state="named"] .sign-hint { display: none; }
.gate .ar-btn.primary { background: var(--gold); color: var(--ink); border-color: var(--ink); }
.gate .ar-btn.stands { background: var(--chalk); }
html.reduced .sign-letters span { animation: none; }

/* ── programme ───────────────────────────────────── */
.programme { position: relative; z-index: 2; background: transparent; }
.poster { max-width: 1120px; margin: 0 auto; padding: 56px 24px; }
.poster-h { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 3px solid var(--ink); padding-bottom: 10px; }
.poster-h h2 { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 5vw, 56px); line-height: 1; margin: 0; letter-spacing: .01em; }
.poster-h .n { font-family: var(--display); font-size: clamp(28px, 4vw, 44px); color: var(--bounty); line-height: 1; }
.poster-h p { margin: 0; font-size: 15px; color: var(--muted, var(--dim)); max-width: 56ch; flex: 1 1 320px; }
.paper { background: var(--chalk); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 rgba(30,42,22,.2); }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { display: flex; flex-direction: column; background: transparent; border: 0; box-shadow: none; }
.step .vig { position: relative; height: 190px; background: transparent; border: 2px solid var(--ink); border-bottom: 0; border-radius: 12px 12px 0 0; overflow: hidden; }
html.nogl .step .vig, html.static .step .vig { background: var(--sky); }
.step .step-body { flex: 1; padding: 0 0 14px; border-radius: 0 0 12px 12px; }
.step .vig .ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 40px; color: var(--meadow-ink, #3E6B1E); }
html.js:not(.nogl):not(.static) .step .vig .ph { display: none; }
.step .no { position: absolute; left: 10px; top: 8px; font-family: var(--display); font-size: 30px; line-height: 1; background: var(--ink); color: var(--chalk); padding: 3px 10px 4px; border-radius: 8px; z-index: 2; }
.step h3 { font-family: var(--display); font-weight: 400; font-size: 26px; margin: 12px 16px 4px; line-height: 1.05; }
.step p { margin: 0 16px; font-size: 14px; line-height: 1.45; color: var(--muted, var(--dim)); }

/* ledger + log */
.ledger-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.ledger-grid > *, .lb-grid > *, .chest-flow > *, .steps > * { min-width: 0; }
.tbl-wrap { overflow-x: auto; }
table.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
table.ledger th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 10px 12px; border-bottom: 2px solid var(--ink); }
table.ledger td { padding: 9px 12px; border-bottom: 1px dashed rgba(30,42,22,.3); vertical-align: top; }
table.ledger tr:last-child td { border-bottom: 0; }
table.ledger .r, table.ledger .r { text-align: right; white-space: nowrap; }
table.ledger .nm { font-weight: 600; }
table.ledger .tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 1px 5px; border-radius: 4px; background: rgba(30,42,22,.1); color: var(--dim); margin-left: 4px; }
table.ledger .tag.open { background: var(--bounty); color: var(--chalk); }
table.ledger .tag.nopot { background: var(--meadow-2); color: var(--meadow-ink, #3E6B1E); }
table.ledger a { color: var(--ink); }
.ledger-note { margin: 10px 12px 12px; font-size: 13px; color: var(--muted, var(--dim)); }
.livelog { padding: 12px 14px; }
.livelog h3 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.livelog h3 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bounty); }
.livelog ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.livelog li { padding: 6px 9px; background: var(--chalk-2, #F3EEDC); border-radius: 6px; line-height: 1.35; }
.livelog li .t { color: var(--dim); font-size: 11px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.livelog li.bounty { background: var(--bounty-wash, #FBE3E6); }
.livelog li.settled { background: var(--gold-wash, #FBF0C9); }
.livelog .empty { color: var(--dim); font-size: 13px; }

/* leaderboard */
.lb-tabs { display: inline-flex; gap: 4px; background: var(--chalk-2, #F3EEDC); border: 2px solid var(--ink); border-radius: 999px; padding: 3px; margin-bottom: 14px; }
.lb-tabs button { -webkit-appearance: none; appearance: none; border: 0; background: transparent; font: 700 14px var(--body); padding: 6px 16px; border-radius: 999px; cursor: pointer; color: var(--ink); min-height: 36px; }
.lb-tabs button[aria-selected="true"] { background: var(--ink); color: var(--chalk); }
.lb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lb-card { padding: 14px 16px; }
.lb-card .rank { font-family: var(--display); font-size: 34px; line-height: 1; color: var(--bounty); }
.lb-card .who { font-weight: 700; font-size: 16px; margin-top: 2px; word-break: break-all; }
.lb-card .who a { color: inherit; text-decoration: none; }
.lb-card .kv { display: flex; gap: 14px; margin-top: 8px; font-size: 13px; color: var(--dim); }
.lb-card .kv b { color: var(--ink); display: block; font-size: 16px; }
.lb-empty { padding: 20px; color: var(--dim); }

/* the chest */
.chest-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: stretch; }
.chest-flow .arrowh { display: grid; place-items: center; font-family: var(--display); font-size: 36px; color: var(--wood); }
.chest-box { padding: 16px 18px; }
.chest-box small { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.chest-box b { display: block; font-size: 26px; font-weight: 700; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.chest-box p { margin: 0; font-size: 13px; color: var(--muted, var(--dim)); line-height: 1.4; }
.chest-note { margin: 16px 0 0; font-size: 14px; line-height: 1.5; background: var(--chalk); border-left: 4px solid var(--bounty); padding: 10px 14px; border-radius: 0 10px 10px 0; }
.docs-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }
.disclose { font-size: 13px; color: var(--muted, var(--dim)); line-height: 1.5; max-width: 80ch; }

/* ── phones / narrow ─────────────────────────────── */
@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .ledger-grid { grid-template-columns: 1fr; }
  .lb-grid { grid-template-columns: 1fr; }
  .chest-flow { grid-template-columns: 1fr; }
  .chest-flow .arrowh { transform: rotate(90deg); padding: 0; }
  .hero-hud .ar-top { right: 190px; }
}
@media (max-width: 720px) {
  .poster { padding: 40px 16px; }
  .steps { grid-template-columns: 1fr; }
  .hero-copy { left: 16px; right: 16px; max-width: none; top: calc(var(--nav-h, 60px) + var(--banner-h, 0px) + 10px); }
  .wordmark { font-size: 52px; text-shadow: 3px 3px 0 var(--chalk); }
  .lede { font-size: 14px; padding: 6px 10px; }
  .hero-cta .ar-btn { min-height: 40px; font-size: 14px; }
  .hero-hud .ar-top { display: none; }
  .hero-hud .ar-board { display: none; }
  .hero-hud .ar-log { display: none; }
  .hero-hud .ar-lower { left: 16px; right: 16px; bottom: 236px; }
  .hero-hud .ar-lower .ar-lt { align-self: flex-start; }
  .hero-hud .ar-lower .ar-lt-kv { border-radius: 0 10px 10px 10px; }
  .hero-hud .ar-lt-kv > span:nth-child(3) { display: none; }
  .gate { bottom: 16px; width: calc(100% - 32px); }
  .sign { padding: 12px 14px 14px; }
  .sign-q { font-size: 22px; }
  .sign-field { min-height: 48px; }
  .hero { min-height: 100svh; }
}
@media (max-height: 640px) and (min-width: 721px) { .wordmark { font-size: 52px; } .lede { display: none; } .hero-hud .ar-log { display: none; } }
