/* Comp Shop Utility — Marquee Brands */
:root {
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --hairline: #e1e0d9;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --accent-deep: #1c5cab;
  --accent-soft: #cde2fb;
  --navy: #101c33;
  --good: #0ca30c;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15.5px;
  line-height: 1.55;
}

/* ------- chrome ------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--navy);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: #fff; color: var(--navy);
  font-weight: 800; font-size: 14px; letter-spacing: 0.5px;
}
.brand-name { font-weight: 650; letter-spacing: 0.2px; }
nav { display: flex; gap: 6px; }
.nav-link {
  color: #d7dce6; text-decoration: none; font-size: 14px;
  padding: 7px 12px; border-radius: 7px;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.container { max-width: 880px; margin: 0 auto; padding: 36px 24px 80px; }
.container.wide { max-width: 1080px; }

h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.3px; }
h2 { font-size: 17px; margin: 30px 0 10px; }
.sub { color: var(--ink-2); margin: 0 0 26px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

/* ------- forms ------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 16px 0 5px; }
input[type=text], textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--hairline); border-radius: 8px;
  font: inherit; background: #fff; color: var(--ink);
}
input[type=text]:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--accent); color: #fff;
  font: inherit; font-weight: 650; font-size: 15px;
  padding: 12px 22px; border-radius: 8px; margin-top: 22px;
  text-decoration: none;
}
.btn:hover { background: var(--accent-deep); }
.btn.secondary { background: transparent; color: var(--accent-deep); border: 1px solid var(--hairline); }
.btn.secondary:hover { background: var(--accent-soft); }
.btn:disabled { opacity: 0.5; cursor: default; }

.mode-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--hairline);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 18px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex-shrink: 0; }
.dot.off { background: var(--muted); }
.dot.warn { background: #fab219; }

.ai-warn {
  display: none; align-items: flex-start; gap: 8px;
  background: #fdf3dc; border: 1px solid #f0d9a0; color: #6b5410;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px;
}
.ai-warn.show { display: flex; }

/* ------- interview ------- */
.iv-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; gap: 16px; flex-wrap: wrap;
}
.iv-meta { font-size: 14px; color: var(--ink-2); }
.iv-meta strong { color: var(--ink); }

.timer-wrap { display: flex; align-items: center; gap: 12px; }
.timer {
  font-variant-numeric: tabular-nums;
  font-size: 26px; font-weight: 700; letter-spacing: 0.5px;
}
.timer.warn { color: #d03b3b; }
.timer-bar { width: 160px; height: 6px; background: var(--hairline); border-radius: 3px; overflow: hidden; }
.timer-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 1s linear; }
.timer.warn + .timer-bar .timer-fill, .timer-bar.warn .timer-fill { background: #d03b3b; }

.chat {
  display: flex; flex-direction: column; gap: 14px;
  min-height: 300px; max-height: 52vh; overflow-y: auto;
  padding: 4px 2px 12px;
}
.bubble { max-width: 84%; padding: 13px 16px; border-radius: 14px; }
.bubble.q {
  align-self: flex-start; background: var(--surface);
  border: 1px solid var(--border); border-bottom-left-radius: 4px;
}
.bubble.a {
  align-self: flex-end; background: var(--accent); color: #fff;
  border-bottom-right-radius: 4px;
}
.bubble .area-tag {
  display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.7px; color: var(--accent-deep); margin-bottom: 4px;
}
.bubble.thinking { color: var(--muted); font-style: italic; }

.answer-box { margin-top: 14px; }
.answer-box textarea { min-height: 84px; resize: vertical; }
.answer-actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.answer-actions .btn { margin-top: 8px; }
.hint { font-size: 12.5px; color: var(--muted); margin-left: auto; }

.overlay {
  position: fixed; inset: 0; background: rgba(16, 28, 51, 0.55);
  display: none; align-items: center; justify-content: center; z-index: 50;
}
.overlay.show { display: flex; }
.overlay .panel {
  background: #fff; border-radius: 14px; padding: 36px 44px; text-align: center;
  max-width: 420px;
}
.spinner {
  width: 34px; height: 34px; margin: 0 auto 16px;
  border: 4px solid var(--accent-soft); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------- report ------- */
.report-actions { display: flex; gap: 10px; margin-bottom: 20px; }
.report {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 44px 50px;
}
.report .rpt-head { border-bottom: 3px solid var(--navy); padding-bottom: 16px; margin-bottom: 24px; }
.report .rpt-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 4px;
}
.report h1 { font-size: 24px; margin: 0; }
.report .rpt-meta { color: var(--ink-2); font-size: 13.5px; margin-top: 6px; }
.report h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent-deep); margin: 26px 0 8px;
  border-bottom: 1px solid var(--hairline); padding-bottom: 5px;
}
.report p, .report li { font-size: 14.5px; }
.report ul { margin: 6px 0; padding-left: 20px; }

.wl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.wl h3 { font-size: 13.5px; margin: 8px 0 6px; }
.wl.win h3 { color: var(--good); }
.wl.lose h3 { color: #d03b3b; }
.wl ul { list-style: none; padding: 0; margin: 0; }
.wl li { padding: 7px 0; border-bottom: 1px dashed var(--hairline); }
.wl li strong { display: block; }
.wl li span { color: var(--ink-2); font-size: 13.5px; }

.opp {
  border: 1px solid var(--hairline); border-left: 4px solid var(--accent);
  border-radius: 8px; padding: 14px 16px; margin: 10px 0;
  page-break-inside: avoid;
}
.opp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.opp-title { font-weight: 700; font-size: 14.5px; }
.opp p { margin: 6px 0 4px; }
.opp .brands { font-size: 13px; color: var(--ink-2); }
.score { white-space: nowrap; font-size: 13px; letter-spacing: 2px; color: var(--accent); }
.scope-tag {
  display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; padding: 2px 8px; border-radius: 999px; margin-left: 8px;
  vertical-align: 2px;
}
.scope-tag.marquee { background: var(--accent-soft); color: var(--accent-deep); }
.scope-tag.market { background: #eceae4; color: var(--ink-2); }
.score .off { color: var(--hairline); }
blockquote {
  margin: 8px 0; padding: 8px 16px; border-left: 3px solid var(--accent-soft);
  color: var(--ink-2); font-style: italic; font-size: 14px;
}

@media print {
  .topbar, .report-actions, nav { display: none !important; }
  body { background: #fff; }
  .container { padding: 0; max-width: none; }
  .report { border: 0; padding: 10px 6px; }
}

/* ------- dashboard ------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, 1fr); } .wl-grid { grid-template-columns: 1fr; } }
.tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.tile .t-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.tile .t-value { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; }
.tile .t-note { font-size: 12px; color: var(--muted); margin-top: 4px; }

.viz-root { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.viz-title { font-size: 14px; font-weight: 650; margin: 0 0 14px; }
.barlist { display: flex; flex-direction: column; gap: 10px; }
.barrow { display: grid; grid-template-columns: 150px 1fr 46px; align-items: center; gap: 12px; font-size: 13.5px; }
.barrow .b-label { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bartrack { position: relative; height: 18px; }
.barfill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--accent); border-radius: 0 4px 4px 0; min-width: 3px;
}
.barrow .b-val { color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.barrow:hover .barfill { background: var(--accent-deep); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.data th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--ink-2); padding: 10px 14px; border-bottom: 1px solid var(--hairline);
  background: var(--page);
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data a { color: var(--accent-deep); }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }
