/* BPC house style: phosphor green on black, everything looks like a CRT
   terminal bolted to a company that is quietly going under. */
:root {
  --bg: #000000;
  --panel: #050b06;
  --line: #12401f;
  --line-soft: #0b2612;
  --green: #58ff9c;
  --green-dim: #5cc98a;     /* was #1f8f4a, ~5:1 on black and worse under scanlines */
  --green-ghost: #35855a;   /* was #0f4d27, which was barely 2:1 */
  --ink: #dcf3e4;
  --amber: #ffb03a;
  --red: #ff4d4d;
  --magenta: #ff36a8;       /* the one thing on the page allowed to shout */
  --cyan: #3fe3ff;          /* every control on the page */
  --cyan-dim: #2f9db4;      /* quiet controls, still ~5:1 on black */
  --mono: "Consolas", "DejaVu Sans Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0.015em;
  -webkit-font-smoothing: antialiased;
}

/* Scanlines + a soft phosphor bloom over the whole page. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.13) 2px,
      rgba(0, 0, 0, 0.13) 3px
    ),
    radial-gradient(ellipse at 50% 40%, rgba(30, 255, 130, 0.03), transparent 70%);
}

a { color: var(--green); text-decoration: none; border-bottom: 1px dotted var(--green-ghost); }
a:hover { color: #8affb9; border-bottom-color: var(--green); }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px 90px; }

/* ---------- header ---------- */
.masthead {
  border-bottom: 1px solid var(--line);
  padding: 26px 0 20px;
  margin-bottom: 34px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.mark { width: 54px; height: 54px; flex: none; image-rendering: pixelated; }
.masthead h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--green);
  text-shadow: 0 0 10px rgba(61, 255, 136, 0.22);
}
.masthead p {
  margin: 3px 0 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--green-dim);
  text-transform: uppercase;
}

/* ---------- the score, top right ---------- */
/* The score is the page. Centred in the column, directly under the field that
   produced it, with the share button attached to it rather than off in a
   corner. */
.result {
  margin-top: 26px;
  border-top: 1px solid var(--line-soft);
  padding-top: 26px;
  text-align: center;
  line-height: 1;
}
.result.hidden { display: none; }
.result-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 14px;
  text-shadow: 0 0 16px rgba(255, 54, 168, 0.32);
}
.result-value {
  display: block;
  position: relative;
  font-size: 92px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--magenta);
  text-shadow: 0 0 26px rgba(255, 54, 168, 0.45), 0 0 56px rgba(255, 54, 168, 0.22);
}
.result-value::after {
  content: "";
  position: absolute;
  inset: -10px -6px;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.38) 2px,
    rgba(0, 0, 0, 0.38) 3px
  );
}
.result-rank {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--green-dim);
}
.result-rank b { color: var(--green); }
.result-rank .off { color: var(--amber); }
.result-rank .off b { color: var(--amber); }
.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.result.pop .result-value { animation: scorePop 0.5s ease-out; }
@keyframes scorePop {
  0% { transform: scale(0.82); opacity: 0.3; }
  55% { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- generic panel ---------- */
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 22px;
  margin-bottom: 26px;
  position: relative;
}
.panel > h2 {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
}
/* A heading with no sub-line under it needs its own breathing room. */
/* Headings are CSS-uppercased, which would turn AoP into AOP. This opts a
   fragment out so the brand keeps its own casing inside a caps heading. */
.asis { text-transform: none; }

.panel > h2 + form,
.panel > h2 + .board-wrap { margin-top: 18px; }
.panel > .sub {
  margin: 0 0 20px;
  font-size: 13px;
  letter-spacing: 0.015em;
  color: var(--green-dim);
}
/* What the ranking is actually for. Amber because it is the one forward-looking
   claim on the page and it should not read as body copy. */
.panel > .sub .promise {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--amber);
}
.panel > .sub .promise b { color: var(--amber); }

.stamp {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--green-dim);
  text-transform: uppercase;
}

/* ---------- check form ---------- */
.check-row { display: flex; gap: 10px; flex-wrap: wrap; }
input[type="text"], input[type="password"], input[type="number"], textarea, select {
  background: #000;
  border: 1px solid var(--line);
  color: var(--green);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 12px 14px;
  width: 100%;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--green-dim);
  box-shadow: 0 0 0 1px var(--green-ghost), 0 0 18px rgba(61, 255, 136, 0.14) inset;
}
input::placeholder, textarea::placeholder { color: #3a7d55; }
.check-row input { flex: 1 1 380px; }

/* Every button is cyan. Nothing else on the page uses it, so "cyan means you
   can click it" holds without exception. */
button {
  background: #000;
  border: 1px solid var(--cyan-dim);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 12px 22px;
  cursor: pointer;
  transition: background 0.12s, box-shadow 0.12s;
}
button:hover:not(:disabled) {
  background: #06222b;
  box-shadow: 0 0 16px rgba(63, 227, 255, 0.24);
}
button:disabled { opacity: 0.4; cursor: progress; }
button.ghost { border-color: #1b4a55; color: var(--cyan-dim); padding: 8px 14px; letter-spacing: 0.16em; }
button.danger { border-color: #5a1c1c; color: #ff7676; }

/* ---------- verdict ---------- */
.verdict { margin-top: 22px; border-top: 1px solid var(--line-soft); padding-top: 20px; }
.verdict.hidden { display: none; }

.verdict-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.verdict-head b {
  font-size: 28px;
  letter-spacing: 0.1em;
  color: var(--green);
  text-shadow: 0 0 14px rgba(61, 255, 136, 0.26);
}
.verdict.no .verdict-head b { color: var(--red); text-shadow: 0 0 14px rgba(255, 77, 77, 0.24); }
.verdict-head span { font-size: 12px; letter-spacing: 0.06em; color: var(--green-dim); }

.rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.rules li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.rules .glyph { flex: none; width: 30px; font-weight: 700; white-space: nowrap; }
.rules .pass .glyph { color: var(--green); }
.rules .fail .glyph { color: #46705a; }
.rules .unknown .glyph { color: var(--amber); }
.rules .name { flex: 1 1 auto; }
.rules .name b { color: var(--ink); font-weight: 600; }
.rules .name em { font-style: normal; color: var(--green-dim); }
.rules .detail { flex: none; color: var(--green-dim); font-size: 13px; text-align: right; white-space: nowrap; }
.rules .fail { opacity: 0.78; }

.note { font-size: 13px; color: var(--green-dim); margin-top: 16px; line-height: 1.6; }
.note.warn { color: var(--amber); }
.error { color: #ff7070; font-size: 14px; margin-top: 14px; }

/* ---------- ways in ---------- */
.ways { list-style: none; margin: 0; padding: 0; }
.ways li { padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; display: flex; gap: 14px; }
.ways li:last-child { border-bottom: 0; }
.ways .tier {
  flex: none;
  width: 108px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--green);
  padding-top: 3px;
}
.ways .tier.fcfs { color: var(--amber); }

/* ---------- partner gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
}
.tile {
  border: 1px solid var(--line);
  background: #000;
  display: block;
  overflow: hidden;
  position: relative;
  transition: border-color 0.14s, box-shadow 0.14s, transform 0.14s;
}
.tile:hover {
  border-color: var(--green-dim);
  box-shadow: 0 0 22px rgba(61, 255, 136, 0.16);
  transform: translateY(-2px);
}
.tile .frame {
  aspect-ratio: 1 / 1;
  background: #030703;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.tile .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .frame .empty { font-size: 10px; letter-spacing: 0.22em; color: var(--green-ghost); }
.tile figcaption { padding: 10px 12px 12px; }
.tile figcaption b {
  display: block;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--green);
  text-transform: uppercase;
}
.tile figcaption span { display: block; font-size: 12px; color: var(--green-dim); margin-top: 3px; }
.tile .badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  letter-spacing: 0.16em;
  padding: 2px 6px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.8);
  color: var(--green-dim);
}
.tile .badge.auto { color: var(--green); border-color: var(--green-ghost); }

.empty-state {
  border: 1px dashed var(--line);
  padding: 34px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--green-dim);
  text-transform: uppercase;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 44px;
  padding-top: 18px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--green-dim);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cursor::after {
  content: "\2588";
  color: var(--green);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- rules popup ---------- */
/* Sits in the .stamp slot, top right of its panel. */
button.stamp-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  padding: 6px 14px;
  font-size: 11px;
  text-shadow: 0 0 12px rgba(63, 227, 255, 0.35);
}
button.stamp-btn:hover:not(:disabled) {
  background: #06202a;
  box-shadow: 0 0 16px rgba(63, 227, 255, 0.28);
}

.modal-sub {
  margin: 26px 0 4px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  border-top: 1px solid var(--line-soft);
  padding-top: 20px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;              /* above the page-wide scanline overlay */
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: safe center;
  padding: 24px 20px;
}
.modal[hidden] { display: none; }
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}
.modal-card {
  position: relative;
  width: min(560px, 100%);
  flex: none;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 24px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9), 0 0 26px rgba(61, 255, 136, 0.08);
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.modal-head h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
}
.modal-head button { margin-left: auto; }

.rules-list { list-style: none; margin: 0; padding: 0; }
.rules-list li {
  position: relative;
  padding: 11px 0 11px 24px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  color: var(--ink);
}
.rules-list li:last-child { border-bottom: 0; }
.rules-list li::before {
  content: "\203A";
  position: absolute;
  left: 4px;
  color: var(--green);
}

/* ---------- point values table ---------- */
.values { width: 100%; border-collapse: collapse; font-size: 14px; }
.values th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px 8px 0;
}
.values td { border-bottom: 1px solid var(--line-soft); padding: 11px 10px 11px 0; }
.values .v-name { color: var(--ink); }
.values .v-name em { font-style: normal; font-size: 10px; letter-spacing: 0.18em; color: var(--green-ghost); text-transform: uppercase; }
.values .v-pts { font-weight: 600; }
.values .v-name small {
  display: block;
  color: var(--green-dim);
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.values .v-pts { color: var(--green); text-align: right; white-space: nowrap; font-size: 16px; }
.values .v-pts span { font-size: 10px; letter-spacing: 0.18em; color: var(--green-dim); text-transform: uppercase; }
.values .v-soon { font-size: 10px; letter-spacing: 0.18em; color: var(--amber); text-transform: uppercase; white-space: nowrap; text-align: right; }

.freeze {
  margin: 0 0 18px;
  padding: 9px 12px;
  border: 1px solid var(--green-ghost);
  background: #04140a;
  font-size: 13px;
  letter-spacing: 0.015em;
  line-height: 1.55;
  color: var(--ink);
}
.freeze b {
  color: var(--green);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  margin-right: 4px;
}

/* ---------- score readout ---------- */
.verdict-head b .unit { font-size: 13px; letter-spacing: 0.3em; color: var(--green-dim); text-shadow: none; }
.rules .score { flex: none; width: 62px; text-align: right; color: var(--green); font-weight: 700; }
.rules .none .score, .rules .pending .score { color: var(--green-ghost); font-weight: 400; }
.rules .pending .glyph { color: var(--green-ghost); }
.rules .pending { opacity: 0.8; }
.note.ok { color: var(--green); }

/* Total row at the foot of the breakdown. */
.rules .total { border-bottom: 0; padding-top: 16px; }
.rules .total .name b {
  color: var(--green);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.rules .total .score {
  color: var(--magenta);
  font-size: 20px;
  font-weight: 700;
}

/* ---------- earned: progress bar ---------- */
/* Sits directly under the form: the bar is the answer, the breakdown below it
   is the receipt. */
.earned { margin-top: 4px; }

.breakdown {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.sub-head {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-dim);
  font-weight: 600;
}
.earned-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.earned-head b {
  font-size: 26px;
  color: var(--magenta);
  letter-spacing: 0.04em;
  text-shadow: 0 0 16px rgba(255, 54, 168, 0.35);
}
.earned-head span {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-dim);
}
.earned.locked .earned-head b { font-size: 15px; letter-spacing: 0.18em; text-transform: uppercase; }

.bar {
  position: relative;
  height: 14px;
  margin: 14px 0 4px;
  border: 1px solid var(--line);
  background: #000;
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #a3126a, var(--magenta));
  box-shadow: 0 0 14px rgba(255, 54, 168, 0.45);
  transition: width 0.6s ease-out;
}
/* Same phosphor treatment as the score, so the bar reads as part of the tube. */
.bar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.38) 2px,
    rgba(0, 0, 0, 0.38) 3px
  );
}

.pips {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
}
.pips li {
  border: 1px solid var(--line);
  padding: 8px 6px;
  text-align: center;
}
.pips li.got { border-color: var(--magenta); }
/* Not eligible yet — needs more of the unlock collection, not more points.
   Plain grey rather than a faded green: it has to read as "off", not as
   "nearly invisible". */
.pips li.off { border-color: #4f4f4f; background: #0c0c0c; }
.pips li.off .pip { color: #8f8f8f; }
.pips li.off .pip-n { color: #a0a0a0; }
.pips li.off .pip-at { color: #808080; }

.pips .lock { display: inline-block; vertical-align: -2px; }

/* The first locked spot is the way in, so it reads as a control, not a gap. */
.pips li.door { border-color: var(--amber); background: #1c1204; padding: 0; }
.pip-door {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  padding: 8px 4px;
  cursor: pointer;
  font-family: var(--mono);
  text-transform: none;
  letter-spacing: 0;
}
.pip-door:hover { background: #2a1c07; box-shadow: none; }
.pips li.door { animation: doorPulse 2.4s ease-in-out infinite; }
@keyframes doorPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 176, 58, 0); }
  50% { box-shadow: 0 0 14px rgba(255, 176, 58, 0.3); }
}
.pips li.door .pip, .pips li.door .pip-n { color: var(--amber); }
.pips li.door .pip-at {
  color: var(--amber);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* tier list inside the popup */
.tiers li { opacity: 0.7; }
.tiers li.here { opacity: 1; }
.tiers li.here .name b { color: var(--magenta); }
.tiers .glyph { color: var(--magenta); }
.tiers .score { color: var(--green); font-weight: 700; }

a.cta {
  display: inline-block;
  border: 1px solid var(--cyan);
  border-bottom-color: var(--cyan);
  color: var(--cyan);
  padding: 11px 20px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
a.cta:hover { background: #06222b; color: var(--cyan); }

.row { margin-top: 18px; }
.row-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-dim);
  margin-bottom: 6px;
}
.row-label b { font-size: 15px; color: var(--ink); }
.row.free .pips li.got { border-color: var(--magenta); }
.row.free .pips li.got .pip { color: var(--magenta); }
.row.gtd .pips li.got { border-color: var(--amber); }
.row.gtd .pips li.got .pip { color: var(--amber); }
.row.gtd .row-label b { color: var(--amber); }
.row .pips { margin-top: 0; }
.pips .pip { display: block; color: var(--green-ghost); font-size: 13px; }
.pips li.got .pip { color: var(--magenta); }
.pips .pip-n {
  display: block;
  font-size: 15px;
  color: var(--ink);
  font-weight: 700;
}
.pips .pip-at {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: var(--green-dim);
}
.pips .pip-at b { color: var(--ink); font-size: 11px; }
.pips.dim li { opacity: 0.7; }

/* ---------- allocation ---------- */
.panel.hidden { display: none; }

.alloc-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.alloc-label { flex: 1 1 auto; }
.alloc-label b { display: block; color: var(--green); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }
.alloc-label span { font-size: 12px; color: var(--green-dim); letter-spacing: 0.02em; }
.alloc-sub { flex: none; width: 84px; text-align: right; color: var(--green-dim); font-size: 13px; }

.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper button { padding: 6px 14px; font-size: 15px; line-height: 1; }
.stepper .count {
  display: inline-block;
  min-width: 46px;
  text-align: center;
  font-size: 21px;
  color: var(--green);
  text-shadow: 0 0 10px rgba(61, 255, 136, 0.22);
}

.alloc-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0 4px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-dim);
}
.alloc-total b { color: var(--green); font-size: 15px; }
.alloc-total .bad { color: var(--red); }

.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.flash { font-size: 13px; color: var(--green); }
.flash.bad { color: var(--red); }

@media (max-width: 620px) {
  .masthead { flex-wrap: wrap; }
    .result-value { font-size: 58px; }
  .share { justify-content: flex-start; }
  .rules li { flex-wrap: wrap; }
  .rules .detail { text-align: left; width: auto; white-space: normal; }
  .rules .score { width: auto; margin-left: auto; }
  .ways li { flex-wrap: wrap; }
  .ways .tier { width: auto; }
  .alloc-row { flex-wrap: wrap; gap: 10px; }
  .alloc-sub { width: auto; margin-left: auto; }
}

/* ---------- standing ---------- */
.standing { display: flex; gap: 34px; flex-wrap: wrap; padding-bottom: 4px; }
.standing > div span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-dim);
}
.standing > div b {
  display: block;
  font-size: 40px;
  line-height: 1.05;
  color: var(--green);
  text-shadow: 0 0 14px rgba(61, 255, 136, 0.25);
}
.standing > div em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--green-ghost);
}
/* Rank is the headline number, so it takes the magenta. Its label goes with it,
   which keeps the pair reading as one unit next to the green mint count. */
.standing > .stand-rank span,
.standing > .stand-rank b { color: var(--magenta); }
.standing > .stand-rank b { text-shadow: 0 0 16px rgba(255, 54, 168, 0.35); }
/* The one line an off-board wallet gets. Amber so it reads as "here is what to
   do next", not as an error. */
.note.short { color: var(--amber); font-size: 15px; max-width: 46em; }
.note.short b { color: var(--amber); }
.note.short a { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ---------- leaderboard ---------- */
/* ~150 rows, so it runs down the page rather than living in its own scroller. */
.board-wrap { border: 1px solid var(--line-soft); }
.board { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }

/* The header sticks to the top of the VIEWPORT as the page scrolls, which is
   what you want when the table is 150 rows long and not in a box. */
.board th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #04120a;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-dim);
  font-weight: 600;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.board td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); }

/* Headers align the same way as their values, so a number sits under its own
   label instead of drifting to the far side of the column. */
.board th:first-child, .board .b-rank { text-align: right; width: 46px; }
.board th:nth-child(2), .board .b-addr { text-align: left; }
.board th:nth-child(3), .board .b-score { text-align: right; width: 96px; }

.board .b-rank { color: var(--green-dim); }
/* Full 42 characters. Slightly tighter so the row still fits beside the numbers. */
.board .b-addr {
  color: var(--ink);
  white-space: nowrap;
  font-size: clamp(8px, 2.6vw, 12px);
  letter-spacing: -0.02em;
}
.board .b-score { color: var(--green); font-weight: 700; }
/* Neutral grey, so an empty cell reads as absence rather than as a third
   accent competing with the allocation numbers. */
.board td.none { color: #5a5a5a; font-weight: 400; }

/* Alternating rows, so the eye can track across a long line. */
.board tbody tr:nth-child(odd) { background: #000; }
.board tbody tr:nth-child(even) { background: #0d0f0d; }
.board tbody tr:hover td { background: #12251a; }

.board tr.me td {
  background: #22062f;
  border-top: 1px solid var(--magenta);
  border-bottom: 1px solid var(--magenta);
}
.board tr.me:hover td { background: #2c0a3b; }
.board tr.me .b-addr b { color: var(--magenta); letter-spacing: 0.16em; }
.dim { color: var(--green-ghost); }

@media (max-width: 620px) {
  .board th, .board td { padding-left: 5px; padding-right: 5px; }
  /* Wrap rather than clip: the whole address has to stay readable, and the
     page scrolls instead of the table. */
  .board .b-addr { white-space: normal; overflow-wrap: anywhere; font-size: 10px; }
  .board th:first-child, .board .b-rank { width: 32px; }
  .board th:nth-child(3), .board .b-score { width: 72px; }
  .board th { font-size: 9px; letter-spacing: 0.1em; }
  .standing { gap: 22px; }
  .standing > div b { font-size: 32px; }
}


.maths { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.maths li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.maths .m-what { flex: 1 1 auto; color: var(--ink); }
.maths .m-sum { flex: none; color: var(--green-dim); font-size: 13px; }
.maths .m-val { flex: none; width: 84px; text-align: right; color: var(--green); font-weight: 700; }
/* Held none. Shown in line rather than as a footnote, so the zero reads as
   part of the sum it is part of. */
.maths .m-zero .m-what b { color: var(--red); font-weight: 400; }
.maths .m-zero .m-sum,
.maths .m-zero .m-val { color: var(--red); }
.maths .m-zero .m-val { font-weight: 400; }

.maths .m-total { border-bottom: 0; padding-top: 15px; }
.maths .m-total .m-what b {
  color: var(--green);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.maths .m-total .m-val { color: var(--magenta); font-size: 20px; }

.share-hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--magenta);
  text-align: right;
  max-width: 230px;
  margin-left: auto;
}
@media (max-width: 620px) { .share-hint { text-align: left; margin-left: 0; } }

/* Sits under the board it explains: someone reading their own rank is exactly
   the person who wants to know how the ranking was decided. */
.how-link {
  border: 0;
  border-bottom: 1px dotted #1b4a55;
  color: var(--cyan-dim);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0 0 2px;
}
.how-link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ---- share modal ------------------------------------------------------- */
/* X's intent URL cannot carry an image, so the card has to be saved and
   attached by hand. Showing it first makes that worth doing. */
.share-preview {
  display: block;
  width: min(225px, 54%);
  margin: 14px 0 0;
  border: 1px solid var(--line);
  background: #000;
}
.steps-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.steps-mini li {
  border-bottom: 1px solid var(--line-soft);
  padding: 18px 2px;
}
.steps-mini li:last-child { border-bottom: 0; }
.steps-mini .step-n {
  display: block;
  margin-bottom: 9px;
  color: var(--magenta);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.step-body { min-width: 0; }
.step-body b {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
.step-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
/* The post text, shown exactly as it will be copied. */
.share-text {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #04120a;
  color: var(--green);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
