/* Limelight. Tokens and components follow DESIGN.md; this file is the only place they are defined. */

:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --pad: 20px;
  --r-card: 14px; --r-inner: 10px; --r-pill: 999px;
  --header-h: 60px; --bar-h: 72px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --bg: #f6f6f4; --surface: #ffffff; --surface-2: #f0f0ed; --line: #e3e3de;
  --ink: #111317; --muted: #62666e; --accent: #d1fe17; --accent-ink: #0b0c0f; --accent-text: #4c6400;
  --up: #12915c; --down: #d43a48;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b0c0f; --surface: #14161a; --surface-2: #1b1e24; --line: #262a31;
    --ink: #f1f2f4; --muted: #9aa0aa; --accent: #d1fe17; --accent-ink: #0b0c0f; --accent-text: #d1fe17;
    --up: #3ecf8e; --down: #f0616d;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0b0c0f; --surface: #14161a; --surface-2: #1b1e24; --line: #262a31;
  --ink: #f1f2f4; --muted: #9aa0aa; --accent: #d1fe17; --accent-ink: #0b0c0f; --accent-text: #d1fe17;
  --up: #3ecf8e; --down: #f0616d;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/22px var(--font); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
[hidden] { display: none !important; }

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.t-xs { font-size: 12px; line-height: 16px; }
.t-sm { font-size: 13px; line-height: 18px; }
.t-md { font-size: 17px; line-height: 24px; }
.t-lg { font-size: 20px; line-height: 28px; font-weight: 700; }
.up { color: var(--up); } .down { color: var(--down); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
main { flex: 1; padding-block: var(--s6) var(--s8); }
main > .container > * + * { margin-top: var(--s6); }

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.header .container { height: var(--header-h); display: flex; align-items: center; gap: var(--s5); }
.wordmark { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.wordmark img { width: 28px; height: 28px; flex: none; border-radius: 7px; }
.nav { display: flex; gap: var(--s1); }
.nav a { height: 36px; padding: 0 var(--s3); display: inline-flex; align-items: center; border-radius: var(--r-inner); font-size: 14px; font-weight: 500; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current='page'] { color: var(--ink); background: var(--surface-2); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.pill { height: 36px; padding: 0 var(--s3); display: inline-flex; align-items: center; gap: var(--s2); border: 1px solid var(--line); border-radius: var(--r-inner); background: var(--surface); font-size: 13px; font-weight: 500; white-space: nowrap; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-inner); background: var(--surface); color: var(--muted); }
.icon-btn:hover { color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.banner { border-bottom: 1px solid var(--line); background: var(--surface); }
.banner .container { min-height: 36px; padding-block: var(--s2); display: flex; align-items: center; justify-content: center; gap: var(--s2); font-size: 13px; line-height: 18px; color: var(--muted); text-align: center; }
.banner b { color: var(--ink); font-weight: 600; }

/* ---------- components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--pad); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); min-height: 22px; }
.eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

.btn, .btn-secondary, .btn-ghost {
  height: 40px; padding: 0 18px; border-radius: var(--r-inner); font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); white-space: nowrap;
  border: 1px solid transparent; transition: opacity 120ms, border-color 120ms, background-color 120ms;
}
.btn { background: var(--accent); color: var(--accent-ink); }
.btn:hover { opacity: 0.88; }
.btn-secondary.is-accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-secondary { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn-lg { height: 48px; padding: 0 24px; font-size: 16px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 4px; }
.btn-block { width: 100%; }
.btn:disabled, .btn-secondary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn[aria-busy='true'] { cursor: progress; opacity: 0.7; }

.tabs { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-2); border-radius: var(--r-inner); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { height: 32px; padding: 0 14px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; border: 1px solid transparent; flex: 1 0 auto; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected='true'] { background: var(--surface); color: var(--ink); border-color: var(--line); }
.tabs.block { display: flex; }

.chip { display: inline-flex; align-items: center; flex: none; width: max-content; height: 22px; padding: 0 8px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.chip-ink { color: var(--ink); }
.chip-on { color: var(--accent-text); border-color: var(--accent-text); background: transparent; }

.input, .textarea { width: 100%; height: 44px; padding: 0 var(--s3); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-inner); outline: none; }
.textarea { height: 88px; padding: var(--s3); resize: none; line-height: 22px; }
.input:focus, .textarea:focus { border-color: var(--accent-text); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.field { display: grid; gap: var(--s2); }
.field + .field { margin-top: var(--s4); }
.field.two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); column-gap: var(--s3); }
.field.two > .field { margin-top: 0; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.three .input { font-size: 13px; }
.showcase > p { margin-bottom: var(--s3); }
a.chip:hover { border-color: var(--muted); }
.kv.about a { text-decoration: underline; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; }
.field-help { font-size: 13px; line-height: 18px; color: var(--muted); }
.error { color: var(--down); font-size: 13px; line-height: 18px; min-height: 18px; }

.meter { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--ink); border-radius: inherit; min-width: 2px; transition: width 300ms; }

.stats { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.stat { padding-inline: var(--s4); border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat-value { font-size: 17px; line-height: 24px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rows > li, .rows > a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--s3); align-items: center; padding: var(--s3) 0; border-top: 1px solid var(--line); }
.rows > :first-child { border-top: 0; padding-top: 0; }
.rows > :last-child { padding-bottom: 0; }
.rows .trail { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv { display: grid; gap: var(--s2); }
.kv > div { display: flex; justify-content: space-between; gap: var(--s3); font-size: 13px; line-height: 18px; }
.kv dt { color: var(--muted); }
.kv dd { font-variant-numeric: tabular-nums; font-weight: 500; text-align: right; }

.portrait { position: relative; aspect-ratio: 1; border-radius: var(--r-inner); overflow: hidden; background: var(--surface-2); }
.portrait > img, .portrait > svg, .portrait > video { width: 100%; height: 100%; object-fit: cover; }
.portrait .tags { position: absolute; top: var(--s2); left: var(--s2); right: var(--s2); display: flex; justify-content: space-between; gap: var(--s2); pointer-events: none; }
.portrait .tags.bottom { top: auto; bottom: var(--s2); }
.tag.up { color: #6fe3ad; } .tag.down { color: #ff9aa3; }
.tag { height: 20px; padding: 0 6px; border-radius: 6px; background: rgba(11, 12, 15, 0.72); color: #fff; font-size: 11px; line-height: 20px; font-weight: 600; letter-spacing: 0.04em; }
.avatar { width: 56px; height: 56px; border-radius: var(--r-inner); overflow: hidden; flex: none; background: var(--surface-2); }
.avatar.sm { width: 28px; height: 28px; border-radius: 7px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.empty { text-align: center; padding: var(--s7) var(--s5); color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 17px; line-height: 24px; margin-bottom: var(--s1); }
.skeleton { background: var(--surface-2); border-radius: var(--r-inner); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--s5) + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-inner); font-size: 14px; font-weight: 500; max-width: calc(100vw - 32px); }
.has-bar .toast { bottom: calc(var(--bar-h) + var(--s4)); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.page-h { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.02em; }
.page-sub { color: var(--muted); max-width: 60ch; margin-top: var(--s1); }

/* ---------- explore ---------- */
/* Display type: condensed, uppercase, used for page and section headlines only. */
.display { font-family: 'Barlow Condensed', var(--font); font-weight: 800; text-transform: uppercase; letter-spacing: 0; line-height: 0.95; }
.display em { font-style: normal; color: var(--accent-text); }
.hero2 { align-items: center; padding-block: var(--s5) 0; }
.hero-copy { display: grid; gap: var(--s4); justify-items: start; }
/* Scales with the window so the one-line headline always fits its half of the hero. */
.hero-copy h1 { font-size: clamp(56px, 6vw, 88px); white-space: nowrap; }
.hero-stats { --n: 3; width: 100%; max-width: 460px; margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.hero-stats .stat-value { font-size: 22px; line-height: 28px; }
/* Hero collage: one tall picture and two stacked ones, the same total height. */
.collage { display: grid; grid-template-columns: 3fr 2fr; grid-template-rows: 1fr 1fr; gap: var(--s2); aspect-ratio: 1; }
.collage .portrait { border-radius: var(--r-card); border: 1px solid var(--line); aspect-ratio: auto; height: 100%; min-height: 0; }
.collage .portrait:first-child { grid-row: span 2; }
.section-head { display: grid; gap: var(--s2); margin-bottom: var(--s5); }
.section-head h2, .band h2 { font-size: 56px; }
.section-head p { font-size: 17px; line-height: 24px; max-width: 56ch; }
.gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); }
.gal { display: grid; gap: var(--s2); border-radius: var(--r-inner); }
.gal img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-inner); border: 1px solid var(--line); transition: border-color 120ms; }
.gal:hover img { border-color: var(--accent-text); }
.gal span { display: grid; font-size: 12px; line-height: 16px; color: var(--muted); }
.gal b { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.band { display: grid; justify-items: center; gap: var(--s5); padding: var(--s8) var(--s5); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); text-align: center; }
.hero-copy p { color: var(--muted); font-size: 18px; line-height: 27px; max-width: 44ch; }
.hero-cta { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s2); }
.reel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); }
.reel .portrait { border-radius: var(--r-card); border: 1px solid var(--line); }
.steps { margin-top: 0 !important; }
.hero { text-align: center; padding-block: var(--s6) 0; display: grid; justify-items: center; gap: var(--s4); }
.hero h1 { font-size: 40px; line-height: 46px; font-weight: 700; letter-spacing: -0.03em; }
.hero p { color: var(--muted); font-size: 17px; line-height: 24px; max-width: 52ch; }
.hero .btn { margin-top: var(--s2); }
.steps { width: 100%; margin-top: var(--s5); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); text-align: left; }
.steps li { padding: var(--pad); border-left: 1px solid var(--line); display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: var(--s3); align-items: start; }
.steps li:first-child { border-left: 0; }
.steps .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 15px; line-height: 22px; font-weight: 600; margin-top: 3px; }
.steps p { font-size: 13px; line-height: 18px; margin-top: 2px; max-width: none; }

.totals { --n: 4; }
.totals .stat-value { font-size: 20px; line-height: 28px; }
.details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); }
.details > div { display: grid; gap: var(--s3); align-content: start; }
.points { display: grid; gap: var(--s2); font-size: 13px; line-height: 18px; color: var(--muted); }
.points li { padding-left: var(--s4); position: relative; }
.points li::before { content: ''; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.kv.about { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s6); row-gap: var(--s3); }
.kv.about > div { padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.kv.about dd { color: var(--ink); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.toolbar .input { width: 280px; height: 40px; }

.grid-cards { display: grid; gap: var(--s4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.toolbar + .grid-cards, .toolbar + .card, .toolbar + .showcase { margin-top: var(--s4) !important; }
.inf { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s3); transition: border-color 120ms; }
a.inf:hover { border-color: var(--muted); }
.inf-body { display: flex; flex-direction: column; gap: var(--s2); padding: 0 var(--s1) var(--s1); flex: 1; }
.inf-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.inf-title b { font-weight: 600; }
.inf-chips { display: flex; gap: var(--s1); overflow: hidden; }
.inf-bio { font-size: 13px; line-height: 18px; color: var(--muted); min-height: 36px; }
.inf-meta { margin-top: auto; padding-top: var(--s2); --n: 3; }
.inf-meta .stat { padding-inline: var(--s2); }
.inf-meta .stat:first-child { padding-left: 0; }
.inf-meta .stat-value { font-size: 13px; line-height: 18px; font-weight: 600; }
.inf-meta .stat span { display: block; font-size: 11px; line-height: 14px; color: var(--muted); }

/* ---------- create ---------- */
.stepper { display: flex; align-items: center; justify-content: center; gap: var(--s3); }
.stepper li { display: flex; align-items: center; gap: var(--s2); font-size: 14px; font-weight: 600; color: var(--muted); }
.stepper .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-variant-numeric: tabular-nums; }
.stepper li[data-state='current'] { color: var(--ink); }
.stepper li[data-state='current'] .n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stepper li[data-state='done'] .n { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.stepper .bar { width: 48px; height: 1px; background: var(--line); }

.split { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.stage { align-self: start; position: sticky; top: calc(var(--header-h) + var(--s5)); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.stage .portrait { border-radius: var(--r-card); border: 1px solid var(--line); }
/* Keep the whole stage (picture and its buttons) above the fixed action bar on short screens. */
@media (min-width: 960px) { .stage > .portrait, .stage > .stage-foot { width: min(100%, max(300px, calc(100vh - var(--header-h) - var(--bar-h) - 200px))); margin-inline: auto; } }
.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 40px; }
.stage-foot > span { flex: 1; min-width: 0; }
.stage-foot > button, .stage-btns { flex: none; }
.stage-btns { display: flex; gap: var(--s2); }
.portrait.is-busy > img, .portrait.is-busy > svg { opacity: 0.35; }
.stage-wait { position: absolute; inset: 0; display: grid; place-content: center; gap: var(--s1); text-align: center; font-size: 15px; font-weight: 600; }
.stage-wait span { font-size: 13px; font-weight: 400; color: var(--muted); }
.tile:disabled { opacity: 0.45; cursor: not-allowed; }
.stage-center { display: grid; justify-items: center; gap: var(--s3); padding: var(--s6) var(--pad); }
.stage-center .inf { width: 100%; max-width: 300px; }
.candidates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.candidates button { border-radius: var(--r-card); border: 2px solid transparent; padding: 0; overflow: hidden; }
.candidates button .portrait { border: 0; border-radius: 0; }
.candidates button[aria-pressed='true'] { border-color: var(--accent-text); }

.panel > * + * { margin-top: var(--s5); }
.trait-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--s2); }
/* Option counts are 3, 4, 6, 8 or 12, so every row of tiles is full. */
.tiles { display: grid; gap: var(--s2); grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.tiles[data-n='3'], .tiles[data-n='6'] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Picture tiles: the option shown, with its name underneath. */
.tiles.pics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles.pics[data-n='3'], .tiles.pics[data-n='6'] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile-pic { padding: 0; overflow: hidden; display: grid; grid-template-rows: auto auto; }
.tile-pic img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.tile-pic span { padding: 6px 4px; font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-pic[aria-pressed='true'] { box-shadow: 0 0 0 1px var(--accent-text); }
.tile { min-height: 40px; padding: var(--s2) var(--s2); border-radius: var(--r-inner); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; line-height: 18px; font-weight: 500; text-align: center; transition: border-color 120ms; }
.tile:hover { border-color: var(--muted); }
.tile[aria-pressed='true'] { border-color: var(--accent-text); color: var(--accent-text); background: transparent; font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: var(--s3); }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--c); position: relative; }
.swatch[aria-pressed='true']::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent-text); }

.brains { display: grid; gap: var(--s2); grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.brain { text-align: left; padding: var(--s3); border-radius: var(--r-inner); background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 2px; align-content: start; transition: border-color 120ms; }
.brain:hover { border-color: var(--muted); }
.brain b { font-size: 15px; line-height: 22px; font-weight: 600; }
.brain[aria-pressed='true'] { border-color: var(--accent-text); background: transparent; }
.brain[aria-pressed='true'] b { color: var(--accent-text); }

.next-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 18px; }
.next-list li:first-child { border-top: 0; padding-top: 0; }
.next-list li:last-child { padding-bottom: 0; }
.next-list .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.next-list b { display: block; font-size: 14px; line-height: 20px; font-weight: 600; margin-top: 2px; }

.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.actionbar .container { height: var(--bar-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s4); }
.actionbar .mid { text-align: center; font-size: 13px; line-height: 18px; color: var(--muted); }
.actionbar .right { justify-self: end; display: flex; gap: var(--s2); }
.actionbar .btn, .actionbar .btn-secondary { min-width: 168px; height: 44px; }
.has-bar main { padding-bottom: calc(var(--bar-h) + var(--s7)); }

/* ---------- coin ---------- */
.ident { display: flex; align-items: center; gap: var(--s4); }
.ident-text { min-width: 0; flex: 1; display: grid; gap: var(--s1); }
.ident-text h1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.02em; }
.ident-meta { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.ident-actions { display: flex; gap: var(--s2); flex: none; }

.layout { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.layout > .main { min-width: 0; display: grid; gap: var(--s5); }
.layout > .rail { position: sticky; top: calc(var(--header-h) + var(--s5)); display: grid; gap: var(--s4); }
.main > .body { min-width: 0; display: grid; gap: var(--s4); }
.chart-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.chart-price { font-size: 28px; line-height: 34px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.chart-svg { width: 100%; height: 240px; margin-block: var(--s4); }
.chart .stats { --n: 4; padding-top: var(--s4); border-top: 1px solid var(--line); }

.trade-amount { position: relative; margin-top: var(--s4); }
.trade-amount .input { height: 52px; font-size: 20px; font-weight: 600; padding-right: 76px; font-variant-numeric: tabular-nums; }
.trade-amount .unit { position: absolute; right: var(--s3); top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 600; color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s2); }
.quick button { height: 32px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.quick button:hover { color: var(--ink); border-color: var(--muted); }
.trade .kv { margin-block: var(--s4); min-height: 70px; }
.budget-value { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.budget-value b { font-size: 28px; line-height: 34px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.meter-note { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: var(--s2); }
.rail .kv { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }

.posts { display: grid; gap: var(--s4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post { padding: var(--s3); display: flex; flex-direction: column; gap: var(--s3); }
.post-text { padding-inline: var(--s1); display: grid; gap: var(--s1); flex: 1; align-content: start; }
.post-caption { font-size: 14px; line-height: 20px; min-height: 40px; }
.post-concept { font-size: 12px; line-height: 16px; color: var(--muted); min-height: 32px; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: 0 var(--s1) var(--s1); font-size: 12px; line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-acts { display: flex; gap: var(--s1); }
.act { height: 28px; padding: 0 8px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.act:hover { color: var(--ink); }
.act[aria-pressed='true'] { color: var(--accent-text); border-color: var(--accent-text); background: transparent; }
.act svg { width: 14px; height: 14px; }
.rendering { display: grid; place-items: center; height: 100%; padding: var(--s4); text-align: center; font-size: 13px; color: var(--muted); }

.log-row { grid-template-columns: 64px minmax(0, 1fr) auto !important; align-items: start !important; font-size: 14px; line-height: 20px; }
.log-row time, .trade-row time { color: var(--muted); font-size: 12px; line-height: 20px; font-variant-numeric: tabular-nums; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.table th { text-align: right; font-size: 12px; line-height: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 0 var(--s3) var(--s3); white-space: nowrap; }
.table td { text-align: right; padding: var(--s3); border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table .l { text-align: left; }
.table-wrap { overflow-x: auto; }
.claim { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 32px; margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.claim b { color: var(--ink); font-weight: 600; }
.cell-brain { display: flex; align-items: center; gap: var(--s3); }
.cell-brain div { display: grid; }

/* ---------- influencer site ---------- */
.site-hero { align-items: center; }
.site-hero .portrait { border-radius: var(--r-card); border: 1px solid var(--line); }
.site-info { display: grid; gap: var(--s4); align-content: center; }
.site-info h1 { font-size: 40px; line-height: 46px; font-weight: 700; letter-spacing: -0.03em; }
.site-bio { font-size: 17px; line-height: 24px; color: var(--muted); max-width: 44ch; }
.site-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.site-actions > * { min-width: 140px; }
.site-info .stats { --n: 3; padding-top: var(--s4); border-top: 1px solid var(--line); }
.section-h { font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; }
.section-h + * { margin-top: var(--s4) !important; }

/* ---------- wallet picker ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(5, 6, 8, 0.72); display: grid; place-items: center; padding: var(--s4); }
.modal-card { width: 100%; max-width: 400px; }
.modal-card h2 { font-size: 17px; line-height: 24px; font-weight: 600; }
.wallets > li { display: block; padding: 0; }
.wallet { width: 100%; min-height: 56px; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; column-gap: var(--s3); padding: var(--s3) var(--s2); border-radius: var(--r-inner); font-size: 15px; font-weight: 600; text-align: left; }
.wallet:hover { background: var(--surface-2); }
.wallet img, .wallet-badge { width: 32px; height: 32px; border-radius: 8px; }
.wallet-badge { display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--muted); }
.wallet:disabled { opacity: 0.5; cursor: progress; }
.modal-card .field-help { margin-top: var(--s4); }
button.pill { cursor: pointer; }
button.pill:hover { border-color: var(--muted); }

.footer { border-top: 1px solid var(--line); }
.footer .container { min-height: 56px; padding-block: var(--s4); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; font-size: 13px; line-height: 18px; color: var(--muted); }
.footer a:hover { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1099px) { .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Two-column builder on a small laptop: the tiles are narrow, so long names take two lines. */
@media (min-width: 960px) and (max-width: 1199px) { .tile-pic span { white-space: normal; min-height: 36px; display: grid; place-items: center; padding: 2px 0; } }
@media (max-width: 1023px) {
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'chart' 'rail' 'body'; }
  .layout > .main { display: contents; }
  .main > .chart { grid-area: chart; }
  .main > .body { grid-area: body; }
  .layout > .rail { grid-area: rail; position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; }
  .rail > .trade { grid-row: span 2; }
}
@media (max-width: 959px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .stage { position: static; order: -1; max-width: 420px; width: 100%; margin-inline: auto; }
  .hero-copy { justify-items: center; text-align: center; }
  .hero-stats { margin-inline: auto; text-align: left; }
  .hero-copy h1 { font-size: 80px; }
  .collage { max-width: 520px; width: 100%; margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .site-hero .portrait { max-width: 420px; width: 100%; margin-inline: auto; }
  .site-info { justify-items: center; text-align: center; }
  .site-info .ident-meta, .site-actions { justify-content: center; }
  .site-info .stats { width: 100%; }
  .site-info .stat { padding-inline: var(--s2); }
}
@media (max-width: 819px) {
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .details { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { border-left: 0; border-top: 1px solid var(--line); }
  .steps li:first-child { border-top: 0; }
  .hero h1, .site-info h1 { font-size: 32px; line-height: 38px; }
  .hero-copy h1 { font-size: 64px; }
  .section-head h2, .band h2 { font-size: 44px; }
  .reel, .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .actionbar .mid { display: none; }
  .actionbar .container { grid-template-columns: auto 1fr; }
}
@media (max-width: 639px) {
  :root { --pad: 16px; }
  .container { padding-inline: 16px; }
  main { padding-block: var(--s5) var(--s7); }
  .header .container { gap: var(--s2); }
  .header-right { gap: var(--s1); }
  .pill.balance, .wordmark span, .wide, #theme { display: none; }
  .nav a { padding: 0 6px; }
  button.pill { max-width: 124px; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 34px; }
  .toolbar .input { width: 100%; }
  .toolbar .tabs { display: flex; width: 100%; }
  .tabs button { padding: 0 8px; flex: 1 1 auto; }
  .layout > .rail { grid-template-columns: minmax(0, 1fr); }
  .rail > .trade { grid-row: auto; }
  .ident { flex-wrap: wrap; }
  .ident-actions { width: 100%; }
  .ident-actions > * { flex: 1; }
  .chart .stats, .totals { --n: 2; row-gap: var(--s4); }
  .chart .stat:nth-child(odd), .totals .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .kv.about { grid-template-columns: minmax(0, 1fr); }
  .three { grid-template-columns: minmax(0, 1fr); }
  .brains { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stepper .bar { width: 20px; }
  .actionbar .btn, .actionbar .btn-secondary { min-width: 0; }
  .actionbar .right { flex: 1; }
  .actionbar .right > * { flex: 1; }
  .site-actions > * { flex: 1; }
  .btn, .btn-secondary, .btn-ghost { height: 44px; }
  .btn-sm { height: 36px; }
}
@media (max-width: 519px) {
  .grid-cards, .posts { grid-template-columns: minmax(0, 1fr); }
  .hero-copy h1 { font-size: 54px; }
  .section-head h2, .band h2 { font-size: 36px; }
  .reel, .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band { padding: var(--s7) var(--s4); }
  .tiles.pics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Narrow tiles: long names take two lines, and every tile reserves two so rows stay level. */
  .tile-pic { padding: var(--s1); }
  .tile-pic span { white-space: normal; min-height: 36px; display: grid; place-items: center; padding: 2px; }
  .hero h1, .site-info h1 { font-size: 28px; line-height: 34px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles[data-n='12'] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
