/* =============================================================================
   Synova Bright — portal styles
   Palette: "case file" — deep docket navy, cool paper, firm accent ink.
   Type: Source Serif 4 for titles and figures, Public Sans for the interface.
   ============================================================================= */

@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url(/fonts/public-sans/public-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 500; font-display: swap; src: url(/fonts/public-sans/public-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url(/fonts/public-sans/public-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-display: swap; src: url(/fonts/public-sans/public-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif"; font-weight: 500; font-display: swap; src: url(/fonts/source-serif/source-serif-4-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif"; font-weight: 600; font-display: swap; src: url(/fonts/source-serif/source-serif-4-latin-600-normal.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --accent: #2446B8;            /* overridden per firm */
  --accent-ink: #ffffff;
  --bg: #F2F4F8;
  --surface: #FFFFFF;
  --surface-2: #F7F8FB;
  --ink: #16213A;
  --ink-2: #3F4B64;
  --muted: #5F6B83;
  --line: #DDE3EC;
  --line-strong: #C6CFDC;
  --nav: #13203B;
  --nav-ink: #C9D3E6;
  --nav-ink-strong: #FFFFFF;
  --nav-hover: #1C2C4E;
  --good: #0B7A2E;   --good-bg: #E4F4E8;
  --warn: #8A5A00;   --warn-bg: #FDF1D6;
  --bad: #B42F2F;    --bad-bg: #FBE6E6;
  --info: var(--accent); --info-bg: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --shadow: 0 1px 2px rgba(19, 32, 59, .06), 0 4px 16px rgba(19, 32, 59, .05);
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --serif: "Source Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* chart tokens (read by app.js) */
  --chart-1: #2a78d6;
  --chart-2: #eb6834;
  --chart-grid: #E6EAF0;
  --chart-text: #5F6B83;
  --link: var(--accent);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0D1322; --surface: #151E31; --surface-2: #1A2439; --ink: #E7ECF5; --ink-2: #C3CBDB; --muted: #95A1B8;
    --line: #26324B; --line-strong: #33415E; --nav: #0A101D; --nav-hover: #16213A;
    --good: #5CCB7C; --good-bg: #12301E; --warn: #F2C04D; --warn-bg: #33270C; --bad: #F08080; --bad-bg: #3A1A1D;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    --chart-1: #3987e5; --chart-2: #d95926; --chart-grid: #26324B; --chart-text: #95A1B8;
    --link: color-mix(in srgb, var(--accent) 55%, #ffffff);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D1322; --surface: #151E31; --surface-2: #1A2439; --ink: #E7ECF5; --ink-2: #C3CBDB; --muted: #95A1B8;
  --line: #26324B; --line-strong: #33415E; --nav: #0A101D; --nav-hover: #16213A;
  --good: #5CCB7C; --good-bg: #12301E; --warn: #F2C04D; --warn-bg: #33270C; --bad: #F08080; --bad-bg: #3A1A1D;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  --chart-1: #3987e5; --chart-2: #d95926; --chart-grid: #26324B; --chart-text: #95A1B8;
    --link: color-mix(in srgb, var(--accent) 55%, #ffffff);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--sans); }
a { color: var(--link); text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; color: var(--ink); }
h1 { font: 600 30px/1.15 var(--serif); letter-spacing: -.01em; }
h2 { font: 600 19px/1.3 var(--serif); }
h3 { font: 600 15px/1.4 var(--sans); }
p { margin: 0 0 .75em; }
.ic { flex: none; vertical-align: -4px; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------ app shell */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.nav { background: var(--nav); color: var(--nav-ink); display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
/* the menu scrolls by itself (mouse wheel or trackpad, no click needed) when it is taller than the screen; the person stays pinned at the bottom */
.nav { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #2A3B63 transparent; }
.nav::-webkit-scrollbar { width: 8px; } .nav::-webkit-scrollbar-thumb { background: #2A3B63; border-radius: 4px; }
.nav-foot { position: sticky; bottom: -20px; background: var(--nav); margin-bottom: -20px; padding-bottom: 20px; }
.brand { display: flex; gap: 11px; align-items: center; padding: 4px 8px 22px; color: var(--nav-ink-strong); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font: 600 17px var(--serif); color: var(--accent-ink); position: relative; }
.brand-mark::after { content: ""; position: absolute; top: -4px; left: 6px; width: 14px; height: 6px; border-radius: 3px 3px 0 0; background: var(--accent); }
.brand-name { font: 600 16px/1.2 var(--serif); }
.brand-sub { font-size: 12px; color: var(--nav-ink); }
.nav-group { font-size: 12px; color: #7F8CA8; padding: 18px 10px 6px; }
.nav a.item { display: flex; gap: 11px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--nav-ink); text-decoration: none; font-weight: 500; }
.nav a.item:hover { background: var(--nav-hover); color: var(--nav-ink-strong); }
.nav a.item[aria-current="page"] { background: var(--nav-hover); color: var(--nav-ink-strong); box-shadow: inset 3px 0 0 var(--accent); }
.nav .grow { flex: 1; }
.nav-foot { border-top: 1px solid #22304F; padding: 14px 6px 0; display: flex; gap: 10px; align-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #2A3B63; color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.nav-foot .who { min-width: 0; flex: 1; }
.nav-foot .who b { display: block; color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-foot .who span { font-size: 12px; }
.nav-foot a { color: var(--nav-ink); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.topbar .crumbs { flex: 1; font-size: 14px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumbs a { color: var(--muted); text-decoration: none; }
.topbar .crumbs a:hover { color: var(--ink); }
.icon-btn.menu-btn { display: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
/* the button shows where it takes you: a moon in light mode, a sun in dark mode */
.theme-toggle .ic-sun { display: none; }
.theme-toggle .ic-moon { display: inline; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ic-sun { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .ic-moon { display: none; }
}
.content { padding: 28px 32px 56px; max-width: 1320px; width: 100%; }

.page-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin: 6px 0 0; max-width: 64ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------ surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.panel-body { padding: 18px 20px; }
.panel-body.flush { padding: 0; }
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack { display: grid; gap: 20px; align-content: start; }

/* KPI strip: one ruled band rather than a row of identical cards */
.kpis { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 20px; }
.kpi { padding: 18px 22px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; }
.kpi .v { font: 600 34px/1.05 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 13px; margin-top: 6px; }
.kpi a { text-decoration: none; color: inherit; }
.kpi .flag { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 600; margin-top: 8px; padding: 2px 8px; border-radius: 999px; }
.flag.warn { background: var(--warn-bg); color: var(--warn); }
.flag.info { background: var(--info-bg); color: var(--link); }

/* ------------------------------------------------------------ buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 600 14px/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
a.btn { color: var(--ink); }
a.btn.primary { color: var(--accent-ink); }

label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--ink-2); }
.field { margin-bottom: 16px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: 400 15px/1.4 var(--sans);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type=color] { width: 56px; height: 40px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; flex: 1; min-width: 140px; }
form.inline { display: inline; }

/* ------------------------------------------------------------ alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); margin-bottom: 20px; font-weight: 500; border: 1px solid transparent; }
.alert.ok { background: var(--good-bg); color: var(--good); border-color: color-mix(in srgb, var(--good) 25%, transparent); }
.alert.error { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.alert.note { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.t td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--surface-2); }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.t a.rowlink { color: var(--ink); font-weight: 600; text-decoration: none; }
.t a.rowlink:hover { color: var(--accent); text-decoration: underline; }
.sub { color: var(--muted); font-size: 13px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 4px; }

/* ------------------------------------------------------------ pills (status: icon + label, never colour alone) */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.pill .ic { width: 14px; height: 14px; vertical-align: 0; }
.pill.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.pill.info { background: var(--info-bg); color: var(--accent); border-color: transparent; }
.pill.info { color: var(--link); }

/* stage tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 13.5px; }
.tabs a:hover { background: var(--surface); }
.tabs a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); }
.tabs .n { color: var(--muted); font-weight: 500; margin-left: 4px; }

/* progress */
progress.bar { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 80px; height: 6px; border: 0; border-radius: 3px; background: var(--line); overflow: hidden; }
progress.bar::-webkit-progress-bar { background: var(--line); border-radius: 3px; }
progress.bar::-webkit-progress-value { background: var(--accent); border-radius: 3px; }
progress.bar::-moz-progress-bar { background: var(--accent); border-radius: 3px; }
.progress-label { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ the case file (signature element) */
.casefile { position: relative; margin-top: 18px; }
.casefile .tab { position: absolute; top: -17px; left: 0; height: 18px; padding: 0 14px 0 12px; display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.casefile .tab::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.casefile > .panel { border-top-left-radius: 0; }
.casefile-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; padding: 20px 22px 18px; flex-wrap: wrap; }
.casefile-head h2 { font-size: 22px; }
.meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.meta span { display: inline-flex; gap: 6px; align-items: center; }

/* "received" stamp tally: one mark per checklist item */
.tally { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 10px; }
.tally i { width: 12px; height: 12px; border-radius: 3px; background: var(--line); }
.tally i.received { background: color-mix(in srgb, var(--accent) 55%, var(--surface)); }
.tally i.approved { background: var(--accent); }
.tally i.rejected { background: var(--bad); }
.ring { width: 76px; height: 76px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--line); }
.ring .val { stroke: var(--accent); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 600 18px var(--serif); font-variant-numeric: tabular-nums; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist > li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 22px; border-top: 1px solid var(--line); }
.checklist > li:target { background: var(--info-bg); }
.stamp { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--line-strong); color: var(--muted); }
.stamp .ic { width: 16px; height: 16px; vertical-align: 0; }
.stamp.received { border: 1.5px solid var(--accent); color: var(--accent); }
.stamp.approved { border: 0; background: var(--accent); color: var(--accent-ink); }
.stamp.rejected { border: 1.5px solid var(--bad); color: var(--bad); }
.checklist .what b { display: block; font-weight: 600; }
.checklist .what .cat { font-size: 12.5px; color: var(--muted); }
.checklist .note { margin-top: 6px; font-size: 13px; color: var(--bad); }
.checklist .files { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.checklist .files a { display: block; font-size: 13.5px; text-decoration: none; overflow-wrap: anywhere; }
.checklist .files a .ic { width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; }
.checklist .files a:hover { text-decoration: underline; }
.checklist .do { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.group-label { padding: 10px 22px 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--line); }

.uploader { display: inline-flex; }
.uploader input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.uploader label { margin: 0; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop { position: relative; border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 20px; text-align: center; color: var(--muted); background: var(--surface-2); }
.drop.over { border-color: var(--accent); background: var(--info-bg); color: var(--ink); }

/* ------------------------------------------------------------ lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.dot.on { background: var(--accent); }

.chart-box { position: relative; height: 240px; }
.chart-box.tall { height: 280px; }
details.table-view summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 10px 20px; border-top: 1px solid var(--line); }
details.table-view table { font-size: 13px; }

.share { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: center; }
.share img { width: 180px; height: 180px; border-radius: var(--r); background: #fff; padding: 8px; border: 1px solid var(--line); }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); font-size: 14px; }
.dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }

/* ------------------------------------------------------------ sign-in pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-side { background: var(--nav); color: var(--nav-ink); padding: 48px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-side .brand { padding: 0; }
.auth-side h1 { color: #fff; font-size: 44px; line-height: 1.08; max-width: 13ch; margin-top: auto; }
.auth-side p { max-width: 42ch; font-size: 16px; margin-top: 16px; }
.auth-side .facts { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 28px; font-size: 13.5px; }
.auth-side .facts span { display: inline-flex; gap: 7px; align-items: center; }
.auth-side .folders { position: absolute; right: -40px; top: 70px; width: 300px; height: 300px; pointer-events: none; }
.auth-side .folders i { position: absolute; inset: 0; border-radius: 6px 16px 16px 16px; border: 1.5px solid rgba(201, 211, 230, .22); }
.auth-side .folders i::before { content: ""; position: absolute; top: -14px; left: -1.5px; width: 92px; height: 15px; border: 1.5px solid rgba(201, 211, 230, .22); border-bottom: 0; border-radius: 8px 8px 0 0; }
.auth-side .folders i:nth-child(1) { transform: translate(0, 0) rotate(-7deg); }
.auth-side .folders i:nth-child(2) { transform: translate(-26px, 34px) rotate(-2deg); }
.auth-side .folders i:nth-child(3) { transform: translate(-52px, 68px) rotate(3deg); background: rgba(36, 70, 184, .18); border-color: rgba(120, 150, 240, .45); }
.auth-side .folders i:nth-child(3)::before { border-color: rgba(120, 150, 240, .45); background: rgba(36, 70, 184, .18); }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); position: relative; }
.auth-main .theme-toggle { position: absolute; top: 20px; right: 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 28px; margin-bottom: 6px; }
.auth-card .lede { color: var(--muted); margin-bottom: 24px; }
.auth-card .btn.primary { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.auth-foot { margin-top: 22px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

/* client portal: calmer, centred column */
.portal-wrap { max-width: 880px; }
.welcome { display: flex; gap: 22px; align-items: center; margin-bottom: 26px; }
.welcome h1 { font-size: 32px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .g-main, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 20; transform: translateX(-100%); transition: transform .2s ease; }
  .nav.open { transform: none; box-shadow: 0 0 0 100vmax rgba(5, 10, 20, .45); }
  .icon-btn.menu-btn { display: inline-grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 20px 16px 48px; }
  .g-2, .row { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { padding: 28px 24px; }
  .auth-side h1 { font-size: 30px; margin-top: 36px; }
  .auth-side .folders { display: none; }
  .share { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .checklist > li { grid-template-columns: 30px minmax(0, 1fr); padding: 14px 16px; }
  .checklist .do { grid-column: 2; justify-content: flex-start; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
  h1 { font-size: 25px; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpi { border-left: 0; border-top: 1px solid var(--line); }
  .kpi:first-child { border-top: 0; }
}
.solo { min-height: 100vh; }
.content > .grid + .grid, .content > .grid + .panel, .content > .panel + .grid, .content > .panel + .panel, .content > .casefile + .panel, .content > .casefile + .grid, .content > .casefile + .casefile { margin-top: 24px; }
.content > .casefile + .casefile { margin-top: 40px; }
.kpis.n3 { --n: 3; }
.kpis.n5 { --n: 5; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.checklist details[open] { flex-basis: 100%; }
.checklist details[open] .inline-form { margin-top: 8px; }
.list b a { color: var(--ink); text-decoration: none; }
.list b a:hover { color: var(--link); text-decoration: underline; }
.stamp.received { color: var(--link); border-color: var(--link); }
.nav .icon-btn { background: transparent; border-color: #2A3B63; color: var(--nav-ink); }
.nav .icon-btn:hover { background: var(--nav-hover); color: #fff; }

/* ============================================================ v2 additions */
.topsearch { position: relative; width: min(340px, 40vw); }
.topsearch .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.topsearch input { padding-left: 36px; height: 38px; background: var(--surface-2); }
@media (max-width: 860px) { .topsearch { display: none; } }

/* filter bar: one row above results */
.filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.filterbar .f { display: flex; flex-direction: column; gap: 4px; min-width: 130px; flex: 1 1 140px; }
.filterbar .f label { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.filterbar select, .filterbar input { padding: 7px 10px; font-size: 13.5px; }
.filterbar .f.wide { flex: 2 1 260px; }
.searchbox { display: flex; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.searchbox input[type=search] { flex: 1; min-width: 220px; font-size: 16px; padding: 12px 14px; }
.modes { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; padding: 3px; background: var(--surface); gap: 2px; }
.modes a { padding: 8px 14px; border-radius: 7px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; display: inline-flex; gap: 7px; align-items: center; }
.modes a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }
.result { padding: 14px 20px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; }
.result:first-child { border-top: 0; }
.result .ttl { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.result .ttl:hover { color: var(--link); text-decoration: underline; }
.result .snip { margin-top: 6px; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
mark { background: color-mix(in srgb, var(--warn) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.people { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--line); align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); font-weight: 600; font-size: 13.5px; }
.chip .avatar { width: 26px; height: 26px; font-size: 11px; }
.chip:hover { border-color: var(--accent); }
.status-line { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 20px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.status-line span { display: inline-flex; gap: 6px; align-items: center; }
.status-line .ic { width: 15px; height: 15px; }

/* calendar */
.cal-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cal-head h2 { min-width: 170px; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px; text-align: left; border-bottom: 1px solid var(--line); }
.cal td { vertical-align: top; height: 112px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal td:last-child { border-right: 0; }
.cal tr:last-child td { border-bottom: 0; }
.cal td.out { background: var(--surface-2); }
.cal td.out .dnum { color: var(--muted); opacity: .6; }
.cal .dnum { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.cal .dnum a { color: inherit; text-decoration: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal td.today .dnum a { background: var(--accent); color: var(--accent-ink); }
.cal .add { opacity: 0; color: var(--muted); text-decoration: none; font-size: 16px; line-height: 1; padding: 0 4px; }
.cal td:hover .add, .cal td:focus-within .add { opacity: 1; }
.ev { display: flex; gap: 5px; align-items: center; font-size: 12px; line-height: 1.3; padding: 3px 6px; border-radius: 5px; margin-bottom: 3px; text-decoration: none; color: var(--ink);
  background: var(--surface-2); border-left: 3px solid var(--line-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .ic { width: 13px; height: 13px; flex: none; }
.ev b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ev.hearing { background: var(--info-bg); border-left-color: var(--accent); }
.ev.deadline { background: var(--warn-bg); border-left-color: var(--warn); }
.ev:hover { filter: brightness(.97); text-decoration: underline; }
.datebox { width: 54px; flex: none; text-align: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.datebox span { display: block; font-size: 11px; font-weight: 700; background: var(--accent); color: var(--accent-ink); padding: 2px 0; }
.datebox b { display: block; font: 600 20px/1.3 var(--serif); padding: 2px 0 3px; }
@media (max-width: 860px) {
  .cal td { height: 64px; padding: 3px; }
  .cal .ev span.t { display: none; }
  .cal .ev { padding: 3px; justify-content: center; }
}

/* storage meter */
.meter { display: grid; gap: 6px; }
.meter .row-l { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.meter .row-l b { color: var(--ink); font-variant-numeric: tabular-nums; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); }
.danger-zone .panel-head h2 { color: var(--bad); }
.checkrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 20px; border-top: 1px solid var(--line); cursor: pointer; font-weight: 400; color: var(--ink); font-size: 14px; margin: 0; }
.checkrow:first-child { border-top: 0; }
.checkrow input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); }
.checkrow:hover { background: var(--surface-2); }
.inline-check { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--ink); }
.inline-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.badge-new { display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; font-weight: 700; color: var(--good); background: var(--good-bg); padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.form-cat { padding: 10px 20px; font: 600 15px var(--serif); background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.t td .actions { justify-content: flex-end; flex-wrap: nowrap; }
.t td details summary { cursor: pointer; }
.attach-pop { margin-top: 8px; display: flex; gap: 6px; }
.attach-pop select { min-width: 220px; font-size: 13px; padding: 6px 8px; }
.seg-note { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.seg-note .ic { color: var(--good); margin-top: 1px; }
.chart-box.short { height: 200px; }
.kpi .v small { font: 500 14px var(--sans); color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.list .grow .sub { display: block; }
.cal-head .icon-btn { font-size: 22px; line-height: 1; text-decoration: none; }
.panel-head > form.inline-form { flex: 1; }
.panel-head > form.inline-form input[type=search] { max-width: 520px; }
@media (max-width: 860px) { .cal .ev b { display: none; } }

/* ============================================================ v3: sign-in + admin centre */
.ac-head { margin-bottom: 14px; }
.ac-head h1 { margin-top: 8px; }
.ac-head p { color: var(--muted); margin: 6px 0 0; max-width: 70ch; }
.ac-badge { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--link); background: var(--info-bg); padding: 3px 10px 3px 8px; border-radius: 999px; }
.ac-badge .ic { width: 15px; height: 15px; }
.ac-tabs { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 22px; }
.sso-buttons { display: grid; gap: 10px; margin-bottom: 6px; }
.btn.sso { justify-content: center; padding: 12px; font-size: 15px; background: var(--surface); }
.btn.wide, .auth-card .btn.wide { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.chip-static { display: inline-flex; gap: 7px; align-items: center; padding: 4px 12px 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; }
.chip-static .ic { width: 16px; height: 16px; }
.kind-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kind { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); background: var(--surface-2); }
.kind:hover { border-color: var(--accent); background: var(--surface); }
.kind .ic { color: var(--link); width: 24px; height: 24px; }
.kind span { font-size: 13px; color: var(--muted); }
.dns { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.dns b { color: var(--ink); font-weight: 600; }
.dns .secret { font-size: 12px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.steps .secret { font-size: 12px; word-break: break-all; }
.form-section { margin: 22px 0 12px; font-size: 17px; }
.checkrow.static { cursor: default; }
.checkrow.static .ic { color: var(--muted); margin-top: 2px; }
.seatbar { max-width: 160px; }
.inline-form.compact select { min-width: 100px; padding: 6px 8px; font-size: 13.5px; }
.wide-card { max-width: 560px; }
code { font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }
@media (max-width: 1100px) { .kind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kind-grid { grid-template-columns: minmax(0, 1fr); } }
.stack, .stack > * { min-width: 0; }
.list .grow b { white-space: normal; }
.dl dd { overflow-wrap: anywhere; min-width: 0; }
#users .panel-head > form.inline-form { flex: 0 0 auto; } #users .panel-head input { width: 130px; min-width: 0; flex: 0 0 auto; }


/* ============================================================ v4: accounts and invoices */
.brand-logo { width: 64px; height: 40px; border-radius: 8px; padding: 4px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bad-text { color: var(--bad); }
.num-cell { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; font-variant-numeric: tabular-nums; }
.sum-row td { background: var(--surface-2); }
.panel.attention { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.sticky-panel { position: sticky; top: 84px; }

/* the ledger: receivable / payable / trust side by side, like a balance sheet */
.ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 20px; }
.ledger-col { padding: 18px 22px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.ledger-col:first-child { border-left: 0; }
.ledger-h { font: 600 15px var(--serif); margin-bottom: 10px; }
.ledger-h span { font: 400 12.5px var(--sans); color: var(--muted); margin-left: 6px; }
.ledger-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 14px; color: var(--ink-2); }
.ledger-row span { display: inline-flex; gap: 6px; align-items: center; }
.ledger-row .ic { width: 15px; height: 15px; color: var(--muted); }
.ledger-row b { font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; }
.ledger-row b small { display: block; font-weight: 500; font-size: 12px; }
.ledger-row small.up { color: var(--good); } .ledger-row small.down { color: var(--bad); }
.ledger-row.big { border-top: 0; padding-top: 0; }
.ledger-row.big b { font: 600 32px/1.1 var(--serif); letter-spacing: -.02em; }
.ledger-row.bad b, .ledger-row.bad span { color: var(--bad); }
.ledger-row.bad .ic { color: var(--bad); }
.ledger-link { margin-top: auto; padding-top: 10px; font-size: 13.5px; }
@media (max-width: 1100px) { .ledger { grid-template-columns: minmax(0, 1fr); } .ledger-col { border-left: 0; border-top: 1px solid var(--line); } .ledger-col:first-child { border-top: 0; } }

/* invoice editor */
.line-table td { padding: 8px 10px; vertical-align: middle; }
.line-table input, .line-table select { padding: 7px 9px; font-size: 14px; }
.line-table input.qty { width: 64px; text-align: right; }
.line-table input.money-in { width: 110px; text-align: right; }
.line-table td:nth-child(2) { min-width: 260px; }
.inv-totals.live { margin-bottom: 18px; }
.reminder { min-height: 120px; font-size: 13.5px; margin-bottom: 8px; }
.logo-field { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 8px; }
.logo-preview { width: 180px; height: 90px; flex: none; border: 1px dashed var(--line-strong); border-radius: var(--r); background: #fff; display: grid; place-items: center; padding: 10px; overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-preview span { font: 600 15px var(--serif); color: #16213A; text-align: center; }

/* the invoice document: always paper-white, in light and dark mode */
.invoice-doc { --paper-ink: #16213A; --paper-muted: #5F6B83; --paper-line: #DDE3EC; position: relative; overflow: hidden;
  background: #fff; color: var(--paper-ink); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); padding: 44px 48px 36px; font-size: 14px; }
.invoice-doc a { color: inherit; }
.inv-head { display: flex; justify-content: space-between; gap: 30px; align-items: flex-start; padding-bottom: 22px; border-bottom: 2px solid var(--paper-ink); }
.inv-from { display: flex; flex-direction: column; gap: 12px; max-width: 55%; }
.inv-logo { max-width: 220px; max-height: 80px; object-fit: contain; object-position: left center; }
.inv-wordmark { font: 600 22px/1.2 var(--serif); color: var(--paper-ink); }
.inv-addr { font-size: 13px; color: var(--paper-muted); line-height: 1.5; }
.inv-addr b { color: var(--paper-ink); }
.inv-title { text-align: right; }
.inv-title h2 { font: 600 34px/1 var(--serif); color: var(--paper-ink); letter-spacing: -.01em; }
.inv-no { font-size: 14px; color: var(--paper-muted); margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
.inv-meta { display: grid; grid-template-columns: auto auto; gap: 3px 14px; margin: 0; font-size: 13px; justify-content: end; }
.inv-meta dt { color: var(--paper-muted); text-align: right; } .inv-meta dd { margin: 0; text-align: right; font-weight: 600; }
.inv-parties { display: flex; justify-content: space-between; gap: 30px; padding: 22px 0; line-height: 1.5; }
.inv-label { display: block; font-size: 11.5px; font-weight: 700; color: var(--paper-muted); margin-bottom: 4px; letter-spacing: .02em; }
.inv-due-box { text-align: right; background: #F2F4F8; border-radius: 8px; padding: 12px 18px; min-width: 220px; }
.inv-due-box span:last-child { font-size: 12.5px; color: var(--paper-muted); }
.inv-big { display: block; font: 600 30px/1.15 var(--serif); font-variant-numeric: tabular-nums; }
.inv-lines { width: 100%; border-collapse: collapse; margin-top: 4px; }
.inv-lines th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--paper-muted); padding: 8px 10px; border-bottom: 1px solid var(--paper-ink); }
.inv-lines td { padding: 11px 10px; border-bottom: 1px solid var(--paper-line); vertical-align: top; }
.inv-lines .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-sub { font-size: 12px; color: var(--paper-muted); margin-top: 2px; }
.inv-bottom { display: flex; justify-content: space-between; gap: 30px; margin-top: 20px; align-items: flex-start; }
.inv-notes { flex: 1; font-size: 13px; color: var(--paper-ink); max-width: 52%; }
.inv-notes p { color: var(--paper-muted); margin: 0 0 14px; }
.inv-plan { border-collapse: collapse; margin-bottom: 16px; font-size: 13px; }
.inv-plan td { padding: 4px 12px 4px 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-pill { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #EEF1F6; color: var(--paper-muted); }
.inv-pill.p-paid { background: #E4F4E8; color: #0B7A2E; } .inv-pill.p-overdue { background: #FBE6E6; color: #B42F2F; } .inv-pill.p-partial { background: #FDF1D6; color: #8A5A00; }
.inv-totals { display: grid; grid-template-columns: auto auto; gap: 6px 22px; margin: 0; min-width: 260px; font-variant-numeric: tabular-nums; }
.inv-totals dt { color: var(--paper-muted, var(--muted)); } .inv-totals dd { margin: 0; text-align: right; }
.inv-totals .t-total { font-weight: 700; color: var(--paper-ink, var(--ink)); border-top: 1px solid var(--paper-line, var(--line)); padding-top: 6px; }
.inv-totals .t-pay { font-size: 12.5px; }
.inv-totals .t-bal { font: 600 18px var(--serif); color: var(--paper-ink, var(--ink)); border-top: 2px solid var(--paper-ink, var(--ink)); padding-top: 8px; }
.inv-totals.live dt, .inv-totals.live dd { color: var(--ink); }
.inv-foot { display: flex; justify-content: space-between; gap: 20px; margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--paper-line); font-size: 12px; color: var(--paper-muted); flex-wrap: wrap; }
/* rubber stamp, in the spirit of the case-file stamps */
.inv-stamp { position: absolute; top: 56px; left: 54%; transform: translateX(-50%) rotate(-12deg); font: 700 30px/1 var(--sans); letter-spacing: .08em; padding: 8px 18px;
  border: 4px solid currentColor; border-radius: 10px; opacity: .22; pointer-events: none; text-transform: uppercase; }
.inv-stamp.s-paid { color: #0B7A2E; opacity: .3; } .inv-stamp.s-overdue { color: #B42F2F; opacity: .3; } .inv-stamp.s-void, .inv-stamp.s-draft { color: #5F6B83; } .inv-stamp.s-partial { color: #8A5A00; }
@media (max-width: 860px) {
  .invoice-doc { padding: 26px 20px; }
  .inv-head, .inv-parties, .inv-bottom { flex-direction: column; }
  .inv-title, .inv-meta dt, .inv-meta dd { text-align: left; } .inv-meta { justify-content: start; }
  .inv-from, .inv-notes { max-width: none; } .inv-due-box { text-align: left; }
  .inv-stamp { top: 20px; left: auto; right: 0; transform: rotate(-12deg); font-size: 20px; }
  .logo-field { flex-direction: column; }
}
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; }
  .nav, .topbar, .no-print, .alert, .flash { display: none !important; }
  .shell { display: block; } .content { padding: 0; max-width: none; }
  .grid.g-main { display: block; }
  .invoice-doc { border: 0; box-shadow: none; padding: 0; }
  .inv-stamp { opacity: .25; }
  .panel { box-shadow: none; }
}
.t a.rowlink { white-space: nowrap; } .t td.sub { white-space: nowrap; }

/* =============================================================================
   v5: motion, roles, plan, Synova Assist
   ============================================================================= */

/* ------------------------------------------------------------ smooth page loads */
@view-transition { navigation: auto; }
.nav { view-transition-name: nav; }
.topbar { view-transition-name: topbar; }
::view-transition-old(root) { animation: 120ms ease-out both vt-out; }
::view-transition-new(root) { animation: 220ms cubic-bezier(.2,.7,.2,1) both vt-in; }
::view-transition-old(nav), ::view-transition-new(nav), ::view-transition-old(topbar), ::view-transition-new(topbar) { animation: none; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

.content > * { animation: rise 360ms cubic-bezier(.2,.7,.2,1) both; }
.content > *:nth-child(2) { animation-delay: 40ms; } .content > *:nth-child(3) { animation-delay: 80ms; }
.content > *:nth-child(4) { animation-delay: 120ms; } .content > *:nth-child(n+5) { animation-delay: 160ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.pagebar { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 100; pointer-events: none; transform-origin: 0 50%; transform: scaleX(0); opacity: 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #6fb0ff)); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
.pagebar.on { opacity: 1; animation: pagebar 8s cubic-bezier(.1,.6,.2,1) forwards; }
@keyframes pagebar { 0% { transform: scaleX(0); } 10% { transform: scaleX(.35); } 40% { transform: scaleX(.7); } 100% { transform: scaleX(.96); } }

.btn, .item, .panel, .kpi, .chip-btn, .list li, .t tbody tr { transition: background-color 160ms ease, border-color 160ms ease, box-shadow 200ms ease, transform 200ms ease, color 160ms ease; }
.btn:active { transform: translateY(1px); }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy .ic { opacity: 0; }
.btn.busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--ink-2) transparent var(--ink-2) transparent; animation: spin 700ms linear infinite; }
.btn.primary.busy::after { border-color: var(--accent-ink) transparent var(--accent-ink) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.kpis .kpi:hover { background: var(--surface-2); }
a.panel:hover, .panel.link:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(19,32,59,.06), 0 12px 28px rgba(19,32,59,.08); }

/* ------------------------------------------------------------ roles */
.role-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); margin-right: 6px; vertical-align: 0; }
.r-admin { background: #7A4FD8; } .r-lawyer { background: #2a78d6; } .r-case_manager { background: #0F9D8A; }
.r-accountant { background: #E08A1E; } .r-reception { background: #D2487A; }
.matrix th.c, .matrix td.c { text-align: center; white-space: nowrap; }
.matrix th.c { font-size: 13px; }
.matrix th.c .sub { font-weight: 400; }
.matrix tr.muted-row td:first-child b { color: var(--muted); }
.matrix td { vertical-align: middle; }
.tick { color: var(--good); display: inline-flex; }
.changed { color: var(--warn); font-weight: 700; margin-left: 4px; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; vertical-align: middle; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch .knob { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background-color 180ms ease; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform 200ms cubic-bezier(.2,.7,.2,1); }
.switch input:checked + .knob { background: var(--accent); }
.switch input:checked + .knob::after { transform: translateX(16px); }
.switch input:focus-visible + .knob { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.form-row { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.form-row .field { margin: 0; max-width: 460px; }
.actions.end { justify-content: flex-end; }

/* ------------------------------------------------------------ plan and add-ons */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line-strong); }
.chips .chip.on { background: var(--good-bg); color: var(--good); border: 1px solid transparent; }
.chips .chip .ic { width: 14px; height: 14px; }
.modules li { padding: 16px 20px; }
.modules .mod-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.modules li.on .mod-ic { background: var(--good-bg); color: var(--good); }
.modules .grow b { white-space: normal; }
.modules .mod-price { font-size: 13px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.meter { display: grid; gap: 6px; margin-bottom: 12px; }
.meter progress { width: 100%; }
.list.compact li { padding: 8px 20px; }
.list li.off { color: var(--muted); }

/* ------------------------------------------------------------ Synova Assist */
.assist-title { display: flex; align-items: center; gap: 12px; }
.assist-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: radial-gradient(120% 120% at 20% 10%, #74b1ff 0%, #3f80f3 45%, #6b4fd8 100%); box-shadow: 0 6px 18px rgba(63,128,243,.35); }
.assist-mark .ic { width: 22px; height: 22px; }
.assist { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.assist-chat { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 460px; overflow: hidden; }
.assist-log { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.assist-empty { margin: auto; text-align: center; max-width: 560px; }
.assist-empty h2 { margin: 14px 0 18px; }
.assist-orb { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(120% 120% at 25% 15%, #8cc0ff 0%, #3f80f3 50%, #5b3fc8 100%); box-shadow: 0 0 0 10px color-mix(in srgb, #3f80f3 12%, transparent), 0 14px 40px rgba(63,128,243,.35);
  animation: orb 3.2s ease-in-out infinite; }
.assist-orb .ic { width: 32px; height: 32px; }
@keyframes orb { 50% { box-shadow: 0 0 0 18px color-mix(in srgb, #3f80f3 6%, transparent), 0 14px 40px rgba(63,128,243,.45); transform: translateY(-2px); } }
.assist-suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip-btn { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 500 13.5px/1.2 var(--sans); cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--link); transform: translateY(-1px); }
.msg { display: flex; flex-direction: column; animation: rise 260ms cubic-bezier(.2,.7,.2,1) both; }
.msg.me { align-items: flex-end; }
.msg .bubble { max-width: min(760px, 92%); padding: 12px 16px; border-radius: 16px; line-height: 1.55; }
.msg.me .bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; white-space: pre-wrap; }
.msg.bot .bubble { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.bot.error .bubble { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.msg .bubble p { margin: 0 0 .5em; } .msg .bubble p:last-child { margin: 0; }
.msg .bubble ul { margin: .25em 0 .6em; padding-left: 1.2em; } .msg .bubble li { margin: .15em 0; }
.msg .bubble blockquote { margin: .4em 0 .7em; padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 8px 8px 0; color: var(--ink-2); font-size: 14px; }
.msg .bubble blockquote p { margin: .3em 0; }
.msg .bubble .table-wrap { margin: .4em 0 .6em; background: var(--surface); border-radius: 8px; border: 1px solid var(--line); }
.md-t th, .md-t td { padding: 6px 10px; font-size: 13.5px; }
.msg .reveal { animation: rise 240ms ease both; }
.msg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; max-width: min(760px, 92%); }
.msg-meta .sub { font-size: 12px; }
.chip-link { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--info-bg); color: var(--link); text-decoration: none; }
.msg-note { margin-top: 6px; font-size: 12.5px; color: var(--warn); max-width: min(760px, 92%); }
.thinking .bubble { color: var(--muted); display: inline-flex; gap: 10px; align-items: center; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dot 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.assist-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: var(--surface); align-items: flex-end; }
.assist-form textarea { flex: 1; resize: none; border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 14px; font: 400 15px/1.45 var(--sans); background: var(--surface); color: var(--ink); max-height: 180px; }
.assist-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.assist-side .facts { margin-bottom: 8px; }
@media (max-width: 1000px) { .assist { grid-template-columns: 1fr; } .assist-chat { height: 70vh; } }
.engine-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.engine-card { position: relative; display: flex; gap: 10px; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--r-lg); cursor: pointer; background: var(--surface); transition: border-color 160ms ease, box-shadow 200ms ease; }
.engine-card:hover { border-color: var(--line-strong); }
.engine-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.engine-card > input { margin-top: 3px; accent-color: var(--accent); }
.ec-body { display: grid; gap: 8px; min-width: 0; }
.ec-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ec-fields { display: grid; gap: 8px; margin-top: 4px; }
.ec-fields .field { margin: 0; display: grid; gap: 3px; }
.ec-fields label { font-size: 12.5px; color: var(--muted); }
.checkrow.mini { padding: 4px 0; font-size: 13px; }
.inline-field { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 12px; }
.inline-field input { text-align: right; }
.addon-total { display: grid; justify-items: end; line-height: 1.2; }
.addon-total b { font: 600 24px/1.1 var(--serif); }
@media (max-width: 1100px) { .engine-cards { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ Synova console sign-in */
.console-body { min-height: 100vh; margin: 0; color-scheme: dark; color: #E7ECF5;
  background: radial-gradient(900px 600px at 50% 30%, #18224a 0%, #0a1024 55%, #050812 100%); }
.console-wrap { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 18px; padding: 24px 16px; }
.console-card { width: min(420px, 100%); background: rgba(21, 30, 49, .82); border: 1px solid #26324B; border-radius: 18px; padding: 32px 30px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45); backdrop-filter: blur(6px); animation: rise 420ms cubic-bezier(.2,.7,.2,1) both; }
.console-logo { display: block; margin: 0 auto 18px; max-width: 260px; height: auto; }
.console-card h1 { color: #fff; font-size: 22px; text-align: center; margin-bottom: 18px; }
.console-card label { color: #C3CBDB; }
.console-card input { background: #0D1322; color: #E7ECF5; border-color: #33415E; }
.console-card .lede, .console-card .sub { color: #95A1B8; }
.console-card .btn.primary { background: #3F80F3; border-color: #3F80F3; color: #fff; }
.console-card .qr { display: grid; place-items: center; margin: 14px 0; }
.console-card .qr img { border-radius: 12px; background: #fff; padding: 8px; }
.code-input { font: 600 24px/1 var(--sans); letter-spacing: .35em; text-align: center; }
.center { text-align: center; }
.console-foot { color: #5F6B83; font-size: 12.5px; }
.tab-locked { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); padding: 8px 12px; cursor: not-allowed; }
.assist-side .facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 10px; }
.assist-side .facts dt { color: var(--muted); font-size: 13px; }
.assist-side .facts dd { margin: 0; font-weight: 600; }
.assist-form textarea { height: 46px; min-height: 46px; }
.code-input { width: 100%; }
.engine-card { align-items: flex-start; }
.ec-body { align-content: start; }
.brand-mark.synova { background: transparent; padding: 0; }
.brand-mark.synova img { width: 100%; height: 100%; object-fit: contain; }
.brand-mark.synova::after { display: none; }
.powered { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 12px 8px; color: var(--nav-ink); }
.powered img { width: 28px; height: 28px; flex: none; }
.powered b { display: block; font: 600 14px/1.2 var(--serif); color: var(--nav-ink-strong); letter-spacing: .02em; }
.powered span span { font-size: 11.5px; opacity: .8; }
.nav-powered { margin: 0 0 8px; border-radius: 10px; background: rgba(255,255,255,.04); }
.auth-side .powered { padding: 0; margin-top: 28px; }

/* ------------------------------------------------------------ retainers */
.retainer-doc .ra-section { margin: 18px 0; }
.retainer-doc .ra-section h3 { font: 600 13px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: #5F6B83; margin-bottom: 8px; }
.retainer-doc .pre { white-space: pre-wrap; }
.retainer-doc .ra-terms .pre { font-size: 12.5px; line-height: 1.55; color: #3F4B64; }
.retainer-doc .ra-plan { margin-top: 14px; }
.retainer-doc .ra-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 28px; }
.retainer-doc .ra-line { border-bottom: 1px solid #16213A; height: 34px; margin: 6px 0 4px; display: flex; align-items: flex-end; font: 500 15px var(--serif); }
.retainer-doc .ra-signed { font: italic 500 24px/1.2 var(--serif); color: #1a2a6c; border-bottom: 1px solid #16213A; padding: 4px 0; margin: 6px 0 4px; }
.retainer-doc .sub { color: #5F6B83; font-size: 12px; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0 0 12px; }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.totals .big { font: 600 20px var(--serif); border-top: 1px solid var(--line); padding-top: 8px; }
.stack-btns { display: grid; gap: 8px; margin-top: 12px; }
.sticky { position: sticky; top: 16px; }
.tabs .count { font-size: 11.5px; background: var(--surface-2); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.sign-banner { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 18px; text-decoration: none; color: inherit; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.sign-banner .mod-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--info-bg); color: var(--link); }
.sign-banner .grow b { display: block; }
details.decline { margin-top: 14px; } details.decline summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.datebox.hot { background: var(--bad-bg); color: var(--bad); }
.sub-head { border-top: 1px solid var(--line); }
.date-add { border-top: 1px solid var(--line); }
.intake .intake-read textarea { width: 100%; font: 400 15px/1.55 var(--sans); border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px; background: var(--surface); color: var(--ink); resize: vertical; }
.intake .intake-read textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.intake .intake-read .actions { justify-content: space-between; margin-top: 10px; }
.intake-read, .intake .alert { margin-bottom: 18px; }
.intake-warn { margin: 10px 0 0; padding-left: 1.2em; color: var(--warn); font-size: 13.5px; }
.filled { animation: filled 1.6s ease both; }
@keyframes filled { 0% { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); } 100% { background: var(--surface); } }
tr.filled td { animation: filled 1.6s ease both; }
.dates-t select, .dates-t input { width: 100%; }
.upload-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.drop { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px dashed var(--line-strong); border-radius: 12px; cursor: pointer; color: var(--ink-2); }
.drop input { max-width: 100%; }
.drop span { display: none; }
.pkg { align-items: flex-start !important; }
.pkg .grow .sub { display: block; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; word-break: break-all; }
.pkg-actions { display: grid; gap: 6px; justify-items: end; }
.inline-stack { display: grid; gap: 6px; justify-items: end; }
details.changes pre, pre.log { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; max-height: 320px; overflow: auto; margin: 6px 0 0; }
pre.log { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
li.job.mine { background: var(--info-bg); }

/* ---------- two-step sign-in */
.qr-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 10px 0 18px; }
.qr-wrap img { border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 6px; }
.qr-wrap code { font-size: 13px; letter-spacing: .08em; }
.steps-plain { margin: 0 0 6px 18px; padding: 0; line-height: 1.6; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin: 0; min-width: 180px; flex: 1; }
.recovery { margin-bottom: 18px; border-color: var(--warn, #d48a00); }
.codes { list-style: none; margin: 12px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.codes li { background: var(--soft, rgba(127,127,127,.08)); border-radius: 8px; padding: 8px 12px; text-align: center; }
.codes code { font-size: 15px; letter-spacing: .1em; font-weight: 600; }
@media print { .side, .topbar, .page-head .actions, .grid, .recovery .actions { display: none !important; } }
.switch-row { display: inline-flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; margin-right: 6px; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--accent, #1d3b8f); }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav-count.bad { background: #E5484D; color: #fff; }
.nav-count.warn { background: #F2C04D; color: #2b1d00; }

/* ---------- monitoring */
.mon-kpis { --n: 6; }
.mon-kpis .kpi { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px 18px; }
.mon-kpis .kpi:first-child { border-left: 0; }
.mon-kpis .kpi-ic { grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2, rgba(127,127,127,.08)); color: var(--muted); }
.mon-kpis .kpi b { font: 600 26px/1.1 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mon-kpis .kpi > span:last-child { color: var(--muted); font-size: 12.5px; }
.mon-kpis .kpi.good .kpi-ic { background: var(--good-bg); color: var(--good); }
.mon-kpis .kpi.warn .kpi-ic { background: var(--warn-bg); color: var(--warn); } .mon-kpis .kpi.warn b { color: var(--warn); }
.mon-kpis .kpi.bad .kpi-ic { background: var(--bad-bg); color: var(--bad); } .mon-kpis .kpi.bad b { color: var(--bad); }
@media (max-width: 1100px) { .mon-kpis { --n: 3; } .mon-kpis .kpi:nth-child(4) { border-left: 0; } .mon-kpis .kpi:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 640px) { .mon-kpis { --n: 2; } .mon-kpis .kpi { border-left: 0; border-top: 1px solid var(--line); } }

.count-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: var(--bad); margin-left: 2px; }
.count-dot.warn { background: #F2C04D; color: #2b1d00; }

.status-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 0%, transparent); display: inline-block; }
.status-dot.ok { background: #22A55B; box-shadow: 0 0 0 4px rgba(34,165,91,.15); }
.status-dot.warning { background: #E5A323; box-shadow: 0 0 0 4px rgba(229,163,35,.18); }
.status-dot.critical, .status-dot.offline { background: #E5484D; box-shadow: 0 0 0 4px rgba(229,72,77,.18); animation: pulse-dot 1.6s ease-in-out infinite; }
.status-dot.lg { width: 12px; height: 12px; margin-right: 10px; vertical-align: 3px; }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 7px rgba(229,72,77,.05); } }
@media (prefers-reduced-motion: reduce) { .status-dot { animation: none !important; } }

.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 20px; }
.server-card { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg, 14px); box-shadow: var(--shadow); padding: 16px 18px 14px; color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s; position: relative; overflow: hidden; }
.server-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: #22A55B; }
.server-card.st-warning::before { background: #E5A323; } .server-card.st-critical::before, .server-card.st-offline::before { background: #E5484D; }
.server-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(16,24,40,.10); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.sc-head { display: flex; align-items: center; gap: 12px; }
.sc-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sc-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-title .sub { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; border-top: 1px solid var(--line); padding-top: 10px; }

.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 4px; --c: #22A55B; }
.gauge.warn { --c: #E5A323; } .gauge.bad { --c: #E5484D; } .gauge.none { --c: var(--line); }
.gauge-ring { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 77% 100%), conic-gradient(var(--c) calc(var(--v) * 1%), color-mix(in srgb, var(--line) 80%, transparent) 0); transition: background .4s; }
.gauge-ring span { font: 600 17px/1 var(--sans); font-variant-numeric: tabular-nums; }
.gauge-ring small { font-size: 11px; color: var(--muted); margin-left: 1px; }
.gauge b { font-size: 12.5px; font-weight: 600; }
.gauge em { font-style: normal; font-size: 11px; color: var(--muted); margin-top: -3px; }

.spark-wrap { position: relative; height: 46px; }
.spark-wrap.no-data canvas { display: none; }
.spark-wrap.no-data::after { content: 'Charts appear after a few minutes of reports'; font-size: 12px; color: var(--muted); }
.spark-legend { position: absolute; right: 0; top: -2px; font-size: 10.5px; color: var(--muted); display: flex; gap: 4px; align-items: center; background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 0 4px; border-radius: 4px; }
.spark-legend i { width: 8px; height: 3px; border-radius: 2px; display: inline-block; background: var(--chart-1); margin-left: 4px; }
.spark-legend i.c2 { background: var(--chart-2); }
.svc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.svc { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2, rgba(127,127,127,.08)); }
.svc i { width: 7px; height: 7px; border-radius: 50%; background: #22A55B; }
.svc.down { background: var(--bad-bg); color: var(--bad); } .svc.down i { background: #E5484D; }

.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.alert-list li:first-child { border-top: 0; }
.alert-list.compact li { grid-template-columns: auto 1fr; padding: 11px 20px; }
.sev-dot { width: 10px; height: 10px; border-radius: 3px; background: #E5A323; display: inline-block; }
.sev-critical .sev-dot { background: #E5484D; }
.done .sev-dot { opacity: .45; }
tr.done td { opacity: .78; }
.nowrap { white-space: nowrap; }

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-panel { margin: 0; }
.chart-panel .chart-box { height: 220px; }
.chart-box.no-data canvas { display: none; }
.chart-box.no-data::after { content: 'No data for this period yet.'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.now { font: 600 13px var(--sans); color: var(--ink-2, var(--muted)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.seg { display: inline-flex; background: var(--surface-2, rgba(127,127,127,.08)); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a { padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.dl.cols { grid-template-columns: 150px minmax(0, 1fr); }
.cmd { background: #0B1530; color: #DCE6FF; padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: 13px; margin: 0 0 12px; }
.join { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.hub-state { margin-top: 16px; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.hub-state.ok .ic { color: var(--good); } .hub-state.bad { color: var(--bad); }
.rules td { vertical-align: middle; }
.num-in { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; color: var(--muted); }
.num-in input { width: 76px; }
.empty.sm { padding: 14px 4px; text-align: left; }
.mt { margin-top: 14px; }
.pad { padding: 16px 20px; }
.panel + .server-grid, .panel + .chart-grid { margin-top: 20px; }
.alert.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.num-in input { width: 84px; padding-top: 7px; padding-bottom: 7px; }
.form-foot { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.codes code { white-space: nowrap; background: none; border: 0; padding: 0; font-size: 14.5px; letter-spacing: .06em; }
.codes { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

/* ---------- licences and storage meters */
.meter { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--line) 85%, transparent); overflow: hidden; min-width: 120px; }
.meter.lg { height: 12px; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: #22A55B; transition: width .5s ease; }
.meter.warn i { background: #E5A323; } .meter.bad i { background: #E5484D; }
.meter-cell { min-width: 200px; } .meter-cell .sub { display: block; margin-top: 5px; font-size: 12px; }
.lic-summary { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; margin-bottom: 18px; }
.lic-summary > div { display: flex; flex-direction: column; gap: 6px; }
.lic-summary b { font: 600 24px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.lic-summary span { color: var(--muted); font-size: 12.5px; }
@media (max-width: 720px) { .lic-summary { grid-template-columns: 1fr; gap: 14px; } }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper input { width: 80px; text-align: center; }
.lic-kpis { --n: 4; }
.grid.tight { gap: 12px; }
.lic-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.lic-grid .actions { flex-wrap: nowrap; justify-content: flex-end; }
@media (max-width: 1000px) { .lic-grid { grid-template-columns: 1fr; } }
.ai-opt { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 4px; margin: 4px 0 16px; }
.ai-opt legend { padding: 0 6px; font-weight: 600; font-size: 13px; }
.ai-line { display: flex; gap: 6px; align-items: center; margin: -4px 0 14px; }
[hidden] { display: none !important; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 200px; } .filters .grow { flex: 1; }
.pool-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pool { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.pool.over { border-color: var(--bad); color: var(--bad); }
.choice-list { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.choice-list legend { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.choice { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.choice.disabled { opacity: .55; cursor: not-allowed; }
.seg.tri label { display: inline-flex; } .seg.tri input { position: absolute; opacity: 0; pointer-events: none; }
.seg.tri span { padding: 5px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg.tri input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.seg.tri input:focus-visible + span { outline: 2px solid var(--accent); }
.kind-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .kind-grid.two { grid-template-columns: 1fr; } }
.kind.disabled { opacity: .55; pointer-events: none; }
.bad-text { color: var(--bad); }
details summary { cursor: pointer; }
.store-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .store-grid { grid-template-columns: 1fr; } }
.firm-store { flex-wrap: nowrap; gap: 14px; }
.firm-store select { flex: 1; min-width: 0; }
.firm-store .switch-row { flex: none; white-space: nowrap; }
@media (max-width: 760px) { .firm-store { flex-wrap: wrap; } }
.inline-form input[type=checkbox], .inline-form input[type=radio] { flex: none; min-width: 0; width: 18px; }
.firm-store { align-items: center; }
/* Assist: typed answers */
.tw-hide { display: none !important; }
.tw-caret { display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: var(--accent, #2f5bd3); animation: tw-blink 1s steps(2, start) infinite; }
@keyframes tw-blink { to { visibility: hidden; } }
.answer-card { display: flex; gap: 14px; align-items: flex-start; margin: 0 20px 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.answer-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.answer-value { font: 600 22px/1.25 var(--serif); margin: 2px 0 4px; } .answer-value.muted { color: var(--muted); font-size: 17px; }
.ra-matter { width: 100%; border-collapse: collapse; font-size: 13px; }
.ra-matter th { text-align: left; font-weight: 600; width: 34%; padding: 4px 10px 4px 0; color: var(--ink-2, #344054); background: none; }
.ra-matter td { padding: 4px 0; }
.ra-limited { border-left: 3px solid #d48a00; background: #fff8e8; color: #4a3500; padding: 8px 12px; border-radius: 6px; margin: 8px 0; font-size: 13px; }
.mandate span { padding: 7px 16px; }
/* remote jobs (monitoring → server) */
.stack-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.stack-form .field { width: 100%; margin: 0; }
.stack-form select { width: 100%; }
.alert.info { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
/* Synova Support banner */
.support-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 16px; border-radius: 10px; border: 1px solid var(--warn, #b7791f); background: var(--warn-bg, #fff8e6); color: var(--ink); font-size: 14px; }
.support-bar span { flex: 1; min-width: 240px; }
.support-bar.is-me { border-color: var(--accent); background: var(--accent-bg, #eef4ff); }
.ms-btn { display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 8px; text-decoration: none; }
.or-line { margin: 10px 0 4px; text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; }
/* Synova welcome animation, once after sign-in: the S turns and grows into place, the name
   appears beside it, then the whole thing fades away to the page. No script needed. */
.brand-splash { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: #050816;
  animation: bs-out .55s ease 2.1s forwards; }
.bs-stage { display: flex; align-items: center; gap: 22px; }
.bs-mark { width: 120px; height: auto; animation: bs-spin 1.25s cubic-bezier(.2, .8, .2, 1) both; filter: drop-shadow(0 6px 24px rgba(63, 128, 243, .35)); }
.bs-word { display: flex; flex-direction: column; opacity: 0; animation: bs-word .6s ease 1.05s forwards; }
.bs-name { font: 600 46px/1 var(--font-sans, system-ui, sans-serif); letter-spacing: .14em; color: #fff; }
.bs-sub { font: 500 13px/1.6 var(--font-sans, system-ui, sans-serif); letter-spacing: .5em; color: #9fb4d8; margin-top: 6px; }
@keyframes bs-spin { 0% { transform: rotate(-540deg) scale(.15); opacity: 0; } 25% { opacity: 1; } 100% { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes bs-word { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes bs-out { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@media (max-width: 520px) { .bs-mark { width: 84px; } .bs-name { font-size: 32px; } }
@media (prefers-reduced-motion: reduce) { .bs-mark, .bs-word { animation: none; opacity: 1; } .brand-splash { animation: bs-out .3s ease .6s forwards; } }
/* forms library: official online portals and program tabs */
.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.portal-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; background: var(--surface); }
.portal-card:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(30, 60, 140, .08); }
.portal-card .pill { align-self: flex-start; }
.portal-card .go { margin-top: auto; display: inline-flex; gap: 6px; align-items: center; color: var(--accent); font-weight: 600; font-size: 13px; }
.program-tabs { flex-wrap: wrap; }
.portal-line { margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* Autopilot answer sheet */
.ap-table th[scope=row] { width: 36%; font-weight: 600; vertical-align: top; }
.ap-value { font-size: 14px; }
.ap-missing th { color: var(--bad, #a12b2b); }
/* calendar and email connections */
.connect-row { display: flex; gap: 18px; flex-wrap: wrap; }
.connect-row form { display: flex; flex-direction: column; gap: 4px; }
.connect-btn { min-width: 190px; justify-content: center; }
.connect-btn[disabled] { opacity: .5; cursor: not-allowed; }
.stack-form .checkrow.mini { padding: 4px 0; border: 0; }
/* client email */
.mail-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
@media (max-width: 900px) { .mail-grid { grid-template-columns: 1fr; } }
.mail-form textarea { font: inherit; line-height: 1.5; }
.attach-list { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; margin-top: 8px; }
.attach-list .checkrow.mini { padding: 4px 0; border: 0; }
.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-list li { border-top: 1px solid var(--line); }
.mail-list li:first-child { border-top: 0; }
.mail-list a { display: flex; gap: 12px; padding: 12px 20px; color: var(--ink); text-decoration: none; align-items: flex-start; }
.mail-list a:hover { background: var(--surface-2); }
.mail-list .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mail-list .snip { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-list .dir { color: var(--muted); margin-top: 2px; }
.mail-list li.in .dir { color: var(--accent); }
.mail-list .when { white-space: nowrap; }
.mail-body { white-space: pre-wrap; word-wrap: break-word; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); line-height: 1.55; }
.sub.pad, p.pad { padding: 14px 20px; margin: 0; }
/* Autopilot document check */
.doc-check { margin: 4px 0 8px 22px; font-size: 13px; }
.doc-check .pill { font-size: 12px; }
.doc-check .findings { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2, var(--ink)); }
.doc-check .findings li.problem { color: var(--bad); }
.file-under { margin-top: 6px; gap: 8px; }
/* submission package */
.pkg-table input.order { width: 64px; }
.pkg-table code { font-size: 12px; word-break: break-all; }
.pkg-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; border-top: 1px solid var(--line); }
.pkg-box { border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pkg-box h3 { margin: 0; font-size: 15px; }
.pkg-box .field { width: 100%; margin: 0; }
.warn-text { color: var(--warn); font-size: 12px; }
.panel-head .field.inline { margin: 0; min-width: 260px; }
.item-files { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 4px; }
.item-files a { display: inline-flex; gap: 5px; align-items: center; font-weight: 500; }
.item-files a.older { font-weight: 400; opacity: .8; }
.doc-status li { align-items: flex-start; }
/* files overview */
.ov-list { display: flex; flex-direction: column; }
.ov-case { border-top: 1px solid var(--line); }
.ov-case:first-child { border-top: 0; }
.ov-case > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(130px, .8fr) minmax(200px, 1.4fr) minmax(150px, 1fr); gap: 16px; align-items: center; padding: 14px 20px; }
.ov-case > summary::-webkit-details-marker { display: none; }
.ov-case > summary:hover { background: var(--surface-2); }
.ov-case.attention > summary { box-shadow: inset 3px 0 0 var(--warn); }
.ov-case[open] > summary { background: var(--surface-2); }
.ov-who, .ov-docs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ov-who .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-status { display: flex; flex-wrap: wrap; gap: 6px; }
.ov-bar { display: flex; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.ov-bar i { display: block; height: 100%; width: 0; transition: width .4s ease; }
.ov-bar i.a { background: var(--good); } .ov-bar i.r { background: var(--accent); } .ov-bar i.f { background: var(--warn); }
.ov-flags { line-height: 1.5; }
.ov-body { padding: 4px 20px 18px; }
.ov-items { list-style: none; margin: 0 0 12px; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.ov-items li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 9px 14px; border-top: 1px solid var(--line); align-items: center; }
.ov-items li:first-child { border-top: 0; }
.ov-item { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ov-item .sub { flex-basis: 100%; }
@media (max-width: 900px) { .ov-case > summary { grid-template-columns: 1fr 1fr; } .ov-items li { grid-template-columns: 1fr; } }
/* console jobs: live progress */
.job-live { display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.job-live-head, .job-live-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.job-live-head b { font-size: 15px; }
.job-pct { font: 600 20px var(--serif); font-variant-numeric: tabular-nums; }
.progress { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 5px; transition: width .8s ease; }
.job-note { margin: 0; }
.job-table tr.mine td { background: var(--surface-2); }
.job-table details summary { list-style: none; }
.job-table pre.log { max-width: 640px; max-height: 320px; overflow: auto; white-space: pre-wrap; font-size: 12px; }
/* console quick access */
.qa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.qa-card { display: flex; gap: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; align-items: flex-start; }
.qa-qr { flex: none; width: 132px; height: 132px; border-radius: 8px; overflow: hidden; background: #fff; padding: 4px; }
.qa-qr svg { width: 100%; height: 100%; display: block; }
.qa-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; align-items: flex-start; }
.qa-info .copy-field { width: 100%; }
.qa-info p { margin: 0; }
.qa-cmd-l { margin: 10px 0 4px; font-size: 13px; }
.qa-pw { min-width: 300px; }
@media (max-width: 520px) { .qa-card { flex-direction: column; } }
.flag.bad { background: var(--bad-bg); color: var(--bad); }
.flag.warn { background: var(--warn-bg); color: var(--warn); }
/* label + bar rows (server memory and disk, storage use) */
.usage { display: grid; gap: 6px; margin-bottom: 12px; }
.usage .row-l { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.usage .row-l b { color: var(--ink); font-variant-numeric: tabular-nums; }
.usage progress { width: 100%; }
.net-switch { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
/* label / value lists (server details) */
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0 0 16px; font-size: 14px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.job-link { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.job-link[hidden] { display: none; }
.steps-mini { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 4px; }

/* ============================================================ dashboard (1.10) */
.kpis-icons .kpi { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: inherit; transition: background .15s ease; }
.kpis-icons .kpi:hover { background: var(--surface-2); }
.kpis-icons .kpi:first-child { border-radius: var(--r-lg) 0 0 var(--r-lg); }
.kpis-icons .kpi:last-child { border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.kpi-ic { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; }
.kpi-ic svg { width: 20px; height: 20px; }
.kpi-ic.blue { background: color-mix(in srgb, #2a78d6 14%, var(--surface)); color: #2a78d6; }
.kpi-ic.violet { background: color-mix(in srgb, #7c5cd6 14%, var(--surface)); color: #7c5cd6; }
.kpi-ic.amber { background: color-mix(in srgb, #d98a1c 16%, var(--surface)); color: #b8700c; }
.kpi-ic.green { background: color-mix(in srgb, #1f9d55 14%, var(--surface)); color: #1a8a4a; }
.kpis-icons .kpi .v { font-size: 30px; }
.kpis-icons .flag { margin-top: 8px; display: inline-flex; }

.askbar { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; margin: 0 0 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); transition: border-color .15s ease, box-shadow .15s ease; }
.askbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow); }
.askbar-ic { color: var(--accent); display: grid; place-items: center; }
.askbar-ic svg { width: 20px; height: 20px; }
.askbar input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); padding: 8px 0; outline: none; box-shadow: none; }
.askbar input::placeholder { color: var(--muted); }
.askbar .btn { border-radius: 999px; padding-left: 20px; padding-right: 20px; }

.dash-main { align-items: start; }
.chart-box.sm { height: 190px; }

.news-panel .panel-head p { display: flex; gap: 6px; align-items: center; }
.ee-tile { display: grid; gap: 6px; margin: 0 16px 4px; padding: 14px 16px; border-radius: 12px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #13203B 0%, #1E3A7B 55%, #2446B8 100%); box-shadow: 0 6px 18px rgba(19, 32, 59, .18); }
.ee-tile:hover { filter: brightness(1.06); }
.ee-k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.ee-main { display: flex; align-items: baseline; gap: 10px; }
.ee-main b { font: 600 26px var(--serif); }
.ee-main span { font-size: 14px; opacity: .9; }
.ee-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; opacity: .92; }
.ee-stats b { font-size: 16px; font-variant-numeric: tabular-nums; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { border-top: 1px solid var(--line); }
.news-list li:first-child { border-top: 0; }
.news-list a { display: grid; gap: 4px; padding: 12px 20px; text-decoration: none; color: var(--ink); }
.news-list a:hover { background: var(--surface-2); }
.news-list a:hover .news-title { color: var(--link); }
.news-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.news-meta .news-kind { font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.news-title { font-weight: 600; line-height: 1.35; }
.pill.sm { font-size: 11px; padding: 1px 7px; }

/* news page */
.news-page .news-list a { padding: 16px 22px; }
.news-page .news-sum { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.topic-chips a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: 13px; background: var(--surface); }
.topic-chips a[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ee-table td b { font-variant-numeric: tabular-nums; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-chips a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink); text-decoration: none; background: var(--surface-2); }
.ask-chips a:hover { border-color: var(--accent); color: var(--link); background: var(--surface); }
.ask-chips a .ic { width: 14px; height: 14px; color: var(--link); }
.news-tabs { margin-top: 20px; }
.news-foot { margin-top: 14px; }
.ee-list { list-style: none; margin: 0; padding: 0; }
.ee-list li + li { border-top: 1px solid var(--line); }
.ee-list a { display: flex; align-items: center; gap: 14px; padding: 12px 20px; color: var(--ink); text-decoration: none; }
.ee-list a:hover { background: var(--surface-2); }
.ee-list .grow { min-width: 0; }
.ee-prog { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ee-nums { display: flex; flex-direction: column; align-items: flex-end; min-width: 52px; font-variant-numeric: tabular-nums; }
.ee-nums .sub { font-size: 11px; }
/* Knowledge */
.kb-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 20px; }
.kb-badge { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--link); font-size: 15px; }
.kb-badge .ic { width: 16px; height: 16px; }
.kb-badge.correction { color: var(--ok, #15803d); }
.kb-badge.document, .kb-badge.page { color: var(--muted); }
.kb-body { margin: 2px 0 4px; line-height: 1.5; white-space: pre-wrap; }
.kb-actions { display: flex; gap: 6px; flex: none; }
.kb-edit summary { cursor: pointer; font-size: 13px; color: var(--link); margin-top: 4px; }
.kb-edit textarea { width: 100%; margin: 8px 0; }
.kb-tip { margin: 10px 0 0; }
.kb-page { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
ul.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
ul.ticks li { padding-left: 22px; position: relative; line-height: 1.45; }
ul.ticks li::before { content: ''; position: absolute; left: 2px; top: 6px; width: 9px; height: 5px; border-left: 2px solid var(--link); border-bottom: 2px solid var(--link); transform: rotate(-45deg); }
.key-points { margin: 6px 0 2px; padding-left: 18px; font-size: 13.5px; color: var(--ink-2, var(--ink)); }
.key-points li { margin: 2px 0; }
/* Assist: feedback and learning */
.msg-fb { display: inline-flex; gap: 2px; margin-left: 6px; }
.msg-fb button { border: 1px solid transparent; background: none; padding: 3px 6px; border-radius: 7px; color: var(--muted); cursor: pointer; line-height: 0; }
.msg-fb button:hover, .msg-fb button[aria-pressed="true"] { color: var(--link); border-color: var(--line); background: var(--surface); }
.msg-fb .ic { width: 15px; height: 15px; }
.msg-teach { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); max-width: 680px; }
.msg-teach p { margin: 0 0 8px; font-size: 13.5px; }
.msg-teach textarea { width: 100%; margin-bottom: 8px; }
.msg-teach .row { display: flex; gap: 8px; flex-wrap: wrap; }
.msg-learned { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--link); }
.msg-learned .ic { width: 14px; height: 14px; }
.key-head { display: block; margin-top: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.panel-head > form.inline-form { flex-wrap: nowrap; }
input[type=file] { width: 100%; padding: 8px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--surface-2); color: var(--ink); font: 400 14px/1.4 var(--sans); }
input[type=file]::file-selector-button { margin-right: 10px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink); font: 600 13px var(--sans); cursor: pointer; }
/* Application information */
.appinfo-top { margin-bottom: 18px; }
.appinfo-status { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.appinfo-meter { display: flex; gap: 14px; align-items: center; min-width: 280px; flex: 1; }
.appinfo-meter .usage { width: 180px; flex: none; }
.appinfo-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.appinfo-todo { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.appinfo-todo .chip { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink); text-decoration: none; background: var(--surface-2); }
.appinfo-todo .chip b { color: var(--warn, #b45309); margin-left: 4px; }
.appinfo-sec { margin-bottom: 16px; scroll-margin-top: 80px; }
.appinfo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 18px; }
.appinfo-grid .field { margin: 0; display: flex; flex-direction: column; gap: 5px; }
.appinfo-grid .field label { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.appinfo-grid .span-all { grid-column: 1 / -1; }
.appinfo-rows, .appinfo-people { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; }
.appinfo-rows legend, .appinfo-people legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.appinfo-rows table.t td { padding: 4px; }
.appinfo-rows input, .appinfo-rows select { min-width: 110px; padding: 7px 9px; font-size: 14px; }
.appinfo-person { border-top: 1px solid var(--line); padding: 10px 0; }
.appinfo-person:first-of-type { border-top: 0; }
.appinfo-person summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.appinfo-src { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--link); }
.appinfo-src .ic { width: 13px; height: 13px; }
.appinfo-bar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 12px 16px; margin: 8px -4px 0; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 14px; }
.appinfo-bar .sub { margin-right: auto; }
.ff-result, .ff-form { display: flex; gap: 14px; align-items: flex-start; padding: 14px 20px; }
.ff-form .check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.ff-form .check input { margin-top: 4px; }
.ff-form .sub { display: block; }
.ff-list { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.ff-list.warn li { color: var(--warn, #b45309); }
.ff-more summary { cursor: pointer; font-size: 13px; color: var(--link); margin-top: 4px; }
.t-warn { color: var(--warn, #b45309); }
@media (max-width: 640px) { .appinfo-meter .usage { width: 110px; } .appinfo-bar { flex-wrap: wrap; } }
.ai-bar { width: 180px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; flex: none; }
.ai-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--link)); transition: width .6s ease; }
.ff-count { margin: 4px 0 0; font-size: 14px; }
.ff-count strong { font-weight: 700; }
.ff-code { font-weight: 700; }
@media (max-width: 640px) { .ai-bar { width: 110px; } }
.quick-client { display: grid; gap: 12px; }
.quick-client .field { margin: 0; }
.quick-client details.more summary { cursor: pointer; font-size: 13px; color: var(--link); }
.quick-client details.more[open] { display: grid; gap: 12px; }
.quick-client .sub { margin: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- sign-in pages: the Synova Bright hero ---------- */
.auth-side { background: radial-gradient(1200px 600px at -10% -10%, #1C3470 0%, rgba(28,52,112,0) 55%), radial-gradient(800px 500px at 110% 110%, #0E3A45 0%, rgba(14,58,69,0) 60%), var(--nav); padding: 44px 56px 32px; gap: 0; }
.auth-side .hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "word h1" "word lede" "art art"; column-gap: 28px; align-items: end; margin-top: 20px; }
.hero-word { grid-area: word; align-self: start; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: #BFD0F5; background: rgba(127,160,255,.12); border: 1px solid rgba(127,160,255,.28); padding: 6px 12px; border-radius: 999px; }
.hero-kicker .ic { width: 14px; height: 14px; color: #FCD34D; }
.wordmark { margin-top: 22px; font-family: var(--serif); font-weight: 600; font-size: clamp(52px, 4.3vw, 92px); line-height: .92; letter-spacing: -.02em; color: #fff; display: flex; flex-direction: column; }
.wordmark .bright { background: linear-gradient(92deg, #8FB0FF 0%, #5EEAD4 70%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.hero-art { grid-area: art; width: 100%; height: auto; align-self: center; margin-top: 8px; }
.auth-side .hero h1 { grid-area: h1; color: #fff; font-size: 26px; line-height: 1.2; max-width: 20ch; margin-top: 28px; font-weight: 600; }
.auth-side .hero .hero-lede { grid-area: lede; max-width: 56ch; font-size: 15.5px; margin-top: 12px; color: var(--nav-ink); }
.auth-side .folders, .auth-side .facts { display: none; }
.promises { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.promises li { display: flex; gap: 11px; align-items: flex-start; background: rgba(255,255,255,.045); border: 1px solid rgba(201,211,230,.14); border-radius: 12px; padding: 14px; font-size: 13px; line-height: 1.45; color: var(--nav-ink); }
.promises b { display: block; color: #fff; font-size: 14px; margin-bottom: 3px; }
.promises .pi { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.promises .pi .ic { width: 18px; height: 18px; }
.promises .pi.lock { background: rgba(94,234,212,.14); color: #5EEAD4; }
.promises .pi.ai { background: rgba(252,211,77,.14); color: #FCD34D; }
.promises .pi.sso { background: rgba(143,176,255,.16); color: #A9C1FF; }
.made-by { margin-top: auto; padding-top: 26px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--nav-ink); border-top: 1px solid rgba(201,211,230,.12); }
.made-by img { width: 22px; height: 22px; }
.made-by b { color: #fff; font-weight: 600; }
.made-by a { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: #A9C1FF; font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(169,193,255,.35); }
.made-by a:hover, .made-by a:focus-visible { background: rgba(169,193,255,.12); color: #fff; }
.made-by a .ic { width: 14px; height: 14px; }
.auth-side > .brand { position: relative; z-index: 1; }
@media (max-width: 1280px) { .promises { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .auth-side { padding: 28px 20px 24px; }
  .auth-side .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "word" "h1" "lede"; margin-top: 28px; }
  .hero-art { display: none; }
  .wordmark { font-size: 52px; }
  .auth-side .hero h1 { font-size: 22px; margin-top: 18px; }
  .made-by a { margin-left: 0; }
  .auth-main { order: -1; min-height: auto; padding-top: 72px; }
  .auth-side .hero-lede { font-size: 15px; }
}

/* console storage: options and setup steps */
.store-option { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--surface-2); }
.store-option + .store-option { margin-top: 14px; }
.store-option.recommended { border-color: color-mix(in srgb, var(--good, #16794A) 45%, var(--line)); }
.so-head { display: flex; gap: 12px; align-items: flex-start; }
.so-head > .ic { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.so-head b { margin-right: 8px; }
.store-option details { margin-top: 10px; }
.store-option summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.steps-list { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.5; }
.steps-list a .ic { width: 13px; height: 13px; vertical-align: -1px; }
.steps-list code { word-break: break-all; }
.prereq { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; font-size: 14px; }
.prereq li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.prereq li.ok > .ic { color: var(--good, #16794A); }
.prereq li.todo > .ic { color: var(--warn, #B45309); }
.prereq .btn { margin-top: 6px; }
.kind.off { opacity: .6; }
.app-steps .steps-list { margin: 0; }

/* ---------- immigration news ---------- */
.news-high { margin-bottom: 20px; }
.nh-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.nh-head h2 { font-size: 18px; display: inline-flex; align-items: center; gap: 8px; }
.nh-head h2 .ic { color: var(--bad, #B42318); }
.nh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.nh-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--bad, #B42318); text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.nh-card:hover, .nh-card:focus-visible { border-color: var(--line-strong); border-left-color: var(--bad, #B42318); box-shadow: 0 6px 18px rgba(16,24,40,.08); }
.nh-title { font-size: 15.5px; line-height: 1.35; }
.nh-what { font-size: 13.5px; line-height: 1.45; color: var(--ink); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.nh-what span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.nm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agency { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 6px; background: #E6ECFA; color: #1E3A8A; }
.agency.a-ircc { background: #E6ECFA; color: #1E3A8A; }
.agency.a-cbsa { background: #E7F3EE; color: #14532D; }
.agency.a-irb { background: #F3E8FF; color: #5B21B6; }
.agency.a-esdc { background: #FEF3C7; color: #78350F; }
.agency.a-ontario, .agency.a-alberta, .agency.a-britishcolumbia, .agency.a-manitoba, .agency.a-novascotia { background: #E0F2FE; color: #075985; }
.impact { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.impact.high { background: #FEE4E2; color: #B42318; }
.impact.notable { background: #FEF0C7; color: #93370D; }
.news-list.pro li { border-left: 3px solid transparent; }
.news-list.pro li.imp-high { border-left-color: var(--bad, #B42318); }
.news-list.pro li.imp-notable { border-left-color: #F79009; }
.news-list.pro .news-meta { gap: 8px; }
.news-what { display: block; font-size: 14px; line-height: 1.5; margin-top: 6px; }
.news-what b { color: var(--muted); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.news-filters { padding: 16px; margin-bottom: 20px; }
.nf-row { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(140px, 1fr)); gap: 12px; align-items: end; }
.nf-row .field { margin: 0; }
.nf-row.end { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.input-icon { position: relative; display: block; }
.input-icon > .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 36px; width: 100%; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; border-top: 1px solid var(--line); }
.ee-table td, .ee-table th { padding-top: 10px; padding-bottom: 10px; }
.ee-table .ee-prog { display: block; white-space: normal; max-width: none; overflow: visible; text-overflow: clip; font-size: 12.5px; margin-top: 2px; }
.ee-table td a { text-decoration: none; font-weight: 600; }
.ee-table { table-layout: auto; }
.src-list li { align-items: flex-start; }
.src-list .dot { margin-top: 7px; }
.dot.good { background: var(--good, #16794A); }
.dot.bad { background: var(--bad, #B42318); }
.src-list .sub { display: block; }
@media (max-width: 1100px) { .nf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nf-q { grid-column: 1 / -1; } }
@media (max-width: 600px) { .nf-row { grid-template-columns: minmax(0, 1fr); } }
:root[data-theme="dark"] .agency, :root[data-theme="dark"] .impact { filter: saturate(.9) brightness(.95); }

/* console: disk space */
.space-list dt.cl, .space-list dd.cl { color: var(--accent); }
.space-list dt.cl::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 2px; }
.space-form { display: grid; gap: 10px; margin-top: 12px; }
.space-form .field { margin: 0; }
progress.bar.warn::-webkit-progress-value { background: #F79009; }
progress.bar.bad::-webkit-progress-value { background: var(--bad, #B42318); }
progress.bar.warn::-moz-progress-bar { background: #F79009; }
progress.bar.bad::-moz-progress-bar { background: var(--bad, #B42318); }

/* ---------- console: Server maintenance ---------- */
.maint-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.maint-nav a { font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.maint-nav a:hover, .maint-nav a:focus-visible { border-color: var(--accent); color: var(--accent); }
.maint { align-items: start; }
.maint .span-2 { grid-column: 1 / -1; }
.health-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ht { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.ht span { font-size: 12px; color: var(--muted); font-weight: 600; }
.ht b { font-size: 22px; line-height: 1.1; }
.ht em { font-style: normal; font-size: 12px; color: var(--muted); }
.ht.warn { border-color: #F79009; } .ht.bad { border-color: var(--bad, #B42318); }
.sec-list li { gap: 12px; align-items: flex-start; }
.sec-list .sub { display: block; margin-top: 2px; }
.sec-list .dot, .list .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.dot.warn { background: #F79009; }
.banned { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ban { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 4px 3px 8px; }
.seg { display: inline-flex; gap: 0; }
.seg .btn { border-radius: 0; margin-left: -1px; }
.seg .btn:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.seg .btn:last-child { border-radius: 0 8px 8px 0; }
.trunc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions.end { justify-content: flex-end; }
.acct-table td { vertical-align: middle; }
.acct-more { position: relative; display: inline-block; }
.acct-more summary { list-style: none; cursor: pointer; }
.acct-more summary::-webkit-details-marker { display: none; }
.acct-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 320px; text-align: left; background: var(--surface); border: 1px solid var(--line-strong, var(--line)); border-radius: 12px; padding: 14px; box-shadow: 0 12px 32px rgba(16,24,40,.18); }
.stack-sm { display: grid; gap: 6px; }
.stack-sm textarea, .stack-sm input { width: 100%; }
.acct-add { padding: 16px; border-top: 1px solid var(--line); align-items: end; }
.acct-note { padding: 0 16px 16px; }
.narrow { max-width: 620px; }
.secret-box { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line-strong, var(--line)); margin-top: 10px; }
.secret-box code { font-size: 20px; letter-spacing: .04em; user-select: all; }
@media (max-width: 900px) { .health-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .acct-pop { right: auto; left: 0; width: min(320px, 86vw); } }

/* console: activity */
.act-filters { padding: 16px; margin-bottom: 16px; }
.af-row { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(5, minmax(120px, 1fr)); gap: 12px; align-items: end; }
.af-row .field { margin: 0; }
.af-row.end { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.act-table td { vertical-align: top; }
.act-table .block { display: block; }
.act-table .pill { margin-top: 4px; }
.act-table td:nth-child(4) { min-width: 200px; }
.act-table td:first-child { white-space: nowrap; }
@media (max-width: 1100px) { .af-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .af-q { grid-column: 1 / -1; } }

/* 1.19.0: conditional access */
.ca-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ca-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.ca-stat b { font-size: 22px; font-variant-numeric: tabular-nums; }
.ca-stat span { font-size: 13px; color: var(--muted); }
.ca-stat.me b { font-size: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
a.ca-stat:hover { border-color: var(--accent); }
.ca-table td { vertical-align: top; }
.ca-table td:nth-child(2), .ca-table td:nth-child(3) { min-width: 160px; }
.seg button { padding: 6px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg button.on.good { color: var(--good); }
.seg button.on.warn { color: var(--warn); }
.seg-form { margin: 0; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tpl { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--surface); }
.tpl:hover { border-color: var(--accent); }
.tpl span { font-size: 13px; color: var(--muted); flex: 1; }
.tpl em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--accent); }
.chips-check { display: flex; flex-wrap: wrap; gap: 8px; }
.chipcheck { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--surface); }
.chipcheck input { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; }
.chipcheck:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.radio-list { display: grid; gap: 4px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
fieldset.field legend { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; padding: 0; }
.stepno { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; margin-right: 8px; vertical-align: 2px; }
.num-inline { width: 64px !important; display: inline-block; padding: 4px 6px !important; margin: 0 4px; }
.inline-edit { display: inline-block; }
.inline-edit[open] { display: block; min-width: 260px; }
.sub.block, .block { display: block; }
.checkrow > span > .sub.block { margin-top: 2px; font-weight: 400; }
/* 1.19.0: server terminal */
.term-panel { padding: 10px; background: #0B1530; border-color: #0B1530; }
.term-box { height: min(68vh, 640px); }
.term-rec { background: #0B1530; color: #E6EBF5; padding: 14px; border-radius: 10px; max-height: 70vh; overflow: auto; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
.term-set { display: grid; gap: 4px; margin-bottom: 4px; }
.term-set .btn { justify-self: start; margin-top: 8px; }
.term-active { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg, rgba(240,180,0,.12)); }
.firm-tabs { margin: 4px 0 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
[data-tab][hidden] { display: none !important; }

/* 1.19.0: sign-in pages, Synova Bright's features orbiting the client file */
.orbit { position: relative; width: 100%; max-width: 640px; height: 296px; margin: 0 auto; perspective: 1600px; filter: none; }
.orbit-plane { position: absolute; left: 50%; top: 64%; width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(68deg); }
.orbit-disc { position: absolute; left: -265px; top: -265px; width: 530px; height: 530px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(127,160,255,.30), rgba(79,123,255,.12) 55%, rgba(79,123,255,0) 72%), radial-gradient(closest-side, rgba(94,234,212,.18), transparent 60%);
  box-shadow: inset 0 0 0 1px rgba(127,160,255,.18); }
.orbit-path { position: absolute; left: -215px; top: -215px; width: 430px; height: 430px; border-radius: 50%; border: 1.5px dashed rgba(159,179,221,.35); }
.orbit-ring { position: absolute; left: 0; top: 0; transform-style: preserve-3d; animation: orbit-spin 80s linear infinite; }
.orbit-slot { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.orbit-slot.o1 { transform: rotateZ(0.0deg) translateX(215px) rotateZ(-0.0deg); }
.orbit-slot.o2 { transform: rotateZ(51.43deg) translateX(215px) rotateZ(-51.43deg); }
.orbit-slot.o3 { transform: rotateZ(102.86deg) translateX(215px) rotateZ(-102.86deg); }
.orbit-slot.o4 { transform: rotateZ(154.29deg) translateX(215px) rotateZ(-154.29deg); }
.orbit-slot.o5 { transform: rotateZ(205.71deg) translateX(215px) rotateZ(-205.71deg); }
.orbit-slot.o6 { transform: rotateZ(257.14deg) translateX(215px) rotateZ(-257.14deg); }
.orbit-slot.o7 { transform: rotateZ(308.57deg) translateX(215px) rotateZ(-308.57deg); }
.orbit-spin { transform-style: preserve-3d; animation: orbit-spin-back 80s linear infinite; }
.orbit-card { position: absolute; left: -60px; top: -62px; width: 120px; transform-origin: 50% 100%; transform: rotateX(-68deg);
  display: grid; grid-template-columns: 20px 1fr; column-gap: 7px; align-items: center; padding: 8px 9px; border-radius: 11px;
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(236,242,255,.94)); color: #0B1530; box-shadow: 0 14px 30px rgba(2,8,30,.45), 0 0 0 1px rgba(255,255,255,.6) inset; backface-visibility: hidden; }
.oc-ic { width: 20px; height: 20px; border-radius: 7px; display: grid; place-items: center; background: #E3EBFF; color: #2446B8; }
.oc-ic .ic { width: 12px; height: 12px; }
.oc-t { font-size: 11px; font-weight: 700; line-height: 1.15; }
.oc-d { grid-column: 1 / -1; font-size: 9.5px; color: #55607A; line-height: 1.25; margin-top: 3px; }
.oc-x { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 5px; min-height: 14px; }
.oc-chip { font-size: 9.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: #EEF2FA; color: #34405C; }
.oc-chip.ok { background: #D7F7EE; color: #0D7A63; }
.oc-chip.warn { background: #FFF1D6; color: #9A5B00; }
.oc-amt { font-size: 12.5px; font-weight: 800; color: #2446B8; font-variant-numeric: tabular-nums; }
.oc-small { font-size: 9.5px; color: #55607A; }
.oc-bar { flex: 1 1 100%; height: 5px; border-radius: 3px; background: #E2E8F5; overflow: hidden; }
.oc-bar i { display: block; height: 100%; width: 66%; background: #4F7BFF; border-radius: 3px; }
.oc-bar.g i { width: 80%; background: linear-gradient(90deg, #22B8A6, #5EEAD4); }
.oc-dots { display: inline-flex; gap: 4px; }
.oc-dots i { width: 6px; height: 6px; border-radius: 50%; background: #F59E0B; animation: oc-pulse 1.6s ease-in-out infinite; }
.oc-dots i:nth-child(2) { animation-delay: .2s; } .oc-dots i:nth-child(3) { animation-delay: .4s; }
.oc-assist .oc-ic { background: #FFF3D1; color: #B45309; }
.oc-trust .oc-ic, .oc-docs .oc-ic { background: #D7F7EE; color: #0D7A63; }
.orbit-center { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.orbit-folder { position: absolute; left: -82px; top: -166px; width: 164px; transform-origin: 50% 100%; transform: rotateX(-68deg); text-align: center; filter: drop-shadow(0 22px 34px rgba(0,0,0,.45)); }
.orbit-folder svg { width: 100%; height: auto; display: block; }
.orbit-label { display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 600; color: #BFD0F5; background: rgba(15,26,51,.7); border: 1px solid rgba(127,160,255,.3); padding: 3px 10px; border-radius: 999px; }
.orbit:hover .orbit-ring, .orbit:hover .orbit-spin { animation-play-state: paused; }
@keyframes orbit-spin { to { transform: rotateZ(360deg); } }
@keyframes orbit-spin-back { to { transform: rotateZ(-360deg); } }
@keyframes oc-pulse { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .orbit-ring, .orbit-spin, .oc-dots i { animation: none; } }
.hero-art { container-type: inline-size; }
@container (max-width: 600px) { .orbit-plane { scale: .88; } }
@container (max-width: 520px) { .orbit-plane { scale: .76; } }
.nav-badge { margin-left: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn, #F59E0B); color: #1a1200; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.panel.waiting { border-color: color-mix(in srgb, var(--warn, #F59E0B) 55%, var(--line)); }
/* Start Autopilot */
.seg-choice { display: flex; gap: 18px; flex-wrap: wrap; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.type-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); font-weight: 600; font-size: 14px; }
.type-card input { accent-color: var(--accent); }
.type-card:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
[data-show-when][hidden] { display: none !important; }
.jump-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.jump-links a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--ink); background: var(--surface); }
.jump-links a:hover { border-color: var(--accent); }
/* 1.21: tasks, notes timeline, timer */
.case-practice { margin-top: 18px; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 11px 18px; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task form { margin: 0; }
.task-check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-strong, #9aa6bf); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; color: #fff; margin-top: 1px; }
.task-check:hover { border-color: var(--accent); }
.task.done .task-check { background: var(--good, #16a34a); border-color: var(--good, #16a34a); }
.task-check .ic { width: 14px; height: 14px; }
.task.done .task-body b { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.task-due { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.task-due.bad, .task.late .task-due { color: var(--bad, #dc2626); font-weight: 600; }
.task-add { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; border-top: 1px solid var(--line); }
.timeline { list-style: none; margin: 0; padding: 0 18px 12px; }
.tl-item { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.tl-item.pinned { background: color-mix(in srgb, var(--accent) 5%, transparent); margin: 0 -18px; padding: 12px 18px; }
.tl-kind { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); padding-top: 2px; }
.tl-text { white-space: pre-wrap; }
.tl-actions { display: flex; gap: 4px; }
.timer-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.18); animation: oc-pulse 1.6s ease-in-out infinite; flex: none; }
.timer-on { border-color: color-mix(in srgb, #ef4444 45%, var(--line)); }
.timer-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.num-short { width: 80px !important; }
.letter-make { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.letter-make select { min-width: 220px; flex: 1; }
.tabs .count.bad { background: var(--bad, #dc2626); color: #fff; }
@media (max-width: 720px) { .task-add { grid-template-columns: 1fr 1fr; } .tl-item { grid-template-columns: 1fr; } }

/* ---------- Synova Assist workspace (1.22): conversations · chat · client context, on glass */
.aw { position: relative; display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 16px; height: calc(100vh - 120px); min-height: 560px; isolation: isolate; }
.aw::before { content: ""; position: absolute; inset: -28px -32px; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 50% at 15% 10%, color-mix(in srgb, #3f80f3 16%, transparent), transparent 70%),
              radial-gradient(35% 45% at 90% 85%, color-mix(in srgb, #6b4fd8 14%, transparent), transparent 70%),
              radial-gradient(30% 40% at 70% 5%, color-mix(in srgb, #22b8cf 10%, transparent), transparent 70%); }
.glass { background: color-mix(in srgb, var(--surface) 72%, transparent); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border-radius: 18px;
  box-shadow: 0 1px 0 color-mix(in srgb, #fff 40%, transparent) inset, 0 12px 32px rgba(15, 23, 42, .07); }
.aw-label { font: 600 11.5px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 4px 8px; }
.aw-rail { display: flex; flex-direction: column; padding: 14px; overflow: hidden; }
.aw-rail .btn.block { width: 100%; justify-content: center; }
.aw-none { padding: 0 4px; }
.aw-threads { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.aw-threads li { position: relative; border-radius: 10px; }
.aw-threads li a { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; padding-right: 58px; text-decoration: none; color: var(--ink); border-radius: 10px; }
.aw-threads li:hover, .aw-threads li.on { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.aw-threads li.on a { box-shadow: inset 3px 0 0 var(--accent); }
.aw-t-title { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 5px; align-items: center; }
.aw-threads .sub { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-star { width: 14px; height: 14px; color: #E0A100; fill: currentColor; flex: none; }
.aw-t-tools { position: absolute; right: 6px; top: 8px; display: none; gap: 2px; }
.aw-threads li:hover .aw-t-tools, .aw-threads li:focus-within .aw-t-tools { display: flex; }
.aw-t-tools form { margin: 0; }
.icon-btn { border: 0; background: transparent; color: var(--muted); width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.icon-btn .ic { width: 17px; height: 17px; }
.aw-main { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.aw-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.aw-head h1 { font-size: 17px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-head .sub { margin: 2px 0 0; font-size: 12.5px; }
.aw-head .grow { min-width: 0; }
.aw-engine { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); white-space: nowrap; }
.aw-engine .dot { width: 7px; height: 7px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 3px color-mix(in srgb, #22a06b 20%, transparent); }
.aw-log { padding: 22px 24px; }
.aw .msg.bot .bubble { background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.aw-cards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; max-width: min(760px, 92%); }
.aw-card { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; text-decoration: none; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--link); transition: transform .15s, border-color .15s, box-shadow .15s; }
.aw-card:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: 0 6px 16px rgba(36, 70, 184, .12); }
.aw-card .ic { width: 16px; height: 16px; flex: none; }
.aw-card.src { color: var(--ink); }
.aw-card.src span { display: flex; flex-direction: column; gap: 1px; }
.aw-card.src small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.aw-card.src .ic { color: #0f7b6c; }
.aw-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-left: 2px; animation: rise 300ms ease both; }
.aw-next .sub { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.aw-next a.chip-btn { text-decoration: none; }
.aw-pin { border: 1px solid var(--line); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 3px 10px; font: 600 12px/1.4 var(--sans); cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.aw-pin .ic { width: 14px; height: 14px; }
.aw-pin:hover { border-color: var(--accent); color: var(--link); }
.aw-pinned { font-size: 12px; font-weight: 600; color: var(--good, #1a7f4b); text-decoration: none; }
.aw-compose { background: transparent; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.aw-attach { align-self: center; cursor: pointer; }
.aw-dropzone { position: absolute; inset: 70px 14px 80px; border: 2px dashed var(--accent); border-radius: 16px; display: grid; place-content: center; justify-items: center; gap: 10px;
  background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--link); z-index: 3; pointer-events: none; }
.aw-dropzone[hidden] { display: none; }
.aw-dropzone .ic { width: 34px; height: 34px; }
.aw-side { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.aw-panel { padding: 4px 16px 16px; }
.aw-panel .aw-label { margin-top: 14px; }
.aw-panel summary.aw-label { cursor: pointer; list-style: none; }
.aw-panel .facts { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin: 0 0 10px; font-size: 13px; }
.aw-panel .facts dt { color: var(--muted); } .aw-panel .facts dd { margin: 0; font-weight: 600; text-align: right; }
.aw-client { display: flex; gap: 10px; align-items: center; }
.aw-client .grow { min-width: 0; display: flex; flex-direction: column; }
.aw-client .sub { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-client form { margin: 0; }
.aw-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 10px; }
.aw-stats div { padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--surface-2) 80%, transparent); display: flex; flex-direction: column; }
.aw-stats b { font-size: 18px; } .aw-stats span { font-size: 11.5px; color: var(--muted); }
.aw-stats b.warn { color: var(--warn); } .aw-stats b.bad { color: var(--bad); } .aw-stats b.good { color: var(--good, #1a7f4b); }
.aw-nextdate { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 0 0 10px; }
.aw-nextdate > span { display: flex; flex-direction: column; }
.aw-nextdate .ic { color: var(--accent); flex: none; }
.aw-cases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.aw-cases a { display: flex; flex-direction: column; gap: 5px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); }
.aw-cases a:hover { border-color: var(--accent); }
.aw-cases .grow { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; }
.aw-cases .sub { font-size: 11.5px; }
.aw-bar { height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.aw-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #3f80f3, #6b4fd8); transition: width .6s ease; }
.aw-pick input[type=search] { width: 100%; }
.aw-found { list-style: none; margin: 6px 0 0; padding: 0; }
.aw-found button { width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; color: var(--ink); font: inherit; }
.aw-found button:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.aw-found .sub { font-size: 12px; }
@media (max-width: 1200px) { .aw { grid-template-columns: 220px minmax(0, 1fr); } .aw-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); overflow: visible; } }
@media (max-width: 820px) { .aw { grid-template-columns: 1fr; height: auto; } .aw-rail { max-height: 220px; } .aw-main { height: 78vh; } .aw::before { inset: -20px -16px; } }
@media (prefers-reduced-transparency: reduce) { .glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); } }
.chip-btn.act { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--link); font-weight: 600; }
.aw-portal { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 150px); max-width: 920px; margin: 0 auto; }
@media (max-width: 820px) { .aw-portal .aw-main { height: 80vh; } }
/* client portal: what is still needed, and where the file stands */
.need-box { border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); margin-bottom: 18px; }
.need-list { list-style: none; margin: 0; padding: 0 0 6px; }
.need-list li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.need-list .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.need-list .sub { font-size: 12.5px; }
.need-list .uploader { margin: 0; }
.need-list .uploader input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ask-banner .grow, .sign-banner .grow { flex: 1; }
.ask-banner .mod-ic { background: linear-gradient(135deg, #3f80f3, #6b4fd8); color: #fff; }
.stepper { list-style: none; display: flex; margin: 4px 20px 6px; padding: 0; counter-reset: s; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 12px; color: var(--muted); text-align: center; }
.stepper li::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 2px; background: var(--line-strong); }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.now::before { background: var(--accent); }
.stepper i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--sans); font-style: normal; background: var(--surface-2); border: 2px solid var(--line-strong); color: var(--muted); z-index: 1; }
.stepper i .ic { width: 15px; height: 15px; }
.stepper li.done i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.stepper li.now i { border-color: var(--accent); color: var(--link); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.stepper li.now span { color: var(--ink); font-weight: 600; }
.next-line { display: flex; gap: 8px; align-items: flex-start; margin: 6px 20px 12px; padding: 10px 12px; border-radius: 10px; background: var(--info-bg); font-size: 13.5px; }
.next-line .ic { flex: none; color: var(--link); width: 18px; height: 18px; margin-top: 1px; }
.need-list .stamp { flex: none; }
.upload-err { color: var(--bad); font-size: 12.5px; margin: 6px 0 0; max-width: 260px; }
/* Final check */
.fc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fc-bar form { margin: 0; }
.fc-last { font-size: 13px; font-weight: 600; text-decoration: none; padding: 4px 10px; border-radius: 999px; }
.fc-last.ready { background: var(--good-bg, #e7f6ee); color: var(--good, #1a7f4b); } .fc-last.check { background: var(--warn-bg, #fff4dc); color: var(--warn); } .fc-last.not_ready { background: var(--bad-bg); color: var(--bad); }
.fc-head { padding: 20px 24px; display: grid; gap: 10px; border-left: 5px solid var(--line-strong); }
.fc-head.good { border-left-color: var(--good, #1a7f4b); } .fc-head.warn { border-left-color: var(--warn); } .fc-head.bad { border-left-color: var(--bad); }
.fc-verdict { display: flex; flex-direction: column; gap: 2px; } .fc-verdict b { font-size: 22px; } .fc-verdict span { color: var(--ink-2); }
.fc-counts { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; } .fc-counts b { font-size: 18px; margin-right: 4px; }
.fc-counts .bad { color: var(--bad); } .fc-counts .warn { color: var(--warn); } .fc-counts .good { color: var(--good, #1a7f4b); }
.fc-head .sub { margin: 0; }
.fc-list { list-style: none; margin: 0; padding: 0; }
.fc-list li { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-top: 1px solid var(--line); font-size: 14px; }
.fc-ic { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.fc-list li.ok .fc-ic { background: var(--good-bg, #e7f6ee); color: var(--good, #1a7f4b); }
.fc-list li.warn .fc-ic { background: var(--warn-bg, #fff4dc); color: var(--warn); }
.fc-list li.fail .fc-ic { background: var(--bad-bg); color: var(--bad); }
.gh-new { padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); display: grid; gap: 6px; }
.gh-new > div { display: flex; flex-direction: column; gap: 2px; }
.gh-banner { margin-bottom: 16px; } .gh-banner .grow { flex: 1; display: flex; flex-direction: column; }

/* ---------- Notebooks (1.25): notebooks · coloured section tabs · pages · the page */
.c-blue { --nb: #3f6fe0; } .c-teal { --nb: #0f9488; } .c-green { --nb: #2f9e44; } .c-lime { --nb: #7aa619; } .c-amber { --nb: #d39b00; }
.c-orange { --nb: #e8710a; } .c-red { --nb: #d93a3a; } .c-pink { --nb: #d6408f; } .c-purple { --nb: #7b4fd6; } .c-slate { --nb: #64748b; }
.nb-top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.nb-top h1 { margin: 0; flex: 1; }
.nb-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); min-width: min(360px, 100%); }
.nb-search input { border: 0; background: transparent; padding: 9px 0; flex: 1; box-shadow: none; }
.nb-search .ic { color: var(--muted); }
.nb { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; min-height: calc(100vh - 170px); }
.nb-books { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 10px; align-self: start; position: sticky; top: 16px; }
.nb-books ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nb-books a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.nb-books a:hover, .nb-books li.on a { background: color-mix(in srgb, var(--nb, var(--accent)) 10%, transparent); }
.nb-books li.on a { box-shadow: inset 3px 0 0 var(--accent); }
.nb-books .grow { min-width: 0; display: flex; flex-direction: column; }
.nb-books b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-books .sub { font-size: 11.5px; }
.nb-spine { width: 30px; height: 36px; border-radius: 4px 7px 7px 4px; background: var(--nb); color: #fff; display: grid; place-items: center; flex: none; box-shadow: inset 4px 0 0 rgba(0, 0, 0, .18); }
.nb-spine .ic { width: 15px; height: 15px; }
.nb-new summary { list-style: none; cursor: pointer; justify-content: center; } .nb-new summary::-webkit-details-marker { display: none; }
.nb-new form { margin-top: 10px; }
.sw-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-pick { position: relative; cursor: pointer; }
.sw-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--nb); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); }
.sw.none { background: repeating-linear-gradient(45deg, var(--surface-2) 0 4px, var(--line) 4px 6px); }
.sw-pick input:checked + .sw { box-shadow: 0 0 0 2px var(--ink); }
.sw-pick input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.nb-main { display: flex; flex-direction: column; min-width: 0; }
.nb-bookhead { display: flex; align-items: center; gap: 10px; padding: 0 4px 10px; }
.nb-bookhead h2 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.nb-bookhead h2::before { content: ""; width: 12px; height: 22px; border-radius: 3px; background: var(--nb); }
.nb-bookhead .sub { font-size: 12.5px; }
.nb-menu { position: relative; }
.nb-menu > summary { list-style: none; cursor: pointer; } .nb-menu > summary::-webkit-details-marker { display: none; }
.nb-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 290px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: 0 16px 40px rgba(15, 23, 42, .16); display: grid; gap: 10px; }
.nb-pop.right, .nb-bookhead .nb-pop { left: auto; right: 0; }
.nb-pop.up { top: auto; bottom: calc(100% + 6px); }
.nb-pop .field { margin: 0; } .nb-pop fieldset { border: 0; padding: 0; margin: 0; } .nb-pop legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.nb-tabs { display: flex; align-items: flex-end; gap: 4px; padding: 0 6px; flex-wrap: wrap; }
.nb-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px 9px; border-radius: 10px 10px 0 0; font-weight: 600; font-size: 13.5px; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--nb, var(--muted)) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--nb, var(--line)) 30%, var(--line)); border-bottom: 0; position: relative; top: 1px; }
.nb-tab:hover { background: color-mix(in srgb, var(--nb) 26%, var(--surface)); }
.nb-tab.on { background: var(--surface); box-shadow: inset 0 3px 0 var(--nb); z-index: 2; padding-bottom: 10px; }
.nb-tab.add { background: transparent; border-style: dashed; color: var(--muted); padding: 7px 10px; cursor: pointer; }
.nb-tab .ic { width: 15px; height: 15px; }
.nb-tabmenu { margin-left: auto; align-self: center; }
.nb-body { flex: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--nb); border-radius: 0 12px 12px 12px; min-height: 560px; }
.nb-pages { border-right: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 8px; background: color-mix(in srgb, var(--nb) 4%, var(--surface)); border-radius: 0 0 0 12px; }
.nb-label { font-size: 12px; color: var(--muted); margin: 4px; }
.nb-pagelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.nb-pagelist a { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); border-left: 3px solid transparent; }
.nb-pagelist a:hover { background: var(--surface); }
.nb-pagelist li.on a { background: var(--surface); border-left-color: var(--nb); box-shadow: 0 1px 4px rgba(15, 23, 42, .08); }
.nb-pagelist b { font-size: 13.5px; display: flex; gap: 5px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-pagelist b .ic { width: 13px; height: 13px; color: var(--muted); flex: none; }
.nb-pagelist .sub { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-pagelist li[class*="pc-"] a { border-left-color: var(--pc); }
.pc-blue { --pc: #3f6fe0; } .pc-teal { --pc: #0f9488; } .pc-green { --pc: #2f9e44; } .pc-lime { --pc: #7aa619; } .pc-amber { --pc: #d39b00; } .pc-orange { --pc: #e8710a; } .pc-red { --pc: #d93a3a; } .pc-pink { --pc: #d6408f; } .pc-purple { --pc: #7b4fd6; } .pc-slate { --pc: #64748b; }
.nb-none { padding: 8px 10px; }
.dotc { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--nb); margin-right: 5px; vertical-align: 0; }
.nb-page { display: flex; flex-direction: column; min-width: 0; }
.nb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 8px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 5; border-radius: 0 12px 0 0; }
.nb-tools button { border: 0; background: transparent; color: var(--ink-2); min-width: 30px; height: 30px; padding: 0 7px; border-radius: 7px; font: 600 13px/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.nb-tools button:hover { background: var(--surface-2); color: var(--ink); }
.nb-tools button .ic { width: 15px; height: 15px; }
.nb-tools .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.nb-tools .hl { width: 22px; min-width: 22px; height: 22px; border-radius: 50%; padding: 0; border: 1px solid var(--line-strong); }
.nb-saved { font-size: 12px; color: var(--muted); } .nb-saved.bad { color: var(--bad); font-weight: 600; }
.nb-sheet { padding: 24px 36px 30px; flex: 1;
  background-image: linear-gradient(transparent calc(100% - 1px), color-mix(in srgb, var(--nb) 8%, transparent) 1px); background-size: 100% 28px; background-position: 0 92px; }
.nb-title { font: 700 26px/1.25 var(--serif, var(--sans)); border: 0; border-bottom: 1px solid transparent; background: transparent; width: 100%; padding: 2px 0; box-shadow: none; color: var(--ink); }
.nb-title:focus { border-bottom-color: var(--nb); outline: none; }
.nb-meta { margin: 4px 0 14px; font-size: 12px; }
.nb-editor { min-height: 380px; outline: none; font-size: 15px; line-height: 1.75; color: var(--ink); }
.nb-editor:empty::before { content: "Start writing…"; color: var(--muted); }
.nb-editor h2 { font-size: 21px; margin: 14px 0 4px; } .nb-editor h3 { font-size: 17px; margin: 12px 0 4px; color: color-mix(in srgb, var(--nb) 70%, var(--ink)); }
.nb-editor p { margin: 0 0 6px; } .nb-editor ul, .nb-editor ol { margin: 4px 0 8px; padding-left: 24px; }
.nb-editor blockquote { margin: 8px 0; padding: 6px 14px; border-left: 3px solid var(--nb); background: color-mix(in srgb, var(--nb) 6%, transparent); border-radius: 0 8px 8px 0; }
.nb-editor a { color: var(--link); }
.nb-editor ul.todo { list-style: none; padding-left: 4px; }
.nb-editor ul.todo > li { position: relative; padding-left: 28px; cursor: text; }
.nb-editor ul.todo > li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 16px; height: 16px; border: 2px solid var(--line-strong); border-radius: 4px; background: var(--surface); cursor: pointer; }
.nb-editor ul.todo > li[data-done]::before { background: var(--nb); border-color: var(--nb); }
.nb-editor ul.todo > li[data-done]::after { content: "✓"; position: absolute; left: 5px; top: 1px; color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; }
.nb-editor ul.todo > li[data-done] { color: var(--muted); text-decoration: line-through; }
mark.hl-yellow, .hl.hl-yellow { background: #fff1a8; } mark.hl-green, .hl.hl-green { background: #c9f2d0; } mark.hl-pink, .hl.hl-pink { background: #ffd1e6; }
mark.hl-blue, .hl.hl-blue { background: #cfe3ff; } mark.hl-orange, .hl.hl-orange { background: #ffdcb8; }
.nb-editor mark { color: #1b2433; border-radius: 3px; padding: 0 2px; }
.nb-foot { border-top: 1px solid var(--line); padding: 10px 14px; display: grid; gap: 8px; }
.nb-reminders { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.nb-reminders b { display: inline-flex; gap: 5px; align-items: center; } .nb-reminders .ic { width: 15px; height: 15px; }
.nb-reminders a.pill { text-decoration: none; }
.nb-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nb-actions form { margin: 0; }
.btn.danger { color: var(--bad); }
@media (max-width: 1100px) { .nb { grid-template-columns: 1fr; } .nb-books { position: static; } .nb-books ul { flex-direction: row; overflow-x: auto; } .nb-books li { flex: none; } }
@media (max-width: 760px) { .nb-body { grid-template-columns: 1fr; } .nb-pages { border-right: 0; border-bottom: 1px solid var(--line); max-height: 220px; border-radius: 0; } .nb-sheet { padding: 16px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nb-editor mark { color: #1b2433; } }
/* the firm menu in groups (1.25) */
.nav-sec { margin: 1px 0; }
.nav-sec > summary { list-style: none; display: flex; gap: 11px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--nav-ink); font-weight: 600; cursor: pointer; user-select: none; }
.nav-sec > summary::-webkit-details-marker { display: none; }
.nav-sec > summary:hover { background: var(--nav-hover); color: var(--nav-ink-strong); }
.nav-sec > summary > span { flex: 1; }
.nav-sec > summary .nav-chev { width: 15px; height: 15px; opacity: .7; transition: transform .18s ease; }
.nav-sec[open] > summary .nav-chev { transform: rotate(90deg); }
.nav-sec[data-here] > summary { color: var(--nav-ink-strong); }
.nav-sub { margin: 2px 0 6px 21px; padding-left: 8px; border-left: 1px solid #2A3B63; display: flex; flex-direction: column; gap: 1px; }
.nav-sub a.item { padding: 7px 10px; font-size: 13.5px; }
.nav-sub a.item .ic { width: 16px; height: 16px; opacity: .85; }
@media (prefers-reduced-motion: reduce) { .nav-sec > summary .nav-chev { transition: none; } }
.today-panel .panel-head h2 { display: flex; gap: 8px; align-items: center; } .today-panel .panel-head h2 .ic { color: var(--accent); }
/* tasks as a project tracker (1.25): orange = due within 2 days, red = overdue, green = done */
:root { --tl-soon: #c25e00; --tl-soon-bg: #fff1e0; --tl-over: #c42b2b; --tl-over-bg: #fde8e8; --tl-done: #1a7f4b; --tl-done-bg: #e3f5ea; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tl-soon: #ffa94d; --tl-soon-bg: #3a2610; --tl-over: #ff8080; --tl-over-bg: #3d1717; --tl-done: #5fd38f; --tl-done-bg: #10301f; } }
:root[data-theme="dark"] { --tl-soon: #ffa94d; --tl-soon-bg: #3a2610; --tl-over: #ff8080; --tl-over-bg: #3d1717; --tl-done: #5fd38f; --tl-done-bg: #10301f; }
.tl-presets { flex-wrap: wrap; }
.tl-presets a.saved { display: inline-flex; gap: 5px; align-items: center; } .tl-presets a.saved .ic { width: 14px; height: 14px; color: #E0A100; }
.tl-filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 14px 16px; margin-bottom: 12px; }
.tl-filters .field { margin: 0; min-width: 130px; } .tl-filters .field.grow { flex: 1; min-width: 180px; }
.tl-filters label { font-size: 12px; }
.tl-fbtns { display: flex; gap: 6px; }
.tl-bar { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg a { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.seg a.on { background: var(--accent); color: var(--accent-ink, #fff); } .seg .ic { width: 15px; height: 15px; }
.tl-table td { vertical-align: top; }
.tl-table tr.tl-soon td:first-child { box-shadow: inset 4px 0 0 var(--tl-soon); }
.tl-table tr.tl-overdue td:first-child { box-shadow: inset 4px 0 0 var(--tl-over); }
.tl-table tr.tl-done td:first-child { box-shadow: inset 4px 0 0 var(--tl-done); }
.tl-table tr.tl-overdue { background: color-mix(in srgb, var(--tl-over-bg) 55%, transparent); }
.tl-table tr.tl-soon { background: color-mix(in srgb, var(--tl-soon-bg) 55%, transparent); }
.tl-table tr.tl-done .tl-title { color: var(--muted); text-decoration: line-through; }
.tl-title { font-weight: 600; color: var(--ink); text-decoration: none; } .tl-title:hover { color: var(--link); text-decoration: underline; }
.tl-who { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.tl-duecell { white-space: nowrap; }
.tl-flag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.tl-soon .tl-flag, .tl-flag.tl-soon { background: var(--tl-soon-bg); color: var(--tl-soon); }
.tl-overdue .tl-flag, .tl-flag.tl-overdue { background: var(--tl-over-bg); color: var(--tl-over); }
.tl-soon .tl-due { color: var(--tl-soon); font-weight: 700; } .tl-overdue .tl-due { color: var(--tl-over); font-weight: 700; }
.tl-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.tl-status.s-in_progress { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--link); }
.tl-status.s-done { background: var(--tl-done-bg); color: var(--tl-done); }
td.tl-actcell { white-space: nowrap; width: 1%; } .tl-acts { display: flex; gap: 6px; justify-content: flex-end; } .tl-acts form { margin: 0; }
.tl-table th:first-child { width: 42%; } .tl-table td:first-child { min-width: 220px; }
.tl-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.tl-col { background: var(--surface-2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.tl-col h2 { font-size: 14px; margin: 2px 4px 4px; display: flex; gap: 6px; align-items: center; }
.tl-col-done h2 { color: var(--tl-done); }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.tl-card.tl-soon { border-left-color: var(--tl-soon); } .tl-card.tl-overdue { border-left-color: var(--tl-over); } .tl-card.tl-done { border-left-color: var(--tl-done); }
.tl-card.tl-overdue { background: color-mix(in srgb, var(--tl-over-bg) 50%, var(--surface)); } .tl-card.tl-soon { background: color-mix(in srgb, var(--tl-soon-bg) 50%, var(--surface)); }
.tl-card.tl-done { background: color-mix(in srgb, var(--tl-done-bg) 45%, var(--surface)); }
.tl-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12.5px; }
.tl-meta .tl-due { display: inline-flex; gap: 4px; align-items: center; } .tl-meta .ic { width: 14px; height: 14px; }
.tl-people { display: flex; gap: 8px; align-items: center; } .tl-people .sub { font-size: 12px; }
.tl-donemeta { color: var(--tl-done); display: inline-flex; gap: 4px; align-items: center; } .tl-donemeta .ic { width: 14px; height: 14px; }
.tl-empty { padding: 8px; }
.tl-headline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 0; }
.tl-detail { border-left: 5px solid var(--line-strong); padding: 6px 4px; }
.tl-detail.tl-soon { border-left-color: var(--tl-soon); } .tl-detail.tl-overdue { border-left-color: var(--tl-over); } .tl-detail.tl-done { border-left-color: var(--tl-done); }
.tl-facts { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; padding: 16px 18px; margin: 0; }
.tl-facts dt { color: var(--muted); } .tl-facts dd { margin: 0; }
.tl-gooddd { color: var(--tl-done); font-weight: 600; }
.tl-notes { margin: 0 18px 16px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); white-space: pre-wrap; }
.tl-history { list-style: none; margin: 0; padding: 6px 18px 16px; }
.tl-history li { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.tl-history li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 24px; bottom: -6px; width: 2px; background: var(--line); }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); margin-top: 4px; flex: none; }
.tl-history .ev-done .tl-dot { background: var(--tl-done); } .tl-history .ev-started .tl-dot { background: var(--accent); }
.tl-history .ev-reassigned .tl-dot, .tl-history .ev-due .tl-dot { background: var(--tl-soon); }
/* the same colours in the dashboard and case task lists */
.task.late .task-due { color: var(--tl-over); font-weight: 700; }
@media (max-width: 900px) { .tl-board { grid-template-columns: 1fr; } .tl-table thead { display: none; } .tl-table tr { display: grid; gap: 4px; padding: 10px 0; } .tl-table td { border: 0; padding: 2px 12px; } .tl-acts { justify-content: flex-start; } .tl-table th:first-child { width: auto; } }
.tl-new { margin-bottom: 12px; } .tl-new > summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.tl-new > summary::-webkit-details-marker { display: none; } .tl-new > summary h2 { display: inline-flex; gap: 8px; align-items: center; }
.tl-newform { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; align-items: start; }
.tl-newform .field { margin: 0; } .tl-newform .grid.g-2 { margin: 0; } .tl-newform > p.sub { grid-column: 1 / -1; margin: 0; }
.tl-newform > .btn { justify-self: start; }
/* deadline calculator */
.dl-go { align-self: end; }
.dl-list { list-style: none; margin: 0; padding: 0; }
.dl-list li { border-top: 1px solid var(--line); padding: 12px 20px; }
.dl-list li.opt { background: var(--surface-2); }
.dl-list .checkrow { align-items: flex-start; gap: 12px; }
.dl-list .grow { flex: 1; }
.dl-date { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; } .dl-date b { font-size: 16px; }
.dl-moved { color: var(--tl-soon); }
/* client portal language picker */
.lang-pick { margin: 14px 4px 0; display: grid; gap: 6px; }
.lang-pick label { display: flex; gap: 8px; align-items: center; font-size: 12px; color: #9fb0d0; }
.lang-pick label .ic { width: 15px; height: 15px; }
.lang-pick select { background: var(--nav-hover); color: var(--nav-ink-strong); border: 1px solid #2A3B63; border-radius: 8px; padding: 7px 8px; font: inherit; }
/* phone scanner */
.scan-stage { padding: 0; overflow: hidden; }
.scan-stage canvas { display: block; width: 100%; touch-action: none; background: #101C3A; }
.scan-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; font: 600 13px/1.2 var(--sans); color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-ink, #fff); }
.scan-add { display: grid; gap: 10px; justify-items: start; }
.btn.lg { padding: 14px 20px; font-size: 16px; }
.scan-status { margin: 0; font-size: 14px; color: var(--ink-2); min-height: 1.4em; } .scan-status.bad { color: var(--bad); font-weight: 600; }
.scan-pages { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0 20px 8px; }
.scan-pages li { position: relative; width: 104px; }
.scan-pages img { width: 104px; height: 138px; object-fit: cover; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, .12); display: block; }
.scan-n { position: absolute; left: 6px; bottom: 6px; background: rgba(16, 28, 58, .8); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.scan-rm { position: absolute; right: -8px; top: -8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--bad); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.scan-btn { margin-left: 6px; }
.install-hint { display: flex; gap: 12px; align-items: center; }

/* ---------- 1.25: secure messages ---------- */
.sm-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.sm-list { padding: 0; overflow: hidden; }
.sm-find { display: grid; gap: 8px; padding: 14px; border-bottom: 1px solid var(--line); }
.sm-convs { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 330px); overflow: auto; }
.sm-convs a { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.sm-convs a:hover, .sm-convs a[aria-current] { background: var(--surface-2); }
.sm-convs a[aria-current] { box-shadow: inset 3px 0 0 var(--accent); }
.sm-snip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.sm-when { display: grid; justify-items: end; gap: 4px; }
.sm-thread { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.sm-msgs { display: flex; flex-direction: column; gap: 12px; padding: 18px; overflow: auto; min-height: 240px; max-height: calc(100vh - 420px); }
.sm-msg { display: flex; flex-direction: column; align-items: flex-start; }
.sm-msg.me { align-items: flex-end; }
.sm-bubble { max-width: min(640px, 88%); padding: 10px 14px; border-radius: 16px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.sm-msg.me .sm-bubble { background: var(--accent); color: var(--accent-ink); border-color: transparent; border-radius: 16px; border-bottom-right-radius: 5px; }
.sm-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sm-write { display: flex; gap: 10px; align-items: flex-end; padding: 14px; border-top: 1px solid var(--line); background: var(--surface); }
.sm-write textarea { flex: 1; resize: vertical; min-height: 54px; }
@media (max-width: 900px) { .sm-wrap { grid-template-columns: 1fr; } .sm-convs { max-height: 260px; } .sm-msgs { max-height: 60vh; } .sm-write { flex-direction: column; align-items: stretch; } }

/* ---------- 1.25: team reports ---------- */
.tr-filter { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 14px 18px; }
.tr-presets { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; align-self: center; }
.tr-bar { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.tr-bar meter, .tr-stages meter { width: 120px; height: 10px; }
.tr-warn { color: var(--tl-soon, #b45309); font-weight: 600; } .tr-bad { color: var(--bad); font-weight: 600; } .tr-good { color: var(--good, #15803d); font-weight: 600; }
.tr-total td { font-weight: 600; border-top: 2px solid var(--line-strong); }
.tr-stages { list-style: none; margin: 0; padding: 6px 0; }
.tr-stages a { display: flex; align-items: center; gap: 12px; padding: 10px 18px; color: inherit; text-decoration: none; }
.tr-stages a:hover { background: var(--surface-2); }
.tr-n { min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 1.25: leads ---------- */
.ld-share .panel-body { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.copy-row { display: flex; gap: 8px; margin-top: 8px; max-width: 620px; } .copy-row input { flex: 1; min-width: 0; }
.ld-add[open] { flex-basis: 100%; } .ld-add summary, .ld-pop summary { list-style: none; cursor: pointer; } .ld-add summary::-webkit-details-marker, .ld-pop summary::-webkit-details-marker { display: none; }
.ld-add form { margin-top: 14px; max-width: 620px; }
.ld-find { display: flex; gap: 8px; margin: 0 0 14px; max-width: 420px; }
.ld-board { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.ld-card { display: grid; gap: 5px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 12px; color: inherit; text-decoration: none; }
.ld-card:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(16, 28, 58, .08); }
.ld-col-retained .ld-card { border-left-color: var(--tl-done); } .ld-col-lost .ld-card { border-left-color: var(--line-strong); opacity: .8; } .ld-col-new .ld-card { border-left-color: var(--tl-soon); }
.ld-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .ld-none { margin: 4px; }
.ld-pill-new { background: color-mix(in srgb, var(--tl-soon) 16%, transparent); color: var(--tl-soon); } .ld-pill-retained { background: color-mix(in srgb, var(--tl-done) 16%, transparent); color: var(--tl-done); }
.ld-steps { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; align-items: flex-start; }
.ld-pop[open] { flex-basis: 100%; } .ld-pop form { margin-top: 12px; max-width: 520px; }
.btn.good { background: var(--tl-done); border-color: transparent; color: #fff; }
.ld-hist { list-style: none; margin: 0; padding: 6px 18px 14px; display: grid; gap: 10px; } .ld-hist li { border-left: 2px solid var(--line-strong); padding-left: 12px; }
.ld-del { margin-top: 10px; text-align: right; }
.page-head .crumbs { margin: 0 0 4px; font-size: 13px; } .page-head .crumbs a { color: var(--muted); }
.crs-score { font: 600 34px/1 var(--serif); color: var(--accent); }
.crs-h { display: flex; justify-content: space-between; font-size: 14px; margin: 14px 0 4px; }
.crs-lines { list-style: none; margin: 0; padding: 0; } .crs-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 14px; } .crs-lines b { font-variant-numeric: tabular-nums; }
.crs-form summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.crs-set { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; } .crs-set legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.crs-checks { display: grid; gap: 8px; margin-bottom: 12px; }

/* ---------- 1.25: public pages (enquiry, booking, signing) ---------- */
body.pub { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.pub-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px clamp(16px, 4vw, 40px); background: var(--surface); border-bottom: 1px solid var(--line); }
.pub-brand { display: flex; gap: 12px; align-items: center; font-size: 18px; font-family: var(--serif); } .pub-brand img { max-height: 36px; width: auto; }
.pub-lang { display: flex; gap: 4px; } .pub-lang a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: 14px; } .pub-lang a[aria-current] { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.pub-main { width: 100%; max-width: 760px; margin: 0 auto; padding: clamp(16px, 4vw, 40px) 16px; flex: 1; } .pub-main.wide { max-width: 1100px; }
.pub-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(18px, 4vw, 34px); box-shadow: 0 10px 40px rgba(16, 28, 58, .06); }
.pub-card h1 { margin-top: 0; } .pub-card.center { text-align: center; display: grid; justify-items: center; gap: 10px; }
.pub-tick { width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--tl-done) 16%, transparent); color: var(--tl-done); display: grid; place-items: center; } .pub-tick .ic { width: 32px; height: 32px; }
.pub-score { display: grid; gap: 4px; justify-items: center; padding: 16px 22px; border-radius: 14px; background: var(--surface-2); margin: 8px 0; } .pub-score b { font: 600 48px/1 var(--serif); color: var(--accent); }
.pub-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pub-more { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; } .pub-more summary { cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; } .pub-more[open] summary { margin-bottom: 12px; }
.pub-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 18px; }
.btn.lg { padding: 13px 22px; font-size: 16px; }

/* ---------- 1.25: online booking ---------- */
.bk-types { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.bk-types a { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; }
.bk-types a:hover { border-color: var(--accent); background: var(--surface-2); } .bk-types .ic { width: 16px; height: 16px; vertical-align: -3px; }
.bk-price { font-weight: 700; white-space: nowrap; }
.bk-days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; }
.bk-days a { flex: 0 0 auto; display: grid; justify-items: center; gap: 2px; min-width: 64px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; font-size: 13px; }
.bk-days a b { font-size: 20px; } .bk-days a[aria-current] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 12px; } .bk-times .btn { justify-content: center; }
.bk-sum { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); margin: 12px 0 18px; } .bk-sum > span:nth-child(2) { flex: 1; }
.bk-hours { border-collapse: collapse; margin-bottom: 6px; } .bk-hours td { padding: 4px 8px 4px 0; }
.bk-tlist { list-style: none; margin: 0; padding: 0; } .bk-tlist > li { border-top: 1px solid var(--line); padding: 12px 18px; }
.bk-tlist summary { display: flex; gap: 12px; align-items: center; cursor: pointer; list-style: none; } .bk-tlist summary::-webkit-details-marker { display: none; }
.bk-tform { margin: 14px 0 10px; } .bk-tform label { display: grid; gap: 4px; }
.bk-ans { max-width: 300px; }

/* ---------- 1.25: e-signature ---------- */
.es-docs { list-style: none; margin: 12px 0 0; padding: 0; } .es-docs li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.es-act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.es-new { max-width: 760px; }
.sg-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.sg-side { position: sticky; top: 16px; } .sg-note { padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.sg-pages { display: grid; gap: 12px; justify-items: center; background: var(--surface-2); border-radius: 12px; padding: 12px; max-height: 78vh; overflow: auto; margin: 12px 0; }
.pdf-page { max-width: 100%; height: auto; background: #fff; box-shadow: 0 2px 12px rgba(16, 28, 58, .14); }
.sg-pad { width: 100%; height: 150px; border: 2px dashed var(--line-strong); border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; }
.sg-modes { display: flex; gap: 6px; } .sg-modes [aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.sg-decline { margin-top: 14px; } .sg-decline summary { cursor: pointer; color: var(--muted); font-size: 14px; } .sg-decline form { margin-top: 10px; }
@media (max-width: 900px) { .sg-wrap { grid-template-columns: 1fr; } .sg-side { position: static; } .sg-pages { max-height: 55vh; } }

/* ---------- 1.25: PDF editor ---------- */
.pe { display: flex; flex-direction: column; height: calc(100vh - 120px); min-height: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pe-head { display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pe-title { display: grid; min-width: 160px; flex: 1 1 200px; } .pe-title .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pe-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-status { font-size: 13px; color: var(--muted); flex: 0 1 190px; min-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pe-status.bad { color: var(--bad); font-weight: 600; }
.pe-actions { display: flex; gap: 6px; align-items: center; } .pe-zoom { font-size: 13px; min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.pe-tools { display: flex; gap: 2px; align-items: stretch; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); overflow-x: auto; }
.pe-tool { display: grid; justify-items: center; gap: 2px; min-width: 58px; padding: 6px 6px 4px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--ink); font: inherit; font-size: 11px; cursor: pointer; white-space: nowrap; }
.pe-tool .ic { width: 18px; height: 18px; } .pe-tool:hover { background: var(--surface); border-color: var(--line); }
.pe-tool[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.pe-sep { width: 1px; background: var(--line-strong); margin: 4px 5px; flex: 0 0 auto; }
.pe-body { display: grid; grid-template-columns: 132px minmax(0, 1fr) 300px; flex: 1; min-height: 0; }
.pe-thumbs { border-right: 1px solid var(--line); overflow: auto; padding: 8px; background: var(--surface-2); }
.pe-thumb-actions { display: grid; gap: 6px; margin-bottom: 8px; }
.pe-thumbs ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pe-thumbs li { display: grid; grid-template-columns: auto 1fr; gap: 4px 6px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.pe-thumbs li.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.pe-thumb { border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #101c3a; font-weight: 700; padding: 10px 0; cursor: pointer; }
.pe-thumb-bar { grid-column: 1 / -1; display: flex; gap: 2px; justify-content: space-between; }
.pe-thumb-bar button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 5px; border-radius: 5px; font-size: 13px; } .pe-thumb-bar button:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); } .pe-thumb-bar button:disabled { opacity: .3; }
.pe-pages { overflow: auto; background: #5b6272; padding: 20px; display: grid; gap: 18px; justify-items: center; align-content: start; }
.pe-page { position: relative; background: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .35); flex: 0 0 auto; touch-action: none; }
.pe-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pe-layer { position: absolute; inset: 0; overflow: hidden; }
.pe-pages:not([data-tool="select"]) .pe-layer { cursor: crosshair; } .pe-pages[data-tool="text"] .pe-layer, .pe-pages[data-tool="retext"] .pe-layer { cursor: text; }
.pe-item { position: absolute; box-sizing: border-box; outline: none; }
.pe-pages[data-tool="select"] .pe-item { cursor: move; }
.pe-pages:not([data-tool="select"]) .pe-item { pointer-events: none; }
.pe-item.sel, .pe-item:focus-visible { outline: 1.5px dashed #2563eb; outline-offset: 2px; }
.pe-svg { inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; } .pe-pages[data-tool="select"] .pe-svg .pe-hit { pointer-events: stroke; cursor: move; } .pe-svg.sel { outline: none; } .pe-svg.sel polyline:nth-child(2) { filter: drop-shadow(0 0 2px #2563eb); }
.pe-text, .pe-retext, .pe-note { line-height: 1.2; white-space: pre-wrap; overflow-wrap: anywhere; overflow: hidden; }
.pe-text span:empty::before, .pe-note span:empty::before { content: 'Type in the panel on the right'; color: #9aa3b5; }
.pe-note { background: #fff5b8; border: 1px solid #d9b233; }
.pe-stamp { border-style: solid; display: grid; align-content: center; justify-items: center; line-height: 1.05; white-space: nowrap; overflow: hidden; border-radius: 3px; } .pe-stamp small { font-size: .45em; font-weight: 400; }
.pe-whiteout { background: #fff; } .pe-pages[data-tool="select"] .pe-whiteout { outline: 1px dotted #c0c6d4; }
.pe-redact { background: #000; } .pe-ellipse { border-radius: 50%; } .pe-highlight { mix-blend-mode: multiply; }
.pe-check svg, .pe-cross svg { width: 100%; height: 100%; display: block; } .pe-image, .pe-sign { object-fit: contain; user-select: none; }
.pe-handle { position: absolute; right: -6px; bottom: -6px; width: 11px; height: 11px; background: #fff; border: 2px solid #2563eb; border-radius: 50%; cursor: nwse-resize; z-index: 3; }
.pe-handle.float { right: auto; bottom: auto; transform: translate(-50%, -50%); }
.pe-side { border-left: 1px solid var(--line); overflow: auto; }
.pe-tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.pe-tabs button { flex: 1; border: 0; background: none; padding: 10px 4px; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; } .pe-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.pe-panel { padding: 14px; display: grid; gap: 10px; } .pe-panel h3 { margin: 8px 0 0; font-size: 14px; } .pe-panel .field { margin: 0; }
.pe-panel[hidden], #pe-props[hidden] { display: none; } #pe-props { display: grid; gap: 10px; }
.pe-toggles, .pe-row, .pe-colors { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .pe-toggles [aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pe-sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; }
.pe-sw-101c3a { background: #101c3a; } .pe-sw-000000 { background: #000; } .pe-sw-c62828 { background: #c62828; } .pe-sw-1565c0 { background: #1565c0; } .pe-sw-2e7d32 { background: #2e7d32; } .pe-sw-ffe45c { background: #ffe45c; } .pe-sw-ffa726 { background: #ffa726; } .pe-sw-8e24aa { background: #8e24aa; }
.pe-copies { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .pe-copies li { display: grid; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pe-dialog { border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: min(520px, 92vw); background: var(--surface); color: var(--ink); display: none; gap: 12px; } .pe-dialog[open] { display: grid; } .pe-dialog::backdrop { background: rgba(16, 28, 58, .5); } .pe-dialog h2 { margin: 0; }
@media (max-width: 1100px) { .pe-body { grid-template-columns: 96px minmax(0, 1fr); } .pe-side { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); max-height: 40vh; } .pe { height: auto; } .pe-pages { max-height: 70vh; } }

/* ---------- 1.25: PDF editor ---------- */
.pe { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pe-head { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); min-height: 54px; }
.pe-actions { flex: 0 0 auto; }
@media (max-width: 1000px) { .pe-head { flex-wrap: wrap; } }
.pe-title { display: grid; min-width: 160px; flex: 1 1 200px; } .pe-title .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pe-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-status { font-size: 13px; color: var(--muted); flex: 0 1 190px; min-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pe-status.bad { color: var(--bad); font-weight: 600; }
.pe-actions { display: flex; gap: 6px; align-items: center; } .pe-zoom { font-size: 13px; min-width: 44px; text-align: center; }
.pe-tools { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); overflow-x: auto; }
.pe-tool { display: grid; justify-items: center; gap: 2px; min-width: 58px; padding: 6px 6px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--ink); font: inherit; font-size: 11px; cursor: pointer; white-space: nowrap; }
.pe-tool .ic { width: 18px; height: 18px; } .pe-tool:hover { background: var(--surface); border-color: var(--line); }
.pe-tool[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.pe-sep { width: 1px; background: var(--line-strong); margin: 4px 4px; flex: 0 0 1px; }
.pe-body { display: grid; grid-template-columns: 150px minmax(0, 1fr) 300px; flex: 1; min-height: 0; }
.pe-thumbs { border-right: 1px solid var(--line); overflow: auto; padding: 10px; }
.pe-thumb-actions { display: grid; gap: 6px; margin-bottom: 10px; }
.pe-thumbs ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pe-thumbs li { display: grid; grid-template-columns: auto 1fr; gap: 4px 6px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 9px; }
.pe-thumbs li.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.pe-thumb { border: 1px solid var(--line); background: #fff; color: #101c3a; border-radius: 6px; height: 34px; font-weight: 600; cursor: pointer; }
.pe-thumb-bar { grid-column: 1 / -1; display: flex; gap: 3px; } .pe-thumb-bar button { flex: 1; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 2px 0; cursor: pointer; font-size: 13px; } .pe-thumb-bar button:disabled { opacity: .35; cursor: default; }
.pe-pages { overflow: auto; background: #5b6170; padding: 20px; display: grid; gap: 18px; justify-content: center; align-content: start; }
.pe-page { position: relative; background: #fff; box-shadow: 0 4px 22px rgba(0, 0, 0, .35); touch-action: none; }
.pe-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pe-layer { position: absolute; inset: 0; overflow: hidden; }
.pe-pages:not([data-tool="select"]) .pe-layer { cursor: crosshair; } .pe-pages[data-tool="text"] .pe-layer, .pe-pages[data-tool="retext"] .pe-layer { cursor: text; }
.pe-item { position: absolute; box-sizing: border-box; outline: none; }
.pe-pages[data-tool="select"] .pe-item { cursor: move; } .pe-pages:not([data-tool="select"]) .pe-item { pointer-events: none; }
.pe-item.sel, .pe-item:focus-visible { outline: 1.5px dashed #2563eb; outline-offset: 2px; }
.pe-svg { inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; } .pe-pages[data-tool="select"] .pe-svg .pe-hit { pointer-events: stroke; cursor: move; }
.pe-text, .pe-retext, .pe-note, .pe-stamp { line-height: 1.2; white-space: pre-wrap; overflow-wrap: anywhere; overflow: hidden; }
.pe-note { background: #fff5b8; border: 1px solid #d9b233; } .pe-whiteout { background: #fff; } .pe-pages[data-tool="select"] .pe-whiteout { box-shadow: inset 0 0 0 1px #cbd5e1; }
.pe-redact { background: #000; } .pe-ellipse { border-radius: 50%; }
.pe-stamp { border-style: solid; border-radius: 4px; display: flex; flex-direction: column; justify-content: center; align-items: center; letter-spacing: .04em; } .pe-stamp small { font-size: 45%; font-weight: 400; letter-spacing: 0; }
.pe-check svg, .pe-cross svg { width: 100%; height: 100%; display: block; }
.pe-handle { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; border-radius: 50%; background: #2563eb; border: 2px solid #fff; cursor: nwse-resize; z-index: 3; }
.pe-handle.float { right: auto; bottom: auto; transform: translate(-50%, -50%); }
.pe-side { border-left: 1px solid var(--line); overflow: auto; }
.pe-tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; } .pe-tabs button { flex: 1; border: 0; background: none; color: var(--muted); padding: 10px 4px; font: inherit; font-size: 13px; cursor: pointer; border-bottom: 2px solid transparent; }
.pe-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.pe-panel { padding: 14px; display: grid; gap: 10px; } .pe-panel h3 { margin: 8px 0 0; font-size: 14px; } .pe-panel .field { margin: 0; } .pe-panel [hidden] { display: none !important; }
.pe-row, .pe-toggles { display: flex; gap: 6px; flex-wrap: wrap; } .pe-toggles [aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pe-colors { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .pe-sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.pe-sw-101c3a { background: #101c3a; } .pe-sw-000000 { background: #000; } .pe-sw-c62828 { background: #c62828; } .pe-sw-1565c0 { background: #1565c0; } .pe-sw-2e7d32 { background: #2e7d32; } .pe-sw-ffe45c { background: #ffe45c; } .pe-sw-ffa726 { background: #ffa726; } .pe-sw-8e24aa { background: #8e24aa; }
.pe-copies { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pe-dialog { border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: min(520px, 92vw); background: var(--surface); color: var(--ink); display: none; gap: 12px; } .pe-dialog[open] { display: grid; } .pe-dialog::backdrop { background: rgba(10, 16, 32, .5); } .pe-dialog h2 { margin: 0; }
@media (max-width: 1000px) { .pe { height: auto; } .pe-body { grid-template-columns: 1fr; } .pe-thumbs { border-right: 0; border-bottom: 1px solid var(--line); max-height: 150px; } .pe-thumbs ol { grid-auto-flow: column; grid-auto-columns: 110px; } .pe-pages { max-height: 70vh; padding: 10px; } .pe-side { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- 1.25: console lock-down ---------- */
.lk-me { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; } .lk-me div { display: grid; gap: 2px; }

/* ---------- 1.26: letter and SOP writer ---------- */
.wr-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.wr-cols.draft { grid-template-columns: minmax(0, 1fr) 360px; } .wr-cols.draft > aside { position: sticky; top: 14px; display: grid; gap: 14px; } .wr-cols.draft > aside .panel { margin: 0; }
.wr-file { background: var(--surface-2); border-radius: 14px; padding: 16px; } .wr-file h3 { margin: 0 0 6px; font-size: 14px; } .wr-file h3 + .sub { margin-top: 0; }
.wr-file dl { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 13px; margin: 8px 0 16px; } .wr-file dt { color: var(--muted); text-transform: capitalize; } .wr-file dd { margin: 0; overflow-wrap: anywhere; }
.wr-tips { margin: 6px 0 0; padding-left: 18px; font-size: 13px; display: grid; gap: 6px; }
.wr-text { width: 100%; font: 15px/1.6 Georgia, "Times New Roman", serif; }
.wr-sec.has-fail { border-left: 4px solid var(--bad); } .wr-sec.has-warn { border-left: 4px solid var(--tl-soon); }
.wr-flag { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding-top: 6px; padding-bottom: 6px; } .wr-flag.fail { color: var(--bad); } .wr-flag.warn { color: var(--tl-soon); } .wr-flag .ic, .wr-err .ic { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }
.wr-again { border-top: 1px dashed var(--line); }
.wr-checks, .wr-src { list-style: none; margin: 0; padding: 4px 18px 10px; display: grid; gap: 10px; font-size: 14px; }
.wr-checks li { display: flex; gap: 8px; align-items: flex-start; } .wr-checks .ic { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }
.wr-checks li.fail { color: var(--bad); } .wr-checks li.warn { color: var(--tl-soon); } .wr-checks li.ok { color: var(--tl-done); } .wr-checks a { color: inherit; }
.wr-more { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1000px) { .wr-cols, .wr-cols.draft { grid-template-columns: 1fr; } .wr-cols.draft > aside { position: static; } }

/* ---------- 1.26: models and comparison (console) ---------- */
.am-table td { vertical-align: top; } .am-no td:not(:last-child) { opacity: .75; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
.cmp-col { padding: 16px 18px; min-width: 0; } .cmp-col + .cmp-col { border-left: 1px solid var(--line); }
.cmp-col h3 { margin: 0 0 4px; } .cmp-col h4 { margin: 14px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cmp-stats { margin: 0 0 8px; font-size: 14px; } .cmp-text { margin: 0; white-space: pre-wrap; font: 15px/1.6 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.cmp-checks { padding: 0 0 6px; font-size: 13px; }
@media (max-width: 900px) { .cmp-grid { grid-template-columns: 1fr; } .cmp-col + .cmp-col { border-left: 0; border-top: 1px solid var(--line); } }
.am-table td.es-act { display: table-cell; white-space: nowrap; } .am-table td.es-act form { display: inline-block; margin-left: 4px; }
.wr-again .field.grow input, .wr-pick .field.grow select { width: 100%; }
