/* Design system: calm workspace. Soft grey canvas, white cards on a light tray, hairline borders and
   barely-there shadows, Inter at medium weight, one deep-blue primary button per view, a dark button for the
   second most important thing, and four chart accents (orange, blue, purple, teal). */
:root {
  --primary: #1f5fae;
  --primary-focus: #2a6cc0;
  --primary-on-dark: #6aa6f2;
  --primary-soft: rgba(31, 95, 174, .08);
  --ink: #18181b;
  --ink-80: #3f3f46;
  --muted: #6b6b73;
  --ink-48: #9b9ba3;
  --divider: #efeff1;
  --hairline: #e6e6e9;
  --canvas: #ffffff;
  --parchment: #f4f4f5;
  --tray: #f7f7f8;
  --app-bg: #f1f1f2;
  --tile: #1c1c1f;
  --tile-2: #26262a;
  --black: #111113;
  --body-on-dark: #ffffff;
  --muted-on-dark: #c4c4cc;
  /* status semantics, used sparingly next to labels (never as decoration) */
  --good: #15803d;  --good-bg: #e9f6ee;  --good-dot: #22a35a;
  --bad: #c62828;   --bad-bg: #fcecec;   --bad-dot: #e0413b;
  --warn: #a35b00;  --warn-bg: #fdf3e2;
  /* chart accents */
  --c-orange: #e9a062; --c-blue: #2c66ad; --c-purple: #9b7cf0; --c-teal: #22a088; --c-empty: #ececee;
  --display: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --text: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --shadow-xs: 0 1px 2px rgba(16, 16, 24, .05);
  --shadow-sm: 0 1px 2px rgba(16, 16, 24, .06), 0 1px 1px rgba(16, 16, 24, .03);
  --shadow-pop: 0 12px 32px rgba(16, 16, 24, .14), 0 2px 6px rgba(16, 16, 24, .06);
  --side-w: 248px;
  --nav-h: 64px;  /* the top bar; fixed panels (sheet, drawer) start below it */
  /* surfaces and tints that flip in dark mode */
  --field: #e8e8ea; --field-hover: #e3e3e6; --field-2: #ececee;
  --hover-tint: var(--hover-tint); --hover-tint-2: rgba(0, 0, 0, .06);
  --grid-line: #ececf0; --row-hover: #f6f8fc; --row-selected: #eaf1fa; --row-you: #f3f8ee; --subtle-bg: #fbfbfd;
  --border-strong: #dfdfe3; --scroll-thumb: #cfcfd5; --scroll-thumb-hover: #b4b4bc; --placeholder: #c7c7cc;
  --skeleton-a: #f0f0f2; --skeleton-b: #f7f7f9; --track-empty: #e4e4e7; --dot-off: #f0eeeb;
  --frost: var(--frost); --frost-strong: var(--frost-strong); --scrim: rgba(16, 16, 24, .28);
  --inverse-bg: #18181b; --inverse-fg: #ffffff; --tip-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  --focus-ring: rgba(31, 95, 174, .14); --primary-tint: rgba(0, 102, 204, .06);
  --btn-dark-a: #2b2b30; --btn-dark-b: #18181b; --btn-dark-border: #0f0f11;
  --emph-bg: #18181b; --emph-fg: #ffffff; --emph-border: #18181b;
  color-scheme: light;
}

/* Dark mode: picked in the sidebar (System / Light / Dark); System follows the computer's setting */
:root[data-theme="dark"] {
  --primary: #6aa6f2; --primary-focus: #82b5f5; --primary-on-dark: #82b5f5; --primary-soft: rgba(106, 166, 242, .14);
  --ink: #ececef; --ink-80: #c9c9cf; --muted: #9b9ba4; --ink-48: #6f6f78;
  --divider: #26262b; --hairline: #313137; --canvas: #1a1a1d; --parchment: #242428; --tray: #202024; --app-bg: #111113;
  --good: #4ade80; --good-bg: #13261a; --good-dot: #22c55e;
  --bad: #f87171; --bad-bg: #2b1616; --bad-dot: #ef4444;
  --warn: #f5b45b; --warn-bg: #2b2010;
  --c-blue: #4a86d4; --c-empty: #2a2a2e;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45), 0 1px 1px rgba(0, 0, 0, .3);
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4);
  --field: #26262b; --field-hover: #2c2c32; --field-2: #26262b;
  --hover-tint: rgba(255, 255, 255, .05); --hover-tint-2: rgba(255, 255, 255, .08);
  --grid-line: #2a2a2f; --row-hover: #1f2430; --row-selected: #1c2a3e; --row-you: #1a2a1e; --subtle-bg: #1d1d21;
  --border-strong: #3a3a41; --scroll-thumb: #3d3d44; --scroll-thumb-hover: #55555e; --placeholder: #5c5c64;
  --skeleton-a: #232327; --skeleton-b: #2c2c31; --track-empty: #2e2e33; --dot-off: #2a2a2e;
  --frost: rgba(17, 17, 19, .86); --frost-strong: rgba(26, 26, 29, .96); --scrim: rgba(0, 0, 0, .55);
  --inverse-bg: #ececef; --inverse-fg: #18181b; --tip-shadow: 0 6px 20px rgba(0, 0, 0, .6);
  --focus-ring: rgba(106, 166, 242, .25); --primary-tint: rgba(106, 166, 242, .1);
  --btn-dark-a: #3d3d45; --btn-dark-b: #2c2c33; --btn-dark-border: #4b4b54;
  --emph-bg: #26262c; --emph-fg: #f4f4f5; --emph-border: #3a3a42;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #6aa6f2; --primary-focus: #82b5f5; --primary-on-dark: #82b5f5; --primary-soft: rgba(106, 166, 242, .14);
    --ink: #ececef; --ink-80: #c9c9cf; --muted: #9b9ba4; --ink-48: #6f6f78;
    --divider: #26262b; --hairline: #313137; --canvas: #1a1a1d; --parchment: #242428; --tray: #202024; --app-bg: #111113;
    --good: #4ade80; --good-bg: #13261a; --good-dot: #22c55e;
    --bad: #f87171; --bad-bg: #2b1616; --bad-dot: #ef4444;
    --warn: #f5b45b; --warn-bg: #2b2010;
    --c-blue: #4a86d4; --c-empty: #2a2a2e;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45), 0 1px 1px rgba(0, 0, 0, .3);
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4);
    --field: #26262b; --field-hover: #2c2c32; --field-2: #26262b;
    --hover-tint: rgba(255, 255, 255, .05); --hover-tint-2: rgba(255, 255, 255, .08);
    --grid-line: #2a2a2f; --row-hover: #1f2430; --row-selected: #1c2a3e; --row-you: #1a2a1e; --subtle-bg: #1d1d21;
    --border-strong: #3a3a41; --scroll-thumb: #3d3d44; --scroll-thumb-hover: #55555e; --placeholder: #5c5c64;
    --skeleton-a: #232327; --skeleton-b: #2c2c31; --track-empty: #2e2e33; --dot-off: #2a2a2e;
    --frost: rgba(17, 17, 19, .86); --frost-strong: rgba(26, 26, 29, .96); --scrim: rgba(0, 0, 0, .55);
    --inverse-bg: #ececef; --inverse-fg: #18181b; --tip-shadow: 0 6px 20px rgba(0, 0, 0, .6);
    --focus-ring: rgba(106, 166, 242, .25); --primary-tint: rgba(106, 166, 242, .1);
  --btn-dark-a: #3d3d45; --btn-dark-b: #2c2c33; --btn-dark-border: #4b4b54;
  --emph-bg: #26262c; --emph-fg: #f4f4f5; --emph-border: #3a3a42;
    color-scheme: dark;
  }
}

html.side-mini { --side-w: 72px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--app-bg); color: var(--ink); font: 400 14px/1.5 var(--text); letter-spacing: -0.006em;
  font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--primary-focus); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; color: var(--ink); }
h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.022em; }
h2 { font-size: 17px; line-height: 1.3; letter-spacing: -0.014em; font-weight: 550; }
h3 { font-size: 15px; line-height: 1.35; letter-spacing: -0.01em; font-weight: 550; }
.muted { color: var(--muted); }
.faint { color: var(--ink-48); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
svg.i { flex: none; display: block; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-48); flex: none; display: inline-block; }
.dot.live { background: var(--primary); animation: pulse 1.6s infinite; }
.dot.ok { background: var(--good-dot); }
.dot.bad { background: var(--bad-dot); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 95, 174, .45); } 70% { box-shadow: 0 0 0 7px rgba(31, 95, 174, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 95, 174, 0); } }
@media (prefers-reduced-motion: reduce) { .dot.live { animation: none; } * { transition: none !important; } }

/* ---------- sidebar ----------
   Who we are and which list, the look-up box, the pages in three groups, and the search status at the bottom.
   Collapses to icons (remembered); on phones it slides in over the page. */
.side { position: fixed; top: 0; left: 0; bottom: 0; width: var(--side-w); z-index: 40; display: flex; flex-direction: column;
  background: var(--app-bg); border-right: 1px solid var(--hairline); transition: width .18s ease; }
.side-head { display: flex; align-items: center; gap: 10px; height: var(--nav-h); padding: 0 12px 0 16px; border-bottom: 1px solid var(--hairline); flex: none; }
.side-logo { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; color: #fff;
  font: 600 13px/1 var(--text); letter-spacing: .02em; background: linear-gradient(180deg, #3b7ccb, #1f5fae);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(16, 16, 24, .15); }
.side-logo:hover { text-decoration: none; }
.side-id { min-width: 0; flex: 1; display: grid; line-height: 1.25; }
.side-id b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.list-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--muted); font-size: 12.5px; }
.list-switch { position: relative; min-width: 0; }
.list-switch summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--muted);
  border-radius: 6px; margin-left: -4px; padding: 0 4px; }
.list-switch summary::-webkit-details-marker { display: none; }
.list-switch summary:hover, .list-switch[open] summary { background: var(--hover-tint); color: var(--ink); }
.list-switch summary .i { color: var(--ink-48); }
.list-switch[open] summary .i { transform: rotate(180deg); }
/* the list menu: a fixed-size panel whose list scrolls, the open list first, a second line telling same-named lists apart */
.list-pop { position: absolute; top: 26px; left: -4px; z-index: 60; width: 320px; max-height: min(360px, calc(100vh - 80px));
  display: flex; flex-direction: column; background: var(--canvas); border: 1px solid var(--hairline); border-radius: 12px;
  box-shadow: var(--shadow-pop); overflow: hidden; }
.list-pop-top { flex: none; padding: 8px 8px 6px; border-bottom: 1px solid var(--hairline); display: grid; gap: 6px; }
.list-pop-h { margin: 2px 4px 0; font: 500 11.5px/1.3 var(--text); color: var(--ink-48); display: flex; justify-content: space-between; }
.list-find { position: relative; display: block; }
.list-find .i { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.list-find input { width: 100%; height: 32px; border-radius: 8px; border: 1px solid var(--hairline); background: var(--field); color: var(--ink);
  font: inherit; font-size: 13px; padding: 0 10px 0 30px; }
.list-find input:focus { outline: none; border-color: var(--primary); }
.list-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 4px; display: grid; align-content: start; gap: 1px;
  scrollbar-width: thin; scrollbar-color: var(--hairline) transparent; }
.list-scroll a { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; padding: 7px 10px;
  border-radius: 8px; color: var(--ink); }
.list-scroll a[hidden] { display: none; }
.list-scroll a:hover, .list-scroll a:focus-visible { background: var(--parchment); text-decoration: none; outline: none; }
.list-scroll a.on { background: var(--hover-tint); }
.lp-name { grid-column: 1; font-size: 13px; font-weight: 500; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lp-sub { grid-column: 1; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.list-scroll a.on .lp-name { font-weight: 600; }
.lp-on { grid-column: 2; grid-row: 1 / span 2; color: var(--primary); font-weight: 600; }
.list-none { margin: 10px; font-size: 12.5px; color: var(--muted); }
.side-toggle { width: 34px; height: 34px; padding: 0; flex: none; border-radius: 9px; border: 0; background: transparent; color: var(--ink-80);
  box-shadow: none; }
.side-toggle:hover { background: var(--hover-tint); color: var(--ink); }

.side .lookup { position: relative; margin: 16px 14px 6px; flex: none; }
.side .lookup > .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.side .lookup input { width: 100%; height: 40px; border-radius: 11px; border: 1px solid transparent; padding: 0 36px 0 38px; font: inherit;
  font-size: 14px; background: var(--field); color: var(--ink); transition: background .15s, border-color .15s, box-shadow .15s; }
.side .lookup input::placeholder { color: var(--muted); }
.side .lookup input:hover { background: var(--field-hover); }
.side .lookup input:focus { outline: none; background: var(--canvas); border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.side .lookup kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); margin: 0; min-width: 20px; text-align: center;
  background: var(--canvas); border: 1px solid var(--hairline); border-bottom-width: 1px; border-radius: 6px; color: var(--muted); box-shadow: var(--shadow-xs); }
.side .lookup input:focus ~ kbd { display: none; }

.side-nav { flex: 1; overflow-y: auto; padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.side-h { margin: 18px 10px 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-48); }
.side-nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 10px; border-radius: 11px;
  color: var(--ink-80); font-size: 14px; font-weight: 500; border: 1px solid transparent; white-space: nowrap; }
.side-nav a .i { color: var(--muted); }
.side-nav a:hover { background: var(--hover-tint); color: var(--ink); text-decoration: none; }
.side-nav a.on { background: var(--canvas); color: var(--ink); border-color: var(--hairline); box-shadow: var(--shadow-sm); }
.side-nav a.on .i { color: var(--ink); }
.side-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center;
  font: 600 11.5px/1 var(--text); font-style: normal; color: #fff; background: linear-gradient(180deg, #3374c4, #1f5fae);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 6px rgba(31, 95, 174, .35); font-variant-numeric: tabular-nums; }
.side-foot { padding: 12px 14px 16px; border-top: 1px solid var(--hairline); flex: none; }
.side-foot .updated { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 0 10px; white-space: nowrap; }
.agent-pill { display: grid; gap: 8px; padding: 10px 12px; border-radius: 11px; background: var(--canvas); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-xs); color: var(--ink); font-size: 13px; }
.agent-pill:hover { text-decoration: none; border-color: rgba(31, 95, 174, .4); }
.agent-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.agent-pill .js-stage { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.agent-pill .js-count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.agent-pill .js-count:empty { display: none; }
.agent-pill .meter { height: 4px; border-radius: 2px; background: var(--divider); overflow: hidden; }
.agent-pill .meter span { display: block; height: 100%; background: var(--primary); transition: width .4s; }

/* collapsed: icons only, labels in the tooltip */
html.side-mini .side-id, html.side-mini .side-h, html.side-mini .side-nav a span, html.side-mini .side .lookup,
html.side-mini .side-badge, html.side-mini .side-foot .updated span, html.side-mini .agent-pill .js-stage,
html.side-mini .agent-pill .js-count, html.side-mini .side-logo { display: none; }
html.side-mini .side-head { padding: 0; justify-content: center; }
html.side-mini .side-nav { padding: 12px 14px; }
html.side-mini .side-nav a { justify-content: center; padding: 0; }
html.side-mini .side-h:not(:first-child) { display: block; height: 1px; margin: 10px 6px; background: var(--hairline); font-size: 0; }
html.side-mini .side-foot { padding: 12px; }
html.side-mini .side-foot .updated { justify-content: center; padding: 0; }
html.side-mini .agent-pill { padding: 10px; }

/* ---------- main column and top bar ---------- */
.main-col { margin-left: var(--side-w); min-height: 100vh; transition: margin-left .18s ease; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--nav-h); display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: var(--frost); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--hairline); }
.topbar-title { min-width: 0; flex: 1; display: flex; align-items: center; gap: 8px; font-size: 15px; white-space: nowrap; overflow: hidden; }
.topbar-title a { color: var(--muted); }
.topbar-title a:hover { color: var(--ink); text-decoration: none; }
.topbar-title .sep { color: var(--ink-48); }
.topbar-title .here { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.012em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.side-open { display: none; }
.side-scrim { position: fixed; inset: 0; z-index: 35; background: var(--scrim); }

@media (max-width: 900px) {
  :root, html.side-mini { --side-w: 0px; --nav-h: 58px; }
  .side { width: 280px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-pop); }
  .side.open { transform: none; }
  html.side-mini .side-id, html.side-mini .side-nav a span, html.side-mini .side .lookup, html.side-mini .side-badge,
  html.side-mini .side-logo, html.side-mini .side-foot .updated span, html.side-mini .agent-pill .js-stage { display: revert; }
  .side-open { display: grid; margin-left: -6px; }
  .topbar { padding: 0 16px; }
  .topbar-actions .btn-label { display: none; }
}

.page { max-width: 1280px; margin: 0 auto; padding: 28px 28px 80px; }
.crumbs { display: none; }  /* the top bar shows where you are */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 70ch; font-size: 15px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 834px) {
  h1 { font-size: 23px; }
  .page { padding: 20px 16px 56px; }
}

/* ---------- surfaces: white cards with a hairline, optionally on a light tray ---------- */
.card { background: var(--canvas); border: 1px solid var(--hairline); border-radius: 14px; padding: 22px; min-width: 0; box-shadow: var(--shadow-xs); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.card-head h2 { font-size: 16px; }
.tray { background: var(--tray); border: 1px solid var(--hairline); border-radius: 18px; padding: 5px; display: grid; gap: 5px; }
.tray > .card { border-radius: 14px; }
.grid { display: grid; gap: 16px; }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 834px) { .g-2-1 { grid-template-columns: 1fr; } }
.section { margin-top: 16px; }
.stack { display: grid; gap: 16px; align-content: start; }

/* ---------- buttons: deep blue (primary), white (secondary), near-black (strong secondary) ---------- */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: 500 14px/1 var(--text); letter-spacing: -0.006em;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid #1a5398; color: #fff; cursor: pointer; white-space: nowrap;
  background: linear-gradient(180deg, #2a6cc0 0%, #1f5fae 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(16, 16, 24, .14), 0 2px 6px rgba(31, 95, 174, .18);
  transition: transform .1s, background .15s, box-shadow .15s; }
.btn:hover, button:hover { text-decoration: none; background: linear-gradient(180deg, #2f73c9 0%, #2264b5 100%); }
.btn:active, button:active { transform: translateY(1px); }
.btn .i, button .i { margin-left: -2px; }
.btn.secondary, .btn.ghost { background: var(--canvas); color: var(--ink); border-color: var(--hairline); box-shadow: var(--shadow-sm); }
.btn.secondary:hover, .btn.ghost:hover { background: var(--tray); border-color: var(--border-strong); }
.btn.secondary .i, .btn.ghost .i { color: var(--ink-80); }
.btn.dark { background: linear-gradient(180deg, var(--btn-dark-a), var(--btn-dark-b)); border-color: var(--btn-dark-border); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 1px 2px rgba(16, 16, 24, .2); }
.btn.dark:hover { background: linear-gradient(180deg, var(--btn-dark-a), var(--btn-dark-a)); filter: brightness(1.12); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.icon-btn.btn { width: 38px; padding: 0; }

input, select, textarea { font: 400 14px var(--text); letter-spacing: -0.006em; color: var(--ink); background: var(--canvas);
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 12px; box-shadow: var(--shadow-xs); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
input[type="checkbox"], input[type="radio"] { padding: 0; box-shadow: none; accent-color: var(--primary); }
textarea { width: 100%; min-height: 100px; resize: vertical; line-height: 1.5; }
form.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }

/* dropdown menu (Export, Download) */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; background: var(--canvas); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 6px; min-width: 220px; box-shadow: var(--shadow-pop); display: grid; gap: 1px; }
.menu-pop a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink); }
.menu-pop a .i { color: var(--muted); }
.menu-pop a:hover { background: var(--parchment); text-decoration: none; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 7px;
  background: var(--canvas); border: 1px solid var(--hairline); color: var(--ink-80); white-space: nowrap; box-shadow: var(--shadow-xs); }
.badge.green, .badge.amber, .badge.red, .badge.blue { background: var(--canvas); }
.badge.green { color: var(--ink-80); } .badge.green .dot { background: var(--good-dot); }
.badge.amber { color: var(--warn); }
.badge.red { color: var(--ink-80); } .badge.red .dot { background: var(--bad-dot); }
.badge.blue { color: var(--primary); }
.badge .dot { width: 7px; height: 7px; }
.tier { display: inline-grid; place-items: center; min-width: 26px; height: 22px; border-radius: 7px; font-size: 12px; font-weight: 600; padding: 0 6px; }
.tier-A { background: var(--good-bg); color: var(--good); }
.tier-B { background: var(--primary-soft); color: var(--primary); }
.tier-C { background: var(--parchment); color: var(--muted); }
.tier-X { background: var(--bad-bg); color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.banner { display: flex; align-items: center; gap: 10px; background: var(--canvas); border: 1px solid var(--hairline); color: var(--ink);
  padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 14px; box-shadow: var(--shadow-xs); }
.banner a { margin-left: auto; white-space: nowrap; }
.flash { background: var(--good-bg); color: var(--good); padding: 10px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid rgba(21, 128, 61, .12); }

/* ---------- tables: each row a soft strip, headers in muted small text ---------- */
.table-wrap { background: var(--tray); border: 1px solid var(--hairline); border-radius: 16px; padding: 0 5px 5px; overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--divider); vertical-align: middle; }
th { font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; padding-top: 12px; padding-bottom: 12px; }
.table-wrap td { background: var(--canvas); }
.table-wrap tbody tr:first-child td:first-child { border-top-left-radius: 11px; }
.table-wrap tbody tr:first-child td:last-child { border-top-right-radius: 11px; }
.table-wrap tbody tr:last-child td:first-child, .table-wrap tfoot tr:last-child td:first-child { border-bottom-left-radius: 11px; }
.table-wrap tbody tr:last-child td:last-child, .table-wrap tfoot tr:last-child td:last-child { border-bottom-right-radius: 11px; }
.table-wrap tfoot td { background: var(--canvas); }
.table-wrap:has(tfoot) tbody tr:last-child td { border-radius: 0; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
td .title { font-weight: 550; color: var(--ink); }
tr.you td { background: var(--primary-tint); }

.note { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* ---------- the funnel: a dark tile, Apple's section break ---------- */
.funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; background: var(--tray); border: 1px solid var(--hairline);
  border-radius: 18px; padding: 5px; }
.fstep { display: flex; flex-direction: column; color: var(--ink); min-width: 0; padding: 16px 18px; border-radius: 14px; background: var(--canvas);
  border: 1px solid var(--hairline); box-shadow: var(--shadow-xs); }
a.fstep:hover { text-decoration: none; border-color: var(--border-strong); }
.fstep .fnum { font-size: 12px; color: var(--ink-48); }
.fstep .fnum::before { content: "Step "; }
.fstep .flabel { font-size: 14px; font-weight: 500; color: var(--ink); margin-top: 2px; }
.fstep b { font: 500 34px/1.1 var(--display); letter-spacing: -0.03em; margin: 10px 0 4px; font-variant-numeric: tabular-nums; }
.fstep .fsub { font-size: 12.5px; color: var(--muted); }
.farrow { display: none; }
@media (max-width: 834px) { .funnel { grid-template-columns: 1fr 1fr; } .farrow { display: none; } }

/* ---------- live run console ---------- */
.stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 834px) { .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.step-item { border: 1px solid var(--hairline); border-radius: 12px; padding: 12px 14px; background: var(--canvas); box-shadow: var(--shadow-xs); }
.step-item .n { font-size: 12px; color: var(--ink-48); display: flex; align-items: center; gap: 6px; }
.step-item b { display: block; font-size: 15px; font-weight: 600; margin-top: 2px; }
.step-item.done { background: var(--tray); box-shadow: none; }
.step-item.done .n { color: var(--good); }
.step-item.active { border: 2px solid var(--primary-focus); padding: 11px 13px; }
.step-item.active .n { color: var(--primary); }
.browser { border-radius: 14px; border: 1px solid var(--hairline); overflow: hidden; background: var(--black); }
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--tile); }
.browser-bar .lights { display: flex; gap: 6px; }
.browser-bar .lights i { width: 10px; height: 10px; border-radius: 50%; background: #48484a; display: block; }
.browser-bar .url { flex: 1; background: #3a3a3c; border-radius: 9999px; padding: 6px 14px; font: 12px var(--mono); color: var(--muted-on-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser-bar .badge { background: rgba(41, 151, 255, .18); color: var(--primary-on-dark); }
.browser-view { aspect-ratio: 1366 / 900; background: var(--tile-2); display: grid; place-items: center; color: var(--muted-on-dark); }
.browser-view img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.progress { height: 6px; background: var(--parchment); border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); transition: width .5s; }
.feed { list-style: none; margin: 0; padding: 0; max-height: 640px; overflow-y: auto; }
.feed li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-top: 1px solid var(--divider); font-size: 14px; align-items: start; }
.feed li:first-child { border-top: 0; }
.feed .ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--parchment); color: var(--muted); }
.feed .ico.stage { background: var(--primary-soft); color: var(--primary); }
.feed .ico.found { background: var(--parchment); color: var(--ink); }
.feed .ico.decision, .feed .ico.analyze { background: var(--good-bg); color: var(--good); }
.feed .ico.error { background: var(--bad-bg); color: var(--bad); }
.feed a { color: var(--ink); }
.feed .visit { color: var(--ink-48); font: 12px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .time { font-size: 12px; color: var(--ink-48); font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed .sub { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ---------- disclosure and print ---------- */
details summary { list-style: none; color: var(--primary); }
details summary::-webkit-details-marker { display: none; }

@media print {
  body { background: #fff; }
  .side, .topbar, .no-print { display: none !important; }
  .main-col { margin: 0; }
  .card, .table-wrap { break-inside: avoid; }
}
.feed .ico.think { background: var(--inverse-bg); color: var(--inverse-fg); }

/* ---------- plain-language forms: fields, chip lists, segmented choice ---------- */
.form-card { display: flex; flex-direction: column; gap: 16px; }
.form-card + .form-card { margin-top: 16px; }
.form-card h2 { font-size: 19px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 600; color: var(--ink); }
.field input, .field textarea { width: 100%; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 734px) { .field-row { grid-template-columns: 1fr; } }
.hint { margin: -2px 0 4px; font-size: 13px; color: var(--muted); }
small.hint { display: block; margin: 2px 0 0; font-weight: 400; }
.chip-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; min-height: 44px; cursor: text;
  background: var(--canvas); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-xs); }
.chip-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.chip-item { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 7px;
  background: var(--parchment); border: 1px solid var(--hairline); color: var(--ink); font-size: 14px; }
.chip-x { padding: 0; width: 22px; height: 22px; border-radius: 50%; border: 0; background: transparent; color: var(--muted);
  font-size: 16px; line-height: 1; }
.chip-x:hover { background: var(--hover-tint-2); color: var(--ink); }
.chip-input { flex: 1; min-width: 160px; border: 0; padding: 6px 8px; background: transparent; outline: none; box-shadow: none !important; }
.chip-input:focus-visible { outline: none; }
.chip-suggestions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.chip-suggestions:empty { display: none; }
.chip-sugg-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.chip-sugg { height: auto; padding: 5px 10px; border-radius: 7px; font-size: 13px; font-weight: 400; background: transparent; color: var(--primary);
  border: 1px dashed rgba(31, 95, 174, .45); box-shadow: none; }
.chip-sugg:hover { background: var(--primary-soft); border-style: solid; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; margin-top: 20px; padding: 14px 0; display: flex; gap: 10px; align-items: center;
  background: var(--frost); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }

/* ---------- settings: suggestions list, amounts ---------- */
.levers { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }

.amount-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.amount-row input { width: 110px; font-size: 17px; }

.feed .ico.contact { background: var(--primary-soft); color: var(--primary); }

/* ---------- shared helpers ---------- */
.grid > * { min-width: 0; }
.ok-text { color: var(--good); }
.warn-text { color: var(--warn); }

/* ---------- the sheet: a spreadsheet that fills the window ---------- */
.sheet-body { height: 100vh; overflow: hidden; }
.sheet-body .topbar { background: var(--app-bg); }
.sheet-main { position: fixed; top: var(--nav-h); left: var(--side-w); transition: left .18s ease; right: 0; bottom: 0; display: flex; flex-direction: column; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: nowrap;
  padding: 10px 20px; border-bottom: 1px solid var(--hairline); background: var(--canvas); }
.tb-left, .tb-right { display: flex; gap: 8px; align-items: center; flex: none; }
.tb-left { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }  /* one row; scrolls sideways when tight */
.tb-left::-webkit-scrollbar { display: none; }
.tb-left > * { flex: none; }
.tb-search { width: 220px; max-width: 100%; height: 34px; border: 1px solid transparent; border-radius: 9px; padding: 0 12px;
  font: inherit; font-size: 13px; background: var(--field-2); box-shadow: none; }
.tb-search:focus { outline: none; border-color: var(--primary); background: var(--canvas); }
.tb-filter { height: 34px; border: 1px solid var(--hairline); border-radius: 9px; padding: 0 28px 0 12px; font: inherit; font-size: 13px;
  background: var(--canvas); color: var(--ink); max-width: 150px; }
.tb-check { font-size: 13px; display: inline-flex; gap: 6px; align-items: center; color: var(--ink-80); white-space: nowrap; }
.tb-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-menu { position: relative; }
.tb-menu summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 500; height: 34px; display: inline-flex; align-items: center; padding: 0 14px;
  border: 1px solid var(--hairline); border-radius: 9px; color: var(--ink); background: var(--canvas); box-shadow: var(--shadow-xs); }
.tb-menu summary::-webkit-details-marker { display: none; }
.tb-menu[open] summary { border-color: var(--primary); color: var(--primary); }
.tb-pop { position: absolute; right: 0; top: 40px; z-index: 40; background: var(--canvas); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 6px; min-width: 230px; max-height: 60vh; overflow: auto; box-shadow: var(--shadow-pop); display: grid; gap: 2px; }
.tb-pop a, .tb-pop label { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--ink); }
.tb-pop a:hover, .tb-pop label:hover { background: var(--parchment); text-decoration: none; }
.tb-pop p { margin: 4px 10px 6px; }
.sheet-notes { padding: 10px 16px; background: var(--subtle-bg); border-bottom: 1px solid var(--hairline); display: grid; gap: 4px; }
.sheet-notes p { margin: 0; font-size: 13px; color: var(--ink-80); }
.sheet-notes p::before { content: "•"; color: var(--primary); margin-right: 8px; }

.grid-wrap { flex: 1; overflow: auto; position: relative; }
table.xl { border-collapse: separate; border-spacing: 0; font-size: 13px; letter-spacing: -0.08px; }
table.xl th, table.xl td { padding: 0; border-right: 1px solid var(--grid-line); border-bottom: 1px solid var(--grid-line); text-align: left; vertical-align: middle; }
table.xl .c { padding: 0 10px; height: 34px; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; box-sizing: border-box; }
table.xl td .c > :not(select):not(input) { overflow: hidden; text-overflow: ellipsis; }
table.xl th { position: sticky; top: 0; z-index: 2; background: var(--tray); font-weight: 500; color: var(--muted);
  cursor: pointer; user-select: none; border-bottom-color: var(--hairline); }
table.xl th:hover { background: var(--field-2); }
table.xl th[draggable] { cursor: grab; }
table.xl th.dragging { opacity: .45; }
table.xl th.drop-before { box-shadow: inset 3px 0 0 var(--primary); }
table.xl th.drop-after { box-shadow: inset -3px 0 0 var(--primary); }
table.xl th .col-grip { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 1; touch-action: none; }
table.xl th .col-grip::after { content: ""; position: absolute; top: 8px; bottom: 8px; left: 3px; width: 2px; border-radius: 1px; background: transparent; }
table.xl th:hover .col-grip::after { background: var(--scroll-thumb-hover); }
table.xl th .col-grip:hover::after, .col-resizing table.xl th .col-grip::after { background: var(--primary); }
.col-resizing, .col-resizing * { cursor: col-resize !important; user-select: none; }
/* scrollbars stay visible so it's obvious the sheet scrolls sideways */
.grid-wrap::-webkit-scrollbar { width: 12px; height: 12px; }
.grid-wrap::-webkit-scrollbar-track { background: var(--tray); border-top: 1px solid var(--hairline); }
.grid-wrap::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 6px; border: 3px solid var(--tray); }
.grid-wrap::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }
.grid-wrap::-webkit-scrollbar-corner { background: var(--tray); }
table.xl th .sort::after { content: ""; margin-left: 4px; color: var(--primary); font-style: normal; }
table.xl th[data-dir="asc"] .sort::after { content: "▲"; font-size: 9px; }
table.xl th[data-dir="desc"] .sort::after { content: "▼"; font-size: 9px; }
table.xl .rn { position: sticky; left: 0; z-index: 1; width: 44px; min-width: 44px; text-align: center; color: var(--ink-48);
  background: var(--tray); font-size: 12px; font-variant-numeric: tabular-nums; }
table.xl th.rn { z-index: 3; }
table.xl tr > :nth-child(2) { position: sticky; left: 44px; z-index: 1; background: var(--canvas); box-shadow: 1px 0 0 var(--hairline); }
table.xl th:nth-child(2) { z-index: 3; background: var(--tray); }
table.xl tbody tr:hover td { background: var(--row-hover); }
table.xl tbody tr.selected td { background: var(--row-selected); }
table.xl tbody tr.selected td.rn { box-shadow: inset 3px 0 0 var(--primary); }
table.xl tr.you td { background: var(--row-you); font-weight: 600; }
table.xl .hide { display: none; }
table.xl td.k-num .c, table.xl th.k-num .c, table.xl td.k-pct .c, table.xl th.k-pct .c { justify-content: flex-end; font-variant-numeric: tabular-nums; }
table.xl td.k-company a { color: var(--ink); font-weight: 600; }
table.xl td.k-company a:hover { color: var(--primary); }
table.xl td.k-image .c { padding: 2px 6px; }
table.xl td.k-image img { height: 30px; width: 44px; object-fit: cover; border-radius: 4px; display: block; }
table.xl .chk { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--warn-bg);
  color: var(--warn); font-size: 11px; font-weight: 700; flex: none; cursor: help; }
.lvl { font-weight: 600; }
.lvl-hi { color: var(--good); }
.lvl-mid { color: var(--primary); }
.lvl-lo { color: var(--ink-48); font-weight: 500; }
.lvl-warn { color: var(--warn); }
.cell-status, .cell-edit { width: 100%; height: 34px; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink);
  padding: 0; margin: 0 -10px; padding: 0 10px; box-sizing: content-box; }
.cell-status { appearance: none; -webkit-appearance: none; cursor: pointer; font-weight: 500;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237a7a7a' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; }
.cell-status[data-status="contacted"] { color: var(--warn); }
.cell-status[data-status="replied"], .cell-status[data-status="meeting"] { color: var(--primary); }
.cell-status[data-status="won"] { color: var(--good); }
.cell-status[data-status="lost"], .cell-status[data-status="ignore"] { color: var(--ink-48); }
.cell-edit::placeholder { color: var(--placeholder); }
.cell-status:focus, .cell-edit:focus { outline: 2px solid var(--primary); outline-offset: -2px; background: var(--canvas); border-radius: 0; }
.grid-empty { padding: 64px 24px; text-align: center; color: var(--muted); display: grid; gap: 6px; }
.grid-empty b { color: var(--ink); font-size: 17px; }

.sheet-tabs { display: flex; gap: 4px; height: 44px; align-items: center; background: var(--app-bg); border-top: 1px solid var(--hairline); padding: 0 12px;
  overflow-x: auto; scrollbar-width: none; flex: none; }
.sheet-tabs a { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; font-size: 13px; font-weight: 500; color: var(--muted);
  border: 1px solid transparent; border-radius: 9px; white-space: nowrap; }
.sheet-tabs a:hover { background: var(--hover-tint); color: var(--ink); text-decoration: none; }
.sheet-tabs a.on { background: var(--canvas); color: var(--ink); border-color: var(--hairline); box-shadow: var(--shadow-sm); }
.sheet-tabs span { font-size: 11px; color: var(--ink-48); font-weight: 400; font-variant-numeric: tabular-nums; }

.lvl-pill { font: 600 12px/1 var(--text); padding: 5px 9px; border-radius: 7px; background: var(--parchment); letter-spacing: 0; }
.lvl-pill.lvl-hi { background: var(--good-bg); }
.lvl-pill.lvl-mid { background: var(--primary-soft); }
.toast { position: fixed; right: 16px; bottom: 60px; background: var(--inverse-bg); color: var(--inverse-fg); font-size: 13px; padding: 8px 14px;
  border-radius: 9999px; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: none; }
@media (max-width: 734px) {
  .toolbar { padding: 8px 12px; flex-wrap: wrap; }
  .tb-search { width: 100%; }
  .tb-left { width: 100%; }
  .tb-right .btn { display: none; }
}

/* ---------- company view (side panel and full page) ----------
   One primary action (Call), details behind tabs, spacing instead of boxes, three text sizes. */
.drawer { position: fixed; top: var(--nav-h); right: 0; bottom: 0; width: min(560px, 100vw); background: var(--canvas); z-index: 30;
  border-left: 1px solid var(--hairline); display: flex; flex-direction: column; }
@media (max-width: 1179px) { .drawer { box-shadow: -12px 0 32px rgba(0, 0, 0, .1); } }
@media (min-width: 1180px) { .drawer-open .sheet-main { right: 560px; } }  /* list and detail side by side */
.drawer-bar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px 0 20px; border-bottom: 1px solid var(--divider);
  font-size: 13px; flex: none; }
.drawer-hint { margin-left: auto; color: var(--ink-48); font-size: 12px; white-space: nowrap; }
@media (max-width: 734px) { .drawer-hint { display: none; } .drawer-bar .icon-btn { margin-left: auto; } }
.drawer-body { flex: 1; overflow: auto; }
kbd { font: 500 11px var(--text); padding: 1px 5px; border: 1px solid var(--hairline); border-bottom-width: 2px; border-radius: 4px;
  background: var(--parchment); color: var(--ink-80); margin-right: 2px; }
.icon-btn { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 0; background: transparent; color: var(--ink-80);
  font-size: 20px; line-height: 1; }
.icon-btn:hover { background: var(--parchment); color: var(--ink); }
.linklike { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; border-radius: 0; }
.linklike:hover { background: none; text-decoration: underline; }
.linklike:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.tb-filter.on { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }
#clear-filters { font-size: 13px; }

.cx { padding: 20px 20px 40px; }
.cx-name { font: 600 22px/1.2 var(--display); letter-spacing: -0.2px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cx-meta { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.cx-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cx-actions .btn { padding: 9px 16px; font-size: 14px; }
.cx-none { margin: 0; font-size: 14px; color: var(--ink-80); }
.cx-trust { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.cx-log { display: grid; grid-template-columns: 112px 112px minmax(0, 1fr); gap: 6px; margin-top: 14px; }
.cx-log select, .cx-log input { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; border: 1px solid var(--hairline);
  background: var(--canvas); color: var(--ink); min-width: 0; }
.cx-log select { appearance: none; -webkit-appearance: none; font-weight: 500; padding-right: 24px;
  background: var(--canvas) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237a7a7a' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 9px center; }
.cx-log select[data-status="contacted"] { color: var(--warn); }
.cx-log select[data-status="replied"], .cx-log select[data-status="meeting"] { color: var(--primary); }
.cx-log select[data-status="won"] { color: var(--good); }
.cx-log select[data-status="lost"], .cx-log select[data-status="ignore"] { color: var(--ink-48); }
@media (max-width: 480px) { .cx-log { grid-template-columns: 1fr 1fr; } .cx-log input[data-field="notes"] { grid-column: span 2; } }
.cx-tabs { display: flex; gap: 22px; margin: 18px -20px 0; padding: 0 20px; border-bottom: 1px solid var(--divider);
  position: sticky; top: 0; background: var(--canvas); z-index: 2; }
.cx-tabs button { background: none; border: 0; border-radius: 0; padding: 12px 0 10px; font-size: 14px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cx-tabs button:hover { background: none; color: var(--ink); }
.cx-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.cx-tabs button span { font-size: 12px; color: var(--ink-48); font-weight: 400; margin-left: 2px; }
.cx-pane { padding-top: 18px; font-size: 14px; line-height: 1.5; }
.cx-h { font: 600 11px/1.3 var(--text); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-48); margin: 24px 0 8px; }
.cx-p { margin: 0 0 6px; color: var(--ink-80); }
.cx-pitch { font: 600 17px/1.4 var(--display); letter-spacing: -0.2px; margin: 0; color: var(--ink); }
.cx-next { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--emph-bg); color: var(--emph-fg); border: 1px solid var(--emph-border); font-size: 14px; font-weight: 500; }
.cx-next span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; opacity: .6; margin-bottom: 2px; font-weight: 600; }
.cx-kv { margin: 14px 0 0; border-top: 1px solid var(--divider); }
.cx-kv details { border-bottom: 1px solid var(--divider); }
.cx-kv summary { display: grid; grid-template-columns: 92px minmax(0, 1fr) 14px; gap: 10px; align-items: baseline; padding: 8px 0; cursor: pointer; color: inherit; }
.cx-kv summary::after { content: "›"; color: var(--ink-48); transition: transform .15s; justify-self: end; }
.cx-kv details[open] summary::after { transform: rotate(90deg); }
.cx-kv dt { font-size: 13px; color: var(--muted); }
.cx-kv dd { margin: 0; font-weight: 600; color: var(--ink); }
.cx-kv details p { margin: 0 0 10px 102px; font-size: 13px; color: var(--muted); }
.cx-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--ink-80); }
.cx-list li { padding-left: 16px; position: relative; }
.cx-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-48); }
.cx-list b { display: block; color: var(--ink); font-weight: 600; }
.cx-list { color: var(--muted); }
.cx-list.ink { color: var(--ink-80); }
.cx-list.numbered { counter-reset: n; }
.cx-list.numbered li { counter-increment: n; padding-left: 26px; }
.cx-list.numbered li::before { content: counter(n); width: 18px; height: 18px; top: .12em; left: 0; background: var(--parchment);
  color: var(--ink); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.cx-qa { display: grid; gap: 10px; }
.cx-qa p { margin: 0; color: var(--ink-80); }
.cx-qa b { display: block; color: var(--ink); font-weight: 600; }
.cx-msg { background: var(--parchment); border-radius: 10px; padding: 12px; }
.cx-msg p { margin: 0 0 10px; color: var(--ink-80); white-space: pre-wrap; }
.cx-msg div { display: flex; gap: 8px; flex-wrap: wrap; }
.cx-more { margin-top: 18px; }
.cx-more summary { cursor: pointer; font-size: 13px; color: var(--primary); }
.cx-more[open] summary { margin-bottom: 10px; }
.cx-foot { margin: 14px 0 0; font-size: 12px; color: var(--ink-48); }
.cx-foot .linklike { font-size: 12px; }
.cx-dl { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 7px 12px; margin: 0; font-size: 13px; }
.cx-dl dt { color: var(--muted); }
.cx-dl dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.cx-ads { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.cx-ads li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; }
.cx-ads .thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--parchment); display: block; }
.cx-ads .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; display: block; }
.cx-ads .t { margin: 0; font-size: 13px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-ads .m { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.cx-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cx-timeline li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; font-size: 13px; }
.cx-timeline .when { color: var(--ink-48); font-variant-numeric: tabular-nums; }
.cx-timeline .what { color: var(--ink-80); }
.cx-timeline b { color: var(--ink); font-weight: 600; }
.cx-empty { display: grid; gap: 8px; justify-items: start; padding: 8px 0; color: var(--muted); }
.cx-empty b { color: var(--ink); }
.cx-skeleton { padding: 24px 20px; display: grid; gap: 12px; }
.cx-skeleton i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--skeleton-a), var(--skeleton-b), var(--skeleton-a));
  background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.cx-skeleton i:first-child { height: 24px; width: 60%; }
.cx-skeleton i:nth-child(2) { width: 40%; }
.cx-skeleton i:nth-child(3) { height: 36px; width: 70%; border-radius: 18px; }
@keyframes shimmer { to { background-position: -200% 0; } }
/* the company's cards: same header row (icon tile + title) as the overview cards */
.cx-head { display: flex; align-items: center; gap: 14px; }
.cx-id { min-width: 0; }
.cx-logo { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; color: #fff;
  font: 600 15px/1 var(--text); letter-spacing: .02em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(16, 16, 24, .15); }
.cx-logo.tone-blue { background: linear-gradient(180deg, #3b7ccb, #1f5fae); }
.cx-logo.tone-teal { background: linear-gradient(180deg, #34b79c, #1f9a81); }
.cx-logo.tone-orange { background: linear-gradient(180deg, #f0b27a, #e39651); }
.cx-logo.tone-purple { background: linear-gradient(180deg, #ab92f3, #8a68e6); }
.ov-tile.blue { background: linear-gradient(180deg, #3b7ccb, #1f5fae); }
.cx-top { display: grid; gap: 10px; margin-top: 16px; }
.cx-card { padding: 0 !important; display: flex; flex-direction: column; }
.cx-card .ov-card-h { padding: 12px 16px; }
.cx-card .ov-tile { width: 30px; height: 30px; border-radius: 9px; }
.cx-card .ov-tile .i { width: 16px; height: 16px; }
.cx-card-tag { margin-left: auto; }
.cx-card-b { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.cx-phone { margin: 0; font: 500 26px/1.15 var(--display); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cx-phone.small-fig { font-size: 18px; overflow: hidden; text-overflow: ellipsis; }
.cx-reach .ov-sub { margin-top: 4px; }
.cx-reach .cx-actions { margin-top: auto; padding-top: 16px; }
.cx-reach .cx-actions .btn { padding: 0 13px; height: 38px; }
.cx-card-b.cx-log { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 0; align-content: start; }
.cx-log label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 500; min-width: 0; }
.cx-log label.wide { grid-column: span 2; }
.cx-card-b.cx-log select, .cx-card-b.cx-log input { height: 36px; font-size: 13.5px; }
.cx-body { margin-top: 18px; }
.cx-main .cx-tabs { margin-top: 0; }
.cx-page .cx-main { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* full page: cards on a tray up top, tabs in one big card, the at-a-glance column on the right */
.cx-page { max-width: 1240px; margin: 0 auto; }
.cx-page .cx { padding: 0; }
.cx-page .cx-name { font-size: 24px; letter-spacing: -0.02em; }
.cx-page .cx-meta { font-size: 13.5px; margin-top: 3px; }
.cx-page .cx-top { background: var(--tray); border: 1px solid var(--hairline); border-radius: 18px; padding: 5px; gap: 5px; margin-top: 22px; }
.cx-page .cx-top.n3 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.05fr) minmax(0, .95fr); }
.cx-page .cx-top.n2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cx-page .cx-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.cx-page .cx-main { background: var(--canvas); border: 1px solid var(--hairline); border-radius: 14px; box-shadow: var(--shadow-xs); padding: 0 24px 28px; min-width: 0; }
.cx-page .cx-tabs { margin: 0 -24px; padding: 0 24px; top: var(--nav-h); border-radius: 14px 14px 0 0; }
.cx-page .cx-pane { padding-top: 22px; }
.cx-page .cx-pitch { font-size: 19px; letter-spacing: -0.015em; }
.cx-page .bf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 32px; }
.cx-page .cx-ads { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cx-page .cx-ads li { padding: 10px; border: 1px solid var(--divider); border-radius: 12px; }
.cx-aside { display: grid; gap: 16px; position: sticky; top: calc(var(--nav-h) + 16px); }
.cx-glance { list-style: none; margin: 0; padding: 6px 16px 10px; }
.cx-glance li { padding: 9px 0; border-bottom: 1px solid var(--divider); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: 13.5px; }
.cx-glance li:last-child { border-bottom: 0; }
.cx-glance li > span, .cx-glance button span { color: var(--muted); }
.cx-glance b { font-weight: 550; color: var(--ink); text-align: right; }
.cx-glance button { width: 100%; display: flex; justify-content: space-between; gap: 10px; color: inherit; font-size: inherit; }
.cx-glance button:hover { text-decoration: none; }
.cx-glance button:hover b { color: var(--primary); }
.cx-glance small { width: 100%; font-size: 12px; color: var(--ink-48); text-align: right; }
.cx-msgtext { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-80); white-space: pre-wrap; }
.cx-msg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 1100px) {
  .cx-page .cx-top.n3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cx-page .cx-top.n3 .cx-why { grid-column: span 2; }
  .cx-page .cx-body { grid-template-columns: minmax(0, 1fr); }
  .cx-aside { position: static; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .cx-page .cx-top.n3, .cx-page .cx-top.n2, .cx-aside { grid-template-columns: minmax(0, 1fr); }
  .cx-page .cx-top.n3 .cx-why { grid-column: auto; }
  .cx-page .bf-grid, .cx-page .cx-ads { grid-template-columns: minmax(0, 1fr); }
  .cx-page .cx-main { padding: 0 16px 22px; }
  .cx-page .cx-tabs { margin: 0 -16px; padding: 0 16px; gap: 18px; overflow-x: auto; }
  .cx-page .cx-name { font-size: 20px; }
  .cx-logo { width: 38px; height: 38px; font-size: 13px; }
  .why-opener { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- printable sheet (PDF download) ---------- */
.print-body { background: #fff; padding: 0; font-size: 11px; }
.print-head h1 { font-size: 22px; }
.print-head p { margin: 4px 0 14px; color: var(--muted); }
.print-body h2 { font-size: 16px; margin: 22px 0 8px; }
.print-note { margin: 0 0 4px; color: var(--ink-80); }
.print-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.print-table th, .print-table td { border: 1px solid #d2d2d7; padding: 4px 6px; text-align: left; vertical-align: top; }
.print-table th { background: var(--parchment); font-weight: 600; }
.print-table tr.you td { background: #f3f8ee; font-weight: 600; }
.print-table td:nth-child(4) { white-space: nowrap; }
.run-summary { padding-bottom: 16px; border-bottom: 1px solid var(--divider); font-size: 14px; grid-template-columns: 110px minmax(0, 1fr); }

/* ---------- settings: form + "Before you search" checklist ---------- */
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.checklist { position: sticky; top: calc(var(--nav-h) + 16px); background: var(--canvas); border: 1px solid var(--hairline); border-radius: 14px; box-shadow: var(--shadow-xs); padding: 18px 18px 14px; }
@media (max-width: 960px) { .settings-layout { grid-template-columns: minmax(0, 1fr); } .checklist { position: static; order: -1; } }
.cl-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.cl-head h2 { font-size: 17px; }
.cl-score { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 7px; }
.cl-score.ok { background: var(--good-bg); color: var(--good); }
.cl-score.warn { background: var(--warn-bg); color: var(--warn); }
.cl-score.bad { background: var(--bad-bg); color: var(--bad); }
.cl-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cl-issues li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; }
.cl-issues p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink); }
.cl-ico { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 1px; }
.cl-ask .cl-ico { background: var(--warn-bg); color: var(--warn); }
.cl-block .cl-ico { background: var(--bad-bg); color: var(--bad); }
.cl-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cl-btn { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 8px; background: var(--canvas); color: var(--ink); border: 1px solid var(--hairline); box-shadow: var(--shadow-xs); }
.cl-btn:hover { background: var(--tray); }
.cl-good { margin: 12px 0 0; font-size: 12px; color: var(--good); line-height: 1.5; }
.cl-good:empty { display: none; }
.cl-ideas { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--divider); }
.cl-ideas h3 { font: 600 11px/1.3 var(--text); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-48); margin: 0 0 6px; }
.cl-ideas ul { margin: 0; padding-left: 16px; display: grid; gap: 4px; font-size: 13px; color: var(--ink-80); }
.cl-foot { margin: 8px 0 0; font-size: 12px; color: var(--ink-48); }
.cl-refresh { margin-top: 10px; font-size: 13px; }
.save-why { font-size: 13px; color: var(--bad); }
.save-why.neutral { color: var(--muted); }


/* contacts: one row per company, everything else behind the opener */
.opener { background: none; border: 0; padding: 0; width: 18px; height: 18px; border-radius: 4px; color: var(--ink-48);
  font-size: 12px; flex: none; cursor: pointer; }
.opener:hover { background: var(--parchment); color: var(--ink); }
.opener[aria-expanded="true"] { color: var(--primary); }
table.xl tr.detail td { background: var(--subtle-bg); padding: 0; }
table.xl tr.detail td:nth-child(2) { position: sticky; left: 44px; }
.cdetail { display: flex; flex-wrap: wrap; gap: 14px 40px; padding: 12px 16px 16px 38px; max-width: calc(100vw - 80px); white-space: normal; }
.cdetail-group h4 { margin: 0 0 6px; font: 600 11px/1.3 var(--text); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-48); }
.cdetail-group h4 span { font-weight: 400; margin-left: 2px; }
.cdetail-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.cdetail-group li { display: flex; gap: 8px; align-items: baseline; white-space: nowrap; }
.cdetail-group li span { color: var(--muted); font-size: 12px; }
.cdetail-group li em { font-style: normal; }
.run-filter { padding: 8px 16px; background: var(--primary-tint); border-bottom: 1px solid var(--hairline); font-size: 13px; color: var(--ink-80); }

/* ---------- videos ---------- */
table.xl td.k-frames .c { padding: 3px 8px; }
.frames { position: relative; display: flex; gap: 3px; }
.frames img { width: 50px; height: 28px; object-fit: cover; border-radius: 3px; display: block; background: var(--parchment); }
.frames .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 9px; display: grid; place-items: center; padding-left: 2px; }
.frames:hover img { opacity: .85; }
.score-dots { display: inline-flex; gap: 3px; margin-right: 6px; }
.score-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--hairline); }
.score-dots i.on { background: var(--good); }
.vx-frames { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.vx-frames figure { margin: 0; }
.vx-frames img { width: 100%; aspect-ratio: 9 / 12; object-fit: cover; border-radius: 8px; display: block; background: var(--parchment); }
.vx-frames figcaption { font-size: 11px; color: var(--muted); margin-top: 4px; text-align: center; }
@media (max-width: 480px) { .vx-frames { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vx-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.vx-checks li { display: flex; align-items: center; gap: 8px; color: var(--ink-80); }
.vx-checks li span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--parchment); color: var(--ink-48); flex: none; }
.vx-checks li.pass span { background: var(--good-bg); color: var(--good); }
.vx-checks li.fail span { background: var(--warn-bg); color: var(--warn); }
.vx-checks em { font-style: normal; font-size: 12px; color: var(--ink-48); margin-left: auto; }


/* ---------- brief: headlines first, reasons one tap away ---------- */
.bf-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bf-fact { font-size: 13px; padding: 4px 9px; border-radius: 7px; background: var(--parchment); color: var(--ink); cursor: help; }
.bf-fact em { font-style: normal; color: var(--muted); margin-right: 6px; }
.bf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: n; }
.bf-list > li { position: relative; padding: 5px 0 5px 18px; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--divider); }
.bf-list > li:last-child { border-bottom: 0; }
.bf-list > li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-48); }
.bf-list.numbered > li { counter-increment: n; padding-left: 26px; }
.bf-list.numbered > li::before { content: counter(n); width: 18px; height: 18px; top: 6px; left: 0; background: var(--inverse-bg); color: var(--inverse-fg);
  font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.bf-list.asks > li::before { content: "?"; width: auto; height: auto; background: none; top: 5px; left: 3px; color: var(--primary); font-weight: 700; font-size: 13px; }
.bf-list details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 8px; color: var(--ink); }
.bf-list details summary::-webkit-details-marker { display: none; }
.bf-list details summary::after { content: "›"; color: var(--ink-48); transition: transform .15s; flex: none; }
.bf-list details[open] summary::after { transform: rotate(90deg); }
.bf-list details p { margin: 4px 0 2px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.bf-msg { margin-top: 18px; background: var(--parchment); border-radius: 10px; padding: 10px 12px; }
.bf-msg summary { list-style: none; cursor: pointer; display: flex; gap: 14px; align-items: center; font-size: 13px; }
.bf-msg summary::-webkit-details-marker { display: none; }
.bf-msg summary span { font-weight: 600; color: var(--ink); margin-right: auto; }
.bf-msg summary span::after { content: " ›"; color: var(--ink-48); }
.bf-msg[open] summary span::after { content: " ⌄"; }
.bf-msg summary a { font-size: 13px; }
.bf-msg p { margin: 10px 0 2px; font-size: 14px; color: var(--ink-80); white-space: pre-wrap; }
.source-warn { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.source-warn code { font-size: 12px; }
.source-ok { margin: 0; font-size: 13px; color: var(--muted); }
.vx-promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vx-promises li { display: grid; gap: 2px; font-size: 14px; }
.vx-promises b { font-weight: 600; color: var(--ink); }
.vx-promises span { font-size: 13px; color: var(--muted); }
.vx-promises em { font-style: normal; font-size: 11px; color: var(--ink-48); margin-left: 4px; }
.vx-opener { display: flex; gap: 10px; align-items: flex-start; }
.vx-opener p { margin: 0; flex: 1; }
.money { display: flex; gap: 8px; max-width: 320px; }
.money select { flex: none; }
.money input { flex: 1; min-width: 0; }

/* where a value came from, on hover */
.tip { position: fixed; z-index: 60; max-width: 320px; padding: 7px 10px; border-radius: 8px; background: var(--inverse-bg); color: var(--inverse-fg);
  font-size: 12px; line-height: 1.4; pointer-events: none; box-shadow: var(--tip-shadow); }
table.xl td[data-tip] { cursor: help; }
table.xl td[data-tip] a, table.xl td[data-tip] select, table.xl td[data-tip] input { cursor: pointer; }
.has-src { cursor: help; text-decoration: underline dotted transparent; text-underline-offset: 3px; }
.has-src:hover { text-decoration-color: var(--ink-48); }

/* why call now: the first thing in a company's panel */
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.why-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.why-thumb img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; display: block; background: var(--parchment); border: 1px solid var(--divider); }
.why-text { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.why-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.why-meta em { font-style: normal; font-weight: 600; }
.why-meta em.seen { color: var(--good); }
.why-meta em.guess { color: var(--ink-48); }
.why-opener { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--tray); border: 1px solid var(--divider);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 13.5px; }
.why-opener span { font-weight: 600; color: var(--ink); }
.why-opener p { margin: 0; color: var(--ink-80); }
.why-opener .linklike { font-size: 13px; }
.sure { font-size: 11px; color: var(--ink-48); margin-left: 6px; font-variant-numeric: tabular-nums; }
.sure.unsure { color: var(--warn); font-weight: 600; }


/* cost tables (History) */
.costs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.costs-table th, .costs-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--hairline); }
.costs-table th { color: var(--muted); font-weight: 500; }
.costs-table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) { .costs-table th:nth-child(2), .costs-table td:nth-child(2) { display: none; } }

.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 4px 0 12px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; }

.dd-sales { margin: 0 0 10px; padding-left: 18px; font-size: 14px; line-height: 1.6; }

.dig-card { margin-top: 20px; }
.dig-card h2 { font-size: 17px; margin: 0 0 4px; }

/* History page */
.hx-chart-card h2, .hx-split h2 { font-size: 16px; margin: 0 0 12px; }
.hx-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.hx-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.hx-bar i { display: block; width: 100%; min-height: 0; }
.hx-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.hx-h { font-size: 19px; margin: 28px 0 0; }
.hx-table tfoot td { border-top: 1px solid var(--hairline); }
.hx-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.hx-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 20px; }
@media (max-width: 760px) {
  .hx-split { grid-template-columns: minmax(0, 1fr); }
}
.hx-table td.n, .hx-table td.num, .hx-table th { white-space: nowrap; }

/* ---------- overview ----------
   Row 1: what needs you (a tray of three cards). Row 2: four key numbers. Row 3: two charts. Row 4: recent searches. */
.ov-tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(0, 0, 0, .06), 0 1px 2px rgba(16, 16, 24, .1); }
.ov-tile .i { width: 18px; height: 18px; }
.ov-tile.orange { background: linear-gradient(180deg, #f0b27a, #e39651); }
.ov-tile.teal { background: linear-gradient(180deg, #34b79c, #1f9a81); }
.ov-tile.plain { background: var(--canvas); color: var(--ink-80); border: 1px solid var(--hairline); box-shadow: var(--shadow-xs); }
.ov-label { margin: 0; font-size: 13px; color: var(--muted); }
.ov-figure { margin: 0; font: 500 32px/1.15 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
.ov-figure span { font-size: 14px; font-weight: 400; letter-spacing: -0.006em; color: var(--muted); margin-left: 6px; }
.ov-big { margin: 0; font: 500 38px/1.1 var(--display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.ov-big span { white-space: nowrap; font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.ov-sub { margin: 6px 0 0; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ov-sub .i { color: var(--ink-48); }
.ov-note { margin: 8px 4px 0; font-size: 12.5px; color: var(--ink-48); }

.ov-act { grid-template-columns: minmax(0, .9fr) minmax(0, 1.05fr) minmax(0, 1.05fr); }
.tray > .card { padding: 0; }
.ov-card-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--divider); }
.ov-card-h h2, .ov-card-h h3 { font-size: 15px; font-weight: 500; letter-spacing: -0.012em; }
.ov-card-b { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px; }
.ov-wallet { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 18px !important; }
.ov-wallet-top { display: flex; gap: 12px; align-items: flex-start; }
.ov-wallet-top .ov-figure { font-size: 26px; }
.ov-wallet-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ov-wallet-foot .ov-sub { margin: 0; }

.ov-row-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 4px 10px; }
.ov-row-h h2 { font-size: 15px; font-weight: 550; }
.ov-row-h a, .ov-chart-h > a { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--muted); }
.ov-row-h a:hover, .ov-chart-h > a:hover { color: var(--ink); text-decoration: none; }

.ov-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
a.ov-kpi { color: inherit; transition: border-color .15s; }
a.ov-kpi:hover { text-decoration: none; border-color: var(--border-strong); }
.ov-kpi-b { padding: 16px 18px; }
.ov-kpi-foot { margin: 8px 0 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.ov-vs { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delta { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta svg { width: 15px; height: 15px; flex: none; }
.delta svg path { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.delta.up { color: var(--good); } .delta.up svg circle { fill: var(--good-dot); }
.delta.down { color: var(--bad); } .delta.down svg circle { fill: var(--bad-dot); }
.delta.flat { color: var(--muted); font-weight: 400; } .delta.flat svg circle { fill: var(--ink-80); }
.delta.small { font-size: 12px; } .delta.small svg { width: 13px; height: 13px; }

.ov-charts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr); gap: 16px; margin-top: 16px; }
.ov-chart-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ov-chart-h h2 { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.ov-chart-h .ov-sub { margin-top: 0; }
.ov-hex svg.hex { display: block; width: 100%; height: auto; margin: 18px 0 14px; }
.hex polygon { stroke: var(--canvas); stroke-width: 1.4; stroke-linejoin: round; }
.h-orange, .sw-orange { fill: var(--c-orange); background: var(--c-orange); }
.h-blue, .sw-blue { fill: var(--c-blue); background: var(--c-blue); }
.h-purple, .sw-purple { fill: var(--c-purple); background: var(--c-purple); }
.h-teal, .sw-teal { fill: var(--c-teal); background: var(--c-teal); }
.h-empty { fill: var(--c-empty); }
.ov-legend { list-style: none; margin: 0; padding: 4px; display: grid; gap: 4px; background: var(--tray); border: 1px solid var(--hairline); border-radius: 12px; }
.ov-legend a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; background: var(--canvas); color: var(--ink); font-size: 13.5px; }
.ov-legend a:hover { text-decoration: none; box-shadow: var(--shadow-sm); }
.ov-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ov-legend b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.ov-legend .delta { margin-left: auto; }
.ov-legend .delta + b { margin-left: 10px; }

.ov-growth { display: flex; flex-direction: column; }
.ov-growth .ov-figure { font-size: 34px; }
.dots-chart { flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(220px, 1fr) auto; gap: 8px 12px; margin-top: 18px; }
.dots-y { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums; margin: -7px 0; }
svg.dots { width: 100%; height: 100%; min-height: 220px; display: block; }
svg.dots circle { fill: var(--dot-off); }
svg.dots circle.on { fill: var(--c-orange); }
svg.dots g:hover circle.on { fill: #d9843a; }
.dots-x { grid-column: 2; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

.ov-runs { margin-top: 0; }
.ov-runs td { padding-top: 14px; padding-bottom: 14px; }
.ov-cell-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ov-cell-n { font-weight: 500; font-variant-numeric: tabular-nums; }
.ticks { display: flex; gap: 2px; margin-top: 6px; }
.ticks i { width: 3px; height: 16px; border-radius: 1px; background: var(--track-empty); }
.ticks i.on { background: var(--c-teal); }
.ticks.full i.on { background: var(--c-orange); }
.ov-empty { display: grid; gap: 4px; place-items: center; padding: 40px 20px; text-align: center; color: var(--muted); }
.ov-empty b { color: var(--ink); font-weight: 550; }

@media (max-width: 1100px) {
  .ov-act { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ov-wallet { grid-column: span 2; }
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-charts { grid-template-columns: minmax(0, 1fr); }
  .ov-hex { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; }
  .ov-hex .ov-chart-h { grid-column: span 2; }
  .ov-hex .ov-legend { align-self: center; }
}
@media (max-width: 640px) {
  .ov-act { grid-template-columns: minmax(0, 1fr); }
  .ov-wallet { grid-column: auto; }
  .ov-hex { display: block; }
  .ov-runs th:nth-child(2), .ov-runs td:nth-child(2), .ov-runs th:nth-child(5), .ov-runs td:nth-child(5) { display: none; }
  .ov-kpi-b { padding: 14px; }
  .ov-kpis .ov-card-h { padding: 12px 14px; gap: 10px; }
  .ov-kpis .ov-tile { display: none; }
  .ov-figure { font-size: 26px; }
}

/* history: the same key-number cards */
.hx-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.hx-card { padding: 16px 18px !important; display: flex; flex-direction: column; gap: 4px; }
.hx-card span { font-size: 13px; color: var(--muted); }
.hx-card b { font: 500 28px/1.15 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hx-card small { font-size: 12.5px; color: var(--muted); }
.hx-bar i { background: var(--c-orange); opacity: 1; border-radius: 3px 3px 1px 1px; }
.hx-bar:hover i { background: #d9843a; }
@media (max-width: 760px) { .hx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* plain buttons (tabs, links, close, openers) keep none of the raised button look */
.icon-btn, .linklike, .opener, .chip-x, .cx-tabs button { box-shadow: none; height: auto; }
.icon-btn { height: 30px; }
.opener { height: 18px; }
.chip-x { height: 22px; }
.linklike:active, .cx-tabs button:active { transform: none; }

/* Settings: where companies count, and how we search */
.choice { border: 0; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.choice legend { font-size: 13px; font-weight: 500; color: var(--ink-80); margin-bottom: 8px; padding: 0; }
.choice label, .sources .src { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--hairline);
  border-radius: 12px; background: var(--canvas); cursor: pointer; }
.choice label:has(input:checked), .sources .src:has(input:checked:not(:disabled)) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.choice input, .sources input { margin: 2px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--primary); }
.choice span, .sources .src span { display: grid; gap: 2px; font-size: 13.5px; }
.choice small, .sources small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.sources em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--good); margin-top: 3px; }
.sources .src:has(input:disabled) { cursor: default; background: var(--tray); }
.sources { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 4px 0 16px; }
.rescue { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--good-bg); display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 10px; }
.rescue p { margin: 0; font-size: 13.5px; color: var(--ink-80); flex: 1 1 280px; }
@media (max-width: 640px) { .choice, .sources { grid-template-columns: minmax(0, 1fr); } }

/* Find companies: what the next search will do */
.plan { padding: 14px 16px; border-radius: 12px; background: var(--tray); border: 1px solid var(--hairline); display: grid; gap: 10px; }
.plan h3 { font-size: 14px; }
.plan .source-ok { margin: 0; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plan-list li { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.plan-list b { min-width: 34px; text-align: right; font: 600 18px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.plan-list em { font-style: normal; color: var(--muted); font-size: 13px; }
.plan .hint { margin: 0; }
.dead-end { padding: 12px 14px; border-radius: 10px; background: var(--warn-bg); display: grid; gap: 10px; }
.dead-end p { margin: 0; font-size: 13.5px; color: var(--ink-80); }
.idea-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rescue .btn { white-space: normal; height: auto; min-height: 32px; padding: 7px 12px; line-height: 1.3; text-align: left; max-width: 100%; }

/* sign-in */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-wrap { width: min(380px, 100%); }
.login-card { padding: 28px; }
.login-logo { width: 40px; height: 40px; }
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-card button { width: 100%; height: 40px; }
.login-error { margin: 0; padding: 9px 12px; border-radius: 9px; background: var(--bad-bg); color: var(--bad); font-size: 13.5px; }
.signed-in { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.signed-in span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.side-mini .signed-in { display: none; }

/* a phone number's proof: the crop of the ad where it's printed */
.proof { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 4px 8px 4px 4px; border: 1px solid var(--hairline);
  border-radius: 8px; background: var(--canvas); font-size: 12px; color: var(--muted); max-width: 100%; vertical-align: middle; }
.proof:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.proof img { height: 46px; max-width: 220px; object-fit: contain; border-radius: 5px; background: var(--tray); display: block; }
.cx-dl dd .proof { display: flex; width: fit-content; }
.cx-reach .proof { align-self: flex-start; }

/* ---------- Settings: one sentence, a live engine card, and set-once lines ---------- */
.st-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.st-main { display: grid; gap: 14px; min-width: 0; }
.st-eyebrow { margin: 0 0 10px; font: 600 11px/1.3 var(--text); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-48); }
.st-brief { padding: 24px 26px; }
.st-sentence { margin: 0; font: 450 20px/1.65 var(--display); letter-spacing: -0.015em; color: var(--ink-80); }
.nb { white-space: nowrap; }
.blank { color: var(--ink); font-weight: 550; cursor: pointer; border-radius: 6px; padding: 0 2px; margin: 0 -2px;
  text-decoration: underline; text-decoration-style: dashed; text-decoration-color: var(--ink-48); text-decoration-thickness: 1.5px;
  text-underline-offset: 5px; white-space: normal; transition: background .12s; }
.blank:hover { background: var(--tray); text-decoration-color: var(--primary); }
.blank:focus-visible { outline: 2px solid var(--primary-focus); outline-offset: 2px; }
.blank[aria-expanded="true"] { background: var(--primary-soft); color: var(--primary); text-decoration-style: solid; text-decoration-color: var(--primary); }
.st-sells { margin: 10px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-80); }
.st-sells-l { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.st-sells .blank { font-weight: 450; }
.st-pop { margin-top: 16px; padding: 14px 16px 16px; border-radius: 12px; background: var(--tray); border: 1px solid var(--hairline); display: grid; gap: 10px; }
.st-pop-h { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.st-pop-h span { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 13px; }
.st-pop textarea { width: 100%; background: var(--canvas); }
.st-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-80); }
.st-inline select, .st-inline input { height: 34px; width: auto; }
.st-inline input { width: 90px; }
.st-inline small { color: var(--muted); font-size: 12.5px; }
.st-warn { margin: 0; font-size: 13px; color: var(--warn); background: var(--warn-bg); padding: 8px 10px; border-radius: 8px; }
.st-area { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.st-area > span { margin-right: 4px; }
.st-area label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--hairline);
  background: var(--canvas); cursor: pointer; color: var(--ink-80); }
.st-area label b { font-weight: 500; }
.st-area input { position: absolute; opacity: 0; pointer-events: none; }
.st-area label:has(input:checked) { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.st-area label:has(input:focus-visible) { outline: 2px solid var(--primary-focus); outline-offset: 2px; }
.st-brief .rescue { margin-top: 12px; }
.st-checks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.st-checks:empty { display: none; }
.st-checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px;
  border-radius: 10px; background: var(--warn-bg); }
.st-checks li.cl-block { background: var(--bad-bg); }
.st-checks p { margin: 0; font-size: 13.5px; color: var(--ink); }
.st-checks .cl-actions { margin: 0; }

.st-h h2 { font-size: 16px; }
.st-h p { margin: 4px 0 12px; font-size: 13.5px; color: var(--muted); }
.st-note { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-48); }
.st-note:empty { display: none; }
.chip-item .yield { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--good); background: var(--good-bg);
  padding: 1px 6px; border-radius: 999px; margin-left: 2px; font-variant-numeric: tabular-nums; }
.chip-item .yield.new { color: var(--ink-48); background: var(--canvas); border: 1px solid var(--hairline); }
.chip-item .yield.dud { color: var(--bad); background: var(--bad-bg); }

.st-once-h { font-size: 15px; font-weight: 550; margin: 14px 4px 0; }
.st-once-h span { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.st-once { padding: 0 !important; }
.st-once summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 220px minmax(0, 1fr) 16px; gap: 14px;
  align-items: center; padding: 15px 20px; font-size: 14px; }
.st-once summary::-webkit-details-marker { display: none; }
.st-once summary::after { content: "›"; color: var(--ink-48); font-size: 18px; transition: transform .15s; justify-self: end; }
.st-once[open] summary::after { transform: rotate(90deg); }
.st-once summary b { font-weight: 550; color: var(--ink); }
.st-once summary span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-once summary:hover span { color: var(--ink-80); }
.st-once-b { padding: 4px 20px 20px; display: grid; gap: 14px; border-top: 1px solid var(--divider); padding-top: 16px; }
.st-sources { list-style: none; margin: 0; padding: 0; display: grid; }
.st-sources li { border-bottom: 1px solid var(--divider); }
.st-sources li:last-child { border-bottom: 0; }
.st-sources label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 2px; cursor: pointer; font-size: 14px; }
.st-sources input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--primary); }
.st-sources small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.st-engine { position: sticky; top: calc(var(--nav-h) + 16px); padding: 18px 18px 16px !important; display: grid; gap: 16px; }
.st-live { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.st-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good-dot); }
.st-short { margin: -6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--warn); background: var(--warn-bg); padding: 8px 10px; border-radius: 9px; }
.st-engine-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.st-engine-h h2 { font-size: 17px; }
.st-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.st-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 0 0 12px; position: relative; }
.st-steps li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 2px; width: 2px; background: var(--divider); }
.st-step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600;
  color: var(--primary); background: var(--primary-soft); }
.st-step-t { margin: 2px 0 0; font-size: 14.5px; font-weight: 550; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-step-t { justify-content: space-between; }
.st-step-t b { font: 500 13px/1 var(--text); color: var(--muted); font-variant-numeric: tabular-nums; }
.st-step-d { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.st-num { width: 70px !important; height: 30px !important; padding: 0 8px; font-size: 14px; font-weight: 600; text-align: center; }
.st-totals { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px;
  background: var(--tray); border: 1px solid var(--hairline); }
.st-totals div { background: var(--canvas); border-radius: 9px; padding: 10px 11px; min-width: 0; }
.st-totals dt { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.st-totals dd { margin: 3px 0 0; font: 600 21px/1.15 var(--display); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-totals small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.st-engine-note { margin: 0; font-size: 12px; color: var(--ink-48); line-height: 1.45; }
.st-actions { display: grid; gap: 8px; }
.st-actions button { width: 100%; }
.st-dirty { margin: -6px 0 0; font-size: 12.5px; color: var(--warn); text-align: center; }
.st-dirty.bad { color: var(--bad); }
.st-ideas { border-top: 1px solid var(--divider); padding-top: 12px; }
.st-ideas p { margin: 0 0 6px; font: 600 11px/1.3 var(--text); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-48); }
.st-ideas ul { margin: 0; padding-left: 16px; display: grid; gap: 4px; font-size: 13px; color: var(--ink-80); }
.st-refresh { margin: 10px 0 0; text-align: right; font-size: 13px; }
.st-mini { display: none; }
@media (max-width: 1100px) {
  .st-layout { grid-template-columns: minmax(0, 1fr); padding-bottom: 72px; }
  .st-engine { position: static; }
  .st-mini { display: flex; position: fixed; left: var(--side-w); right: 0; bottom: 0; z-index: 20; align-items: center; gap: 12px;
    justify-content: space-between; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--frost-strong);
    border-top: 1px solid var(--hairline); backdrop-filter: blur(8px); }
  .st-mini p { margin: 0; font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .st-mini b { color: var(--ink); font-size: 15px; }
  .st-mini button { flex: none; }
}
@media (max-width: 900px) { .st-mini { left: 0; } }
@media (max-width: 640px) {
  .st-brief { padding: 18px; }
  .st-sentence { font-size: 19px; line-height: 1.8; }
  .st-once summary { grid-template-columns: minmax(0, 1fr) 16px; gap: 2px 10px; padding: 13px 16px; }
  .st-once summary span { grid-column: 1; grid-row: 2; white-space: normal; font-size: 12.5px; }
  .st-once summary::after { grid-column: 2; grid-row: 1 / span 2; }
  .st-once-b { padding: 14px 16px 16px; }
  .st-checks li { grid-template-columns: 20px minmax(0, 1fr); }
  .st-checks .cl-actions { grid-column: 2; }
}

/* Appearance switch at the bottom of the sidebar */
.theme-switch { display: flex; align-items: center; gap: 2px; margin-bottom: 10px; padding: 3px; border-radius: 10px;
  background: var(--hover-tint); }
.theme-switch span { flex: 1; padding-left: 8px; font-size: 12.5px; color: var(--muted); }
.theme-switch button { width: 30px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted);
  box-shadow: none; }
.theme-switch button:hover { background: var(--hover-tint-2); color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--canvas); color: var(--ink); box-shadow: var(--shadow-sm); }
.theme-switch button .i { margin: 0; }
html.side-mini .theme-switch { display: none; }

/* Top-bar light/dark button: moon while light, sun while dark */
.theme-toggle { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-80);
  border: 1px solid var(--hairline); background: var(--canvas); box-shadow: var(--shadow-xs); }
.theme-toggle:hover { background: var(--tray); color: var(--ink); }
.theme-toggle .i { margin: 0; }
.theme-toggle .t-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .t-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .t-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .t-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .t-moon { display: none; }
}
.theme-switching, .theme-switching * { transition: none !important; }

/* Settings: describe your goal, and Clear on every field */
.st-goal { display: grid; gap: 12px; margin-bottom: 16px; }
.st-goal-h { display: flex; gap: 12px; align-items: flex-start; }
.st-goal-h h2 { font-size: 16px; }
.st-goal-h p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }
.st-goal textarea { width: 100%; resize: vertical; min-height: 72px; font-size: 14px; line-height: 1.5; }
.st-goal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-goal-status { font-size: 13px; color: var(--muted); }
.st-goal-status.bad { color: var(--bad); }
.st-goal-result { padding: 10px 12px; border-radius: 10px; background: var(--primary-tint); border: 1px solid var(--hairline);
  display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-80); }
.st-goal-result p { margin: 0; }
/* the × that clears a field: inside it, on the right, only while it has something to clear */
.clearable { position: relative; display: block; width: 100%; }
.clearable > input, .clearable > textarea { width: 100%; padding-right: 36px; }
.field-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--hover-tint-2); color: var(--muted);
  box-shadow: none; cursor: pointer; }
.clearable.is-area > .field-x { top: 10px; transform: none; }
.field-x:hover { background: var(--bad-bg); color: var(--bad); }
.field-x:active { transform: translateY(-50%) scale(.94); }
.clearable.is-area > .field-x:active { transform: scale(.94); }
.field-x[hidden] { display: none; }
.chip-clear.field-x { position: static; transform: none; margin-left: auto; align-self: center; flex: none; }
.chip-clear.field-x:active { transform: scale(.94); }

/* Term check under Search terms */
.term-block { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--bad-bg); display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 10px; }
.term-block p { margin: 0; font-size: 13.5px; color: var(--ink-80); flex: 1 1 300px; }
.term-check { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--tray); border: 1px solid var(--hairline);
  display: grid; gap: 10px; }
.tc-sum { margin: 0; font-size: 13.5px; color: var(--ink-80); }
.tc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tc-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; padding: 7px 10px; border-radius: 8px;
  background: var(--canvas); border: 1px solid var(--hairline); border-left: 3px solid var(--warn); }
.tc-list li.bad { border-left-color: var(--bad); }
.tc-term { font-weight: 600; color: var(--ink); }
.tc-why { color: var(--muted); flex: 1 1 180px; }
.tc-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.chip-item.term-bad { box-shadow: inset 0 0 0 1.5px var(--bad); }
.chip-item.term-weak { box-shadow: inset 0 0 0 1.5px var(--warn); }

/* Search page: why so few companies fit */
.low-yield { padding: 0 !important; margin-bottom: 16px; border-color: var(--warn); }
.ly-b { padding: 16px 18px; display: grid; gap: 12px; font-size: 14px; color: var(--ink-80); }
.ly-b p { margin: 0; }
.ly-b .btn { justify-self: start; }
.ly-groups { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ly-groups li { display: flex; gap: 12px; align-items: baseline; padding: 8px 12px; border-radius: 9px; background: var(--tray); }
.ly-groups b { min-width: 30px; text-align: right; font: 600 17px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.ly-groups span { display: grid; gap: 1px; }
.ly-groups small { color: var(--muted); font-size: 12.5px; }

/* Where we look: what each source costs and what it has done for this list */
.st-sources .cost { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; margin-left: 6px;
  background: var(--good-bg); color: var(--good); vertical-align: 1px; }
.st-sources .cost.paid { background: var(--warn-bg); color: var(--warn); }
.src-adv { display: block; font-style: normal; font-size: 12.5px; margin-top: 3px; color: var(--muted); }
.src-adv.best { color: var(--good); font-weight: 500; }
.src-adv.weak { color: var(--warn); }
.choice.depth { margin-top: 4px; }

/* Access keys: the key screen's command, the one-time new key, the key list */
.key-cmd { margin: 0; padding: 10px 12px; border-radius: 9px; background: var(--field); font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
.key-new { border-color: var(--primary); }
.key-copy { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.key-copy code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 9px; background: var(--field); font-size: 13.5px; word-break: break-all; }
.key-form { display: grid; gap: 12px; max-width: 420px; }
.key-form .check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.key-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.key-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--hairline); }
.key-table td { padding: 9px 8px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.key-table tr.revoked td { color: var(--muted); }
.key-table form { margin: 0; }
.btn.danger { color: var(--bad); }
.signed-in a + a { margin-left: 10px; }
@media (max-width: 640px) { .key-table th:nth-child(4), .key-table td:nth-child(4), .key-table th:nth-child(5), .key-table td:nth-child(5) { display: none; } }

/* Your API keys: one card per provider, the key never shown back */
.keys-form { display: grid; gap: 12px; }
.key-row { display: grid; gap: 8px; }
.key-row.needed { border-color: var(--primary); }
.key-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.key-head h2 { margin: 0; font-size: 15px; }
.key-tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--hover-tint); color: var(--primary); }
.key-state { font-size: 13px; }
.key-for { margin: 0; font-size: 13px; color: var(--muted); }
.key-line { display: flex; gap: 8px; align-items: center; }
.key-line input { flex: 1; min-width: 0; height: 36px; border-radius: 9px; border: 1px solid var(--hairline); background: var(--field);
  color: var(--ink); font: inherit; font-size: 13.5px; padding: 0 12px; }
.keys-save { display: flex; gap: 12px; align-items: center; position: sticky; bottom: 0; padding: 12px 0; background: var(--app-bg); }

/* the list's name, decided right under the goal it comes from */
.st-listname { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; margin-top: 12px; }
.st-listname > span { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.st-listname input { height: 38px; font-weight: 550; }
.st-listname small { grid-column: 2; font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) { .st-listname { grid-template-columns: minmax(0, 1fr); } .st-listname small { grid-column: 1; } }
