/* Brand Radar · Voom Digital
   Navy and red come from voomdigital.net. Motion follows three rules:
   only transform and opacity move, nothing lasts over 300ms, and things
   the user sees on every refresh do not animate. */
:root {
  color-scheme: dark;
  --bg: #010a24;
  --sidebar: #010d2d;
  --panel: #06153a;
  --panel-raised: #0a1c47;
  --field: #020f30;
  --stroke: #16285a;
  --stroke-strong: #2a3d73;
  --text: #f1f3f9;
  --text-soft: #c3cbe0;
  --muted: #8f9bbb;
  --faint: #66739a;
  --red: #e11d24;
  --red-deep: #c1121f;
  --red-soft: #e11d2424;
  --green: #45d18f;
  --green-soft: #45d18f1f;
  --amber: #f0b45c;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --radius: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.55 "Open Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }

/* Layout */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 26px 14px 20px; background: var(--sidebar); border-right: 1px solid var(--stroke);
}
.brand-lockup { display: block; padding: 0 10px 28px; }
.brand-lockup img { display: block; width: 168px; height: auto; }
.product-name {
  display: block; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--stroke);
  font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
}
.product-name small { display: block; margin-top: 4px; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.nav { display: grid; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  color: var(--muted); font-weight: 600; font-size: 13.5px;
  transition: color 150ms ease, background-color 150ms ease;
}
.nav-link svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-link.active { background: var(--panel-raised); color: var(--text); box-shadow: inset 2px 0 var(--red); }
.side-label { padding: 30px 12px 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.provider-list { display: grid; gap: 11px; padding: 0 12px; }
.provider-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-soft); }
.provider-row .left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.provider-row small { color: var(--faint); font-size: 11px; white-space: nowrap; }
.status-pip { width: 7px; height: 7px; border-radius: 50%; background: var(--stroke-strong); flex: none; }
.status-pip.ready { background: var(--green); }
.sidebar-bottom { margin-top: auto; padding: 18px 12px 0; border-top: 1px solid var(--stroke); font-size: 12px; color: var(--faint); }
.sidebar-bottom a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--stroke-strong); }
.main { min-width: 0; }
.content { max-width: 1320px; margin: 0 auto; padding: 44px 44px 72px; }

/* Headings */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
h1 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }
.page-heading p { margin-top: 8px; color: var(--muted); max-width: 62ch; }

/* Buttons: every pressable thing answers the press */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 9px; border: 1px solid transparent;
  font-weight: 650; font-size: 13.5px; white-space: nowrap;
  transition: transform 140ms var(--ease-out), background-color 150ms ease, border-color 150ms ease;
}
.button:active:not(:disabled) { transform: scale(.97); }
.button.primary { background: var(--red); color: #fff; }
.button.outline { background: transparent; border-color: var(--stroke-strong); color: var(--text); }
.button.small { padding: 8px 12px; font-size: 12.5px; }
.button.full { width: 100%; margin-top: 6px; padding: 12px 16px; }
.text-button {
  background: none; border: 0; padding: 6px 8px; border-radius: 6px; color: var(--text-soft);
  font-size: 12.5px; font-weight: 650;
  transition: transform 140ms var(--ease-out), color 150ms ease, background-color 150ms ease;
}
.text-button:active { transform: scale(.97); }
.icon-button, .delete-button {
  border: 0; background: transparent; color: var(--faint); font-size: 14px; line-height: 1;
  padding: 8px; border-radius: 7px;
  transition: transform 140ms var(--ease-out), color 150ms ease, background-color 150ms ease;
}
.icon-button:active, .delete-button:active { transform: scale(.94); }

/* Fields */
input, textarea, select {
  background: var(--field); color: var(--text); border: 1px solid var(--stroke-strong);
  border-radius: 9px; padding: 10px 12px; min-width: 0; outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=checkbox] { accent-color: var(--red); width: 16px; height: 16px; padding: 0; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }

/* Toolbar and filters */
.toolbar {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  padding: 16px 18px; margin-bottom: 18px; background: var(--panel);
  border: 1px solid var(--stroke); border-radius: var(--radius);
}
.project-selector { min-width: 300px; }
.project-selector label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.project-selector select { width: 100%; }
.toolbar-actions { display: flex; align-items: center; gap: 18px; }
.sync-note { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.date-filter { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.date-filter label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.date-filter input { padding: 7px 10px; }
.date-filter .sync-note { align-self: center; margin-left: 4px; }
.context-line { color: var(--muted); font-size: 12.5px; margin-bottom: 20px; }

/* Metrics */
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card {
  background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 18px 20px; min-width: 0;
  animation: rise 320ms var(--ease-out) backwards;
}
.metric-card:nth-child(2) { animation-delay: 40ms; }
.metric-card:nth-child(3) { animation-delay: 80ms; }
.metric-card:nth-child(4) { animation-delay: 120ms; }
.metric-card:nth-child(n+5) { animation-delay: 160ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.metric-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.metric-value { display: block; margin: 8px 0 4px; font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.metric-card p { font-size: 12px; color: var(--faint); overflow-wrap: anywhere; }
.metric-card p strong { color: var(--text-soft); font-weight: 600; }

/* Panels */
.two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; margin-top: 14px; }
.panel { background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 22px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.panel h2 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.panel-heading p { margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.panel-footnote { color: var(--faint); font-size: 11.5px; margin-top: 20px; }
.tiny-pill { white-space: nowrap; font-size: 11.5px; color: var(--muted); border: 1px solid var(--stroke-strong); border-radius: 99px; padding: 3px 10px; font-variant-numeric: tabular-nums; }

/* Bars: scaled, never resized, so they stay on the compositor */
.bars { display: grid; gap: 16px; }
.bar-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.bar-head span:first-child { font-size: 13px; font-weight: 600; color: var(--text); }
.bar-head > small { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.bar-track { height: 8px; border-radius: 99px; background: var(--stroke); overflow: hidden; }
.bar-fill { height: 100%; width: 100%; border-radius: 99px; background: var(--red); transform-origin: left center; transition: transform 500ms var(--ease-out); }
.bar-fill.alt { background: #5b6c9c; }
.bars.fresh .bar-fill { @starting-style { transform: scaleX(0); } }
.competitor-delete { font-size: 12px; padding: 4px 8px; flex-shrink: 0; }

/* Lists */
.results-list, .prompt-list, .jobs-list { display: grid; gap: 8px; }
#resultPromptFilter { width: 100%; margin-bottom: 16px; }
.results-list { max-height: 640px; overflow: auto; }
.result-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; width: 100%;
  padding: 12px 14px; text-align: left; background: var(--panel-raised);
  border: 1px solid var(--stroke); border-radius: 10px;
  transition: transform 140ms var(--ease-out), border-color 150ms ease;
}
.result-row:active { transform: scale(.99); }
.result-row small { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.result-row h3 { margin-top: 4px; font-size: 13px; line-height: 1.45; font-weight: 600; color: var(--text); }
.result-meta { display: flex; gap: 6px; align-items: center; flex: none; }
.tag { font-size: 11px; font-weight: 650; border-radius: 6px; padding: 3px 8px; background: var(--stroke); color: var(--muted); white-space: nowrap; }
.tag.yes { background: var(--green-soft); color: var(--green); }
.tag.no { background: var(--stroke); color: var(--muted); }
.pack-actions { margin-bottom: 20px; }
.pack-actions p { margin-top: 10px; }
.prompt-form { margin-bottom: 12px; }
.prompt-form textarea { width: 100%; min-height: 76px; resize: vertical; }
.prompt-form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.prompt-form-bottom select { width: 130px; }
.prompt-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--stroke); }
.prompt-item > div:first-child { flex: 1; min-width: 0; }
.prompt-item p { color: var(--text-soft); font-size: 12.5px; line-height: 1.5; }
.prompt-item small { display: block; margin-top: 3px; color: var(--faint); font-size: 11.5px; }
.prompt-actions { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.jobs-panel { margin-top: 14px; }
.jobs-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.job-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; background: var(--panel-raised); border: 1px solid var(--stroke); border-radius: 10px; min-width: 0; }
.job-row > span { font-size: 12.5px; font-weight: 650; color: var(--text); min-width: 0; }
.job-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-label { align-self: center; flex: none; font-size: 11px; font-weight: 650; padding: 3px 8px; border-radius: 6px; background: var(--stroke); color: var(--muted); }
.status-label.done { background: var(--green-soft); color: var(--green); }
.status-label.failed { background: #f0b45c1f; color: var(--amber); }
.status-label.running { background: var(--red-soft); color: #ff8b90; }
.method-note { font-size: 11.5px; color: var(--faint); text-align: center; max-width: 80ch; margin: 24px auto 0; }
.muted, .quiet { color: var(--muted); font-size: 12.5px; line-height: 1.55; }

/* Empty state */
.empty-panel { border: 1px dashed var(--stroke-strong); border-radius: 16px; background: var(--panel); padding: 72px 28px; text-align: center; }
.empty-panel h2 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.empty-panel p { max-width: 52ch; color: var(--muted); margin: 10px auto 22px; }

/* Dialogs stay centred, so they scale from the centre */
.modal {
  background: var(--panel); color: var(--text); border: 1px solid var(--stroke-strong);
  border-radius: 16px; box-shadow: 0 30px 90px #00000080; padding: 0;
  width: min(94vw, 480px); max-height: 90vh; overflow-y: auto;
  opacity: 0; transform: scale(.97);
  transition: opacity 150ms ease, transform 150ms var(--ease-out), overlay 150ms allow-discrete, display 150ms allow-discrete;
}
.modal[open] { opacity: 1; transform: none; transition-duration: 220ms; }
@starting-style { .modal[open] { opacity: 0; transform: scale(.96); } }
.modal.wide { width: min(94vw, 780px); }
.modal::backdrop { background: #00041299; opacity: 0; transition: opacity 150ms ease, overlay 150ms allow-discrete, display 150ms allow-discrete; }
.modal[open]::backdrop { opacity: 1; transition-duration: 220ms; }
@starting-style { .modal[open]::backdrop { opacity: 0; } }
.modal-inner { padding: 26px; }
.modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.modal-heading h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.modal label { display: block; color: var(--text-soft); font-size: 12.5px; font-weight: 600; margin-bottom: 14px; }
.modal label input:not([type=checkbox]) { display: block; width: 100%; margin-top: 6px; font-weight: 400; }
.modal .toggle-label, .provider-form .toggle-label { display: flex; align-items: center; gap: 10px; }
.modal-description { color: var(--muted); margin-bottom: 14px; font-size: 12.5px; }
#runSummary { max-height: 240px; overflow: auto; line-height: 1.65; }
.run-providers { display: grid; gap: 8px; margin: 14px 0 16px; }
.run-provider { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--stroke); border-radius: 10px; padding: 12px 14px; background: var(--panel-raised); }
.run-provider label { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13.5px; color: var(--text); }
.run-provider small { color: var(--muted); font-size: 11.5px; }
.quote { background: var(--panel-raised); border-left: 2px solid var(--red); padding: 12px 14px; margin-bottom: 12px; color: var(--text-soft); border-radius: 0 8px 8px 0; font-size: 13px; }
.answer-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.answer-text { margin: 0; font: 13px/1.75 inherit; font-family: inherit; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--field); border: 1px solid var(--stroke); color: var(--text-soft); padding: 16px; border-radius: 10px; max-height: 420px; overflow: auto; }
.modal h3 { font-size: 13px; font-weight: 700; margin: 20px 0 8px; }
.citation-links { display: grid; gap: 6px; overflow-wrap: anywhere; font-size: 12.5px; }
.citation-links a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--stroke-strong); }

/* Toast enters from the edge it leaves by */
#toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: min(420px, calc(100vw - 48px));
  background: var(--panel-raised); border: 1px solid var(--stroke-strong); color: var(--text);
  padding: 12px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 12px 40px #00000066;
  opacity: 0; transform: translateY(calc(100% + 24px)); pointer-events: none;
  transition: opacity 180ms ease, transform 180ms var(--ease-out);
}
#toast.visible { opacity: 1; transform: none; transition-duration: 280ms; }

/* Settings */
.settings-notice { border: 1px solid var(--stroke); background: var(--panel); padding: 16px 20px; border-radius: var(--radius); color: var(--text-soft); margin-bottom: 12px; }
.settings-notice strong { color: var(--text); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.provider-card { min-width: 0; }
.provider-card h2 { font-size: 17px; }
.provider-form { display: grid; gap: 12px; }
.provider-form label { display: grid; gap: 6px; color: var(--text-soft); font-size: 12.5px; font-weight: 600; }
.provider-form input:not([type=checkbox]), .provider-form select { width: 100%; font-weight: 400; }
.provider-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.provider-feedback { min-height: 20px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.provider-feedback.error { color: var(--amber); }
.provider-feedback.success { color: var(--green); }

/* Hover only where a pointer can hover */
@media (hover: hover) and (pointer: fine) {
  .nav-link:hover { color: var(--text); background: var(--panel); }
  .nav-link.active:hover { background: var(--panel-raised); }
  .button.primary:hover:not(:disabled) { background: #ef3138; }
  .button.outline:hover:not(:disabled) { background: var(--panel-raised); border-color: #3b518f; }
  .text-button:hover { color: var(--text); background: var(--panel-raised); }
  .icon-button:hover { color: var(--text); background: var(--panel-raised); }
  .delete-button:hover { color: #ff8b90; background: var(--red-soft); }
  .result-row:hover { border-color: var(--stroke-strong); }
  .citation-links a:hover, .sidebar-bottom a:hover { color: var(--text); }
}

@media (max-width: 1180px) {
  .app { grid-template-columns: 216px minmax(0, 1fr); }
  .brand-lockup img { width: 148px; }
  .content { padding: 32px 24px 56px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--stroke); }
  .brand-lockup { display: flex; align-items: center; gap: 14px; padding: 0 0 12px; }
  .brand-lockup img { width: 120px; }
  .product-name { margin: 0; padding: 0 0 0 14px; border-top: 0; border-left: 1px solid var(--stroke); font-size: 12px; }
  .product-name small, .sidebar .side-label, .sidebar .provider-list, .sidebar-bottom { display: none; }
  .nav { display: flex; gap: 4px; overflow-x: auto; margin: 0 -4px; }
  .nav-link { padding: 8px 10px; font-size: 12.5px; white-space: nowrap; }
  .nav-link.active { box-shadow: inset 0 -2px var(--red); }
  .content { padding: 24px 16px 48px; }
  .page-heading, .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-actions { justify-content: space-between; }
  .project-selector { min-width: 0; }
  .metrics-grid { gap: 10px; }
  .metric-card { padding: 14px 16px; }
  .metric-value { font-size: 27px; }
  .jobs-list, .settings-grid { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  .prompt-item { flex-direction: column; align-items: stretch; }
  .prompt-actions { justify-content: flex-start; }
}
@media (max-width: 440px) { .metrics-grid { grid-template-columns: 1fr; } }

/* Less motion, not none: keep the fades, drop the movement */
@media (prefers-reduced-motion: reduce) {
  .metric-card { animation: none; }
  .modal, .modal[open], #toast, #toast.visible { transform: none; }
  .bar-fill { transition: none; }
  .button, .text-button, .icon-button, .delete-button, .result-row { transition-property: color, background-color, border-color; }
  .button:active:not(:disabled), .text-button:active, .icon-button:active, .delete-button:active, .result-row:active { transform: none; }
}

/* Verdict: the one sentence a director should leave with */
.verdict { background: var(--panel); border: 1px solid var(--stroke); border-left: 3px solid var(--red); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 14px; }
.verdict-text { font-size: clamp(18px, 1.7vw, 23px); line-height: 1.4; font-weight: 600; letter-spacing: -.01em; text-wrap: pretty; max-width: 62ch; }
.verdict-text strong { color: #ff6a70; font-weight: 700; }
.verdict-note { margin-top: 8px; color: var(--muted); font-size: 13px; }
.bar-row.is-brand .bar-head span:first-child { color: #fff; }
.bar-fill.rival { background: #5b6c9c; }
.rank-badge { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--stroke); color: var(--text-soft); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.is-brand .rank-badge { background: var(--red); color: #fff; }
.gap-list, .source-list, .client-list { display: grid; }
.gap-item { padding: 13px 0; border-top: 1px solid var(--stroke); }
.gap-item:first-child, .source-item:first-child, .client-row:first-child { border-top: 0; padding-top: 0; }
.gap-item p { font-size: 13px; color: var(--text); line-height: 1.5; }
.gap-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.gap-item small b { color: var(--amber); font-weight: 600; }
.source-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--stroke); font-size: 13px; }
.source-item span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }
.source-item small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.source-item.own span:first-child { color: #fff; font-weight: 600; }

/* Account and clients */
.account { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.account-name { color: var(--text); font-weight: 600; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .text-button { padding: 4px 6px; font-size: 12px; white-space: nowrap; }
.quota-note { margin-bottom: 8px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.client-form { display: grid; grid-template-columns: 1.3fr 1fr .8fr auto; gap: 12px; align-items: end; margin-bottom: 14px; }
.client-form label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.client-form input { width: 100%; font-weight: 400; }
.secret-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--panel-raised); border: 1px solid var(--green); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px; }
.secret-box p { color: var(--muted); font-size: 12.5px; margin: 2px 0 8px; }
.secret-box code { font: 600 16px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; user-select: all; }
.secret-actions { display: flex; align-items: center; gap: 6px; }
.client-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--stroke); flex-wrap: wrap; }
.client-row h3 { font-size: 14px; font-weight: 650; }
.client-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.client-row.inactive h3 { color: var(--faint); }
.client-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.client-actions input[type=number] { width: 84px; padding: 6px 8px; }
.client-actions select { padding: 6px 8px; max-width: 220px; }
.brands-panel { margin-top: 14px; }
@media (max-width: 900px) { .client-form { grid-template-columns: 1fr; } }

/* Login */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(900px 500px at 50% -10%, #0b2260 0%, transparent 70%), var(--bg); }
.login-card { width: min(100%, 380px); background: var(--panel); border: 1px solid var(--stroke); border-radius: 18px; padding: 34px 30px 26px; box-shadow: 0 30px 90px #00000066; animation: rise 320ms var(--ease-out) backwards; }
.login-card img { display: block; width: 190px; height: auto; margin-bottom: 26px; }
.login-card h1 { font-size: 15px; letter-spacing: .22em; text-transform: uppercase; }
.login-lead { color: var(--muted); margin: 6px 0 24px; }
.login-card label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-soft); margin-bottom: 14px; }
.login-card input { width: 100%; font-weight: 400; padding: 11px 12px; }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--faint); text-align: center; }
.login-foot a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--stroke-strong); }
@media (prefers-reduced-motion: reduce) { .login-card { animation: none; } }

/* Tracking, trend */
.tracking-field { display: grid; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.tracking-field select { padding: 7px 10px; font-weight: 400; color: var(--text); }
.toolbar-actions { flex-wrap: wrap; justify-content: flex-end; }
.trend-panel { margin-top: 14px; }
.trend-chart svg { display: block; width: 100%; height: auto; max-height: 240px; color: var(--text); overflow: visible; }

/* Real traffic and Google */
.traffic-panel { margin-top: 14px; }
.traffic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.traffic-box .metric-value { margin-bottom: 2px; }
.traffic-box .bars, .traffic-box .source-list { margin-top: 18px; }
.google-settings { margin-top: 14px; }
.google-settings textarea { width: 100%; resize: vertical; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.copy-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--field); border: 1px solid var(--stroke); border-radius: 9px; padding: 8px 8px 8px 12px; margin: 12px 0 18px; }
.copy-line code { font: 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; user-select: all; }
@media (max-width: 900px) { .traffic-grid { grid-template-columns: 1fr; } }

/* Site audit */
.audit-panel { margin-top: 14px; scroll-margin-top: 16px; }
.audit-head { display: flex; align-items: center; gap: 22px; padding-bottom: 20px; margin-bottom: 6px; border-bottom: 1px solid var(--stroke); }
.audit-score { flex: none; width: 104px; height: 104px; border-radius: 50%; border: 3px solid var(--red); display: grid; place-content: center; text-align: center; }
.audit-score b { font-size: 34px; line-height: 1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.audit-score span { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.audit-verdict { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 4px; }
.audit-item { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: start; padding: 14px 0; border-top: 1px solid var(--stroke); }
.audit-item:first-child { border-top: 0; }
.audit-item .tag { justify-self: start; }
.audit-item h3 { font-size: 13.5px; font-weight: 650; margin-bottom: 2px; }
.audit-advice { margin-top: 6px; font-size: 13px; color: var(--text); max-width: 78ch; }
.audit-sub { font-size: 13.5px; font-weight: 700; margin: 22px 0 6px; }
.tag.warn { background: #f0b45c1f; color: var(--amber); }
.tag.bad { background: var(--red-soft); color: #ff8b90; }
.source-item a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--stroke-strong); }
@media (max-width: 640px) { .audit-item { grid-template-columns: 1fr; gap: 6px; } .audit-head { flex-direction: column; align-items: flex-start; } }

/* Content to create, and readable long answers */
.content-panel { margin-top: 14px; scroll-margin-top: 16px; }
.opportunity { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.opportunity > div { min-width: 0; }
.draft-form { display: flex; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--stroke); }
.draft-form input { flex: 1; }
.draft-open { text-align: left; padding: 2px 0; color: var(--text); white-space: normal; }
.draft-checks { background: #f0b45c14; border: 1px solid #f0b45c40; border-radius: 10px; padding: 12px 16px; margin: 12px 0; }
.draft-checks:empty { display: none; }
.draft-checks h3 { margin: 0 0 6px; color: var(--amber); }
.draft-checks ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-soft); }
.answer-text.rich { white-space: normal; font-size: 13.5px; line-height: 1.65; max-height: min(52vh, 560px); color: var(--text-soft); }
.answer-text.rich h3 { font-size: 16px; margin: 0 0 10px; color: var(--text); }
.answer-text.rich h4 { font-size: 14px; font-weight: 700; margin: 18px 0 6px; color: var(--text); }
.answer-text.rich p { margin: 0 0 10px; }
.answer-text.rich ul { margin: 0 0 10px; padding-left: 20px; }
.answer-text.rich li { margin-bottom: 4px; }
.answer-text.rich strong { color: var(--text); font-weight: 650; }
.answer-text.rich a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--stroke-strong); }
#draftDialog .provider-actions { margin-top: 14px; }
@media (max-width: 640px) { .opportunity, .draft-form { flex-direction: column; align-items: stretch; } }

/* Perception, themes, suggestions */
.perception-panel, .themes-panel { margin-top: 14px; scroll-margin-top: 16px; }
.perception-portrait { font-size: 16px; line-height: 1.5; font-weight: 600; letter-spacing: -.01em; max-width: 78ch; text-wrap: pretty; margin-bottom: 20px; }
.perception-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.perception-grid h3 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.perception-grid ul { margin: 0; padding-left: 18px; color: var(--text-soft); font-size: 13px; }
.perception-grid li { margin-bottom: 6px; }
.theme-list { display: grid; }
.theme-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr); gap: 22px; align-items: center; padding: 13px 0; border-top: 1px solid var(--stroke); }
.theme-row:first-child { border-top: 0; padding-top: 0; }
.theme-row h3 { font-size: 13.5px; font-weight: 650; }
.theme-row small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.theme-gauge span { display: block; font-size: 12px; color: var(--text-soft); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.suggest-list { display: grid; gap: 6px; margin: 16px 0; max-height: 52vh; overflow: auto; }
.modal .suggest-item { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 11px 13px; border: 1px solid var(--stroke); border-radius: 10px; background: var(--panel-raised); font-weight: 500; font-size: 13.5px; color: var(--text); cursor: pointer; }
.suggest-item input { margin-top: 3px; flex: none; }
.suggest-item small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.pack-actions .button + .button { margin-left: 6px; }
@media (max-width: 900px) { .perception-grid { grid-template-columns: 1fr; } .theme-row { grid-template-columns: 1fr; gap: 10px; } }

/* Real robot visits */
.bots-panel { margin-top: 14px; scroll-margin-top: 16px; }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.file-button { cursor: pointer; }
.bots-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 4px; }
.bots-kpis .metric-card { background: var(--panel-raised); animation: none; }
.plain-list { margin: 10px 0 0; padding-left: 18px; color: var(--text-soft); font-size: 13px; }
.plain-list li { margin-bottom: 6px; }
@media (max-width: 760px) { .bots-kpis { grid-template-columns: 1fr; } }

/* Free trial, measure in progress and tailored offer */
.trial-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--panel-raised); border: 1px solid var(--stroke-strong); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 22px; }
.trial-banner.ended { border-color: var(--amber); }
.trial-banner strong { font-size: 14px; }
.trial-banner p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.measure-banner { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }
.measure-banner p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.measure-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.8); } }
.nav-badge { margin-left: auto; min-width: 20px; text-align: center; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: var(--red); color: #fff; font-variant-numeric: tabular-nums; }
.offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal label select, .modal label textarea { display: block; width: 100%; margin-top: 6px; font-weight: 400; }
.modal label textarea { resize: vertical; }
.client-row.handled h3, .client-row.handled small { color: var(--faint); }
.client-row .tag { margin-left: 8px; vertical-align: 1px; }
.offer-note { white-space: pre-wrap; }
.signup-shell { width: min(100%, 940px); display: grid; grid-template-columns: 1.1fr 400px; gap: 48px; align-items: center; }
.signup-pitch img { display: block; width: 168px; height: auto; margin-bottom: 30px; }
.signup-kicker { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-soft); font-weight: 700; }
.signup-pitch h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; letter-spacing: -.02em; margin: 10px 0 14px; text-wrap: balance; }
.signup-lead { color: var(--text-soft); font-size: 15.5px; line-height: 1.6; max-width: 46ch; }
.signup-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.signup-points li { padding-left: 16px; border-left: 2px solid var(--red); color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.signup-points b { display: block; color: var(--text); font-size: 14.5px; font-weight: 650; }
.signup-steps { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; counter-reset: step; color: var(--text-soft); font-size: 12.5px; }
.signup-steps li { counter-increment: step; }
.signup-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 7px; border-radius: 50%; border: 1px solid var(--stroke-strong); font-size: 11px; font-weight: 700; color: var(--text); }
.signup-card { width: 100%; }
.signup-card h2 { font-size: 20px; letter-spacing: -.01em; }
.signup-card label small { font-weight: 400; color: var(--faint); }
.login-card .signup-consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--muted); line-height: 1.45; }
.login-card .signup-consent input { width: 16px; flex: none; margin-top: 2px; }
.login-trial { font-size: 13px; color: var(--text-soft); }
@media (max-width: 860px) {
  .signup-shell { grid-template-columns: 1fr; gap: 28px; }
  .signup-points, .signup-steps { display: none; }
  .signup-pitch img { margin-bottom: 18px; }
}
@media (max-width: 520px) { .offer-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .measure-dot { animation: none; } }

/* Group overview */
.group-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); margin-top: 18px; align-items: start; }
.group-list { display: grid; }
.group-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, 1.2fr); gap: 18px; align-items: center; width: 100%; padding: 13px 8px; margin: 0 -8px; border: 0; border-top: 1px solid var(--stroke); border-radius: 8px; background: none; text-align: left; cursor: pointer; transition: background-color 150ms ease; }
.group-row:first-child { border-top: 0; }
.group-row:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.group-row b { display: block; font-size: 14px; font-weight: 650; }
.group-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-score { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; font-variant-numeric: tabular-nums; }
.group-score strong { font-size: 15px; }
.group-score .bar-track { margin: 0; }
.group-rank small { white-space: normal; }
.group-row.absent .group-score strong { color: var(--amber); }
.group-filter { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
@media (hover: hover) and (pointer: fine) { .group-row:hover { background: var(--panel-raised); } }
@media (max-width: 900px) { .group-cols { grid-template-columns: 1fr; } .group-row { grid-template-columns: 1fr; gap: 8px; } }

/* Key insights: the three or four things to remember, before any chart */
.insights { margin: 14px 0; padding: 18px 22px; background: var(--panel-raised); border: 1px solid var(--stroke-strong); border-radius: var(--radius); }
.insights h2 { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); font-weight: 700; margin-bottom: 12px; }
.insights ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.insights li { position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.45; color: var(--text); text-wrap: pretty; }
.insights li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.insights li.good::before { background: var(--green); }
.insights li.warn::before { background: var(--amber); }
.insights li.bad::before { background: var(--red); }
.insights li b { font-weight: 700; }
.zone-title { margin: 34px 0 12px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
#dashboard > .panel, #dashboard > .two-col { margin-top: 14px; }

/* Questions and answers: one row per question, one pill per assistant */
.qa-manage { margin-bottom: 22px; padding: 16px; background: var(--field); border: 1px solid var(--stroke); border-radius: 10px; }
.qa-manage .pack-actions { margin-bottom: 14px; }
.qa-list { display: grid; }
.qa-group { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; padding-bottom: 8px; border-bottom: 1px solid var(--stroke-strong); }
.qa-group:first-child { margin-top: 0; }
.qa-group h3 { font-size: 14px; font-weight: 700; }
.qa-group small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.qa-group small b { color: var(--text); font-weight: 650; }
.qa-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--stroke); }
.qa-row:last-child { border-bottom: 0; }
.qa-question p { font-size: 14px; line-height: 1.45; color: var(--text); text-wrap: pretty; }
.qa-question small { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.qa-question small b { color: var(--amber); font-weight: 600; }
.qa-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.qa-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--stroke-strong); background: none; font-size: 12.5px; font-weight: 600; color: var(--text-soft); cursor: pointer; white-space: nowrap; transition: transform 140ms var(--ease-out), border-color 150ms ease, background-color 150ms ease; }
.qa-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.qa-chip small { font-weight: 400; color: var(--muted); }
.qa-chip.yes { border-color: #45d18f66; color: var(--text); }
.qa-chip.yes i { background: var(--green); }
.qa-chip.no i { background: none; box-shadow: inset 0 0 0 1.5px var(--amber); }
.qa-chip.none { cursor: default; opacity: .55; }
.qa-chip:active:not(:disabled) { transform: scale(.97); }
.qa-chip:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.qa-actions { display: flex; align-items: center; gap: 2px; }
@media (hover: hover) and (pointer: fine) { .qa-chip:hover:not(:disabled) { background: var(--panel-raised); border-color: var(--text-soft); } }
@media (max-width: 900px) { .insights ul { grid-template-columns: 1fr; } .qa-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .qa-chip { transition-property: border-color, background-color; } .qa-chip:active:not(:disabled) { transform: none; } }

.stack { display: grid; gap: 14px; align-content: start; min-width: 0; }
.qa-list > .quiet { margin: 8px 0 2px; }

/* 18/11 — score, change since last measure, tone, split by language and place */
.verdict { display: flex; gap: 26px; align-items: center; }
.verdict-body { min-width: 0; }
.score-box { flex: none; display: grid; gap: 2px; padding-right: 26px; border-right: 1px solid var(--stroke); cursor: help; }
.score-box[hidden] { display: none; }
.score-label { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.score-value b { font-size: 56px; line-height: 1; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: #fff; }
.score-value i { font-style: normal; font-size: 16px; color: var(--faint); margin-left: 3px; }
.score-delta { font-size: 12px; color: var(--muted); min-height: 16px; }
.delta { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.up { color: var(--green); }
.delta.down { color: #ff8b90; }
.delta.flat { color: var(--muted); }
.tone-bar { display: flex; gap: 3px; height: 12px; border-radius: 99px; overflow: hidden; }
.tone-part { min-width: 6px; }
.tone-part.positive, .tone-item.positive i { background: var(--green); }
.tone-part.neutral, .tone-item.neutral i { background: #5b6c9c; }
.tone-part.negative, .tone-item.negative i { background: var(--amber); }
.tone-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.tone-item { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.tone-item i { width: 8px; height: 8px; border-radius: 50%; }
.tone-item b { font-size: 20px; font-variant-numeric: tabular-nums; }
.tone-item span, .tone-item small { grid-column: 2; font-size: 12px; color: var(--muted); }
.tone-item small { color: var(--faint); }
.split-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.split-cols > div[hidden] { display: none; }
.split-cols .audit-sub { margin-top: 0; }
.qa-marks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.variant-form { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--stroke); }
.variant-form strong { font-size: 13px; }
.variant-fields { display: flex; gap: 10px; flex-wrap: wrap; }
.variant-fields select { flex: 0 0 170px; }
.variant-fields input { flex: 1 1 240px; }
.prompt-form-bottom input { flex: 1 1 200px; min-width: 0; }
@media (max-width: 720px) {
  .verdict { flex-direction: column; align-items: flex-start; gap: 16px; }
  .score-box { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--stroke); padding-bottom: 14px; width: 100%; }
  .score-value b { font-size: 44px; }
  .tone-legend { grid-template-columns: 1fr; }
}
