/* Radar dashboard. Tokens first, then base, shell, components, views. No external fonts or CDNs. */

/* ---- Tokens: light (default) ------------------------------------------------------------------------------------ */
:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-15: 15px; --fs-17: 17px; --fs-20: 20px; --fs-24: 24px; --fs-30: 30px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;
  --r-sm: 6px; --r: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 18px; --r-full: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 160ms;
  --sidebar-w: 244px;
  --tabbar-h: 58px;

  --bg: #fbfbfc;
  --bg-sub: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f7f7f9;
  --surface-3: #eeeef2;
  --border: #e7e7eb;
  --border-strong: #d5d5dc;
  --text: #17181b;
  --text-2: #43454d;
  --text-3: #686b75;
  --accent: #4f5bd5;
  --accent-hover: #4450c9;
  --accent-text: #3f4bc4;
  --accent-soft: #eef0fd;
  --accent-border: #cfd3f7;
  --on-accent: #ffffff;
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px rgba(79, 91, 213, .55);

  --green: #1a7f4b; --green-soft: #e6f5ec; --green-border: #b9e2ca;
  --amber: #8a5300; --amber-soft: #fff5de; --amber-border: #f0d48e;
  --red: #c4262e; --red-soft: #fdeded; --red-border: #f5c2c4;
  --blue: #1b62c6; --blue-soft: #e8f0fd; --blue-border: #c3d7f6;
  --violet: #6b45c4; --violet-soft: #f2eefd; --violet-border: #d8cdf6;
  --gray: #5b5e67; --gray-soft: #f0f0f3; --gray-border: #dfdfe5;

  --shadow-xs: 0 1px 2px rgba(16, 18, 27, .05);
  --shadow-sm: 0 1px 2px rgba(16, 18, 27, .05), 0 1px 3px rgba(16, 18, 27, .04);
  --shadow-md: 0 4px 12px -2px rgba(16, 18, 27, .08), 0 2px 4px -2px rgba(16, 18, 27, .05);
  --shadow-lg: 0 18px 48px -12px rgba(16, 18, 27, .22), 0 6px 16px -8px rgba(16, 18, 27, .12);
  --overlay: rgba(17, 18, 22, .38);
  --glass: rgba(251, 251, 252, .82);
  --sk-a: #eeeef2; --sk-b: #f6f6f8;
}

/* ---- Tokens: dark (system preference, unless pinned light) --------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0c0e; --bg-sub: #0e0f12; --surface: #131418; --surface-2: #191a1f; --surface-3: #212228;
    --border: #23242a; --border-strong: #30323a;
    --text: #ededf0; --text-2: #b6b8bf; --text-3: #8d909a;
    --accent: #5e6ad2; --accent-hover: #6c78df; --accent-text: #a7afff; --accent-soft: rgba(94, 106, 210, .16); --accent-border: rgba(130, 140, 240, .34);
    --on-accent: #ffffff; --ring: 0 0 0 2px var(--bg), 0 0 0 4px rgba(140, 150, 255, .7);
    --green: #4cc38a; --green-soft: rgba(76, 195, 138, .12); --green-border: rgba(76, 195, 138, .3);
    --amber: #f0b43e; --amber-soft: rgba(240, 180, 62, .11); --amber-border: rgba(240, 180, 62, .32);
    --red: #ff8b8b; --red-soft: rgba(255, 99, 99, .12); --red-border: rgba(255, 120, 120, .32);
    --blue: #74a9ff; --blue-soft: rgba(84, 140, 255, .14); --blue-border: rgba(110, 160, 255, .3);
    --violet: #b89dff; --violet-soft: rgba(160, 125, 255, .14); --violet-border: rgba(170, 140, 255, .3);
    --gray: #a4a7af; --gray-soft: rgba(255, 255, 255, .06); --gray-border: rgba(255, 255, 255, .1);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .02);
    --shadow-md: 0 8px 20px -6px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .04);
    --overlay: rgba(0, 0, 0, .6);
    --glass: rgba(11, 12, 14, .8);
    --sk-a: #1a1b20; --sk-b: #22232a;
  }
}
/* Same dark values when pinned with the toggle. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c0e; --bg-sub: #0e0f12; --surface: #131418; --surface-2: #191a1f; --surface-3: #212228;
  --border: #23242a; --border-strong: #30323a;
  --text: #ededf0; --text-2: #b6b8bf; --text-3: #8d909a;
  --accent: #5e6ad2; --accent-hover: #6c78df; --accent-text: #a7afff; --accent-soft: rgba(94, 106, 210, .16); --accent-border: rgba(130, 140, 240, .34);
  --on-accent: #ffffff; --ring: 0 0 0 2px var(--bg), 0 0 0 4px rgba(140, 150, 255, .7);
  --green: #4cc38a; --green-soft: rgba(76, 195, 138, .12); --green-border: rgba(76, 195, 138, .3);
  --amber: #f0b43e; --amber-soft: rgba(240, 180, 62, .11); --amber-border: rgba(240, 180, 62, .32);
  --red: #ff8b8b; --red-soft: rgba(255, 99, 99, .12); --red-border: rgba(255, 120, 120, .32);
  --blue: #74a9ff; --blue-soft: rgba(84, 140, 255, .14); --blue-border: rgba(110, 160, 255, .3);
  --violet: #b89dff; --violet-soft: rgba(160, 125, 255, .14); --violet-border: rgba(170, 140, 255, .3);
  --gray: #a4a7af; --gray-soft: rgba(255, 255, 255, .06); --gray-border: rgba(255, 255, 255, .1);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .02);
  --shadow-md: 0 8px 20px -6px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .04);
  --overlay: rgba(0, 0, 0, .6);
  --glass: rgba(11, 12, 14, .8);
  --sk-a: #1a1b20; --sk-b: #22232a;
}

/* ---- Base ------------------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 400 var(--fs-14)/1.5 var(--font); letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
img, svg { display: block; }
.icon { flex: none; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
code, kbd, pre { font-family: var(--mono); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.spacer { flex: 1 1 auto; }
.muted { color: var(--text-3); }
.mono { font-family: var(--mono); }
.small { font-size: var(--fs-12); }
.center { text-align: center; justify-content: center; }
.grow { flex: 1 1 auto; }
.pad { padding: var(--s5); }
.noscript { padding: 40px; text-align: center; }

.boot { min-height: 100dvh; display: grid; place-items: center; }
.skip-link { position: fixed; left: 12px; top: -48px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--r); box-shadow: var(--shadow-md); transition: top var(--dur) var(--ease); }
.skip-link:focus { top: 12px; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

/* ---- Logo ------------------------------------------------------------------------------------------------------- */
.logo .logo-bg { fill: #14151a; }
.logo .logo-ring { stroke: #6e79e6; }
.logo .logo-sweep { fill: #6e79e6; fill-opacity: .38; }
.logo .logo-blip { fill: #cdd2ff; }

/* ---- Shell ------------------------------------------------------------------------------------------------------ */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; }
.content { min-width: 0; display: flex; flex-direction: column; }
.main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: var(--s8) var(--s10) var(--s12); outline: none; }

.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: var(--s2);
  padding: var(--s4) var(--s3); background: var(--bg-sub); border-right: 1px solid var(--border); overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; }
.brand-name { font: 650 var(--fs-17)/1 var(--font-display); letter-spacing: -0.02em; }
.mock-pill {
  font: 600 10px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--amber);
  background: var(--amber-soft); border: 1px solid var(--amber-border); padding: 4px 6px; border-radius: var(--r-full);
}
.new-job { justify-content: flex-start; margin: 0 2px 8px; }
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: var(--r);
  color: var(--text-2); font-weight: 500; background: none; border: 0; text-align: left;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.nav-item.active .nav-icon { color: var(--accent-text); }
.nav-icon { display: grid; place-items: center; color: var(--text-3); }
.nav-label { flex: 1; }
.nav-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full); display: inline-grid; place-items: center;
  font: 600 var(--fs-11)/1 var(--font); font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--text-2);
}
.nav-item[data-nav="inbox"] .nav-badge { background: var(--accent); color: var(--on-accent); }
.nav-item[data-nav="clients"] .nav-badge { background: var(--green-soft); color: var(--green); }
.nav-quiet { font-weight: 450; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: var(--s3); border-top: 1px solid var(--border); }
.sidebar-foot .seg { margin: 4px 2px 6px; }
.account { display: flex; align-items: center; gap: 10px; padding: 8px 6px 2px 8px; }
.account-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.account-email { font-size: var(--fs-13); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-sub { font-size: var(--fs-12); color: var(--text-3); }
.avatar {
  width: 28px; height: 28px; border-radius: var(--r-full); display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--accent), #8b5cf6); color: #fff; font: 650 12px/1 var(--font);
}
.avatar-lg { width: 40px; height: 40px; font-size: 15px; }

.topbar { display: none; }
.tabbar { display: none; }

/* ---- Buttons ---------------------------------------------------------------------------------------------------- */
.btn {
  --btn-h: 36px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--btn-h); padding: 0 14px;
  border-radius: var(--r); border: 1px solid transparent; font-weight: 550; font-size: var(--fs-14); white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform 80ms var(--ease), color var(--dur);
  user-select: none; -webkit-user-select: none; position: relative;
}
.btn:active:not(:disabled) { transform: translateY(.5px) scale(.99); }
.btn:disabled { opacity: .55; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 2px rgba(30, 35, 120, .25), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-xs); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
:root[data-theme="dark"] .btn-danger { color: #1a0505; }
.btn-sm { --btn-h: 30px; padding: 0 10px; font-size: var(--fs-13); gap: 6px; border-radius: var(--r-sm); }
.btn-lg { --btn-h: 44px; padding: 0 18px; font-size: var(--fs-15); border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon-lg { width: 44px; padding: 0; }
.btn .kbds { margin-left: 4px; }
.btn-primary kbd { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .22); color: inherit; box-shadow: none; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--on-accent) transparent var(--on-accent) var(--on-accent); animation: spin .7s linear infinite;
}
.btn-secondary.loading::after, .btn-ghost.loading::after { border-color: var(--text) transparent var(--text) var(--text); }
.btn.copied { color: var(--green); }
.btn-primary.copied { background: var(--green); color: #fff; }
.spinning .icon { animation: spin .8s linear infinite; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r); border: 0; background: transparent; color: var(--text-3);
  transition: background var(--dur), color var(--dur);
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); font-weight: 550; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px;
  font: 500 11px/1 var(--mono); color: var(--text-3); background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: 0 1px 0 var(--border-strong);
}
.kbds { display: inline-flex; gap: 3px; }

/* ---- Inputs ----------------------------------------------------------------------------------------------------- */
.input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.input::placeholder { color: var(--text-3); opacity: .85; }
.input:hover { border-color: color-mix(in srgb, var(--border-strong) 60%, var(--text-3)); }
.input:focus-visible, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); border-radius: var(--r); }
.input:disabled { opacity: .55; }
.input-lg { height: 46px; font-size: var(--fs-17); font-variant-numeric: tabular-nums; }
.textarea { height: auto; padding: 10px 12px; line-height: 1.55; resize: vertical; min-height: 84px; }
.input-code { height: 52px; font: 500 24px/1 var(--mono); letter-spacing: .35em; text-align: center; padding-left: calc(12px + .35em); }
.input-time { width: auto; min-width: 116px; font-variant-numeric: tabular-nums; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 42px; }
.input-affix { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 30px; display: grid; place-items: center; border: 0; background: none; color: var(--text-3); border-radius: var(--r-sm); }
.input-affix:hover { color: var(--text); background: var(--surface-3); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.form { display: flex; flex-direction: column; gap: var(--s4); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.label { font-size: var(--fs-13); font-weight: 550; color: var(--text-2); }
.hint { font-size: var(--fs-13); color: var(--text-3); }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.form-error, .field-error {
  display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-13); color: var(--red); background: var(--red-soft);
  border: 1px solid var(--red-border); padding: 9px 12px; border-radius: var(--r);
}
.check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-13); color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }

/* segmented */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r); background: var(--surface-3); border: 1px solid var(--border); }
.seg-btn {
  white-space: nowrap; border: 0; background: transparent; color: var(--text-2); font-weight: 550; font-size: var(--fs-13); height: 28px; padding: 0 12px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background var(--dur), color var(--dur), box-shadow var(--dur);
}
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg-icons { display: flex; }
.seg-icons .seg-btn { flex: 1; padding: 0; }

/* switch */
.switch { position: relative; display: inline-flex; width: 38px; height: 22px; flex: none; }
.switch-input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-track { width: 100%; height: 100%; border-radius: var(--r-full); background: var(--border-strong); transition: background var(--dur) var(--ease); position: relative; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform var(--dur) var(--ease); }
.switch-input:checked + .switch-track { background: var(--accent); }
.switch-input:checked + .switch-track .switch-thumb { transform: translateX(16px); }
.switch-input:focus-visible + .switch-track { box-shadow: var(--ring); }
.switch-input:disabled + .switch-track { opacity: .5; }

/* range */
.range-wrap { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 280px; }
.range { -webkit-appearance: none; appearance: none; flex: 1; height: 6px; border-radius: var(--r-full); background: linear-gradient(to right, var(--accent) var(--fill, 70%), var(--surface-3) var(--fill, 70%)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); cursor: grab; }
.range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); }
.range:focus-visible { box-shadow: var(--ring); }
.range-val { min-width: 34px; height: 30px; border-radius: var(--r); display: grid; place-items: center; font: 650 var(--fs-15)/1 var(--font); font-variant-numeric: tabular-nums; background: var(--accent-soft); color: var(--accent-text); }

/* stepper */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-xs); overflow: hidden; }
.stepper-btn { width: 34px; height: 34px; border: 0; background: none; color: var(--text-2); font-size: 17px; }
.stepper-btn:hover { background: var(--surface-2); color: var(--text); }
.stepper-input { width: 56px; height: 34px; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-radius: 0; text-align: center; box-shadow: none; padding: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.stepper-input:focus { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 0; }

/* choice chips */
.chip-select, .filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.choice {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-full);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-weight: 500; font-size: var(--fs-13);
  transition: all var(--dur) var(--ease);
}
.choice:hover { color: var(--text); background: var(--surface-2); }
.choice[aria-checked="true"] { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-text); }
.choice .count, .filter-tab .count, .tab .count { font-size: var(--fs-11); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-3); }
.choice[aria-checked="true"] .count { color: var(--accent-text); }

/* ---- Cards and page header ------------------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); min-height: 52px; flex-wrap: wrap; }
.card-title { font: 600 var(--fs-14)/1.3 var(--font); letter-spacing: -0.01em; }
.card-desc { font-size: var(--fs-12); color: var(--text-3); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s6); flex-wrap: wrap; }
.page-title { font: 680 var(--fs-24)/1.2 var(--font-display); letter-spacing: -0.025em; }
.page-sub { color: var(--text-3); margin-top: 4px; font-size: var(--fs-14); }
.page-actions { display: flex; gap: 8px; align-items: center; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-full); font-size: var(--fs-12); font-weight: 550; background: var(--gray-soft); color: var(--gray); border: 1px solid var(--gray-border); }
.pill-warn { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-border); }

/* ---- Score, chips, flags ---------------------------------------------------------------------------------------- */
.score {
  flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font: 680 var(--fs-15)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  border: 1px solid transparent;
}
.score-lg { width: 52px; height: 52px; border-radius: 14px; font-size: var(--fs-24); }
.score-top { background: var(--green-soft); color: var(--green); border-color: var(--green-border); }
.score-good { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-border); }
.score-mid { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-border); }
.score-low { background: var(--gray-soft); color: var(--gray); border-color: var(--gray-border); }
.score-none { background: transparent; color: var(--text-3); border: 1px dashed var(--border-strong); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px 0 7px; border-radius: var(--r-full);
  font-size: var(--fs-12); font-weight: 550; white-space: nowrap; border: 1px solid transparent;
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip strong { font-weight: 650; margin-left: 2px; font-variant-numeric: tabular-nums; }
.chip-ready { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-border); }
.chip-new { background: var(--gray-soft); color: var(--text-2); border-color: var(--gray-border); }
.chip-screening { background: var(--violet-soft); color: var(--violet); border-color: var(--violet-border); }
.chip-screening .chip-dot { animation: pulse 1.4s ease-in-out infinite; }
.chip-sent { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-border); }
.chip-replied { background: var(--green-soft); color: var(--green); border-color: var(--green-border); }
.chip-skipped, .chip-archived { background: var(--gray-soft); color: var(--gray); border-color: var(--gray-border); }
.chip-error { background: var(--red-soft); color: var(--red); border-color: var(--red-border); }

.flag { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: var(--r-sm); font-size: var(--fs-11); font-weight: 650; flex: none; }
.flag-warn { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-border); }
.flag-lint { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-border); }

.verdict { font-size: var(--fs-12); font-weight: 600; color: var(--text-2); }
.verdict-apply { color: var(--green); }
.verdict-apply_if_quick { color: var(--amber); }
.verdict-skip { color: var(--text-3); }

/* ---- Toolbar, tabs, search ------------------------------------------------------------------------------------ */
.toolbar { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 2px; padding: 3px; background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--r-md); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 7px; white-space: nowrap;
  color: var(--text-2); font-weight: 550; font-size: var(--fs-13); transition: background var(--dur), color var(--dur), box-shadow var(--dur);
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.filter-tab.has-error .count { color: var(--red); }
.search { position: relative; flex: 1 1 220px; max-width: 360px; margin-left: auto; display: flex; align-items: center; }
.search > .icon { position: absolute; left: 11px; color: var(--text-3); pointer-events: none; }
.input-search { padding-left: 34px; padding-right: 40px; height: 38px; }
.search-kbd { position: absolute; right: 9px; pointer-events: none; }
.input-search:focus ~ .search-kbd { opacity: 0; }

/* ---- Job list --------------------------------------------------------------------------------------------------- */
.list-card { overflow: hidden; }
.job-list { display: flex; flex-direction: column; }
.job-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px 18px;
  border-bottom: 1px solid var(--border); position: relative; transition: background 120ms var(--ease);
}
.job-row:last-child { border-bottom: 0; }
.job-row:hover { background: var(--surface-2); }
.job-row.selected { background: var(--accent-soft); }
.job-row.selected::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.job-row:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 0; }
.job-row.selected:focus-visible { box-shadow: none; }
.job-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.job-title-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.job-title { font-weight: 600; font-size: var(--fs-15); letter-spacing: -0.012em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.job-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--text-3); font-size: var(--fs-13); }
.meta-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.meta-lab { color: var(--text-2); max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.job-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.job-time { font-size: var(--fs-12); color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- Skeletons, empty, errors ----------------------------------------------------------------------------------- */
.sk { background: linear-gradient(90deg, var(--sk-a) 0%, var(--sk-b) 50%, var(--sk-a) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: 6px; }
.skeleton-list { display: flex; flex-direction: column; }
.skeleton-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.skeleton-row:last-child { border-bottom: 0; }
.sk-badge { width: 34px; height: 34px; border-radius: 10px; }
.sk-lines { display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 12px; }
.sk-sm { height: 10px; }
.sk-chip { width: 64px; height: 20px; border-radius: var(--r-full); }
.skeleton-block { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 56px 24px; color: var(--text-3); }
.empty h3 { font: 600 var(--fs-15)/1.3 var(--font); color: var(--text); }
.empty p { max-width: 420px; font-size: var(--fs-14); }
.empty .btn { margin-top: 8px; }
.empty-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); margin-bottom: 4px; }
.empty-error .empty-icon { background: var(--red-soft); color: var(--red); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; flex: none; }
.spinner.sm { width: 12px; height: 12px; border-width: 1.5px; }

/* ---- Toasts ----------------------------------------------------------------------------------------------------- */
.toasts { position: fixed; z-index: 60; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(440px, calc(100vw - 32px));
  padding: 10px 8px 10px 14px; border-radius: var(--r-md); background: #18191d; color: #f1f1f3; box-shadow: var(--shadow-lg);
  font-size: var(--fs-14); animation: toastIn 220ms var(--ease);
}
:root[data-theme="dark"] .toast { background: #26272d; border: 1px solid #34353d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #26272d; border: 1px solid #34353d; } }
.toast.leaving { animation: toastOut 180ms var(--ease) forwards; }
.toast-icon { display: grid; place-items: center; color: #a9b0ff; }
.toast-success .toast-icon { color: #5fd49b; }
.toast-error .toast-icon { color: #ff9393; }
.toast-msg { flex: 1; }
.toast-action { border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; font-size: var(--fs-13); padding: 5px 10px; border-radius: var(--r-sm); }
.toast-action:hover { background: rgba(255, 255, 255, .18); }
.toast-close { border: 0; background: none; color: #9b9ca4; width: 26px; height: 26px; display: grid; place-items: center; border-radius: var(--r-sm); }
.toast-close:hover { color: #fff; background: rgba(255, 255, 255, .08); }

/* ---- Dialogs ---------------------------------------------------------------------------------------------------- */
.dialog {
  padding: 0; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg); width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  animation: dialogIn 200ms var(--ease);
}
.dialog-sm { width: min(420px, calc(100vw - 32px)); }
.dialog-md { width: min(600px, calc(100vw - 32px)); }
.dialog::backdrop { background: var(--overlay); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: fadeIn 200ms var(--ease); }
.dialog.closing { animation: dialogOut 140ms var(--ease) forwards; }
.dialog-inner { display: flex; flex-direction: column; max-height: inherit; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 4px 24px; }
.dialog-title { font: 650 var(--fs-17)/1.3 var(--font-display); letter-spacing: -0.015em; }
.dialog-desc { margin-top: 4px; color: var(--text-3); font-size: var(--fs-14); }
.dialog-body { padding: 16px 24px 4px; overflow-y: auto; }
.dialog-body:empty { display: none; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 24px 22px; }
.help-grid { columns: 2 220px; column-gap: 28px; padding-bottom: 18px; }
.help-grid section { break-inside: avoid; }
.help-group { font-size: var(--fs-12); font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin: 10px 0 6px; }
.help-grid dl { margin: 0; }
.help-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.help-row:last-child { border-bottom: 0; }
.help-row dt { color: var(--text-2); }
.help-row dd { margin: 0; }

/* menu */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; padding: 5px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: popIn 140ms var(--ease);
}
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: var(--r-sm); color: var(--text); font-size: var(--fs-14); text-align: left; }
.menu-item .icon { color: var(--text-3); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-3); box-shadow: none; }
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }

/* ---- Banners ---------------------------------------------------------------------------------------------------- */
.banner { display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid; margin-bottom: var(--s4); }
.banner-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.banner-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.banner-title { font: 650 var(--fs-15)/1.35 var(--font); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.banner-text { color: var(--text-2); font-size: var(--fs-14); }
.banner-actions { margin-top: 4px; }
.banner-warn { background: var(--amber-soft); border-color: var(--amber-border); }
.banner-warn .banner-icon { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.banner-warn .banner-title { color: var(--text); }
.banner-info { background: var(--violet-soft); border-color: var(--violet-border); }
.banner-info .banner-icon { background: color-mix(in srgb, var(--violet) 14%, transparent); }
.banner-danger { background: var(--red-soft); border-color: var(--red-border); }
.banner-danger .banner-icon { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.banner-tag { font-size: var(--fs-11); font-weight: 650; padding: 3px 7px; border-radius: var(--r-full); text-transform: uppercase; letter-spacing: .04em; }
.tag-danger { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-border); }
.banner-list { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.banner-list li { display: grid; grid-template-columns: 170px 1fr; gap: 4px 12px; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--amber-border); }
.hi-kind { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); font-weight: 650; color: var(--amber); text-transform: uppercase; letter-spacing: .04em; }
.hi-text { color: var(--text); font-size: var(--fs-14); overflow-wrap: anywhere; }
.hi-note { grid-column: 2; font-size: var(--fs-12); font-weight: 600; color: var(--red); }
.is-trap .hi-kind { color: var(--red); }
.codeword-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); }
.codeword { font: 650 var(--fs-17)/1 var(--mono); padding: 5px 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--amber-border); color: var(--text); letter-spacing: .02em; }
.codeword-state { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-12); font-weight: 650; padding: 3px 8px; border-radius: var(--r-full); }
.codeword-state.ok { background: var(--green-soft); color: var(--green); }
.codeword-state.bad { background: var(--red-soft); color: var(--red); }

/* ---- Job page --------------------------------------------------------------------------------------------------- */
.back-bar { display: flex; align-items: center; gap: 10px; margin: -8px 0 var(--s4); }
.back-link-inline { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-weight: 550; padding: 4px 8px 4px 2px; border-radius: var(--r-sm); }
.back-link-inline:hover { color: var(--text); }
.job-head { padding: 20px 22px; margin-bottom: var(--s4); display: flex; flex-direction: column; gap: 14px; }
.job-head-top { display: flex; gap: 12px 16px; align-items: flex-start; flex-wrap: wrap; }
.job-head-text { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.job-h1 { font: 680 var(--fs-20)/1.3 var(--font-display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.job-head-meta { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; color: var(--text-3); font-size: var(--fs-13); }
.job-head-actions { display: flex; gap: 8px; align-items: center; flex: none; margin-left: auto; }
.job-reason { color: var(--text-2); font-size: var(--fs-14); padding-left: 68px; }
.hard-skips { list-style: none; margin: 0 0 0 68px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hard-skips li { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-13); color: var(--red); background: var(--red-soft); border: 1px solid var(--red-border); padding: 3px 9px; border-radius: var(--r-full); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; margin: 0; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.fact { background: var(--surface); padding: 10px 14px; min-width: 0; }
.fact dt { font-size: var(--fs-11); font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.fact dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.client-line, .sent-line { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--fs-13); flex-wrap: wrap; }
.sent-line { color: var(--blue); font-weight: 550; }
.client-line, .sent-line { flex-wrap: nowrap; align-items: flex-start; }
.client-line .icon, .sent-line .icon { margin-top: 2px; }

.job-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); grid-template-areas: "docs proposal"; gap: var(--s4); align-items: start; }
.job-proposal { grid-area: proposal; position: sticky; top: var(--s6); display: flex; flex-direction: column; gap: var(--s4); }
.job-docs { grid-area: docs; min-width: 0; }

/* proposal editor */
.proposal-card { overflow: hidden; }
.save-state { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-12); color: var(--text-3); }
.save-state.saved { color: var(--green); }
.save-state.failed { color: var(--red); }
.editor { position: relative; background: var(--surface); }
.editor-mirror, .editor-input {
  font: 400 var(--fs-15)/1.65 var(--font); letter-spacing: -0.003em; padding: 16px 18px; margin: 0; border: 0;
  white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; tab-size: 4;
}
.editor-mirror { position: absolute; inset: 0; color: transparent; overflow: hidden; pointer-events: none; }
.editor-mirror mark { color: transparent; border-radius: 3px; }
.editor-mirror .hl-error { background: color-mix(in srgb, var(--red) 20%, transparent); box-shadow: 0 2px 0 -0.5px var(--red); }
.editor-mirror .hl-warn { background: color-mix(in srgb, var(--amber) 22%, transparent); }
.editor-input { position: relative; display: block; width: 100%; min-height: 260px; resize: none; background: transparent; color: var(--text); overflow: hidden; caret-color: var(--accent); }
.editor-input:focus-visible { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 0; }
.editor-input[readonly] { color: var(--text-2); }
.editor-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 18px; color: var(--text-3); text-align: center; }
.editor-empty-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.editor-foot { display: flex; align-items: center; gap: 10px; padding: 10px 18px 0; border-top: 1px solid var(--border); }
.wc { font-size: var(--fs-13); color: var(--text-3); font-variant-numeric: tabular-nums; }
.wc strong { font-size: var(--fs-15); font-weight: 680; }
.wc.ok strong { color: var(--green); }
.wc.bad strong { color: var(--red); }
.lint { padding: 8px 18px 4px; display: flex; flex-direction: column; gap: 10px; }
.wc-meter { position: relative; height: 4px; border-radius: var(--r-full); background: var(--surface-3); overflow: visible; }
.wc-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-full); transition: width 200ms var(--ease), background 200ms; }
.wc-fill.ok { background: var(--green); }
.wc-fill.bad { background: var(--red); }
.wc-min { position: absolute; top: -3px; width: 2px; height: 10px; border-radius: 1px; background: var(--text-3); opacity: .55; }
.lint-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lint-list li { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 4px 8px; font-size: var(--fs-13); }
.lint-list .icon { align-self: center; }
.lint-error { color: var(--red); }
.lint-warn { color: var(--amber); }
.lint-title { font-weight: 650; }
.lint-detail { color: var(--text-3); }
.lint-ok { display: flex; align-items: center; gap: 8px; font-size: var(--fs-13); color: var(--green); font-weight: 550; }
.proposal-actions { padding: 14px 18px 18px; }
.btn-copy { width: 100%; --btn-h: 48px; font-size: var(--fs-15); }
.server-lint { margin: 0 18px 16px; font-size: var(--fs-13); color: var(--text-3); }
.server-lint summary { cursor: pointer; font-weight: 550; }
.server-lint ul { margin: 6px 0 0; padding-left: 18px; }
.notes-card .textarea { border: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: none; min-height: 88px; padding: 14px 18px; background: transparent; }
.notes-card .textarea:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }

/* doc tabs */
.docs-card { overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 10px; border: 0; background: none;
  color: var(--text-3); font-weight: 550; white-space: nowrap; transition: color var(--dur);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tab:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.tab-panel { padding: 22px 26px 28px; min-height: 240px; }
.tab-panel:focus-visible { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.tab-panel .empty { padding: 40px 16px; }

/* markdown */
.md { font-size: var(--fs-15); line-height: 1.7; color: var(--text); overflow-wrap: anywhere; max-width: 72ch; }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 12px; }
.md h2, .md h3, .md h4, .md h5, .md h6 { font-family: var(--font-display); letter-spacing: -0.015em; line-height: 1.35; margin: 24px 0 8px; }
.md h2 { font-size: var(--fs-17); font-weight: 650; }
.md h3 { font-size: var(--fs-15); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-size: var(--fs-12); margin-top: 22px; }
.md h4, .md h5, .md h6 { font-size: var(--fs-14); font-weight: 650; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 22px; }
.md li { margin: 3px 0; padding-left: 2px; }
.md li::marker { color: var(--text-3); }
.md strong { font-weight: 650; }
.md a { color: var(--accent-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-text) 35%, transparent); text-underline-offset: 3px; }
.md a:hover { text-decoration-color: currentColor; }
.md code { font-size: .86em; padding: 2px 5px; border-radius: 5px; background: var(--surface-3); border: 1px solid var(--border); }
.md pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; overflow-x: auto; font-size: var(--fs-13); line-height: 1.6; margin: 0 0 14px; }
.md pre code { background: none; border: 0; padding: 0; }
.md blockquote { margin: 0 0 14px; padding: 2px 0 2px 14px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.md-table { overflow-x: auto; margin: 0 0 14px; }
.md-table table { border-collapse: collapse; width: 100%; font-size: var(--fs-13); }
.md-table th, .md-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.md-table th { font-weight: 600; color: var(--text-3); font-size: var(--fs-12); }

.post { display: flex; flex-direction: column; gap: 14px; }
.untrusted-note { display: flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--text-3); }
.skills { display: flex; flex-wrap: wrap; gap: 6px; }
.skill { font-size: var(--fs-12); font-weight: 550; padding: 3px 9px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-2); }
.post-link a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-size: var(--fs-13); font-weight: 550; overflow-wrap: anywhere; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 1px; background: var(--border-strong); }
.tl { display: flex; gap: 14px; padding: 8px 0; position: relative; }
.tl-dot { flex: none; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-3); z-index: 1; }
.tl-sent .tl-dot { color: var(--blue); border-color: var(--blue-border); background: var(--blue-soft); }
.tl-replied .tl-dot { color: var(--green); border-color: var(--green-border); background: var(--green-soft); }
.tl-error .tl-dot, .tl-lint .tl-dot { color: var(--red); border-color: var(--red-border); background: var(--red-soft); }
.tl-drafted .tl-dot, .tl-screened .tl-dot { color: var(--accent-text); border-color: var(--accent-border); background: var(--accent-soft); }
.tl-body { display: flex; flex-direction: column; gap: 1px; padding-top: 3px; min-width: 0; }
.tl-text { color: var(--text); overflow-wrap: anywhere; }
.tl-body time { font-size: var(--fs-12); color: var(--text-3); }

.mobile-actions { display: none; }

/* ---- Clients ---------------------------------------------------------------------------------------------------- */
.client-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--s4); }
.client-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; transition: border-color var(--dur), box-shadow var(--dur); }
.client-card.is-fresh { border-color: var(--green-border); box-shadow: var(--shadow-sm), 0 0 0 3px var(--green-soft); }
.client-card.selected { border-color: var(--accent); }
.client-top { display: flex; align-items: center; gap: 12px; }
.client-who { flex: 1; min-width: 0; }
.client-name { font: 650 var(--fs-15)/1.3 var(--font); display: flex; align-items: center; gap: 8px; }
.new-dot { font-size: var(--fs-11); font-weight: 650; color: var(--green); background: var(--green-soft); border: 1px solid var(--green-border); padding: 2px 7px; border-radius: var(--r-full); text-transform: uppercase; letter-spacing: .04em; }
.client-sub { font-size: var(--fs-13); color: var(--text-3); }
.client-job { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-weight: 550; transition: background var(--dur), border-color var(--dur); }
.client-job:hover { background: var(--surface-3); }
.client-job .icon { color: var(--text-3); margin-left: auto; }
.client-job-title { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.client-foot { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; color: var(--text-3); font-size: var(--fs-13); }

/* ---- Activity --------------------------------------------------------------------------------------------------- */
.hero-slot:empty { display: none; }
.code-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; margin-bottom: var(--s5);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); border-color: var(--accent-border);
}
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); font-weight: 650; color: var(--accent-text); text-transform: uppercase; letter-spacing: .06em; }
.code-big { font: 600 40px/1.1 var(--mono); letter-spacing: .06em; margin: 8px 0 6px; font-variant-numeric: tabular-nums; color: var(--text); user-select: all; -webkit-user-select: all; }
.code-hint { font-size: var(--fs-13); color: var(--text-3); max-width: 520px; }
.code-hero-actions .btn { --btn-h: 44px; }
.filter-chips { margin-bottom: var(--s5); }
.feed { display: flex; flex-direction: column; gap: var(--s5); }
.feed-day-label { font-size: var(--fs-12); font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px 4px; }
.feed-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.ev { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); align-items: start; }
.ev:last-child { border-bottom: 0; }
.ev-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.tone-neutral { background: var(--gray-soft); color: var(--text-2); }
.tone-good { background: var(--green-soft); color: var(--green); }
.tone-accent { background: var(--accent-soft); color: var(--accent-text); }
.tone-warn { background: var(--amber-soft); color: var(--amber); }
.ev-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ev-subject { font-weight: 550; color: var(--text); overflow-wrap: anywhere; }
.ev-preview { color: var(--text-2); font-size: var(--fs-13); }
.ev-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: var(--fs-12); color: var(--text-3); margin-top: 2px; }
.ev-kind { background: none !important; font-weight: 650; }
.ev-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: var(--fs-12); color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-job { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-text); font-weight: 550; font-size: var(--fs-13); }
.ev-job:hover { text-decoration: underline; text-underline-offset: 3px; }
.inline-code { display: inline-flex; align-items: center; gap: 6px; font: 600 var(--fs-13)/1 var(--mono); padding: 4px 8px; border-radius: var(--r-sm); border: 1px solid var(--amber-border); background: var(--amber-soft); color: var(--text); }
.inline-code .icon { color: var(--amber); }

/* ---- Stats ------------------------------------------------------------------------------------------------------ */
.stats { display: flex; flex-direction: column; gap: var(--s4); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.tile { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.tile-label { display: flex; align-items: center; gap: 7px; font-size: var(--fs-13); color: var(--text-3); font-weight: 550; }
.tile-value { font: 680 var(--fs-30)/1.1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: var(--fs-13); color: var(--text-3); }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.chart-card { overflow: hidden; }
.chart { position: relative; padding: 14px 16px 10px 6px; }
.chart-svg { width: 100%; min-height: 168px; }
.chart-el { overflow: visible; }
.chart-el .grid { stroke: var(--border); stroke-dasharray: 2 3; }
.chart-el .axis { stroke: var(--border-strong); }
.chart-el .tick { fill: var(--text-3); font: 500 11px var(--font); font-variant-numeric: tabular-nums; }
.chart-el .bar { fill: var(--accent); opacity: .9; transition: opacity 120ms; }
.chart-el .bar-zero { fill: var(--border-strong); }
.chart-el .bar.on { opacity: 1; fill: var(--accent-hover); }
.chart-el .hit { fill: transparent; cursor: default; outline: none; }
.chart-el .hit:focus-visible { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.chart-tip {
  position: absolute; transform: translate(-50%, -100%); pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 10px; border-radius: var(--r); background: var(--text); color: var(--bg); font-size: var(--fs-12); box-shadow: var(--shadow-md); white-space: nowrap; margin-top: 4px;
}
.chart-tip strong { font-size: var(--fs-14); font-variant-numeric: tabular-nums; }
.tip-date { opacity: .75; }
.funnel-card { padding-bottom: 18px; }
.funnel { list-style: none; margin: 0; padding: 16px 18px 6px; display: flex; flex-direction: column; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 90px 1fr 60px; align-items: center; gap: 12px; }
.funnel-label { font-size: var(--fs-13); color: var(--text-2); font-weight: 550; }
.funnel-track { height: 10px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.funnel-bar { display: block; height: 100%; border-radius: var(--r-full); background: var(--accent); }
.funnel-val { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.status-counts { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 18px 0; }
.data-table { padding: 0; overflow: hidden; }
.data-table summary { padding: 14px 18px; cursor: pointer; font-weight: 550; color: var(--text-2); }
.data-table .md-table { margin: 0; padding: 0 18px 14px; max-height: 360px; overflow-y: auto; }
.data-table td, .data-table th { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td:first-child, .data-table th:first-child { text-align: left; }

/* ---- Settings --------------------------------------------------------------------------------------------------- */
.settings { display: flex; flex-direction: column; gap: var(--s4); max-width: 820px; padding-bottom: 80px; }
.set-section { overflow: hidden; }
.set-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 22px; border-bottom: 1px solid var(--border); transition: opacity var(--dur); }
.set-row:last-child { border-bottom: 0; }
.set-row.is-disabled { opacity: .5; }
.set-text { min-width: 0; flex: 1; }
.set-title { font-weight: 550; }
.set-desc { font-size: var(--fs-13); color: var(--text-3); margin-top: 2px; overflow-wrap: anywhere; }
.set-control { flex: none; display: flex; align-items: center; justify-content: flex-end; }
.time-range { display: flex; align-items: center; gap: 8px; }
.set-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.set-steps { margin: 8px 0 0; padding-left: 20px; font-size: var(--fs-13); color: var(--text-2); display: grid; gap: 4px; }
.save-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
  width: min(560px, calc(100vw - 32px)); animation: barIn 220ms var(--ease);
}
@media (min-width: 900px) { .save-bar { left: calc(50% + var(--sidebar-w) / 2); } }
.save-bar-text { display: inline-flex; align-items: center; gap: 8px; font-weight: 550; color: var(--text-2); }

/* ---- Login ------------------------------------------------------------------------------------------------------ */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); position: relative; overflow: hidden; }
.login-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 380px at 50% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(circle at 50% 50%, transparent 0 140px, color-mix(in srgb, var(--border) 70%, transparent) 141px 142px, transparent 143px 260px, color-mix(in srgb, var(--border) 50%, transparent) 261px 262px, transparent 263px);
  opacity: .9;
}
.login-col { position: relative; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.login-card { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 32px 28px 28px; animation: rise 300ms var(--ease); }
.login-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 24px; }
.login-title { font: 680 var(--fs-20)/1.25 var(--font-display); letter-spacing: -0.02em; margin-top: 6px; }
.login-sub { color: var(--text-3); font-size: var(--fs-14); }
.login-foot { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--text-3); }
.back-link { margin: 2px auto 0; color: var(--text-3); }
.mock-hint { font-size: var(--fs-12); line-height: 1.6; color: var(--text-2); background: var(--amber-soft); border: 1px solid var(--amber-border); border-radius: var(--r); padding: 10px 12px; }
.mock-hint code { font-size: 11.5px; padding: 1px 4px; border-radius: 4px; background: var(--surface); }
.secret-box { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.secret { font: 600 15px/1.5 var(--mono); letter-spacing: .04em; word-break: normal; overflow-wrap: break-word; user-select: all; -webkit-user-select: all; }
.secret-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Animations ------------------------------------------------------------------------------------------------- */
.view { animation: viewIn 220ms var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(4px) scale(.98); } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes dialogOut { to { opacity: 0; transform: translateY(4px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes barIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .spinner, .btn.loading::after, .spinning .icon { animation: spin 1.6s linear infinite !important; }
  .sk { animation: none !important; }
}

/* ---- Responsive ------------------------------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .job-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); }
  .main { padding: var(--s6) var(--s6) var(--s12); }
}
@media (max-width: 1040px) {
  .job-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "proposal" "docs"; }
  .job-proposal { position: static; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 20;
    padding: calc(env(safe-area-inset-top) + 8px) 12px 8px 14px; min-height: 52px;
    background: var(--glass); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
  }
  .topbar-title { font: 650 var(--fs-17)/1.2 var(--font-display); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .topbar-back { margin-left: -6px; }
  .topbar-back:not([hidden]) + .topbar-brand { display: none; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; justify-content: space-around;
    padding: 6px 4px calc(env(safe-area-inset-bottom) + 6px); background: var(--glass);
    backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-top: 1px solid var(--border);
  }
  .tab-item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; color: var(--text-3); font-size: 10.5px; font-weight: 550; border-radius: var(--r); min-height: 46px; justify-content: center; }
  .tab-item .nav-icon { color: inherit; }
  .tab-item.active { color: var(--accent-text); }
  .tab-item .nav-badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; box-shadow: 0 0 0 2px var(--bg); }
  .tab-item[data-nav="inbox"] .nav-badge { background: var(--accent); color: var(--on-accent); }
  .tab-item[data-nav="clients"] .nav-badge { background: var(--green); color: #fff; }
  .main { padding: var(--s4) var(--s4) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px); }
  .page-head { margin-bottom: var(--s4); align-items: center; }
  .page-title { font-size: var(--fs-20); }
  .view-job .back-bar, .hide-mobile { display: none !important; }
  .hide-sm { display: none; }
  .toasts { left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); align-items: stretch; }
  .toast { max-width: none; }
  body:has(.view-job) .tabbar { display: none; }
  body:has(.view-job) .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }
  body:has(.view-job) .main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .mobile-actions {
    display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px 12px calc(env(safe-area-inset-bottom) + 10px);
    background: var(--glass); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-top: 1px solid var(--border);
  }
  .mobile-actions .btn { --btn-h: 44px; }
  .mobile-actions .menu-wrap .btn { width: 44px; background: var(--surface); border-color: var(--border-strong); color: var(--text); }
  .mobile-actions .menu { top: auto; bottom: calc(100% + 8px); }
  .save-bar { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); }

  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .search { max-width: none; margin-left: 0; flex: none; order: -1; }
  .filter-tabs { margin: 0 -16px; padding: 3px 16px; border-radius: 0; border-left: 0; border-right: 0; background: transparent; border: 0; gap: 6px; }
  .filter-tab { border: 1px solid var(--border); background: var(--surface); height: 32px; border-radius: var(--r-full); }
  .filter-tab.active { background: var(--text); color: var(--bg); border-color: var(--text); box-shadow: none; }
  .filter-tab.active .count { color: var(--bg); opacity: .7; }

  .list-card { border-radius: var(--r-lg); }
  .job-row { grid-template-columns: auto minmax(0, 1fr); padding: 14px; gap: 12px; align-items: start; }
  .job-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; margin-top: -2px; }
  .job-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: var(--fs-15); line-height: 1.35; }
  .job-title-line { align-items: flex-start; }
  .meta-lab, .meta-cc { display: none; }
  .page-head-text { min-width: 0; }

  .job-head { padding: 16px; }
  .job-head-top { gap: 12px; flex-wrap: nowrap; }
  .job-head-text { flex: 1 1 0; }
  .score-lg { width: 44px; height: 44px; font-size: var(--fs-20); border-radius: 12px; }
  .job-h1 { font-size: var(--fs-17); }
  .job-reason { padding-left: 0; }
  .hard-skips { margin-left: 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .banner { padding: 14px; gap: 12px; }
  .banner-icon { width: 32px; height: 32px; }
  .banner-list li { grid-template-columns: 1fr; }
  .hi-note { grid-column: 1; }
  .tab-panel { padding: 18px 16px 22px; }
  .md { font-size: var(--fs-15); }
  .proposal-actions { display: none; }

  .client-list { grid-template-columns: minmax(0, 1fr); }
  .code-hero { flex-direction: column; align-items: stretch; padding: 18px; }
  .code-big { font-size: 32px; }
  .code-hero-actions .btn { width: 100%; }
  .filter-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px var(--s4); padding: 0 16px; scrollbar-width: none; }
  .filter-chips::-webkit-scrollbar { display: none; }
  .choice { flex: none; }
  .ev { padding: 12px 14px; gap: 12px; }
  .tiles { gap: 10px; }
  .tile { padding: 14px; }
  .tile-value { font-size: var(--fs-24); }
  .set-row { flex-wrap: wrap; gap: 10px 16px; padding: 14px 16px; }
  .set-head { padding: 16px; }
  .set-row .set-control { margin-left: auto; }
  .range-wrap { max-width: none; }
  .field-row { grid-template-columns: 1fr; }
  .dialog { width: calc(100vw - 24px); }
  .page-actions .seg-btn { padding: 0 10px; }
}

@media (max-width: 420px) {
  .tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tile-value { font-size: var(--fs-20); }
  .tile-sub { font-size: var(--fs-12); }
  .login-card { padding: 26px 20px 22px; }
  .funnel-row { grid-template-columns: 70px 1fr 44px; }
  .set-row:has(.range-wrap) .set-control, .set-row:has(.time-range) .set-control { width: 100%; }
}

@media (forced-colors: active) {
  .chart-el .bar { fill: CanvasText; }
  .score, .chip, .btn { border: 1px solid CanvasText; }
}
