/* ════════════════════════════════════════════════════════════════════════
   Comp — modern dark theme · blue accent
   Type: Space Grotesk (display) · Hanken Grotesk (UI) · JetBrains Mono (data)
   ════════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #070a11;
  --bg-2: #0a0e17;
  --surface: #0f1521;
  --surface-2: #0c111b;
  --raise: #16202f;
  --raise-2: #1c2839;
  --border: #1b2536;
  --hairline: rgba(255,255,255,.06);
  --ink: #f2f6fc;
  --ink-2: #aeb9ca;
  --muted: #6a7689;
  --faint: #424d60;

  --accent: #3d7dff;
  --accent-2: #6aa2ff;
  --accent-deep: #2a5fd6;
  --accent-soft: rgba(61,125,255,.14);
  --accent-line: rgba(61,125,255,.34);

  --pos: #2fd08a;
  --pos-soft: rgba(47,208,138,.14);
  --neg: #ff6058;
  --neg-soft: rgba(255,96,88,.14);
  --gold: #e9b84d;
  --gold-soft: rgba(233,184,77,.14);

  --r-xs: 8px;
  --r-sm: 11px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 18px 44px -18px rgba(0,0,0,.7);
  --shadow-lg: 0 30px 80px -24px rgba(0,0,0,.8);
  --glow: 0 0 0 1px var(--accent-line), 0 8px 40px -8px rgba(61,125,255,.4);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-ui: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 1240px;
  color-scheme: dark light;
}

/* ═══════════ DIRECTION B — "Daylight" (light, editorial) ═══════════ */
html[data-theme="daylight"] {
  --bg: #eceff5;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --raise: #eaeef5;
  --raise-2: #dfe5f0;
  --border: #dde3ee;
  --hairline: rgba(16,22,38,.08);
  --ink: #0d1525;
  --ink-2: #43516a;
  --muted: #8492a6;
  --faint: #aab4c4;

  --accent: #2a62e0;
  --accent-2: #1f4fc0;
  --accent-deep: #163d9c;
  --accent-soft: rgba(42,98,224,.10);
  --accent-line: rgba(42,98,224,.26);

  --pos: #12895f; --pos-soft: rgba(18,137,95,.12);
  --neg: #cf372f; --neg-soft: rgba(207,55,47,.10);
  --gold: #a9760f; --gold-soft: rgba(169,118,15,.14);

  --shadow: 0 1px 2px rgba(16,22,38,.05), 0 14px 32px -18px rgba(16,22,38,.24);
  --shadow-lg: 0 26px 64px -24px rgba(16,22,38,.34);
  --glow: 0 0 0 1px var(--accent-line), 0 10px 40px -10px rgba(42,98,224,.3);
}
html[data-theme="daylight"] body {
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(42,98,224,.05), transparent 60%),
    var(--bg);
}
html[data-theme="daylight"] .topbar { background: rgba(255,255,255,.8); }
/* Direction B hero: clean graphic, no photo */
html[data-theme="daylight"] .hero {
  background:
    radial-gradient(120% 130% at 100% -25%, rgba(42,98,224,.16), transparent 52%),
    linear-gradient(180deg, #ffffff, #eef2fb);
  border-color: var(--border);
}
html[data-theme="daylight"] .hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--hairline) 1px, transparent 1px), linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(58% 90% at 82% 8%, #000, transparent 72%);
  mask-image: radial-gradient(58% 90% at 82% 8%, #000, transparent 72%);
  opacity: .7;
}
html[data-theme="daylight"] .hero__inner { position: relative; z-index: 1; }
html[data-theme="daylight"] .hero p { color: var(--ink-2); }
html[data-theme="daylight"] .chip-tag { background: #fff; }
html[data-theme="daylight"] .chip-tag:hover { background: var(--accent-soft); }
html[data-theme="daylight"] .badge--num { background: rgba(255,255,255,.92); }
html[data-theme="daylight"] ::-webkit-scrollbar-thumb { background: #cdd5e2; }
html[data-theme="daylight"] ::-webkit-scrollbar-thumb:hover { background: #b6c0d2; }

/* ═══════════ DIRECTION C — "Carbon" (near-black, electric, flat) ═══════════ */
html[data-theme="carbon"] {
  --bg: #0b0b0d; --bg-2: #101013; --surface: #141417; --surface-2: #0f0f12;
  --raise: #1c1c21; --raise-2: #26262d; --border: #26262c; --hairline: rgba(255,255,255,.06);
  --ink: #f4f4f5; --ink-2: #b6b6bd; --muted: #76767f; --faint: #46464d;
  --accent: #c6ff3d; --accent-2: #d4ff66; --accent-deep: #9bdc00;
  --accent-soft: rgba(198,255,61,.12); --accent-line: rgba(198,255,61,.32);
  --pos: #54e08a; --pos-soft: rgba(84,224,138,.12); --neg: #ff5a52; --neg-soft: rgba(255,90,82,.12);
  --gold: #e9b84d; --gold-soft: rgba(233,184,77,.12);
  --r-xs: 4px; --r-sm: 5px; --r: 8px; --r-lg: 10px; --r-xl: 12px;
  --shadow: 0 1px 0 rgba(255,255,255,.02), 0 14px 30px -20px rgba(0,0,0,.85);
  --shadow-lg: 0 24px 60px -28px rgba(0,0,0,.9);
  --glow: 0 0 0 1px var(--accent-line);
}
html[data-theme="carbon"] body { background: radial-gradient(60% 50% at 100% 0%, rgba(198,255,61,.05), transparent 60%), var(--bg); }
html[data-theme="carbon"] .topbar { background: rgba(11,11,13,.82); }
html[data-theme="carbon"] .btn-primary { color: #0b0b0d; box-shadow: 0 6px 18px -10px rgba(198,255,61,.8), inset 0 1px 0 rgba(255,255,255,.2); }
html[data-theme="carbon"] .brand__mark { background: #1c1c21; box-shadow: inset 0 0 0 1px var(--accent-line); }
html[data-theme="carbon"] .modesw button.is-active { color: #0b0b0d; }
html[data-theme="carbon"] .modesw__pill { box-shadow: none; }
html[data-theme="carbon"] .modesw[data-mode="live"] .modesw__pill { background: linear-gradient(150deg, #54e08a, #2fb874); box-shadow: none; }
html[data-theme="carbon"] .hero {
  background:
    linear-gradient(100deg, rgba(11,11,13,.98) 0%, rgba(11,11,13,.96) 34%, rgba(11,11,13,.66) 72%, rgba(11,11,13,.4) 100%),
    radial-gradient(130% 150% at 8% -10%, rgba(198,255,61,.16), transparent 52%),
    url('hero.webp');
  background-size: cover; background-position: center right;
}
html[data-theme="carbon"] .rung--top .rung__co { color: var(--gold); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--raise-2); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a3950; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }

/* ───────────── top bar ───────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 18px;
  height: 60px; padding: 0 22px;
  background: rgba(8,11,18,.72);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 11px; background: none; border: none; cursor: pointer; padding: 0; flex-shrink: 0; }
.brand__logo { height: 30px; width: auto; display: block; }
.brand__logo--dark { display: none; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; position: relative;
  background: linear-gradient(150deg, var(--accent-2), var(--accent-deep));
  box-shadow: 0 4px 16px -4px rgba(61,125,255,.7), inset 0 1px 0 rgba(255,255,255,.4);
}
.brand__mark svg { width: 19px; height: 19px; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.04em; }
.brand__name b { color: var(--accent-2); }
/* Light theme: swap to the dark-ink logo variant so the outline + .com stay visible */
html[data-theme="daylight"] .brand__logo--lite { display: none; }
html[data-theme="daylight"] .brand__logo--dark { display: block; }

.nav { display: flex; align-items: center; gap: 3px; margin-left: 6px; }
.nav__btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-weight: 600; font-size: 14px; color: var(--muted);
  background: none; border: none; padding: 8px 14px; border-radius: var(--r-sm); cursor: pointer;
  transition: color .16s, background .16s;
}
.nav__btn svg { width: 16px; height: 16px; }
.nav__btn:hover { color: var(--ink); }
.nav__btn.is-active { color: var(--ink); background: var(--raise); }

.topbar__spacer { flex: 1; }
.topbar__right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* demo / live segmented switch */
.modesw { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; position: relative; }
.modesw button { position: relative; z-index: 1; font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: .02em; color: var(--muted); background: none; border: none; padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: color .18s; }
.modesw button.is-active { color: #fff; }
.modesw__pill { position: absolute; top: 3px; bottom: 3px; border-radius: 999px; background: linear-gradient(150deg, var(--accent-2), var(--accent-deep)); transition: left .22s cubic-bezier(.3,1,.4,1), width .22s; z-index: 0; box-shadow: 0 3px 10px -3px rgba(61,125,255,.8); }
.modesw[data-mode="live"] .modesw__pill { background: linear-gradient(150deg, #34e6a4, #11a572); box-shadow: 0 3px 10px -3px rgba(47,208,138,.8); }

.icon-btn { width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; transition: .16s; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--ink); border-color: var(--accent-line); }

/* design-direction toggle */
.theme-toggle { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2); font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: .02em; cursor: pointer; transition: .16s; }
.theme-toggle:hover { color: var(--ink); border-color: var(--accent-line); }
.theme-toggle__sw { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(125deg, #0b1020 0 50%, #eef2fb 50% 100%); box-shadow: inset 0 0 0 1px rgba(128,128,128,.45); }
.theme-toggle__name { min-width: 56px; text-align: left; }

/* hamburger */
.hamburger { display: none; width: 40px; height: 40px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.hamburger span { width: 17px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ───────────── layout ───────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 26px 22px 90px; }
.view[hidden] { display: none; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); }
.eyebrow { font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.section-intro { margin: 4px 2px 20px; }
.section-intro h1 { font-size: 26px; font-weight: 700; }
.section-intro p { color: var(--muted); font-size: 14px; margin: 5px 0 0; max-width: 60ch; }

/* landing */
.landing-hero {
  position: relative;
  min-height: min(640px, calc(100vh - 132px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: end;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  padding: 64px 56px 52px;
  background:
    linear-gradient(100deg, rgba(7,10,17,.98) 0%, rgba(7,10,17,.9) 38%, rgba(7,10,17,.54) 72%, rgba(7,10,17,.24) 100%),
    url('hero.webp');
  background-size: cover;
  background-position: center right;
  box-shadow: var(--shadow-lg);
}
.landing-hero__copy { max-width: 720px; position: relative; z-index: 1; }
.landing-hero h1 { max-width: 820px; margin: 22px 0 18px; font-size: clamp(42px, 6vw, 78px); line-height: .95; font-weight: 700; }
.landing-hero p { max-width: 56ch; margin: 0; color: var(--ink-2); font-size: 18px; line-height: 1.55; }
.landing-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.landing-hero__ticker { position: relative; z-index: 1; display: grid; gap: 10px; align-self: end; }
.landing-hero__ticker div { min-width: 0; border: 1px solid var(--hairline); border-radius: var(--r-sm); padding: 14px 15px; background: rgba(12,17,27,.72); backdrop-filter: blur(12px); }
.landing-hero__ticker span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.landing-hero__ticker b { display: block; margin-top: 3px; font-family: var(--font-mono); font-size: 25px; line-height: 1; color: var(--ink); }
.landing-hero__ticker small { display: block; margin-top: 7px; color: var(--ink-2); font-size: 12px; line-height: 1.35; }
.landing-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.landing-tile { min-width: 0; min-height: 160px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow); transition: transform .14s, border-color .14s, background .14s; }
.landing-tile:hover { transform: translateY(-2px); border-color: var(--accent-line); background: var(--surface-2); }
.landing-tile span { font-family: var(--font-mono); color: var(--accent-2); font-size: 12px; font-weight: 700; }
.landing-tile b { font-family: var(--font-display); font-size: 19px; line-height: 1.1; }
.landing-tile small { color: var(--muted); font-size: 13px; line-height: 1.45; }
html[data-theme="daylight"] .landing-hero { background: linear-gradient(100deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.88) 42%, rgba(255,255,255,.42) 76%, rgba(255,255,255,.12) 100%), url('hero.webp'); background-size: cover; background-position: center right; }
html[data-theme="daylight"] .landing-hero__ticker div { background: rgba(255,255,255,.82); }
html[data-theme="carbon"] .landing-hero { background: linear-gradient(100deg, rgba(11,11,13,.98) 0%, rgba(11,11,13,.9) 38%, rgba(11,11,13,.54) 72%, rgba(11,11,13,.22) 100%), url('hero.webp'); background-size: cover; background-position: center right; }

/* ───────────── search bar ───────────── */
.searchbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search__field { position: relative; flex: 1 1 340px; display: flex; align-items: center; }
.search__icon { position: absolute; left: 16px; width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.search__input {
  width: 100%; border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  -webkit-appearance: none; appearance: none;
  border-radius: 14px; padding: 15px 16px 15px 46px; font-size: 16px; font-family: inherit;
  transition: border-color .16s, box-shadow .16s;
}
.search__input::placeholder { color: var(--faint); }
.search__input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--bg-2); }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 4px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--muted); border-radius: 9px; cursor: pointer; transition: .15s; }
.seg input:checked + label { background: var(--raise); color: var(--ink); }
.seg label:hover { color: var(--ink); }

.btn-primary {
  font-family: var(--font-ui); font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(150deg, var(--accent-2), var(--accent-deep)); border: none;
  border-radius: 14px; padding: 15px 26px; cursor: pointer; white-space: nowrap;
  box-shadow: 0 8px 22px -10px rgba(61,125,255,.9), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .12s, filter .16s;
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .55; cursor: progress; }
.btn-ghost { font-family: var(--font-ui); font-weight: 600; font-size: 14px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; cursor: pointer; transition: .15s; display: inline-flex; align-items: center; gap: 8px; }
.btn-ghost svg { width: 16px; height: 16px; }
.btn-ghost:hover { color: var(--ink); border-color: var(--accent-line); }

.status { margin: 16px 2px 0; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.status--error { color: var(--neg); }
.spinner { width: 15px; height: 15px; border: 2px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────────── empty / hero ───────────── */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  border: 1px solid var(--border); margin-top: 4px;
  background:
    linear-gradient(100deg, rgba(7,10,17,.98) 0%, rgba(7,10,17,.96) 30%, rgba(7,10,17,.62) 70%, rgba(7,10,17,.32) 100%),
    radial-gradient(130% 150% at 8% -10%, rgba(61,125,255,.24), transparent 52%),
    url('hero.webp');
  background-size: cover; background-position: center right;
}
.hero__inner { padding: 64px 56px 60px; max-width: 680px; }
.hero__tag { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--accent-2); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 999px; padding: 6px 13px; }
.hero__tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
.hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 700; line-height: 1.02; margin: 20px 0 16px; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--accent-2); }
.hero p { font-size: 17px; color: var(--ink-2); max-width: 48ch; margin: 0 0 30px; line-height: 1.55; }
.hero__form { max-width: 560px; }
.hero__hint { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.quadrant-control { display: inline-flex; align-items: center; gap: 4px; background: rgba(8,11,18,.54); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.quadrant-control span { padding: 0 9px; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.quadrant-control button { width: 32px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-family: var(--font-mono); font-weight: 700; cursor: pointer; }
.quadrant-control button.is-active { background: var(--accent-soft); color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-line); }
.quadrant-control--refine { margin: 0 0 10px; background: var(--surface-2); }
.search-quadrants { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
.search-quadrants[data-slots="2"], .search-quadrants[data-slots="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.search-quadrants[data-slots="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.search-quadrant { min-width: 0; padding: 10px; border-radius: 13px; border: 1px solid var(--hairline); background: rgba(8,11,18,.28); }
.search-quadrant > span { display: block; margin: 0 0 7px 2px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.search-quadrant[hidden] { display: none; }
.autocomplete { position: absolute; z-index: 700; max-height: 310px; overflow-y: auto; padding: 6px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-lg); }
.autocomplete[hidden] { display: none; }
.autocomplete__item { width: 100%; display: flex; flex-direction: column; gap: 3px; padding: 10px 11px; border: 0; border-radius: 9px; background: none; color: inherit; text-align: left; cursor: pointer; }
.autocomplete__item:hover { background: var(--accent-soft); }
.autocomplete__main { font-size: 13.5px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.autocomplete__meta { color: var(--muted); font-size: 12px; }
.chip-tag { background: rgba(255,255,255,.05); border: 1px solid var(--hairline); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: .15s; }
.chip-tag:hover { border-color: var(--accent-line); color: var(--ink); background: var(--accent-soft); }

.hero__id { margin-top: 26px; display: flex; align-items: center; gap: 14px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.hero__id p { margin: 0; font-size: 14px; color: var(--muted); }

/* ───────────── dashboard ───────────── */
.dashboard { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; margin-top: 6px; }
.dashboard--slots-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard--slots-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard--slots-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.result-pane { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.result-pane[hidden] { display: none; }
.result-pane__label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.result-pane__label b { color: var(--ink-2); font-family: var(--font-display); font-size: 14px; letter-spacing: 0; text-transform: none; }
.result-pane .spotlight { grid-template-columns: 120px 1fr; gap: 18px; }
.result-pane .spotlight__art { width: 120px; }
.result-pane .spotlight__name { font-size: 23px; }
.result-pane .spotlight__price { font-size: 38px; }
.result-pane .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.result-pane .grid2 { grid-template-columns: 1fr; }
.result-pane .ladder__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog-choices { padding: 18px; }
.catalog-choices__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.catalog-choices__head h2 { font-size: 18px; }
.catalog-choices__head span { color: var(--muted); font-size: 12px; font-weight: 700; }
.catalog-choices__list { display: flex; flex-direction: column; gap: 8px; max-height: 680px; overflow-y: auto; padding-right: 4px; }
.catalog-choice { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: inherit; text-align: left; cursor: pointer; transition: .14s; }
.catalog-choice:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.catalog-choice__art { width: 44px; height: 60px; border-radius: 7px; background: var(--raise); overflow: hidden; }
.catalog-choice__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catalog-choice__body { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.catalog-choice__body b { font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-choice__body span { color: var(--muted); font-size: 12px; }
.catalog-choice__num { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--accent-2); }

/* card header */
.spotlight { display: grid; grid-template-columns: auto 1fr; gap: 28px; padding: 26px 28px; align-items: stretch; }
.spotlight__art { position: relative; width: 168px; flex-shrink: 0; }
.spotlight__art img { width: 100%; border-radius: 14px; box-shadow: var(--shadow-lg); display: block; }
.spotlight__badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; }
.spotlight__main { display: flex; flex-direction: column; min-width: 0; }
.spotlight__crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; color: var(--muted); }
.spotlight__crumbs b { color: var(--ink-2); font-weight: 600; }
.spotlight__name { font-size: 27px; font-weight: 700; line-height: 1.1; margin: 8px 0 0; }
.spotlight__pricerow { display: flex; align-items: flex-end; gap: 14px; margin-top: auto; padding-top: 18px; flex-wrap: wrap; }
.spotlight__price { font-family: var(--font-mono); font-weight: 700; font-size: 46px; line-height: 1; letter-spacing: -0.03em; }
.spotlight__pricelabel { font-size: 13px; color: var(--muted); margin-top: 6px; }
.spotlight__actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.badge { font-family: var(--font-ui); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; backdrop-filter: blur(4px); }
.badge--rc { background: rgba(233,184,77,.92); color: #2a1e00; }
.badge--auto { background: rgba(255,96,88,.92); color: #2a0604; }
.badge--num { background: rgba(8,11,18,.8); color: var(--accent-2); border: 1px solid var(--accent-line); }

.chip { font-family: var(--font-mono); font-weight: 700; font-size: 13px; padding: 5px 11px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.chip--up { color: var(--pos); background: var(--pos-soft); }
.chip--down { color: var(--neg); background: var(--neg-soft); }
.chip--flat { color: var(--muted); background: var(--raise); }

/* parallel selector */
.parallels { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.parallel { font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 13px; cursor: pointer; transition: .14s; display: inline-flex; align-items: center; gap: 7px; }
.parallel small { font-family: var(--font-mono); color: var(--muted); font-weight: 700; }
.parallel:hover { border-color: var(--accent-line); color: var(--ink); }
.parallel.is-active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }

/* metric tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile { padding: 17px 18px; display: flex; flex-direction: column; gap: 7px; position: relative; overflow: hidden; }
.tile__k { font-size: 12px; color: var(--muted); font-weight: 600; }
.tile__v { font-family: var(--font-mono); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.tile__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile__sub { font-size: 12px; color: var(--muted); }
.spark { width: 88px; height: 30px; }
.spark path { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* graded ladder — the CardSight superpower */
.ladder { padding: 20px 22px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.panel-head .src { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--accent-2); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 999px; padding: 3px 10px; text-transform: uppercase; }
.panel-head .note { font-size: 12px; color: var(--muted); margin-left: auto; }

.ladder__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: end; }
.rung { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 13px 13px; display: flex; flex-direction: column; gap: 9px; position: relative; transition: .16s; }
.rung:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.rung__co { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.rung__co .pip { width: 8px; height: 8px; border-radius: 2px; }
.rung__grade { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.rung__bar { height: 6px; border-radius: 4px; background: var(--raise); overflow: hidden; }
.rung__bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent-deep), var(--accent-2)); }
.rung__price { font-family: var(--font-mono); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; margin-top: 2px; }
.rung__count { font-size: 11px; color: var(--muted); }
.rung--top { background: linear-gradient(160deg, var(--gold-soft), var(--surface-2)); border-color: rgba(233,184,77,.35); }
.rung--top .rung__bar i { background: linear-gradient(90deg, #b8860b, var(--gold)); }
.rung--top .rung__co { color: var(--gold); }

/* chart cards */
.chartcard { padding: 20px 22px 16px; }
.chartcard__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.chartcard__head h2 { font-size: 16px; font-weight: 700; }
.chartcard__note { font-size: 12px; color: var(--muted); }
.chartbox { position: relative; width: 100%; }
.chart { width: 100%; height: auto; display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.rangetoggle { margin-left: auto; display: inline-flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.rangetoggle button { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--muted); background: none; border: none; padding: 7px 12px; border-radius: 7px; cursor: pointer; transition: .14s; }
.rangetoggle button.is-active { background: var(--raise); color: var(--ink); }

/* chart svg bits */
.grid { stroke: var(--hairline); stroke-width: 1; }
.axis { fill: var(--muted); font-size: 11px; font-family: var(--font-mono); }
.axis--strong { fill: var(--ink-2); font-weight: 700; font-family: var(--font-display); }
.chart-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { stroke: var(--surface); stroke-width: 1.5; }
.chart-guide { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 4 4; opacity: .6; }
.chart-empty { color: var(--muted); font-size: 13px; padding: 46px 8px; text-align: center; }
.chart-tip { position: absolute; top: 6px; pointer-events: none; background: var(--raise-2); color: #fff; border: 1px solid var(--accent-line); border-radius: 9px; padding: 7px 11px; font-size: 12px; display: flex; flex-direction: column; line-height: 1.3; white-space: nowrap; box-shadow: var(--shadow); }
.chart-tip[hidden] { display: none; }
.chart-tip strong { font-family: var(--font-mono); font-size: 13px; }
.chart-tip span { color: var(--ink-2); }

/* comps */
.comps-panel { padding: 18px 20px; }
.comps-panel__head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; flex-wrap: wrap; }
.comps-panel__head h2 { font-size: 15px; font-weight: 700; }
.comp-filter { margin-left: auto; min-width: 118px; height: 32px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--ink-2); font-family: var(--font-ui); font-size: 12px; font-weight: 700; padding: 0 9px; }
.comp-filter:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.comp-filter + .link-out--head { margin-left: 0; }
.dot-i { width: 9px; height: 9px; border-radius: 50%; }
.dot-i--sold { background: var(--pos); box-shadow: 0 0 8px var(--pos); }
.dot-i--active { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.comps { display: flex; flex-direction: column; gap: 4px; max-height: 470px; overflow-y: auto; padding-right: 4px; }
.comp { display: grid; grid-template-columns: 46px 1fr auto; gap: 13px; align-items: center; padding: 9px; border-radius: 12px; border: 1px solid transparent; transition: .14s; }
.comp:hover { background: var(--surface-2); border-color: var(--border); }
.comp__img { width: 46px; height: 62px; object-fit: cover; border-radius: 7px; background: var(--raise); flex-shrink: 0; }
.comp__body { min-width: 0; }
.comp__title { font-size: 13px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.comp__meta { font-size: 11px; color: var(--muted); margin-top: 3px; display: flex; gap: 7px; flex-wrap: wrap; }
.seller-badge { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; color: var(--ink-2); }
.seller-badge__mark {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-grid; place-items: center; flex: 0 0 auto;
  font-size: 8px; font-weight: 800; line-height: 1;
  color: #fff;
  background: linear-gradient(150deg, #e53238, #0064d2 46%, #86b817);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24);
}
.seller-badge__name { min-width: 0; max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.seller-badge__score { color: var(--muted); white-space: nowrap; }
.comp__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.comp__price { font-family: var(--font-mono); font-weight: 700; font-size: 15px; }
.vs { font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.vs--up { color: var(--pos); background: var(--pos-soft); }
.vs--down { color: var(--neg); background: var(--neg-soft); }
.gradetag { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--ink-2); background: var(--raise); border-radius: 5px; padding: 1px 6px; }
.notice { color: var(--muted); font-size: 13px; padding: 22px 6px; text-align: center; }

.link-out { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--accent-2); }
.link-out:hover { text-decoration: underline; }
.link-out--head { margin-left: auto; }

/* ───────────── inventory ───────────── */
.inv-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; flex-wrap: wrap; }
.inv-toolbar .sel { -webkit-appearance: none; appearance: none; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink); border-radius: 11px; padding: 10px 13px; font-family: inherit; font-size: 14px; font-weight: 600; min-width: 180px; }
.inv-toolbar__spacer { flex: 1; }
.inv-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table thead th { text-align: right; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.inv-table thead th:first-child { text-align: left; }
.inv-table td { padding: 13px 14px; border-bottom: 1px solid var(--hairline); text-align: right; vertical-align: middle; }
.inv-table td:first-child { text-align: left; }
.inv-row__cell { display: flex; align-items: center; gap: 12px; }
.inv-thumb { width: 38px; height: 52px; object-fit: cover; border-radius: 7px; background: var(--raise); flex-shrink: 0; display: block; cursor: pointer; border: 1px solid var(--border); }
.inv-thumb--ph { display: inline-block; }
.inv-row__open { display: inline-flex; }
.inv-table tbody tr { transition: background .14s; }
.inv-table tbody tr:hover { background: var(--surface-2); }
.inv-row__name { font-size: 14px; font-weight: 600; cursor: pointer; }
.inv-row__name:hover { color: var(--accent-2); }
.inv-row__sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.inv-price { font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
.inv-spark { width: 96px; height: 28px; display: inline-block; }
.inv-spark path { fill: none; stroke-width: 2; }
.inv-del { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer; transition: .14s; }
.inv-del:hover { color: var(--neg); border-color: var(--neg); }

/* CSV dropzone */
.dropzone { border: 2px dashed var(--border); border-radius: var(--r); padding: 40px 28px; text-align: center; color: var(--muted); transition: .18s; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink-2); }
.dropzone svg { width: 38px; height: 38px; color: var(--muted); margin: 0 auto 10px; display: block; }
.dropzone h3 { font-size: 16px; color: var(--ink); margin-bottom: 6px; }
.dropzone p { font-size: 13px; margin: 0; }
.dropzone code { font-family: var(--font-mono); font-size: 12px; background: var(--raise); padding: 1px 6px; border-radius: 5px; color: var(--ink-2); }
.tabs { display: inline-flex; gap: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.tabs button { font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--muted); background: none; border: none; padding: 9px 16px; border-radius: 8px; cursor: pointer; transition: .14s; }
.tabs button.is-active { background: var(--raise); color: var(--ink); }
.bulk-input { width: 100%; min-height: 150px; resize: vertical; -webkit-appearance: none; appearance: none; background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; color: var(--ink); font-family: var(--font-mono); font-size: 13px; padding: 14px 16px; line-height: 1.8; }
.bulk-input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ───────────── identify modal ───────────── */
.modal-root:empty { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 500; background: rgba(4,6,11,.74); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 22px; animation: fade .2s; }
@keyframes fade { from { backdrop-filter: blur(0); } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; padding: 26px; animation: pop .26s cubic-bezier(.3,1.2,.5,1); }
@keyframes pop { from { transform: translateY(14px) scale(.97); } }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.modal__head h3 { font-size: 20px; font-weight: 700; }
.modal__head p { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.modal__x { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); cursor: pointer; font-size: 16px; flex-shrink: 0; }
.modal__x:hover { color: var(--ink); }

.id-stage { border: 2px dashed var(--border); border-radius: var(--r); padding: 34px 20px; text-align: center; transition: .18s; cursor: pointer; }
.id-stage:hover, .id-stage.drag { border-color: var(--accent-line); background: var(--accent-soft); }
.id-stage svg { width: 46px; height: 46px; color: var(--accent-2); margin: 0 auto 12px; display: block; }
.id-stage h4 { font-size: 16px; margin-bottom: 6px; }
.id-stage p { font-size: 13px; color: var(--muted); margin: 0; }
.id-scan { text-align: center; padding: 20px; }
.id-scan__frame { position: relative; width: 150px; aspect-ratio: 5/7; margin: 0 auto 18px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.id-scan__frame img { width: 100%; height: 100%; object-fit: cover; }
.id-scan__line { position: absolute; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--accent-2), transparent); box-shadow: 0 0 14px var(--accent-2); animation: scan 1.4s ease-in-out infinite; }
@keyframes scan { 0%,100% { top: 4%; } 50% { top: 92%; } }
.id-result { display: flex; gap: 12px; align-items: center; padding: 11px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; transition: .14s; margin-top: 10px; }
.id-result:hover { border-color: var(--accent-line); }
.id-result:first-of-type { border-color: var(--accent-line); background: var(--accent-soft); }
.id-result img { width: 44px; height: 60px; object-fit: cover; border-radius: 7px; }
.id-result__body { flex: 1; min-width: 0; }
.id-result__name { font-size: 14px; font-weight: 600; }
.id-result__meta { font-size: 12px; color: var(--muted); }
.id-result__conf { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--pos); }

/* ───────────── footer ───────────── */
.foot { max-width: var(--maxw); margin: 0 auto; padding: 28px 22px 40px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--hairline); display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.foot__src { display: inline-flex; align-items: center; gap: 6px; }
.foot__src b { color: var(--ink-2); font-weight: 600; }

/* ───────────── reveal animation ─────────────
   Transform-only (no opacity) so content is NEVER hidden even if the
   animation timeline is throttled/paused by the host iframe. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: reveal .5s cubic-bezier(.2,.7,.3,1) both; }
  .reveal-2 { animation: reveal .5s .06s cubic-bezier(.2,.7,.3,1) both; }
  .reveal-3 { animation: reveal .5s .12s cubic-bezier(.2,.7,.3,1) both; }
  @keyframes reveal { from { transform: translateY(10px); } }
}
.dashboard[hidden] { display: none; }

/* ───────────── responsive ───────────── */
@media (max-width: 980px) {
  .tiles, .inv-summary { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .ladder__grid { grid-template-columns: repeat(3, 1fr); }
  .landing-hero { grid-template-columns: 1fr; min-height: auto; padding: 48px 38px 40px; }
  .landing-hero__ticker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .landing-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .hamburger { display: flex; }
  .modesw button { padding: 6px 10px; }
  .wrap { padding: 18px 14px 90px; }
  .landing-hero { padding: 38px 24px 26px; border-radius: var(--r-lg); background-position: 64% center; }
  .landing-hero h1 { font-size: clamp(36px, 13vw, 54px); line-height: .98; }
  .landing-hero p { font-size: 16px; }
  .landing-hero__actions .btn-primary, .landing-hero__actions .btn-ghost { width: 100%; justify-content: center; }
  .landing-hero__ticker, .landing-band { grid-template-columns: 1fr; }
  .landing-tile { min-height: 130px; }
  .hero__inner { padding: 40px 26px 38px; }
  .spotlight { grid-template-columns: 1fr; gap: 18px; }
  .spotlight__art { width: 120px; }
  .spotlight__price { font-size: 38px; }
  .ladder__grid { grid-template-columns: repeat(2, 1fr); }
  .searchbar { flex-direction: column; align-items: stretch; }
  .seg, .btn-primary { width: 100%; }
  .seg { justify-content: center; }
}

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 400; pointer-events: none; }
.drawer.open { pointer-events: all; }
.drawer__bg { position: absolute; inset: 0; background: rgba(4,6,11,.7); opacity: 0; transition: .25s; }
.drawer.open .drawer__bg { opacity: 1; }
.drawer__panel { position: absolute; top: 0; bottom: 0; left: 0; width: 270px; background: var(--surface); border-right: 1px solid var(--border); transform: translateX(-100%); transition: transform .26s cubic-bezier(.3,1,.4,1); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.drawer.open .drawer__panel { transform: none; }
.drawer__panel .nav__btn { width: 100%; justify-content: flex-start; padding: 13px 14px; font-size: 15px; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
