@font-face {
  font-family: "Hanken";
  src: url("/pulse/fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Spline Mono";
  src: url("/pulse/fonts/spline-sans-mono-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --acid: #ccff00;
  --ink: #110e08;
  --paper: #f7f7f5;
  --rule: #b9b8b0;
  --muted: #68675f;
  --red: #c92e29;
  font-family: "Hanken", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  min-width: 280px;
  margin: 0;
  background:
    linear-gradient(rgba(17, 14, 8, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 14, 8, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
button { font: inherit; }

.masthead,
footer {
  min-height: 58px;
  padding: 12px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--ink);
  background: rgba(247, 247, 245, 0.94);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  text-decoration: none;
}

.brand-button {
  padding: 4px 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--acid);
  font-size: 11px;
  line-height: 1;
}

.chain-state,
.eyebrow,
.archive-status,
.window-card span,
.window-card small,
.selected-summary span,
.community-meta,
.ownership-gate strong,
footer {
  font-family: "Spline Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chain-state { white-space: nowrap; }
.chain-state i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 1px var(--ink); }

main { width: min(100%, 760px); margin: 0 auto; }

.hero,
.window-overview,
.community-board,
.ownership-gate { border: 1px solid var(--ink); border-top: 0; background: var(--paper); }

.hero { padding: clamp(30px, 8vw, 72px) clamp(18px, 6vw, 48px); }
.eyebrow { margin: 0 0 12px; color: var(--muted); }

h1,
h2,
p { margin-top: 0; }

h1 {
  max-width: 680px;
  margin-bottom: 22px;
  font-size: clamp(64px, 19vw, 148px);
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 0.74;
  text-transform: uppercase;
}

.deck { max-width: 560px; margin-bottom: 0; font-size: clamp(16px, 3.5vw, 22px); font-weight: 700; line-height: 1.22; }

.window-overview,
.community-board { padding: clamp(18px, 5vw, 34px); }

.section-heading,
.board-controls,
.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

h2 { margin-bottom: 0; font-size: clamp(26px, 6vw, 42px); line-height: 0.92; letter-spacing: -0.045em; text-transform: uppercase; }
.archive-status { max-width: 260px; margin-bottom: 2px; text-align: right; color: var(--muted); }
.archive-status[data-state="ready"] { color: #476900; }
.archive-status[data-state="error"] { color: var(--red); }

.window-cards { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--ink); }
.window-card { min-width: 0; padding: 16px 14px; border-right: 1px solid var(--ink); background: var(--paper); }
.window-card:last-child { border-right: 0; }
.window-card strong { display: block; margin: 14px 0 4px; font-size: clamp(30px, 8vw, 56px); line-height: 0.85; letter-spacing: -0.055em; }
.window-card small { color: var(--muted); }
.window-card[data-state="ready"]:first-child { background: var(--acid); }
.skeleton strong { color: var(--rule); }

.range-tabs { display: flex; border: 1px solid var(--ink); }
.range-tabs button { min-width: 54px; min-height: 42px; padding: 0 12px; border: 0; border-right: 1px solid var(--ink); background: var(--paper); color: var(--ink); font-family: "Spline Mono", monospace; font-size: 11px; font-weight: 700; cursor: pointer; }
.range-tabs button:last-child { border-right: 0; }
.range-tabs button[aria-selected="true"] { background: var(--acid); }
.range-tabs button:focus-visible, a:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.selected-summary { margin-top: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink); }
.selected-summary > div { min-width: 0; padding: 13px 12px; border-right: 1px solid var(--ink); }
.selected-summary > div:last-child { border-right: 0; }
.selected-summary span { display: block; color: var(--muted); }
.selected-summary strong { display: block; margin-top: 7px; overflow: hidden; font-size: clamp(15px, 4vw, 24px); line-height: 1; text-overflow: ellipsis; white-space: nowrap; }

.community-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--ink); border-top: 0; }
.community-row { min-height: 62px; padding: 12px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--ink); }
.community-row:last-child { border-bottom: 0; }
.community-rank { font-family: "Spline Mono", monospace; font-size: 11px; }
.community-name { min-width: 0; }
.community-name strong { display: block; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.community-meta { display: block; margin-top: 3px; color: var(--muted); }
.community-buys { text-align: right; }
.community-buys strong { display: block; font-size: 20px; line-height: 1; }
.community-buys small { font-family: "Spline Mono", monospace; font-size: 9px; text-transform: uppercase; }
.community-placeholder { padding: 24px 12px; color: var(--muted); font-family: "Spline Mono", monospace; font-size: 11px; text-align: center; text-transform: uppercase; }

.receipt-row { padding-top: 16px; align-items: flex-start; }
.receipt-row p { max-width: 490px; margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.receipt-row a { flex: none; font-family: "Spline Mono", monospace; font-size: 10px; font-weight: 700; text-transform: uppercase; }

.ownership-gate { padding: 18px clamp(18px, 5vw, 34px); background: var(--ink); color: var(--paper); }
.ownership-gate strong { color: var(--acid); }
.ownership-gate p { margin: 7px 0 0; font-size: 13px; line-height: 1.35; }

footer { border-top: 0; border-bottom: 1px solid var(--ink); }
footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.noscript { width: min(100%, 760px); margin: 0 auto; padding: 18px; border: 1px solid var(--red); background: var(--paper); }

@media (max-width: 560px) {
  .masthead { align-items: flex-start; }
  .chain-state { max-width: 120px; text-align: right; white-space: normal; }
  .section-heading, .board-controls { align-items: flex-start; }
  .window-cards { grid-template-columns: 1fr; }
  .window-card { border-right: 0; border-bottom: 1px solid var(--ink); }
  .window-card:last-child { border-bottom: 0; }
  .selected-summary { grid-template-columns: 1fr 1fr; }
  .selected-summary > div:nth-child(2) { border-right: 0; }
  .selected-summary > div:nth-child(-n + 2) { border-bottom: 1px solid var(--ink); }
  .receipt-row, footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
