:root {
  color-scheme: light;
  --bg: #ffffff;
  --paper: #f8f9fa;
  --surface: #ffffff;
  --subtle: #f1f3f5;
  --ink: #0f1114;
  --ink-soft: #262a30;
  --muted: #616873;
  --faint: #8e95a0;
  --line: #e6e8ec;
  --line-strong: #c6cbd4;
  --dark-bg: #0f1114;
  --dark-surface: #171a1f;
  --dark-ink: #f4f5f7;
  --dark-muted: #98a0ac;
  --dark-line: #272c34;
  --font-display: "Instrument Serif", "New York", "Iowan Old Style", Baskerville, Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, pre { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 12px; top: -4rem; padding: 8px 14px;
  background: var(--ink); color: #fff; font: 500 12px/1 var(--font-mono); text-decoration: none; z-index: 50;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(1040px, calc(100% - clamp(32px, 7vw, 96px))); margin-inline: auto; }
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-display); font-weight: 400; }

/* Ultra-clean Masthead */
.mast {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.mast-inner {
  height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font: 500 12.5px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.brand-tag {
  font: 400 11px/1 var(--font-mono); color: var(--faint);
  border: 1px solid var(--line); padding: 4px 8px;
}
.nav {
  display: flex; align-items: center; gap: 20px;
  font: 500 12px/1 var(--font-mono); letter-spacing: 0.04em;
}
.nav a { text-decoration: none; color: var(--muted); white-space: nowrap; transition: color 0.15s ease; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .nav-cta { padding: 8px 13px; background: var(--ink); color: #fff; }
.nav .nav-cta:hover { background: #262a30; color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; font: 500 12px/1 var(--font-mono); letter-spacing: 0.05em;
  text-transform: uppercase; text-decoration: none; border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #262a30; }

/* Minimal Gallery Above-the-Fold Hero */
.hero {
  min-height: calc(100svh - 58px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4.5vh, 52px) 0 clamp(44px, 7vh, 72px);
  text-align: center;
}
.hero-inner {
  display: flex; flex-direction: column; align-items: center;
}

.hero-stage {
  position: relative;
  width: min(640px, 100%);
  height: clamp(190px, 27vh, 260px);
}
.hero-stage canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }

.stage-dots {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: 6px; margin-bottom: clamp(18px, 3vh, 28px);
  font: 400 11px/1 var(--font-mono); letter-spacing: 0.06em;
}
.stage-dot {
  background: none; border: 0; padding: 4px 0;
  color: var(--faint); border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.stage-dot:hover { color: var(--ink); }
.stage-dot[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.hero h1 {
  font-size: clamp(3rem, 6.8vw, 5.15rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 15ch;
}
.hero-sub {
  margin-top: 14px;
  font-size: clamp(14.5px, 1.7vw, 16.5px);
  color: var(--muted);
  max-width: 44ch;
  line-height: 1.55;
}

/* Primary Inline CTA Bar (Reserve Inbox / Wire v2 Draft) */
.cta-shell {
  width: min(520px, 100%);
  margin-top: clamp(22px, 3.4vh, 34px);
  text-align: left;
}
.mode-switch {
  display: flex; justify-content: center; gap: 18px;
  margin-bottom: 12px;
  font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.mode-tab {
  background: none; border: 0; border-bottom: 1.5px solid transparent;
  padding: 4px 0 6px; color: var(--faint);
}
.mode-tab:hover { color: var(--ink); }
.mode-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.claim-bar {
  display: flex; align-items: stretch;
  border: 1px solid var(--ink); background: #fff;
  transition: box-shadow 0.18s ease;
}
.claim-bar:focus-within { box-shadow: 0 0 0 3px rgba(15, 17, 20, 0.08); }
.claim-input-group {
  flex: 1; min-width: 0; display: flex; align-items: center;
  padding: 0 14px; font: 500 14px/1 var(--font-mono);
}
.claim-input {
  width: 100%; min-width: 0; border: 0; background: transparent;
  padding: 15px 0; font: 500 14px/1.2 var(--font-mono); color: var(--ink); text-align: right;
}
.claim-input.left { text-align: left; font-family: var(--font-sans); font-weight: 400; }
.claim-input::placeholder { color: var(--faint); font-weight: 400; }
.claim-input:focus { outline: none; }
.claim-suffix { flex: none; color: var(--muted); user-select: none; padding-left: 1px; }
.claim-btn {
  flex: none; border: 0; border-left: 1px solid var(--ink);
  background: var(--ink); color: #fff; padding: 0 20px;
  font: 500 12px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.claim-btn:hover:not(:disabled) { background: #262a30; }
.claim-btn:disabled { opacity: 0.6; cursor: wait; }

.claim-step2 {
  margin-top: 10px; padding: 14px;
  border: 1px solid var(--line); background: var(--paper);
}
.step2-row { display: flex; gap: 8px; }
.step2-input {
  flex: 1; min-width: 0; border: 1px solid var(--line-strong);
  background: #fff; padding: 10px 12px; font-size: 13.5px;
}
.step2-input:focus { outline: none; border-color: var(--ink); }
.step2-submit {
  flex: none; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  padding: 10px 16px; font: 500 12px/1 var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase;
}
.step2-submit:hover:not(:disabled) { background: #262a30; }
.step2-submit:disabled { opacity: 0.6; cursor: wait; }

.claim-hint {
  margin-top: 10px; text-align: center;
  font: 400 11.5px/1.4 var(--font-mono); color: var(--faint);
}
.claim-hint.error { color: #9b2c2c; }
.hero-note-link {
  margin-top: 16px; text-align: center;
  font: 400 12px/1 var(--font-mono); color: var(--muted);
}
.hero-note-link a { text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }
.hero-note-link a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Shareable Ticket */
.ticket {
  position: relative; padding: 22px; border: 1px solid var(--ink); background: var(--paper);
}
.crop { position: absolute; width: 10px; height: 10px; border-color: var(--line-strong); pointer-events: none; z-index: 2; }
.ticket .crop { border-color: var(--ink); }
.crop-tl { top: 8px; left: 8px; border-top: 1px solid; border-left: 1px solid; }
.crop-tr { top: 8px; right: 8px; border-top: 1px solid; border-right: 1px solid; }
.crop-bl { bottom: 8px; left: 8px; border-bottom: 1px solid; border-left: 1px solid; }
.crop-br { bottom: 8px; right: 8px; border-bottom: 1px solid; border-right: 1px solid; }
.ticket-top {
  display: flex; justify-content: space-between; font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.1em; color: var(--muted);
}
.ticket-addr { margin-top: 12px; font: 500 clamp(17px, 3vw, 21px)/1.2 var(--font-mono); word-break: break-all; }
.ticket-note { margin-top: 6px; font-size: 13px; color: var(--muted); }
.ticket-actions {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-strong);
  display: flex; flex-wrap: wrap; gap: 8px;
}
.t-btn {
  display: inline-flex; align-items: center; padding: 9px 14px;
  font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--ink);
}
.t-btn-solid { background: var(--ink); color: #fff; }
.t-btn-outline { background: #fff; color: var(--ink); }

/* Below-the-fold Gallery Plates & Compact Wire */
.band { border-top: 1px solid var(--line); background: var(--paper); padding: 56px 0; }
.plate { position: relative; background: #fff; border: 1px solid var(--line); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tile { display: flex; flex-direction: column; }
.tile-meta {
  display: flex; justify-content: space-between; padding: 14px 18px 0;
  font: 400 10.5px/1 var(--font-mono); letter-spacing: 0.08em; color: var(--faint);
}
.tile-canvas { height: 180px; width: 100%; }
.tile-canvas canvas { display: block; width: 100%; height: 100%; }
.tile-body { padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.tile-body h2 { font-size: 1.45rem; line-height: 1.12; }

.wire-band { border-top: 1px solid var(--line); background: #fff; padding: 56px 0; }
.wire-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 14px;
  margin-bottom: 18px;
}
.wire-head h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); line-height: 1.1; }
.wire-tabs { display: flex; gap: 18px; }
.wire-tab {
  background: none; border: 0; border-bottom: 1.5px solid transparent;
  padding: 6px 0; font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.06em; color: var(--faint);
}
.wire-tab:hover { color: var(--ink); }
.wire-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.code-panel {
  background: var(--dark-bg); color: var(--dark-ink);
  border: 1px solid var(--dark-line); padding: 20px 22px; overflow-x: auto;
}
.code-head {
  display: flex; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--dark-line);
  font: 400 11.5px/1.3 var(--font-mono); color: var(--dark-muted);
}
.code-panel pre { font: 400 12.5px/1.68 var(--font-mono); white-space: pre-wrap; word-break: break-word; }
.tok-k { color: #ffffff; }
.tok-s { color: #b5bcc6; }

/* Position Note (/position) styles preserved intact */
.kicker {
  font: 500 11.5px/1.3 var(--font-mono); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 14px;
}
.paper { background: var(--surface); padding: clamp(44px, 7vh, 72px) 0 80px; }
.paper-head { max-width: 760px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.paper-head h1 { font-size: clamp(2.5rem, 5.2vw, 3.8rem); line-height: 1.04; letter-spacing: -0.02em; }
.paper-lead { margin-top: 16px; font-size: 16px; color: var(--muted); line-height: 1.65; }
.paper-grid {
  margin-top: 40px; display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.72fr);
  gap: clamp(28px, 5vw, 60px); align-items: start;
}
.prose { font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.prose > * + * { margin-top: 22px; }
.prose h2 { font-size: clamp(1.8rem, 3vw, 2.25rem); line-height: 1.12; color: var(--ink); margin-top: 42px; }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 8px; }
.prose code { font: 400 13px/1 var(--font-mono); background: var(--subtle); padding: 2px 5px; }
.callout { padding: 16px 20px; border-left: 2px solid var(--ink); background: var(--paper); }
.callout strong { color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
thead th {
  padding: 10px 12px; background: var(--subtle); border-bottom: 1px solid var(--line);
  font: 500 11px/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); line-height: 1.5; }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
.sidenotes { border-left: 1px solid var(--line); padding-left: 24px; font-size: 12.5px; color: var(--muted); line-height: 1.65; }
.sidenote + .sidenote { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.sidenote-title { font: 500 11px/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin-bottom: 6px; }

.foot {
  border-top: 1px solid var(--line); background: #fff;
  padding: 22px 0; font: 400 11.5px/1.5 var(--font-mono); color: var(--faint);
}
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 820px) {
  .grid-3, .paper-grid { grid-template-columns: minmax(0, 1fr); }
  .sidenotes { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 24px; }
}
@media (max-width: 540px) {
  .brand-tag, .nav-hide { display: none; }
  .nav { gap: 14px; }
  .claim-bar { flex-direction: column; }
  .claim-input { text-align: left; }
  .claim-btn { border-left: 0; border-top: 1px solid var(--ink); padding: 14px 16px; }
  .step2-row { flex-direction: column; }
}

/* DAREP name line (hero) and frozen-wire note */
.hero-name {
  margin-top: 12px;
  font: 400 11.5px/1.5 var(--font-mono); letter-spacing: 0.06em; color: var(--faint);
}
.hero-name abbr { text-decoration: none; color: var(--ink); }
.wire-note {
  margin-top: 12px; max-width: 72ch;
  font: 400 12px/1.6 var(--font-mono); color: var(--muted);
}
