@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

/* ── Design tokens (job 593) ─────────────────────────────────────────────────────────────────────────────────────
   Setl OS palette (setlos-site/brand/BRAND-GUIDE.md): Harbour #173b63, Night #0d1b2a, Wattle #e3a72f, Gum #2e7d5b, Sand #f6f3ec.
   The four brand inputs (--ink, --navy = primary, --orange = accent, --stone = background) are each company's own colours,
   set from Settings → Branding by applyBrand() in app.js (and by the customer pages). Everything else is worked out from
   them here, for light and dark. Rules below use the semantic tokens, never raw colours. */
:root {
  --ink: #0d1b2a; --navy: #173b63; --navy-2: #21507f; --orange: #e3a72f; --orange-dark: #c98a12; --stone: #f6f3ec;
  --on-navy: #fff; --on-orange: #0d1b2a;
  color-scheme: light;
  --bg: var(--stone);
  --bg-art: radial-gradient(900px 520px at 8% -8%, color-mix(in srgb, var(--orange) 16%, transparent), transparent 70%),
            radial-gradient(800px 600px at 105% 0%, color-mix(in srgb, var(--navy) 12%, transparent), transparent 70%);
  --text: var(--ink); --text-2: #5f656e; --graphite: var(--text-2); --steel: #8d97a3;
  --card: #fff; --glass: rgba(255, 255, 255, .74); --glass-strong: rgba(255, 255, 255, .9); --glass-edge: rgba(255, 255, 255, .9);
  --well: color-mix(in srgb, var(--ink) 5%, var(--card)); --hover: color-mix(in srgb, var(--ink) 6%, transparent);
  --line: color-mix(in srgb, var(--ink) 11%, transparent); --line-strong: color-mix(in srgb, var(--ink) 20%, transparent); --white: var(--card);
  --primary: var(--navy); --on-primary: var(--on-navy); --primary-hi: var(--navy-2);
  --accent: var(--orange); --on-accent: var(--on-orange); --accent-hi: var(--orange-dark);
  --accent-soft: color-mix(in srgb, var(--orange) 16%, var(--card));
  --link: var(--navy); --focus: var(--navy);
  --inverse: var(--ink); --on-inverse: #fff; --on-inverse-2: #c3ccd5;
  --green: #2e7d5b; --green-bg: #e5f1eb; --red: #b42318; --red-bg: #fdecea; --amber: #94560a; --amber-bg: #fdf3e1; --blue-bg: color-mix(in srgb, var(--navy) 9%, var(--card));
  --warn-text: #6b3e04;
  --chart-1: var(--navy); --chart-2: var(--orange); --chart-3: #8d97a3; --chart-grid: color-mix(in srgb, var(--ink) 8%, transparent);
  --radius: 16px; --radius-lg: 20px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .05), 0 8px 24px rgba(13, 27, 42, .06);
  --shadow-pop: 0 18px 50px rgba(13, 27, 42, .18);
  --blur: blur(18px) saturate(1.3);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: 'Manrope', system-ui, sans-serif; --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
/* Dark (the app only: html.app). Follows the device unless the person picks light or dark in the top bar. */
:root.app[data-theme="dark"] {
  color-scheme: dark;
  --bg: color-mix(in srgb, var(--ink) 70%, #07090c);
  --bg-art: radial-gradient(1000px 640px at 12% -10%, color-mix(in srgb, var(--orange) 15%, transparent), transparent 70%),
            radial-gradient(900px 700px at 100% 10%, color-mix(in srgb, var(--navy) 30%, transparent), transparent 70%),
            radial-gradient(700px 500px at 50% 110%, color-mix(in srgb, var(--orange) 7%, transparent), transparent 70%);
  --text: #f1eee8; --text-2: #a9b0b8; --steel: #7d8792;
  --card: color-mix(in srgb, var(--ink) 55%, #1b1f24); --glass: rgba(255, 255, 255, .055); --glass-strong: color-mix(in srgb, var(--ink) 40%, #20252b); --glass-edge: rgba(255, 255, 255, .09);
  --well: rgba(255, 255, 255, .05); --hover: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .18);
  --primary: var(--orange); --on-primary: var(--on-orange); --primary-hi: color-mix(in srgb, var(--orange) 85%, #fff);
  --accent-soft: color-mix(in srgb, var(--orange) 18%, transparent);
  --link: color-mix(in srgb, var(--orange) 70%, #fff); --focus: var(--orange);
  --inverse: color-mix(in srgb, var(--orange) 14%, #1d2228); --on-inverse: #fff; --on-inverse-2: #c9ced4;
  --green: #6fcf9f; --green-bg: rgba(46, 125, 91, .22); --red: #ff8f80; --red-bg: rgba(180, 35, 24, .24); --amber: #f2bd63; --amber-bg: rgba(227, 167, 47, .16); --blue-bg: rgba(130, 170, 220, .13);
  --warn-text: #f2bd63;
  --chart-1: var(--orange); --chart-2: #8fb3dc; --chart-3: #7d8792; --chart-grid: rgba(255, 255, 255, .07);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px rgba(0, 0, 0, .28);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
  :root.app:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: color-mix(in srgb, var(--ink) 70%, #07090c);
    --bg-art: radial-gradient(1000px 640px at 12% -10%, color-mix(in srgb, var(--orange) 15%, transparent), transparent 70%),
              radial-gradient(900px 700px at 100% 10%, color-mix(in srgb, var(--navy) 30%, transparent), transparent 70%),
              radial-gradient(700px 500px at 50% 110%, color-mix(in srgb, var(--orange) 7%, transparent), transparent 70%);
    --text: #f1eee8; --text-2: #a9b0b8; --steel: #7d8792;
    --card: color-mix(in srgb, var(--ink) 55%, #1b1f24); --glass: rgba(255, 255, 255, .055); --glass-strong: color-mix(in srgb, var(--ink) 40%, #20252b); --glass-edge: rgba(255, 255, 255, .09);
    --well: rgba(255, 255, 255, .05); --hover: rgba(255, 255, 255, .07);
    --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .18);
    --primary: var(--orange); --on-primary: var(--on-orange); --primary-hi: color-mix(in srgb, var(--orange) 85%, #fff);
    --accent-soft: color-mix(in srgb, var(--orange) 18%, transparent);
    --link: color-mix(in srgb, var(--orange) 70%, #fff); --focus: var(--orange);
    --inverse: color-mix(in srgb, var(--orange) 14%, #1d2228); --on-inverse: #fff; --on-inverse-2: #c9ced4;
    --green: #6fcf9f; --green-bg: rgba(46, 125, 91, .22); --red: #ff8f80; --red-bg: rgba(180, 35, 24, .24); --amber: #f2bd63; --amber-bg: rgba(227, 167, 47, .16); --blue-bg: rgba(130, 170, 220, .13);
    --warn-text: #f2bd63;
    --chart-1: var(--orange); --chart-2: #8fb3dc; --chart-3: #7d8792; --chart-grid: rgba(255, 255, 255, .07);
    --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px rgba(0, 0, 0, .28);
    --shadow-pop: 0 24px 60px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 var(--body); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
html.app body { background: var(--bg-art), var(--bg); background-attachment: fixed; min-height: 100vh; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; margin: 0; line-height: 1.2; font-style: normal; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .kpi .n, .split b, .qbig b { font-variant-numeric: tabular-nums; }

/* ── Shell: icon rail + top bar + page (job 593) ───────────────────────────────────────────────────────────────── */
.glass { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); }
.shell { display: grid; grid-template-columns: auto minmax(0, 1fr); min-height: 100vh; gap: 0; }
.side { position: sticky; top: 12px; margin: 12px 0 12px 12px; height: calc(100vh - 24px); width: 68px; border-radius: var(--radius-lg); padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; z-index: 30; transition: width .3s var(--ease); }
.shell.rail-open .side { width: 232px; }
.side .logo { display: flex; align-items: center; gap: 10px; padding: 2px 2px 10px; min-height: 48px; text-decoration: none; color: var(--text); overflow: hidden; }
.side .logo .mark { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 800 15px/1 var(--display); overflow: hidden; }
.side .logo .mark img { width: 100%; height: 100%; object-fit: cover; }
.side .logo .name { min-width: 0; line-height: 1.2; }
.side .logo .name b { display: block; font: 700 15px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .logo .name small { display: block; color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-toggle { align-self: flex-start; width: 44px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text-2); cursor: pointer; display: grid; place-items: center; margin: 0 2px 8px; }
.rail-toggle:hover { color: var(--text); background: var(--hover); }
.rail-toggle svg { width: 18px; height: 18px; }
.rail { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rail .rg { position: relative; }
.nav { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: var(--text-2); padding: 0 12px; min-height: 44px; border-radius: 12px; cursor: pointer; font-weight: 600; text-decoration: none; font-size: 14.5px; position: relative; white-space: nowrap; transition: background .2s var(--ease), color .2s var(--ease); }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav:hover { background: var(--hover); color: var(--text); }
.side .rail > .rg > .nav[aria-current="page"], .side .rail > .rg.on > .nav { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.nav .count { margin-left: auto; background: var(--accent); color: var(--on-accent); font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 0 7px; line-height: 18px; min-width: 18px; text-align: center; }
.side .rail > .rg.on > .nav .count, .side .rail > .rg > .nav[aria-current="page"] .count { background: var(--on-accent); color: var(--accent); }
.nav .chev { width: 14px; height: 14px; margin-left: auto; opacity: .55; }
.nav .count + .chev { margin-left: 4px; }
/* Collapsed rail: icons only. Labels stay in the page for screen readers; the fly-out shows them on hover/focus. */
.shell:not(.rail-open) .side .rail > .rg > .nav > .lbl, .shell:not(.rail-open) .side .logo .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shell:not(.rail-open) .side .rail > .rg > .nav { padding: 0; justify-content: center; width: 48px; }
.shell:not(.rail-open) .side .rail > .rg > .nav .chev { position: absolute; right: -2px; top: 50%; margin: -7px 0 0; width: 10px; height: 10px; }
.shell:not(.rail-open) .side .rail > .rg > .nav .count { position: absolute; top: 3px; right: 2px; margin: 0; font-size: 10px; line-height: 15px; min-width: 15px; padding: 0 4px; box-shadow: 0 0 0 2px var(--glass-strong); }
.flyout { position: absolute; left: calc(100% + 14px); top: -6px; min-width: 200px; padding: 8px; border-radius: 14px; background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-pop); opacity: 0; visibility: hidden; transform: translateX(-6px); transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s .18s; z-index: 40; }
.flyout::before { content: ''; position: absolute; left: -16px; top: 0; bottom: 0; width: 16px; }  /* hover bridge */
.flyout .fh { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); padding: 4px 10px 6px; }
.flyout .nav { min-height: 38px; font-size: 14px; padding: 0 10px; color: var(--text); }
.flyout .nav[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
.flyout .nav[aria-current="page"]::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
.rg:hover > .flyout, .rg:focus-within > .flyout, .rg.open > .flyout { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.shell.rail-open .rg.single > .flyout { display: none; }
.rg.single:not(:hover):not(:focus-within) > .flyout { display: none; }
.rg.single > .flyout { min-width: 0; padding: 6px 12px; pointer-events: none; }
.rg.single > .flyout .fh { padding: 2px 0; color: var(--text); letter-spacing: 0; text-transform: none; font-size: 13px; }
.side .rail-sep { height: 1px; background: var(--line); margin: 6px 8px; }
.side .who { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px 2px 2px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); position: relative; }
.side .who .av { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--text); font: 700 14px/1 var(--display); border: 1px solid var(--line); cursor: pointer; }
.side .who .wtxt { min-width: 0; }
.side .who .wtxt b { color: var(--text); display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .who button.linkish { background: none; border: 0; color: var(--text-2); padding: 2px 0 0; cursor: pointer; text-decoration: underline; font-size: 13px; }
.shell:not(.rail-open) .side .who .wtxt { position: absolute; left: calc(100% + 14px); bottom: 0; min-width: 210px; padding: 12px 14px; border-radius: 14px; background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-pop); opacity: 0; visibility: hidden; transition: opacity .18s var(--ease), visibility 0s .18s; z-index: 40; }
.shell:not(.rail-open) .side .who:hover .wtxt, .shell:not(.rail-open) .side .who:focus-within .wtxt { opacity: 1; visibility: visible; transition-delay: 0s; }
.shell:not(.rail-open) .side .who .wtxt::before { content: ''; position: absolute; left: -16px; top: 0; bottom: 0; width: 16px; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.appbar { position: sticky; top: 12px; z-index: 25; margin: 12px 12px 0 16px; border-radius: var(--radius-lg); min-height: 60px; padding: 8px 10px 8px 18px; display: flex; align-items: center; gap: 10px; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--text-2); margin-right: auto; white-space: nowrap; }
.crumbs a { color: var(--text-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.crumbs a:hover { color: var(--text); }
.crumbs b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumbs svg { width: 14px; height: 14px; flex: none; opacity: .6; }
.kbtn { display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 8px 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--well); color: var(--text-2); cursor: pointer; width: min(340px, 30vw); font-size: 14px; }
.kbtn:hover { border-color: var(--line-strong); color: var(--text); }
.kbtn svg { width: 17px; height: 17px; flex: none; }
.kbtn span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbd { font: 600 11px/1 var(--body); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); }
.ibtn { position: relative; width: 42px; height: 42px; flex: none; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.ibtn:hover { background: var(--hover); color: var(--text); }
.ibtn svg { width: 19px; height: 19px; }
.ibtn .dot { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 700 10.5px/17px var(--body); text-align: center; box-shadow: 0 0 0 2px var(--glass-strong); }
.pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 8px; border-radius: 14px; background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-pop); z-index: 50; }
.pop[hidden] { display: none; }
.pop .nav { min-height: 42px; color: var(--text); font-size: 14px; }
.pop .nav small { display: block; color: var(--text-2); font-weight: 500; font-size: 12px; }
.pop.alerts { width: min(380px, calc(100vw - 24px)); }
.pop .ph { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 8px 8px; }
.pop .ph b { font-family: var(--display); }
.anchor { position: relative; }
main.page { padding: 26px 28px 80px 32px; max-width: 1560px; width: 100%; min-width: 0; margin-inline: auto; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head p { margin: 4px 0 0; }
.head .dateline { font-size: 13px; color: var(--text-2); margin: 0 0 6px; }
.head .summary { color: var(--text-2); margin: 6px 0 0; font-size: 14.5px; max-width: 760px; }
.tabbar { display: none; }

/* ── Cards, grids ─────────────────────────────────────────────────────────────────────── */
.card { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-edge); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: inherit; display: block; min-width: 0; }
.kpi .n { font: 700 28px/1.1 var(--display); margin-top: 6px; overflow-wrap: anywhere; letter-spacing: -.02em; }
.kpi .l { font-size: 13px; color: var(--text-2); font-weight: 600; }
.kpi.hot { background: var(--inverse); color: var(--on-inverse); border-color: transparent; }
.kpi.hot .l { color: var(--on-inverse-2); }
.kpi.money .n { color: var(--green); }

/* ── Buttons, inputs ──────────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); color: var(--text); transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--line-strong); background: var(--hover); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hi); border-color: var(--primary-hi); }
.btn.go { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.go:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.danger { color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.big { min-height: 52px; font-size: 16px; padding: 12px 22px; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
label.f { display: block; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
label.f span.hint { display: block; font-weight: 400; color: var(--graphite); font-size: 13px; margin-top: 2px; }
.in, select.in, textarea.in { display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); color: var(--text); }
textarea.in { min-height: 110px; resize: vertical; line-height: 1.5; }
.in:focus { border-color: var(--focus); outline: 4px solid color-mix(in srgb, var(--focus) 18%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 10px 0; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--primary); }
.search { position: relative; flex: 1; max-width: 420px; }
.search input { padding-left: 40px; margin: 0; }
.search svg { position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; color: var(--graphite); }

/* ── Chips, pills, badges ─────────────────────────────────────────────────────────────── */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.chip { border: 1px solid var(--line); background: var(--glass); color: var(--text); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; cursor: pointer; min-height: 38px; }
.chip b { font-weight: 700; color: var(--graphite); margin-left: 4px; }
.chip[aria-pressed="true"] { background: var(--inverse); color: var(--on-inverse); border-color: transparent; }
.chip[aria-pressed="true"] b { color: var(--on-inverse-2); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--blue-bg); color: var(--link); white-space: nowrap; }
.pill.new { background: var(--well); color: var(--graphite); }
.pill.opened, .pill.replied, .pill.to_call { background: var(--amber-bg); color: var(--amber); }
.pill.quote, .pill.application, .pill.approved { background: var(--blue-bg); color: var(--link); }
.pill.settled { background: var(--green-bg); color: var(--green); }
.pill.lost { background: var(--well); color: var(--graphite); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--well); color: var(--graphite); }
.badge.ok { background: var(--green-bg); color: var(--green); }
.badge.warn { background: var(--amber-bg); color: var(--amber); }
.badge.bad { background: var(--red-bg); color: var(--red); }

/* ── Lists ───────────────────────────────────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-top: 1px solid var(--line); min-width: 0; }
.item:first-child { border-top: 0; }
.item .main { flex: 1; min-width: 0; cursor: pointer; }
.item .title { font-weight: 700; overflow-wrap: anywhere; }
.item .sub { font-size: 13px; color: var(--graphite); overflow-wrap: anywhere; }
.item .act { display: flex; gap: 8px; flex: none; }
.empty { text-align: center; padding: 26px 12px; color: var(--graphite); }
.empty b { display: block; color: var(--text); font-family: var(--display); font-size: 16px; margin-bottom: 4px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--graphite); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--hover); }
table.t td.num, table.t th.num { text-align: right; white-space: nowrap; }
.tablewrap { overflow-x: auto; }

/* ── Board ───────────────────────────────────────────────────────────────────────────── */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.col { flex: 0 0 236px; background: var(--well); border-radius: var(--radius); padding: 10px; min-height: 140px; }
.col.drop { outline: 3px dashed var(--orange); }
.col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--graphite); display: flex; justify-content: space-between; padding: 4px 4px 10px; }
.bcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); }
.bcard .title { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.bcard .sub { font-size: 12.5px; color: var(--graphite); }

/* ── Lead page ───────────────────────────────────────────────────────────────────────── */
.lead-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 18px; }
.lead-head .ref { font-size: 13px; color: var(--graphite); font-weight: 600; }
.contact-line { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 14px; color: var(--graphite); }
.disclosure { background: var(--inverse); color: var(--on-inverse); border-radius: 10px; padding: 14px 16px; font-weight: 600; font-size: 16px; margin: 10px 0 14px; display: flex; gap: 12px; align-items: flex-start; }
.disclosure svg { flex: none; width: 22px; height: 22px; color: var(--orange); margin-top: 1px; }
.script { margin: 0; padding-left: 20px; color: var(--text); }
.script li { margin: 6px 0; }
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.outcomes .btn { white-space: normal; text-align: center; line-height: 1.2; }
.outcomes .btn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--graphite); font-size: 12.5px; }
.profile p { margin: 0 0 8px; }
.need { background: var(--well); border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.coach h4 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--graphite); }
.coach ul { margin: 0; padding-left: 20px; }
.coach li { margin: 4px 0; }
.coach .say { background: var(--blue-bg); border-radius: 10px; padding: 10px 12px; margin: 6px 0; }
.coach .say b { display: block; font-size: 13px; color: var(--link); }
.split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.split div { background: var(--well); border-radius: 10px; padding: 10px 12px; }
.split div.you { background: var(--green-bg); }
.split b { display: block; font: 800 18px/1.2 var(--display); }
.split span { font-size: 12.5px; color: var(--graphite); font-weight: 600; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.seg button { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: 14px; min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* ── Emails page ─────────────────────────────────────────────────────────────────────── */
.step { border-left: 4px solid var(--primary); }
.fields { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.fields button { font-size: 12.5px; border: 1px dashed var(--steel); background: var(--card); color: var(--text); border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.preview { border: 1px solid var(--line); border-radius: 12px; background: var(--well); padding: 14px; white-space: pre-wrap; font-size: 14px; max-height: 360px; overflow: auto; }
.sendbox { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--inverse); color: var(--on-inverse); border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.sendbox .big { font: 800 24px/1.2 var(--display); }
.sendbox .muted { color: var(--on-inverse-2); }

/* ── Charts ──────────────────────────────────────────────────────────────────────────── */
.funnel .bar { display: grid; grid-template-columns: 130px 1fr 44px; gap: 10px; align-items: center; margin: 7px 0; font-size: 14px; }
.funnel .track { background: var(--well); border-radius: 6px; height: 22px; overflow: hidden; }
.funnel .fill { background: var(--chart-1); height: 100%; border-radius: 6px; }
.funnel .bar:last-child .fill { background: var(--green); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--graphite); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

/* ── Modal, toast ────────────────────────────────────────────────────────────────────── */
dialog { border: 1px solid var(--glass-edge); border-radius: var(--radius-lg); padding: 0; width: min(560px, calc(100vw - 24px)); box-shadow: var(--shadow-pop); background: var(--glass-strong); color: var(--text); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
dialog::backdrop { background: rgba(5, 10, 16, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog .dh { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 4px; }
dialog .db { padding: 12px 20px 20px; max-height: 75vh; overflow: auto; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--inverse); color: var(--on-inverse); padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 99; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast.err { background: var(--red); }
.notice { border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 10px 0; }
.notice.warn { background: var(--amber-bg); color: var(--warn-text); }
.notice.bad { background: var(--red-bg); color: var(--red); }
.notice.ok { background: var(--green-bg); color: var(--green); }
.notice.info { background: var(--blue-bg); color: var(--link); }
.drop { border: 2px dashed var(--steel); border-radius: var(--radius); padding: 34px 16px; text-align: center; background: var(--glass); cursor: pointer; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.skeleton { height: 18px; background: linear-gradient(90deg, var(--well) 0, var(--hover) 50%, var(--well) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; margin: 10px 0; }
@keyframes sk { to { background-position: -200% 0; } }

/* ── Sign in, unsubscribe ────────────────────────────────────────────────────────────── */
body.plain { background: radial-gradient(800px 500px at 20% 0%, color-mix(in srgb, var(--orange) 22%, transparent), transparent 70%), var(--ink); min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.signin, .unsub { color-scheme: light; --text: var(--ink); --text-2: #5f656e; --card: #fff; --glass: #fff; --glass-strong: #fff; --well: #f3f1ec; --hover: rgba(13,27,42,.05); --line: rgba(13,27,42,.11); --line-strong: rgba(13,27,42,.2); --primary: var(--navy); --on-primary: var(--on-navy); --link: var(--navy); --focus: var(--navy); --green: #2e7d5b; --green-bg: #e5f1eb; --red: #b42318; --red-bg: #fdecea; --amber: #94560a; --amber-bg: #fdf3e1; --blue-bg: #e8eef5; --warn-text: #6b3e04; }
.signin { background: #fff; color: var(--ink); border-radius: 18px; padding: 34px 30px; width: min(420px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.signin img { width: 210px; display: block; margin-bottom: 26px; }
.signin h1 { font-size: 22px; margin-bottom: 4px; }
.unsub { background: #fff; color: var(--ink); border-radius: 18px; padding: 34px 30px; width: min(480px, 100%); text-align: center; }
.unsub-logo { width: 220px; margin-bottom: 22px; }
.unsub h1 { font-size: 22px; margin-bottom: 10px; }

/* ── Phones ──────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lead-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .shell { display: block; }
  .side { display: none; }
  main.page { padding: 16px 16px 110px; }
  h1 { font-size: 22px; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20; padding: 6px; border-radius: 22px; background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-pop); }
  .tabbar .nav { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 2px; min-height: 52px; justify-content: center; position: relative; border-radius: 16px; }
  .tabbar .nav[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
  .tabbar .nav .count { position: absolute; top: 0; right: 14%; margin: 0; font-size: 10.5px; padding: 0 6px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .kpis > :last-child:nth-child(odd) { grid-column: span 2; }
  .kpi .n { font-size: 22px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .item { flex-wrap: wrap; }
  .item .act { width: 100%; }
  .item .act .btn { flex: 1; }
  .hide-sm { display: none; }
  table.t.stack thead { display: none; }
  table.t.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.t.stack td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 4px 6px; }
  table.t.stack td::before { content: attr(data-l); color: var(--graphite); font-size: 12.5px; font-weight: 600; }
  .funnel .bar { grid-template-columns: 96px 1fr 36px; font-size: 13px; }
  .timeline li { grid-template-columns: 72px 1fr; }
}
@media print {
  .side, .tabbar, .noprint, .btn { display: none !important; }
  .shell { display: block; } body, html.app body { background: #fff; color: #000; } main.page { padding: 0; } .appbar { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
body.plain #root { width: 100%; display: grid; place-items: center; }

.grid > .card + .card, .grid > .card { margin-top: 0; }
.spark { margin: 4px 0 12px; }
.spark-h { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--graphite); margin-bottom: 4px; }
.spark-h b { color: var(--text); }
.bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; height: 44px; align-items: end; border-bottom: 1px solid var(--line); }
.bars .b { height: 100%; display: flex; align-items: flex-end; }
.bars i { display: block; width: 100%; border-radius: 4px 4px 0 0; }
.spark-x { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; font-size: 11.5px; color: var(--graphite); }
h2 svg, h3 svg { width: 20px; height: 20px; vertical-align: -3px; margin-right: 6px; color: var(--link); }
.grid { align-items: start; }

a.chip { color: inherit; text-decoration: none; display: inline-flex; align-items: center; }
a.chip[aria-pressed="true"] { color: var(--on-inverse); }

.card > h2:first-child { margin-bottom: 14px; }

/* ── v2: steps on the call card, call-back box, what they want, team ─────────────────────────────────────── */
.steps { list-style: none; counter-reset: st; padding: 0; margin: 8px 0 0; }
.steps > li { counter-increment: st; position: relative; padding: 0 0 18px 40px; border-left: 2px solid var(--line); margin-left: 14px; }
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before { content: counter(st); position: absolute; left: -15px; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--inverse); color: var(--on-inverse); font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.steps > li > b { display: block; font-size: 16px; margin-bottom: 4px; }
.steps .disclosure { margin: 6px 0 8px; }
.cb-box { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.want-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.want-grid > div { min-width: 0; }
.want-grid .wide { grid-column: 1 / -1; }
.want-grid span { display: block; font-size: 12px; color: var(--graphite); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.want-grid b { font-size: 16px; overflow-wrap: anywhere; }
.wants h3 { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.wants h3 svg { width: 18px; height: 18px; color: var(--orange); }
.links { display: flex; flex-wrap: wrap; gap: 6px; }
.owner-pick { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--graphite); }
.owner-pick select { width: auto; margin: 0; padding: 6px 10px; }
.kpi .of { font-size: 15px; font-weight: 600; color: var(--graphite); }
.kpi.hot .of { color: var(--on-inverse-2); }
.cap-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.cap-top .l { font-size: 13px; color: var(--graphite); font-weight: 600; }
.cap-sum { font-size: 15px; }
.capbar { display: flex; height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 12px; }
.capbar i { display: block; height: 100%; }
.member.off { opacity: .6; }
.mstats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--graphite); }
.mstats b { color: var(--text); font-size: 15px; }
.pwbox { display: flex; gap: 10px; align-items: center; background: var(--well); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.pwbox code { font-size: 18px; font-weight: 700; flex: 1; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .want-grid { grid-template-columns: 1fr 1fr; }
  #slf { grid-template-columns: 1fr !important; }
  .steps > li { padding-left: 30px; margin-left: 12px; }
}
.notice svg, .btn svg { width: 16px; height: 16px; vertical-align: -3px; flex: none; }

/* ── Setl OS (white label): logos as text, DEGNR8 "inside a company" bar, settings tabs, branding, 2-step, platform ── */
.notice.good { background: var(--green-bg); color: var(--green); }
.logo-text { display: block; font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.01em; color: inherit; line-height: 1.15; margin-bottom: 22px; }
.logo-text.on-dark { color: #fff; font-size: 19px; margin: 0; }
.signin .logo-text { margin-bottom: 22px; }
.side .logo img { max-height: 64px; object-fit: contain; object-position: left center; }
.signin img { max-height: 90px; object-fit: contain; object-position: left center; }
.acting { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--amber-bg); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); color: var(--warn-text); border-radius: 12px; padding: 10px 14px; margin-bottom: 18px; font-size: 14px; }
.help { margin: -6px 0 16px; color: var(--graphite); font-size: 14px; max-width: 760px; }
.tabs { margin-top: 0; }
.tabs .chip { text-decoration: none; color: inherit; display: inline-flex; align-items: center; }
.colour { align-items: center; }
.colour input[type=color] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.pic { align-items: center; margin-top: 6px; }
.pic .thumb { display: inline-flex; align-items: center; justify-content: center; width: 150px; height: 56px; border: 1px dashed var(--line-strong); border-radius: 10px; background: #fff; overflow: hidden; }
.pic .thumb.dark { background: var(--ink); }
.pic .thumb img { max-width: 140px; max-height: 48px; object-fit: contain; }
.pic label.btn { position: relative; }
.brandgrid { align-items: start; }
.sticky { position: sticky; top: 16px; }
.bp { display: grid; grid-template-columns: 110px 1fr; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--p-bg); font-size: 12px; }
.bp-side { background: var(--p-ink); color: #fff; padding: 12px 8px; display: flex; flex-direction: column; gap: 6px; min-height: 170px; }
.bp-side img { max-width: 94px; max-height: 30px; object-fit: contain; margin-bottom: 6px; }
.bp-side b { font-size: 12px; margin-bottom: 6px; }
.bp-nav { padding: 5px 8px; border-radius: 6px; color: #c9d6e0; }
.bp-nav.on { background: var(--p-pri); color: #fff; }
.bp-main { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.bp-h { font-family: var(--display); font-weight: 800; font-size: 14px; color: var(--p-ink); }
.bp-card { background: #fff; border-radius: 8px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; gap: 6px; color: var(--p-ink); }
.bp-pill { background: #fde9dd; color: #9a3c0d; border-radius: 99px; padding: 1px 6px; font-size: 10px; font-weight: 700; }
.bp-btn { background: var(--p-acc); color: #fff; border-radius: 7px; padding: 5px 12px; font-weight: 700; display: inline-block; text-align: center; }
.bp-btn.wide { display: block; margin-top: 8px; }
.bp-link { color: var(--p-pri); font-weight: 600; text-decoration: underline; }
.bp-sign { margin-top: 12px; border-radius: 12px; padding: 14px; border: 1px solid var(--line); }
.bp-signcard { background: #fff; border-radius: 10px; padding: 14px; max-width: 240px; margin: 0 auto; box-shadow: var(--shadow); }
.bp-signcard img { max-width: 140px; max-height: 40px; object-fit: contain; display: block; margin-bottom: 8px; }
.bp-mail { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.bp-mailh { font-weight: 800; font-size: 11px; letter-spacing: .03em; border-bottom: 3px solid; padding-bottom: 6px; margin-bottom: 8px; }
.bp-foot { margin-top: 8px; color: var(--graphite); font-size: 10.5px; border-top: 1px solid var(--line); padding-top: 6px; }
.steps2fa ol { padding-left: 20px; }
.steps2fa li { margin: 4px 0; }
.qrbox { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qrbox svg.qr { width: 180px; height: 180px; border: 1px solid var(--line); border-radius: 10px; }
.qrbox .key { display: block; font-size: 15px; font-weight: 700; letter-spacing: .04em; margin-top: 4px; overflow-wrap: anywhere; max-width: 260px; }
.code-in { font-size: 22px; letter-spacing: .25em; text-align: center; }
.signin .steps2fa { text-align: left; }
.company.off { opacity: .7; }
.crow { display: flex; gap: 12px; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 10px; border: 5px solid; flex: none; }
.in.inline { display: inline-block; width: auto; min-height: 0; padding: 2px 8px; margin: 0; font-size: 13px; height: auto; }
ul.tight { padding-left: 18px; margin: 6px 0; }
ul.tight li { margin: 6px 0; }
.unsub-name { font-family: var(--display); margin-bottom: 18px; }
.mstats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--graphite); }
@media (max-width: 820px) { .bp { grid-template-columns: 80px 1fr; } .sticky { position: static; } .acting { font-size: 13px; } }

/* ── Settings: hours, products, plugins, usage (system 2) ─────────────────────────────── */
.sub3 { margin: 16px 0 4px; font-size: 15px; }
h2.cat { margin: 22px 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--graphite); }
.seg.days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.dchip input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.dchip:has(input:checked) { border-color: var(--primary); background: var(--blue-bg); font-weight: 600; }
.plug { display: flex; flex-direction: column; }
.plug.is-off { opacity: .85; }
.plug .card-h { align-items: flex-start; gap: 12px; flex-wrap: nowrap; justify-content: space-between; }
.plug .card-h > div { flex: 1; min-width: 0; }
.plug details { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.plug summary { cursor: pointer; padding: 4px 0; }
.plug svg { width: 14px; height: 14px; vertical-align: -2px; }
p.small svg { width: 14px; height: 14px; vertical-align: -2px; }
.small.bad { color: var(--red); }
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 999px; transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 720px) { .plug .act input, .item .act input.in { width: 100% !important; } }

/* System 3: Settings → Email */
.howto { padding-left: 20px; margin: 6px 0 10px; }
.howto li { margin: 4px 0; }
tr.now td { background: var(--green-bg); }
code { word-break: break-all; }

/* Calling from the app (system 4) */
.callbox .live-call { border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 8px; background: var(--card); }
.live-call .lc-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.live-call .lc-state { font-weight: 700; font-size: 18px; }
.live-call .lc-state.on { color: var(--green); }
.rec-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--red); }
.rec-dot::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: recpulse 1.2s ease-in-out infinite; }
@keyframes recpulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rec-dot::before { animation: none; } }
.callbox details summary { cursor: pointer; color: var(--link); }

/* ── Call reader + coaching (system 5) ─────────────────────────────────────────────────────────────────────── */
.talkbar { height: 8px; border-radius: 6px; background: var(--amber-bg); overflow: hidden; margin: 8px 0 4px; }
.talkbar i { display: block; height: 100%; background: var(--chart-1); border-radius: 6px 0 0 6px; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.preview.tx { white-space: normal; max-height: 360px; overflow: auto; }
.txl { margin: 0 0 6px; } .txl b { margin-right: 4px; }
.coach-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.coachp h4 { margin: 8px 0 4px; } .coachp ul { margin: 0; padding-left: 18px; }
.cbars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; height: 80px; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 18px; position: relative; }
.cbar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.cbar i { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--chart-1); }
.cbar span { position: absolute; bottom: -18px; font-size: 11px; color: var(--graphite); white-space: nowrap; }
.cbar b { position: absolute; top: -2px; font-size: 11px; }
table.t td.ok { color: var(--green); font-weight: 600; } table.t td.warn { color: var(--amber); font-weight: 600; }
@media (max-width: 720px) { .cbar span { font-size: 9px; } .coachp .grid.g3 { grid-template-columns: 1fr; } }

/* ── Fact find (system 6) + ABN lookup (system 7) ─────────────────────────────────────── */
.ffbar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.ffbar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.ffhead { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; justify-content: space-between; margin: 10px 0 14px; }
.ffhead .ref { font-size: 13px; color: var(--graphite); }
.ffprog { min-width: 260px; flex: 1; max-width: 460px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; position: sticky; top: 8px; z-index: 5; }
.ffpct b { font-family: var(--display); font-size: 22px; }
.ffprog details { margin-top: 6px; font-size: 13px; }
.ffprog summary { cursor: pointer; color: var(--link); font-weight: 600; }
#ffsug { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid.g2 .f.wide, .grid.g2 .wide { grid-column: 1 / -1; }
.f .hint { display: block; font-size: 12px; color: var(--graphite); font-weight: 400; }
.pre { display: flex; align-items: center; gap: 6px; }
.pre > span { color: var(--graphite); font-weight: 600; }
.pre .in { flex: 1; }
.in.bad { border-color: var(--red) !important; background: var(--red-bg); }
.abnbox { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--well); }
.abnbox .title { margin-bottom: 4px; }
.flag { font-size: 14px; padding: 8px 10px; border-radius: 8px; margin-top: 8px; }
.flag.bad { background: var(--red-bg); color: var(--red); }
.flag.warn { background: var(--amber-bg); color: var(--warn-text); }
.flag.info { background: var(--blue-bg); color: var(--link); }
.person { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 10px; }
.person .card-h { margin-bottom: 6px; }
.okc { color: var(--green); }
.bad { color: var(--red); }
ul.tight { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 760px) { .ffprog { position: static; max-width: none; } .grid.g2 { grid-template-columns: 1fr; } }

/* Customer fact-find page (/f/…) */
.cff { max-width: 640px; margin: 0 auto; padding: 20px 16px 60px; }
.cff header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cff header img { max-height: 44px; max-width: 200px; }
.cff .card { margin-bottom: 14px; }
.cff .saved { color: var(--green); font-weight: 600; font-size: 13px; }
.cff .consent { font-size: 14px; }
.cff .consent .ph { color: var(--amber); font-weight: 600; }
.cff .stickybar { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; display: flex; gap: 10px; align-items: center; }
body.cffbody { background: var(--bg); min-height: 100vh; }
.cff h1 { margin: 4px 0 8px; }
.cff > p { margin: 0 0 14px; }
.cff .person h3 { margin-bottom: 6px; }
.cff .check { display: flex; gap: 10px; align-items: flex-start; }
.cff .check input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.person svg, .ffcard h2 svg, .ffprog svg, .abnbox svg { width: 16px; height: 16px; vertical-align: -3px; flex: none; }
.person .wide { line-height: 1.7; }

/* ── Documents (system 8) ── */
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; font: inherit; text-align: left; }
.linkbtn.danger { color: var(--red); }
.doclist { display: grid; gap: 2px; margin-top: 6px; }
.docrow { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.docrow .main { min-width: 0; flex: 1; }
.docrow .title { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.docrow .files { margin-top: 4px; display: grid; gap: 2px; overflow-wrap: anywhere; }
.docrow .act { flex: none; flex-wrap: nowrap; align-items: center; }
.docrow.received .title, .docrow.waived .title { color: var(--text-2); }
.docrow svg { width: 16px; height: 16px; }
details.more { position: relative; }
details.more > summary { list-style: none; cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
details.more .menu { position: absolute; right: 0; top: 100%; z-index: 5; background: var(--glass-strong); border: 1px solid var(--glass-edge); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 8px 12px; display: grid; gap: 8px; min-width: 170px; }
.docitem.have { border-left: 4px solid var(--green); }
.docitem .btn input[type=file] { display: none; }
.upst { margin-top: 6px; min-height: 1em; }
.doctable { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.doctable th, .doctable td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.doctable th:first-child, .doctable td:first-child { text-align: left; min-width: 220px; }
.doctable th { font-size: 12px; font-weight: 700; color: var(--text-2); }
.doctable .ent { background: var(--well); }
.doctable input { width: 18px; height: 18px; }

/* ── Quotes (system 9) ── */
.qgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.qopt .f { margin-bottom: 8px; }
.qopt details { margin: 6px 0 10px; }
.qres { margin-top: 10px; border-top: 2px solid var(--line); padding-top: 10px; }
.qbig { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.qbig b { font-size: 28px; color: var(--text); line-height: 1; }
.qbig span { color: var(--text-2); font-size: 13px; }
.qdl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0 0 10px; font-size: 14px; }
.qdl dt { color: var(--text-2); }
.qdl dd { margin: 0; text-align: right; font-weight: 600; }
.item.quote .title svg { width: 16px; height: 16px; vertical-align: -3px; color: var(--accent); }
.pill.quote { background: var(--amber-bg); color: var(--amber); }

/* System 10: the machine card */
.card.machine .checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.card.machine .check-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-width: 0; }
.card.machine .item.chosen { background: color-mix(in srgb, var(--green) 10%, transparent); border-radius: 10px; }
.card.machine details summary { cursor: pointer; }

/* Checks card (system 11) */
.checkscard .checkline { border-top: 1px solid var(--line); padding: 8px 0; }
.checkscard .checkline:first-of-type { border-top: 0; }
.checkres { margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--green-bg); border-left: 4px solid var(--green); }
.checkres.warn { background: var(--amber-bg); border-left-color: var(--amber); }
.checkres.bad { background: var(--red-bg); border-left-color: var(--red); }
.checkres ul { margin: 4px 0; padding-left: 18px; }
.checkres .flags li { color: var(--red); font-weight: 600; }
.checkres ul.small li { color: var(--text); }
.acct { margin: 6px 0 8px; padding: 6px 8px; border-radius: 10px; background: var(--well); }

/* Lender matching (system 12) */
.lendercard .lm-why { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.lendercard .lm-why li { margin: 2px 0; }
.lendercard .item.lm-no .title { opacity: .8; }
.lm-compare { margin: 6px 0 10px; }
.lm-compare summary { cursor: pointer; font-weight: 600; }
.lm-compare table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.lm-compare th, .lm-compare td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.lm-form .f.wide, .lm-form .wide { grid-column: 1 / -1; }

/* ── "Powered by Setl OS": the platform's one quiet credit (companies keep their own brand everywhere else) ── */
.powered { margin: 14px 0 0; font-size: 11.5px; line-height: 1.4; text-align: center; letter-spacing: .01em; }
.powered a { color: var(--text-2); text-decoration: none; }
.powered a:hover, .powered a:focus-visible { color: var(--text); text-decoration: underline; }
body.plain .powered a { color: rgba(255,255,255,.6); }
body.plain .powered a:hover, body.plain .powered a:focus-visible { color: #fff; }
.side .who .powered { text-align: left; margin-top: 10px; font-size: 11px; }
body.cffbody .powered { margin: -40px 0 28px; }
body.cffbody .powered a { color: #8a9098; }
body.cffbody .powered a:hover { color: var(--ink); }

/* Local Outbox preview (/dev/outbox – development only) */
.outbox { max-width: 1280px; margin: 0 auto; padding: 20px 16px; }
.outbox h1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.outbox-grid { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 16px; }
.outbox-list { display: flex; flex-direction: column; gap: 6px; max-height: 80vh; overflow: auto; }
.outbox-list .item { display: block; padding: 10px 12px; border: 1px solid var(--line, #e4e1da); border-radius: 10px; background: #fff; color: inherit; text-decoration: none; }
.outbox-list .item.on { outline: 2px solid var(--primary, #0c3b64); }
.outbox-list .item span { display: block; margin-top: 2px; }
.outbox-view iframe { width: 100%; height: 80vh; border: 1px solid var(--line, #e4e1da); border-radius: 10px; background: #fff; }
@media (max-width: 800px) { .outbox-grid { grid-template-columns: 1fr; } .outbox-list { max-height: 40vh; } }

/* Plan bar (free trial / paused / payment failed) */
.planbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 14px; border-radius: 14px; background: var(--amber-bg); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); color: var(--text); font-size: 14px; }
.planbar.bad { background: var(--red-bg); border-color: color-mix(in srgb, var(--red) 35%, transparent); }

/* Import progress (job 358) */
.meter { height: 12px; border-radius: 99px; background: var(--well); overflow: hidden; margin: 10px 0 6px; }
.meter span { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .3s; }

/* Text message meter (characters, segments, cost) */
.smsmeter { margin: 8px 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--blue-bg); border: 1px solid var(--line); font-size: 14px; }
.smsmeter.warn { background: var(--amber-bg); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.smsbody { margin: 0 0 6px; padding: 8px 12px; border-left: 3px solid var(--primary); background: var(--card); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.faq p { margin: 0 0 10px; }
.addon { padding: 8px 0; border-top: 1px solid var(--line); } .addon:first-of-type { border-top: 0; }

/* Download your data */
.dl-opts .btn { width: 100%; justify-content: flex-start; margin-top: 6px; }
.dl-opts p { margin: 4px 0 10px; }
.progress { height: 8px; border-radius: 6px; background: var(--well); overflow: hidden; margin: 6px 0 2px; }
.progress span { display: block; height: 100%; background: var(--chart-1); transition: width .4s; }
#exlist .item.on { outline: 2px solid var(--focus); border-radius: 10px; }

/* Job 394: first-run checklist + How it works guide */
.checklist .progress { height: 6px; background: var(--well); border-radius: 99px; overflow: hidden; margin: 4px 0 10px; }
.checklist .progress i { display: block; height: 100%; background: var(--chart-1); border-radius: 99px; }
.gs { list-style: none; margin: 0; padding: 0; }
.gs li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.gs li:first-child { border-top: 0; }
.gs .tick { flex: 0 0 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; }
.gs .tick svg { width: 16px; height: 16px; }
.gs li.done .tick { background: #2e7d5b; border-color: #2e7d5b; }
.gs li.done .title { color: var(--graphite); text-decoration: line-through; text-decoration-color: var(--line); }
.gs li.next .tick { border-color: var(--primary); }
.gs .main { flex: 1; min-width: 0; }
.gs .title { font-weight: 600; }
.gs .sub { font-size: 13px; color: var(--graphite); }
.gs .btn { flex: 0 0 auto; }
.guide { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.guide-step { display: flex; gap: 14px; align-items: flex-start; }
.guide-step .num { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; display: grid; place-items: center; }
.guide-step h2 { margin: 2px 0 4px; font-size: 17px; }
.guide-step p { margin: 0 0 6px; }
@media (max-width: 640px) {
  .gs li { flex-wrap: wrap; }
  .gs .main { flex: 1 1 calc(100% - 40px); }
  .gs .btn { margin-left: 38px; }
}

/* "Someone's calling" (Kyle, 23 Nov) */
.btn.incoming { gap: 8px; min-height: 42px; }
.btn.incoming .kbd { background: color-mix(in srgb, var(--on-accent) 14%, transparent); border-color: transparent; color: inherit; }
dialog.wide { width: min(880px, calc(100vw - 24px)); }
dialog.intake .db { max-height: 82vh; padding-top: 4px; }
.intake-form h3 { font-size: 15px; margin: 4px 0 8px; }
.intake-form section { padding: 6px 0 10px; }
.intake-form .quick { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.isec { border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; background: var(--card); }
.isec > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; min-height: 48px; list-style: none; }
.isec > summary::-webkit-details-marker { display: none; }
.isec > summary::after { content: '+'; font-size: 20px; color: var(--graphite); }
.isec[open] > summary::after { content: '–'; }
.isec-b { padding: 0 16px 14px; }
.isec .person { border-top: 1px dashed var(--line); padding-top: 8px; margin-bottom: 8px; }
.isec .person h4 { margin: 4px 0 6px; font-size: 14px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-height: 44px; cursor: pointer; background: var(--card); }
.seg label:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.seg label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
fieldset.f { border: 0; padding: 0; margin: 0 0 12px; }
fieldset.f legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.still { margin: 0 0 8px; }
.still details { background: var(--well); border-radius: 10px; padding: 10px 14px; }
.still summary { cursor: pointer; }
.matches { background: var(--amber-bg); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }
.sticky-actions { position: sticky; bottom: -20px; background: var(--glass-strong); padding: 12px 0; margin-top: 8px; border-top: 1px solid var(--line); z-index: 2; }
@media (max-width: 820px) {
  .btn.incoming { position: fixed; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 25; margin: 0; border-radius: 999px; padding: 14px 18px; box-shadow: var(--shadow-pop); }
  .btn.incoming .kbd { display: none; }
  dialog.intake { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  dialog.intake .db { max-height: calc(100dvh - 60px); }
}
[hidden] { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.powered .legal-links a { color: inherit; }

/* ── Outreach campaigns (job 491) ── */
.okpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.obar { height: 6px; border-radius: 3px; background: var(--line); margin: 6px 0 4px; overflow: hidden; }
.obar span { display: block; height: 100%; background: var(--green); }
.obar span.near { background: var(--amber); }
.obar span.full { background: var(--red); }
.olist { margin: 6px 0 0; padding-left: 20px; }
.olist li { margin: 3px 0; }
.list .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.list .row:first-child { border-top: 0; }
.mailbox { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 12px; }
.mailprev { margin-top: 10px; border-top: 1px solid var(--line); padding: 4px 8px; max-height: 520px; overflow: auto; color: #1f2328; background: #fff; border-radius: 8px; }
code.wrap { word-break: break-all; font-size: 12px; }
@media (max-width: 720px) { .okpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#otab .t.stack td { min-width: 0; }
#otab .t.stack td .small, #otab .t.stack td a { overflow-wrap: anywhere; }
@media (max-width: 720px) { #otab .tablewrap { overflow-x: hidden; } #otab .t.stack td[data-l=""] .row-btns { justify-content: flex-start; } }

/* ══ Job 593: dashboard restyle (glass panels, KPI cards, sliding pill, big chart, "Needs a decision", dossier) ══ */
/* Sliding pill: the highlight is one layer clipped with inset(); its two edges animate on their own timings
   (leading edge 0.36 s, trailing edge 0.55 s), like the reference. Registered so the Web Animations API can tween them. */
@property --pl { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --pr { syntax: '<length>'; inherits: false; initial-value: 0px; }
.pills { position: relative; display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--well); border: 1px solid var(--line); isolation: isolate; max-width: 100%; }
.pills button { position: relative; z-index: 1; border: 0; background: none; color: var(--text-2); font-weight: 600; font-size: 13.5px; padding: 0 14px; min-height: 34px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.pills button:hover { color: var(--text); }
.pills .pill-hl { position: absolute; inset: 4px; z-index: 2; pointer-events: none; display: flex; gap: 2px; border-radius: 999px; background: var(--accent); clip-path: inset(0 var(--pr) 0 var(--pl) round 999px); }
.pills .pill-hl span { padding: 0 14px; min-height: 34px; display: inline-flex; align-items: center; font-weight: 600; font-size: 13.5px; color: var(--on-accent); white-space: nowrap; }
.pills:not(.ready) .pill-hl { visibility: hidden; }

/* KPI cards */
.kgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kcard { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px 12px; border-radius: var(--radius); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .2s var(--ease), border-color .2s var(--ease); }
a.kcard:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.kcard .kl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); min-width: 0; }
.kcard .kl svg { width: 15px; height: 15px; flex: none; }
.kcard .kl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .kn { font: 700 24px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kcard .kn small { font: 600 13px/1 var(--body); color: var(--text-2); letter-spacing: 0; margin-left: 2px; }
.kcard .kf { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); min-height: 26px; }
.kcard .kf .go { color: var(--link); font-weight: 600; text-decoration: none; white-space: nowrap; }
.kcard .chipx { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--well); color: var(--text-2); white-space: nowrap; }
.kcard .chipx.ok { background: var(--green-bg); color: var(--green); }
.kcard .chipx.warn { background: var(--amber-bg); color: var(--amber); }
.kcard svg.spk { width: 72px; height: 26px; flex: none; overflow: visible; }
.kcard svg.spk path.l { fill: none; stroke: var(--chart-1); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.kcard svg.spk path.a { fill: color-mix(in srgb, var(--chart-1) 16%, transparent); stroke: none; }
.kbar { height: 5px; border-radius: 99px; background: var(--well); overflow: hidden; flex: 1; max-width: 90px; }
.kbar i { display: block; height: 100%; border-radius: 99px; background: var(--chart-1); }
.kbar i.near { background: var(--amber); }
.kcard.hot { background: var(--inverse); color: var(--on-inverse); border-color: transparent; }
.kcard.hot .kl, .kcard.hot .kf { color: var(--on-inverse-2); }
.kcard.hot .kf .go { color: var(--on-inverse); }

/* Big chart + "Needs a decision" */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: stretch; margin-bottom: 16px; }
.chartcard { display: flex; flex-direction: column; min-height: 360px; }
.chartcard .ch { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.chartcard .ch p { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.chartcard .big { font: 700 32px/1.1 var(--display); letter-spacing: -.02em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.chartcard .big small { font: 500 13px/1 var(--body); color: var(--text-2); margin-left: 6px; letter-spacing: 0; }
.chartwrap { position: relative; flex: 1; min-height: 220px; margin-top: 8px; }
.chartwrap svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chartwrap .grid-l { stroke: var(--chart-grid); stroke-width: 1; }
.chartwrap .ax { fill: var(--text-2); font-size: 11px; font-family: var(--body); }
.chartwrap .line { fill: none; stroke: var(--chart-1); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chartwrap .area { fill: url(#chartFill); }
.chartwrap .pt { fill: var(--card); stroke: var(--chart-1); stroke-width: 2; }
.chartwrap .pt.now { fill: var(--chart-1); }
.chartwrap .hit { fill: transparent; cursor: default; }
.chartwrap .hit:hover + .tip, .chartwrap .hit:focus + .tip { opacity: 1; }
.chartwrap .tipbox { fill: var(--glass-strong); stroke: var(--line); }
.chartwrap .tip { opacity: 0; transition: opacity .15s; pointer-events: none; }
.chartwrap .tip text { fill: var(--text); font-size: 12px; font-weight: 600; font-family: var(--body); }
.chartwrap .draw { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); animation: draw .9s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chartwrap .fade { opacity: 0; animation: fadein .6s .2s var(--ease) forwards; }
@keyframes fadein { to { opacity: 1; } }
.decide { display: flex; flex-direction: column; }
.decide .dlist { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; overflow: auto; max-height: 420px; padding-right: 2px; }
.ditem { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 10px; border-radius: 14px; background: var(--well); border: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; transition: background .2s var(--ease), border-color .2s var(--ease); }
.ditem:hover { background: var(--hover); border-color: var(--line-strong); }
.ditem .di { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); }
.ditem .di svg { width: 17px; height: 17px; }
.ditem.k-asked .di { color: var(--accent); background: var(--accent-soft); }
.ditem.k-callback .di { color: var(--link); }
.ditem.k-stuck .di { color: var(--red); background: var(--red-bg); }
.ditem.k-docs .di { color: var(--green); background: var(--green-bg); }
.ditem .dm { flex: 1; min-width: 0; }
.ditem .dt { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ditem .ds { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ditem > svg { width: 16px; height: 16px; flex: none; color: var(--text-2); }
.decide .empty { padding: 30px 10px; }

/* Command palette (⌘K) and + New */
dialog.palette { width: min(640px, calc(100vw - 24px)); margin-top: 10vh; }
dialog.palette .db { padding: 0 0 8px; max-height: 70vh; }
dialog.palette .dh { display: none; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pal-in svg { width: 19px; height: 19px; color: var(--text-2); flex: none; }
.pal-in input { flex: 1; border: 0; background: transparent; font-size: 16px; outline: none; min-height: 32px; color: var(--text); }
.pal-res { padding: 6px 8px; max-height: 56vh; overflow: auto; }
.pal-res .grp { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); padding: 10px 10px 4px; }
.pal-res a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; }
.pal-res a svg { width: 17px; height: 17px; color: var(--text-2); flex: none; }
.pal-res a .pm { flex: 1; min-width: 0; }
.pal-res a .pm small { display: block; color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-res a[aria-selected="true"] { background: var(--accent-soft); }
.pal-res .none { padding: 18px 10px; color: var(--text-2); text-align: center; }

/* Dossier (one deal, job 593) */
.dos-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.dos-head .dateline { font-size: 13px; color: var(--text-2); margin: 0 0 6px; }
.dos-head p { margin: 6px 0 0; color: var(--text-2); max-width: 680px; }
.dos { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: stretch; }
.hero { position: relative; min-height: 340px; border-radius: var(--radius-lg); overflow: hidden; padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  background: radial-gradient(600px 300px at 85% 0%, color-mix(in srgb, var(--orange) 30%, transparent), transparent 70%), linear-gradient(160deg, color-mix(in srgb, var(--navy) 85%, #000) 0%, color-mix(in srgb, var(--ink) 92%, #000) 100%);
  color: #fff; border: 1px solid var(--glass-edge); box-shadow: var(--shadow); }
.hero::after { content: ''; position: absolute; inset: auto -10% -40% -10%; height: 70%; background: repeating-radial-gradient(ellipse at 50% 100%, rgba(255,255,255,.06) 0 1px, transparent 1px 22px); pointer-events: none; }
.hero .tags { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero .tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.hero .tag.ok i { background: #6fcf9f; }
.hero .asset { position: relative; z-index: 1; }
.hero .asset .k { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7); font-weight: 700; }
.hero .asset h2 { font-size: 26px; margin: 4px 0 6px; color: #fff; }
.hero .facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; position: relative; z-index: 1; }
.hero .facts div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.hero .facts span { display: block; font-size: 11.5px; color: rgba(255,255,255,.72); font-weight: 600; }
.hero .facts b { display: block; font: 700 16px/1.25 var(--display); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.gauge-card { display: flex; flex-direction: column; }
.gauge-card .gh { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.gauge-card .gh p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-2); }
.gauge { position: relative; margin: 8px auto 0; width: 100%; max-width: 260px; }
.gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.gauge .trk { fill: none; stroke: var(--well); stroke-width: 16; stroke-linecap: round; }
.gauge .val { fill: none; stroke: var(--chart-1); stroke-width: 16; stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.gauge .val.over { stroke: var(--red); }
.gauge .tick { stroke: var(--line-strong); stroke-width: 2; }
.gauge .lim { stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.gauge .needle { stroke: var(--text); stroke-width: 3; stroke-linecap: round; transform-origin: 120px 120px; transition: transform 1s var(--ease); }
.gauge .hub { fill: var(--text); }
.gauge .gv { text-align: center; margin-top: -6px; }
.gauge .gv b { display: block; font: 700 30px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gauge .gv span { font-size: 12px; color: var(--text-2); }
.gauge-card .gfoot { margin-top: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.gauge-card .gfoot span { display: block; font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.gauge-card .gfoot b { font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.strip { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px; border-radius: var(--radius-lg); }
.strip .thumbs { display: flex; gap: 8px; overflow-x: auto; flex: 1; scrollbar-width: none; padding: 2px; }
.strip .thumbs::-webkit-scrollbar { display: none; }
.strip .th { flex: none; width: 64px; height: 52px; border-radius: 12px; display: grid; place-items: center; text-decoration: none; background: var(--well); border: 2px solid transparent; color: var(--text); font: 700 13px/1 var(--display); position: relative; }
.strip .th small { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font: 600 9.5px/1 var(--body); color: var(--text-2); }
.strip .th:hover { border-color: var(--line-strong); }
.strip .th[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
.strip .pg { flex: none; text-align: center; font-size: 12px; color: var(--text-2); min-width: 70px; }
.strip .pg b { display: block; font-size: 15px; color: var(--text); }
.dos-lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }

@media (max-width: 1280px) { .kgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .dash, .dos { grid-template-columns: 1fr; } .decide .dlist { max-height: none; } .dos-lower { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .appbar { margin: 8px 8px 0; top: 8px; padding: 6px 6px 6px 14px; min-height: 54px; gap: 4px; }
  .crumbs > a, .crumbs > svg { display: none; }
  .kbtn { width: 42px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .kbtn span, .kbtn .kbd, .appbar .newbtn .lbl { display: none; }
  .appbar .newbtn { padding: 0; width: 42px; }
  .kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kcard .kn { font-size: 21px; }
  .kcard svg.spk { width: 56px; }
  .chartcard { min-height: 300px; }
  .chartcard .big { font-size: 26px; }
  .hero { min-height: 300px; }
  .hero .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pop { position: fixed; left: 8px; right: 8px; top: 70px; min-width: 0; width: auto; }
  dialog.palette { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-delay: 0s !important; }
  .chartwrap .draw { stroke-dashoffset: 0; } .chartwrap .fade { opacity: 1; }
}
.rg.shut > .flyout { opacity: 0 !important; visibility: hidden !important; }
@media (max-width: 820px) { .appbar.glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-strong); } .main-col { display: block; } }
.shell:not(.rail-open) .side .rail > .rg > .nav .chev { display: none; }
.dash > .card, .dos > .card, .dos-lower > .card { margin-top: 0; }
.ditem .dt, .ditem .ds { display: block; }
.side .signout { margin-top: 4px; }
.shell:not(.rail-open) .side .signout { width: 48px; padding: 0; justify-content: center; }
.shell:not(.rail-open) .side .signout > .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.side .who .wtxt .powered { text-align: left; margin-top: 8px; }
