/* ============================================================================
   TRENCH WORLD — lo-fi CRT terminal.
   Pixel type all the way through (not pixel chrome bolted onto a modern sans),
   bevelled steel plates, hard black offsets, scanlines, dither.
   Mud grey-brown + rust, not DOOM warm-brown + hazard yellow.
   No build step, no framework.
   ========================================================================== */

/* ------------------------------- tokens ---------------------------------- */
:root {
  /* surface */
  --void:     #0A0906;
  --deep:     #100D09;
  --stone:    #221C15;
  --stone-2:  #2C251B;
  --metal:    #3B3226;
  --sunk:     #0D0B08;

  /* bevel */
  --bev-l:    #6B5C46;
  --bev-d:    #0B0906;

  /* ink */
  --bone:     #E4DBC4;
  --bone-dim: #B0A388;
  --faint:    #857A66;
  --ghost:    #4E4638;

  /* signal */
  --rust:     #C86A22;
  --rust-hot: #E89A38;
  --blood:    #B32118;
  --blood-hot:#E63A22;
  --slime:    #86AE3E;   /* money / SOL */
  --gold:     #E8B33D;   /* live / round */

  /* type */
  --px:   'Silkscreen', 'Courier New', monospace;
  --term: 'VT323', 'Courier New', monospace;

  /* metrics */
  --sh:    4px 4px 0 #000;
  --sh-lg: 6px 6px 0 #000;
  --shell: 1180px;
  --gut:   clamp(14px, 3.5vw, 34px);
  --bar-h: 54px;
}

/* ------------------------------- reset ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
* { margin: 0; padding: 0; }

/* The sign-in panel swaps whole blocks with the `hidden` attribute, and several
   of them carry a display of their own (.btn is inline-flex), which would beat
   the UA stylesheet. Make hidden mean hidden. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 22px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--void);
  background-image:
    /* dither grain */
    repeating-conic-gradient(rgba(255,255,255,.011) 0% 25%, transparent 0% 50%),
    radial-gradient(ellipse 120% 90% at 50% -10%, #1a130c 0%, var(--void) 60%);
  background-size: 4px 4px, 100% 100%;
  color: var(--bone);
  font-family: var(--term);
  font-size: 21px;
  line-height: 1.32;
  image-rendering: pixelated;
  overflow-x: hidden;
}

img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
ul, ol { list-style: none; }

::selection { background: var(--rust); color: #0A0906; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; top: -70px; left: 10px; z-index: 300;
  background: var(--rust); color: #0A0906;
  font-family: var(--px); font-size: 10px;
  padding: 12px 16px; text-decoration: none; box-shadow: var(--sh);
}
.skip:focus { top: 10px; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gut); }

.mono { font-family: var(--px); font-size: .62em; letter-spacing: .02em; }
.sol  { color: var(--slime); }

/* ------------------------------ bevels ----------------------------------- */
/* raised plate */
.bev {
  border: 3px solid;
  border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: var(--sh);
}
/* sunken well */
.bev-in {
  border: 3px solid;
  border-color: var(--bev-d) var(--bev-l) var(--bev-l) var(--bev-d);
}

/* -------------------------------- CRT ------------------------------------ */
.fx {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.20) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 110% 90% at 50% 50%, transparent 55%, rgba(0,0,0,.42) 100%);
}
.fx::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(200,106,34,.05), transparent 18%);
  animation: roll 7s linear infinite;
}
@keyframes roll { from { transform: translateY(-100%) } to { transform: translateY(100%) } }

/* ------------------------------- chrome ---------------------------------- */
.bar {
  position: sticky; top: 0; z-index: 150;
  background: var(--stone-2);
  border-bottom: 3px solid var(--bev-d);
  box-shadow: 0 4px 0 rgba(0,0,0,.7);
}
.bar__in {
  min-height: var(--bar-h);
  max-width: var(--shell); margin-inline: auto;
  padding: 8px var(--gut);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

.mark { display: flex; align-items: center; gap: 9px; text-decoration: none; flex-shrink: 0; }
.mark__glyph {
  width: 14px; height: 14px; flex-shrink: 0;
  background: var(--rust);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.mark__word {
  font-family: var(--px); font-weight: 700;
  font-size: 20px; color: var(--rust-hot);
  text-shadow: 3px 3px 0 #000;
  letter-spacing: .02em;
}
.mark__sub { font-family: var(--px); font-size: 8px; color: var(--faint); }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--px); font-size: 9px;
  color: var(--slime); background: #0C1206;
  border: 2px solid var(--slime);
  box-shadow: var(--sh);
  padding: 8px 9px; white-space: nowrap;
}
.pill__dot { width: 7px; height: 7px; background: var(--slime); animation: blip 1.4s steps(1) infinite; }
.pill.is-down { color: var(--blood-hot); border-color: var(--blood); background: #150605; }
.pill.is-down .pill__dot { background: var(--blood-hot); animation: none; }
@keyframes blip { 0%,50% { opacity: 1 } 51%,100% { opacity: 0 } }

.bar__nav { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.bar__nav a {
  font-family: var(--px); font-size: 9px;
  color: var(--bone); text-decoration: none;
  background: var(--metal);
  border: 3px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: var(--sh);
  padding: 9px 10px;
}
.bar__nav a:hover { background: var(--rust); color: #0A0906; }
.bar__nav a:active { border-color: var(--bev-d) var(--bev-l) var(--bev-l) var(--bev-d); box-shadow: none; transform: translate(2px,2px); }

.bar__side { display: flex; align-items: center; gap: 8px; }

.ca {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sunk);
  border: 3px solid; border-color: var(--bev-d) var(--bev-l) var(--bev-l) var(--bev-d);
  padding: 6px 8px; cursor: pointer;
  font-family: var(--px); font-size: 9px;
}
.ca__k { color: var(--gold); }
.ca__v { color: var(--bone-dim); font-family: var(--term); font-size: 17px; }
.ca__do { color: var(--faint); border-left: 2px solid var(--bev-d); padding-left: 8px; }
.ca:hover .ca__do { color: var(--rust-hot); }

.icon-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  background: var(--metal);
  border: 3px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: var(--sh);
  text-decoration: none; font-size: 15px; color: var(--bone);
}
.icon-btn:hover { background: var(--rust); color: #0A0906; }

/* riveted band under the chrome */
.rivets {
  height: 14px;
  background:
    repeating-linear-gradient(90deg,
      transparent 0 12px,
      rgba(107,92,70,.9) 12px 14px,
      rgba(11,9,6,.9) 14px 16px,
      transparent 16px 28px),
    linear-gradient(180deg, var(--metal), #1a150f);
  border-bottom: 3px solid var(--bev-d);
}

/* ------------------------------- buttons --------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--px); font-size: 11px;
  text-decoration: none; cursor: pointer;
  background: var(--metal); color: var(--bone);
  border: 3px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: var(--sh);
  padding: 13px 16px;
}
.btn:hover { background: var(--rust); color: #0A0906; }
.btn:active { border-color: var(--bev-d) var(--bev-l) var(--bev-l) var(--bev-d); box-shadow: none; transform: translate(2px,2px); }
.btn--sm { font-size: 9px; padding: 9px 11px; }

.btn--go {
  width: 100%;
  background: var(--blood); color: #F4EAD6;
  font-size: 14px; padding: 20px 18px;
  border-color: #E0705E #4A0B06 #4A0B06 #E0705E;
  box-shadow: var(--sh-lg);
  text-shadow: 2px 2px 0 rgba(0,0,0,.6);
}
.btn--go:hover { background: var(--blood-hot); color: #fff; }
.btn--go:active { border-color: #4A0B06 #E0705E #E0705E #4A0B06; box-shadow: none; transform: translate(3px,3px); }
.btn--lg { width: auto; padding: 22px 34px; font-size: 15px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ------------------------------ type scale ------------------------------- */
.kick {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--px); font-size: 9px;
  color: var(--faint); margin-bottom: 16px;
}
.kick__n {
  color: #0A0906; background: var(--gold);
  padding: 5px 6px; box-shadow: 3px 3px 0 #000;
}
.kick--c { justify-content: center; }

.h2 {
  font-family: var(--px); font-weight: 700;
  font-size: clamp(17px, 2.9vw, 30px);
  line-height: 1.42; color: var(--bone);
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #000;
}
.deck { color: var(--bone-dim); max-width: 66ch; margin-top: 16px; font-size: 21px; }
.head { margin-bottom: clamp(24px, 3.5vw, 42px); }

.sec { padding: clamp(50px, 7vw, 92px) 0; }
.sec--alt {
  background: #16120C;
  border-top: 3px solid var(--bev-d);
  border-bottom: 3px solid var(--bev-d);
  box-shadow: inset 0 3px 0 rgba(107,92,70,.28);
}

/* -------------------------------- panel ---------------------------------- */
.panel {
  position: relative;
  background: var(--stone);
  background-image: repeating-conic-gradient(rgba(255,255,255,.014) 0% 25%, transparent 0% 50%);
  background-size: 4px 4px;
  border: 3px solid;
  border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: var(--sh-lg);
  padding: clamp(18px, 2.4vw, 26px);
}
/* corner rivets */
.panel::before, .panel::after {
  content: ""; position: absolute; width: 4px; height: 4px;
  background: var(--bev-l); box-shadow: 1px 1px 0 #000;
}
.panel::before { top: 5px; left: 5px; }
.panel::after  { top: 5px; right: 5px; }

.panel__h {
  display: inline-block;
  font-family: var(--px); font-size: 9px;
  color: #0A0906; background: var(--gold);
  padding: 7px 8px; box-shadow: 3px 3px 0 #000;
  margin-bottom: 18px;
}
.panel__p { color: var(--bone-dim); }
.panel__p--fine { color: var(--faint); margin-top: 16px; font-size: 19px; }
.panel__p a { color: var(--rust-hot); }
.panel strong { color: var(--bone); }

/* ================================ HERO =================================== */
.hero { position: relative; padding: clamp(34px, 5vw, 66px) 0 clamp(28px, 4vw, 46px); overflow: hidden; }
.hero__grid { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .32; z-index: 0; }
.hero__veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(70% 60% at 20% 0%, rgba(200,106,34,.14), transparent 62%),
    linear-gradient(180deg, transparent 55%, var(--void) 97%);
}
.hero__in {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr);
  gap: clamp(24px, 3.5vw, 46px); align-items: start;
  margin-bottom: clamp(26px, 4vw, 44px);
}

.hero__h1 {
  font-family: var(--px); font-weight: 700;
  font-size: clamp(20px, 4.1vw, 44px);
  line-height: 1.34; letter-spacing: .01em;
  color: var(--bone);
  text-shadow: 4px 4px 0 #000;
}
.hero__h1-hot { color: var(--rust-hot); }
.hero__lede { color: var(--bone-dim); max-width: 48ch; margin-top: 22px; font-size: 22px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.chip {
  font-family: var(--px); font-size: 8px;
  color: var(--bone-dim);
  background: var(--stone-2);
  border: 2px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: 3px 3px 0 #000;
  padding: 8px 9px;
}
.chip--on { color: var(--gold); border-color: var(--gold) #5c440f #5c440f var(--gold); }

/* ---------------------------- enter console ------------------------------ */
.enter {
  position: relative;
  background: var(--stone-2);
  background-image: repeating-conic-gradient(rgba(255,255,255,.016) 0% 25%, transparent 0% 50%);
  background-size: 4px 4px;
  border: 4px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: var(--sh-lg);
  padding: clamp(18px, 2.2vw, 26px);
}
.enter::before, .enter::after {
  content: ""; position: absolute; width: 5px; height: 5px;
  background: var(--bev-l); box-shadow: 1px 1px 0 #000;
  bottom: 6px;
}
.enter::before { left: 6px; }
.enter::after { right: 6px; }

.enter__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.enter__h {
  font-family: var(--px); font-size: 13px; color: var(--gold);
  text-shadow: 3px 3px 0 #000;
}
.enter__tag { font-family: var(--px); font-size: 8px; color: var(--faint); }

.f { margin-bottom: 14px; }
.f__l {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--px); font-size: 8px; color: var(--bone-dim);
  margin-bottom: 8px;
}
.f__req { color: var(--blood-hot); }
.f__opt { color: var(--faint); }
.f__i {
  width: 100%;
  background: var(--sunk);
  color: var(--bone);
  border: 3px solid; border-color: var(--bev-d) var(--bev-l) var(--bev-l) var(--bev-d);
  padding: 12px 12px;
  font-family: var(--term); font-size: 22px;
  outline: none;
}
.f__i::placeholder { color: var(--ghost); }
.f__i:focus { border-color: var(--gold); }
.f__i.is-bad { border-color: var(--blood-hot); }
.f__err {
  min-height: 24px; color: var(--blood-hot);
  font-size: 19px; margin: 2px 0 8px;
}
.f__err:not(:empty)::before { content: "! "; }
.enter__fine { color: var(--faint); font-size: 19px; margin-top: 16px; }

/* ------------------------------ sign in ---------------------------------- */
/* Two faces in the same plate: pick a method, then read back the wallet that
   was made for you. Same bevels and offsets as the rest of the console. */
.auth { margin: 4px 0 10px; }
.auth__lede { color: var(--bone-dim); font-size: 19px; margin-bottom: 14px; }

.auth__methods { display: flex; flex-direction: column; gap: 10px; }
.auth__m {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; cursor: pointer;
  font-family: var(--px); font-size: 11px;
  background: var(--metal); color: var(--bone);
  border: 3px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: var(--sh);
  padding: 15px 16px;
}
.auth__m:hover { background: var(--rust); color: #0A0906; }
.auth__m:active { border-color: var(--bev-d) var(--bev-l) var(--bev-l) var(--bev-d); box-shadow: none; transform: translate(2px,2px); }
.auth__m--go {
  background: var(--blood); color: #F4EAD6;
  font-size: 13px; padding: 19px 18px;
  border-color: #E0705E #4A0B06 #4A0B06 #E0705E;
  box-shadow: var(--sh-lg);
  text-shadow: 2px 2px 0 rgba(0,0,0,.6);
}
.auth__m--go:hover { background: var(--blood-hot); color: #fff; }
.auth__m--go:active { border-color: #4A0B06 #E0705E #E0705E #4A0B06; box-shadow: none; transform: translate(3px,3px); }
.auth__m[disabled], .auth__go[disabled], .auth__mini[disabled] { opacity: .55; pointer-events: none; }

.auth__alt {
  display: block; margin: 12px auto 0; padding: 4px 2px;
  background: none; border: 0; cursor: pointer;
  color: var(--bone-dim); font-size: 19px;
  text-decoration: underline; text-underline-offset: 4px;
}
.auth__alt:hover { color: var(--rust-hot); }

.auth__step { margin-top: 14px; }
.auth__row2 { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.auth__go {
  cursor: pointer; white-space: nowrap;
  font-family: var(--px); font-size: 10px;
  background: var(--metal); color: var(--bone);
  border: 3px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: var(--sh);
  padding: 0 16px;
}
.auth__go:hover { background: var(--gold); color: #0A0906; }
.auth__go:active { border-color: var(--bev-d) var(--bev-l) var(--bev-l) var(--bev-d); box-shadow: none; transform: translate(2px,2px); }
.auth__to { color: var(--gold); font-family: var(--term); font-size: 17px; text-transform: none; }

/* signed in */
.auth--in {
  background: var(--sunk);
  border: 3px solid; border-color: var(--bev-d) var(--bev-l) var(--bev-l) var(--bev-d);
  padding: 14px;
}
.auth__line {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 7px 0;
}
.auth__line + .auth__line { border-top: 2px solid #1B160F; }
.auth__k { font-family: var(--px); font-size: 8px; color: var(--faint); }
.auth__v {
  font-size: 20px; color: var(--bone);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: right;
}
.auth__v--w { color: var(--slime); letter-spacing: .5px; }
.auth__mini {
  cursor: pointer;
  font-family: var(--px); font-size: 8px;
  background: var(--stone); color: var(--bone-dim);
  border: 2px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  padding: 7px 8px;
}
.auth__mini:hover { background: var(--rust); color: #0A0906; }
.auth__note { color: var(--faint); font-size: 17px; margin-top: 10px; }

.auth__status {
  min-height: 24px; color: var(--gold); font-size: 19px; margin: 6px 0 2px;
}
.auth__status:not([hidden])::before { content: "> "; }
.auth__status:not([hidden])::after {
  content: "_"; animation: blip 1s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce) { .auth__status::after { animation: none; } }

/* ------------------------------- HUD bar --------------------------------- */
.stats {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--sunk);
  border: 4px solid; border-color: var(--bev-d) var(--bev-l) var(--bev-l) var(--bev-d);
  box-shadow: var(--sh-lg);
}
.stat {
  padding: 14px 16px;
  border-right: 3px solid var(--bev-d);
  display: flex; flex-direction: column; gap: 4px;
}
.stat:last-child { border-right: 0; }
.stat__k { font-family: var(--px); font-size: 8px; color: var(--faint); }
.stat__v {
  font-family: var(--px); font-size: clamp(13px, 1.7vw, 19px);
  color: var(--bone); text-shadow: 3px 3px 0 #000;
  line-height: 1.3;
}
.stat__v--sol { color: var(--slime); }
.stat__v--cy  { color: var(--gold); }
.stat__u { font-size: 17px; color: var(--faint); }

/* ================================ BOARD ================================== */
.board { padding: 0; }
.board__top { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 3px solid var(--bev-d); }
.board__top > div { padding: 13px 16px; border-right: 3px solid var(--bev-d); display: flex; flex-direction: column; gap: 3px; }
.board__top > div:last-child { border-right: 0; }
.board__top span:first-child { font-family: var(--px); font-size: 8px; color: var(--faint); }
.board__top span:last-child { font-family: var(--px); font-size: 14px; text-shadow: 2px 2px 0 #000; }
.board__clock-v { color: var(--gold); }
.board__pool-v  { color: var(--slime); }
.board__map-v   { color: var(--bone-dim); text-transform: uppercase; }

.progress { height: 12px; background: var(--sunk); border-bottom: 3px solid var(--bev-d); overflow: hidden; }
.progress__fill {
  height: 100%; width: 0%;
  background: repeating-linear-gradient(90deg, var(--rust) 0 7px, #7d3f13 7px 9px);
  transition: width .25s steps(20);
}

.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  font-family: var(--px); font-size: 8px; color: var(--bone-dim);
  text-align: left; padding: 12px 16px;
  background: var(--stone-2);
  border-bottom: 3px solid var(--bev-d);
}
.tbl td { padding: 11px 16px; border-bottom: 2px solid rgba(11,9,6,.85); font-size: 21px; }
.tbl tbody tr:nth-child(odd) { background: rgba(255,255,255,.035); }
.tbl tbody tr:hover { background: rgba(200,106,34,.14); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl__num { text-align: right; }
.tbl__rank { width: 62px; }
.tbl__empty td { color: var(--faint); text-align: center; padding: 30px 16px; }

.rank {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  font-family: var(--px); font-size: 10px;
  background: var(--metal); color: var(--bone-dim);
  border: 2px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
}
.rank--1 { background: var(--gold); color: #0A0906; border-color: #ffe38f #6d5111 #6d5111 #ffe38f; }
.rank--2, .rank--3 { color: var(--bone); }
.who { color: var(--bone); }
.frags { font-family: var(--px); font-size: 14px; color: var(--rust-hot); text-shadow: 2px 2px 0 #000; }
.share { color: var(--bone-dim); }
.take  { font-family: var(--px); font-size: 12px; color: var(--slime); text-shadow: 2px 2px 0 #000; }
.take--no { color: var(--ghost); font-family: var(--term); font-size: 21px; }
.need { display: block; font-family: var(--px); font-size: 7px; color: var(--faint); margin-top: 5px; }

.board__fine { padding: 14px 16px; border-top: 3px solid var(--bev-d); color: var(--bone-dim); font-size: 19px; }
.board__fine strong { color: var(--gold); }

/* ================================ MONEY ================================== */
.flow {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 3px; background: var(--bev-d);
  border: 3px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: var(--sh-lg);
  margin-bottom: clamp(20px, 2.6vw, 34px);
}
.flow__i { background: var(--stone); padding: clamp(16px, 2.1vw, 24px); }
.flow__n {
  display: inline-block; font-family: var(--px); font-size: 9px;
  color: #0A0906; background: var(--rust); padding: 5px 6px; box-shadow: 2px 2px 0 #000;
}
.flow__t { font-family: var(--px); font-size: 12px; color: var(--bone); margin: 14px 0 10px; text-shadow: 2px 2px 0 #000; line-height: 1.4; }
.flow__b { color: var(--bone-dim); font-size: 20px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 1.8vw, 22px); }

.bars { margin-top: 20px; display: grid; gap: 9px; }
.barrow { display: grid; grid-template-columns: 40px 1fr 48px; align-items: center; gap: 10px; }
.barrow__k { font-family: var(--px); font-size: 8px; color: var(--faint); }
.barrow__bar {
  height: 14px; display: block; background: var(--sunk);
  border: 2px solid var(--bev-d);
}
.barrow__bar i {
  display: block; height: 100%; width: var(--w);
  background: repeating-linear-gradient(90deg, var(--slime) 0 6px, transparent 6px 8px);
}
.barrow:first-child .barrow__bar i {
  background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 8px);
}
.barrow__v { font-family: var(--px); font-size: 9px; text-align: right; color: var(--bone); }

.rules { display: grid; gap: 10px; }
.rules li {
  display: grid; grid-template-columns: 30px 1fr; gap: 10px;
  color: var(--bone-dim); font-size: 20px;
  padding-bottom: 10px; border-bottom: 2px solid rgba(11,9,6,.8);
}
.rules li:last-child { border-bottom: 0; padding-bottom: 0; }
.rules__n { font-family: var(--px); font-size: 8px; color: var(--rust-hot); padding-top: 6px; }

/* ================================ CARDS ================================== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: clamp(14px, 1.8vw, 20px); }
.card__n {
  display: inline-block; font-family: var(--px); font-size: 9px;
  color: #0A0906; background: var(--rust); padding: 5px 6px; box-shadow: 2px 2px 0 #000;
}
.card__t { font-family: var(--px); font-size: 12px; color: var(--bone); margin: 14px 0 12px; line-height: 1.45; text-transform: uppercase; text-shadow: 2px 2px 0 #000; }
.card__b { color: var(--bone-dim); font-size: 20px; }

/* ================================ FEED =================================== */
.feed { padding: 0; }
.feed__head, .feed__row {
  display: grid; grid-template-columns: 88px minmax(0,1fr) 72px 128px 108px;
  gap: 10px; align-items: center; padding: 11px 16px;
}
.feed__head {
  font-family: var(--px); font-size: 8px; color: var(--faint);
  background: var(--stone-2); border-bottom: 3px solid var(--bev-d);
}
.feed__body { max-height: 400px; overflow-y: auto; }
.feed__row { border-bottom: 2px solid rgba(11,9,6,.8); font-size: 20px; }
.feed__row:nth-child(odd) { background: rgba(255,255,255,.018); }
.feed__row:last-child { border-bottom: 0; }
.feed__round { color: var(--faint); }
.feed__who { color: var(--bone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed__frags, .feed__amt, .feed__link { text-align: right; }
.feed__amt { color: var(--slime); }
.feed__link a { color: var(--rust-hot); text-decoration: none; font-family: var(--px); font-size: 8px; }
.feed__link a:hover { color: var(--gold); text-decoration: underline; }
.feed__empty { padding: 30px 16px; text-align: center; color: var(--faint); }

/* ================================ KEYS =================================== */
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: clamp(14px, 1.8vw, 20px); }
.krow { display: grid; gap: 13px; }
.krow li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.krow em { font-style: normal; color: var(--bone-dim); font-size: 20px; margin-left: 8px; }
.kcap {
  display: inline-grid; place-items: center;
  min-width: 36px; height: 36px; padding-inline: 9px;
  background: var(--metal); color: var(--bone);
  border: 3px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: 3px 3px 0 #000;
  font-family: var(--px); font-size: 9px;
}
.kcap--w { min-width: 58px; }

/* ================================= FAQ =================================== */
.faq { display: grid; gap: 10px; }
.faq__i {
  background: var(--stone);
  border: 3px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: var(--sh);
}
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; background: none; border: 0; cursor: pointer;
  padding: 18px 16px; text-align: left;
  font-family: var(--px); font-size: 10px; color: var(--bone);
  line-height: 1.5;
}
.faq__q:hover { color: var(--rust-hot); }
.faq__x {
  flex-shrink: 0; width: 26px; height: 26px;
  display: grid; place-items: center;
  background: var(--metal); color: var(--gold);
  border: 2px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  font-family: var(--px); font-size: 10px;
}
.faq__x::before { content: "+"; }
.faq__q[aria-expanded="true"] .faq__x::before { content: "-"; }
.faq__a { padding: 0 16px 20px; max-width: 80ch; }
.faq__a p { color: var(--bone-dim); font-size: 20px; }

/* ================================= CTA =================================== */
.cta {
  padding: clamp(56px, 8vw, 100px) 0;
  border-top: 3px solid var(--bev-d);
  background:
    repeating-conic-gradient(rgba(255,255,255,.012) 0% 25%, transparent 0% 50%),
    radial-gradient(70% 130% at 50% 100%, rgba(179,33,24,.20), transparent 62%),
    var(--deep);
  background-size: 4px 4px, 100% 100%, 100% 100%;
  text-align: center;
}
.cta__in { display: grid; justify-items: center; }
.cta__h {
  font-family: var(--px); font-size: clamp(15px, 2.6vw, 26px);
  line-height: 1.5; color: var(--bone);
  text-shadow: 4px 4px 0 #000; max-width: 26ch;
}
.cta__h span { color: var(--gold); }
.cta__d { color: var(--bone-dim); margin: 18px 0 28px; font-size: 21px; }
.cta__fine { margin-top: 20px; color: var(--faint); font-family: var(--px); font-size: 8px; line-height: 1.9; }

/* ================================ FOOT =================================== */
.foot { border-top: 3px solid var(--bev-d); background: var(--stone-2); padding: 34px 0; box-shadow: inset 0 3px 0 rgba(107,92,70,.2); }
.foot__in { display: grid; gap: 14px; justify-items: center; text-align: center; }
.foot__brand { display: flex; align-items: center; gap: 9px; font-family: var(--px); font-size: 14px; color: var(--rust-hot); text-shadow: 3px 3px 0 #000; }
.foot__links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; font-family: var(--px); font-size: 8px; }
.foot__links a { color: var(--bone-dim); text-decoration: none; }
.foot__links a:hover { color: var(--rust-hot); }
.foot__links span { color: var(--ghost); }
.foot__note { color: var(--faint); font-size: 18px; max-width: 76ch; }

/* =============================== LAUNCH ================================== */
.launch { position: fixed; inset: 0; z-index: 250; background: var(--void); display: grid; place-items: center; }
.launch[hidden] { display: none; }
.launch__in { text-align: center; display: grid; gap: 16px; justify-items: center; }
.launch__k { font-family: var(--px); font-size: 10px; color: var(--gold); }
.launch__n { font-family: var(--px); font-size: clamp(18px, 4vw, 34px); color: var(--rust-hot); text-shadow: 4px 4px 0 #000; }
.launch__bar { width: min(300px, 70vw); height: 16px; background: var(--sunk); border: 3px solid var(--bev-d); overflow: hidden; }
.launch__bar i { display: block; height: 100%; width: 34%; background: repeating-linear-gradient(90deg, var(--rust) 0 7px, transparent 7px 9px); animation: sweep 1s steps(12) infinite; }
.launch__f { color: var(--faint); font-size: 19px; max-width: 36ch; }
.launch__steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 6px; text-align: left;
  font-family: var(--px); font-size: 10px; color: var(--ghost);
}
.launch__steps li { padding-left: 1.2em; position: relative; }
.launch__steps li::before {
  content: "○"; position: absolute; left: 0; color: var(--ghost);
}
.launch__steps li.is-on { color: var(--gold); }
.launch__steps li.is-on::before { content: "●"; color: var(--rust-hot); }
@keyframes sweep { from { transform: translateX(-110%) } to { transform: translateX(330%) } }

/* =============================== TOAST =================================== */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 260;
  transform: translateX(-50%);
  background: var(--stone-2); color: var(--bone);
  border: 3px solid; border-color: var(--bev-l) var(--bev-d) var(--bev-d) var(--bev-l);
  box-shadow: var(--sh-lg);
  font-size: 19px; padding: 13px 16px;
  opacity: 0; max-width: min(92vw, 520px);
}
.toast.is-on { opacity: 1; }

/* ============================== REVEAL =================================== */
.rv { opacity: 0; }
.rv.is-in { opacity: 1; transition: opacity .35s steps(4); }

/* ============================ RESPONSIVE ================================= */
@media (max-width: 1080px) {
  .hero__in { grid-template-columns: 1fr; }
  .enter { max-width: 560px; }
  .split { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .mark__sub, .ca__v { display: none; }
  .mark { margin-right: auto; }
  .bar__side { order: 4; margin-left: 0; }
  .pill { order: 5; width: 100%; justify-content: center; }
  .bar__nav { order: 6; width: 100%; justify-content: center; margin-left: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 3px solid var(--bev-d); }
  .board__top { grid-template-columns: repeat(2, 1fr); }
  .board__top > div:nth-child(2n) { border-right: 0; }
  .board__top > div:nth-child(-n+2) { border-bottom: 3px solid var(--bev-d); }
}

@media (max-width: 700px) {
  body { font-size: 20px; }
  .bar__nav { display: none; }
  .hero__lede { font-size: 20px; }
  .flow { grid-template-columns: 1fr; }
  .tbl th:nth-child(4), .tbl td:nth-child(4) { display: none; }
  .tbl th, .tbl td { padding-inline: 11px; }
  .feed__head, .feed__row { grid-template-columns: 56px minmax(0,1fr) 96px 78px; padding-inline: 11px; }
  .feed__head span:nth-child(3), .feed__row .feed__frags { display: none; }
  .board__fine { padding-inline: 11px; }
}

/* keep the CA chip reachable on phones — it collapses to a tappable CA/COPY */
@media (max-width: 460px) {
  .bar__in { gap: 8px; }
  .mark__word { font-size: 17px; }
  .ca { padding: 6px; gap: 6px; }
  .pill { font-size: 8px; }
}

/* ============================ MOTION SAFETY ============================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .rv { opacity: 1; }
  .hero__grid, .fx::after { display: none; }
}
