/* ══════════════════════════════════════════════════════════════
   Tokens
   ══════════════════════════════════════════════════════════════ */
:root {
  --bg: #08080a;
  --bg-raised: #101013;
  --panel: rgba(255, 255, 255, 0.026);
  --panel-hover: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #eceae6;
  --text-dim: #94948f;
  --text-faint: #5d5d61;

  /* Bone is the primary action colour. Mint is reserved for live and verified
     states so it always means the same thing. */
  --accent: #eceae6;
  --signal: #5ee6a8;
  --signal-alt: #7d9bff;
  --signal-soft: rgba(94, 230, 168, 0.1);
  --danger: #ff8272;
  --danger-soft: rgba(255, 130, 114, 0.09);

  --font-sans: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', 'Menlo', monospace;
  --font-serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;

  --radius: 10px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shell: 1080px;

  color-scheme: dark;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
}

#root { min-height: 100vh; }

::selection { background: var(--signal); color: #04120b; }

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: inherit; }

.mono { font-family: var(--font-mono); font-variant-ligatures: none; }
.muted { color: var(--text-faint); }

/* ── Wordmark ─────────────────────────────────────────────── */
.wordmark {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  user-select: none;
}
.wordmark-dim { color: var(--text-faint); font-weight: 400; }
.wordmark.small { font-size: 0.95rem; }

/* ══════════════════════════════════════════════════════════════
   Buttons
   ══════════════════════════════════════════════════════════════ */
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-quiet,
.btn-small {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease), opacity 0.18s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0c;
  border: 1px solid var(--accent);
  padding: 0.72rem 1.5rem;
}
.btn-primary:hover:not(:disabled) { background: #fff; border-color: #fff; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 0.72rem 1.5rem;
}
.btn-secondary:hover:not(:disabled) { background: var(--panel-hover); }

.btn-ghost {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--border-strong); background: var(--panel-hover); }

.btn-quiet {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 0.5rem 0.5rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-quiet:hover { color: var(--text); }

.btn-small {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}
.btn-small:hover { color: var(--text); border-color: var(--border-strong); }

button:disabled { opacity: 0.42; cursor: not-allowed; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

.wallet-dropdown {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════
   Landing
   ══════════════════════════════════════════════════════════════ */
.landing {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 2rem;
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 0;
}
.landing-nav-actions { display: flex; gap: 0.6rem; align-items: center; }

.landing-alert {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  background: var(--danger-soft);
  border: 1px solid rgba(255, 130, 114, 0.28);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}
.landing-alert button {
  background: none; border: none; color: inherit;
  font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3.5rem;
  align-items: center;
  padding: 4rem 0 6rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 1.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  line-height: 1.03;
  letter-spacing: -0.042em;
  margin: 0 0 1.6rem;
}
.hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-dim);
}

.hero-body {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0 0 2.25rem;
  max-width: 46ch;
}

.hero-copy { min-width: 0; }

.hero-actions { display: flex; align-items: center; gap: 0.5rem; }

.hero-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin: 1.5rem 0 0;
}

/* ── Scan visual ──────────────────────────────────────────── */
.scan-visual {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.scan-visual-glow {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 230, 168, 0.16), transparent 66%);
  filter: blur(26px);
}

.scan-visual-svg { position: relative; width: 100%; height: 100%; overflow: visible; }

.scan-visual-head {
  stroke-width: 1;
  opacity: 0.22;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: meshDraw 9s var(--ease) infinite;
}

.scan-visual-mesh path {
  stroke-width: 1.3;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  opacity: 0.75;
  animation: meshDraw 9s var(--ease) infinite;
}

.scan-visual-dots circle {
  fill: var(--signal);
  opacity: 0;
  animation: dotIn 9s ease-in-out infinite;
}

.scan-visual-sweep {
  opacity: 0;
  animation: sweep 9s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.scan-visual-readout {
  position: absolute;
  bottom: 4%;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  opacity: 0;
  animation: readout 9s ease-out infinite;
}
.scan-visual-label { color: var(--text-faint); letter-spacing: 0.08em; }
.scan-visual-hash { color: var(--signal); }

@keyframes meshDraw {
  0%, 4%   { stroke-dashoffset: 900; }
  34%, 88% { stroke-dashoffset: 0; }
  100%     { stroke-dashoffset: 900; }
}
/* Opacity only. Scaling an SVG circle transforms about the viewport origin,
   which throws the dots off the face partway through the loop. */
@keyframes dotIn {
  0%, 3%    { opacity: 0; }
  16%, 90%  { opacity: 0.9; }
  100%      { opacity: 0; }
}
@keyframes sweep {
  0%, 36%  { transform: translateY(-10px); opacity: 0; }
  40%      { opacity: 1; }
  62%      { opacity: 1; }
  66%, 100%{ transform: translateY(330px); opacity: 0; }
}
@keyframes readout {
  0%, 62%  { opacity: 0; transform: translateY(6px); }
  70%, 90% { opacity: 1; transform: translateY(0); }
  100%     { opacity: 0; transform: translateY(6px); }
}

/* ── Steps ────────────────────────────────────────────────── */
.steps { border-top: 1px solid var(--border); }

.step {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 2.5rem;
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--border);
}

.step-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 0.35rem;
}

.step-text { max-width: 60ch; }
.step-text h2 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.step-text p { margin: 0; color: var(--text-dim); line-height: 1.65; font-size: 0.95rem; }

/* ── Chain fields ─────────────────────────────────────────── */
.chain-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 3.5rem;
  padding: 4.5rem 0;
  align-items: start;
}
.chain-copy h2 { font-size: 1.7rem; margin-bottom: 0.9rem; letter-spacing: -0.035em; }
.chain-copy p { color: var(--text-dim); line-height: 1.65; margin: 0; max-width: 42ch; }

.chain-fields { list-style: none; margin: 0; padding: 0; }
.chain-fields li {
  display: grid;
  grid-template-columns: 8.5rem 5.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.chain-fields li:first-child { border-top: 1px solid var(--border); }
.chain-fields code { font-family: var(--font-mono); color: var(--text); }
.chain-type { font-family: var(--font-mono); color: var(--signal); font-size: 0.78rem; }
.chain-note { color: var(--text-faint); }

/* ── Closing ──────────────────────────────────────────────── */
.closing {
  text-align: center;
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}
.closing h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  letter-spacing: -0.04em;
  margin-bottom: 2rem;
}

.landing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ── Reveal ───────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════════════════════
   App shell
   ══════════════════════════════════════════════════════════════ */
.app-shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.app-header-brand { display: flex; flex-direction: column; gap: 0.25rem; }
.title-desc { font-size: 0.78rem; color: var(--text-faint); }

.wallet-section { display: flex; gap: 0.5rem; align-items: center; }

.wallet-chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--signal);
  background: var(--signal-soft);
  border: 1px solid rgba(94, 230, 168, 0.22);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
}

/* ── Intro ────────────────────────────────────────────────── */
.app-intro { margin-bottom: 3rem; }
.app-intro h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.2rem);
  letter-spacing: -0.038em;
  margin-bottom: 0.85rem;
}
.app-intro-sub {
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0 0 2rem;
  max-width: 54ch;
  font-size: 0.97rem;
}

.fact-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.fact-row li {
  background: var(--bg);
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.fact-row strong { font-size: 0.85rem; font-weight: 500; }
.fact-row span { font-size: 0.8rem; color: var(--text-faint); line-height: 1.5; }

/* ── Scan section ─────────────────────────────────────────── */
.scan-section { padding-top: 2.5rem; border-top: 1px solid var(--border); margin-bottom: 3rem; }
.scan-section h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.scan-desc { font-size: 0.9rem; color: var(--text-dim); margin: 0 0 1.5rem; max-width: 56ch; }

.contract-bar { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.contract-bar input {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.55rem 0.85rem;
  text-overflow: ellipsis;
  cursor: pointer;
}

.join-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.join-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.65rem 0.85rem;
  width: 100%;
}
.join-input:focus { border-color: var(--border-strong); outline: none; }
.join-actions { display: flex; gap: 0.5rem; }
.join-actions button { flex: 1; }

.scan-area { max-width: 560px; }

/* ── Scan start ───────────────────────────────────────────── */
.scan-start {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}
.scan-start-icon { color: var(--text-faint); width: 48px; height: 48px; }
.scan-start-icon svg { width: 100%; height: 100%; }
.scan-start-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-faint);
  line-height: 1.6;
  max-width: 42ch;
}

/* ── Camera ───────────────────────────────────────────────── */
.camera-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #050506;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.camera-video,
.camera-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scaleX(-1); /* selfie view, canvas has to match the video */
}
.camera-video { object-fit: cover; }

.camera-frame { position: absolute; inset: 1rem; pointer-events: none; }
.camera-frame span {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--border-strong);
  transition: border-color 0.4s var(--ease);
}
.camera-frame span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.camera-frame span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.camera-frame span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.camera-frame span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.camera-container[data-phase='done'] .camera-frame span { border-color: var(--signal); }

/* Yaw meter, shown only while a head turn is being asked for. */
.yaw-meter { position: absolute; top: 1.75rem; left: 50%; transform: translateX(-50%); width: 172px; }
.yaw-track {
  position: relative;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
}
.yaw-target {
  position: absolute;
  top: -2px;
  height: 7px;
  width: 40%;
  border-radius: 3px;
  background: var(--signal-soft);
  border: 1px solid rgba(94, 230, 168, 0.4);
}
.yaw-target.left { left: 0; }
.yaw-target.right { right: 0; }
.yaw-marker {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--accent);
  transition: left 0.12s linear;
}

.scan-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 1.25rem 1.1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}
.scan-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 0.75rem;
}
.scan-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: background 0.3s var(--ease);
}
.scan-dot.live { background: var(--signal); animation: pulse 1.6s ease-in-out infinite; }

.scan-progress-bar { height: 2px; background: rgba(255, 255, 255, 0.14); border-radius: 2px; overflow: hidden; }
.scan-progress-fill { height: 100%; background: var(--signal); transition: width 0.35s var(--ease); }

.scan-cancel {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.scan-cancel:hover { color: var(--text); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ── Result card ──────────────────────────────────────────── */
.result-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.7rem 0;
}
.result-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.result-label { font-size: 0.82rem; color: var(--text-faint); flex-shrink: 0; }
.result-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  text-align: right;
  word-break: break-all;
}
.vector-value { font-size: 0.7rem; color: var(--text-dim); line-height: 1.6; }
.result-value.copyable { cursor: pointer; }
.result-value.copyable:hover { color: var(--signal); }

.score-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--signal);
  background: var(--signal-soft);
  border: 1px solid rgba(94, 230, 168, 0.22);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.scan-actions { display: flex; gap: 0.6rem; margin-top: 1rem; }
.mint-btn { flex: 2; }
.rescan-btn { flex: 1; }

/* ── Toasts ───────────────────────────────────────────────── */
.toast-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  background: var(--danger-soft);
  border: 1px solid rgba(255, 130, 114, 0.28);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.87rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}
.toast-banner.success {
  background: var(--signal-soft);
  border-color: rgba(94, 230, 168, 0.26);
  color: var(--signal);
}
.toast-close {
  background: none; border: none; color: inherit; cursor: pointer;
  font-size: 1.15rem; line-height: 1; padding: 0; flex-shrink: 0;
}

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 6, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  z-index: 50;
  animation: fadeIn 0.2s var(--ease);
}
.modal-content {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.3s var(--ease);
}
.modal-content h2 { font-size: 1.35rem; margin-bottom: 0.65rem; }
.modal-content p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; margin: 0 0 1.5rem; }

.success-check {
  width: 46px; height: 46px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--signal);
  background: var(--signal-soft);
  border: 1px solid rgba(94, 230, 168, 0.3);
}
.success-check svg { width: 22px; height: 22px; }

.hash-display {
  display: block;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  word-break: break-all;
  cursor: pointer;
}
.hash-display:hover { color: var(--signal); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Ledger ───────────────────────────────────────────────── */
.ledger-section { border-top: 1px solid var(--border); padding-top: 2.5rem; }
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.25rem; }
.ledger-head h3 { font-size: 1.05rem; }
.ledger-count { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-faint); }

.ledger-loading { display: grid; place-items: center; padding: 2.5rem; }
.ledger-error, .ledger-empty {
  font-size: 0.85rem;
  padding: 1.5rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.ledger-error { color: var(--danger); border-color: rgba(255, 130, 114, 0.26); }
.ledger-empty { color: var(--text-faint); }

.ledger-scroll { overflow-x: auto; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.ledger-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 1rem 0.65rem 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.ledger-table td { padding: 0.75rem 1rem 0.75rem 0; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ledger-table td.mono { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim); }
.ledger-table tbody tr:hover td { color: var(--text); }

.loading-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--signal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ══════════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding: 2.5rem 0 4rem; }
  .scan-visual { max-width: 340px; margin: 0 auto; width: 100%; }
  .chain-section { grid-template-columns: 1fr; gap: 2rem; padding: 3.5rem 0; }
  .step { grid-template-columns: 1fr; gap: 0.85rem; padding: 2.25rem 0; }
  .step-label { padding-top: 0; }
}

@media (max-width: 640px) {
  .landing, .app-shell { padding-left: 1.25rem; padding-right: 1.25rem; }
  .hero h1 { font-size: 2.1rem; }
  .fact-row { grid-template-columns: 1fr; }
  .chain-fields li { grid-template-columns: 1fr auto; row-gap: 0.25rem; }
  .chain-note { grid-column: 1 / -1; }
  .app-header { flex-direction: column; align-items: flex-start; }
  .wallet-section { width: 100%; }
  .scan-actions { flex-direction: column; }
  .closing { padding: 4rem 0; }
}

/* ══════════════════════════════════════════════════════════════
   Reduced motion
   ══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scan-visual-mesh path { stroke-dashoffset: 0; }
  .scan-visual-dots circle { opacity: 0.9; }
  .scan-visual-readout { opacity: 1; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ── Readiness notice ─────────────────────────────────────── */
.readiness {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 2rem;
}
.readiness-net {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
  background: var(--signal-soft);
  border: 1px solid rgba(94, 230, 168, 0.22);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  flex-shrink: 0;
}
.readiness-body p { margin: 0; font-size: 0.85rem; line-height: 1.6; color: var(--text-dim); }
.readiness-body p + p { margin-top: 0.6rem; }
.readiness-body strong { color: var(--text); font-weight: 500; }
.readiness-body code { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text); }
