/* ============================================================
   TRENDBOT · DESIGN SYSTEM
   warm cream + terracotta + sage · Outfit + JetBrains Mono
============================================================ */

:root {
  /* surfaces */
  --bg:           #F7F4ED;     /* warm cream */
  --bg-2:         #EFE9DC;     /* deeper cream */
  --surface:      #FFFFFF;
  --surface-2:    #FBF8F2;
  --line:         #E7E0D2;     /* warm border */
  --line-soft:    #EFE9DC;

  /* ink */
  --ink:          #1B1815;     /* near-black with warmth */
  --ink-2:        #4B453E;
  --ink-3:        #7A736A;
  --ink-4:        #A39C91;

  /* brand */
  --brand:        #C8553D;     /* terracotta */
  --brand-soft:   #F5D6CC;
  --brand-tint:   #FBEBE5;
  --brand-deep:   #9B3D2A;

  /* semantic */
  --teal:         #4A7373;     /* supply / neutral */
  --teal-soft:    #D6E3E2;
  --sage:         #5B8E7D;     /* success / good */
  --sage-soft:    #D6E7E0;
  --amber:        #C8923A;     /* warn */
  --amber-soft:   #F4E4C5;
  --rose:         #B14B5A;     /* error / flagged */
  --rose-soft:    #F1D6DA;

  /* data viz */
  --c1: #C8553D; /* terracotta */
  --c2: #4A7373; /* teal */
  --c3: #C8923A; /* amber */
  --c4: #5B8E7D; /* sage */
  --c5: #8B6B9C; /* dusty plum */
  --c6: #B89472; /* tan */

  /* gap bands */
  --band-strong: #2D7A5F;
  --band-good:   #5B8E7D;
  --band-mod:    #C8923A;
  --band-tight:  #B14B5A;

  /* radii / shadows */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 28px;

  --shadow-1: 0 1px 2px rgba(27, 24, 21, 0.04), 0 1px 1px rgba(27, 24, 21, 0.03);
  --shadow-2: 0 2px 8px rgba(27, 24, 21, 0.05), 0 1px 2px rgba(27, 24, 21, 0.04);
  --shadow-3: 0 8px 24px -8px rgba(27, 24, 21, 0.12), 0 2px 6px rgba(27, 24, 21, 0.05);
  --shadow-4: 0 24px 48px -12px rgba(27, 24, 21, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--brand-tint); color: var(--brand-deep); }

/* monospace */
.mono, code, .kbd, .num, .num-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   APP SHELL
============================================================ */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
============================================================ */
.sidebar {
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, #D87156 100%);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 4px 12px -2px rgba(200, 85, 61, 0.4);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  margin-top: 4px;
}
.nav-section-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  padding: 12px 10px 6px;
  font-weight: 500;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  color: var(--ink-2);
  font-weight: 500;
  font-size: 14px;
  transition: all 160ms ease;
  position: relative;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: rgba(27, 24, 21, 0.04); color: var(--ink); }
.nav-item.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
  border: 1px solid var(--line);
  padding: 8px 9px;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
}
.nav-pill {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--bg-2);
  padding: 1px 7px;
  border-radius: 100px;
}
.nav-item.active .nav-pill { background: var(--brand-tint); color: var(--brand-deep); }
.nav-pill.soft { background: var(--bg-2); }
.nav-dot {
  margin-left: auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.nav-divider { height: 1px; background: var(--line); margin: 10px 4px; }
.nav-cta {
  background: linear-gradient(135deg, var(--brand) 0%, #D87156 100%);
  color: #fff;
  margin-top: 2px;
  box-shadow: 0 4px 12px -2px rgba(200, 85, 61, 0.35);
  border: 0;
}
.nav-cta:hover { background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 100%); color: #fff; }
.nav-cta::before { display: none !important; }
.nav-cta.active { background: linear-gradient(135deg, var(--brand) 0%, #D87156 100%); color: #fff; }
.nav-tag {
  margin-left: auto;
  font-size: 10px;
  background: rgba(255,255,255,0.2);
  padding: 1px 7px;
  border-radius: 100px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-foot { margin-top: 16px; }
.run-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  box-shadow: var(--shadow-1);
}
.run-card-top { display: flex; align-items: center; gap: 6px; }
.run-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-soft);
}
.run-label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.run-title { font-size: 16px; font-weight: 600; margin-top: 6px; letter-spacing: -0.01em; }
.run-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.run-sep { margin: 0 4px; }
.run-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--brand);
  font-weight: 500;
}
.run-link:hover { color: var(--brand-deep); }

/* ============================================================
   MAIN + TOPBAR
============================================================ */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(247, 244, 237, 0.85);
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.crumb-page { font-weight: 600; }
.crumb-sep { color: var(--ink-4); }
.crumb-sub { color: var(--ink-3); }

.top-actions { display: flex; align-items: center; gap: 10px; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 7px 10px 7px 12px;
  width: 340px;
  transition: all 160ms;
}
.search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.search svg { width: 15px; height: 15px; color: var(--ink-3); }
.search input {
  flex: 1; min-width: 0;
  border: 0; background: none; outline: none;
  font-size: 13.5px;
}
.search input::placeholder { color: var(--ink-4); }
.kbd {
  font-size: 11px;
  background: var(--bg-2);
  color: var(--ink-3);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.icon-btn {
  position: relative;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  color: var(--ink-2);
  transition: all 160ms;
  border: 1px solid var(--line);
  background: var(--surface);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--brand);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5B8E7D, #4A7373);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-1);
  cursor: pointer;
}

/* ============================================================
   VIEWS
============================================================ */
.view { display: none; padding: 32px 32px 80px; }
.view.active { display: block; }

/* ============================================================
   HERO (Discover)
============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 14px;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-soft);
}
.eyebrow-dot.live {
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--brand-tint); }
  50% { box-shadow: 0 0 0 6px rgba(200, 85, 61, 0.15); }
}

.hero-title {
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
}
.hero-title em {
  font-style: italic;
  color: var(--brand);
  font-weight: 600;
}
.hero-sub {
  font-size: 15.5px;
  color: var(--ink-2);
  max-width: 540px;
  margin-bottom: 24px;
}
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; gap: 10px; }

/* hero right chart card */
.hero-chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-2);
}
.hero-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.hero-chart-title { font-size: 14px; font-weight: 600; }
.hero-chart-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.legend {
  display: flex; align-items: center; gap: 10px;
  font-size: 11.5px; color: var(--ink-3);
}
.legend .dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 4px; }
.dot-strong { background: var(--c1); }
.dot-good { background: var(--c4); }
.dot-moderate { background: var(--c3); }

.chart-wrap { position: relative; height: 140px; }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 160ms ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 2px 6px rgba(27, 24, 21, 0.18);
}
.btn-primary:hover {
  background: #2a2520;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 24, 21, 0.22);
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-4); }
.btn-soft {
  background: var(--bg-2);
  color: var(--ink-2);
}
.btn-soft:hover { background: var(--line); color: var(--ink); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }

/* ============================================================
   STATS
============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: all 200ms;
}
.stat:hover { box-shadow: var(--shadow-2); }
.stat-accent {
  background: linear-gradient(135deg, var(--sage-soft) 0%, #EBF2EC 100%);
  border-color: rgba(91, 142, 125, 0.25);
}
.stat-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.005em;
}
.stat-tag {
  font-size: 10.5px;
  color: var(--ink-3);
  background: var(--bg-2);
  padding: 2px 7px;
  border-radius: 100px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.tag-good { background: var(--sage-soft); color: var(--sage); }
.tag-up { background: var(--sage-soft); color: var(--sage); }
.tag-warn { background: var(--amber-soft); color: var(--amber); }
.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 12px;
}
.stat-spark { height: 38px; margin-bottom: 8px; position: relative; }
.spark-wrap { position: relative; height: 100%; width: 100%; }
.stat-foot { font-size: 11.5px; color: var(--ink-3); }

/* ============================================================
   FILTER BAR
============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  transition: all 140ms;
}
.chip:hover { border-color: var(--ink-4); }
.chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.chip-num {
  font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-3);
  background: var(--bg-2);
  padding: 1px 5px;
  border-radius: 100px;
  font-weight: 500;
}
.chip.active .chip-num { background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.85); }

.filter-right { display: flex; align-items: center; gap: 14px; }

.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.toggle input { display: none; }
.toggle-track {
  width: 30px; height: 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  position: relative;
  transition: all 200ms;
}
.toggle-knob {
  position: absolute;
  top: 1px; left: 1px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: all 200ms;
  box-shadow: var(--shadow-1);
}
.toggle input:checked + .toggle-track { background: var(--ink); border-color: var(--ink); }
.toggle input:checked + .toggle-track .toggle-knob { left: 13px; }

.sort-dd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.sort-dd select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 5px 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.seg {
  display: inline-flex;
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: 3px;
  border: 1px solid var(--line);
}
.seg-btn {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 7px;
  transition: all 160ms;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* ============================================================
   DISCOVER GRID
============================================================ */
.discover-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  align-items: start;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  position: sticky;
  top: 86px;
  box-shadow: var(--shadow-1);
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.card-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 4px;
}
.eyebrow-nova { color: var(--teal); }
.card-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.plan-counter {
  text-align: right;
  background: var(--brand-tint);
  color: var(--brand-deep);
  padding: 8px 12px;
  border-radius: var(--r-md);
  min-width: 64px;
}
.plan-num {
  display: block;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
}
.plan-word { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
  max-height: 460px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 2px;
}
.plan-list::-webkit-scrollbar { width: 4px; }
.plan-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

.plan-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-3);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.plan-empty svg { width: 32px; height: 32px; color: var(--ink-4); margin-bottom: 12px; }
.plan-empty p { font-size: 13px; line-height: 1.5; }

.plan-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  transition: all 160ms;
  cursor: pointer;
}
.plan-item:hover { background: var(--surface); border-color: var(--ink-4); transform: translateX(2px); }
.plan-item-rank {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
  font-weight: 500;
}
.plan-item-body { flex: 1; min-width: 0; }
.plan-item-term { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.plan-item-meta { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.plan-item-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--band-strong);
}
.plan-item-x {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 6px;
  color: var(--ink-3);
  transition: all 140ms;
}
.plan-item-x:hover { background: var(--rose-soft); color: var(--rose); }
.plan-item-x svg { width: 13px; height: 13px; }

.plan-foot { display: flex; gap: 8px; }
.plan-foot .btn { flex: 1; justify-content: center; }

/* ============================================================
   OPPORTUNITIES
============================================================ */
.opps { display: flex; flex-direction: column; gap: 14px; }
.opps-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 4px;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--brand);
  font-weight: 500;
}
.link-arrow svg { width: 13px; height: 13px; transition: transform 200ms; }
.link-arrow:hover svg { transform: translateX(2px); }
.link-arrow.small { font-size: 11.5px; }

.opps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.gap-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 180ms;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gap-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
  border-color: var(--ink-4);
}
.gap-card.starred {
  background: linear-gradient(180deg, var(--brand-tint) 0%, var(--surface) 60%);
  border-color: rgba(200, 85, 61, 0.3);
}
.gap-card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.gap-rank {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-3);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 500;
}
.gap-band {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 100px;
  letter-spacing: 0.01em;
}
.band-strong { background: var(--sage-soft); color: var(--band-strong); }
.band-good { background: #E0EEDF; color: var(--band-good); }
.band-moderate { background: var(--amber-soft); color: var(--band-mod); }
.band-tight { background: var(--rose-soft); color: var(--band-tight); }

.gap-term {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
}
.gap-product-type {
  font-size: 12px;
  color: var(--ink-3);
}
.gap-product-type span { color: var(--ink-2); font-weight: 500; }
.gap-stats {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--ink-3);
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.gap-stats strong { color: var(--ink); font-weight: 600; font-family: 'JetBrains Mono', monospace; font-size: 12px; }

.gap-foot {
  display: flex; justify-content: space-between; align-items: center;
}
.gap-growth {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
}
.growth-new {
  color: var(--brand);
  background: var(--brand-tint);
  padding: 2px 7px;
  border-radius: 100px;
}
.growth-seen {
  color: var(--ink-3);
  background: var(--bg-2);
  padding: 2px 7px;
  border-radius: 100px;
}
.growth-up { color: var(--band-strong); }
.growth-down { color: var(--band-tight); }

.star-mini {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-4);
  transition: all 160ms;
  border: 1px solid transparent;
}
.star-mini:hover { background: var(--brand-tint); color: var(--brand); border-color: var(--brand-soft); }
.star-mini.on { color: var(--brand); background: var(--brand-tint); }
.star-mini svg { width: 14px; height: 14px; fill: currentColor; }

/* ============================================================
   PAGE HEAD (Trends, Run, Log, Reports, Product)
============================================================ */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.page-sub {
  font-size: 14.5px;
  color: var(--ink-2);
  max-width: 720px;
}
.page-sub strong { color: var(--ink); font-weight: 600; }
.page-actions { display: flex; gap: 8px; align-items: center; }

.muted { color: var(--ink-3); }
.small { font-size: 11.5px; }

/* ============================================================
   TABLE
============================================================ */
.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  text-align: left;
  font-weight: 500;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.data-table thead th.num { text-align: right; }
.data-table thead th.th-rank { width: 48px; }
.data-table tbody tr {
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background 120ms;
}
.data-table tbody tr:last-child { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
}
.data-table .num-cell { text-align: right; font-family: 'JetBrains Mono', monospace; }
.t-rank {
  font-size: 12px;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}
.t-term { font-weight: 500; color: var(--ink); }
.t-term small { color: var(--ink-3); font-weight: 400; font-size: 11.5px; display: block; margin-top: 1px; }
.t-cat {
  display: inline-block;
  font-size: 11.5px;
  background: var(--bg-2);
  color: var(--ink-2);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 500;
}
.t-gap { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; }
.t-gap-num { font-family: 'JetBrains Mono', monospace; font-weight: 500; color: var(--ink-3); font-size: 12px; }
.t-wow-up { color: var(--band-strong); font-weight: 500; }
.t-wow-down { color: var(--band-tight); font-weight: 500; }
.t-wow-flat { color: var(--ink-3); }

.sat-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
}
.sat-track {
  width: 60px;
  height: 5px;
  background: var(--bg-2);
  border-radius: 100px;
  overflow: hidden;
}
.sat-fill { height: 100%; border-radius: 100px; }
.sat-low { background: var(--band-strong); }
.sat-mod { background: var(--band-mod); }
.sat-high { background: var(--band-tight); }

.table-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.table-foot strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   PRODUCT DETAIL
============================================================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 18px;
  transition: color 140ms;
}
.back-link:hover { color: var(--ink); }
.back-link svg { width: 14px; height: 14px; }

.product-hero { margin-bottom: 22px; }
.product-hero-top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.rank-pill {
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}
.ip-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 500;
  background: var(--sage-soft); color: var(--band-strong);
  padding: 4px 9px; border-radius: 100px;
}
.ip-pill svg { width: 12px; height: 12px; }
.ip-pill.flagged { background: var(--rose-soft); color: var(--band-tight); }

.star-btn {
  margin-left: auto;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
  transition: all 160ms;
}
.star-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.star-btn.on { color: var(--brand); background: var(--brand-tint); border-color: var(--brand-soft); }
.star-btn.on svg { fill: currentColor; }
.star-btn svg { width: 16px; height: 16px; }

.product-term {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.05;
  margin-bottom: 10px;
}
.product-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-2);
}
.dot-sep { color: var(--ink-4); }
.pod-pill {
  background: var(--teal-soft);
  color: var(--teal);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 11.5px;
  font-family: 'JetBrains Mono', monospace;
}

/* 5 stat strip */
.p-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-1);
}
.p-stat { padding: 4px 12px; border-right: 1px solid var(--line-soft); }
.p-stat:last-child { border-right: 0; }
.p-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 4px;
}
.p-stat-value {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.p-stat-value .muted { font-size: 13px; color: var(--ink-3); font-weight: 500; }

.p-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-1);
}
.p-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
}
.p-card-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.p-card-aside { display: flex; align-items: center; gap: 6px; }
.wow-pill {
  background: var(--sage-soft);
  color: var(--band-strong);
  font-size: 12px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  padding: 2px 8px;
  border-radius: 100px;
}
.wow-pill.down { background: var(--rose-soft); color: var(--band-tight); }

.trend-chart-wrap { height: 220px; position: relative; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.two-col .p-card { margin-bottom: 0; }

.design-gap {
  background: var(--brand-tint);
  border-left: 3px solid var(--brand);
  padding: 14px 16px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 14px;
}
.design-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.design-tag {
  font-size: 11.5px;
  background: var(--bg-2);
  color: var(--ink-2);
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid var(--line);
}
.design-tag.miss { background: var(--brand-tint); color: var(--brand-deep); border-color: var(--brand-soft); }

.market-rows { display: flex; flex-direction: column; gap: 10px; }
.market-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.market-row-label { font-size: 12.5px; color: var(--ink-3); }
.market-row-val { font-size: 13px; font-weight: 500; color: var(--ink); font-family: 'JetBrains Mono', monospace; }

/* competitors */
.competitors {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.comp {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
  transition: all 160ms;
  cursor: pointer;
}
.comp:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.comp-img {
  aspect-ratio: 1.4;
  background: linear-gradient(135deg, var(--bg-2), var(--line-soft));
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.comp-img svg { width: 38%; height: 38%; opacity: 0.4; }
.comp-price {
  position: absolute; top: 6px; right: 6px;
  background: rgba(255,255,255,0.95);
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid var(--line);
}
.comp-body { padding: 8px 10px; }
.comp-title {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* contact sheet */
.contact-sheet {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.sheet-cell {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--bg-2), var(--line-soft));
  display: grid; place-items: center;
  font-size: 11px;
  color: var(--ink-4);
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid var(--line);
}

/* tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud .chip { cursor: pointer; }
.tag-cloud .chip:hover { background: var(--brand-tint); color: var(--brand-deep); border-color: var(--brand-soft); }

/* NOVA */
.nova-card {
  background: linear-gradient(180deg, #FBF8F2 0%, var(--surface) 100%);
  border-color: var(--teal);
  border-style: solid;
  border-width: 1px;
  position: relative;
  overflow: hidden;
}
.nova-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--c5), var(--brand));
}
.nova-empty { text-align: center; padding: 20px 0; }
.nova-empty p { color: var(--ink-2); max-width: 600px; margin: 0 auto 18px; font-size: 14px; }

.nova-progress { padding: 30px 0; }
.nova-bar {
  height: 8px;
  background: var(--bg-2);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 12px;
}
.nova-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--brand));
  border-radius: 100px;
  width: 0%;
  transition: width 300ms ease;
}
.nova-stage {
  text-align: center;
  font-size: 13px;
  color: var(--ink-2);
  font-family: 'JetBrains Mono', monospace;
}

.nova-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 6px;
}
.nova-field {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.nova-field-wide { grid-column: 1 / -1; }
.nova-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 5px;
}
.nova-val { font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.nova-val.code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: var(--bg);
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--ink-2);
}
.palette { display: flex; gap: 6px; }
.palette-swatch {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  position: relative;
}
.palette-swatch::after {
  content: attr(data-hex);
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-3);
  white-space: nowrap;
}

/* ============================================================
   WIZARD (Run Pipeline)
============================================================ */
.loop-notice {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  background: var(--amber-soft);
  border: 1px solid rgba(200, 146, 58, 0.3);
  border-radius: var(--r-md);
  margin-bottom: 24px;
}
.loop-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(200, 146, 58, 0.2);
  color: var(--amber);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.loop-icon svg { width: 18px; height: 18px; }
.loop-title {
  font-size: 13px;
  font-weight: 600;
  color: #8B6321;
  margin-bottom: 4px;
}
.loop-body p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.loop-body p strong { color: var(--ink); }

.wizard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 8px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-1);
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  border-radius: var(--r-md);
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 160ms;
}
.step:last-child { border-bottom: 0; }
.step:hover { background: var(--surface-2); }
.step-marker {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--ink-3);
  font-size: 13px;
}
.step-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}
.step-desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.step-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.step-state {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--bg-2);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.state-active { background: var(--ink); color: #fff; }
.state-soft { background: var(--bg-2); color: var(--ink-3); }

.step-content { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.dropzone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 2px dashed var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  cursor: pointer;
  transition: all 160ms;
}
.dropzone:hover { border-color: var(--brand); background: var(--brand-tint); }
.dropzone svg { width: 28px; height: 28px; color: var(--brand); flex-shrink: 0; }
.dropzone-text strong { font-size: 14px; display: block; }
.dropzone-text .link { color: var(--brand); font-weight: 500; }
.dropzone-text .small { margin-top: 2px; display: block; }

.step-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }

.handoff-box {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-soft);
  border-radius: var(--r-md);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.handoff-icon {
  width: 32px; height: 32px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.handoff-icon svg { width: 14px; height: 14px; }
.handoff-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-deep);
  margin-bottom: 4px;
}
.handoff-box p { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

.progress-row { margin-top: 14px; display: flex; align-items: center; gap: 12px; }
.progress {
  flex: 1;
  height: 6px;
  background: var(--bg-2);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--sage));
  border-radius: 100px;
}

.run-history {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-1);
}
.rh-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.rh-head h3 { font-size: 16px; font-weight: 600; }

.status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 500;
  padding: 2px 8px;
  border-radius: 100px;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.status-done { background: var(--sage-soft); color: var(--band-strong); }
.status-done::before { background: var(--band-strong); }
.status-warn { background: var(--amber-soft); color: var(--amber); }
.status-warn::before { background: var(--amber); }
.status-err { background: var(--rose-soft); color: var(--rose); }
.status-err::before { background: var(--rose); }

.link-btn { color: var(--brand); font-size: 12.5px; font-weight: 500; }
.link-btn:hover { color: var(--brand-deep); text-decoration: underline; }

/* ============================================================
   LOG
============================================================ */
.log-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.log-row {
  display: grid;
  grid-template-columns: 100px 80px 90px 1fr;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  transition: background 120ms;
  gap: 12px;
}
.log-row:hover { background: var(--surface-2); }
.log-row:last-child { border-bottom: 0; }
.log-time { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--ink-3); }
.log-lvl {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 100px; justify-self: start;
}
.log-lvl::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.lvl-info { background: var(--bg-2); color: var(--ink-2); }
.lvl-info::before { background: var(--ink-3); }
.lvl-success { background: var(--sage-soft); color: var(--band-strong); }
.lvl-success::before { background: var(--band-strong); }
.lvl-warning { background: var(--amber-soft); color: var(--amber); }
.lvl-warning::before { background: var(--amber); }
.lvl-error { background: var(--rose-soft); color: var(--rose); }
.lvl-error::before { background: var(--rose); }
.log-src {
  font-size: 11.5px;
  color: var(--ink-2);
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}
.log-msg { color: var(--ink-2); }
.log-msg strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   REPORTS
============================================================ */
.reports-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.rs-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-1);
}
.rs-label { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
.rs-value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-family: 'JetBrains Mono', monospace; margin-top: 4px; }

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.report-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-1);
  transition: all 200ms;
  display: flex;
  flex-direction: column;
}
.report-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
.report-month {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}
.report-year { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.report-meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--ink-3);
}
.report-meta strong { color: var(--ink); font-weight: 600; font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.report-top {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
}
.report-top-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 500; }
.report-top-term { font-size: 14px; font-weight: 500; color: var(--ink); margin-top: 2px; }
.report-foot {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.report-foot .btn { flex: 1; justify-content: center; }
.report-foot svg { width: 13px; height: 13px; }

/* ============================================================
   STORES + DISTRIBUTION
============================================================ */
.store-scope-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 7px 5px 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-3);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.store-scope-wrap select {
  min-width: 138px; border: 0; outline: 0; background: transparent;
  color: var(--ink); font: 500 12.5px 'Outfit', sans-serif; text-transform: none; letter-spacing: 0;
}
.store-summary {
  display: grid; grid-template-columns: repeat(3, minmax(150px, 220px));
  gap: 12px; margin-bottom: 20px;
}
.store-summary > div {
  display: flex; align-items: baseline; gap: 9px;
  padding: 13px 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-1);
}
.store-summary strong { font: 600 24px 'JetBrains Mono', monospace; color: var(--ink); }
.store-summary span { font-size: 12px; color: var(--ink-3); }
.stores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.store-card {
  padding: 20px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.store-card-head { display: flex; justify-content: space-between; gap: 12px; }
.store-card-head h2 { margin-top: 6px; font-size: 19px; font-weight: 600; }
.store-card-head p { margin-top: 2px; color: var(--ink-3); font-size: 12.5px; }
.store-active { display: flex; align-items: center; gap: 6px; color: var(--band-strong); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.store-active i { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
.store-active.inactive { color: var(--ink-3); }
.store-active.inactive i { background: var(--ink-3); }
.store-niches { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; margin: 17px 0; }
.store-niches span { padding: 5px 9px; border-radius: 100px; background: var(--brand-tint); color: var(--brand-deep); font-size: 11.5px; }
.store-counts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-soft); border-radius: var(--r-sm); overflow: hidden; }
.store-counts > div { padding: 11px 12px; border-right: 1px solid var(--line-soft); }
.store-counts > div:last-child { border-right: 0; }
.store-counts strong, .store-counts span { display: block; }
.store-counts strong { font: 600 18px 'JetBrains Mono', monospace; }
.store-counts span { margin-top: 2px; color: var(--ink-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; }
.store-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.store-card-foot .store-archive { margin-left: auto; color: var(--ink-3); border: 0; background: transparent; cursor: pointer; }
.stores-empty { grid-column: 1 / -1; padding: 54px 24px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.stores-empty h3 { font-size: 18px; }
.stores-empty p { max-width: 560px; margin: 8px auto 18px; color: var(--ink-3); line-height: 1.55; }
.store-modal-card { max-width: 720px; max-height: calc(100vh - 48px); overflow-y: auto; }
.store-form { padding-top: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; }
.form-grid label > span { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.form-grid input {
  width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink); font: 400 13px 'Outfit', sans-serif; outline: none;
}
.form-grid input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.form-grid small { color: var(--ink-3); font-size: 10.5px; }
.form-wide { grid-column: 1 / -1; }
.store-form-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line-soft); }
.active-check { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 13px; }
.review-modal-card { max-width: 760px; max-height: 82vh; overflow: hidden; }
.review-list { max-height: 64vh; overflow-y: auto; }
.review-row { display: grid; grid-template-columns: 62px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.review-row:last-child { border-bottom: 0; }
.review-score { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--amber-soft); color: var(--amber); font: 600 16px 'JetBrains Mono', monospace; }
.review-score small { display: block; font: 500 9px 'Outfit', sans-serif; text-transform: uppercase; }
.review-body strong, .review-body span { display: block; }
.review-body strong { font-size: 14px; }
.review-body span { color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }
.review-body p { color: var(--ink-2); font-size: 12px; margin-top: 6px; }
.review-actions { display: flex; gap: 6px; }
.review-empty { padding: 30px; text-align: center; color: var(--ink-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
   MODAL
============================================================ */
[hidden] { display: none !important; }
.modal {
  position: fixed; inset: 0;
  z-index: 50;
  display: grid; place-items: center;
  padding: 24px;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(27, 24, 21, 0.4);
  backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-xl);
  max-width: 560px;
  width: 100%;
  box-shadow: var(--shadow-4);
  animation: modalIn 200ms ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 18px; font-weight: 600; }
.modal-body { padding: 24px; }
.how-list {
  list-style: none;
  counter-reset: how;
  display: flex; flex-direction: column; gap: 14px;
}
.how-list li {
  counter-increment: how;
  padding-left: 36px;
  position: relative;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
}
.how-list li::before {
  content: counter(how);
  position: absolute;
  left: 0; top: 0;
  width: 24px; height: 24px;
  background: var(--brand-tint);
  color: var(--brand-deep);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.how-list li strong { color: var(--ink); font-weight: 600; }
.how-list li em { color: var(--brand); font-style: normal; font-weight: 500; }

/* ============================================================
   TOAST
============================================================ */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-3);
  z-index: 60;
  opacity: 0;
  transition: all 240ms ease;
  display: flex; align-items: center; gap: 8px;
}
.toast::before {
  content: "✓";
  color: var(--sage);
  font-weight: 700;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .discover-grid { grid-template-columns: 1fr; }
  .plan-card { position: static; }
  .two-col { grid-template-columns: 1fr; }
  .competitors { grid-template-columns: repeat(3, 1fr); }
  .nova-grid { grid-template-columns: 1fr; }
  .p-stats { grid-template-columns: repeat(3, 1fr); }
  .p-stat:nth-child(3) { border-right: 0; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .view { padding: 20px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .p-stats { grid-template-columns: repeat(2, 1fr); }
  .p-stat { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .search { width: 200px; }
  .reports-summary { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 32px; }
  .page-title { font-size: 24px; }
  .product-term { font-size: 28px; }
  .store-scope-wrap span { display: none; }
  .store-scope-wrap select { min-width: 105px; }
  .store-summary { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-wide { grid-column: auto; }
  .review-row { grid-template-columns: 52px 1fr; }
  .review-actions { grid-column: 2; }
}

/* ---- step ka "isse kya milta hai" ---- */
.step-gives{
  margin-top:8px; padding:9px 12px;
  background:var(--surface-2); border:1px solid var(--line-soft);
  border-radius:var(--r-sm);
  font-size:12.5px; line-height:1.55; color:var(--ink-2);
}
.step-gives b{ color:var(--ink); font-weight:600; }

/* ---- "How it works" — numbers ki lughat ---- */
.how-h3{ margin:22px 0 10px; font-size:14px; font-weight:600; }
.how-dl{ display:grid; grid-template-columns:104px 1fr; gap:8px 14px; font-size:13px; }
.how-dl dt{ font-weight:600; color:var(--ink); }
.how-dl dd{ margin:0; color:var(--ink-2); line-height:1.55; }
.how-note{
  margin-top:18px; padding:11px 13px;
  background:var(--brand-tint); border-radius:var(--r-sm);
  font-size:12.5px; line-height:1.55; color:var(--brand-deep);
}
