/* ==========================================================================
   Cell Automata (CELLA) — visual system
   Specimen-archive / scientific-editorial aesthetic.
   ========================================================================== */

:root {
  /* core palette */
  --ink: #08100d;
  --paper: #f4f0e6;
  --bone: #ece6d6;
  --slate: #1d2826;
  --rule: rgba(244, 240, 230, 0.10);
  --rule-strong: rgba(244, 240, 230, 0.20);
  --muted: #8a9690;
  --muted-strong: #b6beb8;

  /* signal palette */
  --life: #5fa66e;             /* viridian — life */
  --life-soft: rgba(95, 166, 110, 0.18);
  --mut: #c93a83;              /* magenta — mutation/mint */
  --mut-soft: rgba(201, 58, 131, 0.18);
  --amber: #e0a93c;            /* notation amber */
  --abort: #c0463a;            /* anomaly red */

  /* surface + shadow */
  --panel: #11181a;
  --panel-2: #182123;
  --inset: rgba(0, 0, 0, 0.32);
  --hover: rgba(244, 240, 230, 0.04);

  /* type scale (locked, no creeping) */
  --t-display: clamp(56px, 9vw, 128px);
  --t-h1: clamp(40px, 5vw, 72px);
  --t-h2: clamp(28px, 3.4vw, 44px);
  --t-h3: 22px;
  --t-lead: 19px;
  --t-body: 16px;
  --t-meta: 13px;
  --t-mini: 11px;

  /* spacing rhythm — 8px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  /* layout */
  --maxw: 1200px;
  --topbar-h: 64px;
  --r-1: 2px; --r-2: 4px; --r-3: 8px;

  /* motion */
  --ease: cubic-bezier(0.4, 0, 0.1, 1);
  --t-fast: 120ms;
  --t-med: 220ms;
  --t-slow: 440ms;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  font-feature-settings: 'cv01', 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint specimen-paper grain over everything (not on body to avoid blend issues) */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.96  0 0 0 0 0.94  0 0 0 0 0.90  0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.6;
}

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

img, svg { display: block; max-width: 100%; }

/* ---- type ---------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: 'Fraunces', 'Editorial New', 'Times New Roman', serif;
  font-weight: 400;
  font-variation-settings: "opsz" 96, "SOFT" 30, "wonk" 0;
  letter-spacing: -0.012em;
  line-height: 1.06;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
em, .italic { font-style: italic; }

.mono { font-family: 'Geist Mono', 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace; font-variant-numeric: tabular-nums; letter-spacing: -0.005em; }

.label, .eyebrow {
  font-family: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--t-mini);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.lede {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--muted-strong);
  font-variation-settings: "opsz" 24, "SOFT" 80;
  max-width: 60ch;
}

.dim { color: var(--muted); }
.fg { color: var(--paper); }
.life-color { color: var(--life); }
.mut-color { color: var(--mut); }

/* ---- topbar -------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--s-5);
  padding: 0 var(--s-5);
  background: rgba(8, 16, 13, 0.84);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--life-soft), transparent);
  pointer-events: none;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 22px;
  font-variation-settings: "opsz" 24, "SOFT" 80, "wonk" 1;
  color: var(--paper);
}
.brand .mark {
  width: 28px; height: 28px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5px;
  flex-shrink: 0;
}
.brand .mark span {
  display: block; background: var(--paper);
}
.brand .mark span:nth-child(2),
.brand .mark span:nth-child(5),
.brand .mark span:nth-child(11),
.brand .mark span:nth-child(14),
.brand .mark span:nth-child(16) { background: transparent; }
.brand .mark span:nth-child(7),
.brand .mark span:nth-child(10) { background: var(--life); }
.brand small {
  font-family: 'Geist Mono', monospace;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-left: 4px;
}

.nav { display: flex; gap: 2px; margin-left: var(--s-4); }
.nav a {
  padding: var(--s-2) var(--s-3);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-strong);
  letter-spacing: 0.005em;
  border-radius: var(--r-2);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav a:hover { color: var(--paper); background: var(--hover); }
.nav a.on { color: var(--paper); position: relative; }
.nav a.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px;
  height: 1px; background: var(--life);
}

.topbar-r { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); }

.balance-pill {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--paper);
}
.balance-pill .unit {
  font-size: 10px; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: var(--r-2);
  border: 1px solid transparent;
  background: transparent;
  color: var(--paper);
  transition: all var(--t-fast) var(--ease);
}
.btn-primary {
  background: var(--paper); color: var(--ink);
  border-color: var(--paper);
}
.btn-primary:hover { background: var(--life); border-color: var(--life); color: var(--ink); }
.btn-ghost { border-color: var(--rule-strong); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); background: var(--hover); }
.btn-mut { background: var(--mut); color: var(--paper); border-color: var(--mut); }
.btn-mut:hover { background: #d44a90; border-color: #d44a90; }
.btn-life { background: var(--life); color: var(--ink); border-color: var(--life); font-weight: 700; }
.btn-life:hover { background: #6cb87b; border-color: #6cb87b; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-connect {
  padding: 10px 18px;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 600;
  background: var(--life); color: var(--ink); border: 0;
  border-radius: var(--r-2);
  transition: filter var(--t-fast) var(--ease);
}
.btn-connect:hover { filter: brightness(1.08); }
.btn-connect.is-connected {
  background: var(--panel); color: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 13px;
}
.btn-connect.is-connected::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%;
  background: var(--life);
  box-shadow: 0 0 0 2px rgba(95, 166, 110, 0.25);
}

/* ---- layout primitives --------------------------------------------------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-9) var(--s-5);
}
.section-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s-9) var(--s-5);
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--rule);
}
.section-head .num {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--life);
  text-transform: uppercase;
}
.section-head .meta { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--life);
}
.kicker .bar { display: block; width: 28px; height: 1px; background: var(--life); }

/* ---- hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-9) var(--s-5) var(--s-7);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--s-8);
  align-items: center;
  min-height: 76vh;
}
.hero-copy { max-width: 36ch; }
.hero h1 {
  font-size: var(--t-display);
  line-height: 0.94;
  letter-spacing: -0.022em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "wonk" 0;
  margin-top: var(--s-4);
}
.hero h1 em { font-style: italic; color: var(--life); font-variation-settings: "opsz" 144, "SOFT" 100, "wonk" 1; }
.hero p { color: var(--muted-strong); font-size: var(--t-lead); margin-top: var(--s-5); max-width: 38ch; }
.hero-cta {
  display: flex; gap: var(--s-3); margin-top: var(--s-6); flex-wrap: wrap;
}

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
  background: var(--rule);
}
.hero-stats > div {
  background: var(--ink);
  padding: var(--s-3) 0;
}
.hero-stats .v {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 36px;
  color: var(--paper);
  font-variation-settings: "opsz" 48, "SOFT" 80;
}
.hero-stats .l {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 4px;
}

/* the 16x16 wall of 256 cells */
.wall {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  grid-template-rows: repeat(16, 1fr);
  gap: 2px;
  aspect-ratio: 1;
  width: 100%;
  max-width: 540px;
  background: var(--rule);
  padding: 2px;
  border: 1px solid var(--rule-strong);
  margin-left: auto;
}
.wall .cell-tile {
  aspect-ratio: 1;
  background: var(--panel);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.wall .cell-tile:hover { transform: scale(1.5); z-index: 5; box-shadow: 0 8px 24px rgba(0,0,0,0.6); }
.wall .cell-tile.minted { background: linear-gradient(135deg, #1a2522 0%, #243030 100%); }
.wall .cell-tile.you { box-shadow: inset 0 0 0 1px var(--life); }
.wall .cell-tile svg { width: 100%; height: 100%; image-rendering: pixelated; }
.wall .cell-tile img { width: 100%; height: 100%; image-rendering: pixelated; object-fit: cover; display: block; }

/* ---- panels -------------------------------------------------------------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: var(--s-5);
}
.panel-tight { padding: var(--s-4); }
.panel-2 { background: var(--panel-2); }

.divider {
  height: 1px; background: var(--rule); margin: var(--s-7) 0;
}
.divider-strong { background: var(--rule-strong); }

/* ---- cell card ----------------------------------------------------------- */
.cell-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  display: flex; flex-direction: column;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.cell-card:hover { border-color: var(--rule-strong); transform: translateY(-2px); }
.cell-card .canvas {
  aspect-ratio: 1;
  background: var(--panel-2);
  border-bottom: 1px solid var(--rule);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.cell-card .canvas svg { width: 86%; height: 86%; image-rendering: pixelated; }
.cell-card .canvas img { width: 86%; height: 86%; image-rendering: pixelated; object-fit: contain; }
.cell-card .meta-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-3);
}
.cell-card .id {
  font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--muted-strong);
}
.cell-card .status {
  font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.cell-card .status.life { color: var(--life); }
.cell-card .status.mut  { color: var(--mut); }

/* gallery grid */
.cell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--s-3);
}
.cell-grid-tight {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--s-2);
}

/* ---- forms --------------------------------------------------------------- */
.field { display: block; margin-top: var(--s-4); }
.field > label {
  display: block;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: var(--s-2);
}
.field input[type="text"], .field input[type="number"], .field textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: 'Geist Mono', monospace;
  font-size: 18px;
  color: var(--paper);
  background: var(--panel-2);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-2);
  outline: none;
  transition: border-color var(--t-fast) var(--ease);
}
.field input:focus, .field textarea:focus { border-color: var(--life); box-shadow: 0 0 0 3px rgba(95, 166, 110, 0.15); }

.summary-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: var(--s-3) 0;
  border-top: 1px dashed var(--rule);
  font-size: 14px;
}
.summary-row .k { color: var(--muted-strong); font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.summary-row .v { font-family: 'Geist Mono', monospace; color: var(--paper); }
.summary-row.total .v { font-family: 'Fraunces', serif; font-style: italic; font-size: 22px; }

/* ---- socials ------------------------------------------------------------- */
.socials {
  display: flex; gap: 8px;
  margin-top: var(--s-4);
  flex-wrap: wrap;
}
.social {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted-strong);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.social:hover { color: var(--paper); border-color: var(--paper); background: var(--hover); }
.social svg { display: block; flex-shrink: 0; }
.social-x:hover     { color: var(--paper); border-color: var(--paper); }
.social-tg:hover    { color: var(--life); border-color: var(--life); }

/* topbar-only icon-buttons (no label) */
.social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.social-icon:hover { color: var(--paper); border-color: var(--paper); background: var(--hover); }
.social-icon[aria-label="Telegram"]:hover { color: var(--life); border-color: var(--life); }
.social-icon svg { display: block; }
@media (max-width: 600px) {
  .topbar-r .social-icon { display: none; }   /* hide topbar icons on narrow screens; footer keeps them */
}

/* ---- pre-deploy banner --------------------------------------------------- */
.predeploy-banner {
  background: linear-gradient(180deg, rgba(224, 169, 60, 0.08), transparent);
  border-bottom: 1px solid rgba(224, 169, 60, 0.25);
  padding: 10px 24px;
  text-align: center;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}
.predeploy-banner b { color: var(--paper); }

/* ---- mint quantity selector --------------------------------------------- */
.qty-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.qty-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  padding: 18px 8px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-variation-settings: "opsz" 96, "SOFT" 80, "wonk" 0;
  font-size: 32px;
  color: var(--paper);
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.qty-btn small {
  font-family: 'Geist Mono', monospace;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.qty-btn:hover { border-color: var(--rule-strong); transform: translateY(-1px); }
.qty-btn.on {
  background: var(--life-soft);
  border-color: var(--life);
  color: var(--life);
}
.qty-btn.on small { color: var(--life); }
@media (max-width: 600px) {
  .qty-grid { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .qty-btn { font-size: 22px; padding: 14px 4px; }
  .qty-btn small { font-size: 9px; }
}

/* ---- detail / hero --------------------------------------------------- */
.detail-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s-7);
  padding: var(--s-7) var(--s-5);
  max-width: var(--maxw); margin: 0 auto;
}
.detail-canvas {
  background: var(--panel);
  border: 1px solid var(--rule);
  aspect-ratio: 1;
  display: grid; place-items: center;
  position: relative;
}
.detail-canvas svg { width: 84%; height: 84%; image-rendering: pixelated; }
.detail-canvas img { width: 84%; height: 84%; image-rendering: pixelated; object-fit: contain; }
.detail-canvas .corner-tag {
  position: absolute; top: 12px; left: 12px;
  font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
.detail-canvas .corner-id {
  position: absolute; bottom: 12px; right: 12px;
  font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--muted-strong);
}

.detail-meta { padding-top: var(--s-3); }
.detail-meta h1 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(48px, 6vw, 72px);
  font-variation-settings: "opsz" 96, "SOFT" 80, "wonk" 1;
  letter-spacing: -0.018em;
  margin-bottom: var(--s-3);
}
.detail-meta .props {
  margin-top: var(--s-5);
  border-top: 1px solid var(--rule);
}
.detail-meta .prop {
  display: grid; grid-template-columns: 140px 1fr;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.detail-meta .prop .k {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: center;
}
.detail-meta .prop .v {
  font-family: 'Geist Mono', monospace;
  color: var(--paper);
  word-break: break-all;
}

/* ---- toast --------------------------------------------------------------- */
.toast-stack {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--life);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--paper);
  border-radius: 2px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  pointer-events: auto;
  animation: t-in 220ms var(--ease);
  max-width: 320px;
}
.toast.error { border-left-color: var(--abort); }
.toast.mut { border-left-color: var(--mut); }
.toast.fade { opacity: 0; transition: opacity 320ms var(--ease); }
@keyframes t-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}

/* ---- footer -------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--rule);
  padding: var(--s-7) var(--s-5);
  margin-top: var(--s-9);
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-6);
  align-items: start;
}
.footer-brand .lede { margin-top: var(--s-3); font-size: 14px; max-width: 30ch; }
.footer-col h4 {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s-3);
  font-weight: 500;
}
.footer-col ul { list-style: none; display: grid; gap: var(--s-2); }
.footer-col a { font-size: 14px; color: var(--muted-strong); transition: color var(--t-fast) var(--ease); }
.footer-col a:hover { color: var(--paper); }
.footer-bottom {
  max-width: var(--maxw); margin: var(--s-6) auto 0;
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: var(--s-3);
  font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--muted);
  letter-spacing: 0.14em; text-transform: uppercase;
}

/* ---- profile-specific ---------------------------------------------------- */
.profile-head {
  max-width: var(--maxw); margin: 0 auto;
  padding: var(--s-7) var(--s-5) var(--s-5);
  border-bottom: 1px solid var(--rule);
}
.profile-id {
  display: grid; grid-template-columns: 1fr auto; gap: var(--s-5);
  align-items: end;
}
.profile-id .addr {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-variation-settings: "opsz" 96, "SOFT" 100, "wonk" 1;
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.014em;
  word-break: break-all;
}
.profile-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: var(--s-6) 0;
  background: var(--rule);
}
.profile-stats > div {
  background: var(--ink); padding: var(--s-4); display: flex; flex-direction: column; gap: 4px;
}
.profile-stats .v { font-family: 'Fraunces', serif; font-style: italic; font-size: 36px; font-variation-settings: "opsz" 48, "SOFT" 80; }
.profile-stats .l { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* ---- empty / loading ----------------------------------------------------- */
.empty {
  padding: var(--s-7);
  text-align: center;
  border: 1px dashed var(--rule);
  color: var(--muted-strong);
}
.empty h3 { font-family: 'Fraunces', serif; font-style: italic; font-size: 28px; margin-bottom: var(--s-3); color: var(--paper); }

.spin {
  display: inline-block; width: 14px; height: 14px;
  border: 1.5px solid var(--rule-strong);
  border-top-color: var(--life);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: var(--s-7) var(--s-4); gap: var(--s-6); min-height: auto; }
  .wall { max-width: 100%; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; padding: var(--s-5) var(--s-4); gap: var(--s-5); }
  .profile-id { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .nav { display: none; }
  .hero h1 { font-size: 56px; }
  .hero-stats { grid-template-columns: 1fr 1fr 1fr; }
  .hero-stats .v { font-size: 28px; }
  .balance-pill { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: var(--s-5); }
}

/* ---- prose pages (about, etc) ------------------------------------------- */
.prose { max-width: 680px; }
.prose p { margin: var(--s-4) 0; line-height: 1.7; color: var(--muted-strong); }
.prose h2 { margin-top: var(--s-7); margin-bottom: var(--s-3); }
.prose h3 { margin-top: var(--s-5); margin-bottom: var(--s-2); }
.prose code {
  font-family: 'Geist Mono', monospace;
  font-size: 0.92em;
  padding: 1px 6px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--life);
}
.prose pre {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: var(--s-4);
  border-radius: var(--r-2);
  overflow-x: auto;
  font-family: 'Geist Mono', monospace; font-size: 13px;
  margin: var(--s-4) 0;
}
.prose ol, .prose ul { padding-left: var(--s-5); margin: var(--s-3) 0; color: var(--muted-strong); }
.prose li { margin: var(--s-2) 0; line-height: 1.65; }
.prose .drop::first-letter {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 5em;
  float: left;
  line-height: 0.85;
  margin: 6px 8px 0 0;
  color: var(--life);
  font-variation-settings: "opsz" 144, "SOFT" 100, "wonk" 1;
}

.toc {
  position: sticky; top: calc(var(--topbar-h) + var(--s-4));
  border-left: 1px solid var(--rule);
  padding: var(--s-3) var(--s-4);
  font-size: 13px;
}
.toc h4 { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-3); font-weight: 500; }
.toc a { display: block; padding: 4px 0; color: var(--muted-strong); transition: color var(--t-fast) var(--ease); }
.toc a:hover, .toc a.active { color: var(--life); }
