/* TrackGPT design tokens — see CLAUDE.md "Design contract" and design_handoff_trackgpt/README.md */
/* Charcoal (--primary) is BOTH the UI chrome and the merchant's data
   identity (charts, receipts, You badges, drill-links): black = you,
   palette hues = rivals, gray = invisible. Purple is retired to the logo
   (user decision 2026-07-16); light purple remains the new-entrant tint. */
:root {
  --brand: #7950f2;
  --brand-dark: #6741d9;
  --brand-light-bg: #f3f0ff;
  --brand-light-border: #d0bfff;
  --brand-highlight: #e5dbff;
  --primary: #2e343b;
  --primary-hover: #454d56;
  --chrome-active-bg: #ececeb;
  --chrome-hover-bg: #f5f5f6;
  --chrome-tint-bg: #f4f4f5;
  --chrome-tint-border: #d6d8db;
  --focus-ring: rgba(46, 52, 59, .16);
  --ink: #202223;
  --ink-secondary: #6d7175;
  --page-bg: #fafafa; /* near-white; white cards float on it (sidebar shares it) */
  --card-border: #eceef0;
  --receipt-bg: #fcfcfd;
  --invisible-gray: #adb5bd;
  --danger: #c92a2a;
  --success: #2b8a3e;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

body { background: var(--page-bg); color: var(--ink); font-size: 13px; }

/* Data voice: all numbers, ranks, prompts, domains, timestamps render mono */
.data { font-family: var(--mono); }

.btn-brand { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-brand:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }

/* The mark SVG carries its own rounded purple tile (brand/README.md) */
.brand-mark { width: 30px; height: 30px; display: inline-flex; flex: none; }
.brand-mark svg { display: block; }

.card { border: none; border-radius: 12px; box-shadow: 0 0 0 1px rgba(20,21,26,.06), 0 1px 2px rgba(20,21,26,.07); }

/* Flash toasts: fixed stack near the bottom — floats over content (never
   pushes it), slides in, auto-fades (toast_controller), dismissable.
   Full-color fills (user decision 2026-07-17): the whole toast is green /
   red / amber for at-a-glance state — white text on top, no accent slivers.
   Classless fallback is neutral charcoal. */
.toast-stack { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 1100;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  width: max-content; max-width: min(92vw, 560px); }
.toast-note { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--primary);
  color: #fff; border: 0; border-radius: 10px;
  box-shadow: 0 4px 14px rgba(20, 21, 26, .08); padding: 9px 12px 9px 14px; font-size: 12.5px;
  animation: toast-in .25s ease; transition: opacity .45s ease, transform .45s ease; }
.toast-note.success { background: var(--success); }
.toast-note.danger { background: var(--danger); }
.toast-note.warning { background: #f08c00; }
.toast-note .flash-dismiss { color: #fff; opacity: .75; }
.toast-note .flash-dismiss:hover { color: #fff; opacity: 1; }
.toast-note.toast-hide { opacity: 0; transform: translateY(10px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.flash-dismiss { border: 0; background: none; color: var(--ink-secondary); opacity: .7; font-size: 15px; line-height: 1; padding: 0 4px; cursor: pointer; flex: none; }
.flash-dismiss:hover { opacity: 1; color: var(--ink); }

.drill-link { color: var(--primary); text-decoration: underline dotted; text-underline-offset: 3px; }
.drill-link:hover { color: #000; }

/* Answer receipt — simplified POC version of the hero component */
.receipt {
  background: var(--receipt-bg); border: 1px solid var(--card-border);
  border-left: 3px solid var(--primary); border-radius: 10px; padding: 14px 16px;
}
.receipt.absent { border-left-color: var(--danger); }
.receipt-meta { font-family: var(--mono); font-size: 11.5px; color: var(--ink-secondary); }
.receipt-body { font-size: 13.5px; line-height: 1.65; color: #303236; white-space: pre-wrap; }
.receipt-body.rendered { white-space: normal; }
.receipt-body.rendered p, .receipt-body.rendered ul, .receipt-body.rendered ol { margin-bottom: .6rem; }
.receipt-body.rendered h1, .receipt-body.rendered h2, .receipt-body.rendered h3, .receipt-body.rendered h4 { font-size: 14px; font-weight: 600; margin: .8rem 0 .4rem; }
.receipt-body mark.you {
  background: #e5e8ec; color: var(--primary); font-weight: 600;
  border-radius: 4px; padding: 1px 5px;
}
.receipt-body mark.rival {
  background: #f1f2f4; color: #495057; border-radius: 4px; padding: 1px 5px;
}

.pill-position {
  font-family: var(--mono); font-size: 11px; border-radius: 999px; padding: 1px 8px;
  background: var(--chrome-tint-bg); color: var(--ink); border: 1px solid var(--chrome-tint-border);
}
.pill-absent { background: #fdf0f0; color: var(--danger); border-color: #f2c4c4; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.completed { background: var(--success); }
.status-dot.failed { background: var(--danger); }
.status-dot.pending, .status-dot.queued, .status-dot.processing { background: #fab005; }

/* Four-state dots (never red for invisible — invisibility is gray) */
.status-dot.state-winning { background: var(--success); }
.status-dot.state-contested { background: #fab005; }
.status-dot.state-losing { background: var(--danger); }
.status-dot.state-invisible, .status-dot.state-none { background: var(--invisible-gray); }

.delta-up { color: var(--success); }
.delta-down { color: var(--danger); }

/* Leaderboard */
.leaderboard-table .num-col { width: 24px; }
.merchant-row { background: #f2f3f5; }
.merchant-row td:first-child { border-radius: 8px 0 0 8px; }
.merchant-row td:last-child { border-radius: 0 8px 8px 0; }
.you-pill { background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 7px; letter-spacing: .3px; }
/* Suggested rivals filling a sparse leaderboard: real numbers, muted voice */
.suggested-row td { color: var(--ink-secondary); }
.suggested-row .favicon-chip, .suggested-row .monogram-chip { opacity: .65; }
.suggested-pill { border: 1px solid var(--chrome-tint-border); color: var(--ink-secondary); font-size: 10px; border-radius: 999px; padding: 1px 7px; }
/* Neutral counterpart for non-merchant callouts (plan badges etc.) — purple stays merchant-only. */
.chrome-pill { background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 7px; letter-spacing: .3px; }
.new-badge { background: var(--brand-light-bg); color: var(--brand-dark); border: 1px solid var(--brand-light-border); font-size: 10px; border-radius: 999px; padding: 1px 7px; }
/* Directory kind on a tracked non-rival (platform/marketplace/…): quiet label, mono data voice. */
.kind-badge { border: 1px solid var(--chrome-tint-border); color: var(--ink-secondary); font-size: 10px; border-radius: 999px; padding: 1px 7px; }
/* The nudge box: informational chrome, no red — a suggestion, not a warning. */
.platform-nudge { border: 1px solid var(--chrome-tint-border); border-radius: 8px; padding: 8px 12px; background: #fafbfc; }
.sov-meter { height: 4px; background: #f1f2f3; border-radius: 2px; margin-top: 4px; max-width: 140px; }
.sov-meter > div { height: 4px; border-radius: 2px; }
.favicon-chip, .monogram-chip { width: 18px; height: 18px; border-radius: 50%; flex: none; }
/* Neutral tint + hairline ring behind favicon art: white-on-transparent
   icons (Barebells — designed for dark browser tabs) rendered invisibly on
   white cards. Colored icons cover the circle, so this only shows through
   transparency. */
.favicon-chip { background: var(--chrome-tint-bg); box-shadow: inset 0 0 0 1px rgba(20, 21, 26, .08); }
.monogram-chip { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }

/* Full-width page (Peec-style: main panel takes the width) */
.page { padding: 20px 24px 32px; width: 100%; }
.page-narrow { max-width: 640px; }

/* Card layout (Peec-style): near-white page, each .panel-section floats as a
   white card; breathing room comes from the outer gutter + gaps between cards. */
.page-bleed { padding: 20px 24px 36px; width: 100%; }
.page-bleed .panel { border-radius: 0; box-shadow: none; background: transparent; display: flex; flex-direction: column; gap: 16px; }

/* Peec-patterned page header (2026-07-16): icon + title in one row at the top
   left of the content area, controls/meta right-aligned, then straight into
   the cards — page titles never get a card of their own. */
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 31px; flex-wrap: wrap; }
.page-head-icon { font-size: 15px; line-height: 1; flex: none; }
.page-head-title { font-size: 17px; font-weight: 700; margin: 0; }
.page-head-meta { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Visibility columns + chats feed (Peec-verbatim overview) */
/* Chart favicons: the standard chip, filling its foreignObject box (sized in
   SVG units by favicon_svg_mark; the wrapper's inline font-size scales the
   monogram glyph with the mark radius). */
.chart-fav { width: 100%; height: 100%; display: flex; }
.chart-fav .favicon-chip, .chart-fav .monogram-chip { width: 100%; height: 100%; font-size: inherit; }
.viz-bar { transition: opacity .12s ease; }
.viz-bar:hover { opacity: .82; stroke: none; }
.cluster { display: inline-flex; align-items: center; }
.cluster-chip { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #fff; margin-right: -5px; background: #fff; }
.cluster-chip.monogram { display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; }
.cluster-more { font-size: 11px; color: var(--ink-secondary); margin-left: 9px; }
.chat-row { cursor: pointer; }
.chat-row:hover { background: #fafafb; }
.chat-snippet { max-width: 560px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }

/* Stat cards / strip (Peec: label over big mono number) */
.stat-label { font-size: 12px; color: var(--ink-secondary); }
.stat-value { font-size: 22px; font-weight: 600; margin-top: 2px; }
.stat-value .stat-sub { font-size: 12px; color: var(--ink-secondary); font-weight: 400; margin-left: 6px; }
.stat-delta { font-size: 12px; font-weight: 400; margin-left: 8px; }
.model-tag { font-family: var(--mono); font-size: 9.5px; font-weight: 600; color: var(--ink-secondary); border: 1px solid #e6e7ea; border-radius: 4px; padding: 0 4px; flex: none; }
.model-fav { width: 16px; height: 16px; border-radius: 4px; flex: none; }
.fanout-row .model-fav { margin-right: 8px; }
.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link:hover { color: var(--ink); }
.stat-strip .row { align-items: stretch; }
.stat-cell { padding: 2px 20px; }
.stat-cell + .stat-cell { border-left: 1px solid #f1f2f3; }
.stat-cell:first-child { padding-left: 0; }

/* Prompts page: topics as a chip bar above the table + summary strip */
.topics-bar { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.topics-head { font-size: 11px; font-weight: 600; color: var(--ink-secondary); text-transform: uppercase; letter-spacing: .3px; align-self: center; }
/* Chips clamp to one row; the "…" toggle (clamp controller) expands them. */
.topics-list { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.topics-list.clamped { max-height: 28px; overflow: hidden; }
.topics-more { border: 0; background: none; color: var(--ink-secondary); font-size: 13px; line-height: 1;
  padding: 5px 8px; border-radius: 999px; cursor: pointer; flex: none; }
.topics-more:hover { background: var(--chrome-hover-bg); color: var(--ink); }
.topic-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e6e7ea; border-radius: 999px; padding: 3px 11px; font-size: 12px; background: #fff; color: inherit; text-decoration: none; }
.topic-chip.active { background: #f5f5f6; font-weight: 600; }
a.topic-chip:hover { border-color: #c9cccf; background: var(--chrome-hover-bg); color: var(--ink); }
/* Suggested tab (Prompts page): same topic rail + disclosure panels as the
   onboarding picker, but rows track instantly — a phrase with a "+ Track"
   button streamed away on click — instead of checking boxes. */
.prompt-track { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding: 2px 9px; border-radius: 7px; }
.prompt-track:hover { background: #f7f7f9; }
/* Slim track affordance: every inline "+ Track" button sits inside its
   content row (~22px tall) instead of inflating it. */
.btn.btn-track { padding: 1px 9px; font-size: 11.5px; line-height: 1.6; border-radius: 6px; flex: none; white-space: nowrap; }
/* Search: the magnifier is a real submit button capping the input's right
   end (user decision 2026-07-18) — same attached-cap language as | + ). */
.prompt-search { width: 220px; display: flex; align-items: stretch; }
.prompt-search input { flex: 1; min-width: 0; border-radius: 10px 0 0 10px; border-right: 0; }
.search-btn { width: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 1px solid #dee2e6; border-radius: 0 10px 10px 0; background: #fff;
  color: var(--ink-secondary); cursor: pointer; }
.search-btn:hover { color: var(--ink); background: var(--chrome-hover-bg); }
.summary-strip { white-space: nowrap; }
.prompts-table td { vertical-align: middle; }
/* Legibility floor (user decision 2026-07-18): table data never drops below
   the 13px body size — .small is for chrome and metadata, not data cells
   (13px base × .small × dense mono was compounding to ~10px reading size).
   Headers run 12px, overriding the .small on their tr. */
.prompts-table td, .chats-table td, .leaderboard-table td { font-size: 13px; }
.prompts-table thead th, .chats-table thead th, .leaderboard-table thead th { font-size: 12px; }
.prompt-cell { max-width: 420px; }

/* Fanouts: query groups + type badge */
.fanout-group { margin-bottom: 18px; }
.fanout-group-head { display: flex; align-items: center; gap: 8px; background: #f8f8f9; border: 1px solid #f1f2f3; border-radius: 8px 8px 0 0; padding: 8px 12px; font-size: 12.5px; }
.fanout-group + .fanout-group { margin-top: 4px; }
.type-badge { border: 1px solid #e3e4e8; border-radius: 6px; padding: 1px 8px; font-size: 11px; color: var(--ink-secondary); }

/* Inline citation chips inside answers (Peec pattern) */
.citation-chip { display: inline-flex; align-items: center; gap: 5px; background: #f1f2f4; border-radius: 999px; padding: 1px 9px 1px 5px; font-size: 11px; font-family: var(--mono); color: var(--ink-secondary); text-decoration: none; vertical-align: text-bottom; margin: 0 2px; max-width: 220px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.citation-chip:hover { background: #e7e8ea; color: var(--ink); }
.citation-fav { width: 13px; height: 13px; border-radius: 3px; flex: none; }

/* Chat detail modal (Peec pattern): main column + Details rail */
.chat-modal-backdrop { position: fixed; inset: 0; background: rgba(20, 21, 26, .45); z-index: 1050; display: flex; align-items: center; justify-content: center; padding: 24px; }
.chat-modal { background: #fff; border-radius: 12px; box-shadow: 0 24px 64px rgba(20, 21, 26, .3); width: min(880px, 100%); max-height: 88vh; display: flex; overflow: hidden; }
.chat-modal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-modal-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #f1f2f3; }
.chat-modal-close { border: none; background: transparent; color: var(--ink-secondary); font-size: 14px; line-height: 1; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.chat-modal-close:hover { background: #f1f2f3; color: var(--ink); }
.chat-modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.chat-question-row { display: flex; align-items: flex-start; justify-content: flex-end; gap: 10px; margin-bottom: 16px; }
.chat-question-bubble { background: #f5f5f6; border-radius: 14px; padding: 8px 14px; font-size: 13px; max-width: 80%; }
.chat-question-avatar { width: 26px; height: 26px; border-radius: 50%; background: #e9ecef; color: var(--ink-secondary); font-size: 10px; display: grid; place-items: center; flex: none; }
.chat-modal-foot { display: flex; align-items: center; padding: 10px 16px; border-top: 1px solid #f1f2f3; }
.chat-modal-rail { width: 250px; flex: none; border-left: 1px solid #f1f2f3; padding: 16px; overflow-y: auto; background: #fcfcfd; }
.rail-section-head { font-size: 11px; font-weight: 600; color: var(--ink-secondary); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 8px; }
.rail-brand-row { display: flex; align-items: center; gap: 8px; }
.rail-source { display: block; text-decoration: none; color: inherit; border-radius: 8px; padding: 6px 8px; margin: 0 -8px; }
.rail-source:hover { background: #f1f2f4; }
.rail-source-title { line-height: 1.3; }
.rail-source-host { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.rail-favicon { width: 12px; height: 12px; border-radius: 3px; }
@media (max-width: 767px) { .chat-modal-rail { display: none; } }

/* Row ⋯ action menu + excluded-brand chips */
.menu-col { width: 36px; }
.row-menu { border: none; background: transparent; color: var(--ink-secondary); font-size: 14px; line-height: 1; padding: 2px 8px; border-radius: 6px; cursor: pointer; }
.row-menu:hover { background: #f1f2f3; color: var(--ink); }
.dropdown-menu { font-size: 13px; border-color: #e6e7ea; box-shadow: 0 8px 24px rgba(20, 21, 26, .12); }
.excluded-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e6e7ea; border-radius: 999px; padding: 3px 6px 3px 5px; font-size: 12.5px; background: #fff; }
.excluded-chip .favicon-chip, .excluded-chip .monogram-chip { width: 16px; height: 16px; font-size: 8px; }
.excluded-chip form { display: inline; }
.excluded-remove { border: none; background: transparent; color: var(--ink-secondary); font-size: 11px; padding: 1px 6px; border-radius: 999px; cursor: pointer; }
.excluded-remove:hover { background: #f1f2f3; color: #c92a2a; }
/* Bare icon row action (archive trash bin etc.) — no button chrome, red on
   hover like the ✕ chips. */
.icon-action { border: none; background: transparent; color: var(--ink-secondary); padding: 3px 7px; border-radius: 7px; cursor: pointer; line-height: 1; }
.icon-action:hover { background: #f1f2f3; color: var(--danger); }
/* Suggested tab's track affordance: green arrow, greener on hover */
.icon-action.track-action { color: var(--success); }
.icon-action.track-action:hover { background: #e6f4ea; color: var(--success); }

/* Prompt meta strip status pill */
.status-pill { border-radius: 6px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.status-pill.status-active { background: #ebfbee; color: #2b8a3e; }
.status-pill.status-archived { background: #f1f2f3; color: var(--ink-secondary); }

/* Chart */
/* Taller viewBox fills the card column beside Top 7 Brands; the cap keeps it
   sane when the columns stack below the xl breakpoint. */
/* Cap by WIDTH, not height: with width:100% + a max-height clamp, wide cards
   made the svg element wider than its meet-fitted drawing — phantom side
   gutters (~180px/side at 1100px) that read as the chart not fitting its
   card. A width cap keeps the element box equal to the drawing at any size
   (~240px tall at the 400px cap — user decision 2026-07-18). */
.sov-chart { width: 100%; max-width: 500px; height: auto; display: block; margin: 0 auto; } /* 500 (was 400), user-tuned 2026-07-18 */
/* Honest-stats footer (sample count stays visible per CLAUDE.md), pinned to
   the card bottom so the chart column fills its height like Peec's card. */
.chart-foot { font-size: 11px; color: var(--ink-secondary); padding-top: 8px; margin-top: auto; }
.chart-grid { stroke: #e9ebee; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-grid.baseline { stroke: #d7dade; stroke-dasharray: none; }
/* Sized in viewBox units: the 700-wide SVG renders at roughly 60% in the
   card, so ~16 here ≈ 10px on screen — 10/11 was coming out ~6px. */
.chart-axis { font-family: var(--mono); font-size: 16px; fill: #8a8f98; }
/* Direct value labels above the bars — data voice; charcoal bold = you. */
.chart-value { font-family: var(--mono); font-size: 16px; fill: #495057; }
.chart-value.merchant { fill: var(--primary); font-weight: 700; }

/* Dismiss on suggested-brand rows: the quiet "not a competitor" verdict. */
.suggest-dismiss { border: none; background: none; color: var(--ink-secondary); font-size: 12px;
  line-height: 1; padding: 2px 5px; cursor: pointer; border-radius: 6px; }
.suggest-dismiss:hover { color: var(--danger); background: #fdf0f0; }

/* Suggestion cards (Competitors tab, user decision 2026-07-18): a bare +
   tracks, the ✕ hangs off the top-left corner like a removable badge. */
.competitor-suggest { position: relative; }
/* | + ) — track is the card's full-height end cap: hairline divider, then
   the + fills the rounded right edge (user decision 2026-07-18). */
.suggest-track-form { align-self: stretch; display: flex; flex: none; }
.suggest-track { width: 34px; padding: 0; border: none;
  border-radius: 0 8px 8px 0; background: none; color: var(--ink-secondary);
  font-size: 16px; font-weight: 600; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.suggest-track:hover { color: var(--ink); background: var(--chrome-hover-bg); }
.suggest-badge-anchor { position: absolute; top: -7px; left: -7px; z-index: 1;
  /* Hover-reveal (user decision 2026-07-18): the dismiss verdict appears
     when the card is engaged — keyboard focus reveals it too. */
  opacity: 0; transition: opacity .12s ease; }
.competitor-suggest:hover .suggest-badge-anchor,
.suggest-badge-anchor:focus-within { opacity: 1; }
.suggest-dismiss-badge { width: 18px; height: 18px; border-radius: 50%; padding: 0;
  border: 1px solid var(--chrome-tint-border); background: #fff; color: var(--ink-secondary);
  font-size: 10px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 1px 2px rgba(20, 21, 26, .08); }
.suggest-dismiss-badge:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.chart-end-label { font-family: var(--mono); font-size: 17px; }
.chart-end-label.merchant { font-weight: 700; }
.legend-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--card-border); border-radius: 999px; padding: 2px 10px; font-size: 12px; background: #fff; cursor: pointer; transition: opacity .15s ease; }
.legend-pill:hover { background: #f7f7f9; }
.legend-pill.dimmed { opacity: .4; }
.legend-swatch { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
/* Favicon in the legend pill (2026-07-18) — smaller than the table chips */
.legend-pill .favicon-chip, .legend-pill .monogram-chip { width: 14px; height: 14px; }
.legend-pill .monogram-chip { font-size: 8px; }
.chart-series { transition: opacity .15s ease; }
.chart-point { cursor: pointer; }
.chart-point:hover { stroke: #fff; stroke-width: 1.5; }
.chart-tooltip { position: absolute; display: none; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 6px; pointer-events: none; white-space: nowrap; z-index: 10; }

/* Prompt list */
.prompt-group-header { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .5px; color: var(--ink-secondary); background: #fafbfb; padding: 6px 10px; border-radius: 6px; margin: 10px 0 2px; }
.prompt-row { display: grid; grid-template-columns: minmax(0,5fr) 180px 96px minmax(0,3fr) 110px; gap: 12px; align-items: center; padding: 10px; border-bottom: 1px solid #f1f2f3; text-decoration: none; color: inherit; border-radius: 8px; }
.prompt-row:hover { background: #fafafb; }
.recent-chat-row { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; border-radius: 6px; text-decoration: none; color: inherit; }
.recent-chat-row:hover { background: #fafafb; }
.prompt-you { display: flex; align-items: center; gap: 8px; }
/* Inline prompt-owner badge (replaced the two-line .invisible-note,
   2026-07-18): gray voice — invisibility has a color, never red. */
.owner-badge { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  border: 1px solid var(--chrome-tint-border); color: var(--ink-secondary);
  font-size: 10.5px; border-radius: 999px; padding: 1px 8px; flex: none; }
.sparkline { display: block; }

/* App shell: left sidebar (Peec-patterned IA) + scrollable main */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 216px; flex: none; background: #fff; border-right: 1px solid #ececea; display: flex; flex-direction: column; padding: 16px 12px; position: sticky; top: 0; height: 100vh; transition: width .15s ease; }
.app-main { flex: 1; min-width: 0; background: transparent; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; }
.sidebar-brand-sub { font-size: 11px; color: var(--ink-secondary); max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-secondary); text-decoration: none; white-space: nowrap; }
/* Button variant (sign out): same rail-link look, reset the native button. */
button.side-link { width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; font-family: inherit; }
.sidebar-signout { width: 100%; }
.side-link:hover { background: #ededec; color: var(--ink); }
.side-link.active { background: var(--chrome-active-bg); color: var(--ink); }
.side-icon { width: 18px; text-align: center; font-size: 13px; flex: none; }
.sidebar-bottom { margin-top: auto; }

/* Collapse control + icon-only rail */
.sidebar-toggle { margin-left: auto; border: none; background: transparent; color: var(--ink-secondary); width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; cursor: pointer; }
.sidebar-toggle:hover { background: #ededec; color: var(--ink); }
.sidebar-toggle .chevron { font-size: 15px; line-height: 1; transition: transform .15s ease; }
.sidebar.collapsed { width: 64px; padding: 16px 10px; }
.sidebar.collapsed .side-label { display: none; }
.sidebar.collapsed .sidebar-brand { flex-direction: column; gap: 8px; padding: 2px 0 14px; }
.sidebar.collapsed .sidebar-toggle { margin-left: 0; }
.sidebar.collapsed .sidebar-toggle .chevron { transform: rotate(180deg); }
.sidebar.collapsed .side-link { justify-content: center; padding: 8px; }
/* Collapsed-rail labels. CSS :hover, deliberately not title attributes —
   native title tooltips orphan on screen when the pointer crosses the admin
   iframe boundary before they dismiss; :hover state can't. */
.sidebar.collapsed .side-link { position: relative; }
.sidebar.collapsed .side-link:hover::after { content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 30; }

@media (max-width: 767px) {
  .app-shell { flex-direction: column; }
  .sidebar, .sidebar.collapsed { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; border-right: none; border-bottom: 1px solid var(--card-border); }
  .sidebar-toggle { display: none; }
  .sidebar.collapsed .side-label { display: revert; }
  .sidebar.collapsed .sidebar-brand { flex-direction: row; }
  .sidebar.collapsed .side-link { justify-content: flex-start; padding: 8px 10px; }
  .sidebar-brand { padding: 0; }
  .sidebar-brand-sub { display: none; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; }
  .sidebar-bottom { margin: 0 0 0 auto; display: flex; align-items: center; }
  .sidebar-signout { width: auto; }
}

/* Sections as cards: white on the near-white page, subtle ring + shadow */
.panel { background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px rgba(20,21,26,.06), 0 1px 2px rgba(20,21,26,.07); }
.panel-section { padding: 20px 22px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px rgba(20,21,26,.05), 0 1px 2px rgba(20,21,26,.04); }
/* Plan tier cards (Settings) */
/* Roomy cards (user decision 2026-07-18: ~50% taller, let things breathe) */
.plan-card { background: #fff; border: 1px solid #e6e7ea; border-radius: 10px; padding: 26px 24px; height: 100%; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(20, 21, 26, .05); }
.plan-card.current { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.plan-price { font-size: 22px; font-weight: 600; margin: 12px 0 8px; }
.plan-features { list-style: none; padding: 0; margin: 12px 0 22px; display: flex; flex-direction: column; gap: 10px; }
/* The cliché SaaS checkmark on every feature line (same device as .contact-benefit) */
.plan-features li { position: relative; padding-left: 1.5em; }
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.plan-card form { margin-top: auto; }

.suggestion-chip { border: 1px solid var(--chrome-tint-border); background: var(--chrome-tint-bg); color: var(--ink); border-radius: 999px; padding: 2px 10px; font-size: 11.5px; cursor: pointer; }
.suggestion-chip:hover { background: var(--chrome-active-bg); }
.text-brand { color: var(--ink); }

.fanout-row { display: flex; align-items: baseline; gap: 10px; font-size: 12.5px; padding: 4px 8px; border-radius: 6px; }
.fanout-row:nth-child(odd) { background: #fafbfb; }

/* Insight box */
.insight-box { background: #f7f7f9; border: 1px solid #e6e7ea; border-radius: 10px; padding: 12px 16px; font-size: 13px; }

/* Segmented control */
.segmented { display: inline-flex; border: 1px solid #c9cccf; border-radius: 8px; overflow: hidden; }

/* Icon-pair toggle (chart mode switch, Peec-style) */
.icon-toggle { display: inline-flex; border: 1px solid #e3e4e8; border-radius: 8px; overflow: hidden; background: #fff; }
.icon-btn { display: grid; place-items: center; width: 30px; height: 26px; border: none; background: #fff; color: #9aa0a6; cursor: pointer; border-right: 1px solid #eef0f2; }
.icon-btn:last-child { border-right: none; }
.icon-btn:hover { background: #f7f7f9; color: var(--ink-secondary); }
.icon-btn.active { background: var(--chrome-active-bg); color: var(--ink); }
.segment { padding: 5px 12px; font-size: 12px; font-weight: 600; color: var(--ink-secondary); text-decoration: none; background: #fff; border-right: 1px solid #e3e4e8; display: inline-flex; align-items: center; gap: 5px; }
.segment:last-child { border-right: none; }
.segment.active { background: var(--chrome-active-bg); color: var(--ink); }
.segment:hover { background: #f7f7f9; }

/* Onboarding wizard (Peec-patterned spike): chrome-free single column. */
/* Full-width like the app proper (.page-bleed has no cap either) — the
   wizard is the same product surface, so it gets the same canvas. Was a
   centered 760px column, then 1140; widened to match the app 2026-07-15. */
.onboarding { width: 100%; margin: 0 auto; padding: 28px 32px 60px; }
/* Header shares the card's 820px column so lockup and stepper line up with
   its edges (user decision 2026-07-18). */
.onboarding-head { display: flex; align-items: center; justify-content: space-between;
  max-width: 820px; margin: 0 auto 24px; }
.brand-lockup { display: inline-flex; flex: none; }
.brand-lockup svg { display: block; height: 40px; width: auto; }
.onboarding-steps { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--ink-secondary); }
.onboarding-steps li { display: flex; align-items: center; gap: 7px; }
.onboarding-steps .step-num { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #d4d5da; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.onboarding-steps li.active { color: var(--ink); font-weight: 600; }
.onboarding-steps li.active .step-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.onboarding-steps li.done .step-num { background: var(--chrome-tint-bg); border-color: var(--chrome-tint-border); color: var(--ink); }
/* Reached steps render as links (same layout as the inert li content) */
.onboarding-steps a { display: flex; align-items: center; gap: 7px; color: inherit; text-decoration: none; }
.onboarding-steps a:hover { color: var(--ink); }
.onboarding-steps a:hover .step-num { border-color: var(--primary); }
/* Single-focus flow: every step's card caps and centers so wide screens
   don't smear it full-bleed (user decision 2026-07-18). */
.onboarding-card { padding: 28px; max-width: 820px; margin-inline: auto; }
.onboarding-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.store-facts { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-secondary); background: #f7f7f9; border: 1px solid #e6e7ea; border-radius: 8px; padding: 9px 13px; margin-bottom: 20px; }
/* Each topic renders as its own bordered card so groups read separately. */
.onboarding-topic { margin-top: 14px; background: #fff; border: 1px solid var(--card-border); border-radius: 10px; padding: 14px 16px; }
.topic-head { display: flex; align-items: center; gap: 10px; }
.topic-count { font-size: 11.5px; color: var(--ink-secondary); }
.topic-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-secondary); }
.topic-toggle { display: flex; align-items: center; cursor: pointer; }
.topic-toggle input { accent-color: var(--primary); }
/* Label + count + chevron form one disclosure; the master checkbox to its
   left stays a separate hit target. First topic open, the rest collapsed. */
.topic-disclosure { flex: 1; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left; color: inherit; }
/* Chevron hugs the topic name (user decision 2026-07-18) instead of sitting
   at the row's far end next to "track all"; the button still spans the row
   as the click target. */
.topic-disclosure .topic-label { flex: none; }
.topic-disclosure:hover .topic-label, .topic-disclosure:hover .topic-chevron { color: var(--ink); border-color: var(--ink); }
.topic-chevron { flex: none; width: 7px; height: 7px; border-right: 2px solid var(--ink-secondary); border-bottom: 2px solid var(--ink-secondary); transform: rotate(-45deg); transition: transform .15s ease; }
.topic-open .topic-chevron { transform: rotate(45deg); }
/* One prompt per line (Peec rows), not a multi-column grid — a prompt reads
   as a sentence, and the full-width row gives its checkbox a big hit target.
   [hidden] must beat the display:grid below. */
.prompt-grid { display: grid; grid-template-columns: 1fr; gap: 4px; margin-top: 10px; }
.prompt-grid[hidden] { display: none; }
.prompt-check { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 6px 9px; border-radius: 7px; cursor: pointer; border: 1px solid transparent; }
.prompt-check:hover { background: #f7f7f9; }
.prompt-check input { accent-color: var(--primary); }
/* Checked state is visible on the row itself, not just the 13px checkbox. */
.prompt-check:has(input:checked) { background: var(--chrome-tint-bg); border-color: var(--chrome-tint-border); }

/* Section label above the lazily-loaded suggestion list. */
.suggestions-heading { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-secondary); margin: 22px 0 2px; }

/* Prompts step, compact top fold: headline + limit left, live count +
   Continue right; below it the thin "add your own" bar sits directly on the
   suggestions (prompt strings are data — the bar and its chips run mono). */
.step-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
/* The merchant identity plate (steps 2-5): favicon or charcoal monogram,
   name + mono domain — charcoal = you, everywhere. 40px, not 64 (user
   decision 2026-07-18): the hit-rate batch showed most sites cap at
   32-48px favicon art, which upscales to mush at 64 — at 40 the common
   art stays crisp and mined SVG/apple-touch icons still shine. */
.brand-plate { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
/* Step header lockup (all plate-bearing steps, user decision 2026-07-18):
   identity left, the step's header + subtext beside it, hairline between. */
.step-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; flex-wrap: wrap; }
.step-head .brand-plate { margin-bottom: 0; padding-right: 18px; border-right: 1px solid var(--card-border); }
.step-head .step-topbar { margin-bottom: 0; flex: 1; }
.brand-plate .favicon-chip, .brand-plate .monogram-chip { width: 40px; height: 40px;
  border-radius: 10px; font-size: 19px; }
.brand-plate-name { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.brand-plate-domain { font-size: 12.5px; color: var(--ink-secondary); }
/* margin-left:auto keeps the CTA pinned right even when a long title forces
   the row to wrap (the wrapped row would otherwise left-align it). */
.step-topbar-cta { display: flex; align-items: center; gap: 12px; margin-left: auto; }
/* One tidy row: input grows, + add sits beside it, chips wrap below. */
.prompt-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.prompt-bar-input { flex: 1 1 260px; border: 1px solid var(--card-border); border-radius: 10px; padding: 8px 17px;
  font-size: 12.5px; font-family: var(--mono); background: #fff; }
.prompt-bar-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.prompt-bar-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; flex-basis: 100%; }
.prompt-bar-chips:empty { display: none; }
.prompt-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--chrome-tint-border);
  background: var(--chrome-tint-bg); color: var(--ink); border-radius: 999px; padding: 3px 6px 3px 12px; font-size: 12px; }
.prompt-chip-x { border: 0; background: none; color: var(--ink-secondary); cursor: pointer; font-size: 11px;
  line-height: 1; padding: 3px 5px; border-radius: 50%; }
.prompt-chip-x:hover { background: #fff; }

/* Prompts step, Peec layout: topic rail (left) filters topic panels (right).
   Rail rows carry live selected/total counts; panels are the old topic cards
   minus the disclosure — filtering replaced collapsing. */
.prompt-topics { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 12px; }
.topic-rail { display: flex; flex-direction: column; gap: 3px; position: sticky; top: 12px; }
.topic-tab { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left;
  background: none; border: 1px solid transparent; border-radius: 8px; padding: 7px 11px; font-size: 13px;
  color: var(--ink-secondary); cursor: pointer; }
.topic-tab:hover { background: #f7f7f9; }
.topic-tab.active { background: var(--chrome-active-bg); border-color: transparent; color: var(--ink); font-weight: 600; }
/* Labels wrap rather than truncate — a topic name should always be readable
   in full; the count keeps its slot on the right. */
.topic-tab-label { min-width: 0; overflow-wrap: break-word; }
.topic-tab-count { font-size: 11px; flex: none; }
.topic-panels { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.topic-panel { background: #fff; border: 1px solid var(--card-border); border-radius: 10px; padding: 14px 16px; }
@media (max-width: 640px) {
  .prompt-topics { grid-template-columns: 1fr; }
  .topic-rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .topic-tab { width: auto; }
}
/* Progress bar (shared/paced_progress): our one loading indicator — a paced
   bar with staged copy, never a circular spinner or an endlessly-looping bar. */
.suggestions-progress { padding: 26px 0 18px; max-width: 560px; }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-track { flex: 1; height: 8px; border-radius: 999px; background: #f1f2f4; overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 999px; background: var(--primary); transition: width .25s linear; }
.progress-pct { font-size: 11.5px; color: var(--ink-secondary); min-width: 34px; text-align: right; }
.progress-stage { font-size: 12.5px; margin-top: 8px; }

/* Plan-usage ring (usage_ring helper): the circular gauge on every "x / y"
   quota counter — not a spinner; its fill is real usage, teal → amber → red. */
.usage-ring { display: inline-flex; vertical-align: -2px; }
.usage-ring svg { width: 14px; height: 14px; display: block; }
.usage-ring-track { stroke: #e8eaed; }

/* Competitors step: investigation results (profile + suggested rivals). */
/* Competitors up front; the generated brand profile sits below a divider. */
.investigation-profile { border-top: 1px solid var(--card-border); margin-top: 18px; padding-top: 16px; }

/* Profile step, dossier treatment (user decision 2026-07-18): labels are
   quiet uppercase micro-captions, the DRAFTED FACTS carry the visual
   weight — one glance reads what we learned, not what we're asking. Edit
   stays collapsed behind a pencil; the customers block splits off with the
   same divider the profile itself uses. */
.investigation-profile { max-width: 620px; }
.profile-section-title { font-size: 13px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink); margin-bottom: 8px; }
.profile-fact { font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.profile-section-split { border-top: 1px solid var(--card-border); margin-top: 18px; padding-top: 16px; }
/* Categories: what's IN reads at a glance — selected chips take a soft gray
   fill (user tuned down from solid charcoal 2026-07-18), leaving the dashed
   + Add as the only outline. Scoped here so the preview step's competitor
   picker keeps its tinted checked state. */
.category-chips .btn-check:checked + .select-chip { background: #e9ecef; border-color: #e9ecef; color: var(--ink); }
.category-chips .btn-check:checked + .select-chip::before { color: var(--ink); }
.edit-toggle-display { display: flex; align-items: baseline; gap: 8px; }
.edit-pencil { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #c9cbd1;
  border-radius: 999px; padding: 3px 11px; font-size: 12.5px; line-height: normal;
  background: #fff; color: var(--ink-secondary); cursor: pointer; white-space: nowrap; }
.edit-pencil:hover { border-color: var(--primary); color: var(--ink); background: var(--chrome-hover-bg); }
.edit-actions { display: flex; justify-content: flex-start; gap: 8px; margin-top: 6px; }
.edit-actions button { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px;
  padding: 4px 13px; font-size: 12.5px; font-weight: 600; line-height: normal; cursor: pointer; }
/* Affordances (WCAG AA on white): confirm = brand primary, cancel = outlined red. */
.edit-confirm { border: 1px solid var(--primary); background: var(--primary); color: #fff; }
.edit-confirm:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.edit-cancel { border: 1px solid #dc3545; background: #fff; color: #b02a37; }
.edit-cancel:hover { background: #fdf1f2; color: #842029; }
.edit-pencil:focus-visible, .edit-actions button:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px; }
.competitor-choice { display: inline-flex; align-items: center; gap: 1px; }
.competitor-choice .favicon-chip, .competitor-choice .monogram-chip { width: 16px; height: 16px; font-size: 9px; }

/* Selectable chip pattern (Peec-style pills): suggested items render as
   toggle pills — "+" to pick up, "✓" once picked — with an inline "+ Add"
   affordance at the end of every list (chip-list controller). Used for
   wizard competitors, categories, and the preview step's rival picker. */
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.select-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e3e4e8; border-radius: 999px;
  padding: 4px 13px; font-size: 12.5px; background: #fff; cursor: pointer; user-select: none;
  transition: border-color .12s, background .12s; margin: 0; }
.select-chip::before { content: "+"; font-weight: 600; color: var(--invisible-gray); line-height: 1; }
.select-chip:hover { border-color: #c9cccf; background: var(--chrome-hover-bg); }
.btn-check:checked + .select-chip { background: var(--chrome-tint-bg); border-color: var(--primary); color: var(--ink); font-weight: 600; }
.btn-check:checked + .select-chip::before { content: "\2713"; color: var(--primary); }
.btn-check:focus-visible + .select-chip { outline: 2px solid var(--primary); outline-offset: 1px; }
.select-chip .favicon-chip, .select-chip .monogram-chip { width: 15px; height: 15px; font-size: 8px; }
.chip-add { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed #c9cbd1; border-radius: 10px;
  padding: 4px 13px; font-size: 12.5px; background: transparent; color: var(--ink-secondary); cursor: pointer; line-height: normal; }
.chip-add:hover { border-color: var(--primary); color: var(--ink); background: var(--chrome-hover-bg); }
/* Suggested tab's per-topic "track all": green like the row checkmarks */
.chip-add.track-all { color: var(--success); border-color: #b9dfc4; font-size: 11.5px; padding: 3px 11px; display: inline-flex; align-items: center; gap: 5px; }
.chip-add.track-all:hover { border-color: var(--success); color: var(--success); background: #e6f4ea; }
/* The + add sitting after a prompt input matches its height (2026-07-18). */
.prompt-bar-input + .chip-add, .prompt-bar-input ~ .chip-add { padding: 8px 15px; }
.chip-add-input { border: 1px solid var(--primary); border-radius: 10px; padding: 3px 13px; font-size: 12.5px;
  width: 170px; outline: none; background: #fff; }

/* Competitors tab: brand identity is the content here, so favicons run ~50%
   larger than the app-wide 18px chips (user decision 2026-07-17). */
#competitors_panel .favicon-chip, #competitors_panel .monogram-chip { width: 27px; height: 27px; }
#competitors_panel .monogram-chip { font-size: 14px; }

/* Competitors tab: suggestion grid (untracked prominent brands). */
.competitor-suggest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.competitor-suggest { display: flex; align-items: center; gap: 10px; border: 1px solid var(--card-border); border-radius: 9px; padding: 0; }
.competitor-suggest .suggest-name { flex: 1; min-width: 0; padding: 8px 0 8px 10px; }
.competitor-suggest .suggest-meta { font-size: 11px; white-space: nowrap; }
/* Only the brand name flexes — the % and the track button never shrink or
   truncate. */
.competitor-suggest form, .flex-none { flex: none; }
.min-w-0 { min-width: 0; }

/* ↗ homepage link-out (leaderboard brand names, competitor chips). */
.homepage-link { color: var(--invisible-gray); text-decoration: none; font-size: 12px; line-height: 1; padding: 2px 4px; border-radius: 5px; }
.homepage-link:hover { color: var(--ink); background: var(--chrome-active-bg); }

/* Continue row: live selection count beside the button. */
/* Forward actions sit bottom-right — the direction the stepper moves
   (user decision 2026-07-18). */
.selected-count { font-size: 12.5px; color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
.selected-count.over-limit { color: var(--danger); }
.preview-score { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.preview-headline { font-size: 15px; font-weight: 600; }
.preview-headline .brand-you, .preview-recap .brand-you { color: var(--primary); font-weight: 600; }
.preview-invisible { color: var(--ink-secondary); }
.preview-brands { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
/* Once sampling is done the competitor picker replaces the passive bubbles in
   this same top spot (below the headline, above the prompt table). */
.preview-competitors { margin-bottom: 14px; }
.preview-brand-chip { font-size: 12.5px; border: 1px solid #e3e4e8; border-radius: 999px; padding: 3px 10px 3px 5px; display: inline-flex; gap: 6px; align-items: center; }
.preview-brand-chip.brand-you { border-color: var(--primary); color: var(--primary); background: var(--chrome-tint-bg); }
.preview-brand-chip .favicon-chip, .preview-brand-chip .monogram-chip { width: 15px; height: 15px; font-size: 8px; }
.preview-table td { font-size: 13.75px; }
.preview-absent { color: var(--invisible-gray); }
/* Outcome cell: dot + label on one baseline, so the states line up as the
   table fills in. The dot carries the color; the label keeps its own voice. */
.preview-state { display: inline-flex; align-items: center; gap: 6px; }
.preview-state .status-dot { flex: none; }
/* Charcoal = the merchant showed up (black = you), gray = invisible. Both
   join the shared .status-dot vocabulary rather than starting a new one. */
.status-dot.mentioned { background: var(--primary); }
.status-dot.absent { background: var(--invisible-gray); }
/* In-flight: amber like every other pending dot, pulsing so a half-filled
   table reads as working rather than stalled. */
.status-dot.asking { background: #fab005; animation: dot-pulse 1.4s ease-in-out infinite; }
@keyframes dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .status-dot.asking { animation: none; } }
.plan-card.recommended, .plan-card.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
/* Wizard plan step (plan-picker): whole card is clickable */
[data-controller="plan-picker"] .plan-card { cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease; }
[data-controller="plan-picker"] .plan-card:not(.selected):hover { border-color: #b7bcc2; }

/* --- Public marketing + blog (SEO foundation) --- */
.marketing main { min-height: 60vh; }
.marketing-nav { position: sticky; top: 0; z-index: 10; }
/* Match the landing hero's inner box (max-width 1200px, 24px gutters) so the
   nav brand lockup and CTA line up with the hero copy's left edge and the
   hero's right edge on / and /shopify. */
.marketing-nav-inner { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.marketing-footer { background: #fff; }
/* Blog — index */
.blog-index-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.blog-count { font-family: var(--mono); font-size: 13px; color: var(--ink-secondary); }
.blog-feed-link { font-family: var(--mono); font-size: 12px; color: var(--ink-secondary); text-decoration: none; }
.blog-feed-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.blog-card {
  position: relative; height: 100%; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--card-border); border-radius: 14px;
  overflow: hidden; transition: transform .18s ease, box-shadow .18s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(46, 52, 59, .10); }
.blog-card-img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 1200 / 630; }
.blog-card-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.blog-card-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-secondary); display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.blog-card-title { font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; text-wrap: balance; margin: 0; }
.blog-card-title a { color: var(--ink); text-decoration: none; }
.blog-card-desc { color: var(--ink-secondary); font-size: 14px; line-height: 1.55; margin: 0; }
.blog-chip {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .08em;
  padding: .22em .7em; border-radius: 999px; display: inline-block; white-space: nowrap;
}

.blog-featured { margin-bottom: 1.75rem; }
.blog-featured-grid { display: grid; grid-template-columns: 3fr 2fr; align-items: center; }
.blog-featured-grid > * { min-width: 0; } /* let tracks shrink below the img's intrinsic 1200px */
.blog-featured .blog-card-body { padding: 1.6rem 1.9rem; }
.blog-featured .blog-card-title { font-size: 26px; letter-spacing: -.015em; }
.blog-featured .blog-card-desc { font-size: 15px; }
@media (max-width: 767.98px) { .blog-featured-grid { grid-template-columns: 1fr; } }

/* Blog — article: the post itself is a white panel floating on the page bg,
   same idiom as .contact-card / .blog-card. */
.blog-article { background: #fff; border: 1px solid var(--card-border); border-radius: 16px;
  box-shadow: 0 12px 44px rgba(46, 52, 59, .06); padding: 2.6rem 2.8rem; }
@media (max-width: 767.98px) { .blog-article { padding: 1.6rem 1.25rem; border-radius: 12px; } }
.blog-article-meta { font-family: var(--mono); font-size: 13px; color: var(--ink-secondary); display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.blog-title { font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; margin: .4em 0 .55em; }
.blog-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.blog-tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: .18em .62em; border-radius: 999px; line-height: 1.5;
  white-space: nowrap;
}
.blog-hero-img {
  display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630;
  border-radius: 14px; border: 1px solid var(--card-border); margin: 1.6rem 0 2rem;
}

/* Reading-progress hairline (color set inline per category). Scroll-driven
   CSS only — browsers without animation-timeline never see it. */
.blog-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .blog-progress {
    display: block; position: fixed; top: 0; left: 0; z-index: 2000;
    width: 100%; height: 3px; background: var(--primary);
    transform-origin: 0 50%; transform: scaleX(0);
    animation: blog-progress-grow linear both; animation-timeline: scroll(root);
  }
  @keyframes blog-progress-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

.cta-panel { background: #fff; border: 1px solid var(--card-border); border-radius: 16px; padding: 2.75rem 2rem; }
.cta-ext-icon { flex-shrink: 0; opacity: .85; }
.blog-cta-panel { background: var(--primary); border-radius: 16px; padding: 2.4rem 2rem; text-align: center; }
.blog-cta-panel .eyebrow { color: rgba(255, 255, 255, .55); }
.blog-cta-line { color: #fff; font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  .blog-card { transition: none; }
  .blog-card:hover { transform: none; box-shadow: none; }
  .blog-progress { display: none !important; }
}

.blog-post-body { font-size: 17px; line-height: 1.75; color: var(--ink); }
.blog-post-body h2 { font-size: 23px; font-weight: 700; letter-spacing: -.01em; margin-top: 1.8em; margin-bottom: .5em; }
.blog-post-body h3 { font-size: 18px; font-weight: 700; margin-top: 1.4em; margin-bottom: .5em; }
.blog-post-body p { margin-bottom: 1.1em; }
.blog-post-body ul, .blog-post-body ol { margin-bottom: 1.1em; padding-left: 1.4em; }
.blog-post-body li { margin-bottom: .35em; }
.blog-post-body a { color: var(--ink); text-underline-offset: 3px; }
.blog-post-body code { font-family: var(--mono); font-size: .88em; background: var(--chrome-tint-bg); padding: .1em .35em; border-radius: 4px; }
.blog-post-body pre { background: var(--receipt-bg); border: 1px solid var(--card-border); border-radius: 8px; padding: 12px 14px; overflow-x: auto; }
.blog-post-body pre code { background: none; padding: 0; }
.blog-post-body blockquote { border-left: 3px solid var(--chrome-tint-border); padding-left: 14px; color: var(--ink-secondary); margin: 1.2em 0; }

/* --- Tier 1 landing pages (SEO, Agent 2) ---
   The app body is 13px; landing pages need marketing-scale type. Scoped under
   .landing so nothing here leaks into the app shell. */
.landing { font-size: 15px; line-height: 1.65; color: var(--ink); }
.landing .hero { padding: 60px 0 36px; }
.landing h1 { font-size: 40px; font-weight: 800; line-height: 1.12; letter-spacing: -.02em; margin-bottom: .5em; }
.landing .lead { font-size: 19px; line-height: 1.5; color: var(--ink-secondary); }
.landing h2 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin-top: 1.6em; margin-bottom: .5em; }
.landing h3 { font-weight: 700; }
.landing section { padding: 6px 0; }
.landing section p { margin-bottom: 1em; }
.landing section ul { margin-bottom: 1em; padding-left: 1.3em; }
.landing section li { margin-bottom: .4em; }
.landing .eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-secondary); margin-bottom: .6em; }
.landing .faq-q { font-weight: 700; font-size: 16px; margin-bottom: .3em; }
.landing .receipt-body { font-size: 15px; }
@media (max-width: 767px) { .landing h1 { font-size: 30px; } .landing .lead { font-size: 17px; } }

/* --- Homepage hero band ---
   The App Store feature media (brand/trackgpt-feature-1600x900.png) rebuilt
   live: charcoal field, white lockup + headline on the left, the Overview
   screenshot cropped by its box so it bleeds off the band's bottom-right,
   and the App Store CTA overlaid at the center of the whole band. */
.landing .hero-band { position: relative; background: var(--primary); overflow: hidden; }
.landing .hero-band-inner { position: relative; max-width: 1200px; margin: 0 auto; min-height: 620px; padding: 56px 24px 0; }
.landing .hero-copy { max-width: 470px; padding-bottom: 56px; }
.landing .hero-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 44px; }
.landing .hero-lockup svg { display: block; }
.landing .hero-wordmark { font-family: "Avenir Next", Futura, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 23px; font-weight: 400; letter-spacing: .17em; color: #fff; }
.landing .hero-wordmark strong { font-weight: 700; }
.landing .hero-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #8b939c; margin-bottom: .8em; }
.landing .hero-band h1 { color: #fff; font-size: 48px; }
.landing .hero-sub { font-size: 19px; line-height: 1.55; color: #b9c0c7; margin-bottom: 0; }
.landing .hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0; }
.landing .hero-tag { font-family: var(--mono); font-size: 13px; color: #e8eaed; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 7px 15px; white-space: nowrap; }
.landing .hero-byline { font-size: 13px; color: #8b939c; margin-bottom: 0; }
/* The shot's box runs to the band's bottom/right edges and clips the oversized
   image, so the dashboard reads as bleeding off the canvas (radius top-left only). */
.landing .hero-shot { position: absolute; top: 110px; bottom: 0; left: calc(50% - 40px); right: 0; overflow: hidden;
  border-radius: 16px 0 0 0; box-shadow: 0 30px 90px rgba(0, 0, 0, .5); background: #f6f6f7; }
.landing .hero-shot img { display: block; width: max(1080px, 100%); height: auto; }
.landing .hero-cta { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; pointer-events: none; }
.landing .hero-cta-btn { pointer-events: auto; display: inline-flex; align-items: center; gap: 11px; background: #fff; color: var(--primary); font-size: 18px; font-weight: 800; text-decoration: none;
  padding: 16px 26px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: transform .12s ease, box-shadow .12s ease; }
.landing .hero-cta-btn svg { display: block; flex-shrink: 0; }
.landing .hero-cta-btn:hover { color: var(--primary); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .3); }
.landing .hero-cta-ext { color: var(--ink-secondary); margin-left: 2px; }
/* Secondary audience-router link under the primary CTA (homepage): dark pill
   so it stays readable over the screenshot behind it. */
.landing .hero-cta-alt { pointer-events: auto; font-size: 13.5px; color: #e8eaed; text-decoration: none;
  background: rgba(46, 52, 59, .78); border-radius: 999px; padding: 7px 16px; }
.landing .hero-cta-alt:hover { color: #fff; text-decoration: underline; }
@media (max-width: 991px) {
  .landing .hero-band-inner { min-height: 0; padding-top: 40px; }
  .landing .hero-copy { max-width: 100%; padding-bottom: 0; }
  .landing .hero-band h1 { font-size: 34px; }
  .landing .hero-shot { position: relative; top: auto; bottom: auto; left: auto; right: auto;
    margin: 28px -24px 0 24px; border-radius: 12px 0 0 12px; box-shadow: 0 18px 56px rgba(0, 0, 0, .45); }
  .landing .hero-shot img { width: 100%; }
  .landing .hero-cta { position: static; padding: 28px 0 36px; }
}

/* --- Contact & early-access pages (shared split shell) --- */
.landing.contact-wrap { padding-bottom: 64px; }
.landing .contact-hero { padding: 56px 0 32px; text-align: center; }
.landing .contact-card { background: #fff; border: 1px solid var(--card-border); border-radius: 16px;
  box-shadow: 0 12px 44px rgba(46, 52, 59, .07); padding: 28px; }
@media (min-width: 992px) { .landing .contact-card { padding: 36px 40px; } }
.landing .aside-card { background: #fff; border: 1px solid var(--card-border); border-radius: 14px; padding: 20px 22px; }
.landing .contact-method { display: flex; align-items: flex-start; gap: 12px; }
.landing .contact-method + .contact-method { margin-top: 18px; }
.landing .contact-method-icon { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  background: var(--chrome-tint-bg); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.landing .contact-method-label { font-family: var(--mono); font-size: 11px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-secondary); margin-bottom: 2px; }
.landing .contact-method a { color: var(--ink); font-weight: 600; text-decoration: none; }
.landing .contact-method a:hover { text-decoration: underline; }
.landing .contact-benefit { margin-bottom: .5em; padding-left: 1.4em; position: relative; }
.landing .contact-benefit::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.landing .contact-card .form-floating > label { color: var(--ink-secondary); }
.landing .contact-card .form-control, .landing .contact-card .form-select { border-radius: 10px; }
.landing .contact-card .form-control:focus, .landing .contact-card .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 .2rem var(--focus-ring); }
