@import url("/static/tokens.css");

/* RAGNAR global live-commerce system.
   Semantic tokens are defined once in tokens.css; this file owns shared
   foundations, components, and supporting-page layouts.
   Nordic fonts (Space Grotesk / Inter / IBM Plex Mono) load via each page
   <link> and a nav.js fallback — keep stacks in tokens.css only. */

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  line-height: var(--leading-body);
}

h1, h2, h3 {
  line-height: var(--leading-tight);
  font-family: var(--font-display);
  font-weight: 600; 
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
  font-feature-settings: "kern" 1, "liga" 1;
}
p { line-height: var(--leading-body); max-width: 68ch; }
p.lead, .vault-hero-sub, .counsel-hero-sub { max-width: 42ch; }

.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 82% -8%, rgba(86, 200, 242, 0.08), transparent 62%),
    radial-gradient(800px 440px at 5% -12%, rgba(159, 180, 198, 0.05), transparent 62%),
    linear-gradient(180deg, rgba(86, 200, 242, .05), transparent 35%);
}

a { color: var(--ice); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  background: rgba(3, 9, 15, 0.06);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.9em;
  font-family: var(--font-mono);
}
.site-skip {
  position: fixed; left: 12px; top: 10px; z-index: 200;
  transform: translateY(-160%); padding: 10px 14px;
  color: var(--color-on-accent); background: var(--color-accent-primary);
  border-radius: var(--radius-xs); font-weight: 750;
}
.site-skip:focus { transform: none; }

/* ---------- Header (luxury tech chrome — built by nav.js) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: clamp(16px, 2.5vw, 36px);
  min-height: 68px;
  padding: 0 clamp(18px, 3.5vw, 40px);
  background: linear-gradient(180deg, rgba(14, 27, 41, 0.92), rgba(12, 23, 35, 0.86));
  backdrop-filter: saturate(1.2) blur(20px);
  -webkit-backdrop-filter: saturate(1.2) blur(20px);
  border-bottom: 1px solid var(--color-border-default);
  box-shadow: 0 1px 0 rgba(86, 200, 242, 0.06), 0 12px 32px rgba(3, 9, 15, 0.06);
}
.site-header::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(86, 200, 242, 0.28), transparent);
  pointer-events: none;
}
.brand { display: flex; align-items: center; flex: none; }
.logo-link {
  display: inline-flex; align-items: center; line-height: 0;
  transition: filter var(--duration-medium) var(--ease-premium), transform var(--duration-fast);
}
.logo-link:hover {
  filter: drop-shadow(0 0 14px rgba(86, 200, 242, 0.35));
  transform: translateY(-0.5px);
}
.logo-img {
  height: 36px; width: auto; max-width: 132px; display: block;
  object-fit: contain; border-radius: 0;
}
.hero-logo { display: block; width: min(200px, 42%); margin: 0 auto 18px; }
.crest { width: 62px; height: 42px; }
.brand-word h1 {
  margin: 0; font-size: clamp(18px, 2.4vw, 24px); font-weight: 600;
  letter-spacing: var(--tracking-display); color: var(--text);
  font-family: var(--font-display);
}
.runes {
  display: block; font-size: 11px; letter-spacing: var(--tracking-label);
  color: var(--muted); text-transform: uppercase; font-family: var(--font-mono);
}

.site-nav {
  display: none; align-items: center; gap: 4px; flex: 1; min-width: 0;
  justify-content: center;
}
.site-nav a {
  position: relative;
  padding: 10px 14px;
  color: #e6f1f9;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: var(--radius-xs);
  transition:
    color var(--duration-fast) var(--ease-premium),
    background var(--duration-fast),
    box-shadow var(--duration-medium);
}
.site-nav a:hover {
  color: var(--color-text-primary);
  background: var(--color-hover-surface);
  text-decoration: none;
}
.site-nav a.is-active { color: var(--color-frost, var(--color-text-primary)); }
.site-nav a.is-active::after {
  content: "";
  position: absolute; left: 14px; right: 14px; bottom: 5px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent-primary), transparent);
  opacity: 0.9;
  box-shadow: 0 0 8px rgba(86, 200, 242, 0.45);
}

.header-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; margin-left: auto; flex: none;
}
.header-extra { display: flex; align-items: center; gap: var(--space-2); }
.header-extra:empty { display: none; }

.site-header .btn {
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 36px;
  padding: 0 16px;
  box-shadow: none;
}
.site-header .btn-ghost {
  background: rgba(191, 234, 255, 0.06);
  border-color: rgba(191, 234, 255, 0.22);
  color: #e6f1f9;
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
}
.site-header .btn-ghost:hover:not(:disabled) {
  color: #ffffff;
  background: var(--color-hover-surface);
  border-color: rgba(191, 234, 255, 0.4);
  transform: none;
  box-shadow: none;
}
.site-header .btn-primary {
  box-shadow: 0 0 28px rgba(86, 200, 242, 0.28);
}
.site-header .btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 40px rgba(86, 200, 242, 0.42);
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
}

/* Page-specific header atmosphere (shared chrome; no parallel nav) */
.site-header--arena {
  /* No backdrop blur here: the homepage environment animates continuously and
     re-filtering the strip every frame costs real GPU time. */
  background: linear-gradient(180deg, rgba(8, 17, 27, 0.88), rgba(8, 17, 27, 0.62));
  border-bottom-color: rgba(3, 9, 15, 0.08);
  box-shadow: none;
}
.site-header--arena .site-nav a { color: #e6f1f9; }
.site-header--arena .site-nav a:hover,
.site-header--arena .site-nav a.is-active { color: #ffffff; }
.site-header--arena .btn-primary {
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  color: var(--color-on-accent);
}
.site-header--light {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}
.site-header--light::before { display: none; }
.site-header--light .nav-burger {
  border-color: transparent;
  color: var(--color-text-muted);
}
.site-header--room {
  background: rgba(14, 27, 41, 0.9);
  border-bottom-color: var(--color-border-subtle);
  backdrop-filter: saturate(1.15) blur(16px);
  -webkit-backdrop-filter: saturate(1.15) blur(16px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: var(--radius-xs); cursor: pointer;
  font-size: 13px; font-weight: 650; font-family: inherit;
  letter-spacing: 0.01em;
  color: var(--color-text-primary);
  background: var(--color-bg-glass-soft);
  border: 1px solid var(--color-border-default);
  transition:
    transform var(--duration-fast) var(--ease-premium),
    box-shadow var(--duration-medium),
    background var(--duration-fast),
    border-color var(--duration-fast),
    color var(--duration-fast);
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--color-hover-surface);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn-sm { padding: 6px 12px; font-size: 13px; min-height: 34px; }
.btn-primary {
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  color: var(--color-on-accent);
  box-shadow: 0 0 24px rgba(86, 200, 242, 0.18);
  font-weight: 700;
  letter-spacing: 0.03em;
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-primary-strong);
  border-color: var(--color-accent-primary-strong);
  box-shadow: var(--glow-ice);
  transform: translateY(-1px);
}
.btn-ghost { background: transparent; border-color: var(--color-border-default); }
.btn-ghost:hover:not(:disabled) {
  background: var(--color-hover-surface);
  border-color: var(--color-border-strong);
}
.btn:disabled {
  opacity: 1; color: var(--color-text-disabled); background: var(--color-disabled-surface);
  cursor: not-allowed; transform: none; box-shadow: none;
}
.btn:focus-visible,
.cat-chip:focus-visible,
.preset-btn:focus-visible,
.watch-heart:focus-visible,
.nav-burger:focus-visible,
.nav-bell:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}

.status-badge {
  font-size: 11px; padding: 4px 9px; border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle); color: var(--color-text-muted); background: transparent;
}
.status-badge.online { color: var(--ok); border-color: rgba(18,133,90,0.35); background: rgba(18,133,90,0.08); }
.status-badge.offline { color: var(--danger); border-color: rgba(220,38,38,0.35); background: rgba(220,38,38,0.06); }

/* ---------- Hero ---------- */
.hero {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 40px) 20px;
}
.hero-copy { max-width: 660px; }
.hero h2 { margin: 0 0 12px; font-size: clamp(30px, 5vw, 52px); line-height: 1.05; font-weight: 700; letter-spacing: var(--tracking-tight); }
.hero .accent { color: var(--ice); }
.hero-pitch { margin: 0; color: var(--text-soft); font-size: 17px; line-height: 1.55; }
.hero-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat {
  padding: 14px 18px; border-radius: 12px; background: var(--panel);
  border: 1px solid var(--border); box-shadow: var(--shadow); min-width: 120px;
}
.stat .stat-num { font-size: 26px; font-weight: 800; color: var(--text); }
.stat .stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat.hot .stat-num { color: var(--ice); }

/* ---------- Marketplace hero (legacy; vault-page uses marketplace.css) ---------- */
.mkt-hero {
  text-align: center;
  padding: clamp(30px, 5vw, 56px) clamp(16px, 4vw, 40px) 22px;
  max-width: 880px; margin: 0 auto;
}
.mkt-hero h2 { margin: 0 0 8px; font-size: clamp(28px, 4.5vw, 44px); font-weight: 700; letter-spacing: var(--tracking-tight); }
.mkt-hero .hero-pitch { margin: 0 auto 22px; max-width: 560px; text-align: center; }
.mkt-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-solid); border: 1px solid var(--border-strong);
  padding: 6px 6px 6px 18px; box-shadow: var(--shadow); max-width: 640px; margin: 0 auto;
}
.mkt-search:focus-within { border-color: var(--ice); box-shadow: 0 0 0 3px rgba(86, 200, 242, 0.18), var(--shadow); }
.mkt-search .mkt-ico { font-size: 17px; opacity: 0.6; flex: none; }
.mkt-search input { border: none; box-shadow: none; padding: 10px 4px; font-size: 15px; background: transparent; flex: 1; }
.mkt-search input:focus { outline: none; box-shadow: none; }
.mkt-search .btn { flex: none; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 20px auto 4px; max-width: 760px; }
.cat-chip {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 8px 14px; border-radius: var(--radius-xs, 3px);
  background: var(--panel-solid); border: 1px solid var(--border-strong); color: var(--text-soft);
  transition: transform 120ms ease, background 120ms, color 120ms, border-color 120ms;
}
.cat-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--text); }
.cat-chip.active { background: var(--ice); border-color: var(--ice); color: var(--color-on-accent); }
.mkt-hero .hero-stats { justify-content: center; margin-top: 22px; }

/* ---------- Trust bar ---------- */
.trust-bar {
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center;
  padding: 12px clamp(16px,4vw,40px); font-size: 13px; color: var(--color-text-muted);
}
.trust-bar span { display: inline-flex; align-items: center; gap: 7px; }
.trust-bar b { color: var(--color-text-secondary); font-weight: 600; }

/* ---------- Live-now rail ---------- */
.live-rail-wrap { padding: 8px clamp(16px,4vw,40px) 0; }
.live-rail-head { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16px; margin-bottom: 12px; }
.live-rail-head .lr-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-live); box-shadow: 0 0 8px var(--color-live); animation: lrpulse 1.4s infinite; }
@keyframes lrpulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.live-rail { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.lr-card { flex: none; width: 216px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--panel); box-shadow: 0 1px 2px rgba(20,30,55,.05); text-decoration: none; color: inherit; scroll-snap-align: start; transition: transform .15s ease, box-shadow .18s ease; }
.lr-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.lr-thumb { aspect-ratio: 16/10; position: relative; }
.lr-badge { position: absolute; top: 8px; left: 8px; background: var(--color-live); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--radius-xs); }
.lr-views { position: absolute; top: 8px; right: 8px; background: rgba(20,30,55,.6); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 6px; }
.lr-body { padding: 10px 12px 12px; }
.lr-title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.lr-seller { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---------- Layout ---------- */
.layout {
  display: grid; grid-template-columns: 288px 1fr; gap: 22px;
  padding: 10px clamp(16px, 4vw, 40px) 40px; align-items: start;
}
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-soft {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.title-tight { margin: 0; letter-spacing: 0.01em; }
.muted-sm { font-size: 12px; color: var(--muted); }
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.w-full { width: 100%; }
.mb-12 { margin-bottom: 12px; }
.mb-8 { margin-bottom: 8px; }
.mb-18 { margin-bottom: 18px; }
.inline-row-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.featured-label { color: var(--gold); }
.suggest-out { font-size: 12px; min-height: 0; }
.filters { padding: 20px; position: sticky; top: 84px; border-radius: var(--radius-md); }
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.filters-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
}

.field { display: grid; gap: 6px; margin-bottom: 13px; }
.field[hidden],
[hidden] { display: none !important; }
.field > span { font-size: 12px; color: var(--text-soft); font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

input, select, textarea {
  width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit;
  color: var(--text); background: var(--color-bg-input);
  border: 1px solid var(--border-strong); border-radius: var(--radius-xs);
  transition: border-color var(--duration-fast) var(--ease-premium), box-shadow var(--duration-medium);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--ice); box-shadow: var(--shadow-focus);
}
select option { background: var(--panel-solid); color: var(--text); }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text-soft); cursor: pointer; }
.check-row input { width: auto; }

.results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.results-head-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.results-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.result-count { color: var(--text-soft); font-size: 14px; font-weight: 500; }
.sort { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sort select { width: auto; padding: 7px 10px; }

.quick-presets {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.preset-btn {
  border: 1px solid var(--border-strong);
  background: var(--panel-solid);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.preset-btn:hover { border-color: var(--ice); color: var(--ice-strong); }
.preset-btn.active { background: var(--ice); border-color: var(--ice); color: var(--color-on-accent); }

/* ---------- Product grid ---------- */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
.listing {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-xs); box-shadow: 0 1px 2px rgba(3,9,15,0.3);
  transition: transform var(--duration-fast) var(--ease-premium), box-shadow var(--duration-medium), border-color var(--duration-fast);
}
.listing-link {
  color: inherit;
  text-decoration: none;
  display: block;
}
.listing:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-strong);
}
.listing-img {
  position: relative; aspect-ratio: 5 / 6; overflow: hidden;
  background: linear-gradient(160deg, #14293c, #0c1927);
  display: flex; align-items: center; justify-content: center;
}
.listing-img img { width: 100%; height: 100%; object-fit: cover; }
.listing-img .placeholder-crest { width: 46%; opacity: 0.30; }
.listing-badges { position: absolute; top: 9px; left: 9px; display: flex; gap: 6px; flex-wrap: wrap; }

.badge {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: rgba(9,11,14,0.88); border: 1px solid var(--border-strong);
  color: var(--text-soft); backdrop-filter: blur(4px); white-space: nowrap;
}
.badge.grade { background: rgba(86, 200, 242, 0.10); border-color: rgba(86, 200, 242,0.32); color: var(--ice-strong); }
.badge.founding {
  background: rgba(174, 198, 216, 0.14); border-color: rgba(174, 198, 216,0.4); color: var(--gold);
}
.listing-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.listing-body-main { padding-bottom: 0; }
.listing-body-foot { padding-top: 6px; }
.listing-title { font-weight: 700; font-size: 15px; line-height: 1.28; }
.listing-sub { font-size: 12px; color: var(--muted); }
.listing-spacer { flex: 1; }
.listing-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 6px; }
.listing-price { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.listing-keep { font-size: 11px; color: var(--ok); text-align: right; line-height: 1.3; }
.listing-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 5px; }
.listing-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.listing-seller { font-size: 12px; color: var(--text-soft); display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-foot-actions { display: flex; gap: 6px; }
.listing-savings { color: var(--color-text-muted); }
.seller-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ice); flex: none; }
.buy-btn { flex: none; background: var(--ice); border-color: var(--ice); color: var(--color-on-accent); font-weight: 600; }
.buy-btn:hover { background: var(--ice-strong); border-color: var(--ice-strong); box-shadow: 0 8px 20px rgba(169,219,234,0.18); }
.watch-heart { position:absolute; top:9px; right:9px; z-index:3; width:34px; height:34px; border-radius:50%; border:1px solid var(--border-strong); background:rgba(8,10,12,0.9); color:#ef8baa; font-size:16px; cursor:pointer; backdrop-filter:blur(4px); display:flex; align-items:center; justify-content:center; }
.watch-heart:hover { transform:scale(1.07); background:#15191d; }
.watch-heart.on { color:#e11d6b; border-color:rgba(225,29,107,0.5); box-shadow:0 2px 10px rgba(225,29,107,0.25); }

.compare-btn {
  border-color: var(--border-strong);
}
.compare-btn.on {
  border-color: var(--ice);
  color: var(--ice-strong);
  background: rgba(86, 200, 242, 0.08);
}

.empty {
  padding: 72px 24px;
  text-align: center;
  color: var(--color-text-muted);
  grid-column: 1 / -1;
  border: 1px dashed var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-bg-elevated) 70%, transparent);
  font-size: 14px;
  line-height: 1.5;
}
.empty-state {
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-bg-elevated) 65%, transparent);
  color: var(--color-text-muted);
}
.empty-state p {
  margin: 0 0 6px;
  color: var(--color-text-secondary);
  font-size: 15px;
  font-weight: 600;
}
.empty-state span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.listing.skeleton {
  pointer-events: none;
  overflow: hidden;
}
.listing.skeleton .listing-img,
.listing.skeleton .line {
  position: relative;
  background: linear-gradient(90deg, #101419 15%, #1a2026 40%, #101419 65%);
  background-size: 220% 100%;
  animation: skel 1.1s linear infinite;
}
.listing.skeleton .listing-img { aspect-ratio: 5 / 6; }
.listing.skeleton .listing-body { gap: 8px; }
.listing.skeleton .line { height: 12px; border-radius: 8px; }
.listing.skeleton .line.w60 { width: 60%; }
.listing.skeleton .line.w40 { width: 40%; }
.listing.skeleton .line.w80 { width: 80%; }
@keyframes skel {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 28px; }
.page-info { color: var(--text-soft); font-size: 13px; }

.compare-tray {
  position: sticky;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  border: 1px solid var(--border-strong);
  background: rgba(14, 27, 41, 0.96);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  z-index: 8;
}
.compare-tray[hidden] { display: none !important; }
.compare-tray-left { display: flex; align-items: center; gap: 8px; }
.compare-count { color: var(--muted); font-size: 12px; }
.compare-tray-actions { display: flex; gap: 8px; }

.compare-modal {
  position: fixed;
  inset: 0;
  z-index: 65;
}
.compare-modal[hidden] { display: none !important; }
.compare-scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 9, 15, 0.72);
}
.compare-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, 96vw);
  max-height: 86vh;
  overflow: auto;
  padding: 18px;
}
.compare-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.compare-head h3 { margin: 0; }
.compare-table {
  display: grid;
  grid-template-columns: 140px repeat(3, minmax(180px, 1fr));
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.cmp-cell {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--panel-solid);
  font-size: 13px;
}
.cmp-cell.head {
  font-weight: 700;
  background: var(--bg-2);
}
.cmp-cell.label {
  font-weight: 600;
  color: var(--text-soft);
  background: #142534;
}
.cmp-cell.best {
  background: rgba(113, 214, 173, 0.13);
  color: var(--ok);
  font-weight: 700;
}
.cmp-cell.faded {
  color: var(--color-text-subtle);
}

/* ---------- Drawer (sell) ---------- */
.drawer { position: fixed; inset: 0; z-index: 40; display: none; }
.drawer.open { display: block; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(20, 30, 55, 0.35); backdrop-filter: blur(2px); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(480px, 100%); border-radius: 0;
  border-left: 1px solid var(--border); padding: 24px;
  overflow-y: auto; z-index: 1; background: var(--panel-solid);
  box-shadow: -16px 0 50px rgba(20,30,55,0.18);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer-head h3 { margin: 0; letter-spacing: 0.01em; }
.list-form { display: flex; flex-direction: column; }
.founding-check { align-self: end; padding-bottom: 12px; }

.fee-preview {
  margin: 6px 0 14px; padding: 12px 14px; border-radius: 10px;
  border: 1px dashed var(--border-strong); background: rgba(86, 200, 242, 0.06);
  font-size: 13px; color: var(--text-soft); min-height: 20px;
}
.fee-preview strong { color: var(--ok); }
.fee-preview .vs { color: var(--muted); }
.delta-up { color: var(--color-success); }
.delta-down { color: var(--color-error); }

.drawer-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.form-status { font-size: 13px; color: var(--text-soft); }
.form-status.error {
  color: var(--danger);
  display: inline-block;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}
.form-status.error:empty { display: none; }
.form-status.ok { color: var(--ok); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-bg-panel-strong); border: 1px solid var(--color-border-strong);
  color: var(--color-text-primary); padding: 12px 20px; border-radius: 8px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border-subtle); margin-top: 40px;
  padding: 32px var(--space-page-x) 40px; color: var(--color-text-muted);
  font-size: 13px; text-align: center;
}
.site-footer p { margin: 6px 0; }
.site-footer .dev-note { display: none; }
.site-footer a { color: var(--color-text-secondary); }
.muted { color: var(--muted); }

/* Keep dense pages from feeling crowded on very large screens. */
.hub-main,
.wrap,
.ride-wrap,
.rides-wrap,
.store-wrap,
.land {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Founding counter ---------- */
.founding-counter {
  font-size: 11px; padding: 5px 10px; border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--color-accent-secondary) 35%, transparent);
  color: var(--color-accent-secondary);
  background: color-mix(in srgb, var(--color-accent-secondary) 10%, transparent);
  white-space: nowrap; font-weight: 600; letter-spacing: 0.02em;
}

/* ---------- Scan zone ---------- */
.scan-zone { margin-bottom: 14px; }
.scan-drop {
  border: 1.5px dashed var(--border-strong); border-radius: 12px;
  padding: 20px; text-align: center; cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
  background: rgba(86, 200, 242, 0.05);
}
.scan-drop:hover, .scan-drop.drag { border-color: var(--ice); background: rgba(86, 200, 242, 0.08); }
.scan-drop-inner p { margin: 4px 0; font-size: 14px; }
.scan-icon { font-size: 30px; }
.scan-preview { max-height: 190px; max-width: 100%; border-radius: 10px; margin-top: 12px; border: 1px solid var(--border); }
.scan-result {
  margin-top: 10px; padding: 10px 12px; border-radius: 9px; font-size: 13px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text-soft);
}
.scan-result.loading { border-color: rgba(86, 200, 242, 0.35); }
.scan-result.ok { border-color: rgba(18,133,90,0.45); }
.scan-result.warn { border-color: rgba(174, 198, 216,0.5); }
.scan-result.error { border-color: rgba(220,38,38,0.5); color: var(--danger); }
.scan-result strong { color: var(--text); }

/* ---------- Sales history panel ---------- */
.history-panel {
  margin-bottom: 16px; padding: 16px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg-2);
}
.history-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.history-head span:first-child { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 13px; color: var(--steel); }
.history-count { font-size: 12px; color: var(--muted); }
.history-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.history-stats > div { display: flex; flex-direction: column; }
.hs-num { font-size: 16px; font-weight: 800; color: var(--text); }
.hs-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.spark { width: 100%; height: 44px; display: block; margin: 4px 0 10px; }
.history-list { list-style: none; margin: 0 0 10px; padding: 0; max-height: 150px; overflow: auto; }
.history-list li { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--border); color: var(--text-soft); }
.history-list strong { color: var(--text); }

/* ---------- Form extras ---------- */
.form-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: var(--steel); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.form-divider::before, .form-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.price-row { margin-bottom: 6px; }
.apply-btn { align-self: end; margin-bottom: 12px; white-space: nowrap; }
.seller-state { font-size: 13px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); color: var(--text-soft); margin-bottom: 6px; background: var(--bg-2); }
.seller-state.founding { border-color: rgba(174, 198, 216,0.4); background: rgba(174, 198, 216,0.08); color: var(--gold); }

/* ---------- Market price row ---------- */
.market-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 11px; margin-bottom: 10px; border-radius: 10px;
  border: 1px solid rgba(86, 200, 242, 0.28); background: rgba(86, 200, 242, 0.07);
}
.market-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--steel); }
.market-val { font-weight: 800; color: var(--ice-strong); }

/* ---------- Integrations status ---------- */
.integrations { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; align-items: center; }
.int-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.int-dot.on { background: var(--ok); }
.int-dot.off { background: #c3cbd6; }

/* ---------- Hamburger nav (shared, injected by nav.js) ---------- */
.nav-burger { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:var(--radius-sm); border:1px solid var(--color-border-subtle); background:transparent; color:var(--color-text-secondary); cursor:pointer; font-size:16px; line-height:1; }
.nav-burger:hover { background:var(--color-hover-surface); color:var(--color-text-primary); transform:none; }
.nav-scrim { position:fixed; inset:0; background:rgba(20,30,55,0.35); backdrop-filter:blur(2px); opacity:0; pointer-events:none; transition:opacity .2s ease; z-index:80; }
.nav-scrim.open { opacity:1; pointer-events:auto; }
.nav-drawer { position:fixed; top:0; right:0; bottom:0; width:min(330px,88%); background:var(--panel-solid); border-left:1px solid var(--border); z-index:81; transform:translateX(102%); transition:transform .24s ease; display:flex; flex-direction:column; padding:18px; overflow-y:auto; box-shadow:-16px 0 50px rgba(20,30,55,.18); }
.nav-drawer.open { transform:none; }
.nav-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.nav-head img { height:42px; border-radius:9px; }
.nav-close { background:none; border:none; color:var(--text-soft); font-size:24px; cursor:pointer; line-height:1; }
.nav-links { display:flex; flex-direction:column; gap:4px; }
.nav-link { display:flex; align-items:center; gap:13px; padding:12px 12px; border-radius:11px; color:var(--text-soft); text-decoration:none; font-size:15px; border:1px solid transparent; }
.nav-link:hover { background:var(--bg-2); color:var(--text); text-decoration:none; }
.nav-link.active { background:var(--color-active-surface); color:var(--color-text-primary); border-color:var(--color-border-default); }
.nav-link .ico { width:22px; text-align:center; font-size:16px; }
.nav-div { height:1px; background:var(--border); margin:12px 2px; }
.nav-user { font-size:12px; color:var(--muted); padding:2px 12px 6px; text-transform:uppercase; letter-spacing:.05em; }
.nav-hub { border-color:rgba(174, 198, 216,0.4); color:var(--gold); }
.nav-hub:hover { background:rgba(174, 198, 216,0.1); color:var(--gold); }
.nav-foot { margin-top:auto; padding-top:14px; font-size:11px; color:var(--muted); text-align:center; }
.nav-bell { position:relative; display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:var(--radius-sm); border:1px solid var(--color-border-subtle); background:transparent; color:var(--color-text-secondary); cursor:pointer; font-size:15px; text-decoration:none; }
.nav-bell:hover { background:var(--color-hover-surface); color:var(--color-text-primary); text-decoration:none; }
.nav-bell .bump { position:absolute; top:-6px; right:-6px; min-width:19px; height:19px; padding:0 5px; border-radius:999px; background:var(--danger); color:var(--color-on-danger); font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout > *,
  .filters,
  .results,
  .grid { min-width: 0; width: 100%; }
  .filters { position: static; }
  .results-bar { flex-wrap: wrap; }
  .quick-presets { max-width: 100%; overflow-x: auto; }
  .hero-stats { width: 100%; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .mkt-search { max-width: 100%; }
  .quick-presets {
    position: sticky;
    top: 72px;
    z-index: 9;
    background: var(--bg);
    padding-top: 6px;
  }
  .compare-table {
    grid-template-columns: 110px repeat(3, minmax(140px, 1fr));
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .site-header { padding: 0 12px; gap: 10px; min-height: 60px; }
  .logo-img { height: 32px; max-width: 118px; }
  .site-header .header-actions { width: auto; margin-left: auto; justify-content: flex-end; flex-wrap: nowrap; gap: 6px; }
  .site-header .founding-counter,
  .site-header .status-badge,
  .site-header .header-actions > a.btn-ghost { display: none; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 36px; }
  input, select, textarea { font-size: 16px; min-height: 40px; }
  .layout { padding: 10px 12px 28px; }
  .field-row { grid-template-columns: 1fr; }
  .results-actions { width: 100%; }
  .results-actions .btn { flex: 1; }
  .drawer-panel { padding: 18px; }
  .history-stats { grid-template-columns: repeat(2, 1fr); }
  .compare-panel { width: 98vw; padding: 12px; }
  .compare-table { grid-template-columns: 90px repeat(3, minmax(120px, 1fr)); }
  .pager { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Spacing utility scale ---------- */
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.pad-14 { padding: 14px; } .no-top { margin-top: 0; }
.max-280 { max-width: 280px; }

/* ---------- Shared chat widget (Concierge / Studio / Store Designer) ---------- */
.chat-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--color-border-default);
  background: var(--color-bg-panel-strong);
  color: var(--color-text-primary);
  font-weight: 650; font-size: 12px; padding: 11px 16px; border-radius: var(--radius-xs);
  cursor: pointer; box-shadow: var(--shadow-md);
  letter-spacing: 0.02em;
  transition: transform var(--duration-fast) var(--ease-premium), border-color var(--duration-fast), background var(--duration-fast), box-shadow var(--duration-medium);
}
.chat-fab:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  background: var(--color-bg-panel);
  box-shadow: var(--shadow-md), var(--glow-ice);
}
.chat-fab.chat-fab-gold {
  background: var(--color-bg-panel-strong);
  border-color: color-mix(in srgb, var(--color-accent-secondary) 40%, transparent);
  color: var(--color-accent-secondary);
  box-shadow: var(--shadow-md);
}
.chat-panel {
  position: fixed; right: 18px; bottom: 76px; z-index: 91;
  width: min(380px, calc(100vw - 36px)); height: min(560px, calc(100vh - 130px));
  display: none; flex-direction: column;
  background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: var(--shadow-lg), 0 24px 60px rgba(20,30,55,0.22); overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.chat-head-title { font-weight: 700; color: var(--text); }
.chat-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; }
.chat-feed { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; line-height: 1.5; }
.chat-msg { align-self: flex-start; max-width: 90%; background: var(--bg-2); border: 1px solid var(--border); color: var(--text-soft); padding: 8px 11px; border-radius: 12px 12px 12px 2px; }
.chat-msg.me { align-self: flex-end; max-width: 85%; background: var(--ice); color: var(--color-on-accent); border: none; border-radius: 12px 12px 2px 12px; }
.chat-msg .chat-note { color: var(--muted); font-size: 12px; }
.chat-chips { padding: 0 12px 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.chat-chip { background: rgba(86, 200, 242, 0.08); border: 1px solid var(--border); color: var(--ice-strong); border-radius: 999px; padding: 5px 10px; font-size: 11.5px; cursor: pointer; }
.chat-input-row { padding: 10px 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-input-row input { flex: 1; padding: 9px 11px; font-size: 13px; }
.chat-send { background: var(--ice); color: var(--color-on-accent); border: none; border-radius: 10px; font-weight: 700; padding: 0 14px; cursor: pointer; }
.chat-foot { padding: 0 12px 12px; }
.chat-publish-row { display: flex; align-items: center; gap: 10px; }
.chat-publish-row .btn { flex: 1; }
.chat-status { font-size: 11.5px; color: var(--muted); margin-top: 6px; min-height: 14px; }

/* ---------- Sell drawer: AI-vs-manual choice + seller-step summary ---------- */
.sell-choice { display: flex; flex-direction: column; gap: 12px; margin-bottom: 6px; }
.sell-choice-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--color-bg-panel);
  cursor: pointer; font: inherit; transition: transform 120ms ease, box-shadow 160ms ease, border-color 140ms ease;
}
.sell-choice-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--ice); }
.sell-choice-btn strong { font-size: 15px; }
.sell-choice-ai { border-color: rgba(174, 198, 216,0.45); background: rgba(174, 198, 216,0.05); }
.sell-choice-ai:hover { border-color: var(--gold); }
.sc-badge {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: rgba(174, 198, 216,0.16); border: 1px solid rgba(174, 198, 216,0.4); color: var(--gold);
}
.back-to-choice { align-self: flex-start; margin-bottom: 10px; }
.seller-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(18,133,90,0.35); background: rgba(18,133,90,0.08);
  color: var(--ok); font-size: 13.5px; font-weight: 600; margin-bottom: 6px;
}

/* ---------- Shared panel/pill/table (admin + account) ---------- */
.panel-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-bar .sec-title { margin: 0; }
.sec-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--steel); margin: 0 0 12px; font-weight: 700; }
.sec-title:not(:first-child) { margin-top: 26px; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.chip.good { color: var(--ok); border-color: rgba(18,133,90,0.4); background: rgba(18,133,90,0.08); }
.chip.info { color: var(--ice); border-color: rgba(86, 200, 242, 0.35); background: rgba(86, 200, 242, 0.08); }
.chip.warn { color: var(--gold); border-color: rgba(174, 198, 216,0.4); background: rgba(174, 198, 216,0.08); }
.chip.bad { color: var(--danger); border-color: rgba(220,38,38,0.4); background: rgba(220,38,38,0.06); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl .acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Cinematic inner-page layer ---------- */
body:not(.arena-home):not(.premium-room) {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(900px 480px at 88% -10%, rgba(86, 200, 242, 0.05), transparent 58%),
    radial-gradient(700px 420px at -6% 30%, rgba(174, 198, 216, 0.03), transparent 60%),
    var(--color-bg-base);
}
body:not(.arena-home):not(.premium-room)::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .04;
  background-image:
    linear-gradient(rgba(230, 238, 244, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 238, 244, .08) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}
body:not(.arena-home):not(.premium-room)::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body:not(.arena-home):not(.premium-room) > main,
body:not(.arena-home):not(.premium-room) > section,
body:not(.arena-home):not(.premium-room) > div:not(.aurora):not(.nav-scrim):not(.nav-drawer):not(.drawer):not(.toast) {
  position: relative; z-index: 1;
}
/* Header chrome owned by the block above — keep cinematic pages quiet. */
.site-header { box-shadow: none; }

.mkt-hero {
  position: relative; max-width: 880px; padding-top: clamp(36px, 5vw, 64px); padding-bottom: 28px;
}
.mkt-hero::before { content: none; }
.mkt-hero::after { content: none; }
.mkt-hero h2,
.hero-strip h2,
.rides-title,
.item-wrap > h1,
.wrap > h2 {
  color: var(--color-text-primary); font-weight: 700; letter-spacing: var(--tracking-tight); text-transform: none;
}
.mkt-hero h2 { font-size: clamp(32px, 4.5vw, 48px); line-height: 1.08; font-weight: 700; letter-spacing: var(--tracking-tight); text-transform: none; }
.mkt-hero .hero-pitch { max-width: 650px; color: var(--text-soft); }
.mkt-search {
  max-width: 680px; border-radius: var(--radius-md); padding: 6px 6px 6px 16px;
  background: var(--color-bg-panel); border: 1px solid var(--color-border-default);
  box-shadow: var(--shadow-sm);
}
.mkt-search:focus-within {
  border-color: var(--color-accent-primary);
  box-shadow: var(--shadow-focus);
}
.mkt-search .btn { border-radius: var(--radius-sm); }
.trust-bar { padding-block: 14px; border-block: 1px solid var(--border); background: rgba(3, 9, 15, 0.04); }

.hero-strip {
  position: relative; overflow: hidden; margin: 30px 0 26px; padding: clamp(32px,5vw,62px);
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(120deg, rgba(86, 200, 242,.12), transparent 45%),
    linear-gradient(160deg, rgba(255,255,255,.04), transparent 62%),
    var(--color-bg-panel);
}
.hero-strip::after { content: none; }
.hero-strip h2 { position: relative; z-index: 1; margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.12; font-weight: 700; }
.hero-strip p { position: relative; z-index: 1; max-width: 660px; color: var(--text-soft); }

.card,
.card-soft,
.listing,
.lr-card,
.store-card,
.live-card,
.rcard,
.state-card,
.login-wrap,
.auth-wrap {
  border-color: var(--color-border-default);
  background:
    linear-gradient(145deg, rgba(3, 9, 15,.04), transparent 44%),
    var(--color-bg-glass);
  box-shadow: var(--shadow-md);
}
.listing,
.lr-card,
.store-card,
.live-card,
.rcard {
  position: relative;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .2s, box-shadow .25s;
}
.listing::after,
.store-card::after,
.live-card::after,
.rcard::after {
  content: ""; position: absolute; left: 0; top: 0; width: 36%; height: 1px;
  background: linear-gradient(90deg, var(--ice), transparent); pointer-events: none;
}
.listing:hover,
.lr-card:hover,
.store-card:hover,
.live-card:hover,
.rcard:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}
.listing-img,
.store-banner,
.live-thumb { background-color: var(--color-surface-deep); }
.filters {
  top: 92px; border-radius: var(--radius-xs);
  background: var(--color-bg-glass); backdrop-filter: blur(18px);
}
.filters-head h3,
.sec-title,
.panel-label {
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
}
.quick-presets { padding: 9px; border: 1px solid var(--border); background: rgba(8,10,12,.58); }
.preset-btn,
.cat-chip { border-radius: var(--radius-sm); text-transform: none; letter-spacing: 0.01em; font-weight: 550; }

.store-hero {
  position: relative; min-height: 330px; border-bottom: 1px solid var(--border-strong);
  background-color: #090c0f;
}
.store-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, var(--bg), transparent 72%), linear-gradient(90deg, rgba(3,9,15,.62), transparent 58%);
}
.store-hero-inner { position: relative; z-index: 2; }
.store-wrap,
.rides-wrap,
.item-wrap,
.wrap,
.hub-main { padding-top: clamp(26px,4vw,52px); padding-bottom: 70px; }
.rides-wrap::before,
.item-wrap::before,
.wrap::before { content: none; display: none; }
.rides-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 0 0 var(--space-4); }

.auth-wrap,
.vwrap,
.login-wrap {
  border-radius: var(--radius-md);
  border-color: var(--color-border-default);
  box-shadow: var(--shadow-lg);
  background: var(--color-bg-panel);
}
.auth-wrap::before,
.vwrap::before,
.login-wrap::before { content: none; display: none; }
.auth-tabs,
.tabs { border-bottom-color: var(--border-strong); }
.auth-tab,
.tab { text-transform: none; letter-spacing: 0.01em; font-size: 13px; font-weight: 550; }
.auth-tab.active,
.tab.active { color: var(--color-on-accent); border-color: var(--color-accent-primary); background: var(--color-accent-primary); }

.panel,
.tab-panel {
  border-color: var(--border);
  background: linear-gradient(145deg, rgba(255,255,255,.025), transparent 40%), rgba(14,27,41,.92);
}
.tbl-wrap { border: 1px solid var(--border); background: rgba(8,10,12,.55); }
.tbl th,
table.hub th { color: var(--color-text-muted); background: rgba(86, 200, 242,.035); }
.tbl td,
table.hub td { border-bottom-color: var(--border); }
.chip { border-radius: 3px; }

.drawer-panel {
  background:
    radial-gradient(520px 300px at 70% 0, rgba(86, 200, 242,.08), transparent 65%),
    var(--panel-solid);
}
.sell-choice-btn { border-radius: 5px; background: rgba(255,255,255,.035); color: var(--text); }
.sell-choice-ai { background: rgba(200,168,107,.07); }

@media (max-width: 760px) {
  .site-header { min-height: 64px; }
  .site-header .logo-img { height: 34px; max-width: 124px; object-fit: contain; }
  .mkt-hero { padding-top: 36px; }
  .mkt-hero h2 { font-size: clamp(28px, 8vw, 36px); }
  .mkt-hero::after { line-height: 1.6; }
  .hero-strip { margin-top: 16px; }
  .store-hero { min-height: 220px; }
}

/* ---------- Semantic contrast contract ---------- */
body { font-family: var(--font-body); color: var(--color-text-primary); background: var(--color-bg-base); }
h1, h2, h3, h4, h5, h6, strong, th { color: var(--color-text-primary); }
.muted, .muted-sm, .muted-xs, small { color: var(--color-text-muted); }

.btn,
button,
input,
select,
textarea { -webkit-tap-highlight-color: transparent; }
.btn {
  color: var(--color-text-primary);
  background: var(--color-bg-glass-soft);
  border-color: var(--color-border-default);
  transition:
    transform var(--duration-fast) var(--ease-premium),
    color var(--duration-fast),
    background var(--duration-fast),
    border-color var(--duration-fast),
    box-shadow var(--duration-medium);
}
.btn:hover:not(:disabled) {
  color: var(--color-text-primary);
  background: var(--color-hover-surface);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-primary,
.buy-btn,
.chat-send {
  color: var(--color-on-accent);
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
}
.btn-primary:hover:not(:disabled),
.buy-btn:hover:not(:disabled),
.chat-send:hover:not(:disabled) {
  color: var(--color-on-accent);
  background: var(--color-accent-primary-strong);
  border-color: var(--color-accent-primary-strong);
}
.btn:disabled,
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  color: var(--color-text-disabled);
  background: var(--color-disabled-surface);
  border-color: var(--color-border-subtle);
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
}

input,
select,
textarea {
  color: var(--color-text-primary);
  background: var(--color-bg-input);
  border-color: var(--color-border-default);
  caret-color: var(--color-accent-primary);
}
input:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) { border-color: var(--color-border-strong); }
input::placeholder,
textarea::placeholder { color: var(--color-text-subtle); opacity: 1; }
select option { color: var(--color-text-primary); background: var(--color-bg-panel); }

:where(a, button, input, select, textarea, [role="button"], [role="link"], [tabindex]):focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  box-shadow: var(--shadow-focus);
}

.card,
.card-soft,
.panel,
.tab-panel,
.listing,
.store-card,
.live-card,
.rcard,
.state-card,
.settings-card {
  color: var(--color-text-primary);
  border-color: var(--color-border-default);
  background:
    linear-gradient(145deg, rgba(255,255,255,.032), transparent 42%),
    var(--color-bg-glass);
}

.status-badge,
.chip,
.pill,
.badge,
.rphase,
.live-chip,
.metric-chip {
  color: var(--color-text-secondary);
  background: var(--color-bg-elevated);
  border-color: var(--color-border-default);
}
.status-badge.online,
.chip.good,
.pill.ok,
.pill.active { color: var(--color-success); border-color: color-mix(in srgb, var(--color-success) 45%, transparent); }
.status-badge.offline,
.chip.bad,
.pill.bad { color: var(--color-error); border-color: color-mix(in srgb, var(--color-error) 45%, transparent); }
.chip.warn,
.pill.warn,
.pill.gold { color: var(--color-warning); border-color: color-mix(in srgb, var(--color-warning) 45%, transparent); }
.chip.info,
.pill.info { color: var(--color-info); border-color: color-mix(in srgb, var(--color-info) 45%, transparent); }

.tab.active,
.auth-tab.active,
.preset-btn.active,
.cat-chip.active {
  color: var(--color-on-accent);
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
}
.chat-msg { color: var(--color-text-secondary); background: var(--color-bg-elevated); border-color: var(--color-border-default); }
.chat-msg.me {
  color: var(--color-on-accent);
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
}
.chat-panel,
.nav-drawer,
.drawer-panel,
.compare-modal,
.modal-panel {
  color: var(--color-text-primary);
  background:
    radial-gradient(620px 340px at 85% 0, rgba(183,231,244,.07), transparent 62%),
    var(--color-bg-panel);
  border-color: var(--color-border-default);
  box-shadow: var(--shadow-lg);
}
.nav-scrim,
.compare-scrim,
.drawer-scrim { background: var(--color-bg-overlay); }

.toast {
  color: var(--color-text-primary);
  background: var(--color-bg-panel-strong);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-lg);
}
.site-announce {
  position: sticky; top: 0; z-index: 80; padding: 9px 14px; text-align: center;
  color: var(--color-accent-primary-strong); background: linear-gradient(90deg, #142534, #0e1a28);
  border-bottom: 1px solid var(--color-border-default); font-size: 13px; font-weight: 650;
}
.site-announce-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.verify-email-bar {
  position: sticky; top: 0; z-index: 79; display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap; padding: 9px 14px; color: var(--color-on-accent);
  background: linear-gradient(90deg, #d2a95f, var(--color-warning)); font-size: 13px; font-weight: 700;
}
.verify-email-bar a { color: var(--color-on-accent); text-decoration: underline; text-underline-offset: 3px; }
.verify-email-bar button {
  padding: 3px 8px; color: var(--color-on-accent); background: rgba(6,16,22,.08);
  border: 1px solid rgba(6,16,22,.24); border-radius: var(--radius-xs); cursor: pointer;
}

.tbl-wrap { border-color: var(--color-border-default); background: var(--color-bg-glass); }
.tbl th,
table.hub th {
  color: var(--color-text-secondary);
  background: rgba(183,231,244,.045);
  border-bottom-color: var(--color-border-default);
}
.tbl td,
table.hub td { color: var(--color-text-secondary); border-bottom-color: var(--color-border-subtle); }
.tbl tr:hover td,
table.hub tr:hover td { color: var(--color-text-primary); background: var(--color-hover-surface); }
.table-empty { padding: 24px !important; text-align: center; color: var(--color-text-muted) !important; }

.live-dot,
.live-d,
.room-live-dot,
.signal-dot,
.lr-dot {
  background: var(--color-live);
  box-shadow: 0 0 12px color-mix(in srgb, var(--color-live) 66%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}


@media (max-width: 640px) {
  .chat-fab {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 10px 14px;
    font-size: 12px;
  }
  .chat-panel {
    right: 12px;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 24px);
  }

  /* Type: keep rune display readable; body never dips below 16px */
  body { font-size: 16px; }
  h1 { font-size: clamp(28px, 9vw, 40px); line-height: 1.1; }
  h2 { font-size: clamp(24px, 7vw, 32px); line-height: 1.15; }
  h3 { font-size: clamp(18px, 5vw, 24px); line-height: 1.2; }
  .vault-brand-mark,
  .counsel-brand-name,
  .cmd-brand-mark { letter-spacing: 0.03em; }
  input, select, textarea, .btn { font-size: 16px; }
}

/* Utility / marketplace light surfaces */
.theme-utility .aurora {
  background:
    radial-gradient(900px 480px at 82% -8%, rgba(43, 108, 176, 0.08), transparent 62%),
    radial-gradient(760px 420px at 8% -10%, rgba(184, 134, 58, 0.05), transparent 60%);
}
.theme-utility .site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--color-border-subtle);
  backdrop-filter: blur(12px);
}
.theme-utility .mkt-hero h2 {
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-tight);
}
.theme-utility .listing-img {
  background: linear-gradient(165deg, #e8eef3, #f4f7fa) !important;
}
.theme-utility .compare-panel,
.theme-utility .filters.card {
  background: var(--color-bg-panel);
  color: var(--color-text-primary);
  border-radius: var(--radius-md);
}
.theme-utility .mkt-search {
  background: #fff;
  border-color: var(--color-border-default);
  box-shadow: var(--shadow-sm);
}
.theme-utility .stat {
  background: #fff;
  border-color: var(--color-border-subtle);
}
.theme-utility .cat-chip.active {
  background: var(--color-accent-primary);
  color: #fff;
}
.theme-utility .layout {
  background: transparent;
}
.theme-utility .listing {
  background: #fff;
  border-color: var(--color-border-subtle);
  box-shadow: var(--shadow-sm);
}
.theme-utility .listing:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}
.theme-utility .listing-img {
  background: linear-gradient(165deg, #e4eaf0, #f4f7fa) !important;
}
.theme-utility .badge {
  background: rgba(255, 255, 255, 0.94);
  color: var(--color-text-secondary);
  border-color: var(--color-border-default);
}
.theme-utility .watch-heart {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--color-border-default);
  color: #c45a7a;
}
.theme-utility .trust-bar {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--color-border-subtle);
  color: var(--color-text-secondary);
}
.theme-utility .mkt-hero {
  background: linear-gradient(180deg, #f8fafc 0%, var(--color-bg-base) 100%);
}
