
:root {
  --ground: #040c0a;
  --panel: rgba(14, 38, 34, 0.52);
  --panel-alt: rgba(8, 24, 21, 0.6);
  --well: rgba(3, 10, 9, 0.7);
  --rule: rgba(0, 240, 200, 0.16);
  --edge: rgba(0, 240, 200, 0.32);
  --ink: #eafff5;
  --teal: #00f0c8;
  --teal-deep: #0aa98a;
  --teal-hover: #4dffe0;
  --teal-glow: rgba(0, 240, 200, 0.55);
  --brass: #ffb545;
  --brass-deep: #c98a2e;
  --brass-hover: #ffcb7a;
  --brass-glow: rgba(255, 181, 69, 0.5);
  --violet: #b06bff;
  --violet-glow: rgba(176, 107, 255, 0.5);
  --muted: #8fc2b4;
  --faint: #4f7268;
  --danger: #ff4d5e;
  --on-teal: #02150f;
  --on-brass: #1a0f02;

  --glass-blur: 18px;
  --shadow-glow-teal: 0 0 0 1px var(--edge), 0 0 28px var(--teal-glow);
  --shadow-glow-brass: 0 0 0 1px rgba(255, 181, 69, 0.4), 0 0 28px var(--brass-glow);
  --shadow-panel: 0 18px 40px rgba(0, 0, 0, 0.45);
  --glow-teal-text: 0 0 12px var(--teal-glow), 0 0 32px var(--teal-glow);
  --glow-brass-text: 0 0 12px var(--brass-glow), 0 0 28px var(--brass-glow);
  --ease-holo: cubic-bezier(0.2, 0.8, 0.2, 1);

  --display: "Kanit", "Arial Black", system-ui, sans-serif;
  --body: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "Space Mono", ui-monospace, "Courier New", monospace;

  --text-h1: clamp(40px, 8vw, 124px);
  --text-h1-hero: clamp(58px, 13.5vw, 214px);
  --text-h2: clamp(28px, 4.4vw, 54px);
  --text-h3: 21px;
  --text-h4: 16px;
  --text-lede: clamp(17px, 1.5vw, 21px);
  --text-body: 16px;
  --text-hint: 15px;
  --text-label: 11px;
  --text-mono-sm: 10.5px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 56px;
  --space-10: 64px;
  --space-11: 80px;
  --space-12: 96px;

  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-pill: 999px;

  --wrap-max: 1280px;
  --wrap-pad: clamp(20px, 5vw, 64px);

  --font-display: var(--display);
  --font-body: var(--body);
  --font-mono: var(--mono);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--text-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 0.86;
  margin: 0;
}

h1 { font-size: var(--text-h1); letter-spacing: -0.05em; line-height: 0.8; }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); letter-spacing: -0.03em; }
h4 { font-size: var(--text-h4); letter-spacing: -0.02em; }

p { margin: 0; text-wrap: pretty; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--brass); }

.kicker, .label, .meta, .chip, th, .mono {
  font-family: var(--mono);
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.kicker { color: var(--brass); }
.label { color: var(--faint); letter-spacing: 0.16em; }
.meta { color: var(--faint); font-weight: 400; letter-spacing: 0.14em; }

.lede {
  font-size: var(--text-lede);
  line-height: 1.55;
  color: var(--ink);
  max-width: 46ch;
}

.hint { font-size: var(--text-hint); line-height: 1.6; color: var(--muted); }

.wrap { width: 100%; max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--wrap-pad); }

.grain {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: vcFlicker 7s steps(1) infinite;
}

@keyframes vcFlicker {
  0%, 100% { opacity: 0.14; }
  47% { opacity: 0.14; }
  48% { opacity: 0.2; }
  49% { opacity: 0.14; }
  82% { opacity: 0.09; }
  83% { opacity: 0.14; }
}


.statusbar {
  background: linear-gradient(135deg, var(--brass), var(--brass-deep));
  color: var(--on-brass);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.statusbar .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 36px;
  overflow: hidden;
}

.statusbar .spacer { margin-left: auto; }

.statusbar .support-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 6px 0 -4px;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  background: var(--on-brass);
  color: var(--brass);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  white-space: nowrap;
  flex: none;
}

.statusbar .support-btn:hover {
  background: var(--ink);
  color: var(--on-brass);
}

.statusbar .support-mark { font-size: 13px; line-height: 1; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(7, 19, 16, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.masthead .wrap { display: flex; align-items: center; gap: 28px; height: 62px; }

.wordmark { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.wordmark:hover { color: var(--ink); }
.wordmark .seal { width: 34px; height: 34px; display: block; flex: none; }
.wordmark-name {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 22px; }
.nav a {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); }
.nav a[aria-current="true"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--brass); }

.ident { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ident-who { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.ident-who b { color: var(--ink); }

@media (max-width: 900px) {
  .masthead .wrap { gap: 16px; }
  .nav { gap: 14px; }
  .nav a { font-size: 10.5px; letter-spacing: 0.1em; }
  .statusbar .wrap { gap: 12px; font-size: 10px; letter-spacing: 0.1em; }
}

@media (max-width: 740px) {
  .wordmark-name { display: none; }
  .ident-who { display: none; }
}

@media (max-width: 560px) {
  .masthead .nav { display: none; }
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: var(--on-teal);
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  box-shadow: 0 0 20px var(--teal-glow);
}
.btn:hover {
  color: var(--on-teal);
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--teal-hover), var(--teal));
  box-shadow: 0 0 34px var(--teal-glow);
}

.btn.ghost {
  background: rgba(0, 240, 200, 0.05);
  border-color: var(--edge);
  color: var(--ink);
  box-shadow: none;
}
.btn.ghost:hover {
  background: rgba(0, 240, 200, 0.05);
  border-color: var(--teal);
  color: var(--ink);
  box-shadow: 0 0 18px var(--teal-glow);
}

.btn.brass {
  background: linear-gradient(135deg, var(--brass), var(--brass-deep));
  border-color: var(--brass);
  color: var(--on-brass);
  box-shadow: 0 0 20px var(--brass-glow);
}
.btn.brass:hover {
  background: linear-gradient(135deg, var(--brass-hover), var(--brass));
  color: var(--on-brass);
  box-shadow: 0 0 34px var(--brass-glow);
}

.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); box-shadow: none; }
.btn.danger:hover {
  background: var(--danger);
  color: var(--ink);
  box-shadow: 0 0 18px rgba(255, 77, 94, 0.5);
}

.btn.small { padding: 9px 14px; font-size: 12.5px; }

.btn.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal);
  font-family: var(--mono);
  font-style: normal;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.16em;
}
.btn.link { box-shadow: none; }
.btn.link:hover {
  background: none;
  color: var(--brass);
  transform: none;
  box-shadow: none;
  text-shadow: 0 0 10px var(--brass-glow);
}

.btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }


.band { border-top: 1px solid var(--rule); }
.band.panel { background: var(--panel-alt); }
.band.teal { background: var(--teal); color: var(--on-teal); border-top: 0; }
.band.teal h1, .band.teal h2 { color: var(--on-teal); }

.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-panel);
  transition: transform 0.25s var(--ease-holo), box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 0 30px var(--teal-glow); }
.card.topline.brass:hover { box-shadow: 0 0 30px var(--brass-glow); }
.card.dashed { background: rgba(0, 240, 200, 0.03); box-shadow: none; }
.card.dashed:hover { transform: none; box-shadow: none; }

.card.dashed { border-style: dashed; border-color: var(--edge); background: transparent; }

.card.topline { border-top-width: 3px; border-top-style: solid; border-top-color: var(--teal); }
.card.topline.brass { border-top-color: var(--brass); }
.card.topline.cream { border-top-color: var(--ink); }

.cols { display: grid; gap: 24px; }
.cols.even { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cols.aside { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); }
.cols.aside-left { grid-template-columns: minmax(0, 230px) minmax(0, 1fr); }
@media (max-width: 900px) {
  .cols.aside, .cols.aside-left { grid-template-columns: minmax(0, 1fr); }
}

.stack { display: grid; gap: 20px; }
.stack.wide { gap: 32px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 9px;
  border: 1px solid var(--edge);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
}
.chip { background: rgba(0, 240, 200, 0.04); transition: box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.chip.on {
  border-color: var(--brass);
  color: var(--brass);
  background: rgba(255, 181, 69, 0.1);
  box-shadow: 0 0 10px var(--brass-glow);
}
.chip.dashed { border-style: dashed; }

.tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 7px;
  background: var(--brass);
  color: var(--on-brass);
  white-space: nowrap;
}
.tag.alt { background: var(--teal); color: var(--on-teal); }

.section-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head .mono { color: var(--faint); margin-left: auto; }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

.pagehead { padding: clamp(34px, 5vw, 68px) 0 clamp(20px, 2.6vw, 34px); }
.pagehead h1 { font-size: clamp(36px, 5.6vw, 80px); }
.pagehead .kicker { display: block; margin-bottom: 14px; }
.pagehead .lede { margin-top: 18px; }
.pagehead .btn-row { margin-top: 24px; }

.prose { max-width: 64ch; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-size: clamp(21px, 2.4vw, 30px); margin-top: 26px; }
.prose h3 { margin-top: 14px; }
.prose p, .prose li { color: var(--muted); font-size: 16px; line-height: 1.66; }
.prose b, .prose strong { color: var(--ink); font-weight: 700; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.prose ul li::marker { color: var(--brass); }

code, .cmd {
  font-family: var(--mono);
  font-size: 0.86em;
  font-weight: 700;
  background: var(--brass);
  color: var(--on-brass);
  padding: 2px 7px;
  white-space: nowrap;
}


input[type="text"], input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--well);
  border: 1px solid var(--edge);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
}

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

input[type="color"] {
  width: 44px;
  height: 32px;
  padding: 2px;
  background: var(--well);
  border: 1px solid var(--edge);
  cursor: pointer;
}

select {
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.field { display: grid; gap: 7px; }
.fields { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.status { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--faint); min-height: 16px; }
.status.bad { color: var(--danger); }
.status.good { color: var(--teal); }


table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 9px 12px;
  color: var(--faint);
  border-bottom: 1px solid var(--edge);
  font-size: 10px;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--rule); font-size: 14.5px; color: var(--muted); }
td:first-child { color: var(--ink); }

.table-scroll { overflow-x: auto; }

.ledger { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12.5px; }
.ledger th {
  text-align: left;
  font-weight: 500;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 12px 10px;
  border-bottom: 0;
}
.ledger td { padding: 12px 10px; color: var(--muted); font-size: 12.5px; border-bottom: 0; }
.ledger tr { border-top: 1px solid var(--rule); }
.ledger thead tr { border-top: 0; }
.ledger th:first-child, .ledger td:first-child { padding-left: 0; }
.ledger th:last-child, .ledger td:last-child { padding-right: 0; text-align: right; }
.ledger .who { color: var(--ink); }
.ledger .ref { color: var(--faint); }


.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(114px, 1fr)); gap: 15px; }

.stamp {
  aspect-ratio: 1;
  border: 2.5px solid currentColor;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--mono);
  text-align: center;
  padding: 8px;
}

.stamp-main { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; overflow-wrap: anywhere; }
.stamp-sub { font-size: 9px; letter-spacing: 0.14em; opacity: 0.85; }

.stamp.unearned {
  border-style: dashed;
  opacity: 0.55;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.stamp.unearned:hover,
.stamp.unearned:focus-visible { opacity: 1; text-decoration: none; }

.gate {
  max-width: 420px;
  margin: 70px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}


.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border-left: 1px solid var(--rule); }
.stat { padding: 26px 22px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat-figure {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: 44px;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--brass);
  text-shadow: var(--glow-brass-text);
}
.stat-caption { font-family: var(--mono); font-size: var(--text-mono-sm); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-top: 8px; white-space: nowrap; }


.colophon { border-top: 1px solid var(--rule); padding: 26px 0 40px; }
.colophon .wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.colophon .name {
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  font-size: 15px;
}
.colophon a, .colophon .disclaimer, .colophon button {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.colophon a:hover { color: var(--brass); }
.colophon .disclaimer { margin-left: auto; white-space: normal; }


@keyframes vcSlam {
  from { opacity: 0; transform: translate3d(0, 0.24em, 0) skewY(2deg); }
  to { opacity: 1; transform: none; }
}
@keyframes vcRise {
  from { opacity: 0; filter: blur(6px); transform: translate3d(0, 16px, 0) scale(0.98); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes vcFlap {
  from { opacity: 0; transform: rotateX(-88deg); }
  to { opacity: 1; transform: none; }
}
@keyframes vcSpin { to { transform: rotate(360deg); } }
@keyframes vcSlide { to { transform: translateX(-50%); } }

.vc-slam { animation: vcSlam 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.vc-rise { animation: vcRise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both; }
.vc-flap { transform-origin: top center; animation: vcFlap 0.48s cubic-bezier(0.16, 1, 0.3, 1) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}


.boc-hudgrid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 44px 44px;
}

.boc-scanline {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 140px;
  z-index: 6;
  pointer-events: none;
  opacity: 0.16;
  background: linear-gradient(to bottom, transparent, var(--teal-glow) 40%, transparent);
  will-change: transform;
  animation: bocScan 9s linear infinite;
}
@keyframes bocScan {
  0% { transform: translateY(-140px); }
  100% { transform: translateY(100vh); }
}

@keyframes bocPulseGlow {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 6px var(--teal-glow)); }
  50% { opacity: 0.55; filter: drop-shadow(0 0 14px var(--teal-glow)); }
}
.boc-pulse { animation: bocPulseGlow 2.4s ease-in-out infinite; }

@keyframes bocMaterialize {
  0% { opacity: 0; filter: blur(6px); transform: translateY(16px) scale(0.98); }
  100% { opacity: 1; filter: blur(0); transform: none; }
}
.boc-materialize { animation: bocMaterialize 0.6s var(--ease-holo) both; }

.dot.on, .dot.live { box-shadow: 0 0 10px var(--teal-glow); }

@keyframes bocSheen {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.boc-sheen {
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: bocSheen 3.2s linear infinite;
}

[data-lite="1"] .grain,
[data-lite="1"] .boc-grain,
[data-lite="1"] .boc-hudgrid,
[data-lite="1"] .boc-scanline { display: none !important; }

[data-lite="1"] * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

[data-lite="1"] .btn,
[data-lite="1"] .btn:hover,
[data-lite="1"] .card,
[data-lite="1"] .card:hover,
[data-lite="1"] .chip.on,
[data-lite="1"] .dot.on,
[data-lite="1"] .dot.live,
[data-lite="1"] .rings i { box-shadow: none !important; }

[data-lite="1"] .stat-figure,
[data-lite="1"] .hero h1 .l2,
[data-lite="1"] .btn.link:hover { text-shadow: none !important; }

[data-lite="1"] .boc-pulse,
[data-lite="1"] .boc-sheen { animation: none !important; filter: none !important; }

[data-lite="1"] *,
[data-lite="1"] *::before,
[data-lite="1"] *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}

.lite-toggle {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
.lite-toggle:hover { color: var(--brass); text-decoration: underline; text-underline-offset: 3px; }
