/* ==========================================================================
   Design tokens. Light is the default; dark follows the OS unless the user
   picks a theme. Print always uses the light tokens.
   ========================================================================== */
:root {
  color-scheme: light;
  --bg: #F3F5F6;
  --bg-2: #EAEEF0;
  --surface: #FFFFFF;
  --surface-2: #F3F5F6;
  --ink: #12191C;
  --ink-2: #4A565B;
  --muted: #5A676D;
  --hair: rgba(18, 25, 28, 0.09);
  --hair-2: rgba(18, 25, 28, 0.16);
  --line: #D3DADD;
  --navy: #12191C;
  --accent: #0B6478;
  --accent-ink: #FFFFFF;
  --accent-soft: #E7F0F2;
  --series-1: #0B6478;
  --series-2: #28323A;
  --series-3: #8A8C8E;
  --series-4: #6B6AB8;
  --good: #0F845F;
  --watch: #EEB44B;
  --act: #DB3122;
  --good-text: #1F6F56;
  --good-bg: #DDEEE9;
  --watch-text: #85510F;
  --watch-bg: #FDF5E6;
  --bad-text: #A3282A;
  --bad-bg: #FAE2E0;
  --page1-bg: #E7F0F2;
  --page1-text: #0B6478;
  --page2-bg: #FDF5E6;
  --page2-text: #85510F;
  --glass: rgba(255, 255, 255, 0.78);
  --shadow-1: 0 1px 2px rgba(18, 25, 28, 0.04), 0 8px 24px rgba(18, 25, 28, 0.05);
  --shadow-2: 0 2px 6px rgba(18, 25, 28, 0.06), 0 16px 40px rgba(18, 25, 28, 0.1);
  --radius: 18px;
  --radius-s: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Instrument Sans", "Segoe UI", sans-serif;
  --sidebar-w: 248px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0A1114;
    --bg-2: #0E171B;
    --surface: #111A1E;
    --surface-2: #172328;
    --ink: #EEF3F5;
    --ink-2: #9AAAB0;
    --muted: #8A9AA0;
    --hair: rgba(238, 243, 245, 0.1);
    --hair-2: rgba(238, 243, 245, 0.18);
    --line: #26353B;
    --navy: #172328;
    --accent: #45B6CB;
    --accent-ink: #0A1114;
    --accent-soft: #19333A;
    --series-1: #45B6CB;
    --series-2: #E0E8F3;
    --series-3: #727272;
    --series-4: #6984D1;
    --good: #35A67D;
    --watch: #F8BE60;
    --act: #FA5A47;
    --good-text: #86DDB4;
    --good-bg: #162E2B;
    --watch-text: #FEB504;
    --watch-bg: #313127;
    --bad-text: #EF7B75;
    --bad-bg: #322324;
    --page1-bg: #19333A;
    --page1-text: #45B6CB;
    --page2-bg: #313127;
    --page2-text: #FEB504;
    --glass: rgba(17, 26, 30, 0.78);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A1114;
  --bg-2: #0E171B;
  --surface: #111A1E;
  --surface-2: #172328;
  --ink: #EEF3F5;
  --ink-2: #9AAAB0;
  --muted: #8A9AA0;
  --hair: rgba(238, 243, 245, 0.1);
  --hair-2: rgba(238, 243, 245, 0.18);
  --line: #26353B;
  --navy: #172328;
  --accent: #45B6CB;
  --accent-ink: #0A1114;
  --accent-soft: #19333A;
  --series-1: #45B6CB;
  --series-2: #E0E8F3;
  --series-3: #727272;
  --series-4: #6984D1;
  --good: #35A67D;
  --watch: #F8BE60;
  --act: #FA5A47;
  --good-text: #86DDB4;
  --good-bg: #162E2B;
  --watch-text: #FEB504;
  --watch-bg: #313127;
  --bad-text: #EF7B75;
  --bad-bg: #322324;
  --page1-bg: #19333A;
  --page1-text: #45B6CB;
  --page2-bg: #313127;
  --page2-text: #FEB504;
  --glass: rgba(17, 26, 30, 0.78);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Base
   ========================================================================== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 22px; }
h3 { font-size: 15px; margin-bottom: 12px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.hint { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }
.note { color: var(--ink-2); font-size: 13px; margin: -6px 0 14px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; color: var(--muted); margin: 0 0 4px; font-weight: 600; }
code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: 12px; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(11, 100, 120, 0.2); }

/* ==========================================================================
   Shell: sidebar + main
   ========================================================================== */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
#sidebar {
  position: sticky; top: 0; height: 100vh; overflow: auto;
  padding: 18px 14px; display: flex; flex-direction: column; gap: 18px;
  background: var(--glass); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-right: 1px solid var(--hair);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; padding: 4px 6px; }
.brand-logo { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 5px 9px; border-radius: 10px; background: #fff; border: 1px solid var(--hair); }
.brand-logo.dark { background: var(--navy); border-color: var(--navy); }
.brand-logo img { height: 24px; width: auto; max-width: 140px; }
.brand-logo.lg { height: 44px; padding: 8px 14px; border-radius: 12px; }
.brand-logo.lg img { height: 28px; max-width: 170px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--hair); border-radius: 999px; padding: 5px 12px 5px 9px; box-shadow: var(--shadow-1); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(15, 132, 95, 0.5); animation: pulse 2s infinite; }
.live b { font-weight: 600; color: var(--ink); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(15, 132, 95, 0.5); } 70% { box-shadow: 0 0 0 8px rgba(15, 132, 95, 0); } 100% { box-shadow: 0 0 0 0 rgba(15, 132, 95, 0); } }
body.print .live { display: none; }
/* Product mark (Deep Current "mono, accent core"): ink segments, petrol core; the inline SVG carries the light values as attributes. */
.catchment-mark { width: 22px; height: 22px; flex: none; display: inline-block; vertical-align: middle; }
:root { --cm-1: #12191C; --cm-2: #6C7072; --cm-3: #AAACAD; --cm-core: #0B6478; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cm-1: #EEF3F5; --cm-2: #9AA1A3; --cm-3: #61686B; --cm-core: #45B6CB; } }
:root[data-theme="dark"] { --cm-1: #EEF3F5; --cm-2: #9AA1A3; --cm-3: #61686B; --cm-core: #45B6CB; }
.catchment-mark .cm-1 { stroke: var(--cm-1); }
.catchment-mark .cm-2 { stroke: var(--cm-2); }
.catchment-mark .cm-3 { stroke: var(--cm-3); }
.catchment-mark .cm-core { fill: var(--cm-core); }
.side-made { display: flex; align-items: center; gap: 6px; padding: 6px 10px 2px; font-size: 12px; color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.side-made .side-ws { color: var(--muted); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/brand/fonts/outfit-latin.woff2") format("woff2"); }
.catchment-word { font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 900; letter-spacing: -0.02em; text-transform: lowercase; line-height: 1; }
.brand .catchment-word { font-size: 18px; }
.lockup { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 18px; color: var(--ink); }
.lockup .catchment-mark { width: 34px; height: 34px; }
.lockup .catchment-word { font-size: 28px; }
.brand-mark { width: 14px; height: 14px; border-radius: 4px; background: var(--ink-2); display: inline-block; }

.side-section { display: flex; flex-direction: column; gap: 4px; }
.side-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 0 10px; margin-bottom: 4px; }
.side-select { width: 100%; font: inherit; font-size: 14px; font-weight: 500; padding: 9px 34px 9px 12px; border: 1px solid var(--hair); border-radius: var(--radius-s); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--ink); appearance: none; -webkit-appearance: none; cursor: pointer; box-shadow: var(--shadow-1); }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 13.5px; background: none; border: none; width: 100%; text-align: left; cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.nav-item svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--accent); color: var(--accent-ink); }
.nav-item.active svg { opacity: 1; }
.nav-sub { padding-left: 10px; }
.nav-sub .nav-item { padding: 6px 10px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.nav-sub .nav-item svg { width: 10px; height: 10px; opacity: 0.6; }
.nav-sub .nav-item.active { background: transparent; color: var(--accent); font-weight: 600; }
.nav-sub .nav-item.active svg { opacity: 1; fill: currentColor; }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 12.5px; color: var(--ink-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; flex: none; }

.main { min-width: 0; }
#topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 28px;
  background: var(--glass); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--hair);
}
.tb-title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; display: flex; flex-direction: column; line-height: 1.2; }
.tb-title span { font-weight: 500; font-size: 12px; color: var(--muted); }
.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { font: inherit; font-size: 12.5px; font-weight: 500; padding: 6px 11px; border: none; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.field { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 500; }
.field select, .custom-range input { font: inherit; font-size: 13px; font-weight: 500; padding: 7px 30px 7px 11px; border: 1px solid var(--hair); border-radius: 10px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--ink); appearance: none; -webkit-appearance: none; cursor: pointer; }
.custom-range input { background-image: none; padding-right: 11px; }
.custom-range { display: inline-flex; align-items: center; gap: 6px; }
.custom-range .to { color: var(--muted); }
.actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.btn {
  font: inherit; font-weight: 600; font-size: 13px;
  padding: 8px 15px; border-radius: 10px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: filter 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--hair); box-shadow: var(--shadow-1); }
.btn.ghost:hover { filter: none; background: var(--surface-2); }
.btn.small { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.btn.danger { color: var(--bad-text); }
.btn.file-btn { cursor: pointer; }
.icon-btn { font: inherit; font-size: 18px; line-height: 1; background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: background 0.2s; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.menu { position: relative; }
.menu-list { display: none; position: absolute; right: 0; top: 110%; background: var(--surface); border: 1px solid var(--hair); border-radius: 12px; box-shadow: var(--shadow-2); min-width: 180px; padding: 4px; z-index: 30; }
.menu.open .menu-list { display: block; }
.menu-list button { display: block; width: 100%; text-align: left; font: inherit; background: none; border: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.menu-list button:hover { background: var(--surface-2); }
.menu-list button svg { width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.icon-only { padding: 0; width: 36px; height: 36px; justify-content: center; }
.btn.icon-only svg { margin: 0; }

/* ==========================================================================
   Report
   ========================================================================== */
#report { max-width: 1180px; margin: 0 auto; padding: 28px 28px 80px; }
.loading { text-align: center; padding: 80px 0; color: var(--muted); }
.spinner { width: 26px; height: 26px; border: 3px solid var(--hair-2); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 12px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
.reveal { animation: rise 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }

.report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.report-head h1 { font-size: 36px; letter-spacing: -0.03em; }
.report-head .fresh { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
body.print .report-head .fresh { display: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { font-size: 11.5px; font-weight: 500; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--hair); color: var(--ink-2); }
.chip.soft { background: var(--surface-2); border-color: transparent; }

section.page { margin-bottom: 40px; scroll-margin-top: 80px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--hair); }
.sec-head h2 { letter-spacing: -0.025em; }
.sec-sub { margin: 2px 0 0 16px; font-size: 13px; color: var(--muted); }
.source { font-size: 12px; color: var(--muted); }
.chip.src { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 500; transition: background 0.15s; }
.chip.src:hover { background: var(--surface-2); }
.chip.src i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.chip.src.ok i { background: var(--good); }
.chip.src.warn i { background: var(--watch); }
.chip.src.bad i { background: var(--bad-text); }
.src-notice { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-style: solid; }
.src-notice.warn { border-color: rgba(238, 180, 75, 0.7); }
.src-notice.bad { border-color: rgba(219, 49, 34, 0.5); }
.src-notice p { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; }
.src-notice b { color: var(--ink); }
.empty-state { text-align: center; padding: 48px 32px; max-width: 640px; margin: 24px auto; }
.empty-state .es-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--page1-bg); color: var(--accent); display: inline-grid; place-items: center; margin-bottom: 14px; }
.empty-state .es-icon svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h3 { font-size: 20px; }
.empty-state p { color: var(--ink-2); max-width: 480px; margin: 8px auto 18px; }
.empty-state .form-actions { justify-content: center; }
.customise-bar { display: none; align-items: center; justify-content: space-between; gap: 16px; background: var(--page1-bg); color: var(--page1-text); border-radius: var(--radius-s); padding: 10px 16px; margin: -8px 0 20px; font-size: 13px; }
.customise-bar b { color: inherit; }
body.customise .customise-bar { display: flex; }
.btn.ghost.active { background: var(--page1-bg); color: var(--page1-text); border-color: transparent; }
.glance-grid.few { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.glance-grid.few .tiles { display: contents; }
.glance-grid.few .hero-tile { min-height: 150px; }
.glance-grid.solo { grid-template-columns: minmax(240px, 420px); }

.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow-1); break-inside: avoid; transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease); }
.card.lift:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-2 .card, .two-col .card { margin-bottom: 0; }
.grid-2, .two-col { margin-bottom: 16px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius-s); padding: 14px 16px; break-inside: avoid; box-shadow: var(--shadow-1); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.t-label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.t-value { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.t-delta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vs { color: var(--muted); font-size: 11px; }
.delta { font-weight: 600; padding: 2px 7px; border-radius: 999px; font-size: 11.5px; }
.delta.good { color: var(--good-text); background: var(--good-bg); }
.delta.bad { color: var(--bad-text); background: var(--bad-bg); }
.delta.same, .delta.new { color: var(--ink-2); background: var(--surface-2); }

.glance-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; margin-bottom: 16px; }
/* Client colour: --brand is the client's own colour (hero tile, PDF cover); --brand-mark is that colour lifted to 3:1 on the card
   (section markers), set per theme by applyBrand as --bm-l / --bm-d. Without a client colour the frame stays ink. */
#report { --brand: #12191C; --brand-deep: #0A1114; --brand-ink: #ffffff; --brand-mark: var(--bm-l, var(--ink)); }
#report[data-client] { --ring-1: var(--rl1); --ring-2: var(--rl2); --ring-3: var(--rl3); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #report { --brand: #1E2C32; --brand-deep: #111A1E; --brand-mark: var(--bm-d, var(--ink)); }
  :root:not([data-theme="light"]) #report[data-client] { --ring-1: var(--rd1); --ring-2: var(--rd2); --ring-3: var(--rd3); }
}
:root[data-theme="dark"] #report { --brand: #1E2C32; --brand-deep: #111A1E; --brand-mark: var(--bm-d, var(--ink)); }
:root[data-theme="dark"] #report[data-client] { --ring-1: var(--rd1); --ring-2: var(--rd2); --ring-3: var(--rd3); }
:root body.print #report { --brand-mark: var(--bm-l, #12191C); }
:root body.print #report[data-client] { --ring-1: var(--rl1); --ring-2: var(--rl2); --ring-3: var(--rl3); }
.hero-tile { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%); color: var(--brand-ink); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow-2); }
.hero-tile::after { content: ''; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 65%); pointer-events: none; }
.hero-tile .t-label, .hero-tile .vs { color: var(--brand-ink); opacity: 0.75; }
.hero-value { font-size: 58px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.02; font-variant-numeric: tabular-nums; }
.hero-tile .hero-value { color: var(--brand-ink); }
.head-brand { display: flex; align-items: center; gap: 18px; }
.client-logo { display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--hair); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow-1); }
.client-logo img { height: 48px; width: auto; max-width: 180px; }
.sec-head { border-bottom-color: var(--hair); }
.sec-head h2::before { content: ''; display: inline-block; width: 6px; height: 18px; border-radius: 3px; background: var(--brand-mark); margin-right: 10px; vertical-align: -2px; }
.colour-row { display: flex; align-items: center; gap: 8px; }
.colour-row input[type=color] { width: 44px; height: 36px; padding: 2px; border-radius: 8px; border: 1px solid var(--hair-2); background: var(--surface); cursor: pointer; }
.colour-row input[name=brand_color] { width: 110px; }
.hero-tile .delta { background: rgba(127, 127, 127, 0.22); color: var(--brand-ink); }
.glance-grid .tiles { margin-bottom: 0; }
.rank-tiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

.card.metric .hero-value { font-size: 44px; color: var(--ink); }
.card.metric .t-label { margin-top: -2px; }
.card.metric .chart { margin-top: 10px; }

/* Charts */
.chart { width: 100%; }
.linechart { display: block; width: 100%; height: auto; overflow: visible; }
.linechart .grid { stroke: var(--hair); stroke-width: 1; }
.linechart .axis, .heatmap .axis { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.linechart .endlabel { font-size: 11.5px; font-weight: 600; fill: var(--ink-2); font-family: var(--font); }
.linechart .ring { fill: var(--surface); }
.linechart .crosshair { stroke: var(--hair-2); stroke-width: 1; }
.linechart .area { opacity: 0.1; }
.linechart .area.anim { animation: areain 0.9s var(--ease) 0.5s both; }
@keyframes areain { from { opacity: 0; } to { opacity: 0.1; } }
.linechart .line.anim { transition: stroke-dashoffset 1.2s var(--ease); }
.linechart .line.anim.drawn { stroke-dashoffset: 0 !important; }
.linechart .marker.anim, .linechart .endlabel.anim { animation: fadein 0.4s var(--ease) 1s both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.legend { display: flex; gap: 10px; font-size: 12px; color: var(--ink-2); margin-top: 8px; flex-wrap: wrap; align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend-item { font: inherit; background: var(--surface-2); border: none; border-radius: 999px; padding: 4px 10px; cursor: pointer; color: var(--ink-2); transition: opacity 0.2s, background 0.2s; }
.legend-item:hover { background: var(--hair); }
.legend-item.off { opacity: 0.45; text-decoration: line-through; }
.heat-legend { justify-content: flex-end; gap: 3px; }
.heat-legend i { width: 12px; height: 12px; margin: 0; }
.heat-legend span { margin: 0 4px; font-size: 11px; color: var(--muted); }
.heatmap { display: block; max-width: 100%; height: auto; }
.heatmap .cell { fill: var(--surface-2); }
.heatmap .cell.out { fill: transparent; }
.heatmap .cell.anim { animation: pop 0.35s var(--ease) both; transform-box: fill-box; transform-origin: center; }
.heatmap .cell:not(.out):hover { stroke: var(--ink); stroke-width: 1.5; }
.heatmap .dn { font-size: 11px; fill: var(--ink); opacity: 0.85; pointer-events: none; font-family: var(--font); font-variant-numeric: tabular-nums; }
.heatmap .dn.lt { fill: #fff; opacity: 0.95; }
.heatmap .dn.dk { fill: #12191C; opacity: 0.9; }
/* "Busy days" card head: caption plus the figure picker */
.busy-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin: -8px 0 10px; }
.busy-head .hint { margin: 0; }
.busy-name { display: none; }
.busy-pick { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.busy-pick select { font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--hair); border-radius: 999px; padding: 6px 10px; min-height: 36px; max-width: 260px; }
@media (max-width: 700px) { .busy-pick select { min-height: 44px; padding: 8px 12px; } }
body.print .busy-pick { display: none; }
body.print .busy-name { display: inline; }
/* Calendar heat map with its "By weekday" panel */
.hc { display: flex; gap: 24px; align-items: flex-start; }
.hc.stack { flex-direction: column; }
.hc-cal { flex: 0 1 auto; min-width: 0; }
.hc-side { flex: 1 1 180px; min-width: 170px; }
.hc.stack .hc-side { width: 100%; }
.hc-title { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 4px 0 8px; }
.hc-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 12.5px; margin: 0 0 5px; }
.hc-row .hc-d { color: var(--muted); }
.hc-row b { font-variant-numeric: tabular-nums; min-width: 2.5em; text-align: right; }
.hc-row.top .hc-d, .hc-row.top b { color: var(--ink); font-weight: 700; }
.hc-bar { display: block; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.hc-bar .bl-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width 0.6s var(--ease); }
.hc-fact { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.hc-fact b { color: var(--ink); }
.empty { color: var(--muted); font-size: 13px; padding: 24px 0; text-align: center; }

/* Segmented ring (short lists of parts of a whole), coloured like the mark */
:root { --ring-1: #0B6478; --ring-2: #5592A4; --ring-3: #91BBC8; --ring-4: #8A8C8E; --ring-5: #C3CBCF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ring-1: #45B6CB; --ring-2: #8BDDEE; --ring-3: #E5FAFF; --ring-4: #727272; --ring-5: #4A565B; } }
:root[data-theme="dark"] { --ring-1: #45B6CB; --ring-2: #8BDDEE; --ring-3: #E5FAFF; --ring-4: #727272; --ring-5: #4A565B; }
:root body.print { --ring-1: #0B6478; --ring-2: #5592A4; --ring-3: #91BBC8; --ring-4: #8A8C8E; --ring-5: #C3CBCF; }
.ring-wrap { display: flex; gap: 22px; align-items: center; }
.ring { width: 156px; height: 156px; flex: none; }
.ring .seg { fill: none; stroke-width: 26; stroke-linecap: butt; }
.ring .seg.anim { animation: pop 0.5s var(--ease) both; transform-box: fill-box; transform-origin: center; }
.ring-total { font-family: var(--font); font-size: 27px; font-weight: 700; fill: var(--ink); letter-spacing: -0.02em; }
.ring-sub { font-family: var(--font); font-size: 13px; fill: var(--muted); }
.ring-legend { flex: 1; min-width: 0; display: grid; gap: 8px; }
.ring-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; font-size: 13px; }
.ring-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.ring-label { color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; }
.ring-row b { font-variant-numeric: tabular-nums; font-weight: 600; }
.ring-share { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.ring-delta { min-width: 60px; text-align: right; font-size: 11.5px; }
@media (max-width: 600px) { .ring-wrap { flex-direction: column; align-items: stretch; } .ring { margin: 0 auto; } }
body.print .ring .seg.anim { animation: none !important; }
.barlist { display: grid; gap: 8px; }
.barrow { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto auto; align-items: center; gap: 10px; font-size: 13px; animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
.bl-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.bl-track { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bl-fill { height: 100%; background: var(--series-3); border-radius: 999px; transition: width 0.9s var(--ease); }
.bl-value { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 44px; text-align: right; }
.bl-delta { min-width: 60px; text-align: right; font-size: 11.5px; }
.groups .bl-fill { background: var(--series-3); }
.barrow.hl .bl-label { font-weight: 600; }
.barrow.hl .bl-fill { background: var(--accent); }
.bl-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); vertical-align: 1px; }

/* Map */
.map { height: 380px; border-radius: var(--radius-s); overflow: hidden; background: var(--surface-2); position: relative; }
.map-loading { position: absolute; inset: 0; display: grid; place-items: center; }
.leaflet-container { font-family: var(--font); background: var(--surface-2); }
.map-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.6); }
.map-dark .leaflet-control-attribution { background: rgba(17, 26, 30, 0.8); color: var(--muted); }
.map-tip { font-family: var(--font); font-size: 12px; border-radius: 8px; border: none; box-shadow: var(--shadow-2); padding: 6px 9px; }
.map-dot.anim { animation: pop 0.5s var(--ease) both; transform-box: fill-box; transform-origin: center; }
.leaflet-control-attribution { font-size: 10px; }

/* Tables */
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-2); padding: 9px 10px; border-bottom: 1px solid var(--hair-2); background: var(--surface-2); }
table.data th:first-child { border-radius: 8px 0 0 8px; }
table.data th:last-child { border-radius: 0 8px 8px 0; }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--hair); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.term { font-weight: 500; }
table.data .rank { font-weight: 600; }
table.data.small { font-size: 12px; }
table.data thead { display: table-header-group; }
table.data tr { break-inside: avoid; }
table.data tr.clickable { cursor: pointer; transition: background 0.15s; }
table.data tr.clickable:hover td { background: var(--surface-2); }
table.data tr.totals td { border-top: 2px solid var(--ink); background: var(--surface-2); }
table.overview td div { font-size: 11px; }
.table-card { padding: 12px 14px; overflow-x: auto; }
body.print .table-card { overflow: visible; }
.map { isolation: isolate; z-index: 0; }
.tabs { overflow-x: auto; max-width: 100%; }
.table-card h3 { padding: 6px 6px 0; }

.rank-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 6px 12px; }
.rank-toolbar input[type=search] { font: inherit; padding: 7px 11px; border: 1px solid var(--hair-2); border-radius: 10px; background: var(--surface); color: var(--ink); min-width: 200px; }
.rank-toolbar .hint { margin: 0 0 0 auto; }
table.rank th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.rank th.sortable:hover { color: var(--ink); }
table.rank th.sorted .sort-ind::after { content: ' ↑'; }
table.rank th.sorted.desc .sort-ind::after { content: ' ↓'; }
table.rank tr.group-row td { background: var(--surface-2); border-top: 1px solid var(--hair-2); padding-top: 10px; }
table.rank tr.group-row .hint { margin: 0 0 0 10px; display: inline; }
.rank-more { justify-content: center; padding: 10px 0 4px; }
body.print .rank-toolbar, body.print .rank-more { display: none !important; }
body.print table.rank td:nth-child(2) { white-space: nowrap; }
body.print table.rank tr.group-row { break-after: avoid; }

.pill { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; background: var(--surface-2); color: var(--ink-2); }
.pill.top3 { background: var(--good-bg); color: var(--good-text); }
.pill.page1 { background: var(--page1-bg); color: var(--page1-text); }
.pill.page2 { background: var(--page2-bg); color: var(--page2-text); }
.pill.beyond { background: var(--surface-2); color: var(--ink-2); }
.pill.none { background: var(--surface-2); color: var(--muted); }

.notice { background: var(--surface); border: 1px dashed var(--hair-2); border-radius: var(--radius); padding: 16px 18px; color: var(--ink-2); margin-bottom: 16px; }
.notice.big { text-align: center; padding: 40px; }
.notice.big p { max-width: 560px; margin: 8px auto 16px; }
.error-box { background: var(--bad-bg); border: 1px solid transparent; border-radius: var(--radius); padding: 14px 16px; color: var(--bad-text); margin-bottom: 16px; }
.error-box p { margin: 4px 0 0; color: var(--ink-2); }
.error-box.small { padding: 8px 12px; font-size: 12.5px; margin-top: 8px; }

.shot { margin: 0 0 24px; break-inside: avoid; }
.shot img { width: 100%; border: 1px solid var(--hair); border-radius: var(--radius-s); background: #fff; }
.shot figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-2); text-align: center; }

.report-foot { color: var(--muted); font-size: 12px; border-top: 1px solid var(--hair); padding-top: 12px; }

.tooltip { position: fixed; display: none; z-index: 50; background: rgba(18, 25, 28, 0.94); backdrop-filter: blur(10px); color: #fff; padding: 9px 11px; border-radius: 10px; font-size: 12px; pointer-events: none; box-shadow: var(--shadow-2); min-width: 150px; }
.tt-title { font-weight: 600; margin-bottom: 4px; }
.tt-row { display: flex; align-items: center; gap: 8px; }
.tt-row span { flex: 1; color: rgba(255, 255, 255, 0.75); }
.tt-row i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: rgba(18, 25, 28, 0.95); backdrop-filter: blur(10px); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 13px; z-index: 60; transition: all 0.3s var(--ease); max-width: 90vw; box-shadow: var(--shadow-2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: rgba(163, 40, 42, 0.97); }

/* PDF include / hide toggles */
/* The controls only appear in Customise PDF mode, plus on blocks already hidden so they can be restored. */
.pdf-toggle { display: none; font: inherit; font-size: 11px; font-weight: 500; color: var(--page1-text); background: var(--page1-bg); border: 1px solid transparent; border-radius: 999px; padding: 2px 9px; cursor: pointer; margin-left: 10px; transition: background 0.2s, color 0.2s; vertical-align: middle; white-space: nowrap; }
body.customise .pdf-toggle, .pdf-hidden .pdf-toggle, .cover-chip .pdf-toggle { display: inline-block; opacity: 1; }
.pdf-toggle:hover { background: var(--accent); color: var(--accent-ink); }
.pdf-row { display: flex; justify-content: flex-end; height: 0; overflow: visible; position: relative; top: -4px; z-index: 2; }
.tile-group { position: relative; }
.pdf-hidden { opacity: 0.45; }
.pdf-hidden .pdf-toggle { background: var(--bad-bg); color: var(--bad-text); }
.cover-chip { display: inline-flex; align-items: center; gap: 4px; }
.cover-chip .pdf-toggle { margin-left: 4px; }
/* Hidden blocks are left out of the dashboard unless the agency is customising; the PDF never shows them. */
body:not(.customise) .pdf-hidden { display: none !important; }
.btn[hidden] { display: none; }
.move-handle { display: none; }
body.customise .move-handle { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: 0 0 8px; max-width: 100%; }
.move-handle .btn.icon-only { padding: 0; width: 28px; height: 28px; }
.mv-grip { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; color: var(--muted, var(--ink)); cursor: grab; touch-action: none; }
.mv-grip:hover { background: var(--surface-2); }
.mv-grip svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 3; stroke-linecap: round; fill: none; }
.move-handle .btn svg { width: 14px; height: 14px; }
body.customise [data-pid].dragging { opacity: 0.5; outline: 2px dashed var(--accent); outline-offset: 4px; }
body.customise [data-pid].drop-before { box-shadow: 0 -3px 0 var(--accent); }
body.customise [data-pid].drop-after { box-shadow: 0 3px 0 var(--accent); }
@media (prefers-reduced-motion: no-preference) { body.customise [data-pid] { transition: box-shadow 0.15s, opacity 0.15s; } }
@media (max-width: 480px) { .customise-bar { flex-direction: column; align-items: flex-start; } .customise-bar .form-actions { flex-wrap: wrap; } }
body.print .move-handle, body.print .pdf-hidden, body.print .pdf-toggle, body.print .pdf-row, body.print .customise-bar { display: none !important; }
body.print .sec-sub { display: block; }

/* Cover (PDF only) */
.cover { display: none; }

/* ==========================================================================
   Modal and forms
   ========================================================================== */
#modal { display: none; }
#modal.open { display: block; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(6px); z-index: 40; animation: fadein 0.2s both; }
.modal { position: fixed; top: 5vh; left: 0; right: 0; margin: 0 auto; width: min(580px, 94vw); max-height: 90vh; overflow: auto; background: var(--bg); border-radius: 20px; z-index: 41; box-shadow: var(--shadow-2); animation: rise 0.35s var(--ease) both; }
.modal.wide { width: min(940px, 94vw); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--hair); position: sticky; top: 0; background: var(--glass); backdrop-filter: blur(20px); z-index: 1; }
.modal-head h2 { font-size: 19px; }
.modal-body { padding: 18px 22px 26px; }
.tabs { display: flex; gap: 2px; background: var(--surface-2); border-radius: 10px; padding: 3px; margin-bottom: 18px; width: max-content; max-width: 100%; }
.tabs button { font: inherit; font-weight: 600; font-size: 13px; background: none; border: none; padding: 7px 14px; cursor: pointer; color: var(--ink-2); border-radius: 8px; transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.tabs button.active { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-1); }

.form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.form label.inline { flex-direction: row; align-items: center; gap: 8px; }
.form input, .form textarea, .form select { font: inherit; font-weight: 400; color: var(--ink); padding: 9px 11px; border: 1px solid var(--hair-2); border-radius: 10px; background: var(--surface); transition: border-color 0.2s, box-shadow 0.2s; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 100, 120, 0.18); }
.form textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.form-row.metrics { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.form fieldset { border: 1px solid var(--hair); border-radius: var(--radius-s); padding: 12px 16px; margin: 0 0 16px; background: var(--surface); }
.form legend { font-weight: 600; padding: 0 6px; }
.form.compact label { margin-bottom: 8px; }
.logo-field { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.logo-preview { height: 80px; display: flex; align-items: center; }
.logo-preview img { max-height: 80px; max-width: 220px; }

.conn-list { display: grid; gap: 14px; }
.conn-card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-1); }
.conn-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.conn-head h3 { margin-bottom: 2px; }
.conn-head .hint { margin: 0; }
.snap-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--hair); }
.snap-line .hint { margin: 0; }
/* Step four: health line per connection, PDFs bell, share modal, monthly report, Admin > Health */
.health-line { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.health-line .hint { margin: 0; }
.health-line i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.health-line.ok i { background: var(--good); }
.health-line.warn i { background: var(--watch); }
.health-line.bad i { background: var(--bad-text); }
.menu-list button[hidden] { display: none; }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.nav-badge.busy { min-width: 8px; width: 8px; height: 8px; padding: 0; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.share-url { display: flex; gap: 8px; align-items: center; margin: 4px 0 6px; }
.share-url input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--hair-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.monthly-block { margin-top: 22px; padding: 16px 18px; border: 1px solid var(--hair); border-radius: var(--radius-s); background: var(--surface); }
.monthly-block h3 { margin: 0 0 4px; }
.health-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.health-head .hint { margin: 0; max-width: 640px; }
.pill.bad { background: var(--bad-bg); color: var(--bad-text); }
@media (max-width: 640px) { .health-head { flex-direction: column; } .share-url { flex-wrap: wrap; } }

/* Public report page (/r/<token>): bar above the report; Page view shows the print layout on screen */
.public-bar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--hair); }
.public-bar .pb-brand { font-weight: 600; font-size: 14px; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-bar .pb-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.public-bar a.pb-latest { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 500; }
.public-main #report { padding-top: 20px; }
html.page-view-root { background: #D3DADD; }
body.print.page-view { margin: 0 auto 32px; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.18); min-height: 297mm; }
body.print.page-view .public-bar { margin: 0 -12mm 8mm; background: rgba(255, 255, 255, 0.92); }
body.page-view #report > section.page:not(.cover) + section.page { margin-top: 10mm; padding-top: 8mm; border-top: 2px dashed #C3CBCF; }
body.page-view .cover:not(.pdf-hidden) { margin-bottom: 8mm; }
.options { display: grid; gap: 8px; margin: 8px 0; }
.options label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.options select { font: inherit; font-weight: 400; padding: 8px 11px; border: 1px solid var(--hair-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.imports { margin-bottom: 12px; }

.shot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.shot-item { background: var(--surface); border: 1px solid var(--hair); border-radius: 12px; padding: 8px; position: relative; display: grid; gap: 6px; }
.shot-item img { width: 100%; height: 130px; object-fit: cover; object-position: top; border-radius: 8px; }
.shot-item input { font: inherit; font-size: 12px; padding: 6px 8px; border: 1px solid var(--hair-2); border-radius: 8px; background: var(--surface); color: var(--ink); }
.shot-item .icon-btn { position: absolute; top: 4px; right: 4px; background: var(--surface); }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.logo-box { background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 14px; display: flex; align-items: center; justify-content: center; min-height: 90px; position: relative; }
.logo-box.dark { background: var(--navy); border-color: var(--navy); }
.logo-box img { max-width: 100%; max-height: 90px; }
.logo-box .icon-btn { position: absolute; top: 2px; right: 2px; }

/* Guided setup */
.steps { display: grid; gap: 14px; max-width: 860px; }
.card.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.step-n { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.step-body h3 { margin-bottom: 6px; }
.step-body h3 .muted { font-weight: 500; font-size: 12px; margin-left: 6px; }
.step-body p { margin: 0 0 10px; color: var(--ink-2); }
.step-body .form-actions { flex-wrap: wrap; }
.check-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.check-list li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.check-list .hint { margin: 2px 0 0; }
.ck { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; }
.ck.ok { background: #0F845F; }
.ck.no { background: #DB3122; }
.ck.wait { background: #85510F; }
.wizard { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.wizard li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 14px 16px; }
.wizard h3 { margin-bottom: 6px; }
.wizard p { margin: 0 0 8px; color: var(--ink-2); }
.wizard code { font-size: 12px; word-break: break-all; }
.wz-n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.enable-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.copy { vertical-align: middle; }
.import-list { display: grid; gap: 10px; margin-bottom: 12px; }
.import-row { margin-bottom: 0; }
.import-row.exists { opacity: 0.6; }
.import-row .form-row { margin-top: 8px; }
.import-row label.inline { margin-bottom: 2px; font-size: 14px; }
.conn-divider { margin: 22px 0 8px; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; padding: 14px 16px; border: 1px solid var(--bad-text); border-radius: var(--radius-s); background: var(--bad-bg); }
.danger-zone .hint { margin: 2px 0 0; }
.icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Publishing */
.compose-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.compose textarea { width: 100%; }
.media-field { margin-bottom: 14px; }
.media-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.media-item { position: relative; width: 110px; display: grid; gap: 4px; }
.media-item img, .media-item video { width: 110px; height: 80px; object-fit: cover; border-radius: 8px; background: #000; }
.media-item .hint { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-item .icon-btn { position: absolute; top: 2px; right: 2px; background: var(--surface); }
fieldset.when label.inline { margin-bottom: 6px; font-weight: 500; }
.target-card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius-s); padding: 10px 12px; margin-bottom: 10px; }
.target-head { margin-bottom: 4px !important; }
.target-head .hint { margin: 0 0 0 6px; font-weight: 400; }
.target-body { padding-left: 24px; }
.small-label { font-weight: 500 !important; font-size: 12px !important; margin-bottom: 6px !important; }
.target-body textarea { width: 100%; margin-bottom: 8px; }
.target-body .form-row label { margin-bottom: 6px; }
.post-list { display: grid; gap: 12px; }
.post-item { display: grid; grid-template-columns: 120px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 12px; }
.post-media { display: grid; gap: 4px; }
.post-media img, .post-media video { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.post-head { display: flex; align-items: center; gap: 8px; }
.post-head .pill { margin-left: 0; }
.post-text { margin: 6px 0; white-space: pre-wrap; }
.post-results { list-style: none; padding: 0; margin: 0 0 8px; font-size: 13px; display: grid; gap: 4px; }
.post-results .hint { display: block; margin: 2px 0 0; }

/* Auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--hair); border-radius: 22px; padding: 30px; box-shadow: var(--shadow-2); animation: rise 0.5s var(--ease) both; }
.auth-card h1 { font-size: 26px; margin-bottom: 4px; }
.auth-card .hint { margin-bottom: 18px; }
.auth-card .btn { width: 100%; padding: 11px; justify-content: center; }
.auth-logo { height: auto; padding: 12px 16px; margin-bottom: 16px; }
.auth-logo img { height: 40px; max-width: 220px; }
.auth-card .btn + .btn { margin-top: 8px; }
.auth-links { margin: 14px 0 0; font-size: 13px; text-align: center; }
.auth-card .auth-msg { margin: 12px 0 0; }
.auth-card .auth-msg:empty { display: none; }
#email-code-note { margin: 10px 0 0; }
.auth-legal { margin: 18px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.auth-legal a, .side-legal a { color: var(--muted); text-decoration: none; }
.auth-legal a:hover, .side-legal a:hover { color: var(--accent); text-decoration: underline; }
.confirm-dialog { border: 1px solid var(--hair); border-radius: var(--radius); padding: 20px 22px; max-width: 420px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); }
.confirm-dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
.confirm-dialog p { margin: 0 0 12px; font-size: 14px; }
.side-legal { padding: 0 10px 4px; font-size: 11.5px; color: var(--muted); }
/* Two-factor set-up and account security */
.mfa-setup { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; margin-bottom: 8px; }
.mfa-qr { width: 180px; height: 180px; border-radius: var(--radius-s); background: #fff; padding: 6px; border: 1px solid var(--hair); }
.mfa-key { display: inline-block; font-size: 13px; letter-spacing: 0.08em; word-break: break-all; margin-top: 4px; }
.mfa-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; list-style: none; padding: 14px 16px; margin: 12px 0; background: var(--surface-2); border-radius: var(--radius-s); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
body.mfa-gated .shell { grid-template-columns: 1fr; }
body.mfa-gated #sidebar, body.mfa-gated #topbar { display: none; }
.mfa-gate { max-width: 640px; margin: 48px auto; padding: 28px; }
.mfa-gate h1 { font-size: 26px; margin-bottom: 6px; }
.status-on { color: var(--good-text); background: var(--good-bg); border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 600; }
.status-off { color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 600; }
.audit-filter { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.audit-table td { font-size: 12.5px; }
.audit-table .detail { color: var(--muted); max-width: 260px; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; }
@media (max-width: 560px) { .mfa-setup { grid-template-columns: 1fr; } }

/* ==========================================================================
   Responsive
   ========================================================================== */
/* Phone layout (phones and tablets under 980px): the sidebar is an off-canvas drawer (app.js setDrawer; the
   backdrop #drawer-back is created on first open), the top bar carries the menu button and the period and
   compare controls stack under the title, every tap target is at least 44px, and the top bar, drawer, banners,
   dialogs and toast keep clear of the device's safe areas (viewport-fit=cover on every page). */
.menu-btn, .side-close { display: none; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  #sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 45; width: min(320px, 88vw); height: auto; border-right: 1px solid var(--hair); background: var(--bg); box-shadow: var(--shadow-2); transform: translateX(-104%); visibility: hidden; transition: transform 0.25s var(--ease), visibility 0s linear 0.25s; padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); }
  body.drawer-open #sidebar { transform: none; visibility: visible; transition: transform 0.25s var(--ease), visibility 0s; }
  body.drawer-open { overflow: hidden; }
  .drawer-back { position: fixed; inset: 0; z-index: 44; background: rgba(0, 0, 0, 0.4); }
  .drawer-back[hidden] { display: none; }
  .menu-btn { display: inline-flex; }
  .side-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 22px; }
  #sidebar .nav-item, #sidebar .side-select { min-height: 44px; }
  #topbar { padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); gap: 10px; }
  #topbar .tb-title { flex: 1 1 0; min-width: 0; }
  #topbar .tb-title, #topbar .tb-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #topbar .actions { margin-left: 0; order: 1; }
  #topbar .controls { flex: 1 1 100%; order: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  #topbar .field { flex-direction: column; align-items: stretch; gap: 3px; }
  #topbar .field select { width: 100%; min-height: 44px; }
  #topbar .custom-range { grid-column: 1 / -1; flex-wrap: wrap; }
  #topbar .custom-range input, #topbar .custom-range .btn { min-height: 44px; }
  #topbar .custom-range input { flex: 1 1 120px; }
  .btn.icon-only { width: 44px; height: 44px; }
  .actions .btn { min-height: 44px; }
  .menu-list { min-width: 220px; max-width: calc(100vw - 32px); }
  .menu-list button { min-height: 44px; display: flex; align-items: center; }
  #banners { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .banner .btn.small, .banner-x { min-height: 44px; }
  .banner-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  section.page { scroll-margin-top: 150px; }
}
@media (max-width: 820px) {
  body:not(.print) .glance-grid, body:not(.print) .grid-2, body:not(.print) .two-col, .form-row, .form-row.three, .compose-grid, .post-item { grid-template-columns: 1fr; }
  body:not(.print) .report-head { flex-direction: column; align-items: flex-start; }
  .actions { margin-left: 0; }
  #report { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .hero-value { font-size: 44px; }
}
@media (max-width: 700px) {
  /* Settings, Admin, Account and the other dialogs fill the screen with a sticky header and a 44px close. */
  #modal .modal, #modal .modal.wide { top: 0; left: 0; right: 0; bottom: 0; width: 100%; max-height: none; border-radius: 0; border: 0; animation: none; }
  #modal .modal-head { padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
  #modal .modal-head .icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
  #modal .modal-body { padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .tabs { width: 100%; }
  .tabs button { min-height: 44px; flex: 1 0 auto; }
  /* Every tap target at least 44px tall (checkboxes and radios sit inside 44px labels; icon buttons are 44px square). */
  button, select, textarea, input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=hidden]), .btn, .icon-btn, .toast-act, .side-select, .role-select { min-height: 44px; }
  .banner-x, .icon-btn, .seg button { min-width: 44px; }
  .form label.inline { min-height: 44px; }
  .form input[type=checkbox], .form input[type=radio] { width: 22px; height: 22px; }
  .colour-row input[type=color] { height: 44px; }
  .form-actions { flex-wrap: wrap; }
  .toast { max-width: calc(100vw - 24px); }
  /* The public link page: the bar wraps, Page view (A4 on screen) is a desktop tool, the Powered by line stays. */
  .public-bar { flex-wrap: wrap; gap: 6px 10px; padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px)); }
  .public-bar .pb-brand { flex: 1 1 100%; white-space: normal; }
  .public-bar .pb-powered { flex: 1 1 auto; white-space: normal; }
  .public-bar #page-view { display: none; }
  .public-bar .pb-actions .btn, .public-bar a.pb-latest { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 600px) {
  .bl { display: none; }
  .actions .btn.ghost:not(.icon-only) { width: 44px; padding: 0; justify-content: center; }
  .actions .btn.ghost:not(.icon-only) svg { margin: 0; }
  body:not(.print) .tiles, body:not(.print) .rank-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:not(.print) .glance-grid.few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:not(.print) .glance-grid.few .hero-tile { grid-column: 1 / -1; }
  .t-value { font-size: 24px; }
  .hero-value { font-size: 40px; }
  .report-head h1 { font-size: 28px; }
  .chips { justify-content: flex-start; }
  .chip.src { min-height: 44px; padding: 8px 14px; }
  body.customise .pdf-toggle, .pdf-hidden .pdf-toggle, .cover-chip .pdf-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; }
  .customise-bar { flex-direction: column; align-items: flex-start; }
  .customise-bar .form-actions { flex-wrap: wrap; }
  .customise-bar .btn { min-height: 44px; }
  .move-handle .btn, .move-handle button { min-width: 44px; min-height: 44px; }
  /* Tables scroll inside their card instead of widening the page. */
  body:not(.print) table.data { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  body:not(.print) .table-card table.data, body:not(.print) .table-scroll table.data { display: table; }
}
.toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Print / PDF (always light)
   ========================================================================== */
body.print {
  color-scheme: light;
  --bg: #ffffff; --bg-2: #F3F5F6; --surface: #ffffff; --surface-2: #F3F5F6; --ink: #12191C; --ink-2: #4A565B; --muted: #5A676D;
  --hair: rgba(18, 25, 28, 0.09); --hair-2: rgba(18, 25, 28, 0.16); --line: #D3DADD; --navy: #12191C; --accent: #0B6478; --accent-ink: #FFFFFF; --accent-soft: #E7F0F2;
  --series-1: #0B6478; --series-2: #28323A; --series-3: #8A8C8E; --series-4: #6B6AB8;
  --good: #0F845F; --watch: #EEB44B; --act: #DB3122;
  --good-text: #1F6F56; --good-bg: #DDEEE9; --watch-text: #85510F; --watch-bg: #FDF5E6; --bad-text: #A3282A; --bad-bg: #FAE2E0;
  --page1-bg: #E7F0F2; --page1-text: #0B6478; --page2-bg: #FDF5E6; --page2-text: #85510F;
  --cm-1: #12191C; --cm-2: #6C7072; --cm-3: #AAACAD; --cm-core: #0B6478;
  --shadow-1: none; --shadow-2: none;
  background: #fff;
  width: 210mm;
  padding: 0 12mm;
  margin: 0;
  font-size: 12.5px;
}
body.print .shell { display: block; }
body.print #sidebar, body.print #topbar, body.print #modal, body.print .tooltip, body.print .toast { display: none !important; }
body.print #report { max-width: none; padding: 0; }
body.print .report-head { display: none; }
body.print .reveal, body.print .barrow, body.print .heatmap .cell { animation: none !important; }
body.print section.page { break-before: page; margin-bottom: 0; }
body.print section.glance, body.print section.rankings { break-before: auto; }
body.print .grid-2, body.print .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.print .bars-grid { grid-template-columns: 1fr; }
body.print .card, body.print .tile { background: #fff; border-color: #E1E6E8; }
body.print .tiles { grid-template-columns: repeat(4, 1fr); }
body.print .rank-tiles { grid-template-columns: repeat(6, 1fr); }
body.print .glance-grid { grid-template-columns: 220px 1fr; }
body.print .hero-value { font-size: 44px; }
body.print .hero-tile { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body.print .metric-grid { grid-template-columns: 1fr 1fr; }
body.print .card.metric .hero-value { font-size: 38px; }
body.print .map { height: 300px; }
body.print .shot { break-before: page; }
body.print .shot:first-of-type { break-before: auto; }
body.print .shot img { max-height: 230mm; width: auto; max-width: 100%; display: block; margin: 0 auto; }
body.print .sec-head { break-after: avoid; }
body.print .report-foot { margin-top: 24px; }

body.print .cover:not(.pdf-hidden) { display: block; break-after: page; }
body.print .cover-card {
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
  min-height: 262mm; border-radius: 16px; padding: 16mm 16mm 14mm; color: var(--brand-ink);
  background: var(--brand);
  background-image:
    radial-gradient(ellipse at 100% 0%, rgba(255, 255, 255, 0.18), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(0, 0, 0, 0.28), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 14px);
  display: flex; flex-direction: column; justify-content: space-between;
}
body.print .cover-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
body.print .cover-logos { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
body.print .cover-logo img { height: 44px; width: auto; max-width: 200px; display: block; }
body.print .cover-logo.big img { height: 64px; max-width: 260px; }
body.print .cover-logo.small img { height: 28px; max-width: 140px; }
body.print .cover-logo.plate { background: #fff; border-radius: 10px; padding: 8px 12px; display: inline-block; }
body.print .cb-left { display: flex; align-items: center; gap: 14px; }
body.print .cover-eyebrow { color: var(--brand-ink); opacity: 0.8; }
body.print .cover-mid h1, body.print .cover-period { color: var(--brand-ink); }
body.print .cover-site, body.print .cs-label, body.print .cb-label, body.print .cb-url, body.print .cover-tag { color: var(--brand-ink); opacity: 0.75; }
body.print .cover-tag { border-color: currentColor; }
body.print .cover-bottom { border-top-color: rgba(128, 128, 128, 0.4); }
body.print .cover-tag { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.75); border: 1px solid rgba(255,255,255,0.35); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
body.print .cover-mid { padding: 10mm 0; }
body.print .cover-eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); margin: 0 0 10px; font-weight: 600; }
body.print .cover-mid h1 { font-size: 50px; line-height: 1.05; color: #fff; font-weight: 600; margin: 0 0 14px; letter-spacing: -0.03em; max-width: 150mm; }
body.print .cover-period { font-size: 24px; font-weight: 500; color: #fff; margin: 0; }
body.print .cover-site { color: rgba(255,255,255,0.7); margin: 6px 0 0; font-size: 14px; }
body.print .cover-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16mm; }
body.print .cover-stat { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; padding: 14px 16px; }
body.print .cs-value { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; }
body.print .cs-label { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 2px; }
body.print .cs-delta { margin-top: 6px; }
body.print .cover-stat .delta { background: rgba(127, 127, 127, 0.22); color: var(--brand-ink); }
body.print .cover-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 12px; font-size: 13px; }
body.print .cover-bottom b { font-size: 16px; display: block; }
body.print .cb-label { display: block; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 2px; }
body.print .cb-url { display: block; color: rgba(255,255,255,0.75); font-size: 12px; margin-top: 2px; }
body.print .cb-right { text-align: right; }

@media print {
  @page { size: A4; margin: 12mm 0 14mm; }
  #sidebar, #topbar, #modal, .tooltip, .toast, .public-bar { display: none !important; }
  html.page-view-root { background: #fff; }
  body.print.page-view { margin: 0; box-shadow: none; min-height: 0; }
  body.page-view #report > section.page:not(.cover) + section.page { margin-top: 0; padding-top: 0; border-top: 0; }
}

/* Website tracking check (Profile tab) */
.track-check { margin-top: 22px; padding: 14px 16px; border: 1px solid var(--hair); border-radius: var(--radius-s); background: var(--surface); }
.track-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.track-head .btn { min-height: 44px; }
.track-list { list-style: none; margin: 8px 0 0; padding: 0; }
.track-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--hair); }
.track-row .hint { margin: 2px 0 0; }
.track-row code { font-size: 12px; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.track-chip { flex: none; min-width: 74px; text-align: center; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; }
.track-chip.found { background: var(--good-bg); color: var(--good-text); }
.track-chip.none { background: var(--surface-2); color: var(--ink-2); }
.track-chip.err { background: var(--bad-bg); color: var(--bad-text); }
.track-note { margin-top: 10px; font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.track-note .spinner { width: 16px; height: 16px; border-width: 2px; margin: 0; flex: none; }

/* Google reviews card (Business Profile section, block sec:gbp:reviews) */
.reviews-card .rv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding-bottom: 12px; border-bottom: 1px solid var(--hair); margin-bottom: 4px; }
.rv-avg { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.rv-big { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.rv-stars { color: var(--watch-text); flex: none; }
.rv-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.rv-wait { color: var(--watch-text); font-weight: 600; }
.rv-list { list-style: none; margin: 0; padding: 0; }
.rv-item { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--hair); border-radius: 8px; }
.rv-item:first-child { border-top: 0; }
.rv-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rv-body { flex: 1; min-width: 0; }
.rv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--ink-2); }
.rv-meta .rv-stars { width: 80px; height: 16px; }
.rv-name { color: var(--ink); }
.rv-text { margin: 6px 0 0; font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.rv-text.muted { color: var(--muted); }
.rv-reply { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--hair-2); background: var(--surface-2); border-radius: 0 10px 10px 0; font-size: 13.5px; }
.rv-reply-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--ink-2); font-size: 12.5px; }
.rv-reply-head b { color: var(--ink); }
.rv-reply-head .btn { margin-left: auto; }
.rv-reply p { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.rv-actions { margin-top: 8px; }
.rv-actions .btn, .rv-reply-head .btn, .rv-form .btn { min-height: 44px; }
.rv-form { margin-top: 8px; display: grid; gap: 8px; }
.rv-form[hidden], .rv-actions[hidden] { display: none; }
.rv-form textarea { width: 100%; box-sizing: border-box; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--hair-2); border-radius: 10px; padding: 9px 11px; resize: vertical; min-height: 88px; }
.rv-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 100, 120, 0.18); }
.rv-form .form-actions { flex-wrap: wrap; }
.rv-form .rv-err { color: var(--bad-text); font-size: 13px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rv-stars { color: var(--watch-text); }
  :root:not([data-theme="light"]) .rv-wait { color: var(--watch-text); }
}
:root[data-theme="dark"] .rv-stars { color: var(--watch-text); }
:root[data-theme="dark"] .rv-wait { color: var(--watch-text); }
body.print .rv-actions, body.print .rv-form, body.print .rv-remove { display: none !important; }
body.print .rv-item:nth-child(n + 6) { display: none; }
body.print .rv-item { break-inside: avoid; }

/* ==========================================================================
   Tenancy (wave two): sign-up and verify pages, banners, Plan tab, usage lines
   ========================================================================== */
.auth-card.auth-card-wide { width: min(460px, 100%); }
.auth-card .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.choice-set { border: none; padding: 0; margin: 0 0 14px; }
.choice-set legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-body { display: flex; flex-direction: column; gap: 2px; padding: 11px 12px; border: 1px solid var(--hair-2); border-radius: 12px; background: var(--surface); transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.choice-body b { font-size: 13.5px; color: var(--ink); }
.choice-body small { font-size: 12px; font-weight: 400; color: var(--muted); }
.choice input:checked + .choice-body { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 100, 120, 0.18); background: var(--page1-bg); }
.choice input:focus-visible + .choice-body { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-card .form label.inline.terms { align-items: flex-start; font-weight: 400; color: var(--ink-2); font-size: 13px; line-height: 1.4; margin-bottom: 8px; }
.auth-card .form label.inline.terms input { margin-top: 2px; }
.field-error { display: block; font-size: 12.5px; font-weight: 500; color: var(--bad-text); margin-top: 2px; }
.field-error:empty { display: none; }
.form input[aria-invalid="true"] { border-color: var(--bad-text); }
.pw-rules { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; font-weight: 400; color: var(--muted); }
.pw-rule { display: inline-flex; align-items: center; gap: 5px; }
.pw-rule i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--hair-2); display: inline-block; transition: background 0.2s, border-color 0.2s; }
.pw-rule.ok { color: var(--good-text); }
.pw-rule.ok i { background: var(--good-text); border-color: var(--good-text); }
.done-mark { width: 52px; height: 52px; border-radius: 50%; background: var(--good-bg); color: var(--good-text); display: flex; align-items: center; justify-content: center; margin: 0 0 14px; }
.done-mark svg { width: 28px; height: 28px; }
.done-mark.bad { background: var(--page2-bg); color: var(--page2-text); }
#resend.busy { pointer-events: none; opacity: 0.6; }
@media (max-width: 420px) { .choice-grid { grid-template-columns: 1fr; } }

/* Banners under the top bar */
#banners { display: flex; flex-direction: column; gap: 6px; padding: 10px 28px 0; }
#banners:empty { display: none; }
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 9px 14px; border-radius: 12px; font-size: 13px; line-height: 1.4; border: 1px solid transparent; }
.banner-text { flex: 1 1 260px; min-width: 0; }
.banner-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.banner .btn.small { white-space: nowrap; }
.banner-x { font: inherit; font-size: 18px; line-height: 1; background: none; border: none; color: inherit; opacity: 0.7; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.banner-x:hover { opacity: 1; background: rgba(0, 0, 0, 0.06); }
.banner.info { background: var(--page1-bg); color: var(--page1-text); }
.banner.warn { background: var(--page2-bg); color: var(--page2-text); }
.banner.bad { background: var(--bad-bg); color: var(--bad-text); }
.banner.owner { background: #12191C; color: #EEF3F5; border-color: #4A565B; }
.banner.owner .btn.ghost { background: #26353B; color: #fff; border-color: transparent; }
.banner.info .btn.ghost, .banner.warn .btn.ghost, .banner.bad .btn.ghost { background: var(--surface); }
@media (max-width: 820px) { #banners { padding-left: 16px; padding-right: 16px; } .banner-actions { margin-left: 0; } }
body.print #banners { display: none; }
.menu[hidden] { display: none; }
.toast-act { font: inherit; font-size: 12.5px; font-weight: 600; margin-left: 10px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer; }
.toast-act:hover { background: rgba(255, 255, 255, 0.26); }

/* Workspace suspended or cancelled */
.inactive-box { max-width: 560px; margin: 32px auto; text-align: center; }
.inactive-box .form-actions { justify-content: center; margin-top: 14px; }

/* Usage lines where a limit applies */
.usage-line { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin: 4px 0 10px; }
.usage-line.full { color: var(--page2-text); }
.usage-line .meter { width: 90px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--hair); }
.usage-line .meter i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.usage-line.full .meter i { background: var(--page2-text); }
.form .usage-line { font-weight: 400; }

/* Admin > Plan */
.plan-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.plan-head h3 { margin: 0; font-size: 20px; }
.plan-head .hint { margin: 4px 0 0; }
.plan-head .pill { font-size: 11.5px; padding: 3px 10px; vertical-align: middle; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.plan-grid .card { margin: 0; }
.plan-grid h4 { margin: 0 0 10px; font-size: 13.5px; }
.plan-grid h4.mt { margin-top: 14px; }
.limit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.limit-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; font-size: 13px; }
.limit-list .lv { font-weight: 600; color: var(--ink); white-space: nowrap; }
.limit-list .meter { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--hair); }
.limit-list .meter i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.limit-list li.full .lv, .limit-list li.full .ln { color: var(--page2-text); }
.limit-list li.full .meter i { background: var(--page2-text); }
.feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.feature-list li { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--good-bg); color: var(--good-text); }
.feature-list li.off { background: var(--surface-2); color: var(--muted); text-decoration: line-through; text-decoration-color: var(--hair-2); }
.plan-cancel { border-color: var(--bad-bg); }
.plan-cancel textarea { width: 100%; box-sizing: border-box; }
@media (max-width: 720px) { .plan-grid { grid-template-columns: 1fr; } }

/* Public link bar */
.public-bar .pb-powered { font-size: 12px; color: var(--muted); white-space: nowrap; }
.public-bar .pb-powered[hidden] { display: none; }

/* Installable app: the install box on the Account page (app.js installBoxHtml) and the offline page (offline.html) */
.install-box { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--hair); border-radius: var(--radius-s); background: var(--surface); }
.install-box[hidden] { display: none; }
.install-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink-2); }
.install-text b { color: var(--ink); font-size: 14px; }
.install-text .ios-share { width: 16px; height: 16px; vertical-align: -3px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.install-box .btn { flex: none; }
.install-x { font-size: 20px; flex: none; }
@media (max-width: 600px) { .install-box { flex-wrap: wrap; } .install-box .btn { width: 100%; justify-content: center; } }
.offline-card { text-align: center; }
.offline-text { font-size: 14px; margin: 8px 0 18px; }
.offline-retry { justify-content: center; width: 100%; min-height: 44px; }

/* ---------------------------------------------------------------------------
   Billing (Stripe): Admin > Plan subscription summary, invoices and plan chooser; Admin > Platforms billing card
   --------------------------------------------------------------------------- */
.billing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.billing-card { margin: 0 0 16px; }
.billing-grid .billing-card { margin: 0; }
.billing-card h4 { margin: 0 0 10px; font-size: 13.5px; }
.billing-card h4 .pill { vertical-align: middle; }
.billing-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.billing-kv dt { color: var(--muted); }
.billing-kv dd { margin: 0; color: var(--ink); }
.billing-kv dd .hint { display: block; margin-top: 2px; }
.billing-kv code { font-size: 12px; word-break: break-all; }
.invoice-table, .billing-events { width: 100%; border-collapse: collapse; font-size: 13px; }
.invoice-table th, .billing-events th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 4px 8px 6px 0; border-bottom: 1px solid var(--hair); }
.invoice-table td, .billing-events td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.invoice-table .pill, .billing-events .pill { margin-left: 0; }
.billing-events code { font-size: 12px; }
.billing-events .hint { display: block; font-size: 12px; margin-top: 2px; word-break: break-word; }
.billing-events .be-actions { white-space: nowrap; text-align: right; }
.billing-events .be-actions .btn + .btn { margin-left: 6px; }
.hint.empty { padding: 10px 0 2px; }
#plan-choose .form { margin: 0; }
.interval-toggle { display: inline-flex; border: 1px solid var(--hair-2); border-radius: 999px; padding: 3px; margin-bottom: 14px; background: var(--surface-2); }
.interval-toggle label { position: relative; cursor: pointer; }
.interval-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.interval-toggle span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; min-height: 36px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.interval-toggle span small { font-size: 11px; font-weight: 500; color: var(--muted); }
.interval-toggle input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.interval-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 12px; border: 1.5px solid var(--hair-2); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.plan-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.plan-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.plan-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-card .pc-name { font-weight: 700; font-size: 15px; }
.plan-card .pc-price { font-size: 13px; color: var(--ink-2); }
.plan-card .pc-facts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); }
.plan-card .pc-current { font-size: 11px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.steppers { display: grid; gap: 10px; margin-bottom: 14px; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stepper .st-label { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 600; }
.stepper .st-ctl { display: inline-flex; align-items: center; gap: 6px; }
.stepper .st-ctl input { width: 64px; text-align: center; min-height: 36px; }
.stepper .st-ctl .btn { min-width: 36px; min-height: 36px; padding: 0 10px; font-size: 16px; line-height: 1; }
.plan-total { align-self: end; font-size: 13.5px; font-weight: 600; padding: 10px 0; }
@media (max-width: 820px) { .billing-grid { grid-template-columns: 1fr; } .plan-cards { grid-template-columns: 1fr; } .billing-kv { grid-template-columns: 1fr; gap: 2px 0; } .billing-kv dt { margin-top: 6px; } }

/* Third-party imports: imported rank tracking (report card and Settings > Keywords) and API keys (Settings > Connections) */
.ri-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 12px; font-size: 13px; }
.ri-facts { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.ri-facts span { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.ri-table .ri-url { font-weight: 400; word-break: break-all; }
.ri-table td.term { max-width: 360px; }
.cm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cm-grid .card { margin-bottom: 0; }
.cm-figure { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.cm-figure .t-value { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.cm-unit { font-size: 14px; color: var(--muted); font-weight: 600; }
.cm-card .hint { margin-bottom: 10px; }
.cm-card .chart { min-height: 150px; }
.ri-panel, .ak-panel { margin-top: 8px; }
.ri-form, .ak-form { margin-bottom: 14px; }
.ri-map { margin: 6px 0 10px; }
.ri-preview { margin: 6px 0 12px; }
.ri-preview table.data td, .ri-preview table.data th { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.ri-empty { padding: 18px 16px; border: 1px dashed var(--hair-2); border-radius: var(--radius-s); color: var(--ink-2); font-size: 13.5px; }
.ri-empty .hint { margin-top: 4px; }
.ri-actions { white-space: nowrap; text-align: right; }
.ri-actions .btn + .btn { margin-left: 6px; }
.ri-edit input, .ak-edit input { min-height: 36px; width: 100%; box-sizing: border-box; }
.gate-notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.gate-notice p { margin: 4px 0 0; font-size: 13px; }
.ak-row { grid-template-columns: 1fr auto; align-items: end; }
.ak-row .form-actions { margin: 0 0 8px; }
.key-reveal { background: var(--page1-bg); color: var(--page1-text); border-radius: var(--radius-s); padding: 12px 14px; margin: 0 0 14px; font-size: 13px; }
.key-line { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.key-line code { font-size: 13px; padding: 6px 10px; background: var(--surface); color: var(--ink); border-radius: 8px; word-break: break-all; user-select: all; }
.code-block { background: var(--surface-2); border: 1px solid var(--hair); border-radius: var(--radius-s); padding: 12px 14px; font-size: 12.5px; line-height: 1.5; overflow-x: auto; margin: 0 0 8px; white-space: pre; }
.code-block code { background: none; padding: 0; font-size: inherit; }
.ak-sub { margin: 18px 0 8px; font-size: 14px; }
@media (max-width: 720px) { .ri-facts { margin-left: 0; } .ak-row { grid-template-columns: 1fr; } .ri-actions { text-align: left; } .cm-grid { grid-template-columns: 1fr; } }
body.print .ri-table-wrap .rank-more, body.print .ri-facts { display: none; }
body.print .cm-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
body.print .cm-card { break-inside: avoid; }

/* ==========================================================================
   Get started (public/onboarding.js): the full-screen seven-step flow, the
   Getting started card on the dashboard and the client-view banner. Own tokens
   in the v3 language (teal and coral, glass panels in dark, solid in light),
   so it looks the same on the classic and the v3 page. Controls 44px,
   captions 13px, light and dark through the same theme switch as the app.
   ========================================================================== */
.onb, .onb-card {
  --o-bg: #F3F5F6; --o-panel: #FFFFFF; --o-panel-2: #F3F5F6; --o-edge: rgba(18, 25, 28, 0.1); --o-edge-2: rgba(18, 25, 28, 0.18);
  --o-ink: #12191C; --o-ink-2: #4A565B; --o-muted: #5A676D; --o-field: #FFFFFF; --o-track: rgba(18, 25, 28, 0.1);
  --o-teal: #0B6478; --o-teal-ink: #0B6478; --o-teal-soft: rgba(11, 100, 120, 0.12); --o-on-teal: #FFFFFF; --o-coral: #12191C; --o-on-coral: #FFFFFF; --o-coral-soft: rgba(18, 25, 28, 0.06);
  --o-good: #1F6F56; --o-good-soft: #DDEEE9; --o-warn: #85510F; --o-warn-soft: #FDF5E6; --o-bad: #A3282A; --o-bad-soft: #FAE2E0;
  --o-glow1: transparent; --o-glow2: transparent; --o-blur: none;
  --o-shadow: 0 1px 2px rgba(18, 25, 28, 0.06), 0 10px 30px rgba(18, 25, 28, 0.08); --o-focus: #0B6478;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .onb, :root:not([data-theme="light"]) .onb-card {
    --o-bg: #0A1114; --o-panel: #111A1E; --o-panel-2: #172328; --o-edge: rgba(238, 243, 245, 0.1); --o-edge-2: rgba(238, 243, 245, 0.2);
    --o-ink: #EEF3F5; --o-ink-2: #9AAAB0; --o-muted: #8A9AA0; --o-field: #172328; --o-track: rgba(238, 243, 245, 0.12);
    --o-teal: #45B6CB; --o-teal-ink: #45B6CB; --o-teal-soft: rgba(69, 182, 203, 0.16); --o-on-teal: #0A1114; --o-coral: #EEF3F5; --o-on-coral: #0A1114; --o-coral-soft: rgba(238, 243, 245, 0.08);
    --o-good: #86DDB4; --o-good-soft: #162E2B; --o-warn: #FEB504; --o-warn-soft: #313127; --o-bad: #EF7B75; --o-bad-soft: #322324;
    --o-glow1: transparent; --o-glow2: transparent; --o-blur: none; --o-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px rgba(0, 0, 0, 0.35); --o-focus: #45B6CB;
  }
}
:root[data-theme="dark"] .onb, :root[data-theme="dark"] .onb-card {
  --o-bg: #0A1114; --o-panel: #111A1E; --o-panel-2: #172328; --o-edge: rgba(238, 243, 245, 0.1); --o-edge-2: rgba(238, 243, 245, 0.2);
  --o-ink: #EEF3F5; --o-ink-2: #9AAAB0; --o-muted: #8A9AA0; --o-field: #172328; --o-track: rgba(238, 243, 245, 0.12);
  --o-teal: #45B6CB; --o-teal-ink: #45B6CB; --o-teal-soft: rgba(69, 182, 203, 0.16); --o-on-teal: #0A1114; --o-coral: #EEF3F5; --o-on-coral: #0A1114; --o-coral-soft: rgba(238, 243, 245, 0.08);
  --o-good: #86DDB4; --o-good-soft: #162E2B; --o-warn: #FEB504; --o-warn-soft: #313127; --o-bad: #EF7B75; --o-bad-soft: #322324;
  --o-glow1: transparent; --o-glow2: transparent; --o-blur: none; --o-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px rgba(0, 0, 0, 0.35); --o-focus: #45B6CB;
}
body.onb-open { overflow: hidden; }
.onb { position: fixed; inset: 0; z-index: 38; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; color: var(--o-ink); background: radial-gradient(60% 50% at 12% 0%, var(--o-glow1), transparent 62%), radial-gradient(45% 45% at 92% 100%, var(--o-glow2), transparent 62%), var(--o-bg); font-size: 15px; line-height: 1.45; }
.onb :focus-visible { outline: 3px solid var(--o-focus); outline-offset: 2px; }
.onb svg { width: 18px; height: 18px; flex: none; }
.onb-loading { display: grid; place-items: center; gap: 14px; min-height: 60vh; grid-row: 1 / -1; color: var(--o-muted); }
.onb-loading.small { min-height: 0; padding: 18px; grid-auto-flow: column; justify-content: start; font-size: 13px; }
.onb-top { display: flex; align-items: center; gap: 16px; padding: calc(12px + env(safe-area-inset-top, 0px)) max(28px, env(safe-area-inset-right, 0px)) 8px max(28px, env(safe-area-inset-left, 0px)); }
.onb-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 19px; color: var(--o-ink); }
.onb-brand .catchment-mark { width: 26px; height: 26px; }
.onb-count { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--o-muted); font-variant-numeric: tabular-nums; }
.onb-exit { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--o-edge); background: var(--o-panel); color: var(--o-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; backdrop-filter: var(--o-blur); }
.onb-exit:hover { border-color: var(--o-edge-2); }
.onb-progress { padding: 4px max(28px, env(safe-area-inset-right, 0px)) 10px max(28px, env(safe-area-inset-left, 0px)); }
.onb-bar { height: 6px; border-radius: 999px; background: var(--o-track); overflow: hidden; }
.onb-bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--o-teal); transition: width 0.4s ease; }
.onb-progress ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.onb-progress li button, .onb-card-steps li button, .onb-card-steps li .st { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 8px; border: 0; border-radius: 12px; background: none; color: var(--o-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.onb-progress li button:hover { background: var(--o-panel-2); color: var(--o-ink); }
.onb .dot, .onb-card .dot { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; font-size: 13px; font-weight: 700; background: var(--o-track); color: var(--o-ink-2); font-variant-numeric: tabular-nums; }
.onb .dot svg, .onb-card .dot svg { width: 14px; height: 14px; }
.onb-progress li.done .dot, .onb-card-steps li.done .dot, .onb-summary li.done .dot { background: var(--o-teal); color: var(--o-on-teal); }
.onb-progress li.skipped .dot, .onb-card-steps li.skipped .dot, .onb-summary li.skipped .dot { background: var(--o-panel); color: var(--o-muted); box-shadow: inset 0 0 0 1.5px var(--o-edge-2); }
.onb-progress li.current button { color: var(--o-ink); background: var(--o-panel); box-shadow: var(--o-shadow); }
.onb-progress li.current .dot { background: var(--o-coral); color: var(--o-on-coral); }
.onb-progress .lb, .onb-card-steps .lb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onb-main { overflow: auto; overscroll-behavior: contain; padding: 18px max(28px, env(safe-area-inset-right, 0px)) 28px max(28px, env(safe-area-inset-left, 0px)); }
.onb-stage { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 36px; align-items: start; }
.onb-copy { min-width: 0; }
.onb-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--o-teal-ink); }
.onb-eyebrow > span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--o-coral); color: var(--o-on-coral); font-size: 13px; letter-spacing: 0; }
.onb h1 { margin: 0 0 8px; font-size: clamp(28px, 3.3vw, 40px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 700; color: var(--o-ink); outline: none; }
.onb-lede { margin: 0 0 22px; font-size: 16px; color: var(--o-ink-2); max-width: 60ch; }
.onb-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; font-style: normal; font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; background: var(--o-track); color: var(--o-ink-2); white-space: nowrap; }
.onb-tag.done { background: var(--o-good-soft); color: var(--o-good); }
.onb-body { display: grid; gap: 16px; }
.onb-form { display: grid; gap: 14px; }
.onb-field { display: grid; gap: 6px; min-width: 0; }
.onb-field > span:first-child { font-size: 13px; font-weight: 700; color: var(--o-ink-2); }
.onb-field em, .onb-meta em { font-style: normal; font-weight: 500; color: var(--o-muted); }
.onb-field em.onb-match { color: var(--o-good); font-weight: 700; }
.onb input:not([type=radio]):not([type=checkbox]):not([type=color]):not([type=file]), .onb select { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--o-edge-2); background: var(--o-field); color: var(--o-ink); font: inherit; font-size: 16px; }
.onb input[readonly] { color: var(--o-muted); }
.onb input:focus, .onb select:focus { border-color: var(--o-teal); outline: none; box-shadow: 0 0 0 3px var(--o-teal-soft); }
.onb-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.onb-choice { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.onb-choice legend, .onb-seg legend, .onb-pick legend { font-size: 13px; font-weight: 700; color: var(--o-ink-2); margin-bottom: 6px; padding: 0; }
.onb-choice label { position: relative; display: grid; gap: 2px; padding: 14px 16px 14px 46px; border-radius: 16px; border: 1px solid var(--o-edge); background: var(--o-panel); cursor: pointer; backdrop-filter: var(--o-blur); }
.onb-choice label span { font-size: 13px; color: var(--o-muted); }
.onb-choice input, .onb-seg input, .onb-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.onb-choice label::before { content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--o-edge-2); }
.onb-choice label.on { border-color: var(--o-teal); box-shadow: 0 0 0 3px var(--o-teal-soft); }
.onb-choice label.on::before { box-shadow: inset 0 0 0 6px var(--o-teal); }
.onb-choice label:focus-within, .onb-seg label:focus-within, .onb-pick label:focus-within { outline: 3px solid var(--o-focus); outline-offset: 2px; }
.onb-seg { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.onb-seg legend { width: 100%; }
.onb-seg label { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--o-edge-2); background: var(--o-panel); font-weight: 700; font-size: 14px; cursor: pointer; }
.onb-seg label span { font-weight: 500; font-size: 13px; color: var(--o-muted); }
.onb-seg label.on { background: var(--o-teal); border-color: var(--o-teal); color: var(--o-on-teal); }
.onb-seg label.on span { color: var(--o-on-teal); opacity: 0.86; }
.onb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.onb-btn.small { min-height: 44px; padding: 0 16px; font-size: 14px; }
.onb-btn.primary { background: var(--o-teal); color: var(--o-on-teal); box-shadow: 0 4px 14px rgba(11, 100, 120, 0.2); }
.onb-btn.primary:hover { filter: brightness(1.06); }
.onb-btn.ghost { background: var(--o-panel); border-color: var(--o-edge-2); color: var(--o-ink); }
.onb-btn.ghost:hover { border-color: var(--o-teal); }
.onb-btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.onb-btn.busy { opacity: 0.7; cursor: progress; }
.onb-foot { display: flex; align-items: center; gap: 12px; padding: 12px max(28px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(28px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--o-edge); background: var(--o-panel); backdrop-filter: var(--o-blur); }
.onb-hint { flex: 1; min-width: 0; font-size: 13px; color: var(--o-muted); text-align: right; }
.onb-foot-r { display: flex; gap: 10px; }
.onb-err { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--o-bad-soft); color: var(--o-bad); font-size: 14px; font-weight: 600; }
.onb-note, .onb-empty, .onb-usage { margin: 0; font-size: 13px; color: var(--o-muted); }
.onb .usage-line, .onb-card .usage-line { font-size: 13px; }
.onb-empty { padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--o-edge-2); }
.onb-callout { display: grid; gap: 6px; padding: 16px 18px; border-radius: 18px; background: var(--o-panel); border: 1px solid var(--o-edge); backdrop-filter: var(--o-blur); }
.onb-callout b { font-size: 16px; }
.onb-callout span { color: var(--o-ink-2); font-size: 14px; }
.onb-callout.ok { border-color: color-mix(in srgb, var(--o-good) 40%, transparent); background: linear-gradient(0deg, var(--o-good-soft), var(--o-good-soft)), var(--o-panel); }
.onb-callout.warn { border-color: color-mix(in srgb, var(--o-warn) 40%, transparent); background: linear-gradient(0deg, var(--o-warn-soft), var(--o-warn-soft)), var(--o-panel); }
.onb-callout .onb-btn { justify-self: start; margin-top: 4px; }
.onb-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.onb-form-acts { display: flex; flex-wrap: wrap; gap: 10px; }
/* brand */
.onb-logos { display: flex; flex-wrap: wrap; gap: 10px; }
.onb-logo { position: relative; display: grid; place-items: center; width: 150px; height: 96px; padding: 12px; border-radius: 16px; background: #ffffff; border: 1px solid rgba(18, 25, 28, 0.12); }
.onb-logo.dark { background: #12191C; border-color: rgba(255, 255, 255, 0.14); }
.onb-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.onb-x { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--o-edge-2); background: var(--o-panel); color: var(--o-ink); cursor: pointer; }
.onb-logo .onb-x { position: absolute; top: -12px; right: -12px; background: var(--o-bg); }
.onb-x:hover { border-color: var(--o-bad); color: var(--o-bad); }
.onb-drop { position: relative; display: grid; place-content: center; gap: 2px; min-width: 200px; min-height: 96px; padding: 12px 18px; border-radius: 16px; border: 2px dashed var(--o-teal); background: var(--o-teal-soft); color: var(--o-teal-ink); cursor: pointer; text-align: center; }
.onb-drop span { font-size: 13px; color: var(--o-muted); }
.onb-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.onb-drop:focus-within { outline: 3px solid var(--o-focus); outline-offset: 2px; }
.onb-colour { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; }
.onb-colour-row { display: flex; gap: 8px; align-items: center; }
.onb-colour-row input[type=color] { width: 56px; height: 48px; padding: 4px; border-radius: 14px; border: 1px solid var(--o-edge-2); background: var(--o-field); cursor: pointer; }
.onb-colour-row #onb-colour-hex { width: 130px; font-variant-numeric: tabular-nums; text-transform: lowercase; }
.onb-colour .onb-note { flex-basis: 100%; }
/* connect */
.onb-connect { display: grid; gap: 10px; justify-items: start; }
.onb-google { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 24px 0 10px; border-radius: 999px; border: 1px solid var(--o-edge-2); background: #ffffff; color: #1f1f1f; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(18, 25, 28, 0.12); }
.onb-google .g { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; }
.onb-google .g svg { width: 22px; height: 22px; }
.onb-meta { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--o-edge); background: var(--o-panel-2); }
.onb-meta-l { flex: 1; display: grid; gap: 2px; }
.onb-meta-l > span { font-size: 13px; color: var(--o-muted); }
.onb-lists { display: grid; gap: 14px; }
.onb-pick { border: 0; margin: 0; padding: 0; }
.onb-pick legend span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--o-track); font-size: 13px; margin-left: 4px; }
.onb-pick-rows { display: grid; gap: 6px; max-height: 248px; overflow: auto; padding: 2px; }
.onb-pick label { position: relative; display: grid; gap: 1px; min-height: 48px; padding: 10px 14px 10px 44px; border-radius: 14px; border: 1px solid var(--o-edge); background: var(--o-panel); cursor: pointer; }
.onb-pick label::before { content: ""; position: absolute; left: 14px; top: 14px; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--o-edge-2); }
.onb-pick label.on { border-color: var(--o-teal); background: linear-gradient(0deg, var(--o-teal-soft), var(--o-teal-soft)), var(--o-panel); }
.onb-pick label.on::before { box-shadow: inset 0 0 0 6px var(--o-teal); }
.onb-pick label span { font-size: 13px; color: var(--o-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* client */
.onb-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--o-track); justify-self: start; }
.onb-tabs button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: none; color: var(--o-ink-2); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.onb-tabs button[aria-selected=true] { background: var(--o-panel); color: var(--o-ink); box-shadow: var(--o-shadow); }
.onb-kw { display: grid; gap: 12px; padding: 14px; border-radius: 18px; background: var(--o-panel-2); border: 1px solid var(--o-edge); }
.onb-chips { display: grid; gap: 8px; }
.onb-chips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.onb-chips li { display: inline-flex; align-items: center; gap: 2px; min-height: 36px; padding: 0 0 0 14px; border-radius: 999px; background: var(--o-teal); color: var(--o-on-teal); font-size: 14px; font-weight: 600; }
.onb-chips li button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.onb-chips li svg { width: 14px; height: 14px; }
.onb-chip-add { display: flex; gap: 8px; }
.onb-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.onb-sug:empty { display: none; }
.onb-sug em { font-style: normal; color: var(--o-muted); margin-right: 2px; }
.onb-sug button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--o-teal); background: none; color: var(--o-teal-ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.onb-sug button:hover { background: var(--o-teal-soft); }
/* report, team, secure */
.onb-report-cta p { margin: 0 0 10px; }
.onb-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.onb-ticks li { display: grid; gap: 2px; padding: 12px 14px 12px 46px; position: relative; border-radius: 16px; background: var(--o-panel); border: 1px solid var(--o-edge); }
.onb-ticks li::before { content: ""; position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; border-radius: 50%; background: var(--o-teal-soft); box-shadow: inset 0 0 0 6px var(--o-teal); }
.onb-ticks span { font-size: 13px; color: var(--o-muted); }
.onb-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.onb-people li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 44px; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 16px; background: var(--o-panel); border: 1px solid var(--o-edge); }
.onb-people .av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--o-coral-soft); color: var(--o-coral); font-weight: 800; }
.onb-people .who { display: grid; min-width: 0; }
.onb-people .who > span { font-size: 13px; color: var(--o-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onb-people em { font-style: normal; font-size: 13px; color: var(--o-muted); font-weight: 600; }
.onb-invite { padding: 16px; border-radius: 18px; background: var(--o-panel-2); border: 1px solid var(--o-edge); }
.onb-deadline { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 18px; background: var(--o-coral-soft); }
.onb-deadline b { font-size: 40px; line-height: 1; color: var(--o-coral); font-variant-numeric: tabular-nums; }
.onb-mfa { display: grid; gap: 10px; justify-items: start; padding: 16px; border-radius: 18px; background: var(--o-panel); border: 1px solid var(--o-edge); }
.onb-mfa .form { width: 100%; }
.onb-mfa .mfa-key { color: var(--o-ink); }
/* finish */
.onb-finish { max-width: 760px; margin: 4vh auto 0; display: grid; gap: 10px; justify-items: center; text-align: center; }
.onb-finish-mark { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--o-teal); color: var(--o-on-teal); box-shadow: 0 10px 30px rgba(11, 100, 120, 0.25); }
.onb-finish-mark svg { width: 44px; height: 44px; }
.onb-summary { list-style: none; margin: 10px 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.onb-summary button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 0 10px; align-items: center; width: 100%; min-height: 64px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--o-edge); background: var(--o-panel); color: var(--o-ink); font: inherit; text-align: left; cursor: pointer; }
.onb-summary .dot { grid-row: 1 / 3; }
.onb-summary .t { font-weight: 700; font-size: 14px; }
.onb-summary .s { font-size: 13px; color: var(--o-muted); }
.onb-finish-acts { margin-top: 8px; }
/* previews */
.onb-visual { position: sticky; top: 0; min-width: 0; }
.pv-stack { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pv { margin: 0; display: grid; gap: 8px; min-width: 0; }
.pv figcaption, .pv-k { font-size: 13px; font-weight: 700; color: var(--o-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.pv-page, .pv-card, .pv-client, .pv-report, .pv-sources, .pv-seats, .pv-shield { border-radius: 20px; background: var(--o-panel); border: 1px solid var(--o-edge); box-shadow: var(--o-shadow); backdrop-filter: var(--o-blur); overflow: hidden; }
.pv-page { aspect-ratio: 0.72; display: grid; grid-template-rows: auto 1fr; background: #ffffff; color: #12191C; }
.pv-band { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 76px; padding: 14px 16px; background: linear-gradient(135deg, var(--b), color-mix(in srgb, var(--b) 62%, #000)); color: var(--bi); }
.pv-band-t { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.pv-logo { display: grid; place-items: center; height: 44px; min-width: 44px; max-width: 110px; padding: 6px 10px; border-radius: 12px; background: #ffffff; }
.pv-logo.dark { background: #12191C; }
.pv-logo img { max-height: 32px; max-width: 90px; object-fit: contain; }
.pv-logo.text { background: var(--b); color: var(--bi); font-weight: 900; font-size: 20px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5); }
.pv-logo.big { height: 56px; min-width: 56px; }
.pv-cover-body { display: grid; align-content: start; gap: 8px; padding: 16px; }
.pv-cover-body .pv-k { color: #4A565B; }
.pv-cname { font-size: 21px; line-height: 1.15; letter-spacing: -0.02em; }
.onb h1:focus, .onb h1:focus-visible { outline: none; }
.pv-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 6px 0; }
.pv-tiles i { display: grid; padding: 8px; border-radius: 10px; background: #F3F5F6; font-style: normal; font-size: 11px; color: #4A565B; }
.pv-tiles b { font-size: 16px; color: #12191C; }
.pv-by { margin-top: auto; font-size: 12px; color: #4A565B; border-top: 1px solid #D3DADD; padding-top: 8px; }
.pv-card { display: grid; justify-items: center; gap: 8px; padding: 20px 16px; text-align: center; background: #ffffff; color: #12191C; }
.pv-card b { font-size: 15px; }
.pv-field { width: 100%; padding: 9px 10px; border-radius: 10px; border: 1px solid #D3DADD; color: #5A676D; font-size: 12px; text-align: left; }
.pv-btn { width: 100%; padding: 10px; border-radius: 999px; background: var(--b); color: var(--bi); font-weight: 800; font-size: 13px; }
.pv-foot { font-size: 11px; color: #5A676D; }
.pv-sources { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 70px 16px 16px; }
.pv-hub { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--o-panel-2); box-shadow: var(--o-shadow); }
.pv-hub .catchment-mark { width: 28px; height: 28px; }
.pv-src { display: grid; gap: 2px; padding: 12px 12px 12px 36px; position: relative; border-radius: 14px; background: var(--o-panel-2); border: 1px solid var(--o-edge); }
.pv-src i { position: absolute; left: 12px; top: 15px; width: 14px; height: 14px; border-radius: 50%; background: var(--o-track); }
.pv-src.on { border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.pv-src.on i { background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.pv-src b { font-size: 14px; }
.pv-src span { font-size: 13px; color: var(--o-muted); }
.pv-client { display: grid; gap: 10px; padding: 18px; }
.pv-client-head { display: flex; gap: 12px; align-items: center; }
.pv-client-head > span:last-child { display: grid; min-width: 0; }
.pv-client-head > span:last-child span { font-size: 13px; color: var(--o-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-terms { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pv-terms li { position: relative; display: flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 10px; background: var(--o-panel-2); font-size: 13px; font-weight: 600; overflow: hidden; }
.pv-terms li i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: color-mix(in srgb, var(--b) 18%, transparent); }
.pv-terms li span { position: relative; }
.pv-none { margin: 0; font-size: 13px; color: var(--o-muted); }
.pv-report { position: relative; background: #ffffff; color: #12191C; }
.pv-flag { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1; padding: 6px 14px; border-radius: 999px; background: var(--o-coral); color: var(--o-on-coral); font-size: 12px; font-weight: 800; white-space: nowrap; box-shadow: 0 8px 20px rgba(18, 25, 28, 0.25); }
.pv-report .pv-band { padding-top: 48px; }
.pv-rep-body { display: grid; gap: 10px; padding: 14px 16px 18px; }
.pv-rep-body .pv-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pv-line { width: 100%; height: 90px; }
.pv-seats { display: grid; justify-items: center; gap: 4px; padding: 26px 18px; position: relative; text-align: center; }
.pv-seats svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.pv-seats circle, .onb-card-ring circle { fill: none; stroke-width: 10; }
.pv-seats .trk, .onb-card-ring .trk { stroke: var(--o-track); }
.pv-seats .val, .onb-card-ring .val { stroke: var(--o-teal); stroke-linecap: round; }
.pv-seats .n { position: absolute; top: 80px; font-size: 15px; color: var(--o-muted); }
.pv-seats .n b { font-size: 34px; color: var(--o-ink); }
.pv-seats .l { margin-top: 8px; font-weight: 700; }
.pv-seats .s { font-size: 13px; color: var(--o-muted); }
.pv-shield { display: grid; justify-items: center; gap: 6px; padding: 30px 18px; text-align: center; }
.pv-shield svg { width: 120px; height: 120px; }
.pv-shield b { font-size: 20px; }
.pv-shield span { color: var(--o-muted); font-size: 14px; }
/* the Getting started card on the dashboard */
#onb-slot { padding: 12px 28px 0; }
.onb-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px 22px; align-items: center; padding: 18px 22px; border-radius: 22px; color: var(--o-ink); background: radial-gradient(70% 120% at 0% 0%, var(--o-glow1), transparent 70%), radial-gradient(50% 120% at 100% 100%, var(--o-glow2), transparent 70%), var(--o-panel); border: 1px solid var(--o-edge); box-shadow: var(--o-shadow); backdrop-filter: var(--o-blur); }
.onb-card-ring { position: relative; width: 76px; height: 76px; }
.onb-card-ring svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.onb-card-ring circle { stroke-width: 8; }
.onb-card-ring > span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--o-muted); }
.onb-card-ring > span b { font-size: 22px; color: var(--o-ink); }
.onb-card-ring > span { grid-auto-flow: column; align-content: center; }
.onb-card-eyebrow { margin: 0; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--o-teal-ink); }
.onb-card h2 { margin: 2px 0; font-size: 21px; letter-spacing: -0.015em; color: var(--o-ink); }
.onb-card-sub { margin: 0 0 8px; font-size: 14px; color: var(--o-ink-2); }
.onb-card-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.onb-card-steps li button, .onb-card-steps li .st { width: auto; padding: 4px 12px 4px 5px; border-radius: 999px; background: var(--o-panel-2); border: 1px solid var(--o-edge); color: var(--o-ink-2); }
.onb-card-steps li .st { cursor: default; }
.onb-card-steps li button:hover { border-color: var(--o-teal); color: var(--o-ink); }
.onb-card-steps li.next button { border-color: var(--o-coral); }
.onb-card-steps li.next .dot { background: var(--o-coral); color: var(--o-on-coral); }
.onb-card-acts { display: flex; flex-direction: column; gap: 8px; }
.onb-card-acts .btn { min-height: 44px; white-space: nowrap; }
.onb-card-acts .btn:not(.ghost) { background: var(--o-teal); border-color: var(--o-teal); color: var(--o-on-teal); }
.banner.onb-report { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.onb-sender { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--hair); }
.onb-sender-preview { margin: 0; font-size: 13px; color: var(--muted); }
/* widths */
@media (max-width: 1100px) { .onb-progress .lb { display: none; } .onb-progress li.current .lb { display: inline; } .onb-progress ol { grid-template-columns: repeat(7, auto); justify-content: space-between; } }
@media (max-width: 900px) {
  .onb-stage { grid-template-columns: 1fr; gap: 22px; }
  .onb-visual { position: static; }
  .pv-stack { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .onb-card { grid-template-columns: auto minmax(0, 1fr); }
  .onb-card-acts { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .onb { font-size: 15px; }
  .onb-top, .onb-progress, .onb-main, .onb-foot { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .onb-exit span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .onb-exit { width: 44px; padding: 0; justify-content: center; }
  .onb-progress ol { gap: 2px; }
  .onb-progress li button { padding: 4px 2px; justify-content: center; }
  .onb-progress li.current .lb { display: none; }
  .onb h1 { font-size: 28px; }
  .onb-lede { font-size: 15px; margin-bottom: 16px; }
  .onb-grid2, .onb-choice { grid-template-columns: 1fr; }
  .pv-stack { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pv-page { aspect-ratio: auto; }
  .pv-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pv-rep-body .pv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-band { min-height: 60px; padding: 10px 12px; }
  .pv-cover-body { padding: 12px; }
  .pv-cname { font-size: 17px; }
  .onb-foot { flex-wrap: wrap; gap: 8px; }
  .onb-hint { order: -1; flex-basis: 100%; text-align: left; }
  .onb-foot-r { margin-left: auto; }
  .onb-btn { padding: 0 16px; }
  .onb-foot .onb-btn.ghost#onb-back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .onb-foot #onb-back { width: 48px; padding: 0; }
  .onb-people li { grid-template-columns: 36px minmax(0, 1fr) auto 44px; gap: 8px; }
  .onb-logo { width: 130px; }
  .onb-drop { min-width: 0; flex: 1; }
  #onb-slot { padding: 10px 16px 0; }
  .onb-card { padding: 16px; gap: 12px; }
  .onb-card-ring, .onb-card-ring svg { width: 60px; height: 60px; }
  .onb-card h2 { font-size: 18px; }
  .onb-card-steps .lb { display: none; }
  .onb-card-steps li button, .onb-card-steps li .st { padding: 4px; }
  .onb-meta { flex-wrap: wrap; }
}
@media (max-width: 420px) { .pv-stack { grid-template-columns: 1fr; } .pv-login { display: none; } }
@media print { #onb-slot, .onb { display: none !important; } }

/* Previews of client-facing pages are always light. */
.pv-page, .pv-card, .pv-report { --cm-1: #12191C; --cm-2: #6C7072; --cm-3: #AAACAD; --cm-core: #0B6478; }
