/* App UI (dashboard + onboarding). Self-hosted, CSP-clean.
   Skin matches the Martex marketing theme (mockup docs/mockups/
   app-restyle-mockup.html 2026-07-19, then recolored same day per Akash,
   "too much purple"): theme ink #353f4f, soft card shadows, brand = the
   theme blue skin's dark blue #185abd, coral Upgrade CTA. Bump the
   ?v= query on the app.css links (app + admin shells, public layout)
   whenever this file changes; assets ship no Cache-Control.
   Also loaded by templates/admin and templates/public (shared .card,
   table.data, .banner, .pill); keep those selectors working. */
:root {
  --ink:#353f4f; --muted:#6c757d; --faint:#97a0b5;
  --brand:#185abd; --brand-deep:#124a9e; --brand-tint:#ecf2fb; --brand-line:#d7e3f7;
  --coral:#C0504F; --coral-deep:#a94341;
  --bg:#f4f4fa; --line:rgba(53,63,79,.09);
  --ok:#177a3c; --bad:#b3403e;
  --card-shadow:0 1px 2px rgba(28,32,60,.03), 0 10px 30px rgba(24,74,155,.08);
}
* { box-sizing: border-box; }
.app-body {
  margin:0; color:var(--ink);
  font-family:'Plus Jakarta Sans', -apple-system, 'Segoe UI', sans-serif;
  background:var(--bg);
  background-image:linear-gradient(180deg, #e3ebf8 0%, var(--bg) 320px);
  background-repeat:no-repeat;
}

/* ---- Header ---- */
.app-header { background:#fff; position:sticky; top:0; z-index:10;
  box-shadow:0 1px 0 rgba(53,63,79,.06), 0 4px 16px rgba(24,74,155,.05); }
.app-header-inner { max-width:1180px; margin:0 auto; padding:14px 22px;
  display:flex; align-items:center; justify-content:space-between; gap:16px; }
.app-logo img { height:36px; display:block; }
.app-nav { display:flex; align-items:center; gap:26px; flex-wrap:wrap; }
.app-nav a { color:var(--ink); text-decoration:none; font-weight:700; font-size:.94rem;
  position:relative; padding:4px 0; }
.app-nav a:hover { color:var(--brand); }
.app-nav a.active { color:var(--brand); }
.app-nav a.active::after { content:""; position:absolute; left:0; right:0; bottom:-6px;
  height:3px; border-radius:3px; background:var(--brand); }
.app-nav a.nav-upgrade { background:var(--coral); color:#fff; border-radius:7px;
  padding:9px 18px; font-size:.9rem; }
.app-nav a.nav-upgrade:hover { background:var(--coral-deep); color:#fff; }
.app-nav a.nav-upgrade::after { display:none; }
.app-signout { background:none; border:none; color:var(--muted); font:inherit;
  font-weight:600; font-size:.9rem; cursor:pointer; padding:0; }
.app-signout:hover { color:var(--ink); }

/* ---- Page frame ---- */
.app-main { max-width:1180px; margin:0 auto; padding:30px 22px 80px; }
.row-head { display:flex; align-items:flex-end; justify-content:space-between;
  flex-wrap:wrap; gap:14px; margin-bottom:20px; }
.row-head h1 { font-size:1.9rem; font-weight:800; letter-spacing:-.02em; margin:0; }
.row-head .actions { display:flex; gap:10px; }
.app-main a { color:var(--brand); }
.app-main a:hover { color:var(--brand-deep); }

.btn-p { background:var(--brand); color:#fff; border:none; border-radius:9px;
  padding:11px 20px; font-weight:700; font-size:.92rem; text-decoration:none;
  display:inline-block; cursor:pointer; box-shadow:0 6px 16px rgba(24,90,189,.28); }
.btn-p:hover { background:var(--brand-deep); color:#fff; }
.card > .btn-p { align-self:flex-start; } /* .card is a flex column; keep CTAs natural width */
.btn-p[disabled] { opacity:.55; cursor:default; }
.app-main a.btn-p, .app-main a.btn-p:hover { color:#fff; }
.btn-s { background:#fff; color:var(--ink); border:1px solid #dfe4ef; border-radius:9px;
  padding:10px 18px; font-weight:700; font-size:.92rem; text-decoration:none;
  display:inline-block; cursor:pointer; box-shadow:0 2px 6px rgba(28,32,60,.05); }
.btn-s:hover { border-color:var(--brand); color:var(--brand); }
/* Disabled buttons must LOOK disabled (Akash 2026-08-06: visual cues, not
   just the hint text) */
.btn-s[disabled] { opacity:.45; cursor:default; pointer-events:none; box-shadow:none; color:var(--muted); }
.app-main a.btn-s { color:var(--ink); }
.app-main a.btn-s:hover { color:var(--brand); }

.banner { display:flex; align-items:center; flex-wrap:wrap; gap:12px;
  padding:12px 18px; border-radius:12px; margin-bottom:20px; font-size:.9rem; font-weight:600; }
.banner-info { background:var(--brand-tint); color:#17498f; border:1px solid var(--brand-line); }
.banner-warn { background:#fdf1e7; color:#9a3412; border:1px solid #f6e0cd; }
.banner .meter { flex:none; width:120px; height:8px; border-radius:5px;
  background:#d3e0f4; overflow:hidden; }
.banner .meter span { display:block; height:100%; border-radius:5px; background:var(--brand); }

/* Inline form controls (crawlers add-site / upload rows) */
.form-inline { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.form-inline .grow { flex:1; min-width:220px; }
.ctl { padding:10px 12px; border:1px solid #dfe4ef; border-radius:9px; font:inherit;
  background:#fff; color:var(--ink); }
.ctl:focus { outline:2px solid var(--brand-line); border-color:var(--brand); }

/* ---- Cards ---- */
.card { background:#fff; border:none; border-radius:16px; padding:24px 26px;
  margin-bottom:24px; box-shadow:var(--card-shadow); }
.card h2 { font-size:1.18rem; font-weight:800; letter-spacing:-.01em; margin:0 0 4px; }
.card .sub { color:var(--muted); font-size:.86rem; margin:0 0 18px; }

/* ---- Stat tiles ---- */
.stat-row { display:grid; grid-template-columns:repeat(auto-fit, minmax(165px, 1fr)); gap:14px; }
.stat { background:#f3f7fd; border:1px solid #e5edfa; border-radius:13px; padding:16px 18px; min-width:0; }
.stat .v { font-size:1.8rem; font-weight:800; letter-spacing:-.02em;
  font-variant-numeric:tabular-nums; line-height:1.15; }
.stat .l { color:var(--muted); font-size:.82rem; font-weight:600; margin-top:4px; }
.stat .l .ci { display:block; margin-top:2px; }
.stat .l a { color:inherit; text-decoration:underline; }
.stat-hero { background:linear-gradient(135deg, #2e73d2 0%, #124a9e 100%);
  border:none; box-shadow:0 8px 20px rgba(18,74,158,.30); }
.stat-hero .v { color:#fff; }
.stat-hero .l { color:rgba(255,255,255,.85); }
.stat-hero .l .ci, .stat-hero .l a { color:rgba(255,255,255,.62); }

/* ---- Plain-english explainers (.q) ----
   A real <button> so a phone tap focuses it; the bubble is pure CSS from
   data-tip (CSP stays script-src 'self', no JS). Bubbles are viewport-fixed
   (shared rule below), so they are safe anywhere, .table-scroll included. */
.q { position:relative; display:inline-flex; align-items:center; justify-content:center;
  width:15px; height:15px; padding:0; margin-left:6px; vertical-align:1px;
  border:1px solid #b9c6dd; border-radius:50%; background:transparent;
  color:var(--muted); font-size:10px; font-weight:700; line-height:1; cursor:help; }
.q:hover, .q:focus { border-color:var(--brand); color:var(--brand); outline:none; }
.stat-hero .q { border-color:rgba(255,255,255,.55); color:rgba(255,255,255,.9); }
.stat-hero .q:hover, .stat-hero .q:focus { border-color:#fff; color:#fff; }
/* ---- Tooltip bubbles, ONE shared rule for every data-tip carrier ----
   (.q incl. q-t/q-right, change icons, status pills, the score ring.)
   Viewport-fixed at the bottom center so no overflow container can ever clip
   them, and 60-70% of the page wide (Akash 2026-08-06: the old narrow bubbles
   wrapped long explainers to 6-7 lines). The max() keeps phones near-full
   width, the 900px cap keeps desktop line lengths readable. */
[data-tip] { cursor:help; }
[data-tip]::after {
  content:attr(data-tip); position:fixed; left:50%; bottom:18px;
  transform:translateX(-50%); width:min(900px, max(65vw, 340px)); background:#fff;
  color:var(--ink); font-size:.8rem; font-weight:400; line-height:1.55;
  text-align:left; text-transform:none; letter-spacing:normal; border-radius:10px;
  padding:12px 14px; box-shadow:0 12px 40px rgba(24,42,76,.35); opacity:0;
  visibility:hidden; z-index:70; pointer-events:none; white-space:pre-line; }
[data-tip]:hover::after, [data-tip]:focus::after { opacity:1; visibility:visible; }
[data-tip]:focus { outline:none; }
[data-tip]:focus-visible { outline:2px solid var(--brand-line); }
/* Floating tooltips (tips.js, Akash 2026-08-08: bubbles near the mouse
   EVERYWHERE, app + admin + public). The script stamps html.has-tipjs and
   floats .tip-float next to the carrier; the viewport-bottom ::after rule
   above stays as the no-JS fallback only. */
html.has-tipjs [data-tip]::after { content:none; }
.tip-float { position:fixed; z-index:90; background:#fff; color:var(--ink);
  font-size:.8rem; font-weight:400; line-height:1.55; border-radius:10px;
  padding:10px 13px; border:1px solid #e3e8f2;
  box-shadow:0 10px 34px rgba(24,42,76,.28); white-space:pre-line;
  pointer-events:none; text-align:left; }
/* Table values that carry their range/reason as a tooltip (dotted hint) */
.tipv[data-tip] { text-decoration:underline dotted #b9c6dd; text-underline-offset:3px; }
.rate-low { color:#8a6d1a; }
/* Held-number marker: the reason lives in its tooltip */
.warn-ico { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px;
  padding:0; border:none; border-radius:50%; background:#fdf4d7; color:#8a6d1a;
  font-weight:800; font-size:12px; line-height:1; vertical-align:middle; }
/* Prompts management: the prompt text owns the row (Akash 2026-08-06) */
.prompts-table th:first-child { width:46%; }
/* Brand favicon inside table cells (competitors page) */
table.data img.fav { width:16px; height:16px; border-radius:4px; vertical-align:-3px; margin-right:7px; }
/* Icon link to the answers behind a number */
.chat-ico { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px;
  border-radius:8px; color:var(--brand); }
.chat-ico:hover, .chat-ico:focus { background:#e8effb; color:var(--brand-deep); }
.chat-ico svg { display:block; }
/* Sticky app header: anchors must stop below it (jump-nav clicks) */
.app-main [id], .pub [id] { scroll-margin-top:84px; }
/* Transcripts: the prompt in its own panel above the feed (2026-08-11) */
.prompt-card .prompt-lead { font-size:1.05rem; font-weight:700; color:var(--ink); margin:0; }
.prompt-card .sub { margin:7px 0 0; }
/* Week separators in the answers feed */
.ans-week { font-size:.78rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  color:#8b93a7; margin:26px 0 10px; }
.ans-week:first-of-type { margin-top:4px; }

/* Breadcrumbs (Akash round 2026-07-21): project context on every drill-down */
.crumbs { font-size:.82rem; color:var(--faint); margin:0 0 6px; }
.crumbs a { color:var(--muted); text-decoration:none; }
.crumbs a:hover { color:var(--brand); text-decoration:underline; }
.crumbs .sep { margin:0 7px; color:#c0c7d6; }

.ci { color:var(--faint); font-size:.78rem; font-weight:500; }
.app-main a.ci { color:var(--faint); text-decoration:underline; }
.app-main a.ci:hover { color:var(--brand); }
.hint { color:var(--muted); font-size:.82rem; }

/* ---- Tables ---- */
.table-scroll { overflow-x:auto; }
table.data { width:100%; border-collapse:collapse; font-size:.92rem; }
table.data th, table.data td { text-align:left; padding:12px 14px; border-bottom:1px solid var(--line); }
table.data tbody tr:last-child td { border-bottom:none; }
table.data th { color:#8b93a7; font-weight:700; font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; vertical-align:top; }
table.data td.num, table.data th.num { text-align:right; font-variant-numeric:tabular-nums; }
table.data tbody tr:hover { background:#f7fafd; }
tr.you, table.data tbody tr.you:hover { background:#eef4fc; box-shadow:inset 3px 0 0 var(--brand); }
.app-main table.data a.detail, .pub table.data a.detail { color:var(--brand); font-size:.82rem; font-weight:700; white-space:nowrap; text-decoration:none; }
.app-main table.data a.detail:hover, .pub table.data a.detail:hover { color:var(--brand-deep); }
.btn-x { background:none; border:none; color:var(--muted); font:inherit; font-size:.82rem;
  font-weight:700; cursor:pointer; padding:4px 6px; }
.btn-x:hover { color:var(--bad); }
.btn-trash { display:inline-flex; align-items:center; justify-content:center; padding:6px; border-radius:8px; }
.btn-trash:hover { background:#fdeeee; }
.btn-trash[disabled] { opacity:.4; cursor:default; }
.btn-trash[disabled]:hover { background:none; color:var(--muted); }
.btn-danger, .btn-danger:hover { background:var(--bad); box-shadow:0 6px 16px rgba(190,60,60,.28); }

/* Destructive-confirm dialog (app.js js-confirm); confirm-* names dodge the theme's .modal */
.confirm-backdrop { position:fixed; inset:0; background:rgba(22,30,48,.45); z-index:90;
  display:flex; align-items:center; justify-content:center; padding:24px; }
.confirm-box { background:#fff; border-radius:14px; padding:22px 24px; max-width:430px;
  width:100%; box-shadow:0 18px 50px rgba(16,28,50,.35); }
.confirm-body { margin:0 0 18px; font-size:.95rem; line-height:1.5; color:var(--ink); }
.confirm-actions { display:flex; justify-content:flex-end; gap:10px; }

/* Suggested-prompt list on the tracked-prompts page */
.suggest-list { list-style:none; margin:14px 0 0; padding:0; }
.suggest-list li { display:flex; align-items:center; gap:12px; padding:9px 0;
  border-bottom:1px solid var(--line); font-size:.9rem; }
.suggest-list li:last-child { border-bottom:none; }
.suggest-list .sg-text { flex:1; min-width:0; }
.suggest-list .sg-meta { color:var(--faint); font-size:.78rem; white-space:nowrap; }
.suggest-list .sg-add { padding:6px 14px; }
.suggest-list li.sg-done { opacity:.5; }

.bar { height:10px; background:#e6ecf6; border-radius:6px; overflow:hidden;
  min-width:90px; display:inline-block; vertical-align:middle; }
.bar > span { display:block; height:100%; border-radius:6px;
  background:linear-gradient(90deg, var(--brand), #5e94e4); }
.sov-line { color:var(--muted); font-size:.82rem; margin-left:6px; }

.pill { font-size:.72rem; font-weight:700; padding:3px 9px; border-radius:100px; white-space:nowrap; }
.pill-up { background:#e0f6e8; color:var(--ok); }
.pill-down { background:#fde8e8; color:var(--bad); }
.pill-noise { background:#eef0f6; color:#6b7280; }
.pill-low { background:#fdf4d7; color:#8a6d1a; }

.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.grid2 > .card { margin-bottom:24px; }

/* ---- Forms (wizard + admin) ---- */
/* Placeholders read as examples, not values (Akash 2026-08-14) */
.app-main input::placeholder, .app-main textarea::placeholder { color:#b6c0d4; font-size:.88em; }
.form-row { margin-bottom:16px; }
.form-row label { display:block; font-weight:600; font-size:.88rem; margin-bottom:6px; }
.form-row .hint { color:var(--muted); font-weight:400; font-size:.8rem; }
.form-row input[type=text], .form-row input[type=email], .form-row input[type=url], .form-row textarea, .form-row select {
  width:100%; padding:10px 12px; border:1px solid #dfe4ef; border-radius:9px; font:inherit; background:#fff; color:var(--ink); }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline:2px solid var(--brand-line); border-color:var(--brand); }
.form-row textarea { min-height:120px; resize:vertical; }
.chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.chip { background:var(--brand-tint); color:#17498f; border:none; border-radius:100px; padding:6px 12px; font-size:.82rem; cursor:pointer; }
.chip:hover { background:var(--brand-line); }

/* ---- Transcripts ---- */
.transcript { border:none; border-radius:14px; padding:18px 20px; margin-bottom:16px;
  background:#fff; box-shadow:var(--card-shadow); }
.transcript .meta { color:var(--muted); font-size:.78rem; margin-bottom:8px; }
/* ChatGPT-style conversation (Akash round 2026-07-21): the tracked prompt as
   the user's message, then the reply. Evokes the ChatGPT layout without
   copying its logo. */
.transcript .chat-user { width:fit-content; max-width:76%; margin:6px 0 16px auto;
  background:#f0f2f6; border-radius:18px 18px 4px 18px; padding:10px 16px;
  font-size:.9rem; line-height:1.45; }
.transcript .ai-head { display:flex; align-items:center; gap:8px; font-weight:700;
  font-size:.85rem; margin:0 0 8px; }
.transcript .ai-avatar { display:inline-flex; align-items:center; justify-content:center;
  width:24px; height:24px; border-radius:50%; background:#10a37f; color:#fff;
  font-size:12px; line-height:1; }
.transcript .body { white-space:pre-wrap; font-size:.88rem; line-height:1.5; max-height:340px; overflow:auto; }
/* Rendered-markdown transcript body (Markdown::toHtml) */
.transcript .body.md { white-space:normal; max-height:none; }
.body.md p { margin:0 0 10px; }
.body.md h3, .body.md h4, .body.md h5, .body.md h6 { font-size:1rem; font-weight:700; margin:16px 0 8px; line-height:1.3; }
.body.md h3 { font-size:1.08rem; }
.body.md ul, .body.md ol { margin:0 0 10px; padding-left:24px; }
.body.md ul { list-style:disc; }
.body.md ul ul { list-style:circle; }
.body.md ol { list-style:decimal; }
.body.md ul ul, .body.md ol ol, .body.md ul ol, .body.md ol ul { margin-bottom:0; }
.body.md li { margin:3px 0; }
.body.md table { border-collapse:collapse; margin:0 0 12px; font-size:.85rem; width:auto; }
.body.md th, .body.md td { border:1px solid var(--line); padding:6px 10px; text-align:left; vertical-align:top; }
.body.md th { background:#f8f7fc; font-weight:700; }
.body.md pre { background:#f7f6fb; border:1px solid var(--line); border-radius:6px; padding:10px 12px; overflow:auto; margin:0 0 12px; }
.body.md code { background:#f1eff8; border-radius:4px; padding:1px 5px; font-size:.85em; }
.body.md pre code { background:none; padding:0; }
.body.md blockquote { border-left:3px solid var(--line); margin:0 0 10px; padding:2px 0 2px 12px; color:var(--muted); }
.body.md hr { border:0; border-top:1px solid var(--line); margin:14px 0; }
.body.md a { text-decoration:underline; }
/* Citations drill-down: long URLs must wrap inside the table */
.cite-url { word-break:break-all; }

/* ---- Trend chart (dashboard trend card; mockup docs/mockups/trend-widget-mockup.html) ---- */
.trend-chart { position:relative; }
.trend-chart svg { display:block; width:100%; height:auto; }
.trend-tip { position:absolute; white-space:nowrap; background:#fff; border:1px solid var(--line); border-radius:8px;
  box-shadow:0 4px 14px rgba(28,28,40,.10); padding:8px 12px; font-size:.78rem; line-height:1.5; pointer-events:none; z-index:5; }
.trend-tip .tt-week { font-weight:700; }
.trend-tip .tt-muted { color:var(--muted); }
.chart-foot { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; margin-top:12px; }
.chart-foot .key { color:var(--muted); font-size:.75rem; }
.chart-foot .key .dot { display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--brand); vertical-align:-1px; margin-right:5px; }
.chart-foot .key .dot.open { background:#fff; border:2px solid var(--brand); }
.chart-foot .key .line { display:inline-block; width:14px; height:3px; border-radius:2px; background:var(--brand); vertical-align:2px; margin-right:5px; }
.trend-table { margin-left:auto; }
.trend-table th, .trend-table td:first-child { white-space:nowrap; }
.trend-table summary { color:var(--muted); font-size:.75rem; cursor:pointer; text-decoration:underline; list-style:none; }
.trend-table summary::-webkit-details-marker { display:none; }
.trend-table[open] { flex-basis:100%; margin-left:0; }
.trend-table[open] summary { text-align:right; margin-bottom:6px; }

/* ---- New-project wizard ---- */
.wiz-steps { list-style:none; display:flex; flex-wrap:wrap; gap:6px 26px; padding:0; margin:0 0 20px; }
.wiz-steps li { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:.88rem; font-weight:600; }
.wiz-steps li .n { width:27px; height:27px; border-radius:50%; border:1px solid #d6ddec; background:#fff;
  display:inline-flex; align-items:center; justify-content:center; font-size:.78rem;
  box-shadow:0 2px 6px rgba(28,32,60,.05); }
.wiz-steps li.current { color:var(--ink); }
.wiz-steps li.current .n { background:var(--brand); border-color:var(--brand); color:#fff;
  box-shadow:0 4px 10px rgba(24,90,189,.30); }
.wiz-steps li.done { cursor:pointer; }
.wiz-steps li.done .n { background:#e0f6e8; border-color:#e0f6e8; color:var(--ok); }
.wiz-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:18px; }
.wiz-note { color:#9a3412; font-size:.85rem; min-height:1.3em; margin-top:10px; }
/* Loading feedback for LLM calls (owner-requested exception to the no-animation
   rule: functional progress indication only, never decorative) */
@keyframes wiz-spin { to { transform:rotate(360deg); } }
.btn-loading { pointer-events:none; opacity:.8; }
.btn-loading::after { content:""; display:inline-block; width:13px; height:13px; margin-left:9px;
  vertical-align:-2px; border:2px solid currentColor; border-right-color:transparent;
  border-radius:50%; animation:wiz-spin .7s linear infinite; }
.wiz-loading { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:.9rem; padding:8px 0; }
.wiz-loading::before { content:""; flex:none; width:18px; height:18px; border:2px solid var(--brand);
  border-right-color:transparent; border-radius:50%; animation:wiz-spin .7s linear infinite; }
.wiz-pills { display:flex; flex-wrap:wrap; gap:8px; min-height:38px; }
.tagpill { display:inline-flex; align-items:center; gap:2px; background:var(--brand-tint); color:#17498f;
  border-radius:100px; padding:7px 6px 7px 14px; font-size:.9rem; font-weight:600; user-select:none; }
.tagpill .x { background:none; border:none; color:#17498f; cursor:pointer; font-size:1.05rem; line-height:1; padding:0 8px; }
.tagpill .x:hover { color:var(--bad); }
.wiz-comp-rows { display:flex; flex-direction:column; gap:8px; min-height:38px; }
.wiz-comp-row { display:flex; gap:8px; align-items:center; }
.wiz-comp-row input { flex:1; max-width:340px; padding:9px 12px; border:1px solid #dfe4ef; border-radius:9px; font:inherit; background:#fff; }
.wiz-comp-row input:focus { outline:2px solid var(--brand-line); border-color:var(--brand); }
.wiz-comp-row .x { background:none; border:none; color:var(--muted); cursor:pointer; font-size:1.05rem; line-height:1; padding:0 8px; }
.wiz-comp-row .x:hover { color:var(--bad); }
.wiz-addrow { display:flex; gap:8px; margin-top:14px; }
.wiz-addrow input { flex:1; max-width:340px; padding:9px 12px; border:1px solid #dfe4ef; border-radius:9px; font:inherit; background:#fff; }
.wiz-addrow input:focus { outline:2px solid var(--brand-line); border-color:var(--brand); }
.wiz-addrow-wide input { max-width:none; }
.wiz-prompts { list-style:none; padding:0; margin:0; }
.wiz-prompts li { display:flex; align-items:center; gap:10px; border:1px solid #e5edfa; background:#fafcff;
  border-radius:9px; padding:9px 6px 9px 14px; margin-bottom:8px; font-size:.92rem; }
.wiz-prompts li .t { flex:1; }
.wiz-prompts li .vol { color:var(--muted); font-size:.78rem; white-space:nowrap; }
.wiz-prompts li .x { background:none; border:none; color:var(--muted); cursor:pointer; font-size:1.05rem; line-height:1; padding:0 8px; }
.wiz-prompts li .x:hover { color:var(--bad); }
.wiz-promptbar { display:flex; align-items:center; gap:14px; margin-top:14px; }
.wiz-review { display:grid; grid-template-columns:130px 1fr; gap:6px 16px; margin:0 0 18px; font-size:.92rem; }
.wiz-review dt { font-weight:600; color:var(--muted); }
.wiz-review dd { margin:0; }
/* Review prompts grouped into read-only topic panels (2026-08-11: the
   flat list read as a wall of text at 8-25 words per prompt). Same
   vocabulary as the step-5 board, minus every editing affordance. */
.wiz-rev-h { font-size:1.02rem; margin:18px 0 2px; }
#rev-prompts { margin:12px 0 18px; }
.wiz-platform { display:inline-block; margin-right:14px; font-weight:400; }

/* ---- Responsive ---- */
@media (max-width:980px) {
  .stat-hero { grid-column:1 / -1; }
  .grid2 { grid-template-columns:1fr; }
  .app-nav { gap:18px; }
}
@media (max-width:640px) {
  .app-header-inner { flex-direction:column; padding:12px 16px 10px; gap:10px; }
  .app-logo img { height:30px; }
  .app-nav { gap:12px 18px; justify-content:center; }
  .app-nav a { font-size:.9rem; }
  .app-nav a.nav-upgrade { padding:7px 14px; }
  .app-main { padding:22px 16px 60px; }
  .row-head h1 { font-size:1.5rem; }
  .wiz-review { grid-template-columns:1fr; gap:2px; }
  .wiz-review dd { margin-bottom:10px; }
}

/* ================= Redesign components (2026-08, locked mockups) =================
   Ported from docs/mockups/redesign/mockup-redesign.css at build time; the
   mockups are the visual spec. Mockup-only helpers (.mock-note etc.) were
   not ported. */
/* ---- Metric blocks: one uniform pattern for Visibility / SoV / Citations / Sentiment ---- */
.mblock { display:grid; grid-template-columns:230px minmax(0,1fr) 300px; gap:22px 30px; align-items:start; }
.mblock .m-num .v { font-size:2.6rem; font-weight:800; letter-spacing:-.03em; line-height:1.05;
  font-variant-numeric:tabular-nums; }
.mblock .m-num .u { font-size:1.2rem; color:var(--faint); font-weight:700; }
.mblock .m-num .ci { display:block; margin-top:4px; }
.mblock .m-num .delta { margin-top:10px; font-size:.84rem; color:var(--muted); }
.mblock .m-num .second { margin-top:12px; font-size:.86rem; color:var(--muted); }
.mblock .m-num .second strong { color:var(--ink); }
.m-spark { min-width:0; }
.m-spark svg { display:block; width:100%; height:auto; }
.m-spark .spark-cap { color:var(--muted); font-size:.75rem; margin-top:6px; }
/* Score-card variant (Akash 2026-08-06): number + competitors on top, the
   trend chart full-width underneath. */
.mblock-fullchart { grid-template-columns:230px minmax(0,1fr); }
.mblock-fullchart .m-spark { grid-column:1 / -1; margin-top:8px; }
.m-rank { min-width:0; }
.m-rank h3 { font-size:.72rem; font-weight:700; color:#8b93a7; text-transform:uppercase;
  letter-spacing:.06em; margin:0 0 6px; }
table.rank { width:100%; border-collapse:collapse; font-size:.86rem; }
table.rank td { padding:6px 6px; border-bottom:1px solid var(--line); vertical-align:middle; }
table.rank tr:last-child td { border-bottom:none; }
table.rank td.rk { width:22px; color:var(--faint); font-weight:700; font-size:.78rem; }
table.rank td.num { text-align:right; font-variant-numeric:tabular-nums; font-weight:700; white-space:nowrap; }
table.rank td.chg { width:96px; text-align:right; }
/* Who-ChatGPT-names panel (2026-08-21): an untracked brand's "track" is a
   plain link-looking submit button where the score would be (his call:
   the + icons did not align). */
.link-btn { background:none; border:0; padding:0; margin:0; color:var(--brand); font:inherit; font-size:.82rem; font-weight:700; cursor:pointer; white-space:nowrap; text-decoration:none; }
.link-btn:hover, .link-btn:focus { color:var(--brand-deep); text-decoration:underline; }
/* The who-ChatGPT-names panel centers its score column so scores and the
   "track" links share one axis (his 2026-08-21 call). */
table.rank.named td.num { text-align:center; }
/* Visibility card: the answers that mention you = a button, the misses a link beside it. */
.ans-cta { margin:16px 0 0; display:flex; align-items:center; gap:16px; flex-wrap:wrap; font-size:.9rem; }
.ans-cta .btn-p { padding:9px 16px; font-size:.88rem; box-shadow:none; }
table.rank td.chg .pill { font-size:.66rem; padding:2px 7px; }
/* No accent decoration on "you" rows in ANY table (Akash 2026-08-06: remove
   accents from all elements): no tinted background, no inset bar; bold text
   carries identity. Neutralizes app.css's generic tr.you everywhere. */
tr.you, tr.you:hover, table.data tbody tr.you, table.data tbody tr.you:hover,
/* Brand names in rank widgets link to the prompt-by-prompt drill-down,
   quietly (inherit ink, brand color on hover) */
.app-main table.rank a.bname, .pub table.rank a.bname { color:inherit; text-decoration:none; }
.app-main table.rank a.bname:hover, .app-main table.rank a.bname:focus, .pub table.rank a.bname:hover, .pub table.rank a.bname:focus { color:var(--brand); text-decoration:underline; }
table.rank tr.you, table.rank tr.you:hover { background:transparent; box-shadow:none; }
tr.you td { background:transparent; }
table.rank tr.you td:nth-child(2) { font-weight:800; }

/* Score ring: circular progress around the Visibility Score (Akash 2026-08-05:
   no solid-blue panel; a shape draws the eye to the number instead). */
.score-ring { width:150px; max-width:100%; margin-bottom:10px; }
.score-ring svg { display:block; width:100%; height:auto; }
/* The ring carries the 95% range as a tooltip (Akash 2026-08-06: fewer data
   points in view); bubble comes from the shared data-tip rule. */
.score-ring[data-tip]:focus { outline:none; }
.score-ring[data-tip]:focus-visible { outline:2px solid var(--brand-line); border-radius:50%; }

/* ---- Sentiment split bar ---- */
.sent-prev { opacity:.62; } /* A14: carried sentiment score, last measured week */
.sent-bar { display:flex; height:12px; border-radius:7px; overflow:hidden; background:#e6ecf6; min-width:120px; }
.sent-bar span { display:block; height:100%; }
.sent-bar .sb-pos { background:#2f9e5f; }
.sent-bar .sb-neu { background:#c3cddd; }
.sent-bar .sb-neg { background:#c65a58; }
.sent-key { display:flex; gap:14px; flex-wrap:wrap; color:var(--muted); font-size:.75rem; margin-top:8px; }
.sent-key .swatch { display:inline-block; width:9px; height:9px; border-radius:3px; margin-right:5px; vertical-align:-1px; }
.sent-cell { min-width:150px; }
.sent-cell .sent-bar { margin-top:5px; }

/* ---- Topics ---- */
.topic-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 20px; }
.tchip { display:inline-flex; align-items:center; gap:7px; background:#fff; color:var(--ink);
  border:1px solid #dfe4ef; border-radius:100px; padding:8px 16px; font-size:.86rem; font-weight:700;
  text-decoration:none; box-shadow:0 2px 6px rgba(28,32,60,.05); }
.app-main a.tchip { color:var(--ink); }
.tchip .n { color:var(--faint); font-weight:600; font-size:.78rem; }
.tchip:hover { border-color:var(--brand); color:var(--brand); }
.tchip.active, .app-main a.tchip.active { background:var(--brand); border-color:var(--brand); color:#fff; }
.tchip.active .n { color:rgba(255,255,255,.75); }
/* Two-line topic pills (2026-08-11): name on top, score + count under */
.tchip.two { flex-direction:column; align-items:flex-start; gap:1px; padding:8px 16px 7px;
  line-height:1.35; border-radius:16px; }
.tchip.two .bl { display:flex; gap:6px; align-items:baseline; font-size:.72rem; font-weight:600;
  color:var(--faint); white-space:nowrap; }
.tchip.two .bl .sc { color:var(--ink); font-weight:800; }
.tchip.two .bl .sc.rate-low { color:#8a6d1a; }
.tchip.two:hover .bl .sc { color:var(--brand); }
.tchip.active .bl .sc, .tchip.two.active:hover .bl .sc { color:#fff; }
.tchip.active .bl .sc.rate-low { color:#ffd98a; }
.topic-tag { display:inline-block; background:var(--brand-tint); color:#17498f; border-radius:100px;
  padding:2px 10px; font-size:.7rem; font-weight:700; white-space:nowrap; vertical-align:1px; }
tr.topic-head td { background:#f6f9fe; color:var(--ink); font-weight:700; font-size:.82rem;
  padding-top:9px; padding-bottom:9px; }
tr.topic-head td .ci { font-weight:500; margin-left:8px; }
.lead-note { display:block; font-size:.8rem; color:var(--muted); }
.lead-note strong { color:var(--ink); }
.favrow + .lead-note { margin-top:5px; }

/* ---- Locale line (country + language, fixed at creation) ---- */
.locale-line { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:.84rem; font-weight:600; }
.locale-line .globe { color:var(--faint); }

/* ---- Wizard: topics accordion ---- */
/* One column of collapsed rows (Akash 2026-08-12, approved mockup: the
   two-panel drag board read as overwhelming). Row = chevron, name, pencil,
   then count pill + tool icons at the right; the expanded body is the
   prompt list with per-prompt Move-to menus. */
.wiz-topics { display:flex; flex-direction:column; gap:10px; }
.wiz-topic { border:1px solid #e5edfa; background:#fafcff; border-radius:12px; }
.wiz-topic.open { background:#fff; }
.wt-head { display:flex; align-items:center; gap:8px; padding:11px 14px; cursor:pointer; }
.wt-chev { position:relative; width:20px; height:20px; border:0; background:none; padding:0; cursor:pointer; flex:0 0 auto; }
.wt-chev::after { content:""; position:absolute; left:5px; top:5px; width:9px; height:9px;
  border-right:2px solid #8a97a8; border-bottom:2px solid #8a97a8; transform:rotate(-45deg); }
.wiz-topic.open .wt-chev::after { transform:rotate(45deg); top:2px; }
.wt-name { font-weight:600; color:var(--ink); flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wt-rename { font:inherit; font-weight:600; color:var(--ink); border:1px solid var(--brand); border-radius:6px;
  padding:2px 6px; flex:1 1 auto; min-width:120px; max-width:24em; outline:none; box-shadow:0 0 0 2px rgba(24,90,189,.18); }
.wt-tool { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; flex:0 0 auto;
  border:0; border-radius:8px; background:none; color:var(--faint); font-size:1.05rem; font-weight:700; line-height:1; cursor:pointer; padding:0; }
.wt-tool:hover { background:#eef3fb; color:var(--brand); }
.wt-tool.wt-del:hover { color:var(--bad); }
.wt-right { margin-left:auto; display:flex; align-items:center; gap:6px; flex:0 0 auto; }
.wt-count { color:var(--muted); font-size:.88rem; background:#eef3fb; border-radius:999px; padding:3px 10px; white-space:nowrap; }
.wt-count-busy { display:inline-flex; align-items:center; gap:7px; }
.wt-count-busy::before { content:""; flex:none; width:11px; height:11px; border:2px solid var(--brand);
  border-right-color:transparent; border-radius:50%; animation:wiz-spin .7s linear infinite; }
.wiz-topic.open .wt-count { background:#e5edfa; }
.wt-prompts { list-style:none; margin:0; padding:2px 16px 12px 42px; border-top:1px solid #eef2f9; }
.wt-prompts li { display:flex; align-items:flex-start; gap:10px; padding:9px 0; font-size:.92rem; }
.wt-prompts li + li { border-top:1px solid #eef2f9; }
/* Review-step rows reuse this vocabulary read-only: body built up front,
   hidden until the row opens (the topics step only renders open bodies) */
.wiz-topic:not(.open) .wt-prompts { display:none; }
.wt-prompts li.wt-hint { color:var(--muted); font-size:.85rem; }
.wt-prompts li.wt-addp { gap:8px; }
.wt-addp input { flex:1 1 auto; min-width:0; padding:7px 10px; border:1px solid #dfe4ef; border-radius:8px; font:inherit; font-size:.9rem; background:#fff; }
.wt-addp input:focus { outline:2px solid var(--brand-line); border-color:var(--brand); }
.wt-prompts li .t { flex:1 1 auto; min-width:0; color:var(--ink); }
/* Prompt evaluation labels (2026-08-18: honest labels, not scores) */
.wt-tags { display:block; margin-top:4px; }
.wt-tag { display:inline-block; font-size:.72rem; line-height:1.5; color:var(--muted); background:#f1f4fa; border-radius:8px; padding:1px 8px; margin:0 6px 2px 0; }
.wt-act { display:flex; gap:6px; align-items:center; flex:0 0 auto; }
.wt-act select { font-size:.85rem; color:var(--muted); border:1px solid #d7e0ef; border-radius:8px; padding:4px 6px; background:#fff; max-width:160px; }
.wt-x { border:0; background:none; color:var(--faint); font-size:1.05rem; line-height:1; cursor:pointer; padding:4px 6px; border-radius:6px; }
.wt-x:hover { color:var(--bad); }
@media (max-width:640px) {
  .wt-head { padding:11px 10px; gap:6px; }
  .wt-count { padding:3px 8px; font-size:.82rem; }
  .wt-prompts { padding-left:14px; }
  .wt-prompts li { flex-wrap:wrap; }
  .wt-act { margin-left:auto; }
}
/* Competitor pill domain suffix (wizard step 3) */
.tagpill .d { color:var(--faint); font-size:.72rem; margin-left:7px; }
/* Market-field autocomplete (custom list under the input; the native
   datalist popup positions unpredictably) */
.wiz-ac-row { position:relative; }
.wiz-ac { position:absolute; z-index:40; background:#fff; border:1px solid #dfe4ef; border-radius:10px;
  box-shadow:0 12px 30px rgba(24,42,76,.16); padding:4px; max-height:280px; overflow:auto; }
.wiz-ac-item { display:block; width:100%; text-align:left; background:none; border:none; padding:8px 10px;
  font:inherit; font-size:.88rem; color:var(--ink); border-radius:7px; cursor:pointer; }
.wiz-ac-item:hover, .wiz-ac-item.active { background:var(--brand-tint); color:var(--brand-deep); }
/* ---- Settings page ---- */
.kv { display:grid; grid-template-columns:170px 1fr; gap:10px 18px; font-size:.92rem; align-items:baseline; }
.kv dt { font-weight:600; color:var(--muted); }
.kv dd { margin:0; min-width:0; overflow-wrap:anywhere; }
.locked { color:var(--faint); font-size:.78rem; font-weight:600; }

/* ---- Overview extras ---- */
.proj-score { font-weight:800; font-size:1.05rem; font-variant-numeric:tabular-nums; }
.proj-score .u { color:var(--faint); font-size:.78rem; font-weight:700; }

/* ---- Change icons (Akash 2026-08-05: icons instead of text pills, tooltip carries the words).
   The bubble is position:fixed so it can never be clipped by .table-scroll. ---- */
.chg-ico { position:relative; display:inline-flex; align-items:center; justify-content:center;
  width:22px; height:22px; padding:0; border:none; border-radius:50%; cursor:help; vertical-align:middle; }
.chg-ico.up { background:#e0f6e8; }
.chg-ico.down { background:#fde8e8; }
.chg-ico.flat { background:#eef0f6; }
.chg-ico::before { content:""; display:block; }
.chg-ico.up::before { width:0; height:0; border-left:5px solid transparent; border-right:5px solid transparent; border-bottom:7px solid var(--ok); }
.chg-ico.down::before { width:0; height:0; border-left:5px solid transparent; border-right:5px solid transparent; border-top:7px solid var(--bad); }
.chg-ico.flat::before { width:10px; height:3px; border-radius:2px; background:#6b7280; }
.chg-ico:focus { outline:none; }
.chg-ico:focus-visible { outline:2px solid var(--brand-line); }

/* q-t and q-right are legacy aliases; every bubble now uses the shared
   fixed rule above, so the classes stay in markup but need no CSS. */

/* Status pills carry explanations via data-tip (add tabindex="0" in markup) */

/* ---- Sticky jump menu (dashboard right rail) ---- */
.dash-cols { display:grid; grid-template-columns:minmax(0,1fr) 176px; gap:0 26px; align-items:start; }
.jump-nav { position:sticky; top:86px; }
.jump-nav .jn-box { background:#fff; border-radius:12px; box-shadow:var(--card-shadow); padding:14px 16px; }
.jump-nav h3 { font-size:.68rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:#8b93a7; margin:0 0 8px; }
.app-main .jump-nav a, .pub .jump-nav a { display:block; color:var(--muted); font-size:.84rem; font-weight:600; text-decoration:none; padding:5px 0; }
.app-main .jump-nav a:hover, .pub .jump-nav a:hover { color:var(--brand); }
/* Topic sub-links under "Your prompts" (2026-08-11), the public rail's
   jn-sub look: indented, lighter, ellipsized, capped at 8 in the template */
.app-main .jump-nav a.jn-sub { padding:3px 0 3px 14px; font-size:.76rem; font-weight:500; color:#9aa3b5;
  max-width:190px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.app-main .jump-nav a.jn-sub:hover { color:var(--brand); }
@media (max-width:1100px) { .dash-cols { grid-template-columns:minmax(0,1fr); } .jump-nav { display:none; } }

/* ---- Favicon rank row ("Who leads") ---- */
/* The Who-leads column holds the full 10-icon row on one line at desktop
   (2026-08-11: the open-topic column is gone, this column got the width) */
@media (min-width:641px) { .data td.wl-cell, .data th.wl-cell { min-width:262px; } }
.favrow { display:inline-flex; align-items:center; gap:5px; vertical-align:middle; margin-right:8px;
  flex-wrap:wrap; row-gap:4px; max-width:240px; }
.favrow img { width:18px; height:18px; border-radius:4px; display:block; }
.favrow .wl { display:inline-flex; cursor:help; flex:0 0 auto; }
/* Favicon + label cell (shared by app cited-sources and the public tables) */
.bcell { display:inline-flex; align-items:center; gap:9px; }
.bcell img { width:18px; height:18px; border-radius:4px; display:block; flex:0 0 auto; }

/* ---- Browser-framed answers (transcripts) ---- */
.browser { border:1px solid #e2e6f0; border-radius:12px; background:#fff; box-shadow:var(--card-shadow);
  margin:8px 0 26px; overflow:hidden; }
.browser-bar { display:flex; align-items:center; gap:12px; background:#eceff5; padding:9px 14px;
  border-bottom:1px solid #e0e4ee; }
.browser-bar .dots { display:flex; gap:6px; flex:none; }
.browser-bar .dots span { width:11px; height:11px; border-radius:50%; }
.browser-bar .dots span:nth-child(1) { background:#f26d64; }
.browser-bar .dots span:nth-child(2) { background:#f4bf4f; }
.browser-bar .dots span:nth-child(3) { background:#57c454; }
.browser-bar .addr { flex:1; max-width:420px; margin:0 auto; display:flex; align-items:center; gap:8px;
  background:#fff; border:1px solid #dfe4ef; border-radius:100px; padding:5px 14px;
  font-size:.76rem; color:var(--muted); }
.browser-bar .addr .site-ico { width:8px; height:8px; border-radius:50%; background:#10a37f; flex:none; }
.browser-body { padding:26px 22px 30px; }
.browser-body .inner { max-width:none; }
/* No accent decoration on elements (Akash 2026-08-06): active nav is color only */
.app-nav a.active::after { display:none; }
.browser .transcript { box-shadow:none; border-radius:0; padding:0; margin:0; }
.browser .transcript .body { max-height:none; }
.ans-meta { color:var(--muted); font-size:.78rem; margin:0 0 6px; }

/* ---- Query fan-out, search results, brand entities (vendor fields we already store) ---- */
.qchip { display:inline-block; background:#f4f6fa; border:1px solid #e3e8f2; border-radius:100px;
  padding:4px 12px; font-size:.78rem; color:var(--ink); white-space:nowrap; max-width:100%;
  overflow:hidden; text-overflow:ellipsis; }
.qchip .n { color:var(--faint); font-weight:700; margin-left:5px; }
.ent { display:inline-block; background:#fff; border:1px solid #dfe4ef; border-radius:100px;
  padding:4px 12px; font-size:.78rem; color:var(--ink); }
.ent strong { font-weight:800; }
.entrow { display:flex; flex-wrap:wrap; gap:7px; }
details.ans-data { margin:-14px 0 26px; }
details.ans-data > summary { list-style:none; cursor:pointer; color:var(--muted); font-size:.82rem;
  font-weight:600; padding:10px 14px; background:#fff; border:1px solid #e2e6f0; border-radius:10px; }
details.ans-data > summary::-webkit-details-marker { display:none; }
details.ans-data > summary:hover { color:var(--brand); border-color:var(--brand-line); }
details.ans-data[open] > summary { border-radius:10px 10px 0 0; }
details.ans-data .ans-data-body { border:1px solid #e2e6f0; border-top:none; border-radius:0 0 10px 10px;
  background:#fff; padding:16px 18px; }
details.ans-data h4 { font-size:.72rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  color:#8b93a7; margin:16px 0 8px; }
details.ans-data h4:first-child { margin-top:0; }

/* ---- Research-round adds: opportunities, attributes, source types ---- */
.opp-list { list-style:none; margin:0; padding:0; }
.opp-list li { display:flex; gap:14px; align-items:baseline; padding:12px 0; border-bottom:1px solid var(--line); font-size:.9rem; }
.opp-list li:last-child { border-bottom:none; }
.opp-tag { flex:none; width:112px; font-size:.66rem; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:#8b93a7; }
.opp-list .detail { margin-left:auto; white-space:nowrap; }
.ent.pos { border-color:#bfe3cd; background:#f2fbf5; }
.ent.neg { border-color:#eec9c8; background:#fdf4f4; }
.ent .n { color:var(--faint); font-weight:700; margin-left:5px; font-size:.72rem; }
/* Wording chips link to the answers that used them (2026-08-11) */
.app-main a.ent { color:var(--ink); text-decoration:none; cursor:pointer; }
.app-main a.ent:hover { box-shadow:0 2px 8px rgba(28,32,60,.1); }
.app-main a.ent.pos:hover { border-color:#8cc9a4; }
.app-main a.ent.neg:hover { border-color:#dfa3a1; }
/* Wording drill-down page */
.prompt-card .prompt-lead .ent { font-size:.95rem; }
.wording-prompt { font-size:.95rem; font-weight:800; margin:26px 0 10px; }
.wording-prompt:first-of-type { margin-top:4px; }
.type-tag { display:inline-block; border:1px solid #dfe4ef; background:#f7f9fc; color:var(--muted);
  border-radius:6px; padding:1px 8px; font-size:.66rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.04em; white-space:nowrap; }
.split-bar { display:flex; height:12px; border-radius:7px; overflow:hidden; background:#e6ecf6; max-width:340px; }
.split-bar span { display:block; height:100%; }
.split-bar .sb-search { background:var(--brand); }
.split-bar .sb-memory { background:#c3cddd; }

/* Theme ships a:hover{color:#353f4f!important}; white-text buttons must stay white.
   (Same bug exists in the live app; app.css gets this fix at build time.) */
.app-main a.btn-p:hover, .app-main a.btn-p:focus,
.app-main a.btn-danger:hover, .app-main a.btn-danger:focus { color:#fff !important; }

/* ---- Responsive ---- */
@media (max-width:1020px) {
  .mblock { grid-template-columns:200px minmax(0,1fr); }
  .mblock .m-rank { grid-column:1 / -1; }
  /* The fullchart variant keeps competitors beside the ring; only the chart
     spans. The wide SVG scales down here, so bump its viewBox-unit fonts to
     keep the axis text readable. */
  .mblock-fullchart .m-rank { grid-column:auto; }
  .m-spark-full svg text { font-size:15px; }
}
@media (max-width:640px) {
  .mblock { grid-template-columns:1fr; }
  .mblock .m-num .v { font-size:2.1rem; }
  .m-spark-full svg text { font-size:22px; }
  .kv { grid-template-columns:1fr; gap:2px 0; }
  .kv dt { margin-top:10px; }
}

/* ---- Pre-launch debug trace panel (REMOVE BEFORE LAUNCH with
   RequestTrace::ENABLED; see docs/LAUNCH-CHECKLIST.md) ---- */
.dbg-panel { max-width:1180px; margin:30px auto 40px; padding:0 22px;
  font-family:ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size:.72rem; color:var(--muted); }
.dbg-panel summary { cursor:pointer; user-select:none; padding:8px 0; }
.dbg-panel .dbg-hot { color:#b3403e; font-weight:700; }
.dbg-panel table { width:100%; border-collapse:collapse; margin-top:8px; background:#fff;
  border-radius:10px; overflow:hidden; box-shadow:var(--card-shadow); }
.dbg-panel td { padding:5px 9px; border-bottom:1px solid var(--line); vertical-align:top; }
.dbg-panel td.n { color:var(--faint); width:34px; text-align:right; }
.dbg-panel td.k { width:82px; font-weight:700; }
.dbg-panel td.ms { width:64px; text-align:right; font-variant-numeric:tabular-nums; }
.dbg-panel td.sql { overflow-wrap:anywhere; }
.dbg-panel tr.dbg-llm td.k { color:#b3403e; }
.dbg-panel tr.dbg-vendor td.k { color:#9a6b00; }
.dbg-panel tr.dbg-clickhouse td.k { color:#185abd; }

/* Answer-feed folding + date rail (2026-08-07, shared app/public answer pages):
   answers past the first 7 collapse into their meta line; the date rail
   reuses the jump-nav look and scrolls when the feed spans many days. */
.ans-fold { margin:0; }
.ans-fold > summary.ans-meta { cursor:pointer; display:block; list-style:none; }
.ans-fold > summary.ans-meta::-webkit-details-marker { display:none; }
.ans-fold > summary.ans-meta::before { content:"\203A"; display:inline-block; margin-right:7px; color:var(--muted); font-weight:800; }
.ans-fold[open] > summary.ans-meta::before { content:"\2039"; }
.jn-dates { max-height:60vh; overflow:auto; }

/* ---- Per-domain source report pieces, shared by the public source pages
   AND /app/citations (2026-08-08 parity round) ---- */
.src-sect { margin-top:16px; }
.src-sect:first-child { margin-top:6px; }
.src-trendrow { display:flex; gap:18px; align-items:flex-end; }
.src-spark { flex:0 0 auto; }
.src-spark rect { fill:#185abd; }
.src-spark rect.zero { fill:#d7dbe7; }
.src-pages td { vertical-align:top; }
.src-note { color:#6b7280; font-size:.82rem; margin:8px 0 0; }
.src-stats { display:flex; flex-wrap:wrap; gap:26px; margin:4px 0 10px; }
.src-stats .st { min-width:110px; }
.src-stats .st .v { font-size:1.35rem; font-weight:800; color:#353f4f; line-height:1.2; }
.src-stats .st .l { font-size:.78rem; color:#6b7280; }
.cite-prompts { margin-top:5px; font-size:.8rem; color:#6b7280; }
.cite-prompts a { color:#185abd; text-decoration:none; }
.cite-prompts a:hover { color:#124a9e !important; text-decoration:underline; }
@media (max-width:640px) { .src-trendrow { flex-direction:column; align-items:flex-start; gap:10px; } }

/* A12 demand-anchor input on the wizard topics panels (2026-08-08) */
.wiz-anchor { display:flex; align-items:center; gap:6px; margin:2px 0 8px; }
.wiz-anchor .ci { flex:none; }

/* ---- Mobile app pass (2026-08-10): stack the prompt list and settings form
   tables; hide secondary topic columns so Visibility Score stays on screen;
   cap who-leads favicon rows at 5. Read-only wide tables keep the approved
   inner-scroll pattern. ---- */
@media (max-width: 640px) {
    .m-hide { display: none !important; }
    table.prompts-table thead { display: none; }
    table.prompts-table tbody tr { display: block; padding: 10px 0; border-bottom: 1px solid #e7ecf5; }
    table.prompts-table tbody td { display: inline-block; border: 0; padding: 2px 10px 2px 0; vertical-align: middle; }
    table.prompts-table tbody td:first-child { display: block; padding: 0 0 6px; font-weight: 600; }
    table.m-formstack thead { display: none; }
    table.m-formstack tbody tr { display: block; padding: 12px 0; border-bottom: 1px solid #e7ecf5; }
    table.m-formstack tbody td { display: block; border: 0; padding: 4px 0; }
    table.m-formstack td.num::before { content: "Prompts: "; color: #8b93a7; }
    table.m-formstack .form-inline { flex-wrap: wrap; }
    table.m-formstack .ctl { width: 100%; max-width: none; flex: 1 1 100%; }
    .favrow .wl:nth-child(n+6) { display: none; }
}

/* ---- 2026-08-10 brand/answers round: collapsed answers as visible blocks;
   mobile topic-tab strip, single-column opportunities, attribute cleanups. */
.ans-fold > summary.ans-meta { background:#fff; border:1px solid #e2e8f4; border-radius:10px; padding:11px 14px; margin:0 0 10px; font-size:.84rem; color:var(--ink); box-shadow:var(--card-shadow); }
.ans-fold > summary.ans-meta:hover { border-color:#b9cdea; }
.ans-fold[open] > summary.ans-meta { margin-bottom:12px; }
@media (max-width: 640px) {
    /* Topic pills: one swipeable row instead of a wall of wrapped pills */
    .topic-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .topic-tabs .tchip { white-space: nowrap; flex: 0 0 auto; }
    /* Opportunities: three lines per item: tag, text, link (Akash) */
    .opp-list li { display: block; }
    .opp-list .opp-tag { display: block; width: fit-content; margin-bottom: 4px; }
    .opp-list li > span:not(.opp-tag) { display: block; }
    .opp-list .detail { display: block; margin-left: 0; margin-top: 4px; }
    /* Attributes table: no you-row accent in the stacked mobile view */
    #attributes tr.you, #attributes tr.you:hover, #attributes tr.you td { box-shadow: none; background: transparent; }
    /* Answers page h1 fits one line */
    h1.h1-c { font-size: 1.55rem; }
}

/* ---- 2026-08-20 (Akash): table column headings all carry a short explainer
   tooltip; the dotted underline is the hover cue (tips.js floats the bubble). */
.th-tip[data-tip] { text-decoration:underline dotted #c3cbd9; text-underline-offset:3px; cursor:help; }

/* ---- 2026-08-20 (Akash): the answers icon is ChatGPT's mark in ChatGPT green,
   the chat glyph did not stand out. Official vector (same petal as the homepage
   LLM panel) as a CSS mask so currentColor paints it; nominative use. */
/* .app-main a / .pub a outrank a bare class, so the color is set at their level */
.app-main a.chat-ico, .pub a.chat-ico, a.chat-ico { color:#10a37f; }
.app-main a.chat-ico:hover, .app-main a.chat-ico:focus, .pub a.chat-ico:hover, .pub a.chat-ico:focus,
a.chat-ico:hover, a.chat-ico:focus { background:#e6f6f1; color:#0b7a5f; }
.chat-ico .oai-mark { display:block; width:20px; height:20px; background-color:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%202406%202406'%3E%3Cpath%20d='M1107.3%20299.1c-197.999%200-373.9%20127.3-435.2%20315.3L650%20743.5v427.9c0%2021.4%2011%2040.4%2029.4%2051.4l344.5%20198.515V833.3h.1v-27.9L1372.7%20604c33.715-19.52%2070.44-32.857%20108.47-39.828L1447.6%20450.3C1361%20353.5%201237.1%20298.5%201107.3%20299.1zm0%20117.5-.6.6c79.699%200%20156.3%2027.5%20217.6%2078.4-2.5%201.2-7.4%204.3-11%206.1L952.8%20709.3c-18.4%2010.4-29.4%2030-29.4%2051.4V1248l-155.1-89.4V755.8c-.1-187.099%20151.601-338.9%20339-339.2z'/%3E%3Cpath%20d='M1107.3%20299.1c-197.999%200-373.9%20127.3-435.2%20315.3L650%20743.5v427.9c0%2021.4%2011%2040.4%2029.4%2051.4l344.5%20198.515V833.3h.1v-27.9L1372.7%20604c33.715-19.52%2070.44-32.857%20108.47-39.828L1447.6%20450.3C1361%20353.5%201237.1%20298.5%201107.3%20299.1zm0%20117.5-.6.6c79.699%200%20156.3%2027.5%20217.6%2078.4-2.5%201.2-7.4%204.3-11%206.1L952.8%20709.3c-18.4%2010.4-29.4%2030-29.4%2051.4V1248l-155.1-89.4V755.8c-.1-187.099%20151.601-338.9%20339-339.2z'%20transform='rotate(60%201203%201203)'/%3E%3Cpath%20d='M1107.3%20299.1c-197.999%200-373.9%20127.3-435.2%20315.3L650%20743.5v427.9c0%2021.4%2011%2040.4%2029.4%2051.4l344.5%20198.515V833.3h.1v-27.9L1372.7%20604c33.715-19.52%2070.44-32.857%20108.47-39.828L1447.6%20450.3C1361%20353.5%201237.1%20298.5%201107.3%20299.1zm0%20117.5-.6.6c79.699%200%20156.3%2027.5%20217.6%2078.4-2.5%201.2-7.4%204.3-11%206.1L952.8%20709.3c-18.4%2010.4-29.4%2030-29.4%2051.4V1248l-155.1-89.4V755.8c-.1-187.099%20151.601-338.9%20339-339.2z'%20transform='rotate(120%201203%201203)'/%3E%3Cpath%20d='M1107.3%20299.1c-197.999%200-373.9%20127.3-435.2%20315.3L650%20743.5v427.9c0%2021.4%2011%2040.4%2029.4%2051.4l344.5%20198.515V833.3h.1v-27.9L1372.7%20604c33.715-19.52%2070.44-32.857%20108.47-39.828L1447.6%20450.3C1361%20353.5%201237.1%20298.5%201107.3%20299.1zm0%20117.5-.6.6c79.699%200%20156.3%2027.5%20217.6%2078.4-2.5%201.2-7.4%204.3-11%206.1L952.8%20709.3c-18.4%2010.4-29.4%2030-29.4%2051.4V1248l-155.1-89.4V755.8c-.1-187.099%20151.601-338.9%20339-339.2z'%20transform='rotate(180%201203%201203)'/%3E%3Cpath%20d='M1107.3%20299.1c-197.999%200-373.9%20127.3-435.2%20315.3L650%20743.5v427.9c0%2021.4%2011%2040.4%2029.4%2051.4l344.5%20198.515V833.3h.1v-27.9L1372.7%20604c33.715-19.52%2070.44-32.857%20108.47-39.828L1447.6%20450.3C1361%20353.5%201237.1%20298.5%201107.3%20299.1zm0%20117.5-.6.6c79.699%200%20156.3%2027.5%20217.6%2078.4-2.5%201.2-7.4%204.3-11%206.1L952.8%20709.3c-18.4%2010.4-29.4%2030-29.4%2051.4V1248l-155.1-89.4V755.8c-.1-187.099%20151.601-338.9%20339-339.2z'%20transform='rotate(240%201203%201203)'/%3E%3Cpath%20d='M1107.3%20299.1c-197.999%200-373.9%20127.3-435.2%20315.3L650%20743.5v427.9c0%2021.4%2011%2040.4%2029.4%2051.4l344.5%20198.515V833.3h.1v-27.9L1372.7%20604c33.715-19.52%2070.44-32.857%20108.47-39.828L1447.6%20450.3C1361%20353.5%201237.1%20298.5%201107.3%20299.1zm0%20117.5-.6.6c79.699%200%20156.3%2027.5%20217.6%2078.4-2.5%201.2-7.4%204.3-11%206.1L952.8%20709.3c-18.4%2010.4-29.4%2030-29.4%2051.4V1248l-155.1-89.4V755.8c-.1-187.099%20151.601-338.9%20339-339.2z'%20transform='rotate(300%201203%201203)'/%3E%3C/svg%3E") center/contain no-repeat; mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%202406%202406'%3E%3Cpath%20d='M1107.3%20299.1c-197.999%200-373.9%20127.3-435.2%20315.3L650%20743.5v427.9c0%2021.4%2011%2040.4%2029.4%2051.4l344.5%20198.515V833.3h.1v-27.9L1372.7%20604c33.715-19.52%2070.44-32.857%20108.47-39.828L1447.6%20450.3C1361%20353.5%201237.1%20298.5%201107.3%20299.1zm0%20117.5-.6.6c79.699%200%20156.3%2027.5%20217.6%2078.4-2.5%201.2-7.4%204.3-11%206.1L952.8%20709.3c-18.4%2010.4-29.4%2030-29.4%2051.4V1248l-155.1-89.4V755.8c-.1-187.099%20151.601-338.9%20339-339.2z'/%3E%3Cpath%20d='M1107.3%20299.1c-197.999%200-373.9%20127.3-435.2%20315.3L650%20743.5v427.9c0%2021.4%2011%2040.4%2029.4%2051.4l344.5%20198.515V833.3h.1v-27.9L1372.7%20604c33.715-19.52%2070.44-32.857%20108.47-39.828L1447.6%20450.3C1361%20353.5%201237.1%20298.5%201107.3%20299.1zm0%20117.5-.6.6c79.699%200%20156.3%2027.5%20217.6%2078.4-2.5%201.2-7.4%204.3-11%206.1L952.8%20709.3c-18.4%2010.4-29.4%2030-29.4%2051.4V1248l-155.1-89.4V755.8c-.1-187.099%20151.601-338.9%20339-339.2z'%20transform='rotate(60%201203%201203)'/%3E%3Cpath%20d='M1107.3%20299.1c-197.999%200-373.9%20127.3-435.2%20315.3L650%20743.5v427.9c0%2021.4%2011%2040.4%2029.4%2051.4l344.5%20198.515V833.3h.1v-27.9L1372.7%20604c33.715-19.52%2070.44-32.857%20108.47-39.828L1447.6%20450.3C1361%20353.5%201237.1%20298.5%201107.3%20299.1zm0%20117.5-.6.6c79.699%200%20156.3%2027.5%20217.6%2078.4-2.5%201.2-7.4%204.3-11%206.1L952.8%20709.3c-18.4%2010.4-29.4%2030-29.4%2051.4V1248l-155.1-89.4V755.8c-.1-187.099%20151.601-338.9%20339-339.2z'%20transform='rotate(120%201203%201203)'/%3E%3Cpath%20d='M1107.3%20299.1c-197.999%200-373.9%20127.3-435.2%20315.3L650%20743.5v427.9c0%2021.4%2011%2040.4%2029.4%2051.4l344.5%20198.515V833.3h.1v-27.9L1372.7%20604c33.715-19.52%2070.44-32.857%20108.47-39.828L1447.6%20450.3C1361%20353.5%201237.1%20298.5%201107.3%20299.1zm0%20117.5-.6.6c79.699%200%20156.3%2027.5%20217.6%2078.4-2.5%201.2-7.4%204.3-11%206.1L952.8%20709.3c-18.4%2010.4-29.4%2030-29.4%2051.4V1248l-155.1-89.4V755.8c-.1-187.099%20151.601-338.9%20339-339.2z'%20transform='rotate(180%201203%201203)'/%3E%3Cpath%20d='M1107.3%20299.1c-197.999%200-373.9%20127.3-435.2%20315.3L650%20743.5v427.9c0%2021.4%2011%2040.4%2029.4%2051.4l344.5%20198.515V833.3h.1v-27.9L1372.7%20604c33.715-19.52%2070.44-32.857%20108.47-39.828L1447.6%20450.3C1361%20353.5%201237.1%20298.5%201107.3%20299.1zm0%20117.5-.6.6c79.699%200%20156.3%2027.5%20217.6%2078.4-2.5%201.2-7.4%204.3-11%206.1L952.8%20709.3c-18.4%2010.4-29.4%2030-29.4%2051.4V1248l-155.1-89.4V755.8c-.1-187.099%20151.601-338.9%20339-339.2z'%20transform='rotate(240%201203%201203)'/%3E%3Cpath%20d='M1107.3%20299.1c-197.999%200-373.9%20127.3-435.2%20315.3L650%20743.5v427.9c0%2021.4%2011%2040.4%2029.4%2051.4l344.5%20198.515V833.3h.1v-27.9L1372.7%20604c33.715-19.52%2070.44-32.857%20108.47-39.828L1447.6%20450.3C1361%20353.5%201237.1%20298.5%201107.3%20299.1zm0%20117.5-.6.6c79.699%200%20156.3%2027.5%20217.6%2078.4-2.5%201.2-7.4%204.3-11%206.1L952.8%20709.3c-18.4%2010.4-29.4%2030-29.4%2051.4V1248l-155.1-89.4V755.8c-.1-187.099%20151.601-338.9%20339-339.2z'%20transform='rotate(300%201203%201203)'/%3E%3C/svg%3E") center/contain no-repeat; }
