/* =============================================================================
   ANALYTICS DESIGN SYSTEM
   Ported verbatim from the GetIntel analytics UI mockup's <style> block.
   Token names (--bg, --text, --accent, --st-good, etc.) are intentionally
   distinct from the app's existing Tailwind @theme (--color-*) tokens, so
   this file is additive and does not touch the existing theme/overrides.

   SCOPING NOTE: a few rules in the mock style bare elements (*, body, table,
   thead th, tbody td, tr) at global scope. Per porting instructions those are
   NOT carried over unscoped — they're rescoped under the mock's own
   container classes (.app, .scroll) instead, or dropped where redundant with
   Tailwind's preflight. See inline notes at each spot below.
   ============================================================================= */

:root {
  --bg: #ede9e2; --surface: #f8f6f2; --surface-2: #f1eee7; --hover: #e9e5db;
  --border: #ddd8ce; --border-strong: #cec8ba;
  --text: #201d18; --text-muted: #6a655a; --text-faint: #9a9488;
  --accent: #6d5ef0; --accent-text: #6d5ef0; --accent-soft: #ebe7fa; --accent-soft-bd: #d9d3f5;
  --st-good: #4c8a3f; --st-warn: #b77a18; --st-bad: #c24e3a; --st-open-bd: #ddd8ce;
  --up: #2f9e5a; --down: #c24e3a; --flat: #9a9488;
  /* Domain-type palette (Top sources' Type column + the Domain types card) —
     6 categories, each visually distinct. Competitor/You deliberately reuse
     --st-bad/--accent (same meaning everywhere else in the app) rather than
     inventing a 7th/8th hue. */
  --dt-corporate: #3f6fb0; --dt-corporate-bg: #e6edf4;
  --dt-editorial: #7a57c0; --dt-editorial-bg: #efeaf6;
  --dt-ugc: #1d8a80; --dt-ugc-bg: #e0eeeb;
  --dt-reference: #a9781e; --dt-reference-bg: #f2ead8;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, "Cascadia Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(32,29,24,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f; --surface: #1c1a16; --surface-2: #23201b; --hover: #2a2620;
    --border: #34302a; --border-strong: #443e35;
    --text: #ece8e0; --text-muted: #a29c8e; --text-faint: #6c665a;
    --accent: #8a7cf5; --accent-text: #ab9ffb; --accent-soft: #221e38; --accent-soft-bd: #332c50;
    --st-good: #6fc07a; --st-warn: #dca24c; --st-bad: #ec6e58; --st-open-bd: #34302a;
    --up: #4cc27e; --down: #ec6e58; --flat: #6c665a; --shadow: 0 1px 2px rgba(0,0,0,.35);
    --dt-corporate: #6e9bf0; --dt-corporate-bg: #16223a;
    --dt-editorial: #a588f2; --dt-editorial-bg: #221b3a;
    --dt-ugc: #33b8b1; --dt-ugc-bg: #0e302e;
    --dt-reference: #d5a047; --dt-reference-bg: #2a2311;
  }
}
:root[data-theme="light"]{--bg:#ede9e2;--surface:#f8f6f2;--surface-2:#f1eee7;--hover:#e9e5db;--border:#ddd8ce;--border-strong:#cec8ba;--text:#201d18;--text-muted:#6a655a;--text-faint:#9a9488;--accent:#6d5ef0;--accent-text:#6d5ef0;--accent-soft:#ebe7fa;--accent-soft-bd:#d9d3f5;--st-good:#4c8a3f;--st-warn:#b77a18;--st-bad:#c24e3a;--st-open-bd:#ddd8ce;--up:#2f9e5a;--down:#c24e3a;--flat:#9a9488;--shadow:0 1px 2px rgba(32,29,24,.06);--dt-corporate:#3f6fb0;--dt-corporate-bg:#e6edf4;--dt-editorial:#7a57c0;--dt-editorial-bg:#efeaf6;--dt-ugc:#1d8a80;--dt-ugc-bg:#e0eeeb;--dt-reference:#a9781e;--dt-reference-bg:#f2ead8;}
:root[data-theme="dark"]{--bg:#14120f;--surface:#1c1a16;--surface-2:#23201b;--hover:#2a2620;--border:#34302a;--border-strong:#443e35;--text:#ece8e0;--text-muted:#a29c8e;--text-faint:#6c665a;--accent:#8a7cf5;--accent-text:#ab9ffb;--accent-soft:#221e38;--accent-soft-bd:#332c50;--st-good:#6fc07a;--st-warn:#dca24c;--st-bad:#ec6e58;--st-open-bd:#34302a;--up:#4cc27e;--down:#ec6e58;--flat:#6c665a;--shadow:0 1px 2px rgba(0,0,0,.35);--dt-corporate:#6e9bf0;--dt-corporate-bg:#16223a;--dt-editorial:#a588f2;--dt-editorial-bg:#221b3a;--dt-ugc:#33b8b1;--dt-ugc-bg:#0e302e;--dt-reference:#d5a047;--dt-reference-bg:#2a2311;}

/* Reset — mock had bare `* { box-sizing: border-box; }`; scoped to the
   analytics app shell so it doesn't touch the rest of the app. */
.app, .app * { box-sizing: border-box; }
/* Mock also had bare `body { margin: 0; }` — dropped: Tailwind's preflight
   (loaded via `@import 'tailwindcss'` in application.tailwind.css) already
   zeroes body margin app-wide, so this would have been a no-op reproduction
   of an already-global rule. */

.app { font-family: var(--sans); background: var(--bg); color: var(--text); min-height: 100vh; display: grid; grid-template-columns: 236px 1fr; font-size: 13.5px; -webkit-font-smoothing: antialiased; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* sidebar */
.sidebar { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 9px; padding: 17px 18px 15px; }
.brand .logo { width: 30px; height: 30px; object-fit: contain; display: block; flex-shrink: 0; }
.brand .name { font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.brand .name .g { color: var(--text-faint); font-weight: 500; }
.nav { padding: 6px 11px; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 9px; color: var(--text-muted); text-decoration: none; font-weight: 500; cursor: pointer; user-select: none; }
.nav a svg { width: 17px; height: 17px; stroke: currentColor; opacity: .9; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.nav a .tag { margin-left: auto; font-size: 10.5px; font-weight: 700; background: var(--accent-soft); color: var(--accent-text); border-radius: 20px; padding: 1px 8px; font-family: var(--mono); }
.sidebar .foot { padding: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.foot .who .n { font-weight: 600; font-size: 12.5px; } .foot .who .p { color: var(--text-faint); font-size: 11.5px; }

/* topbar */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 58px; border-bottom: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; gap: 14px; padding: 0 24px; position: sticky; top: 0; z-index: 5; }
.switcher { display: flex; align-items: center; gap: 9px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 6px 11px 6px 7px; cursor: pointer; background: var(--surface); font-weight: 600; }
.switcher .sq { width: 22px; height: 22px; border-radius: 6px; background: #e0533b; color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.switcher .chev { color: var(--text-faint); } .switcher .clients { font-size: 11.5px; color: var(--text-faint); font-weight: 500; }
.topbar .spacer { flex: 1; }
.topbar .meta { color: var(--text-faint); font-size: 12px; } .topbar .meta b { color: var(--text-muted); font-weight: 600; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--text); } .icon-btn svg { width: 16px; height: 16px; }

.page { padding: 24px 28px 60px; }
.view { display: none; } .view.on { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px);} to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) { .view.on { animation: none; } }

.tip { display: flex; align-items: center; gap: 10px; background: var(--accent-soft); border: 1px solid var(--accent-soft-bd); color: var(--text-muted); border-radius: 11px; padding: 11px 15px; font-size: 12.5px; margin-bottom: 22px; }
.tip .spark { color: var(--accent-text); } .tip b { color: var(--text); font-weight: 600; } .tip a { color: var(--accent-text); font-weight: 600; text-decoration: none; margin-left: auto; }

.head { margin-bottom: 20px; }
.head h1 { font-size: 21px; margin: 0 0 4px; letter-spacing: -.02em; font-weight: 650; }
.head p { margin: 0; color: var(--text-muted); font-size: 13px; }

/* composed header */
.hgrid { display: grid; grid-template-columns: 260px 1fr; gap: 14px; margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 18px 20px; box-shadow: none; }
.panel .lbl { font-size: 11px; color: var(--text-muted); font-weight: 550; text-transform: uppercase; letter-spacing: .05em; }
.bignum { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.bignum .v { font-size: 40px; font-weight: 680; letter-spacing: -.03em; line-height: 1; color: var(--accent-text); }
.bignum .d { font-size: 12.5px; font-weight: 600; font-family: var(--mono); color: var(--up); }
.spark { margin-top: 14px; display: block; }
.sub2 { color: var(--text-faint); font-size: 12px; margin-top: 12px; }

/* TrendChart — the full grid+area+line dedicated trend chart (Home's
   Visibility card, PromptDetailPage's "Visibility over time"). Distinct from
   the compact inline .spark above. */
.trendchart { display: flex; flex-direction: column; gap: 10px; }
.trendchart svg { display: block; width: 100%; height: auto; }
.tc-gl { stroke: var(--border); stroke-width: 1; }
.tc-empty { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 2 5; stroke-linecap: round; }
.tc-ln { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tc-ln-sec { fill: none; stroke-width: 1.5; stroke-dasharray: 4 4; stroke-linecap: round; }
.tc-area { opacity: .1; stroke: none; }
.tc-pt { stroke: var(--surface); stroke-width: 1.5; }
.tc-legend { display: flex; gap: 16px; font-size: 11px; color: var(--text-muted); }
.tc-key { display: inline-flex; align-items: center; gap: 6px; }
.tc-key i { width: 14px; height: 2px; border-radius: 2px; display: inline-block; flex-shrink: 0; }
.tc-key i.tc-dash { background-image: linear-gradient(90deg, currentColor 60%, transparent 60%); background-size: 6px 2px; background-color: transparent !important; }

.breakdown { display: flex; flex-direction: column; justify-content: center; }
.stacked { display: flex; height: 34px; border-radius: 9px; overflow: hidden; gap: 2px; }
.stacked span { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-family: var(--mono); font-size: 12.5px; min-width: 24px; }
.keys { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.keys .k { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.keys .k b { color: var(--text); font-weight: 650; font-family: var(--mono); }
.keys .sw { width: 11px; height: 11px; border-radius: 3px; }
.keys .ring { width: 11px; height: 11px; border-radius: 3px; border: 1.5px solid var(--st-open-bd); }

/* filters */
.filters { display: flex; align-items: center; gap: 8px; margin: 18px 0 14px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted); border-radius: 9px; padding: 6px 12px; font-size: 12.5px; font-weight: 550; cursor: pointer; }
.chip:hover { background: var(--hover); } .chip.active { background: var(--accent-soft); border-color: var(--accent-soft-bd); color: var(--accent-text); }
.chip .sw { width: 9px; height: 9px; border-radius: 3px; } .chip .ring { width: 9px; height: 9px; border-radius: 3px; border: 1.5px solid var(--st-open-bd); }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--text-muted); font: inherit; font-size: 12.5px; font-weight: 550; padding: 6px 14px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); } .seg button.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 6px 12px; background: var(--surface); color: var(--text-faint); font-size: 12.5px; min-width: 210px; }
.search input { border: 0; background: transparent; color: var(--text); font: inherit; outline: none; width: 100%; }

/* table */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; box-shadow: none; overflow: hidden; }
/* Flat, hairline-divided "panel-head" band — the workbench look (no floating
   shadow, banded header) instead of the earlier rounded/shadowed card. */
.card .ct { padding: 12px 20px; background: var(--surface-2); border-bottom: 1px solid var(--border); } .card .ct h3 { margin: 0; font-size: 13.5px; font-weight: 640; letter-spacing: -.01em; } .card .ct p { margin: 3px 0 0; color: var(--text-faint); font-size: 12px; }
.scroll { overflow-x: auto; }
/* Mock's `table { border-collapse: collapse; width: 100%; font-size: 13px; }`
   and `thead th`/`tbody td`/`tbody tr` rules were bare-element selectors
   applying to every <table> in the document. Every table in the mock lives
   inside a `.scroll` wrapper, so they're rescoped under `.scroll` here to
   avoid regressing unrelated tables elsewhere in the app. */
.scroll table { border-collapse: collapse; width: 100%; font-size: 13px; }
/* Denser, mono-headed table treatment (matches the analyst-workbench
   reference) — font-family + size + padding tightened; text-align default
   stays LEFT (not the mockup's right-default) since dozens of existing
   tables across the app assume a left-aligned first column and were never
   audited column-by-column for a safe global flip; numeric columns opt into
   right-align + tabular-nums via the existing `.num` class at the call site,
   same as before. */
.scroll thead th { text-align: left; font-family: var(--mono); font-weight: 600; color: var(--text-faint); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.scroll thead th.c { text-align: center; }
.scroll tbody td.c { text-align: center; }
.scroll tbody td.num, .scroll tbody td .num { font-variant-numeric: tabular-nums; }
.scroll tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.scroll tbody tr:last-child td { border-bottom: 0; } .scroll tbody tr:hover { background: var(--hover); }
.prompt-txt { font-weight: 500; }
.matrix th.eng, .matrix td.eng { min-width: 92px; } .matrix td.eng { text-align: center; padding: 10px 8px; }

/* engine header favicon + label */
.enghead { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; }
.fav { display: inline-grid; place-items: center; color: #fff; font-weight: 700; border-radius: 6px; flex-shrink: 0; font-family: var(--sans); }
.fav svg { width: 78%; height: 78%; display: block; }
.intcard .ico svg { width: 58%; height: 58%; display: block; }
.fav.xs { width: 14px; height: 14px; font-size: 8px; border-radius: 4px; } .fav.sm { width: 24px; height: 24px; font-size: 11px; } .fav.md { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
.enghead .en { font-size: 10.5px; color: var(--text-faint); text-transform: none; letter-spacing: 0; font-weight: 600; }

/* solid heatmap cells */
.cell { width: 34px; height: 21px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: #fff; letter-spacing: -.02em; }
.cell.rec { background: var(--st-good); } .cell.men { background: var(--st-warn); } .cell.abs { background: var(--st-bad); }
.cell.opn { background: transparent; color: var(--text-faint); box-shadow: inset 0 0 0 1.5px var(--st-open-bd); }
.cell.locked { background: transparent; color: var(--text-faint); box-shadow: inset 0 0 0 1.5px var(--border); font-size: 10px; opacity: .75; }

.vis { display: inline-flex; align-items: center; gap: 10px; }
.vis .frac { font-family: var(--mono); font-weight: 650; font-size: 13px; color: var(--text-muted); min-width: 26px; }
.vis .dots { display: inline-flex; gap: 3px; }
.vis .dots i { width: 15px; height: 6px; border-radius: 2px; background: var(--border-strong); } .vis .dots i.on { background: var(--accent); }

/* avatar stack */
.stack { display: inline-flex; align-items: center; }
.stack .fav { box-shadow: 0 0 0 2px var(--surface); margin-left: -8px; } .stack .fav:first-child { margin-left: 0; }
.stack .more { margin-left: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); font-weight: 600; }
/* engstrip — the "Cited on engines" column: neat, spaced, rounded engine
   icons (NOT an overlapping stack). Smaller than .fav.sm, real gap, no ring. */
.engstrip { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.engstrip .fav { width: 18px; height: 18px; margin-left: 0; border-radius: 6px; box-shadow: none; }
.engstrip .fav img { border-radius: 6px; }
/* tipwrap — instant hover tooltip for small icons (engine logos etc.) where
   the native `title` delay is too slow to be useful. Wrap the icon in
   `.tipwrap` and add a `<span class="tip">Label</span>` sibling. */
.tipwrap { position: relative; display: inline-flex; align-items: center; }
.tipwrap > .tip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--surface);
  font: 600 10px/1 var(--sans); white-space: nowrap;
  padding: 4px 7px; border-radius: 5px; letter-spacing: .01em;
  opacity: 0; pointer-events: none; transition: opacity .1s ease; z-index: 60;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.tipwrap > .tip::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--text);
}
/* placement: bottom */
.tipwrap > .tip.tip-bottom { bottom: auto; top: calc(100% + 6px); }
.tipwrap > .tip.tip-bottom::after {
  top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--text);
}
.tipwrap:hover > .tip, .tipwrap:focus-within > .tip { opacity: 1; }
/* Mock had bare `tr:hover .stack .fav`; rescoped under `.scroll` (all
   table rows in the mock live inside a `.scroll` table wrapper). */
.scroll tr:hover .stack .fav { box-shadow: 0 0 0 2px var(--hover); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 7px; }
.badge .d { width: 7px; height: 7px; border-radius: 2px; }
.badge.you { background: var(--accent-soft); color: var(--accent-text); } .badge.you .d { background: var(--accent); }
.badge.comp { background: color-mix(in srgb, var(--st-bad) 16%, var(--surface)); color: var(--st-bad); } .badge.comp .d { background: var(--st-bad); }
.badge.third { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); } .badge.third .d { background: var(--text-faint); }
/* .badge.comp above is now fully token-based (color-mix against --st-bad),
   so it already adapts correctly under both dark-mode paths — no separate
   dark override needed (the old hardcoded #2a1512/#ee8a80 pair is retired). */

/* Domain-type tag — the finer 6-way source typing (SourcesAggregatorService
   #domain_type_for): filled pill, mono label, one color per category.
   Competitor/You reuse .badge's existing semantic colors via the same
   token; Corporate/Editorial/UGC/Reference get their own --dt-* palette. */
.dtype { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 5px; white-space: nowrap; }
.dtype.corporate { color: var(--dt-corporate); background: var(--dt-corporate-bg); }
.dtype.editorial { color: var(--dt-editorial); background: var(--dt-editorial-bg); }
.dtype.ugc { color: var(--dt-ugc); background: var(--dt-ugc-bg); }
.dtype.reference { color: var(--dt-reference); background: var(--dt-reference-bg); }
.dtype.competitor { color: var(--st-bad); background: color-mix(in srgb, var(--st-bad) 16%, var(--surface)); }
.dtype.you { color: var(--accent-text); background: var(--accent-soft); }

/* Domain types breakdown card — colored dot + label + horizontal bar + %. */
.dtyperow { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.dtyperow .dl { display: flex; align-items: center; gap: 8px; width: 96px; flex-shrink: 0; font-size: 12.5px; color: var(--text); }
.dtyperow .dl .sw { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.dtytrack { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.dtytrack i { display: block; height: 100%; border-radius: 3px; }
.dtyperow .dp { font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); width: 32px; text-align: right; }

.src { display: flex; align-items: center; gap: 11px; } .src .u { font-weight: 550; } .src .path { color: var(--text-faint); font-size: 11.5px; font-family: var(--mono); }
.pct { display: inline-flex; align-items: center; gap: 11px; }
.pct .n { font-family: var(--mono); font-weight: 650; width: 40px; } .pct .bar { width: 130px; height: 7px; border-radius: 4px; background: var(--border); overflow: hidden; } .pct .bar i { display: block; height: 100%; border-radius: 4px; }
.trend { font-family: var(--mono); font-weight: 650; font-size: 12.5px; } .trend.up{color:var(--up)} .trend.down{color:var(--down)} .trend.flat{color:var(--flat)}
.muted { color: var(--text-faint); } .link { color: var(--accent-text); font-weight: 600; cursor: pointer; text-decoration: none; }
.win-hint { color: var(--text-muted); font-size: 12.5px; }
.you-row, .you-row:hover { background: var(--accent-soft); } .rank { font-family: var(--mono); color: var(--text-faint); font-weight: 600; }

.placeholder { border: 1px dashed var(--border-strong); border-radius: 9px; padding: 52px; text-align: center; color: var(--text-muted); background: var(--surface); }
.placeholder b { color: var(--text); } .placeholder .mini { font-size: 12.5px; margin-top: 6px; color: var(--text-faint); }

/* floating AI */
.fab { position: fixed; right: 26px; bottom: 26px; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(150deg, var(--accent), #a78bfa); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(109,94,240,.4); cursor: pointer; border: 0; }
.fab svg { width: 22px; height: 22px; }

@media (max-width: 940px){ .app{grid-template-columns:1fr} .sidebar{display:none} .hgrid{grid-template-columns:1fr} }

/* nav group (Signals → Reddit / X) */
.navgroup .children { display:none; flex-direction:column; gap:2px; margin-top:2px; }
.navgroup.open .children { display:flex; }
.grouphead { display:flex; align-items:center; gap:11px; padding:8px 11px; border-radius:9px; color:var(--text-muted); cursor:pointer; font-weight:500; user-select:none; }
.grouphead:hover { background:var(--hover); color:var(--text); }
.grouphead > svg:first-child { width:17px; height:17px; stroke:currentColor; opacity:.9; }
.grouphead .gchev { margin-left:auto; width:13px; height:13px; opacity:.7; transition:transform .16s; }
.navgroup.open .grouphead .gchev { transform:rotate(180deg); }
.nav a.child { padding-left:39px; }

/* state dot+label (used by Content status / In-AI-answers / task done) */
.sl { display:inline-flex; align-items:center; gap:7px; font-size:12.5px; font-weight:550; color:var(--text); white-space:nowrap; }
.sl .d { width:9px; height:9px; border-radius:3px; } .sl .ring { width:9px; height:9px; border-radius:3px; border:1.5px solid var(--st-open-bd); }
.sl.rec .d { background:var(--st-good); } .sl.men .d { background:var(--st-warn); } .sl.abs .d { background:var(--st-bad); }

/* health badges */
.hb { display:inline-block; font-size:10.5px; font-weight:600; padding:2px 7px; border-radius:6px; border:1px solid var(--border-strong); color:var(--text-muted); background:var(--surface-2); margin-right:4px; }
.hb.warn { color:var(--st-warn); }

/* tasks */
.tt { font-size:11px; font-weight:600; padding:3px 9px; border-radius:6px; background:var(--surface-2); border:1px solid var(--border); color:var(--text-muted); display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.tt .d { width:7px; height:7px; border-radius:2px; }
.imp { font-family:var(--mono); font-weight:650; color:var(--st-good); font-size:12.5px; }
.eff { font-size:10.5px; font-weight:600; padding:2px 8px; border-radius:5px; background:var(--surface-2); border:1px solid var(--border); color:var(--text-faint); }
.fixtag { color:var(--text-muted); font-size:12px; }
.cbx { width:17px; height:17px; border-radius:5px; border:1.6px solid var(--border-strong); display:inline-block; cursor:pointer; vertical-align:middle; background:var(--surface); }
.approve { background:var(--accent); color:#fff; border:0; padding:6px 14px; border-radius:8px; font-weight:600; font-size:12px; cursor:pointer; font-family:inherit; }
.approve:hover { filter:brightness(1.06); }
.agstat { font-size:11.5px; color:var(--text-faint); font-style:italic; }
.asg { width:23px; height:23px; border-radius:50%; display:inline-grid; place-items:center; font-size:10px; font-weight:700; color:#fff; }
.tasks-card.m-check .a-agentic { display:none; } .tasks-card.m-agent .a-check { display:none; }

/* signals */
.rel { font-size:11px; font-weight:600; padding:2px 10px; border-radius:20px; }
.rel.high { color:var(--st-good); background:color-mix(in srgb, var(--st-good) 15%, transparent); }
.rel.med { color:var(--text-muted); background:var(--surface-2); border:1px solid var(--border); }
.thr .t { font-weight:550; } .thr .m { color:var(--text-faint); font-size:11.5px; margin-top:2px; }
.eng-n { font-family:var(--mono); color:var(--text-faint); font-size:12px; white-space:nowrap; }
.youtag { font-size:11px; font-weight:650; color:var(--accent-text); background:var(--accent-soft); padding:2px 9px; border-radius:6px; }

/* history timeline */
.timeline { display:flex; flex-direction:column; }
.tl-item { display:grid; grid-template-columns:56px 18px 1fr; gap:13px; padding-bottom:16px; }
.tl-date { font-family:var(--mono); font-size:11.5px; color:var(--text-faint); text-align:right; padding-top:2px; }
.tl-mark { position:relative; display:flex; justify-content:center; }
.tl-mark .dot { width:11px; height:11px; border-radius:50%; margin-top:3px; z-index:1; box-shadow:0 0 0 3px var(--surface); }
.tl-mark::before { content:''; position:absolute; top:3px; bottom:-16px; left:50%; width:1.5px; background:var(--border); transform:translateX(-50%); }
.tl-item:last-child { padding-bottom:0; } .tl-item:last-child .tl-mark::before { display:none; }
.tl-title { font-weight:550; font-size:13.5px; }
.tl-desc { color:var(--text-muted); font-size:12.5px; margin-top:3px; }
.tl-note { background:var(--accent-soft); border:1px solid var(--accent-soft-bd); border-radius:9px; padding:9px 12px; }
.tl-note .tl-title { color:var(--accent-text); }

/* bottom nav */
.botnav { margin-top:auto; padding:10px 11px 6px; display:flex; flex-direction:column; gap:2px; border-top:1px solid var(--border); }
.botnav a { display:flex; align-items:center; gap:11px; padding:8px 11px; border-radius:9px; color:var(--text-muted); text-decoration:none; font-weight:500; cursor:pointer; }
.botnav a svg { width:17px; height:17px; stroke:currentColor; opacity:.9; }
.botnav a:hover { background:var(--hover); color:var(--text); }
.botnav a.active { background:var(--accent-soft); color:var(--accent-text); font-weight:600; }

/* integrations */
.cat-lbl { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--text-faint); margin:22px 0 11px; }
.cat-lbl:first-of-type { margin-top:4px; }
.intgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:13px; }
.intcard { border:1px solid var(--border); border-radius:12px; padding:15px 16px; background:var(--surface); display:flex; gap:13px; align-items:center; }
.intcard .ico { width:38px; height:38px; border-radius:10px; display:grid; place-items:center; color:#fff; font-weight:700; font-size:15px; flex-shrink:0; }
.intcard .nm { font-weight:600; font-size:13.5px; }
.intcard .ds { color:var(--text-muted); font-size:12px; margin-top:2px; line-height:1.4; }
.intcard .act { margin-left:auto; flex-shrink:0; padding-left:8px; }
.conn { color:var(--st-good); font-weight:600; font-size:12px; display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.btn-o { border:1px solid var(--border-strong); background:var(--surface); padding:6px 15px; border-radius:8px; font-weight:600; font-size:12px; cursor:pointer; color:var(--text); font-family:inherit; }
.btn-o:hover { background:var(--hover); }
/* Plan-gated integration card — dims name/desc, swaps the action area for
   a lock chip. Card stays clickable (routes to /plans), so no disabled
   cursor override here — the parent sets cursor via inline style. */
.intcard.locked .nm, .intcard.locked .ds { opacity:.65; }
.lock-chip { display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:650; color:var(--accent-text); background:var(--accent-soft); border:1px solid var(--accent-soft-bd); border-radius:20px; padding:4px 11px; white-space:nowrap; }

/* pricing */
.usage { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; margin-top:18px; }
.usage .ul { display:flex; justify-content:space-between; font-size:12.5px; margin-bottom:7px; color:var(--text-muted); } .usage .ul b { font-family:var(--mono); color:var(--text); }
.meter { height:7px; border-radius:4px; background:var(--border); overflow:hidden; } .meter i { display:block; height:100%; background:var(--accent); border-radius:4px; }
/* Runs-cap states (Pricing usage meter) — amber at 80%+, red once exhausted. */
.meter.warn i { background:var(--st-warn); }
.meter.bad i { background:var(--st-bad); }
.usage .ul.warn b { color:var(--st-warn); }
.usage .ul.bad b { color:var(--st-bad); }
.usage-note { font-size:11.5px; margin-top:6px; }
.usage-note.warn { color:var(--st-warn); }
.usage-note.bad { color:var(--st-bad); }
.plans { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:16px; }
.plan { border:1px solid var(--border); border-radius:14px; padding:22px 20px; background:var(--surface); display:flex; flex-direction:column; }
.plan.cur { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.plan .pn { font-weight:650; font-size:15px; display:flex; align-items:center; }
.plan .badge-cur { font-size:10px; font-weight:700; color:var(--accent-text); background:var(--accent-soft); padding:2px 8px; border-radius:20px; margin-left:8px; text-transform:uppercase; letter-spacing:.04em; }
.plan .price { font-size:30px; font-weight:680; letter-spacing:-.03em; margin:12px 0 2px; } .plan .price small { font-size:13px; color:var(--text-faint); font-weight:500; letter-spacing:0; }
.plan ul { list-style:none; padding:0; margin:16px 0 20px; display:flex; flex-direction:column; gap:10px; flex:1; }
.plan li { font-size:12.5px; font-weight:600; color:var(--text); display:flex; gap:9px; align-items:flex-start; line-height:1.4; } .plan li svg { width:15px; height:15px; color:var(--st-good); flex-shrink:0; margin-top:1px; }
.cta { border:0; border-radius:9px; padding:10px; font-weight:600; font-size:13px; cursor:pointer; font-family:inherit; width:100%; }
.cta.pri { background:var(--accent); color:#fff; } .cta.pri:hover { filter:brightness(1.06); }
.cta.sec { background:var(--surface-2); border:1px solid var(--border-strong); color:var(--text); } .cta.sec:hover { background:var(--hover); }
.cta.dis { background:var(--surface-2); color:var(--text-faint); cursor:default; }

/* --- Pricing: conversion treatment (elevated popular tier, taglines,
   founding-member scarcity strip, trust row). --- */
.plans { align-items:stretch; }
.plan { position:relative; transition:transform .16s ease, box-shadow .16s ease; }
.plan .tag { font-size:11.5px; color:var(--text-faint); font-weight:500; margin-top:3px; }
.plan .price { font-size:34px; }

/* Most-popular tier: accent ring + glow, lifted above its neighbours, with a
   ribbon whose text comes from data-badge. */
.plan.pop { border:1.5px solid var(--accent); box-shadow:0 16px 46px -18px color-mix(in srgb, var(--accent) 55%, transparent); transform:translateY(-10px); }
.plan.pop:hover { transform:translateY(-13px); box-shadow:0 20px 52px -18px color-mix(in srgb, var(--accent) 60%, transparent); }
.plan.pop::before { content:attr(data-badge); position:absolute; top:-11px; left:50%; transform:translateX(-50%); background:var(--accent); color:#fff; font-size:9.5px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; padding:4px 13px; border-radius:20px; white-space:nowrap; box-shadow:0 5px 14px -3px color-mix(in srgb, var(--accent) 65%, transparent); }
.plan.pop .price { color:var(--accent-text); }

/* A feature line that's really a section label (ends with ":") — no check, bolder. */
.plan li.grp { color:var(--text-faint); font-weight:720; font-size:11px; text-transform:uppercase; letter-spacing:.04em; margin-top:7px; }
.plan li.grp svg { display:none; }

/* Founding-member scarcity strip above the cards. */
.founding { display:flex; align-items:center; gap:14px 18px; flex-wrap:wrap; background:var(--accent-soft); border:1px solid var(--accent-soft-bd); border-radius:12px; padding:12px 16px; margin-bottom:16px; }
.founding .fh { display:inline-flex; align-items:center; gap:7px; font-size:12.5px; font-weight:660; color:var(--accent-text); white-space:nowrap; }
.founding .fh svg { width:15px; height:15px; }
.founding .fbar { flex:1; min-width:150px; }
.founding .fsub { font-size:11.5px; color:var(--text-muted); white-space:nowrap; }
.founding .fsub b { font-family:var(--mono); color:var(--accent-text); }

/* Trust / reassurance row under the cards. */
.trust { display:flex; flex-wrap:wrap; gap:9px 24px; justify-content:center; margin-top:20px; }
.trust span { display:inline-flex; align-items:center; gap:7px; font-size:12px; color:var(--text-muted); }
.trust svg { width:14px; height:14px; color:var(--st-good); flex-shrink:0; }

@media (max-width:720px) { .plan.pop, .plan.pop:hover { transform:none; } }

/* Locked-engines upsell strip (Prompts matrix) — accent-soft banner + a
   compact solid accent button (NOT the full-width .cta). */
.upsell { margin-top:16px; display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:13px 18px; background:var(--accent-soft); border:1px solid var(--accent-soft-bd); border-radius:12px; }
.upsell-msg { flex:1; min-width:220px; display:flex; align-items:center; gap:10px; font-size:12.5px; color:var(--text-muted); line-height:1.4; }
.upsell-msg svg { flex-shrink:0; }
.upsell-msg b { color:var(--text); font-weight:600; }
.upsell-cta { background:var(--accent); color:#fff; font-weight:600; font-size:12.5px; padding:8px 16px; border-radius:9px; white-space:nowrap; text-decoration:none; }
.upsell-cta:hover { filter:brightness(1.06); }

/* settings */
.settings { display:grid; grid-template-columns:196px 1fr; gap:28px; align-items:start; }
.setmenu { display:flex; flex-direction:column; gap:1px; position:sticky; top:20px; }
.setmenu a { padding:8px 12px; border-radius:8px; font-size:13px; color:var(--text-muted); font-weight:500; cursor:pointer; text-decoration:none; }
.setmenu a:hover { background:var(--hover); color:var(--text); } .setmenu a.active { background:var(--accent-soft); color:var(--accent-text); font-weight:600; }
.setmenu .danger { color:var(--st-bad); margin-top:8px; }
.setpanel { max-width:640px; }
.field { margin-bottom:18px; max-width:420px; } .field label { display:block; font-size:12.5px; font-weight:600; margin-bottom:6px; } .field .hint { color:var(--text-faint); font-size:11.5px; margin-top:7px; line-height:1.4; }
.inp { border:1px solid var(--border-strong); border-radius:8px; padding:9px 11px; background:var(--surface); font:inherit; font-size:13px; color:var(--text); width:100%; }
.save { background:var(--accent); color:#fff; border:0; padding:9px 18px; border-radius:9px; font-weight:600; font-size:13px; cursor:pointer; font-family:inherit; }
.sec-title { font-size:15px; font-weight:640; margin:0 0 4px; } .sec-sub { color:var(--text-faint); font-size:12.5px; margin:0 0 20px; }
.divider { height:1px; background:var(--border); margin:28px 0; }

/* skeleton loading — shimmer sweep for async placeholders. Base/highlight
   reuse the existing --border/--border-strong tokens (already theme-aware
   via the @media/[data-theme] blocks at the top of this file), so it's
   soothing-subtle in both themes without a new token or touching either
   theme block. */
.skel {
  display: inline-block;
  vertical-align: middle;
  background: linear-gradient(90deg, var(--border) 25%, var(--border-strong) 37%, var(--border) 63%);
  background-size: 400% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
}
.skel.block { display: block; }
.skel-text { display: flex; flex-direction: column; }
@keyframes skel-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .skel { animation: none; background: var(--border); }
}

/* home */
.midnum { font-size:27px; font-weight:680; letter-spacing:-.02em; line-height:1; } .midnum small { font-size:14px; color:var(--text-faint); font-weight:500; }
.home-hero .v-brand { display:none; }
.home-hero.mode-brand .v-agency { display:none; } .home-hero.mode-brand .v-brand { display:block; }
.pbars { display:flex; flex-direction:column; gap:9px; margin-top:14px; }
.pbar { display:grid; grid-template-columns:74px 1fr 30px; align-items:center; gap:10px; font-size:12px; color:var(--text-muted); }
.pbar .track { height:6px; border-radius:3px; background:var(--border); overflow:hidden; } .pbar .track i { display:block; height:100%; background:var(--accent); border-radius:3px; }
.pbar b { font-family:var(--mono); text-align:right; color:var(--text); font-weight:600; }
.glance { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:16px; }
.gcard { border:1px solid var(--border); border-radius:9px; background:var(--surface); padding:16px 18px; }
.gcard .gh { display:flex; align-items:center; justify-content:space-between; margin-bottom:13px; }
.gcard .gh .t { font-weight:600; font-size:13px; }
.glist { display:flex; flex-direction:column; gap:11px; }
.grow { display:flex; align-items:center; gap:10px; font-size:12.5px; color:var(--text-muted); } .grow .txt { flex:1; min-width:0; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .grow .tail { margin-left:auto; white-space:nowrap; font-size:11.5px; }
.gdot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
/* Signal glance rows: let a long thread/post title wrap to 2 lines (clamped)
   instead of truncating to one — dot + tail top-align to the first line. */
.grow.gwrap { align-items:flex-start; }
.grow.gwrap .txt { white-space:normal; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; line-height:1.35; }
.grow.gwrap .gdot { margin-top:5px; }
.grow.gwrap .tail { margin-top:1px; }
.fourstate { display:grid; grid-template-columns:1fr 1fr; gap:11px 18px; }
.fs { display:flex; align-items:center; gap:9px; font-size:13px; } .fs .n { margin-left:auto; font-family:var(--mono); font-weight:650; color:var(--text); }
.rp { display:flex; flex-direction:column; }
.rprow { display:grid; grid-template-columns:1fr auto 34px; align-items:center; gap:18px; padding:9px 0; border-bottom:1px solid var(--border); font-size:13px; }
.rprow:last-child { border-bottom:0; }
.rptxt { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--text); }
.rpcells { display:flex; gap:5px; }
.rphead { display:grid; grid-template-columns:1fr auto 34px; gap:18px; align-items:center; padding:0 0 10px; }
.rpcell-h { width:34px; display:flex; align-items:center; justify-content:center; }

/* Home redesign (2026-07, AI-visibility-first): 6-col varied-span grid with
   equal-height cards, plus SoV-bars / donut / activity-strip visuals. Scoped
   under .home-glance so the shared .glance (Settings/LedgerFeed) is untouched. */
.home-glance { display:grid; grid-template-columns:repeat(6,1fr); gap:16px; margin-top:16px; }
.home-glance .gcard { display:flex; flex-direction:column; }
.home-glance .w2 { grid-column:span 2; } .home-glance .w3 { grid-column:span 3; }
.home-glance .w4 { grid-column:span 4; } .home-glance .w6 { grid-column:span 6; }
@media (max-width:940px){ .home-glance { grid-template-columns:1fr; } .home-glance .w2,.home-glance .w3,.home-glance .w4,.home-glance .w6 { grid-column:auto; } }

/* BrandBars (Home "Visibility" card) — real Y-axis + gridlines + a fixed 0%
   baseline, and fills whatever height the grid row stretches the card to
   (matching its .w3 row-mate) instead of a small fixed box with dead space. */
.bb-wrap { flex:1; display:flex; flex-direction:column; min-height:0; }
.bb-plot { flex:1; display:flex; gap:8px; min-height:110px; }
.bb-axis { flex-shrink:0; width:26px; display:flex; flex-direction:column; justify-content:space-between; text-align:right; font-family:var(--mono); font-size:9.5px; color:var(--text-faint); padding:1px 0; }
.bb-field { position:relative; flex:1; min-width:0; }
.bb-gl { position:absolute; left:0; right:0; height:1px; background:var(--border); }
.bb-bars { position:absolute; inset:0; display:flex; align-items:flex-end; gap:10px; }
.bb-col { flex:1; min-width:0; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; }
.bb-val { font-size:10.5px; color:var(--text-faint); margin-bottom:6px; }
.bb-bar { width:100%; max-width:30px; border-radius:4px 4px 2px 2px; }
.bb-labels { display:flex; gap:8px; margin-top:8px; }
.bb-axis-spacer { width:26px; flex-shrink:0; }
.bb-label-row { flex:1; min-width:0; display:flex; gap:10px; }
.bb-label-row .bb-col { height:auto; }

/* Home hero row retired (2026-07 minimal-Home redesign) — every card now
   lives in the single .home-glance grid above, so spacing is uniform. */

/* Share-of-voice horizontal bars (Competitive position card) */
.sovbars { display:flex; flex-direction:column; gap:11px; }
.sovrow { display:grid; grid-template-columns:22px 64px 1fr 38px; align-items:center; gap:9px; }
.sovrow .nm { font-size:12.5px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sovrow .track { height:8px; border-radius:4px; background:var(--border); overflow:hidden; }
.sovrow .track i { display:block; height:100%; border-radius:4px; background:var(--text-faint); }
.sovrow .v { font-family:var(--mono); font-weight:650; font-size:12px; text-align:right; color:var(--text-muted); }
.sovrow.you .nm { font-weight:700; color:var(--accent-text); } .sovrow.you .track i { background:var(--accent); } .sovrow.you .v { color:var(--accent-text); }

/* Answer-state donut (How you show up card) */
.donutwrap { display:flex; align-items:center; gap:16px; }
.donut { position:relative; width:98px; height:98px; flex-shrink:0; }
.donut svg { width:98px; height:98px; display:block; }
.donutctr { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.donutctr b { font-family:var(--mono); font-size:19px; font-weight:680; letter-spacing:-.02em; line-height:1; }
.donutctr span { font-size:9px; color:var(--text-faint); text-transform:uppercase; letter-spacing:.06em; margin-top:2px; }
.dlegend { display:flex; flex-direction:column; gap:9px; flex:1; min-width:0; }
.dl { display:flex; align-items:center; gap:8px; font-size:12.5px; } .dl .sl { flex:1; } .dl b { font-family:var(--mono); font-weight:650; margin-left:auto; }

/* "What changed" horizontal activity strip */
.changed3 { display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
.chg { display:flex; align-items:flex-start; gap:9px; font-size:12.5px; color:var(--text); line-height:1.42; } .chg .gdot { margin-top:5px; } .chg b { font-weight:650; }
@media (max-width:940px){ .changed3 { grid-template-columns:1fr; gap:12px; } }

/* Full-page loader (PageLoader.jsx) — branded mark pulsing inside a spinning
   accent ring, centered in the page content area. */
.pageloader { min-height: calc(100vh - 140px); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:22px; }
.pageloader-mark { position:relative; width:112px; height:112px; display:grid; place-items:center; }
.pageloader-mark img { width:64px; height:64px; object-fit:contain; animation: pl-pulse 1.6s ease-in-out infinite; }
.pageloader-ring { position:absolute; inset:0; border-radius:50%; border:3px solid var(--border); border-top-color: var(--accent); animation: pl-spin .8s linear infinite; }
.pageloader-label { color: var(--text-muted); font-size:18px; font-weight:500; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
@keyframes pl-pulse { 0%,100% { opacity:.5; transform:scale(.92); } 50% { opacity:1; transform:scale(1); } }
@media (prefers-reduced-motion: reduce){ .pageloader-ring{ animation:none } .pageloader-mark img{ animation:none; opacity:1 } }
.visnum { font-family:var(--mono); font-weight:650; font-size:12.5px; color:var(--text-muted); text-align:right; }

/* Themed date picker (ui/analytics/DatePicker) — single + range modes. */
.dpick { position: relative; display: inline-block; }
.dpick-trigger { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; font: inherit; font-size: 12px; line-height: 1.4; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; cursor: pointer; }
.dpick-trigger:hover { border-color: var(--accent); }

/* Prompts page header actions — date picker + model filter + Add prompt,
   normalized to one height so they line up cleanly at the top-right. */
.promptbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.promptbar .save,
.promptbar .chip,
.promptbar .dpick-trigger { height:34px; box-sizing:border-box; display:inline-flex; align-items:center; }
.promptbar .save { padding-top:0; padding-bottom:0; }
.dpick-clear { margin-left: 2px; color: var(--text-faint); font-size: 14px; line-height: 1; border-radius: 4px; padding: 0 2px; }
.dpick-clear:hover { color: var(--text); background: var(--hover); }
.dpick-pop { position: absolute; top: calc(100% + 6px); z-index: 200; width: 248px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.22); }
.dpick-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dpick-title { font-size: 12.5px; font-weight: 620; color: var(--text); }
.dpick-nav { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text-muted); cursor: pointer; font-size: 15px; line-height: 1; }
.dpick-nav:hover { background: var(--hover); color: var(--text); }
.dpick-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dpick-wk { margin-bottom: 2px; }
.dpick-wkd { text-align: center; font-size: 10px; font-weight: 600; color: var(--text-faint); padding: 2px 0; }
.dpick-day { height: 30px; border: none; border-radius: 7px; font: inherit; font-size: 11.5px; font-weight: 500; color: var(--text); background: transparent; cursor: pointer; }
.dpick-day:hover { background: var(--hover); }
.dpick-day.between { background: var(--accent-soft); }
.dpick-day.today { box-shadow: inset 0 0 0 1px var(--border-strong); }
.dpick-day.sel, .dpick-day.sel:hover { background: var(--accent); color: #fff; font-weight: 700; box-shadow: none; }
.dpick-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.dpick-clearlink { background: none; border: none; padding: 0; font: inherit; font-size: 11.5px; color: var(--text-muted); cursor: pointer; }
.dpick-clearlink:hover { color: var(--text); text-decoration: underline; }
.dpick-apply { background: var(--accent); color: #fff; border: none; border-radius: 7px; font: inherit; font-size: 11.5px; font-weight: 600; padding: 5px 14px; cursor: pointer; }
.dpick-apply:hover:not(:disabled) { filter: brightness(1.06); }
.dpick-apply:disabled { opacity: .5; cursor: default; }
