/* =====================================================================
   Unbuilt Lab — Web Dashboard SPA  ·  Design system: "Airbnb DLS"
   ---------------------------------------------------------------------
   Art direction (2026 Airbnb refresh, AMBER accent):
     • NEUTRAL base — warm off-white cards on a softened low-glare ground,
       near-black text (#222), secondary #717171, hairline borders,
       soft diffuse shadows, generous airy whitespace. LIGHT is default.
     • ONE warm accent — AMBER (#F59E0B, darker #EA8C00 for hover; dark
       theme uses a lighter #FBBF24 for contrast) — used sparingly for
       primary CTAs + active states only.
     • FUNCTIONAL colour for data — the four feature-credit rings each own
       a distinct hue (violet / teal / rose / blue), NONE equal to the amber
       accent, like a multi-colour donut. Status pills keep semantic colour
       (green=ready, amber=pending, red=failed). The chrome/accent is amber.
     • Rounded ~12px corners, friendly geometric sans (DM Sans, Circular-
       like). Minimal, uncluttered.
   The dashboard loads /_includes/theme.css (marketing tokens) FIRST, then
   this file — so these token blocks WIN by later source order, without
   touching the marketing site (which never loads app.css).
   ===================================================================== */

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

/* ---------------------------------------------------------------------
   THEME TOKENS — LIGHT (default)  ·  Airbnb coral + neutral
   --------------------------------------------------------------------- */
:root {
  color-scheme: light;
  /* Softened, warm off-white neutral system — lowers glare on light theme
     (was pure #fff surfaces on #f7f7f8). Airbnb aesthetic preserved. */
  --bg-primary: #f2f1ee;
  --bg-elevated: #fbfbfa;
  --bg-card: #fbfbfa;
  --bg-card-hover: #f4f3f0;
  --text-primary: #222222;
  --text-secondary: #6b6b6b;
  --text-muted: #83878d;
  --accent: #f59e0b;
  --accent-strong: #ea8c00;
  --accent-soft: rgba(245, 158, 11, 0.12);
  --accent-glow: rgba(245, 158, 11, 0.24);
  --accent-secondary: #b45309;      /* eyebrows / small accents (deep amber, legible) */
  /* functional data palette — 4 distinct hues, NONE equal to the amber accent.
     Token names kept stable for JS (RING_COLORS maps by index). */
  --data-violet: #8b5cf6;   /* Find New Idea — violet                     */
  --data-green: #00a699;    /* Validate My Idea — teal (Airbnb Babu)      */
  --data-amber: #e07a5b;    /* Signal Radar — muted CORAL (softened from harsh rose; token name legacy) */
  --data-blue: #3b82f6;     /* Market Research — blue                     */
  --emerald: #067d62;
  --emerald-soft: rgba(0, 166, 153, 0.12);
  --amber: #b4690e;
  --amber-soft: rgba(245, 166, 35, 0.15);
  --danger: #c13515;
  --danger-soft: rgba(193, 53, 21, 0.09);
  --border: #e3e1dc;
  --border-strong: #d2cfc9;
  --border-accent: rgba(245, 158, 11, 0.35);
  --surface-glow: rgba(245, 158, 11, 0.05);
  --link: #b45309;
  /* composite surfaces */
  --card-grad: #fbfbfa;
  --sidebar-grad: #f6f5f2;
  --topbar-bg: rgba(246, 245, 242, 0.85);
  --track: rgba(0, 0, 0, 0.09);
  --ring-track: rgba(0, 0, 0, 0.09);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px -14px rgba(0, 0, 0, 0.30);
  --shadow-pop: 0 14px 36px -12px rgba(0, 0, 0, 0.22);
  --skeleton: linear-gradient(90deg, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.09) 37%, rgba(0,0,0,0.05) 63%);
  /* legacy dark contrast panel (spotlight retired from overview) */
  --spot-bg: linear-gradient(152deg, #2b2b2f 0%, #161617 100%);
  --spot-text: #f7f7f7;
  --spot-muted: #b8b8bd;
  --spot-border: rgba(255, 255, 255, 0.09);
  --font-display: 'DM Sans', -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-body: 'DM Sans', -apple-system, 'Segoe UI', sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-primary: #121214;
  --bg-elevated: #1a1a1d;
  --bg-card: #1c1c1f;
  --bg-card-hover: #26262a;
  --text-primary: #f7f7f7;
  --text-secondary: #b0b0b0;
  --text-muted: #8a8a90;
  --accent: #fbbf24;
  --accent-strong: #f59e0b;
  --accent-soft: rgba(251, 191, 36, 0.16);
  --accent-glow: rgba(251, 191, 36, 0.30);
  --accent-secondary: #fcd34d;
  --data-violet: #a78bfa;   /* Find — violet  */
  --data-green: #2dd4bf;    /* Validate — teal */
  --data-amber: #f0a084;    /* Signal Radar — muted CORAL (softened from harsh rose) */
  --data-blue: #60a5fa;     /* Market — blue  */
  --emerald: #34d399;
  --emerald-soft: rgba(45, 212, 191, 0.14);
  --amber: #fbbf24;
  --amber-soft: rgba(245, 166, 35, 0.15);
  --danger: #ff6b57;
  --danger-soft: rgba(255, 107, 87, 0.13);
  --border: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.17);
  --border-accent: rgba(251, 191, 36, 0.35);
  --surface-glow: rgba(251, 191, 36, 0.08);
  --link: #fcd34d;
  --card-grad: #1c1c1f;
  --sidebar-grad: #161618;
  --topbar-bg: rgba(18, 18, 20, 0.82);
  --track: rgba(255, 255, 255, 0.10);
  --ring-track: rgba(255, 255, 255, 0.09);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.02), 0 18px 40px -30px rgba(0, 0, 0, 0.8);
  --shadow-pop: 0 22px 50px -24px rgba(0, 0, 0, 0.7);
  --skeleton: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 37%, rgba(255,255,255,0.04) 63%);
  --spot-bg: linear-gradient(152deg, #242426 0%, #121213 100%);
  --spot-text: #f7f7f7;
  --spot-muted: #b8b8bd;
  --spot-border: rgba(255, 255, 255, 0.10);
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-primary) !important;
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--link); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app-root { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Boot loader ---------- */
.boot-loader {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 18px; min-height: 100vh; color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em;
}
.boot-orb {
  width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fcd34d, #f59e0b 62%, transparent 74%);
  box-shadow: 0 0 40px -6px var(--accent-glow);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{transform:scale(0.85);opacity:.7} 50%{transform:scale(1.05);opacity:1} }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 100% { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =====================================================================
   BRAND LOGO
   ===================================================================== */
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: block; object-fit: cover;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.28);
}
.brand-logo.sm { width: 30px; height: 30px; border-radius: 8px; }

/* =====================================================================
   AUTH SCREENS
   ===================================================================== */
.auth-wrap {
  flex: 1; min-height: 100vh; display: grid;
  grid-template-columns: 1.05fr 1fr;
  background:
    radial-gradient(1100px 640px at 10% -10%, var(--accent-soft), transparent 58%),
    radial-gradient(900px 560px at 108% 112%, rgba(0,166,153,0.05), transparent 55%),
    var(--bg-primary);
}
.auth-brand {
  position: relative; padding: 52px 56px; display: flex; flex-direction: column;
  justify-content: space-between; border-right: 1px solid var(--border);
  overflow: hidden;
}
.auth-brand::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(520px 340px at 80% 20%, var(--accent-soft), transparent 60%),
    radial-gradient(440px 300px at 16% 84%, rgba(0,166,153,0.07), transparent 60%);
  pointer-events: none;
}
.brand-mark { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand-dot {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 8px 24px -8px rgba(245,158,11,0.6);
  display: grid; place-items: center; font-family: var(--font-display);
  font-weight: 700; color: #452c00; font-size: 1rem;
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.auth-brand-copy { position: relative; z-index: 1; max-width: 460px; }
.auth-eyebrow {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-secondary);
  margin-bottom: 18px;
}
.auth-brand-copy h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.08; margin: 0 0 16px;
}
.auth-brand-copy h1 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent-strong); }
.auth-brand-copy p { color: var(--text-secondary); font-size: 1.02rem; line-height: 1.7; margin: 0; }
.brand-signals { position: relative; z-index: 1; display: flex; gap: 26px; flex-wrap: wrap; }
.brand-signal .num { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.brand-signal .lbl { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }

.auth-form-panel { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; }
.auth-card-logo .brand-name { font-size: 1rem; }
.auth-card h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-size: 1.55rem; margin: 0 0 6px; }
.auth-card .sub { color: var(--text-secondary); font-size: 0.94rem; margin: 0 0 26px; line-height: 1.55; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 7px;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  color: var(--text-primary); font-size: 0.96rem; font-family: var(--font-body);
  transition: border-color .18s, box-shadow .18s;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field .help-text { margin-top: 6px; font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }
.cfg-lbl { display: block; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.cfg-lbl .cfg-hint { text-transform: none; letter-spacing: 0; font-family: var(--font-body); color: var(--text-muted); font-weight: 400; margin-left: 8px; }
.field.field-inline { display: flex; gap: 12px; }
.field.field-inline > * { flex: 1; }

.otp-row { display: flex; gap: 9px; justify-content: space-between; margin-bottom: 6px; }
.otp-row input {
  width: 100%; text-align: center; font-family: var(--font-mono); font-size: 1.25rem;
  padding: 13px 0; letter-spacing: 0; -moz-appearance: textfield;
  background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 12px; color: var(--text-primary);
}
.otp-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.otp-row input::-webkit-outer-spin-button, .otp-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.btn-primary {
  width: 100%; padding: 13px 16px; border: 0; border-radius: 12px; color: #231a00;
  font-family: var(--font-display); font-weight: 700; font-size: 0.98rem;
  background-image: linear-gradient(to right, #f59e0b 0%, #ea8c00 50%, #d97706 100%);
  box-shadow: 0 12px 28px -14px rgba(234,140,0,0.5);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, opacity .16s;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 18px 40px -14px rgba(234,140,0,0.62); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-primary .spin, .spin { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-muted); font-size: 0.75rem; font-family: var(--font-mono); letter-spacing: 0.08em; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }

.google-host { display: flex; justify-content: center; min-height: 44px; }
.btn-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--bg-card);
  color: var(--text-primary); font-family: var(--font-display);
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}
.btn-google:hover:not(:disabled) { border-color: var(--border-accent); background: var(--bg-card-hover); transform: translateY(-1px); }
.btn-google:disabled { opacity: 0.6; cursor: default; }
.btn-google .g-ico { flex-shrink: 0; display: block; }
.btn-google.loading .g-label { opacity: 0.6; }
.google-fallback {
  width: 100%; text-align: center; padding: 12px 14px; border-radius: 12px;
  border: 1px dashed var(--border-accent); background: var(--accent-soft);
  color: var(--text-secondary); font-size: 0.82rem; line-height: 1.5;
}

.auth-switch { margin-top: 22px; text-align: center; color: var(--text-secondary); font-size: 0.9rem; }
.auth-switch a { color: var(--link); font-weight: 500; }
.link-muted { background: none; border: 0; color: var(--text-secondary); font-size: 0.85rem; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.link-muted:hover { color: var(--text-primary); }
.row-between { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 16px; }

.tc-row { display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 18px; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }
.tc-row input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--accent); flex-shrink: 0; }

.alert { border-radius: 11px; padding: 11px 14px; font-size: 0.86rem; margin-bottom: 16px; line-height: 1.45; border: 1px solid transparent; }
.alert-error { background: var(--danger-soft); border-color: rgba(220,68,68,0.35); color: var(--danger); }
.alert-ok { background: var(--emerald-soft); border-color: rgba(16,185,129,0.35); color: var(--emerald); }
.alert-info { background: var(--accent-soft); border-color: var(--border-accent); color: var(--accent-strong); }

.back-to-site { position: absolute; top: 26px; right: 30px; z-index: 2; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-secondary); }
.back-to-site:hover { color: var(--text-primary); }

/* =====================================================================
   DASHBOARD SHELL
   ===================================================================== */
/* Shell owns the viewport: it does NOT scroll. The sidebar is a fixed-height
   column pinned to the left; ONLY the .main column scrolls (its own overflow).
   So scrolling a long feature screen (e.g. Market Reports) never moves the
   sidebar or the pinned profile button. */
.dash { display: grid; grid-template-columns: 258px 1fr; height: 100vh; height: 100dvh; overflow: hidden; }

.sidebar {
  background: var(--sidebar-grad);
  border-right: 1px solid var(--border); padding: 20px 14px;
  display: flex; flex-direction: column; gap: 3px; height: 100vh; height: 100dvh;
  overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 8px 10px 20px; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; border-radius: 12px; transition: opacity .16s; }
.sidebar-brand:hover { opacity: 0.82; }
.sidebar-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-group-label { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); padding: 15px 12px 7px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px;
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; width: 100%;
  background: none; border: 0; text-align: left; transition: background .16s, color .16s;
  position: relative;
}
.nav-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
:root[data-theme="dark"] .nav-item.active { color: #fff; }
.nav-item.active .nav-ico { color: var(--accent); }
.nav-ico { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-muted); }
.nav-item.active .nav-ico { color: var(--accent); }
.nav-item .soon { margin-left: auto; font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 6px; }
.nav-item .navcount { margin-left: auto; font-family: var(--font-mono); font-size: 0.6rem; color: var(--accent-strong); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); position: relative; }

/* ---- Profile button (pinned bottom) + popover menu ---- */
.profile-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 12px; background: none;
  border: 1px solid transparent; text-align: left; color: var(--text-primary);
  transition: background .16s, border-color .16s;
}
.profile-btn:hover { background: var(--bg-card-hover); }
.profile-btn.open { background: var(--bg-card-hover); border-color: var(--border); }
.profile-btn .pf-meta { flex: 1; min-width: 0; line-height: 1.25; }
.profile-btn .pf-name { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-btn .pf-sub { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-btn .pf-chev { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-muted); transition: transform .18s; }
.profile-btn.open .pf-chev { transform: rotate(180deg); }

.profile-menu {
  position: fixed; left: 12px; bottom: 76px; width: 234px; z-index: 80;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-pop); padding: 8px;
  opacity: 0; transform: translateY(8px) scale(0.98); transform-origin: bottom left;
  pointer-events: none; transition: opacity .16s ease, transform .16s ease;
}
.profile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.pm-head { padding: 8px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.pm-plan { font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.pm-status { font-size: 0.74rem; color: var(--text-secondary); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.pm-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.pm-status .dot.on { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.pm-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: 10px; background: none; border: 0;
  text-align: left; color: var(--text-secondary); font-size: 0.88rem;
  font-weight: 500; font-family: var(--font-body); transition: background .14s, color .14s;
}
.pm-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.pm-item svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--text-muted); }
.pm-item:hover svg { color: var(--text-primary); }
.pm-item .pm-right { margin-left: auto; font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: 0.04em; }
.pm-sep { height: 1px; background: var(--border); margin: 6px 6px; }
.pm-item.pm-danger { color: var(--danger); }
.pm-item.pm-danger svg { color: var(--danger); }
.pm-item.pm-danger:hover { background: var(--danger-soft); color: var(--danger); }

/* The ONLY scroll container. Its sticky topbar sticks to the top of THIS
   column, not the window — the sidebar stays put while this scrolls. */
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 30px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
  background: var(--topbar-bg); backdrop-filter: blur(12px);
}
.hamburger { display: none; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 10px; width: 40px; height: 40px; color: var(--text-primary); font-size: 1.1rem; }
.topbar-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-spacer { flex: 1; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--bg-card);
  border: 1px solid var(--border-strong); color: var(--text-secondary);
  transition: border-color .16s, color .16s, background .16s;
}
.theme-toggle:hover { border-color: var(--border-accent); color: var(--text-primary); }
.theme-toggle svg { width: 18px; height: 18px; }
.tier-pill {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-accent);
  background: var(--accent-soft); color: var(--accent-strong); white-space: nowrap;
}
.tier-pill.paid { background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(234,140,0,0.10)); color: var(--accent-strong); border-color: var(--border-accent); }
:root[data-theme="dark"] .tier-pill.paid { color: #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  /* Unbuilt Lab brand BLUE (sampled from logo-512x512.png → #1E40AE). White
     initials stay legible on the deep blue. The amber accent lives elsewhere. */
  background: linear-gradient(135deg, #2c56cf, #1e40ae); color: #ffffff;
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
  box-shadow: 0 4px 12px -5px rgba(30, 64, 174, 0.55);
}
.user-meta { line-height: 1.2; }
.user-meta .u-name { font-size: 0.85rem; font-weight: 600; }
.user-meta .u-mail { font-size: 0.72rem; color: var(--text-muted); }
.btn-ghost { background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 13px; color: var(--text-secondary); font-size: 0.82rem; font-weight: 500; transition: border-color .16s, color .16s; white-space: nowrap; }
.btn-ghost:hover { border-color: var(--border-accent); color: var(--text-primary); }

.content { padding: 30px; max-width: 1180px; width: 100%; animation: rise .3s ease both; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-size: 1.72rem; margin: 0 0 6px; }
.page-head p { color: var(--text-secondary); margin: 0; font-size: 0.96rem; line-height: 1.55; }
.page-head .head-back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-secondary); margin-bottom: 14px; background: none; border: 0; padding: 0; }
.page-head .head-back:hover { color: var(--text-primary); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Base card — override theme.css !important so LIGHT surfaces win here. */
.dash .card {
  background: var(--card-grad) !important;
  border: 1px solid var(--border) !important;
  border-radius: 15px !important;
  box-shadow: var(--shadow-card);
  padding: 20px;
}
.card { background: var(--card-grad); border: 1px solid var(--border); border-radius: 15px; padding: 20px; }
.card.pad-lg { padding: 24px; }
.dash .card-eyebrow { color: var(--accent-secondary) !important; }
.card-eyebrow { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-secondary); margin-bottom: 10px; }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin: 0 0 4px; letter-spacing: -0.01em; }
.dash .content a:not([class]) { color: var(--link); }
.dash .content a:not([class]):hover { text-decoration: underline; text-underline-offset: 3px; }

/* =====================================================================
   OVERVIEW — dark spotlight panel (the single contrasting detail)
   ===================================================================== */
.spotlight {
  position: relative; overflow: hidden;
  background: var(--spot-bg); color: var(--spot-text);
  border: 1px solid var(--spot-border); border-radius: 22px;
  padding: 26px 28px; margin-bottom: 8px;
  display: grid; grid-template-columns: 1.1fr 1.5fr; gap: 28px; align-items: center;
  box-shadow: 0 30px 60px -34px rgba(20, 18, 50, 0.6);
}
.spotlight::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(251,191,36,0.28), transparent 66%);
  pointer-events: none;
}
.spot-left { position: relative; z-index: 1; }
.spot-eyebrow { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--spot-muted); margin-bottom: 12px; }
.spot-plan { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; letter-spacing: -0.02em; line-height: 1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spot-badge { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,0.12); color: #fff; }
.spot-badge.paid { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #452c00; }
.spot-status { font-family: var(--font-mono); font-size: 0.72rem; color: var(--spot-muted); margin-top: 12px; display: flex; align-items: center; gap: 7px; }
.spot-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--spot-muted); }
.spot-status .dot.on { background: #34d399; box-shadow: 0 0 9px #34d399; }
.spot-cta { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 11px; background: #fff; color: #191a1f; font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; text-decoration: none; transition: transform .16s, box-shadow .16s; }
.spot-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(0,0,0,0.5); color: #191a1f; }
.spot-cta.ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid var(--spot-border); }
.spot-cta.ghost:hover { color: #fff; background: rgba(255,255,255,0.14); }
.spot-cta svg { width: 16px; height: 16px; color: inherit; }
.spot-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.spot-ctas .spot-cta { margin-top: 0; }

.spot-right { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.spot-stat { background: rgba(255,255,255,0.05); border: 1px solid var(--spot-border); border-radius: 14px; padding: 14px 15px; }
.spot-stat .ss-val { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1; color: #fff; }
.spot-stat .ss-lbl { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--spot-muted); margin-top: 8px; }
/* honest micro-bars: heights reflect this row's actual values (share of row max) */
.spot-meter { height: 5px; border-radius: 999px; background: rgba(255,255,255,0.12); overflow: hidden; margin-top: 11px; }
.spot-meter > span { display: block; height: 100%; border-radius: 999px; }

.stat-value { font-family: var(--font-display); font-weight: 700; font-size: 2rem; letter-spacing: -0.02em; line-height: 1; }
.stat-value small { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; }
.stat-label { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-top: 8px; }

/* ---------- Feature credits — multi-colour radial rings ---------- */
.ring-defs { position: absolute; width: 0; height: 0; }
.ring-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ring-card {
  background: var(--card-grad);
  border: 1px solid var(--border); border-radius: 15px;
  padding: 22px 14px 18px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.ring-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-pop);
}
.ring-wrap { position: relative; width: 118px; height: 118px; }
.ring-svg { width: 118px; height: 118px; display: block; }
.ring-track { fill: none; stroke: var(--ring-track); stroke-width: 9; }
.ring-prog {
  fill: none; stroke-width: 9; stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 60px 60px;
  transition: stroke-dashoffset 1s cubic-bezier(.2, .7, .25, 1);
}
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-family: var(--font-display); font-weight: 700; font-size: 1.95rem; line-height: 1; letter-spacing: -0.02em; }
.ring-card.is-empty .ring-num { color: var(--text-muted) !important; }
.ring-lim { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); margin-top: 4px; }
.ring-name { font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 7px; }
.ring-name::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rc, var(--accent)); flex-shrink: 0; }
.ring-sub { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) { .ring-prog { transition: none; } }

/* ---------- Recent Search History — overview right panel ---------- */
/* A compact recent-searches list that height-matches the 2×2 ring grid at
   left (the column stretches; this card flex-fills and scrolls if needed). */
.ov-hist-card { height: 100%; display: flex; flex-direction: column; padding: 8px; overflow: hidden; }
.ov-hist-list { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; min-height: 0; }
.ov-hist-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; transition: background .14s; font-family: var(--font-body); }
.ov-hist-row:hover { background: var(--bg-card-hover); }
.ov-hist-row + .ov-hist-row { position: relative; }
.ov-hist-row + .ov-hist-row::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--border); }
.ovh-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(139,92,246,0.13); color: var(--data-violet); flex-shrink: 0; }
.ovh-ico svg { width: 17px; height: 17px; color: inherit; }
.ovh-body { flex: 1; min-width: 0; }
.ovh-title { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovh-meta { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovh-arrow { color: var(--text-muted); flex-shrink: 0; display: grid; place-items: center; }
.ovh-arrow svg { width: 16px; height: 16px; }
.ov-hist-empty { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 20px; color: var(--text-muted); }
.ov-hist-empty .ovhe-ico { width: 34px; height: 34px; color: var(--text-muted); opacity: 0.6; }
.ov-hist-empty p { margin: 0; font-size: 0.84rem; color: var(--text-secondary); line-height: 1.5; max-width: 220px; }
.ov-hist-empty .ovhe-cta { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--accent-strong); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.ov-hist-empty .ovhe-cta:hover { text-decoration: underline; }

/* =====================================================================
   MULTI-STEP WIZARD (Find New Ideas) + grouped FORM SECTIONS
   ===================================================================== */
.wiz-steps { display: flex; align-items: flex-start; gap: 0; margin: 2px 0 22px; }
.wiz-step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; width: 76px; }
.wiz-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; background: var(--bg-card); border: 2px solid var(--border-strong); color: var(--text-muted); transition: background .2s, border-color .2s, color .2s, box-shadow .2s; }
.wiz-dot svg { width: 16px; height: 16px; }
.wiz-step.active .wiz-dot { background: var(--accent); border-color: var(--accent); color: #231a00; box-shadow: 0 0 0 4px var(--accent-soft); }
.wiz-step.done .wiz-dot { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
:root[data-theme="dark"] .wiz-step.active .wiz-dot { color: #231a00; }
.wiz-slabel { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); text-align: center; line-height: 1.2; }
.wiz-step.active .wiz-slabel { color: var(--text-primary); }
.wiz-step.done .wiz-slabel { color: var(--text-secondary); }
.wiz-line { flex: 1 1 auto; height: 2px; min-width: 12px; background: var(--border-strong); margin-top: 16px; border-radius: 2px; transition: background .25s; }
.wiz-line.done { background: var(--accent); }
.wiz-ptitle { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.01em; margin: 0 0 5px; }
.wiz-psub { color: var(--text-secondary); font-size: 0.9rem; margin: 0 0 18px; line-height: 1.55; }
.wiz-foot { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.wiz-foot .wiz-spacer { flex: 1; }
.wiz-count { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--text-muted); }

/* review summary (final wizard step) */
.review-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.review-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; background: var(--card-grad); }
.review-row .rv-key { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); width: 128px; flex-shrink: 0; padding-top: 2px; }
.review-row .rv-val { flex: 1; min-width: 0; font-size: 0.9rem; color: var(--text-primary); line-height: 1.5; }
.review-row .rv-val.muted { color: var(--text-muted); }

/* grouped form sections (Validate My Idea · Market Reports) */
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-sec-head { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.form-sec-head .fs-num { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 0.74rem; flex-shrink: 0; }
.form-sec-head .fs-title { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; }
.form-sec-head .fs-hint { font-family: var(--font-body); font-weight: 400; font-size: 0.78rem; color: var(--text-muted); margin-left: auto; text-align: right; }
.char-count { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); text-align: right; margin-top: 6px; transition: color .15s; }
.char-count.ok { color: var(--emerald); }

/* "what's inside" info card (Market Reports) */
.inside-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.inside-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--text-secondary); line-height: 1.45; }
.inside-list li svg { width: 16px; height: 16px; color: var(--emerald); flex-shrink: 0; margin-top: 2px; }

/* =====================================================================
   SHARED FORM SYSTEM  —  one visual language across all 4 feature screens
   (Find New Ideas · Validate My Idea · Signal Radar · Market Reports)
   ---------------------------------------------------------------------
   Atoms already shared: .page-head, .card.pad-lg, .field/label/.help-text,
   .chip-group/.chip, .wiz-steps stepper, .wiz-ptitle/.wiz-psub panel header,
   .wiz-foot footer with .btn-primary.btn-inline. These additions finish the
   kit so every screen reads as one product.
   ===================================================================== */

/* Centered helper line under a primary form action (Validate · Market). */
.form-note { color: var(--text-muted); font-size: 0.8rem; text-align: center; margin: 12px auto 0; max-width: 560px; line-height: 1.5; }

/* PDF upload — dashed dropzone + selected-file chip (Validate My Idea).
   Mirrors the mobile ValidateOwnIdeaScreen picker/chip. */
.pdf-picker {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 18px 16px; border-radius: 12px; text-align: center;
  border: 1px dashed var(--border-strong); background: var(--bg-card);
  color: var(--text-primary); transition: border-color .16s, background .16s;
}
.pdf-picker:hover { border-color: var(--border-accent); background: var(--bg-card-hover); }
.pdf-picker svg { width: 24px; height: 24px; color: var(--accent-strong); }
.pdf-picker .pdf-picker-title { font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; }
.pdf-picker .pdf-picker-hint { font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; max-width: 400px; }
.pdf-chip {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--bg-card);
}
.pdf-chip > .pdf-chip-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); flex-shrink: 0; }
.pdf-chip > .pdf-chip-ico svg { width: 17px; height: 17px; }
.pdf-chip .pdf-chip-meta { flex: 1; min-width: 0; }
.pdf-chip .pdf-chip-name { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-chip .pdf-chip-size { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }
.pdf-chip .pdf-chip-x { width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--text-muted); display: grid; place-items: center; flex-shrink: 0; transition: background .14s, color .14s; }
.pdf-chip .pdf-chip-x:hover { background: var(--danger-soft); color: var(--danger); }
.pdf-chip .pdf-chip-x svg { width: 16px; height: 16px; }
/* review-step secondary action: use the attached document for the full report */
.pdf-report-cta { margin-top: 14px; border: 1px solid var(--border-accent); background: var(--accent-soft); border-radius: 14px; padding: 16px 18px; }
.pdf-report-cta .prc-title { font-family: var(--font-display); font-weight: 600; font-size: 0.94rem; margin-bottom: 4px; }
.pdf-report-cta .prc-sub { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }

/* =====================================================================
   SIGNAL RADAR  —  per-niche icon (feed) + app icons (detail)
   ===================================================================== */
/* niche icon tile leading each momentum-feed row */
.radar-niche-ico {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--data-amber);
  background: rgba(224,122,91,0.13); border: 1px solid rgba(224,122,91,0.22);
}
.radar-niche-ico svg { width: 21px; height: 21px; }
/* detail-hero niche icon (larger) */
.radar-hero-ico { width: 52px; height: 52px; border-radius: 14px; }
.radar-hero-ico svg { width: 27px; height: 27px; }

/* app rows in the niche detail — real store icon or a clean initial fallback */
.app-row { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--card-grad); margin-bottom: 10px; box-shadow: var(--shadow-card); }
.app-tile {
  position: relative; width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
  background: var(--accent-soft); color: var(--accent-strong);
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  border: 1px solid var(--border);
}
.app-tile .app-ico { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.app-row .app-body { flex: 1; min-width: 0; }
.app-row .app-name { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-row .app-rating { color: var(--amber); font-size: 0.8rem; font-weight: 600; font-family: var(--font-mono); }
.app-row .app-meta { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.45; margin-top: 3px; }
.app-row .app-open { flex-shrink: 0; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--link); white-space: nowrap; }
.app-row .app-open:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Account activity — joined stat row ---------- */
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 15px; overflow: hidden;
}
.stat-cell { padding: 22px 20px; background: var(--card-grad); }
.stat-cell .s-val { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; letter-spacing: -0.02em; line-height: 1; }
.stat-cell .s-lbl { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-top: 8px; }

/* =====================================================================
   OVERVIEW — compact one-viewport layout (Airbnb)
   Row 1: [ 2×2 feature credits | 3 daily-allowance cards ]
   Row 2: 4 stat cards
   ===================================================================== */
.ov-head { margin-bottom: 18px; }
.ov-head h1 { font-size: 1.5rem; margin-bottom: 3px; }
.ov-head p { font-size: 0.92rem; }
/* align-items:stretch lets the right column grow to the height of the left
   2×2 ring grid — the side card (Recent Searches) then flex-fills that height. */
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; align-items: stretch; margin-bottom: 20px; }
.ov-col { min-width: 0; }
.ov-col-side { display: flex; flex-direction: column; }
.ov-col-side .ov-label { flex: 0 0 auto; }
.ov-col-side .ov-hist-card { flex: 1 1 auto; min-height: 0; }
.ov-label { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em; color: var(--text-primary); margin: 0 0 12px; display: flex; align-items: baseline; gap: 8px; }
.ov-label .hint { font-family: var(--font-body); font-weight: 400; font-size: 0.76rem; color: var(--text-muted); }
/* compact 2×2 ring grid */
.ring-grid.ov-rings { grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ov-rings .ring-card { padding: 16px 12px 14px; gap: 9px; }
.ov-rings .ring-wrap, .ov-rings .ring-svg { width: 104px; height: 104px; }
.ov-rings .ring-num { font-size: 1.7rem; }
/* 4 bottom stat cards — compact colourful KPI row (accent rail + icon chip +
   motif). Kept short: tight vertical padding, icon + number + label on a row. */
.dash .card.ov-stat { padding: 11px 14px; }
.ov-stat { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; }
.ov-stat::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--kc); }
.ov-stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 82px; height: 82px; border-radius: 50%; background: var(--kc-soft); pointer-events: none; }
.ovs-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--kc-soft); color: var(--kc); flex-shrink: 0; position: relative; z-index: 1; }
.ovs-ico svg { width: 18px; height: 18px; }
.ovs-text { min-width: 0; position: relative; z-index: 1; }
.ov-stat .s-val { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.05; }
.ov-stat .s-lbl { font-size: 0.78rem; color: var(--text-secondary); font-weight: 500; margin-top: 2px; }
.ov-dl-load { color: var(--text-muted); }

button.tier-pill { cursor: pointer; }
button.tier-pill:hover { border-color: var(--accent); }

.section-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin: 30px 0 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-title:first-child { margin-top: 6px; }
.section-title .hint { font-family: var(--font-body); font-weight: 400; font-size: 0.8rem; color: var(--text-muted); }
.section-title .title-right { margin-left: auto; }
.empty-line { color: var(--text-muted); font-size: 0.88rem; }

/* "Coming soon" / gate placeholder panel */
.coming {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 60px 30px; border-radius: 15px;
  border: 1px dashed var(--border-accent); background: var(--surface-glow);
}
.coming .badge { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-secondary); margin-bottom: 14px; }
.coming h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; margin: 0 0 10px; letter-spacing: -0.02em; }
.coming p { color: var(--text-secondary); max-width: 460px; margin: 0 auto; line-height: 1.65; }
.coming .spec { text-align: left; max-width: 520px; margin: 18px auto 0; }
.coming .spec li { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

.mobile-overlay { display: none; }

/* =====================================================================
   PLAN CARD (Billing & Plan)
   ===================================================================== */
.plan-card { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.plan-main { flex: 1; min-width: 220px; }
.plan-tier { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plan-status { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--text-secondary); margin-top: 6px; }
.plan-status .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); margin-right: 6px; vertical-align: 1px; }
.plan-status .dot.on { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.plan-actions { display: flex; flex-direction: column; gap: 9px; min-width: 200px; }

/* =====================================================================
   SHARED COMPONENTS (feature screens)
   ===================================================================== */
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 12px; font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-strong); transition: border-color .16s, background .16s, transform .16s; }
.btn-secondary:hover:not(:disabled) { border-color: var(--border-accent); background: var(--bg-card-hover); transform: translateY(-1px); }
.btn-secondary:disabled { opacity: 0.55; cursor: default; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(220,38,38,0.3); }
.btn-danger:hover:not(:disabled) { border-color: var(--danger); background: var(--danger-soft); }
.btn-inline { width: auto; display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* chips / multi-select pills */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text-secondary); border-radius: 999px; padding: 8px 14px; font-size: 0.84rem; font-weight: 500; transition: all .14s; }
.chip:hover { border-color: var(--border-accent); color: var(--text-primary); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
:root[data-theme="dark"] .chip.active { color: #fff; }

/* segmented control */
.segmented { display: inline-flex; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg-btn { padding: 8px 16px; border-radius: 9px; border: 0; background: none; color: var(--text-secondary); font-size: 0.84rem; font-weight: 600; font-family: var(--font-body); transition: background .16s, color .16s; }
.seg-btn:hover { color: var(--text-primary); }
.seg-btn.active { background: var(--accent); color: #231a00; }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em; padding: 4px 9px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--border-accent); }
:root[data-theme="dark"] .tag { color: var(--accent); }
.tag.muted { background: var(--track); color: var(--text-secondary); border-color: var(--border); }

/* score badge (circular pct) */
.score-badge { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0; font-family: var(--font-display); font-weight: 700; border: 2px solid; }
.score-badge .sb-num { font-size: 1.2rem; line-height: 1; }
.score-badge .sb-lbl { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.sc-hi { color: var(--emerald); border-color: var(--emerald); background: var(--emerald-soft); }
.sc-mid { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); }
.sc-lo { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }

/* dimension score bars */
.dim-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }
.dim-row { display: flex; flex-direction: column; gap: 6px; }
.dim-head { display: flex; justify-content: space-between; align-items: baseline; }
.dim-name { font-size: 0.84rem; font-weight: 600; }
.dim-val { font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; }
.dim-track { height: 7px; border-radius: 999px; background: var(--track); overflow: hidden; }
.dim-track > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #fbbf24, #f59e0b); transition: width .8s cubic-bezier(.2,.7,.25,1); }
/* Per-dimension colour band: > 75 green, 35–75 blue, < 35 red. */
.dim-row.dim-hi  .dim-track > span { background: linear-gradient(90deg, #34d399, var(--emerald)); }
.dim-row.dim-mid .dim-track > span { background: linear-gradient(90deg, #60a5fa, var(--data-blue)); }
.dim-row.dim-lo  .dim-track > span { background: linear-gradient(90deg, #f87171, var(--danger)); }
.dim-row.dim-hi  .dim-val { color: var(--emerald); }
.dim-row.dim-mid .dim-val { color: var(--data-blue); }
.dim-row.dim-lo  .dim-val { color: var(--danger); }
.dim-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.dl-item { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.02em; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 7px; }
.dl-item::before { content: ""; width: 11px; height: 11px; border-radius: 3px; }
.dl-hi::before { background: var(--emerald); }
.dl-mid::before { background: var(--data-blue); }
.dl-lo::before { background: var(--danger); }

/* idea result list */
.idea-list { display: flex; flex-direction: column; gap: 12px; }
.idea-row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 16px; background: var(--card-grad); border: 1px solid var(--border); box-shadow: var(--shadow-card); transition: border-color .18s, transform .18s, box-shadow .18s; text-align: left; width: 100%; }
.idea-row:hover { border-color: var(--border-accent); transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.idea-row .ir-body { flex: 1; min-width: 0; }
.idea-row .ir-title { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; margin-bottom: 4px; }
.idea-row .ir-desc { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.5; margin-bottom: 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.idea-row .ir-lock { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.idea-row .ir-arrow { color: var(--text-muted); flex-shrink: 0; }
.idea-row.selectable { cursor: pointer; }
.idea-row.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-card); }
.idea-select-box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-strong); flex-shrink: 0; display: grid; place-items: center; color: transparent; transition: all .15s; }
.idea-row.selected .idea-select-box { background: var(--accent); border-color: var(--accent); color: #231a00; }
.idea-select-box svg { width: 13px; height: 13px; }

/* generic detail sections */
.detail-section { margin-top: 26px; }
.detail-section > h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; margin: 0 0 12px; letter-spacing: -0.01em; }
.prose { color: var(--text-secondary); line-height: 1.7; font-size: 0.95rem; }
.prose p { margin: 0 0 12px; }
.competitor { padding: 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--card-grad); margin-bottom: 10px; box-shadow: var(--shadow-card); }
.competitor .cp-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.competitor .cp-meta { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }
.evidence-item { display: block; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 8px; transition: border-color .16s; }
.evidence-item:hover { border-color: var(--border-accent); }
.evidence-item .ev-src { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-secondary); }
.evidence-item .ev-title { color: var(--text-primary); font-size: 0.88rem; margin-top: 3px; }

/* processing / poll state */
.processing { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 60px 24px; }
.processing .p-orb { width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fcd34d, #f59e0b 62%, transparent 74%); box-shadow: 0 0 44px -6px var(--accent-glow); animation: pulse 1.4s ease-in-out infinite; margin-bottom: 22px; }
.processing h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin: 0 0 8px; }
.processing p { color: var(--text-secondary); max-width: 380px; line-height: 1.6; margin: 0 0 6px; }
.processing .p-elapsed { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); margin-top: 12px; }

/* empty state */
.empty-state { text-align: center; padding: 54px 24px; border: 1px dashed var(--border-strong); border-radius: 15px; background: var(--surface-glow); }
.empty-state .es-ico { width: 46px; height: 46px; color: var(--accent); opacity: 0.75; margin: 0 auto 14px; }
.empty-state h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin: 0 0 8px; }
.empty-state p { color: var(--text-secondary); max-width: 400px; margin: 0 auto 16px; line-height: 1.6; }

/* skeleton */
.skeleton { background: var(--skeleton); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 10px; }
.skel-row { height: 92px; margin-bottom: 12px; }

/* gate / upgrade prompt */
.gate { border: 1px solid var(--border-accent); background: var(--accent-soft); border-radius: 16px; padding: 20px 22px; display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.gate .g-ico { width: 26px; height: 26px; color: var(--accent-strong); flex-shrink: 0; }
.gate .g-body { flex: 1; }
.gate h3 { font-family: var(--font-display); font-weight: 600; font-size: 1rem; margin: 0 0 5px; }
.gate p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.55; margin: 0 0 12px; }

/* =====================================================================
   HELP & SUPPORT
   ===================================================================== */
.help-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--card-grad); margin-bottom: 10px; box-shadow: var(--shadow-card); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; font-size: 0.94rem; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent-secondary); font-size: 1.2rem; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 18px 18px; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.65; }
.contact-card { border: 1px solid var(--border); border-radius: 16px; background: var(--card-grad); padding: 22px; box-shadow: var(--shadow-card); }
.contact-row { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.contact-row:last-child { border-bottom: 0; }
.contact-row .cr-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); flex-shrink: 0; }
.contact-row .cr-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.contact-row .cr-value { font-size: 0.9rem; font-weight: 600; }
.contact-row .cr-value a { color: var(--link); }

/* =====================================================================
   PLANS & PRICING
   ===================================================================== */
.offer-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: linear-gradient(135deg, var(--accent-soft), var(--emerald-soft)); border: 1px solid var(--border-accent); margin-bottom: 22px; }
.offer-banner .ob-pct { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--accent-strong); }
.offer-banner .ob-copy { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.4; }
.offer-banner .ob-copy strong { color: var(--text-primary); }
.billing-toggle { display: inline-flex; margin-bottom: 20px; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.price-card { position: relative; border: 1px solid var(--border); border-radius: 15px; background: var(--card-grad); padding: 24px 22px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--accent); box-shadow: var(--shadow-pop); }
/* Dark text on the amber accent — white washes out on the light amber
   (#f59e0b light / #fbbf24 dark), so use near-black for legible contrast
   in BOTH themes. Matches the discount badge treatment in renderPricingData. */
.price-card .pc-badge { position: absolute; top: -11px; left: 22px; font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; background: var(--accent); color: #231a00; padding: 4px 10px; border-radius: 999px; }
.price-card .pc-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.price-card .pc-amount { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; letter-spacing: -0.02em; margin: 8px 0 2px; }
.price-card .pc-amount .pc-per { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.price-card .pc-orig { font-size: 0.85rem; color: var(--text-muted); text-decoration: line-through; margin-bottom: 8px; }
/* Annual savings note — a POSITIVE label, NOT a struck-out price (was wrongly
   using .pc-orig, which is line-through). Emerald reads as savings; no strike. */
.price-card .pc-save { font-size: 0.8rem; color: var(--emerald); font-weight: 600; text-decoration: none; margin-bottom: 8px; }
.price-card .pc-feats { list-style: none; padding: 0; margin: 16px 0 20px; display: flex; flex-direction: column; gap: 9px; }
.price-card .pc-feats li { display: flex; gap: 9px; align-items: flex-start; font-size: 0.86rem; color: var(--text-secondary); line-height: 1.4; }
.price-card .pc-feats li svg { width: 16px; height: 16px; color: var(--emerald); flex-shrink: 0; margin-top: 1px; }
.price-card .pc-cta { margin-top: auto; }
.consumable-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* =====================================================================
   TABLES (billing history)
   ===================================================================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-card); }
.data-table { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--card-grad); }
.data-table th { text-align: left; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); padding: 14px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 15px 18px; font-size: 0.88rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td.num { font-family: var(--font-display); font-weight: 600; }
.status-tag { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.status-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.status-tag.active, .status-tag.paid { background: var(--emerald-soft); color: var(--emerald); }
.status-tag.expired, .status-tag.cancelled { background: var(--track); color: var(--text-secondary); }
.status-tag.grace_period, .status-tag.pending { background: var(--amber-soft); color: var(--amber); }
.status-tag.failed { background: var(--danger-soft); color: var(--danger); }

/* generic list-row card (blueprints, market reports, downloads) */
.list-card { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 14px; background: var(--card-grad); border: 1px solid var(--border); box-shadow: var(--shadow-card); margin-bottom: 12px; transition: border-color .16s, transform .16s; }
.list-card:hover { border-color: var(--border-accent); }
.list-card .lc-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.list-card .lc-ico svg { width: 19px; height: 19px; color: inherit; }
.list-card .lc-ico.violet { background: var(--accent-soft); color: var(--accent-strong); }
.list-card .lc-ico.green { background: var(--emerald-soft); color: var(--emerald); }
.list-card .lc-ico.blue { background: rgba(76,110,245,0.12); color: var(--data-blue); }
.list-card .lc-body { flex: 1; min-width: 0; }
.list-card .lc-title { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; }
.list-card .lc-meta { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }
.list-card .lc-actions { flex-shrink: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.list-card .lc-fb { font-size: 0.76rem; font-weight: 600; }
.list-card .lc-fb.ok { color: var(--emerald); }
.list-card .lc-fb.err { color: var(--danger); }
.radar-row { cursor: pointer; }

/* filter/sort bar */
.filter-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-bar .fb-spacer { flex: 1; }
.sort-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; }
.sort-btn:hover { color: var(--text-primary); }
.sort-btn svg { width: 14px; height: 14px; }

/* =====================================================================
   COMPARE
   ===================================================================== */
.cmp-titles { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: 10px; margin-bottom: 4px; }
.cmp-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.3; letter-spacing: -0.01em; text-align: center; color: var(--accent-strong); }
.cmp-vs { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-card); border: 1px solid var(--border-strong); font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; color: var(--text-muted); justify-self: center; }
.cmp-overall { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: 10px; }
.cmp-overall .cmp-cell { display: flex; justify-content: center; }
.cmp-dim { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.cmp-dim:first-of-type { border-top: 0; }
.cmp-dim .cd-name { grid-column: 1 / -1; text-align: center; font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; }
.cmp-dim .cd-val { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.cmp-dim .cd-val.l { text-align: left; }
.cmp-dim .cd-val.r { text-align: right; }
.cmp-bars { display: flex; gap: 5px; }
.cmp-bars .cb { flex: 1; height: 7px; border-radius: 4px; background: var(--track); overflow: hidden; }
.cmp-bars .cb > span { display: block; height: 100%; border-radius: 4px; transition: width .8s cubic-bezier(.2,.7,.25,1); }
.cmp-bars .cb.l > span { margin-left: auto; }
.cmp-legend { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.cmp-legend .cl { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); }
.cmp-legend .cl i { width: 9px; height: 9px; border-radius: 50%; }
.cmp-fact { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.cmp-fact:first-of-type { border-top: 0; }
.cmp-fact .cf-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); text-align: center; padding: 0 8px; }
.cmp-fact .cf-val { font-size: 0.86rem; font-weight: 500; }
.cmp-fact .cf-val.l { text-align: left; }
.cmp-fact .cf-val.r { text-align: right; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(10px); background: var(--text-primary); color: var(--bg-primary); padding: 12px 20px; border-radius: 12px; font-size: 0.88rem; font-weight: 500; box-shadow: 0 18px 40px -14px rgba(0,0,0,0.4); opacity: 0; transition: opacity .2s, transform .2s; z-index: 200; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* bottom-right variant (queue confirmations) — placed after .toast.show so it wins */
.toast-br { left: auto; right: 24px; bottom: 24px; transform: translateX(0) translateY(12px); max-width: 340px; text-align: left; line-height: 1.45; }
.toast-br.show { transform: translateX(0) translateY(0); }

/* =====================================================================
   MODAL  (confirm / gate / success dialog)
   ===================================================================== */
.modal-ov { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; background: rgba(20,18,14,0.55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.modal-ov.show { opacity: 1; }
.modal-card { position: relative; width: 100%; max-width: 460px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 28px 26px 24px; box-shadow: var(--shadow-pop); transform: translateY(14px) scale(.98); transition: transform .2s; text-align: center; }
.modal-ov.show .modal-card { transform: none; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: none; border: 0; color: var(--text-muted); cursor: pointer; }
.modal-x:hover { background: var(--track); color: var(--text-primary); }
.modal-x svg { width: 18px; height: 18px; }
.modal-ico { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; margin: 0 auto 14px; }
.modal-ico svg { width: 26px; height: 26px; }
.modal-ico.bp-ico, .modal-ico.gate-ico { background: var(--accent-soft); color: var(--accent-strong); }
.modal-ico.ok-ico { background: var(--emerald-soft); color: var(--emerald); }
.modal-title { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.01em; margin: 0 0 8px; }
.modal-sub { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; margin: 0 0 16px; }
.modal-meta { display: flex; flex-direction: column; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); margin-bottom: 14px; }
.modal-meta span { display: inline-flex; align-items: center; gap: 6px; }
.modal-meta svg { width: 13px; height: 13px; flex-shrink: 0; }
.modal-cred { color: var(--accent-strong); font-weight: 600; }
.modal-note { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 18px; }
.modal-err { background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 9px 12px; font-size: 0.82rem; margin-bottom: 14px; text-align: left; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.modal-actions .btn-inline { flex: 1; min-width: 140px; }

/* =====================================================================
   IDEA REPORT — premium research-dossier presentation
   ===================================================================== */
.report-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.rh-score { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.rh-verdict { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.rh-verdict.sc-hi { color: var(--emerald); border-color: var(--emerald); background: var(--emerald-soft); }
.rh-verdict.sc-mid { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); }
.rh-verdict.sc-lo { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.rh-meta { flex: 1; min-width: 200px; }
.rh-complex { margin-top: 8px; color: var(--text-secondary); font-size: 0.84rem; }
.rh-actions { flex-wrap: wrap; }

.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.sec-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; flex-shrink: 0; }
.sec-ico svg { width: 18px; height: 18px; }
.sec-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; margin: 0; letter-spacing: -0.01em; }
.sec-sub { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); margin-top: 2px; }

.callout { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 15px; border: 1px solid var(--border); border-left-width: 3px; background: var(--card-grad); box-shadow: var(--shadow-card); margin-bottom: 10px; }
.callout-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.callout-ico svg { width: 19px; height: 19px; }
.callout-body { flex: 1; min-width: 0; }
.callout-body h4 { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; margin: 0 0 6px; }
.callout .prose { font-size: 0.92rem; }
.callout .prose p:last-child { margin-bottom: 0; }
.tone-problem { border-left-color: var(--danger); }
.tone-problem .callout-ico { background: var(--danger-soft); color: var(--danger); }
.tone-monet, .tone-opportunity { border-left-color: var(--emerald); }
.tone-monet .callout-ico, .tone-opportunity .callout-ico { background: var(--emerald-soft); color: var(--emerald); }
.tone-tech { border-left-color: var(--data-blue); }
.tone-tech .callout-ico { background: rgba(59,130,246,0.13); color: var(--data-blue); }

.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.feat-card { display: flex; gap: 11px; align-items: flex-start; padding: 14px 16px; border-radius: 13px; border: 1px solid var(--border); background: var(--card-grad); box-shadow: var(--shadow-card); }
.feat-ico { width: 22px; height: 22px; border-radius: 7px; background: var(--emerald-soft); color: var(--emerald); display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.feat-ico svg { width: 13px; height: 13px; }
.feat-title { font-weight: 600; font-size: 0.9rem; line-height: 1.4; }
.feat-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin-top: 3px; }

.stack-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.stack-chip { font-family: var(--font-mono); font-size: 0.72rem; padding: 5px 11px; border-radius: 8px; background: rgba(59,130,246,0.1); color: var(--data-blue); border: 1px solid rgba(59,130,246,0.28); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-card); -webkit-overflow-scrolling: touch; }
.report-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 540px; }
.report-table thead th { text-align: left; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: 12px 14px; background: var(--bg-card-hover); border-bottom: 1px solid var(--border); white-space: nowrap; }
.report-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); color: var(--text-secondary); line-height: 1.5; vertical-align: top; }
.report-table tbody tr:last-child td { border-bottom: 0; }
.report-table .rt-name { font-family: var(--font-display); font-weight: 600; color: var(--text-primary); }
.report-table .rt-gap { color: var(--accent-strong); }
.report-table .rt-link { text-align: right; white-space: nowrap; }
.report-table .rt-link a { font-family: var(--font-mono); font-size: 0.72rem; color: var(--link); }
.report-table .rt-link a:hover { text-decoration: underline; text-underline-offset: 3px; }

.evidence-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.evidence-grid .evidence-item { margin-bottom: 0; background: var(--card-grad); box-shadow: var(--shadow-card); }
.ev-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ev-top svg { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }

.idea-kv { display: flex; flex-direction: column; gap: 3px; margin-top: 9px; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }
.idea-kv strong { color: var(--text-primary); font-weight: 600; }

.bp-rail { display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: 16px; border: 1px solid var(--border-accent); background: linear-gradient(135deg, var(--accent-soft), transparent 72%); box-shadow: var(--shadow-card); flex-wrap: wrap; }
.bp-rail-ico { width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; flex-shrink: 0; }
.bp-rail-ico svg { width: 24px; height: 24px; }
.bp-rail-body { flex: 1; min-width: 210px; }
.bp-rail-body h4 { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin: 0 0 4px; }
.bp-rail-body p { color: var(--text-secondary); font-size: 0.86rem; line-height: 1.55; margin: 0; }

/* =====================================================================
   SEARCH RESULT CARD — two actions (View · Generate Blueprint Pack)
   ===================================================================== */
.idea-card { border-radius: 16px; background: var(--card-grad); border: 1px solid var(--border); box-shadow: var(--shadow-card); overflow: hidden; transition: border-color .18s, box-shadow .18s, transform .18s; }
.idea-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.ic-main { display: flex; align-items: center; gap: 16px; padding: 16px 18px; width: 100%; text-align: left; cursor: pointer; flex-wrap: wrap; }
.ic-main:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 12px; }
.ic-main .ir-body { flex: 1 1 0; min-width: 0; }
.ic-main .ir-title { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; margin-bottom: 4px; }
.ic-main .ir-desc { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.5; margin-bottom: 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ic-main .ir-lock { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
/* Compact actions inline in the card row, right-aligned — no separate full-width button row */
.ic-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.ic-actions .btn-inline { flex: 0 0 auto; width: auto; min-width: 0; padding: 8px 13px; font-size: 0.82rem; border-radius: 10px; white-space: nowrap; }
.ic-actions .btn-inline .nav-ico { width: 15px; height: 15px; }

/* =====================================================================
   SIGNAL RADAR — App-Landscape generate action
   ===================================================================== */
.radar-gen { display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: 16px; border: 1px solid var(--border-accent); background: linear-gradient(135deg, var(--accent-soft), transparent 72%); box-shadow: var(--shadow-card); flex-wrap: wrap; }
.rg-ico { width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; flex-shrink: 0; }
.rg-ico svg { width: 24px; height: 24px; }
.rg-body { flex: 1; min-width: 210px; }
.rg-body h4 { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin: 0 0 4px; }
.rg-body p { color: var(--text-secondary); font-size: 0.86rem; line-height: 1.55; margin: 0 0 6px; }
.rg-cred { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.03em; color: var(--accent-strong); font-weight: 600; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1040px) {
  .spotlight { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 960px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-panel { padding: 40px 22px; min-height: 100vh; }
  .help-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; width: 268px; z-index: 60;
    transform: translateX(-100%); transition: transform .22s ease;
  }
  .dash.nav-open .sidebar { transform: translateX(0); }
  .hamburger { display: grid; place-items: center; }
  .mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 55; }
  .dash.nav-open .mobile-overlay { display: block; }
  .content { padding: 20px 16px; }
  .user-meta { display: none; }
}
@media (max-width: 900px) {
  .ring-grid { grid-template-columns: repeat(2, 1fr); }
  .dim-grid { grid-template-columns: 1fr; }
  .ov-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .consumable-grid { grid-template-columns: 1fr; }
  .spot-right { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .feat-grid, .evidence-grid { grid-template-columns: 1fr; }
  .ic-actions { width: 100%; margin-left: 0; }
  .ic-actions .btn-inline { flex: 1 1 auto; min-width: 0; }
  .bp-rail .btn-inline, .radar-gen .btn-inline { width: 100%; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn-inline { width: 100%; flex: none; }
  .toast-br { left: 16px; right: 16px; max-width: none; }
}
@media (max-width: 560px) {
  .topbar { padding: 12px 16px; gap: 10px; }
  .topbar .btn-ghost { display: none; }
  .tier-pill { display: none; }
  .spotlight { padding: 22px 20px; }
  .spot-plan { font-size: 1.7rem; }
  .spot-right { grid-template-columns: 1fr; }
  .list-card { flex-wrap: wrap; }
  .list-card .lc-actions { width: 100%; justify-content: flex-start; }
}
@media (max-width: 460px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .plan-actions { width: 100%; }
  .auth-form-panel { padding: 30px 16px; }
  .idea-row { padding: 14px 15px; gap: 12px; }
  .score-badge { width: 50px; height: 50px; }
  .cmp-titles, .cmp-overall { grid-template-columns: 1fr 30px 1fr; }
}
