/* Claude — design system v3.
   "Editorial-Primitive" / Artifact Humanist (per Stitch DESIGN.md).
   Sharp 0px corners, tonal layering, conic-gradient frames,
   warm earth palette, brutalist-editorial typography. */

:root {
  /* ─── Surfaces (tonal layering) ─────────────────────────── */
  --ink:                       #120e0a;   /* deep warm ink (background) */
  --surface:                   #17130e;
  --surface-container-lowest:  #110d09;
  --surface-container-low:     #1f1b16;
  --surface-container:         #231f1a;
  --surface-container-high:    #2e2924;
  --surface-container-highest: #39342f;
  --surface-bright:            #3e3833;

  /* legacy aliases used widely in earlier markup */
  --ink-2:   var(--surface-container-low);
  --ink-3:   var(--surface-container);
  --paper:   #f4ecdf;                     /* warm cream foreground */

  /* ─── Foreground ────────────────────────────────────────── */
  --on-surface:         #ebe1d9;
  --on-surface-variant: #dbc1b9;          /* warm sub-text */
  --outline:            #a38c85;
  --outline-variant:    #55433d;

  /* legacy slate ramps still referenced in old code */
  --slate-100: #ede1cd;
  --slate-300: #c4b8a4;
  --slate-500: var(--outline);
  --slate-700: var(--outline-variant);
  --slate-900: var(--surface-container);

  /* ─── Brand ─────────────────────────────────────────────── */
  --primary:            #d97757;          /* coral (primary actions) */
  --primary-soft:       #ffb59e;          /* surface-tint variant */
  --on-primary:         #5c1902;          /* dark text on coral */
  --secondary:          #ffb68a;          /* peach */
  --tertiary:           #f5b3dd;          /* pink (rare indicator) */
  --tertiary-container: #bc7fa7;
  --terracotta:         #b85a3d;
  --plum:               #6e3b5f;
  --gold:               #d4a27f;
  --ember:              #ff5b3a;          /* mythic-only */
  --ivory:              #fff5d6;
  --sage:               #6cae6a;          /* success */
  --warn:               #c64a3a;

  /* legacy aliases */
  --coral:        var(--primary);
  --peach:        var(--secondary);
  --rust:         var(--terracotta);
  --btc:          var(--primary);
  --signal:       var(--sage);
  --danger:       var(--warn);
  --border:        #221a14;
  --border-bright: var(--outline-variant);

  /* ─── Tier colours ──────────────────────────────────────── */
  --tier-1: #a38c85;   /* common - cool slate */
  --tier-2: #d4a27f;   /* uncommon - gold */
  --tier-3: #f5b3dd;   /* rare - pink (epic vibe) */
  --tier-4: #d97757;   /* legendary - coral */
  --tier-5: #ff5b3a;   /* mythic - ember */

  /* ─── Typography ────────────────────────────────────────── */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans:    "Inter",         ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* ─── Layout ────────────────────────────────────────────── */
  --max:    1240px;
  --gutter: 40px;
  --radius: 0;       /* SHARP. 0px corners everywhere. */
  --radius-sm: 0;
}
@media (max-width: 980px) { :root { --gutter: 24px; } }
@media (max-width: 680px) { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
body {
  /* Subtle warm radial ambience. No neon. */
  background:
    radial-gradient(1200px 700px at 8% -8%,  rgba(217,119,87,0.10),  transparent 60%),
    radial-gradient(900px 600px at 96% 0%,   rgba(244,165,116,0.06), transparent 60%),
    radial-gradient(1400px 1000px at 50% 110%, rgba(110,59,95,0.07), transparent 65%),
    var(--surface);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: transparent; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; background: transparent; border: 0; outline: 0; }
img { display: block; max-width: 100%; }
::selection { background: rgba(217,119,87,0.34); color: var(--on-surface); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ─── Brand mark (the C symbol) ─────────────────────────── */
.brand-mark {
  width: 28px; height: 28px;
  display: inline-block; flex-shrink: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path fill='%23d97757' d='M24.4 8.9 A11 11 0 1 0 24.4 23.1 L20.6 19.8 A6 6 0 1 1 20.6 12.2 Z'/><circle cx='16' cy='16' r='2.6' fill='%23d97757'/></svg>") center/contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(217,119,87,0.4));
}
.brand-mark.lg  { width: 36px;  height: 36px; }
.brand-mark.xl  { width: 96px;  height: 96px; }
.brand-mark.xxl { width: 160px; height: 160px; }

/* ─── Nav ───────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(18,14,10,0.85);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  height: 64px; padding: 0 var(--gutter);
  max-width: var(--max); margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: 0.02em; font-size: 18px;
  text-transform: uppercase;
}
.nav-links { display: flex; gap: 28px; flex: 1; justify-content: center; }
.nav-links a {
  font-family: var(--font-sans); font-weight: 500; font-size: 14px;
  color: var(--on-surface-variant);
  padding: 6px 0; border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-links a:hover { color: var(--on-surface); }
.nav-links a.active { color: var(--on-surface); border-bottom-color: var(--primary); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border: 1px solid var(--outline-variant); border-radius: 0;
  background: rgba(255,255,255,0.02);
  font-family: var(--font-mono); font-size: 11px; color: var(--on-surface);
}
.nav-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sage); box-shadow: 0 0 8px rgba(108,174,106,0.7);
  animation: ping 1.8s ease-in-out infinite;
}
@keyframes ping { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.7); } }
@media (max-width: 980px) { .nav-links { display: none; } }

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px;
  font-family: var(--font-sans); font-weight: 600; font-size: 13px;
  letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: 0;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary  { background: var(--on-surface); color: var(--surface); }
.btn-primary:hover:not(:disabled) { background: var(--on-surface-variant); }
.btn-outline  { border-color: var(--outline-variant); color: var(--on-surface); background: transparent; }
.btn-outline:hover { border-color: var(--on-surface); }
.btn-ghost    { color: var(--on-surface-variant); }
.btn-ghost:hover { color: var(--on-surface); background: rgba(255,255,255,0.04); }
.btn-orange   {
  background: var(--primary); color: var(--on-primary);
  font-weight: 700;
}
.btn-orange:hover:not(:disabled) { background: var(--primary-soft); }
.btn-block    { width: 100%; }
.btn-sm       { height: 34px; padding: 0 14px; font-size: 11px; }

/* ─── Cards / surfaces (sharp corners) ──────────────────── */
.card {
  background: var(--surface-container-low);
  border: 1px solid var(--border);
  border-radius: 0;
}
.card-pad { padding: 24px; }
.card:hover { border-color: var(--outline-variant); }

/* Gradient-border emphasis card */
.card-grad {
  position: relative;
  border: 1px solid transparent;
  border-radius: 0;
  background:
    linear-gradient(var(--surface-container-low), var(--surface-container-low)) padding-box,
    linear-gradient(135deg, rgba(217,119,87,0.7), rgba(110,59,95,0.5) 60%, rgba(212,162,127,0.6)) border-box;
}

/* ─── Typography helpers ────────────────────────────────── */
.label-mono, .label-caps {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--on-surface-variant); font-weight: 500;
}
.value-mono   { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mono         { font-family: var(--font-mono); }
.tabular      { font-variant-numeric: tabular-nums; }
.muted        { color: var(--on-surface-variant); }
.dim          { color: var(--outline); }
.display      { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.035em; }
.kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--on-surface-variant); font-weight: 500;
}
.grad-text {
  background: linear-gradient(95deg, var(--primary) 0%, var(--plum) 60%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ─── Inputs ────────────────────────────────────────────── */
.input, .select {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--outline-variant); border-radius: 0;
  background: var(--surface-container-low); color: var(--on-surface);
  font-family: var(--font-mono); font-size: 14px;
  transition: border-color .15s ease;
}
.input:focus, .select:focus { border-color: var(--on-surface); }
.textarea  { min-height: 100px; padding: 12px 14px; line-height: 1.6; resize: vertical; }

.search-input {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px;
  border: 1px solid var(--outline-variant); background: var(--surface-container-low);
  color: var(--on-surface-variant); font-family: var(--font-mono); font-size: 13px;
  min-width: 220px;
}
.search-input input { flex: 1; height: 100%; color: var(--on-surface); font-family: var(--font-mono); font-size: 13px; }
.search-input::before {
  content: "⌕"; color: var(--outline); font-size: 16px;
}

/* ─── Hero v2 ───────────────────────────────────────────── */
.hero-v2 {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.hero-v2-grid {
  display: grid; grid-template-columns: 1.18fr 1fr; gap: 56px; align-items: center;
}
@media (max-width: 980px) { .hero-v2-grid { grid-template-columns: 1fr; gap: 36px; } }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--outline-variant); border-radius: 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--on-surface-variant);
  background: rgba(255,255,255,0.02);
}
.hero-eyebrow .glyph { color: var(--primary); font-size: 12px; }

.hero-v2 h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.035em;
  font-size: clamp(40px, 6.5vw, 72px); line-height: 1.05; margin: 24px 0 22px;
}
.hero-v2 h1 .grad { background: linear-gradient(95deg, var(--primary), var(--plum) 60%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-v2 p.lede   { color: var(--on-surface-variant); max-width: 56ch; font-size: 17px; line-height: 1.65; }
.hero-v2 .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-v2 .meta-row {
  display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px;
  font-family: var(--font-mono); font-size: 12px; color: var(--outline);
  letter-spacing: 0.04em;
}
.hero-v2 .meta-row b { color: var(--on-surface); font-weight: 600; }

/* ─── Art display (artifact tile w/ conic frame) ─────────── */
.art-display {
  position: relative; width: 100%; max-width: 460px; margin-left: auto;
  aspect-ratio: 1 / 1;
}
.art-display::before {
  /* outer aura - kept subtle */
  content: ""; position: absolute; inset: -28px;
  background: radial-gradient(circle, rgba(255,91,58,0.25), transparent 70%);
  filter: blur(24px); z-index: 0;
  animation: aura-pulse 5s ease-in-out infinite;
}
@keyframes aura-pulse { 0%, 100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.03); } }
.art-display .frame {
  position: absolute; inset: 0;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from 90deg, var(--primary), var(--plum), var(--gold), var(--primary)) border-box;
  border: 2px solid transparent; overflow: hidden; z-index: 1;
}
.art-display .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-display .pin {
  position: absolute; left: 16px; top: 16px; z-index: 2;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; font-weight: 500;
  background: var(--primary); color: var(--on-primary);
  padding: 5px 11px;
  text-transform: uppercase;
}
.art-display .caption {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  font-family: var(--font-mono); font-size: 11px;
  background: rgba(18,14,10,0.78); border: 1px solid var(--outline-variant);
  padding: 6px 10px; backdrop-filter: blur(4px);
}

/* ─── Page head ─────────────────────────────────────────── */
.page-head { padding: 80px 0 40px; }
.page-head h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.035em;
  font-size: clamp(40px, 5.6vw, 64px); line-height: 1.05; margin: 18px 0 0;
}
.page-head h1.upper { text-transform: uppercase; letter-spacing: -0.025em; }
.page-head .grad { background: linear-gradient(92deg, var(--primary), var(--plum)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head p.sub {
  color: var(--on-surface-variant); margin: 22px 0 0; padding: 6px 0 6px 18px;
  border-left: 1px solid var(--outline-variant); max-width: 60ch;
  font-size: 16px; line-height: 1.65; position: relative;
}
.page-head p.sub::before {
  content: ""; position: absolute; left: -1px; top: 6px;
  width: 1px; height: 28px;
  background: linear-gradient(180deg, var(--primary), transparent);
}
.page-head::after {
  content: ""; display: block; height: 1px; margin-top: 44px;
  background: linear-gradient(90deg, transparent, var(--outline-variant) 8%, var(--outline-variant) 92%, transparent);
}

/* Section divider ornament */
.divider-ornament {
  display: flex; align-items: center; gap: 14px;
  color: var(--outline-variant); margin: 80px 0 60px;
}
.divider-ornament::before, .divider-ornament::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--outline-variant) 40%, var(--outline-variant) 60%, transparent);
}
.divider-ornament .glyph { color: var(--primary); font-size: 12px; letter-spacing: 0.2em; font-family: var(--font-mono); text-transform: uppercase; }

/* ─── Footer ────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); margin-top: 96px;
  padding: 36px 0; color: var(--outline);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.footer-row {
  display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 24px;
  align-items: center;
}
.footer-row .left  { text-align: left;   font-family: var(--font-display); font-size: 14px; letter-spacing: 0.04em; color: var(--primary); }
.footer-row .mid   { text-align: center; color: var(--outline); }
.footer-row .right { text-align: right; display: inline-flex; gap: 22px; justify-content: flex-end; }
.footer-row .right a { color: var(--on-surface-variant); text-decoration: underline; text-decoration-color: var(--outline-variant); text-underline-offset: 4px; }
.footer-row .right a:hover { color: var(--on-surface); text-decoration-color: var(--on-surface); }
@media (max-width: 720px) {
  .footer-row { grid-template-columns: 1fr; text-align: center; gap: 14px; }
  .footer-row .left, .footer-row .right, .footer-row .mid { text-align: center; justify-content: center; }
}

/* ─── Tier chips + tier pills + tier glows ──────────────── */
.tier-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 0;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 500;
}
.tier-1 { background: rgba(163,140,133,0.10); color: var(--tier-1); border: 1px solid rgba(163,140,133,0.30); }
.tier-2 { background: rgba(212,162,127,0.10); color: var(--tier-2); border: 1px solid rgba(212,162,127,0.32); }
.tier-3 { background: rgba(245,179,221,0.10); color: var(--tier-3); border: 1px solid rgba(245,179,221,0.34); }
.tier-4 { background: rgba(217,119,87,0.12);  color: var(--tier-4); border: 1px solid rgba(217,119,87,0.40); }
.tier-5 {
  background: rgba(255,91,58,0.12); color: var(--tier-5);
  border: 1px solid rgba(255,91,58,0.46);
}

/* Tier filter pill (gallery toolbar) - rectangular with bullet */
.tier-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--outline-variant);
  background: var(--surface-container-low);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--on-surface-variant);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.tier-pill:hover { color: var(--on-surface); border-color: var(--outline); }
.tier-pill.active { color: var(--on-surface); border-color: var(--primary); }
.tier-pill .c   { font-family: var(--font-mono); color: var(--outline); margin-left: 2px; }
.tier-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tier-1); }
.tier-pill[data-t="2"] .dot { background: var(--tier-2); }
.tier-pill[data-t="3"] .dot { background: var(--tier-3); }
.tier-pill[data-t="4"] .dot { background: var(--tier-4); }
.tier-pill[data-t="5"] .dot { background: var(--tier-5); }

/* ─── Toast ─────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 200;
  background: var(--surface-container-low); border: 1px solid var(--outline-variant);
  padding: 12px 16px;
  font-family: var(--font-mono); font-size: 12px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.8);
  transform: translateY(8px); opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: var(--sage); color: var(--sage); }
.toast.error   { border-color: var(--warn); color: var(--warn); }

/* ─── Status pills ──────────────────────────────────────── */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-family: var(--font-mono); font-size: 11px; }
.status .dot { width: 6px; height: 6px; border-radius: 50%; }
.status-pending  { background: rgba(217,119,87,0.10); color: var(--primary); border: 1px solid rgba(217,119,87,0.30); }
.status-pending  .dot { background: var(--primary); animation: ping 2s ease-in-out infinite; }
.status-complete { background: rgba(108,174,106,0.10); color: var(--sage);  border: 1px solid rgba(108,174,106,0.30); }
.status-complete .dot { background: var(--sage); }
.status-failed   { background: rgba(198,74,58,0.10);   color: var(--warn);  border: 1px solid rgba(198,74,58,0.30); }
.status-failed   .dot { background: var(--warn); }

/* ─── Tabs (underline style) ────────────────────────────── */
.tabs {
  display: inline-flex; gap: 0; border-bottom: 1px solid var(--border);
}
.tab {
  padding: 10px 16px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--on-surface-variant); cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
  background: transparent;
}
.tab:hover { color: var(--on-surface); }
.tab.active { color: var(--on-surface); border-bottom-color: var(--primary); }

/* Boxed tab style (legacy compatibility) */
.tabs-boxed {
  display: inline-flex; gap: 0; border: 1px solid var(--outline-variant);
  background: var(--surface-container-low); border-bottom: 1px solid var(--outline-variant);
}
.tabs-boxed .tab { border-bottom: 0; padding: 8px 14px; }
.tabs-boxed .tab.active { background: var(--surface-container-high); color: var(--on-surface); border-bottom: 0; }

/* ─── Stat tiles ────────────────────────────────────────── */
.stats-strip {
  margin-top: 40px; display: grid; gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}
.stat-tile {
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
  border-right: 1px solid var(--border);
}
.stat-tile:last-child { border-right: 0; }
.stat-tile .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--outline); }
.stat-tile .v { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.1; letter-spacing: -0.02em; color: var(--on-surface); }
.stat-tile .x { font-family: var(--font-mono); font-size: 11px; color: var(--outline); }
@media (max-width: 880px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-tile:nth-child(2) { border-right: 0; }
  .stat-tile:nth-child(1), .stat-tile:nth-child(2) { border-bottom: 1px solid var(--border); }
}

/* ─── Step flow (3-up numbered) ────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }
.step-card {
  padding: 28px; border-radius: 0;
  background: var(--surface-container-low); border: 1px solid var(--border);
  position: relative; min-height: 220px;
}
.step-card .num {
  position: absolute; top: -14px; left: 22px;
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.step-card h3 { font-family: var(--font-display); font-weight: 700; margin: 10px 0 8px; font-size: 22px; letter-spacing: -0.02em; }
.step-card p  { color: var(--on-surface-variant); font-size: 15px; line-height: 1.6; margin: 0; }
.step-card .tag {
  display: inline-block; margin-top: 14px;
  font-family: var(--font-mono); font-size: 10px; color: var(--primary); letter-spacing: 0.22em; text-transform: uppercase;
}

/* ─── Bento (burn-sinks grid) ──────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 980px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .bento { grid-template-columns: 1fr; } }
.bento-cell {
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px; border-radius: 0;
  background: var(--surface-container-low); border: 1px solid var(--border);
  position: relative; overflow: hidden;
  transition: border-color .18s ease;
  text-decoration: none;
}
.bento-cell:hover { border-color: var(--primary); }
.bento-cell .glow-orb {
  position: absolute; inset: auto -40px -40px auto;
  width: 140px; height: 140px;
  background: radial-gradient(circle, currentColor, transparent 70%);
  opacity: 0.18; filter: blur(10px); pointer-events: none;
}
.bento-cell .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--outline); }
.bento-cell .v { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -0.02em; color: var(--on-surface); }
.bento-cell .d { font-family: var(--font-sans); font-size: 13px; color: var(--on-surface-variant); margin-top: 4px; line-height: 1.55; }
.bento-cell.b-mutate { color: var(--primary); }
.bento-cell.b-bond   { color: var(--plum); }
.bento-cell.b-vote   { color: var(--gold); }
.bento-cell.b-revive { color: var(--ember); }

/* ─── Soulmate pair card ───────────────────────────────── */
.pair-card {
  border: 1px solid var(--border); border-radius: 0; padding: 24px;
  background:
    radial-gradient(800px 200px at 0% 0%, rgba(217,119,87,0.10), transparent 60%),
    radial-gradient(800px 200px at 100% 100%, rgba(110,59,95,0.10), transparent 60%),
    var(--surface-container-low);
}
.pair-row { display: flex; align-items: center; gap: 28px; }
.pair-img {
  width: 132px; height: 132px; border-radius: 0;
  border: 1px solid var(--outline-variant); overflow: hidden; flex-shrink: 0;
  background: var(--surface); position: relative;
}
.pair-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pair-img .tag {
  position: absolute; left: 8px; bottom: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  background: rgba(18,14,10,0.82); padding: 3px 7px;
}
.pair-bridge {
  flex: 1; min-width: 60px; height: 1px; align-self: center;
  background: linear-gradient(90deg, var(--primary), var(--plum));
  position: relative; opacity: 0.55;
}
.pair-bridge.bonded { opacity: 1; box-shadow: 0 0 14px rgba(217,119,87,0.5); height: 2px; }
.pair-bridge::before, .pair-bridge::after {
  content: ""; position: absolute; width: 8px; height: 8px;
  background: var(--primary); top: -3px;
}
.pair-bridge::before { left: -4px; }
.pair-bridge::after  { right: -4px; background: var(--plum); }
.pair-bridge.bonded::before { box-shadow: 0 0 10px var(--primary); }
.pair-bridge.bonded::after  { box-shadow: 0 0 10px var(--plum); }
.pair-card .meta { font-family: var(--font-mono); font-size: 12px; color: var(--outline); margin-top: 18px; line-height: 1.8; }
.pair-card .meta b { color: var(--on-surface); font-weight: 600; }
@media (max-width: 540px) { .pair-img { width: 96px; height: 96px; } }

/* ─── Gallery grid ─────────────────────────────────────── */
.gallery-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px;
}
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery .tile {
  position: relative; aspect-ratio: 1 / 1;
  border-radius: 0; overflow: hidden;
  background: var(--surface-container-low);
  /* conic gradient frame on hover */
  border: 1px solid var(--border);
  transition: border-color .15s ease;
  display: block;
}
.gallery .tile:hover {
  border-color: transparent;
  background:
    linear-gradient(var(--surface-container-low), var(--surface-container-low)) padding-box,
    conic-gradient(from 90deg, var(--primary), var(--plum), var(--gold), var(--primary)) border-box;
  border: 2px solid transparent;
}
.gallery .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .tile .meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: flex-end;
  font-family: var(--font-mono); font-size: 11px; color: var(--on-surface);
  background: linear-gradient(180deg, transparent, rgba(18,14,10,0.85));
  padding: 36px 12px 12px;
}
.gallery .tile .meta .id { font-weight: 500; letter-spacing: 0.04em; }
.gallery .tile .meta .sub { font-size: 10px; color: var(--outline); letter-spacing: 0.06em; text-transform: uppercase; }
.gallery .tile .badge {
  position: absolute; right: 10px; top: 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  padding: 3px 7px;
  background: rgba(18,14,10,0.82); color: var(--on-surface);
  display: inline-flex; align-items: center; gap: 5px;
  text-transform: uppercase;
}
.gallery .tile .badge .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--tier-1); }
.gallery .tile[data-tier="2"] .badge .dot { background: var(--tier-2); }
.gallery .tile[data-tier="3"] .badge .dot { background: var(--tier-3); }
.gallery .tile[data-tier="4"] .badge .dot { background: var(--tier-4); }
.gallery .tile[data-tier="5"] .badge .dot { background: var(--tier-5); }

/* skeleton tiles */
.gallery .skel {
  aspect-ratio: 1 / 1; border-radius: 0;
  background: linear-gradient(110deg, var(--surface-container-low) 20%, var(--surface-container) 40%, var(--surface-container-low) 60%);
  background-size: 220% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border: 1px solid var(--border);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ─── Featured marquee ─────────────────────────────────── */
.marquee {
  position: relative; overflow: hidden;
  margin: 0 calc(var(--gutter) * -1);
  padding: 18px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 96px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(90deg, var(--surface), transparent); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--surface), transparent); }
.marquee-track {
  display: flex; gap: 14px; width: max-content;
  animation: marquee 60s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee .m-tile {
  flex-shrink: 0; width: 168px; height: 168px;
  border: 1px solid var(--border); overflow: hidden;
  position: relative; background: var(--surface-container-low);
}
.marquee .m-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.marquee .m-tile .id {
  position: absolute; left: 8px; bottom: 8px;
  font-family: var(--font-mono); font-size: 10px;
  background: rgba(18,14,10,0.85); padding: 3px 7px;
  letter-spacing: 0.06em;
}

/* ─── Item page ────────────────────────────────────────── */
.item-grid {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start;
}
@media (max-width: 980px) { .item-grid { grid-template-columns: 1fr; gap: 28px; } }

.item-art {
  position: relative; aspect-ratio: 1 / 1;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from 90deg, var(--primary), var(--plum), var(--gold), var(--primary)) border-box;
  border: 2px solid transparent;
  overflow: hidden;
}
.item-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-art .badge-tier {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  padding: 6px 12px;
  background: rgba(18,14,10,0.82); backdrop-filter: blur(6px);
  text-transform: uppercase; font-weight: 500;
  border: 1px solid var(--primary); color: var(--primary);
}

.item-display-number {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em;
  font-size: clamp(56px, 7.5vw, 96px); line-height: 1; color: var(--on-surface);
  margin: 14px 0 6px;
}

.trait-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.trait-grid .trait {
  padding: 16px 18px; border: 1px solid var(--border); border-radius: 0;
  background: var(--surface-container-low);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.trait-grid .trait .left .l { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--outline); }
.trait-grid .trait .left .v { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-top: 4px; color: var(--on-surface); letter-spacing: -0.01em; }
.trait-grid .trait .pct { font-family: var(--font-mono); font-size: 11px; color: var(--on-surface-variant); }

.mutation-log {
  border: 1px solid var(--border); background: var(--surface-container-low);
  font-family: var(--font-mono); font-size: 13px;
}
.mutation-log .row {
  display: grid; grid-template-columns: 100px 1fr auto; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.mutation-log .row:last-child { border-bottom: 0; }
.mutation-log .row .blk { color: var(--outline); }
.mutation-log .row .what { color: var(--on-surface-variant); text-align: right; }

/* Soulmate-pair inside item page */
.soulmate-card {
  border: 1px solid var(--border); border-radius: 0;
  background: var(--surface-container-low);
  padding: 20px;
}
.soulmate-card .head {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--outline); margin-bottom: 16px;
}
.soulmate-card .row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
}
.soulmate-card .pic {
  width: 56px; height: 56px; border: 1px solid var(--outline-variant);
  background: var(--surface); overflow: hidden;
}
.soulmate-card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.soulmate-card .meta { font-family: var(--font-mono); font-size: 12px; color: var(--outline); }
.soulmate-card .meta .l { display: block; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
.soulmate-card .meta .v { color: var(--on-surface); font-weight: 500; font-size: 13px; margin-top: 4px; display: block; }
.soulmate-card .link {
  flex: 1; height: 1px; min-width: 60px; background: linear-gradient(90deg, var(--primary), var(--plum));
  position: relative;
}
.soulmate-card .link::before {
  content: "⌐⌐"; /* chain glyph */
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-mono); color: var(--outline); font-size: 14px;
  background: var(--surface-container-low); padding: 0 6px;
}

/* ─── Section grids ────────────────────────────────────── */
.split      { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }
.split-even { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 980px) { .split-even { grid-template-columns: 1fr; } }

/* ─── Generic stat grid (legacy) ───────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 880px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 18px; border: 1px solid var(--border); border-radius: 0; background: var(--surface-container-low); display: block; transition: border-color .18s ease; }
.stat:hover { border-color: var(--outline-variant); }
.stat .v { font-family: var(--font-display); font-weight: 700; font-size: 26px; margin-top: 4px; letter-spacing: -0.02em; color: var(--on-surface); }
.stat .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--outline); }

/* ─── Row list (mutate/vote/bond) ──────────────────────── */
.row-list { display: flex; flex-direction: column; gap: 8px; }
.row-list .row {
  display: grid; grid-template-columns: 100px 1fr auto; gap: 14px;
  align-items: center; padding: 14px 18px;
  border: 1px solid var(--border); border-radius: 0;
  background: var(--surface-container-low);
  transition: border-color .15s ease;
}
.row-list .row:hover { border-color: var(--outline-variant); }

/* ─── Section heading ──────────────────────────────────── */
.section-head { margin-bottom: 32px; }
.section-head .kicker { display: inline-block; margin-bottom: 10px; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.032em;
  font-size: clamp(32px, 4.5vw, 48px); line-height: 1.06; margin: 0 0 14px;
}
.section-head p.sub { color: var(--on-surface-variant); max-width: 60ch; margin: 0; font-size: 16px; line-height: 1.65; }

/* ─── Reveal-on-scroll (progressive enhancement) ─────────
   Elements are visible by default. JS adds `js-reveals` to <html>
   when the observer is ready; that enables the fade-in. If JS
   fails for any reason, content stays visible instead of stuck
   at opacity:0. */
.reveal { transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
html.js-reveals .reveal:not(.in) { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html.js-reveals .reveal:not(.in) { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .art-display::before { animation: none; }
}

/* ─── Soft animations ──────────────────────────────────── */
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fade-up .42s cubic-bezier(.2,.7,.2,1) both; }

/* ─── Tiny helpers ─────────────────────────────────────── */
.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--border) 8%, var(--border) 92%, transparent); }
.row-flex { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.center   { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-12 { gap: 12px; }
.gap-18 { gap: 18px; }
.grow   { flex: 1; }

/* ─── Whitepaper layout ────────────────────────────────── */
.wp-grid {
  display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start;
}
@media (max-width: 980px) { .wp-grid { grid-template-columns: 1fr; gap: 28px; } }

.wp-toc {
  position: sticky; top: 92px; align-self: start;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.9;
  border-left: 1px solid var(--border); padding-left: 20px;
}
.wp-toc .l { display: block; color: var(--outline); padding: 2px 0; transition: color .15s ease; letter-spacing: 0.04em; }
.wp-toc .l:hover, .wp-toc .l.active { color: var(--on-surface); }
.wp-toc .l .n { color: var(--primary); margin-right: 8px; }
@media (max-width: 980px) {
  .wp-toc { position: static; border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 18px; }
}

.wp-article { max-width: 70ch; }
.wp-article h2 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.028em;
  font-size: 32px; line-height: 1.15; margin: 64px 0 14px;
  scroll-margin-top: 80px;
}
.wp-article h2 .n {
  display: inline-block; min-width: 32px;
  font-family: var(--font-mono); font-size: 13px; color: var(--primary); letter-spacing: 0;
  vertical-align: middle; margin-right: 6px;
}
.wp-article h2:first-child { margin-top: 0; }
.wp-article h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  margin: 32px 0 10px; color: var(--on-surface); letter-spacing: -0.01em;
}
.wp-article p  { color: var(--on-surface-variant); margin: 0 0 14px; font-size: 16px; line-height: 1.72; }
.wp-article ul, .wp-article ol { color: var(--on-surface-variant); padding-left: 22px; margin: 0 0 18px; line-height: 1.72; }
.wp-article ul li, .wp-article ol li { margin: 6px 0; }
.wp-article ul li::marker { color: var(--primary); }
.wp-article a { color: var(--primary); border-bottom: 1px solid rgba(217,119,87,0.3); }
.wp-article a:hover { border-bottom-color: var(--primary); }
.wp-article strong, .wp-article b { color: var(--on-surface); font-weight: 600; }
.wp-article code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: rgba(217,119,87,0.10); border: 1px solid rgba(217,119,87,0.18);
  padding: 1px 6px; color: var(--on-surface);
}

.formula {
  background: var(--surface-container-low); border: 1px solid var(--outline-variant);
  border-left: 3px solid var(--primary);
  padding: 18px 22px; margin: 18px 0 22px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.7;
  overflow-x: auto; color: var(--on-surface);
}
.formula .c { color: var(--outline); }      /* comment */
.formula .k { color: var(--primary); }      /* keyword */
.formula .v { color: var(--gold); }         /* value */

.wp-callout {
  border-left: 3px solid var(--gold);
  background: rgba(212,162,127,0.05);
  padding: 14px 18px;
  margin: 20px 0; font-size: 14.5px; color: var(--on-surface-variant);
}
.wp-callout b { color: var(--gold); }

.wp-eli5 {
  border-left: 3px solid var(--sage);
  background: rgba(108,174,106,0.06);
  padding: 14px 18px;
  margin: 20px 0; font-size: 14.5px; color: var(--on-surface-variant);
}
.wp-eli5::before { content: "ELI5 · "; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--sage); }

.wp-table {
  width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 13px;
  margin: 16px 0 24px;
}
.wp-table th, .wp-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.wp-table th { color: var(--outline); font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; font-size: 11px; background: rgba(255,255,255,0.02); }
.wp-table tbody tr:hover { background: rgba(255,255,255,0.015); }

.wp-hairline { height: 1px; background: linear-gradient(90deg, var(--border), transparent); margin: 56px 0 0; }

/* ─── Hero composition (satellites + main piece) ───────────────── */
.hero-composition {
  position: relative;
  width: 100%; aspect-ratio: 1 / 1; max-width: 480px;
  margin-left: auto;
  perspective: 1000px;
}
.hero-composition .art-display {
  transform-style: preserve-3d;
  transition: transform .25s cubic-bezier(.2,.7,.2,1);
}
/* Sheen sweep across the conic frame */
.frame-sheen {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(110deg, transparent 40%, rgba(255,245,214,0.16) 50%, transparent 60%);
  background-size: 220% 220%;
  animation: sheen-sweep 7s ease-in-out infinite;
  mix-blend-mode: screen;
}
@keyframes sheen-sweep {
  0%   { background-position: 200% 0; }
  60%  { background-position: -50% 0; }
  100% { background-position: -50% 0; }
}
/* Auto-cycle cross-fade on hero img */
#hero-art-canvas { transition: opacity .8s ease; }
#hero-art-canvas.hero-art-fading { opacity: 0; }

/* Satellite previews around the main hero piece */
.hero-satellite {
  position: absolute; width: 72px; height: 72px;
  border: 1px solid var(--outline-variant);
  background: var(--surface-container-low);
  overflow: hidden; z-index: 3;
  box-shadow: 0 14px 30px -16px rgba(0,0,0,0.6);
  opacity: 0; transform: translateY(8px) scale(0.95);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.hero-satellite img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-composition.in .hero-satellite { opacity: 1; transform: translateY(0) scale(1); }
.hero-satellite-tl { top: -36px;   left: -36px;   animation: float-a 8s ease-in-out infinite; }
.hero-satellite-tr { top: -36px;   right: -36px;  animation: float-b 9s ease-in-out infinite; }
.hero-satellite-bl { bottom: -36px; left: -36px;   animation: float-b 7s ease-in-out infinite; }
.hero-satellite-br { bottom: -36px; right: -36px;  animation: float-a 10s ease-in-out infinite; }
@keyframes float-a { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes float-b { 0%, 100% { translate: 0 0; } 50% { translate: 0 10px; } }
@media (max-width: 720px) {
  .hero-satellite { width: 52px; height: 52px; }
  .hero-satellite-tl, .hero-satellite-tr, .hero-satellite-bl, .hero-satellite-br {
    top: auto; bottom: auto; left: auto; right: auto;
  }
  .hero-satellite-tl { top: -20px; left: -20px; }
  .hero-satellite-tr { top: -20px; right: -20px; }
  .hero-satellite-bl { bottom: -20px; left: -20px; }
  .hero-satellite-br { bottom: -20px; right: -20px; }
}

/* ─── Specimen grid (mythic preview row) ───────────────────────── */
.specimen-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 980px) { .specimen-grid { grid-template-columns: repeat(2, 1fr); } }
.specimen {
  display: block; border: 1px solid var(--border);
  background: var(--surface-container-low);
  overflow: hidden; position: relative;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s ease;
}
.specimen:hover { transform: translateY(-4px); border-color: var(--primary); }
.specimen .pic { aspect-ratio: 1 / 1; overflow: hidden; position: relative; }
.specimen .pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.specimen:hover .pic img { transform: scale(1.06); }
.specimen .pic .tier-badge {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  padding: 4px 9px; background: rgba(18,14,10,0.82);
  border: 1px solid var(--tier-5); color: var(--tier-5);
  text-transform: uppercase; font-weight: 500;
}
.specimen .meta { padding: 14px 16px 16px; }
.specimen .meta .id { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.specimen .meta .sub { font-family: var(--font-mono); font-size: 11px; color: var(--outline); margin-top: 4px; letter-spacing: 0.04em; }
.specimen .meta .traits {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
}
.specimen .meta .traits span {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  padding: 3px 7px; background: var(--surface); color: var(--on-surface-variant);
  border: 1px solid var(--border);
}

/* ─── Soulmate showcase (3 pairs in a row) ─────────────────────── */
.soulmate-showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 980px) { .soulmate-showcase { grid-template-columns: 1fr; } }
.soulmate-showcase .pair-mini {
  border: 1px solid var(--border); background: var(--surface-container-low);
  padding: 18px;
}
.soulmate-showcase .pair-mini .pics {
  display: grid; grid-template-columns: 1fr 22px 1fr;
  align-items: center; gap: 10px;
}
.soulmate-showcase .pair-mini .pics .link {
  height: 1px; background: linear-gradient(90deg, var(--primary), var(--plum));
  position: relative;
}
.soulmate-showcase .pair-mini .pics .link::before {
  content: ""; position: absolute; left: -3px; top: -3px;
  width: 7px; height: 7px; background: var(--primary);
}
.soulmate-showcase .pair-mini .pics .link::after {
  content: ""; position: absolute; right: -3px; top: -3px;
  width: 7px; height: 7px; background: var(--plum);
}
.soulmate-showcase .pair-mini .pic {
  aspect-ratio: 1 / 1; background: var(--surface);
  border: 1px solid var(--outline-variant); overflow: hidden; display: block;
}
.soulmate-showcase .pair-mini .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.soulmate-showcase .pair-mini .meta {
  margin-top: 14px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 12px;
}
.soulmate-showcase .pair-mini .meta .ids { color: var(--on-surface); font-weight: 500; }
.soulmate-showcase .pair-mini .meta .state {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase;
}
.soulmate-showcase .pair-mini .meta .state.perm { color: var(--sage); }
.soulmate-showcase .pair-mini .meta .state.soft { color: var(--on-surface-variant); }

/* ─── Rarity tier grid (5 cards) ───────────────────────────────── */
.tier-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
@media (max-width: 980px) { .tier-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .tier-grid { grid-template-columns: 1fr; } }
.tier-card {
  border: 1px solid var(--border); background: var(--surface-container-low);
  overflow: hidden; transition: transform .25s ease, border-color .25s ease;
  display: block;
}
.tier-card:hover { transform: translateY(-3px); }
.tier-card[data-t="1"]:hover { border-color: var(--tier-1); }
.tier-card[data-t="2"]:hover { border-color: var(--tier-2); }
.tier-card[data-t="3"]:hover { border-color: var(--tier-3); }
.tier-card[data-t="4"]:hover { border-color: var(--tier-4); }
.tier-card[data-t="5"]:hover { border-color: var(--tier-5); }
.tier-card .pic { aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface); }
.tier-card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s ease; }
.tier-card:hover .pic img { transform: scale(1.05); }
.tier-card .body { padding: 14px 16px 18px; }
.tier-card .name {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  letter-spacing: -0.01em; color: var(--on-surface);
}
.tier-card .meta {
  font-family: var(--font-mono); font-size: 11px;
  margin-top: 6px; color: var(--outline);
  display: flex; justify-content: space-between;
}
.tier-card .meta .mult {
  color: var(--primary-soft); font-weight: 500;
}

/* ─── Two-row marquee (opposite directions) ───────────────────── */
.marquee-reverse .marquee-track {
  animation: marquee-reverse 65s linear infinite;
}
@keyframes marquee-reverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* ─── Footer brand-mark slow spin ─────────────────────────────── */
.spin-slow { animation: spin-slow 24s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .frame-sheen, .hero-satellite, .spin-slow, .marquee-reverse .marquee-track { animation: none; }
}
