/* Telonyte OS shell, CyberForte theme. Tokens and components follow docs/design/DESIGN-SYSTEM.md.
   Loaded after styles.css. Old variable names stay so existing pages keep working. */

:root, :root[data-theme="light"] {
  --brand: #0061F8; --brand-hi: #2D7BFF; --brand-deep: #0044E4; --brand-cyan: #00A4FC; --brand-navy: #0B1220;
  --brand-tint: rgba(0, 97, 248, .10); --brand-tint-2: rgba(0, 97, 248, .16);
  --bg: #F5F5F7; --ink: #1D1D1F; --ink-2: #424245; --ink-3: #6E6E73; --ink-4: #AAAAAA;
  --hair: rgba(29, 29, 31, .08); --hair-2: rgba(29, 29, 31, .14); --surface: #FFFFFF;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .58));
  --glass-strong: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .78));
  --glass-border: rgba(255, 255, 255, .75);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 .5px rgba(255, 255, 255, .6);
  --blur: blur(28px) saturate(170%);
  --overlay: rgba(255, 255, 255, .92);
  --overlay-edge: rgba(29, 29, 31, .12);
  --overlay-blur: blur(44px) saturate(180%);
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -10px rgba(16, 24, 40, .12);
  --shadow-2: 0 2px 6px rgba(16, 24, 40, .05), 0 24px 48px -16px rgba(16, 24, 40, .18);
  --shadow-btn: 0 1px 1px rgba(0, 0, 0, .04), 0 4px 12px -4px rgba(16, 24, 40, .14);
  --ok: #2F8F68; --ok-t: rgba(47, 143, 104, .12);
  --warn: #B7791F; --warn-t: rgba(183, 121, 31, .12);
  --high: #C2643A; --high-t: rgba(194, 100, 58, .12);
  --crit: #B8433B; --crit-t: rgba(184, 67, 59, .11);
  --info: #6E6E73; --info-t: rgba(110, 110, 115, .12);
  --track: rgba(29, 29, 31, .08);
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px; --r-pill: 999px;
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  color-scheme: light;
  /* names the existing pages already use */
  --text: var(--ink); --muted: var(--ink-3); --link: var(--brand); --border: var(--hair-2);
  --surface-2: var(--bg); --hover: var(--hair); --primary: var(--brand); --primary-hover: var(--brand-hi); --on-primary: #fff;
  --focus: var(--brand); --navy: var(--brand-navy); --navy-2: #121A2B; --blue: var(--brand); --blue-2: var(--brand-hi);
  --critical: var(--crit); --medium: var(--warn); --low: var(--brand); --good: var(--ok); --bad: var(--crit);
  --critical-fill: var(--crit); --high-fill: var(--high); --medium-fill: var(--warn); --low-fill: var(--brand); --good-fill: var(--ok); --bad-fill: var(--crit);
  --s1: var(--brand); --s3: var(--ok); --sidebar: transparent; --sidebar-text: var(--ink-2); --sidebar-muted: var(--ink-4); --sidebar-active: transparent;
  --radius: var(--r-lg); --shadow: var(--shadow-1);
}
:root[data-theme="dark"] {
  --bg: #0B1220; --ink: #F5F5F7; --ink-2: #D2D2D7; --ink-3: #9AA3B5; --ink-4: #6B7489;
  --hair: rgba(255, 255, 255, .08); --hair-2: rgba(255, 255, 255, .14); --surface: #121A2B;
  --brand: #2D7BFF; --brand-hi: #4C8FFF; --brand-tint: rgba(45, 123, 255, .16); --brand-tint-2: rgba(45, 123, 255, .24);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .04));
  --glass-strong: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .07));
  --glass-border: rgba(255, 255, 255, .09);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .10), inset 0 0 0 .5px rgba(255, 255, 255, .05);
  --overlay: rgba(18, 26, 43, .92);
  --overlay-edge: rgba(255, 255, 255, .14);
  --overlay-blur: blur(48px) saturate(180%);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .55);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, .35), 0 28px 56px -18px rgba(0, 0, 0, .65);
  --shadow-btn: 0 1px 1px rgba(0, 0, 0, .3), 0 6px 14px -6px rgba(0, 0, 0, .6);
  --ok: #5CC499; --ok-t: rgba(92, 196, 153, .14);
  --warn: #E0B35A; --warn-t: rgba(224, 179, 90, .14);
  --high: #E8936A; --high-t: rgba(232, 147, 106, .14);
  --crit: #F08A82; --crit-t: rgba(240, 138, 130, .14);
  --info: #9AA3B5; --info-t: rgba(154, 163, 181, .14);
  --track: rgba(255, 255, 255, .09);
  --navy-2: #121A2B;
  color-scheme: dark;
}

body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  font-size: 13px; line-height: 1.45; letter-spacing: -.006em;
  font-feature-settings: "cv11", "ss01", "ss03";
}
h1 { font-size: 30px; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-weight: 600; letter-spacing: -.015em; }
.muted, .small { color: var(--ink-3); }
.eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); }

.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.backdrop i { position: absolute; border-radius: 50%; filter: blur(90px); }
.backdrop .b1 { width: 720px; height: 620px; left: -160px; top: -220px; background: radial-gradient(circle, rgba(0, 97, 248, .26), rgba(0, 97, 248, 0) 70%); }
.backdrop .b2 { width: 760px; height: 640px; right: -200px; top: 120px; background: radial-gradient(circle, rgba(0, 164, 252, .22), rgba(0, 164, 252, 0) 70%); }
.backdrop .b3 { width: 640px; height: 520px; left: 38%; bottom: -300px; background: radial-gradient(circle, rgba(68, 90, 255, .16), rgba(68, 90, 255, 0) 70%); }
:root[data-theme="dark"] .backdrop .b1 { background: radial-gradient(circle, rgba(0, 97, 248, .34), rgba(0, 97, 248, 0) 70%); }
:root[data-theme="dark"] .backdrop .b2 { background: radial-gradient(circle, rgba(0, 164, 252, .18), rgba(0, 164, 252, 0) 70%); }
:root[data-theme="dark"] .backdrop .b3 { background: radial-gradient(circle, rgba(90, 70, 255, .18), rgba(90, 70, 255, 0) 70%); }

#app.shell { display: block; min-height: 100vh; background: transparent; }
body:has(#app:not([hidden])) { overflow: hidden; }

.topbar {
  position: fixed; z-index: 20; left: 0; right: 0; top: 0; height: 52px;
  display: flex; align-items: center; padding: 0 16px; gap: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .35));
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: .5px solid var(--hair);
}
:root[data-theme="dark"] .topbar { background: linear-gradient(180deg, rgba(11, 18, 32, .7), rgba(11, 18, 32, .45)); }
.switcher, .profile {
  display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 12px 0 6px;
  border-radius: var(--r-pill); background: var(--glass-strong); border: 1px solid var(--glass-border);
  box-shadow: var(--glass-hi), var(--shadow-btn); font-weight: 600; font-size: 13.5px; color: var(--ink); cursor: pointer;
}
.profile { padding-left: 4px; font-size: 12.5px; font-weight: 550; max-width: 220px; }
.profile .who, .profile .me-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher .appicon, .switcher .ai { width: 26px; height: 26px; border-radius: 8px; }
.topbar .search {
  width: min(380px, 32vw); margin-left: auto; margin-right: auto; height: 36px; cursor: pointer; text-align: left; flex: 0 1 380px;
  background: var(--glass-strong); box-shadow: var(--glass-hi), inset 0 0 0 .5px var(--hair); color: var(--ink-4);
}
.topbar:has(#tk-timer:not([hidden])) .search { margin-right: 8px; }
.topbar .right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.clock { font-size: 12.5px; color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 650; color: #fff; background: linear-gradient(135deg, #5E9BFF, #0044E4); }
.topbar .icon-btn, #theme-btn.icon-btn, #os-bell.icon-btn {
  width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 50%;
  display: inline-grid; place-items: center; border: 1px solid var(--glass-border);
  background: var(--glass-strong); backdrop-filter: var(--blur); box-shadow: var(--glass-hi), var(--shadow-btn); color: var(--ink-2);
}
.icon-btn .dot, #os-bell .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--bg); }
#os-bell { position: relative; }
.os-slot { position: relative; }
.os-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; min-width: 240px; padding: 6px;
  border-radius: 24px; background: var(--overlay); backdrop-filter: var(--overlay-blur); -webkit-backdrop-filter: var(--overlay-blur);
  border: 1px solid var(--overlay-edge); box-shadow: var(--shadow-2), var(--glass-hi); color: var(--ink);
}
#os-bell-slot .os-pop { left: auto; right: 0; width: 320px; }
.os-pop .list-i { width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; color: inherit; }
.os-pop .list-i.on { background: var(--brand); color: #fff; }
.os-pop .k { margin-left: auto; font-size: 11px; color: var(--ink-4); }
.os-pop .list-i.on .k { color: rgba(255, 255, 255, .8); }

.sidebar {
  position: fixed; z-index: 10; left: 14px; top: 66px; bottom: 14px; width: 232px;
  padding: 14px 10px; display: flex; flex-direction: column; overflow: auto;
  border-radius: var(--r-xl); background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-hi), var(--shadow-1); color: var(--ink-2);
}
.sidebar .cobrand { padding: 2px 6px 8px; }
.sidebar .company-logo { max-width: 100%; max-height: 36px; object-fit: contain; }
.sidebar .company { margin: 0 2px 8px; }
.sidebar .company select, .sidebar select {
  width: 100%; height: 40px; border-radius: var(--r-md); background: var(--surface); color: var(--ink);
  border: 0; box-shadow: inset 0 0 0 .5px var(--hair), var(--shadow-btn); font-weight: 600;
}
:root[data-theme="dark"] .sidebar select { background: rgba(255, 255, 255, .06); }
.tabs { position: relative; display: flex; flex-direction: column; gap: 2px; }
.nav-g { margin-top: 4px; }
.nav-g > .eyebrow { display: block; padding: 8px 12px 3px; }
.tabs button {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px;
  height: 36px; width: 100%; padding: 0 10px 0 4px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 500; text-align: left;
}
.tabs button svg {
  width: 27px; height: 27px; padding: 5px; box-sizing: border-box; border-radius: 50%; color: var(--ink-3); stroke-width: 1.7;
}
.tabs button:hover { background: var(--hair); }
.tabs button[aria-selected="true"] {
  background: var(--surface); color: var(--ink); font-weight: 600;
  box-shadow: inset 0 0 0 .5px var(--hair), 0 1px 2px rgba(0, 0, 0, .05), 0 6px 14px -8px rgba(16, 24, 40, .25);
}
.tabs button[aria-selected="true"]::before { content: none; }
.tabs button[aria-selected="true"] svg {
  background: linear-gradient(180deg, var(--brand-hi), var(--brand)); color: #fff;
  box-shadow: 0 4px 10px -4px rgba(0, 97, 248, .7);
}
:root[data-theme="dark"] .tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .1); }
.nav-count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 7px; border-radius: var(--r-pill);
  display: inline-grid; place-items: center; background: var(--brand-tint); color: var(--brand); font-size: 11px; font-weight: 600;
}
html.os-motion .tabs button[aria-selected="true"] { background: transparent; box-shadow: none; }
#os-nav-pill {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; border-radius: var(--r-pill);
  background: var(--surface); box-shadow: inset 0 0 0 .5px var(--hair), 0 1px 2px rgba(0, 0, 0, .05), 0 6px 14px -8px rgba(16, 24, 40, .25);
}
:root[data-theme="dark"] #os-nav-pill { background: rgba(255, 255, 255, .1); }
.tenant-card {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 2px 8px;
  border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 .5px var(--hair), var(--shadow-btn);
  position: relative;
}
:root[data-theme="dark"] .tenant-card { background: rgba(255, 255, 255, .06); }
.tenant-card .tl { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); flex: none; }
.tenant-card .tl svg { width: 16px; height: 16px; }
.tenant-card b { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.tenant-card .meta { font-size: 11px; color: var(--ink-3); }
.tenant-card select {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; min-height: 0; box-shadow: none;
}
#admin-back { margin: 0 0 8px; color: var(--brand); font-weight: 650; }
.nav-nest { margin: 0 0 2px 16px; display: flex; flex-direction: column; }
.nav-nest button { height: 32px; font-size: 12.5px; }
.nav-label { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px 0 4px; color: var(--ink); font-size: 13px; font-weight: 600; }
.nav-label svg { width: 27px; height: 27px; padding: 5px; box-sizing: border-box; border-radius: 50%; color: var(--ink-3); }
.side-foot {
  margin-top: auto; padding: 9px 12px; border-radius: var(--r-md); background: var(--surface);
  box-shadow: inset 0 0 0 .5px var(--hair); color: var(--ink-3); font-size: 11.5px;
  display: flex; align-items: center; gap: 10px;
}
.side-foot b { display: block; font-size: 12px; font-weight: 600; color: var(--ink); }
.side-foot .scan-ring { width: 38px; height: 38px; flex: none; }
.profile .me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.profile #who:empty::before { content: "Account"; color: var(--ink-3); font-weight: 550; }
:root[data-theme="dark"] .side-foot { background: rgba(255, 255, 255, .05); }
.side-foot .scan-status { padding: 0; color: inherit; }

.main-col {
  position: fixed; z-index: 5; left: 260px; right: 14px; top: 52px; bottom: 0;
  overflow: auto; padding: 8px 8px 112px; background: transparent;
}
.pagebar { padding: 16px 8px 8px; align-items: flex-end; }
.pagebar .titles { flex: 1; }
.pagebar p { margin: 6px 0 0; font-size: 12.5px; }
main { padding: 6px 4px 24px; max-width: none; }
main.os-swap { animation: os-fade 280ms ease; }
main.os-from-dock { animation: os-zoom 480ms cubic-bezier(.16, 1, .3, 1); transform-origin: 50% 120%; }
@keyframes os-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes os-zoom { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }

.dock, #os-dock {
  position: fixed; z-index: 30; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 2px; padding: 8px 12px 6px; border-radius: 26px;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-hi), var(--shadow-1);
}
.dock-row { display: flex; align-items: flex-end; gap: 2px; }
.dock-slot { display: contents; }
.dock-sep { width: 1px; height: 40px; background: var(--hair-2); margin: 0 6px 18px; align-self: center; }
.dock-app {
  display: flex; flex-direction: column; align-items: center; gap: 3px; width: 64px;
  border: 0; background: transparent; cursor: pointer; color: inherit; padding: 0;
}
.dock-label { font-size: 10px; color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.dock-app.on .dock-label { color: var(--ink); font-weight: 600; }
.dock-app .pip { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.dock-app.on .pip { background: var(--ink-2); }
.dock-ico { display: grid; place-items: center; }
.dock-ico .appicon { width: 100%; height: 100%; border-radius: 26%; }
.appicon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; position: relative; box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 6px 14px -6px rgba(16, 24, 40, .3); }
.appicon.cf { background: radial-gradient(120% 90% at 50% 0%, #1B2A4E 0%, #0B1220 70%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 .5px rgba(255, 255, 255, .08), 0 8px 18px -6px rgba(0, 97, 248, .55); }
.appicon.cf img { width: 58%; height: auto; filter: drop-shadow(0 0 6px rgba(0, 120, 255, .55)); }
.appicon.ph { background: linear-gradient(180deg, #FFFFFF, #ECECEF); color: #A1A1A6; box-shadow: inset 0 1px 0 #fff, inset 0 0 0 .5px rgba(0, 0, 0, .08), 0 6px 14px -8px rgba(16, 24, 40, .3); }
:root[data-theme="dark"] .appicon.ph { background: linear-gradient(180deg, #2A3245, #1C2333); color: #6B7489; }
.appicon.ph svg, .appicon.ph .i { width: 20px; height: 20px; }

/* controls */
.primary, a.primary, button.primary {
  background: linear-gradient(180deg, var(--brand-hi), var(--brand)); color: #fff; border: 0; border-radius: var(--r-pill);
  min-height: 34px; height: 34px; padding: 0 16px; font-weight: 550; font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 6px 16px -6px rgba(0, 97, 248, .6);
}
.primary:hover, a.primary:hover { background: linear-gradient(180deg, var(--brand-hi), var(--brand)); filter: brightness(1.05); }
.btn, a.btn, button.btn {
  background: var(--surface); color: var(--ink); border: 0; border-radius: var(--r-pill); min-height: 34px;
  box-shadow: inset 0 0 0 .5px var(--hair-2), var(--shadow-btn); font-weight: 550;
}
.ghost { border-radius: var(--r-pill); color: var(--ink-2); }
.link, button.link { color: var(--brand); font-weight: 550; }
.primary:active, .btn:active, .icon-btn:active, .switcher:active, .profile:active { transform: scale(.97); }
select, input, textarea {
  background: var(--surface); color: var(--ink); border: 0; border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 .5px var(--hair-2); min-height: 40px;
}
textarea, select[size] { border-radius: var(--r-md); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 4px var(--brand-tint); }
.field { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 .5px var(--hair-2); color: var(--ink-3); }
.field input { border: 0; box-shadow: none; height: auto; min-height: 0; padding: 0; background: transparent; flex: 1; }
.kbd { font-size: 11px; color: var(--ink-4); padding: 2px 6px; border-radius: 6px; box-shadow: inset 0 0 0 .5px var(--hair-2); }

.seg { position: relative; display: inline-flex; padding: 3px; gap: 0; border: 0; border-radius: var(--r-pill); background: var(--track); box-shadow: inset 0 0 0 .5px var(--hair); }
.seg-btn { position: relative; z-index: 1; background: transparent; color: var(--ink-3); border: 0; border-radius: var(--r-pill); min-height: 28px; height: 28px; padding: 0 14px; font-weight: 550; font-size: 12.5px; }
.seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 3px 8px -3px rgba(0, 0, 0, .14); }
:root[data-theme="dark"] .seg-btn[aria-pressed="true"] { background: rgba(255, 255, 255, .14); }
html.os-motion .seg-btn[aria-pressed="true"] { background: transparent; box-shadow: none; color: var(--ink); }
.seg-thumb { position: absolute; left: 0; top: 0; z-index: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 3px 8px -3px rgba(0, 0, 0, .14); pointer-events: none; }
:root[data-theme="dark"] .seg-thumb { background: rgba(255, 255, 255, .14); }

.card, .box {
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border); border-radius: var(--r-lg); box-shadow: var(--glass-hi), var(--shadow-1); color: var(--ink);
}
.card .label, .kpi .label { font-size: 12px; font-weight: 550; color: var(--ink-3); }
.card .big, .kpi .big, .pf-n { font-weight: 250; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
table { font-size: 12.5px; }
th { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-4); }
td { border-top: .5px solid var(--hair); height: 38px; }
.pill { border-radius: var(--r-pill); font-weight: 600; text-transform: none; border: 0; height: 22px; }
.pill.critical, .pill.crit { background: var(--crit-t); color: var(--crit); }
.pill.high { background: var(--high-t); color: var(--high); }
.pill.medium, .pill.warn { background: var(--warn-t); color: var(--warn); }
.pill.low, .pill.info, .pill.brand { background: var(--brand-tint); color: var(--brand); }
.pill.pass, .pill.verified, .pill.online, .pill.verdict-ok, .pill.good { background: var(--ok-t); color: var(--ok); }
.pill.fail, .pill.reopened, .pill.open, .pill.verdict-bad { background: var(--crit-t); color: var(--crit); }
.badge { background: var(--brand-tint); color: var(--brand); border-radius: var(--r-pill); font-weight: 600; }

.menu {
  background: var(--overlay); color: var(--ink); border: 1px solid var(--overlay-edge);
  border-radius: 24px; box-shadow: var(--shadow-2), var(--glass-hi); backdrop-filter: var(--overlay-blur); -webkit-backdrop-filter: var(--overlay-blur);
  bottom: auto; top: calc(100% + 8px); left: auto; right: 0; width: 280px; padding: 6px;
}
.menu button[role="menuitem"] { color: var(--ink); border-radius: 14px; }
.menu button[role="menuitem"]:hover { background: var(--hair); }
.menu-h .muted, .menu svg, .menu-eyebrow { color: var(--ink-3); }
.menu-sep { background: var(--hair); }

#drawer {
  top: 12px; right: 12px; bottom: 12px; width: min(520px, calc(100% - 24px)); z-index: 50;
  border: 1px solid var(--overlay-edge); border-radius: 30px; background: var(--overlay);
  backdrop-filter: var(--overlay-blur); -webkit-backdrop-filter: var(--overlay-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 48px 96px -28px rgba(16, 24, 40, .42);
  color: var(--ink);
}
:root[data-theme="dark"] #drawer { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 48px 96px -28px rgba(0, 0, 0, .65); }
#drawer.wide { width: min(920px, calc(100% - 24px)); }
#drawer.os-in { animation: os-sheet 480ms cubic-bezier(.16, 1, .3, 1); }
#drawer.os-out { animation: os-genie 320ms cubic-bezier(.16, 1, .3, 1) forwards; transform-origin: 50% 100%; }
@keyframes os-sheet { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes os-genie { to { opacity: 0; transform: translateY(48px) scale(.42); } }
@keyframes os-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes os-fade-out { to { opacity: 0; } }
#os-drawer-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(11, 18, 32, .28); backdrop-filter: blur(10px); }
#os-drawer-scrim.os-out { animation: os-fade-out 320ms linear forwards; }
#drawer .close { border-radius: 50%; width: 34px; height: 34px; background: var(--overlay); border: 1px solid var(--overlay-edge); color: var(--ink); }
#drawer.os-window {
  inset: 0; margin: auto; right: 0; bottom: 0; left: 0; top: 0;
  width: min(900px, 90vw); height: min(85vh, 860px); max-height: 85vh;
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
  border-radius: 14px; transform: none;
}
#drawer.os-window #drawer-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 22px 28px; }
#drawer.os-window .close { display: none; }
#drawer.os-window .os-titlebar {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; flex: none;
  border-bottom: .5px solid var(--hair);
}
#drawer.os-window .os-titlebar[hidden] { display: none !important; }
#drawer .traffic { position: relative; width: 12px; height: 12px; min-height: 12px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
#drawer .traffic::after { content: ""; position: absolute; inset: -8px; }
#drawer #win-close { background: #FF5F57; }
#drawer #win-min { background: #FEBC2E; }
#drawer #win-zoom { background: #28C840; }
#drawer .traffic:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
#drawer .os-titlebar-title { margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#drawer.os-window.os-min { display: none !important; }
#drawer.os-window.wide { width: min(1040px, 94vw); height: min(90vh, 920px); max-height: 90vh; }
#drawer.os-window.os-zoom {
  top: 58px; right: 16px; bottom: 100px; left: 276px;
  width: auto; height: auto; max-height: none; margin: 0;
}
#drawer.os-window.wide.os-zoom { width: auto; height: auto; max-height: none; }
@media (max-width: 900px) {
  #drawer.os-window, #drawer.os-window.wide, #drawer.os-window.os-zoom {
    inset: 0; width: 100%; height: 100%; max-height: none; margin: 0; border-radius: 0;
  }
}
.sk {
  display: block; height: 12px; border-radius: 8px; margin: 8px 0;
  background: linear-gradient(90deg, var(--hair), color-mix(in srgb, var(--ink) 8%, transparent) 40%, var(--hair));
  background-size: 220% 100%; animation: sk 1.1s linear infinite;
}
.sk.lg { height: 44px; border-radius: 12px; }
.sk.md { width: 58%; } .sk.sm { width: 28%; }
@keyframes sk { to { background-position: -220% 0; } }
#os-dock-stack { display: none; align-items: flex-end; align-self: stretch; }
#os-dock-stack.has-mins {
  display: flex; margin-left: 8px; padding-left: 10px;
  border-left: 1px solid var(--hair-2);
}
#os-dock-stack .dock-ico { width: 46px; height: 46px; }
#os-dock-stack .dock-app { position: relative; }
#os-dock-stack .pip.on { background: var(--ink-2); }
.stack-pile {
  width: 46px; height: 46px; position: relative; display: block;
}
.stack-pile i {
  position: absolute; left: 8px; top: 7px; width: 28px; height: 34px; border-radius: 6px;
  background: linear-gradient(180deg, #fff, #ececf1);
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12), 0 4px 8px -4px rgba(16, 24, 40, .45);
}
:root[data-theme="dark"] .stack-pile i { background: linear-gradient(180deg, #3a445c, #232b3d); }
.stack-pile i:nth-child(1) { transform: rotate(-14deg) translate(-4px, 2px); }
.stack-pile i:nth-child(2) { transform: rotate(0deg) translate(0, -1px); }
.stack-pile i:nth-child(3) { transform: rotate(12deg) translate(5px, 2px); }
.stack-count {
  position: absolute; right: -2px; top: -2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 97, 248, .45);
}
#os-stack-fan {
  position: fixed; z-index: 80; width: 0; height: 0; pointer-events: none;
}
#os-stack-fan .fan-arc { position: relative; }
.fan-item {
  position: absolute; left: 0; top: 0; pointer-events: auto;
  display: flex; flex-direction: row-reverse; align-items: center; gap: 8px; width: max-content; max-width: 240px;
  padding: 6px 8px 6px 10px; border-radius: 12px; cursor: pointer; color: var(--ink);
  background: #121a2b; border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .7);
  transform: translate(calc(-100% + var(--x, 0px)), 10px) scale(.55); opacity: 0;
  transform-origin: right center;
  transition: transform .42s cubic-bezier(.3, 1.3, .5, 1), opacity .18s linear;
  transition-delay: var(--d, 0ms);
}
#os-stack-fan.open .fan-item {
  opacity: 1;
  transform: translate(calc(-100% + var(--x)), var(--y)) rotate(var(--rot)) scale(1);
}
.fan-item:hover, .fan-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; z-index: 3; }
.fan-item.fan-extra { font-size: 12px; font-weight: 700; padding: 6px 12px; }
.fan-thumb {
  width: 52px; height: 38px; border-radius: 7px; flex: none; position: relative;
  background: #0b1220; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  display: grid; place-items: center;
}
.fan-thumb .d { position: absolute; top: 5px; width: 6px; height: 6px; border-radius: 50%; }
.fan-thumb .r { left: 6px; background: #FF5F57; }
.fan-thumb .y { left: 15px; background: #FEBC2E; }
.fan-thumb .g { left: 24px; background: #28C840; }
.fan-thumb .appicon { width: 16px; height: 16px; box-shadow: none; background: transparent; margin-top: 8px; }
.fan-thumb .appicon svg { width: 14px; height: 14px; }
.fan-name { font-size: 12.5px; font-weight: 650; text-align: right; white-space: nowrap; max-width: 168px; overflow: hidden; text-overflow: ellipsis; }
#os-dock-stack .dock-ico { transform-origin: center bottom; transition: transform .12s linear; }
#drawer.os-window.os-in { animation: os-fade 180ms linear; }
#drawer.os-window.os-out { animation: os-fade-out 220ms linear forwards; transform-origin: 50% 120%; }

.ui-dialog {
  border: 0; padding: 0; border-radius: 32px; color: var(--ink); max-width: min(560px, calc(100% - 32px));
  background: var(--overlay); backdrop-filter: var(--overlay-blur); -webkit-backdrop-filter: var(--overlay-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 48px 96px -28px rgba(16, 24, 40, .42);
}
:root[data-theme="dark"] .ui-dialog { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 48px 96px -28px rgba(0, 0, 0, .65); color: var(--ink); }
.ui-dialog::backdrop { background: rgba(20, 26, 44, .18); backdrop-filter: blur(7px); }
.ui-dialog form { padding: 22px 24px; }
.ui-dialog h3, .ui-dialog h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.ui-dialog.os-mfa { padding: 0; width: min(480px, calc(100% - 32px)); }
.ui-dialog .sh-h { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px 0; }
.ui-dialog .sh-h .ti { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); flex: none; }
.ui-dialog .sh-h .ti svg { width: 20px; height: 20px; }
.ui-dialog .sh-h p, .ui-dialog .card-s { color: var(--ink-3); font-size: 12.5px; margin: 4px 0 0; }
.ui-dialog .sh-h .icon-btn { margin-left: auto; }
.ui-dialog .sh-b { padding: 8px 22px 18px; }
.ui-dialog .qr { display: flex; justify-content: center; margin: 14px 0; padding: 12px; border-radius: 16px; background: #fff; }
.ui-dialog .qr svg { width: 180px; height: 180px; background: #fff; }
.ui-dialog .mfa-key code { display: block; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); font-family: ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; }
.ui-dialog .sh-f { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 12px; border-top: .5px solid var(--hair); }
.ui-dialog[open] { animation: os-pop 420ms cubic-bezier(.16, 1, .3, 1); }
@keyframes os-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

#toast {
  left: auto; right: 18px; bottom: 108px; transform: none; width: min(340px, calc(100% - 36px));
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 22px; z-index: 70;
  background: var(--overlay); color: var(--ink); backdrop-filter: var(--overlay-blur); -webkit-backdrop-filter: var(--overlay-blur);
  border: 1px solid var(--overlay-edge); box-shadow: var(--shadow-2), var(--glass-hi); font-weight: 550;
}
#toast.os-in { animation: os-toast 420ms cubic-bezier(.16, 1, .3, 1); }
@keyframes os-toast { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

.os-pal-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(20, 26, 44, .18); backdrop-filter: blur(7px); display: grid; align-items: start; justify-content: center; padding-top: 12vh; }
.os-pal { width: min(680px, calc(100vw - 32px)); border-radius: 28px; overflow: hidden; background: var(--overlay); border: 1px solid var(--overlay-edge); box-shadow: var(--shadow-2), var(--glass-hi); backdrop-filter: var(--overlay-blur); -webkit-backdrop-filter: var(--overlay-blur); color: var(--ink); }
.os-pal-q { width: 100%; border: 0; outline: none; box-shadow: none; border-radius: 0; height: 64px; padding: 0 22px; font-size: 22px; font-weight: 500; letter-spacing: -.02em; background: transparent; }
.os-pal-q:focus { box-shadow: none; }
.os-pal-list { max-height: min(420px, 50vh); overflow: auto; padding: 4px 8px 8px; }
.os-pal .list-i, .grp { display: flex; }
.list-i { align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; width: 100%; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.list-i.on { background: var(--brand); color: #fff; }
.grp { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); padding: 10px 12px 4px; }
.os-pal-empty { padding: 16px; color: var(--ink-3); }
.os-pal-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: .5px solid var(--hair); color: var(--ink-4); font-size: 11px; }
.os-dialog { border: 0; padding: 0; background: transparent; color: var(--ink); }
.os-dialog::backdrop { background: rgba(20, 26, 44, .18); backdrop-filter: blur(7px); }
.os-dialog-body { border-radius: 32px; background: var(--overlay); backdrop-filter: var(--overlay-blur); -webkit-backdrop-filter: var(--overlay-blur); border: 1px solid var(--overlay-edge); box-shadow: 0 48px 96px -28px rgba(16, 24, 40, .42); min-width: min(480px, 86vw); color: var(--ink); }
:root[data-theme="dark"] .os-dialog-body { box-shadow: 0 48px 96px -28px rgba(0, 0, 0, .65); }
.sh-h, .sh-b, .sh-f { padding: 20px 26px; }
.sh-h { display: flex; align-items: flex-start; gap: 12px; }
.sh-h h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.sh-h p { margin: 2px 0 0; color: var(--ink-3); font-size: 12.5px; }
.sh-f { display: flex; justify-content: flex-end; gap: 10px; border-top: .5px solid var(--hair); }
.os-tog { width: 46px; height: 28px; border-radius: var(--r-pill); border: 0; padding: 2px; background: var(--track); box-shadow: inset 0 0 0 .5px var(--hair-2); display: flex; align-items: center; cursor: pointer; }
.os-tog.on { background: var(--brand); justify-content: flex-end; }
.os-tog-knob { width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }

.topbar #tk-timer,
.topbar #tk-timer:not([hidden]) {
  position: relative; top: auto; right: auto; left: auto; transform: none;
  z-index: 3; flex: 0 0 auto; margin-right: auto;
  height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 6px 0 10px;
  border-radius: 999px; background: #0A0A0C; color: #fff; border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 24px -12px rgba(0, 20, 60, .7);
}
#tk-timer[hidden] { display: none !important; }
.topbar #tk-timer:not([hidden]) { animation: os-island 460ms cubic-bezier(.16, 1, .3, 1); }
@keyframes os-island { from { opacity: 0; transform: scaleX(.82); } to { opacity: 1; transform: none; } }
.topbar .tk-timer-clock { font-size: 15px; font-weight: 560; letter-spacing: -.02em; min-width: 62px; color: #5AA2FF; font-variant-numeric: tabular-nums; font-family: var(--font); }
.topbar .tk-timer-ref { color: #fff; font-size: 12.5px; max-width: 120px; }
.topbar .tk-timer-ref span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar #tkt-pause, .topbar #tkt-save, .topbar #tkt-discard { width: auto; height: 26px; min-height: 26px; padding: 0 10px; border-radius: 999px; border: 0; font-size: 12px; font-weight: 600; }
.topbar #tkt-discard { width: 26px; padding: 0; }
.topbar #tkt-pause, .topbar #tkt-discard { background: #2C2C2E; color: #fff; box-shadow: none; }
.topbar #tkt-save { background: rgba(45, 123, 255, .22); color: #5AA2FF; }

.gauge-wrap { width: 184px; position: relative; }
#tab-dashboard .gauge-num { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; bottom: auto; }

/* Overview grid: the approved dashboard, not the old four-card row. */
.glass { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-radius: var(--r-lg); box-shadow: var(--glass-hi), var(--shadow-1); }
.os-ov { display: grid; grid-template-columns: 292px repeat(4, minmax(0, 1fr)); grid-template-rows: 120px minmax(210px, auto) auto; gap: 14px; align-items: stretch; }
.os-ov .card, .os-ov .kpi { margin: 0; }
.os-ov .score { grid-column: 1; grid-row: 1 / span 2; display: flex; flex-direction: column; min-height: 0; }
.os-ov .k1 { grid-column: 2; grid-row: 1; } .os-ov .k2 { grid-column: 3; grid-row: 1; }
.os-ov .k3 { grid-column: 4; grid-row: 1; } .os-ov .k4 { grid-column: 5; grid-row: 1; }
.os-ov .findings { grid-column: 2 / span 3; grid-row: 2; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.os-ov .os-computers { grid-column: 5; grid-row: 2; display: flex; flex-direction: column; align-self: start; min-height: min-content; overflow: visible; padding-bottom: 16px; }
.os-ov .os-computers #o-ep-forensic { margin: 10px 0 0; line-height: 1.45; overflow: visible; }
.os-ov .companies { grid-column: 1 / span 3; grid-row: 3; padding: 16px 8px 8px; }
.os-ov .compliance { grid-column: 4 / span 2; grid-row: 3; }
.os-ov .kpi { display: flex; flex-direction: column; justify-content: space-between; padding: 15px 18px; }
.os-ov .kpi .top { display: flex; align-items: center; justify-content: space-between; }
.os-ov .kpi .lab { font-size: 12px; font-weight: 550; color: var(--ink-3); }
.os-ov .kpi .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.os-ov .kpi .ic svg { width: 14px; height: 14px; }
.os-ov .kpi .val { display: flex; align-items: baseline; gap: 8px; }
.os-ov .kpi .n { font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; font-family: var(--font); }
.os-ov .kpi .d { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.os-ov .kpi .val { gap: 8px; }
.delta { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.up { background: var(--ok-t); color: var(--ok); }
.delta.down { background: var(--crit-t); color: var(--crit); }
.spark { width: 100%; height: 28px; display: block; margin-top: 6px; }
.spark .spark-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: spark-draw 1.1s cubic-bezier(.22, 1, .36, 1) forwards; }
@keyframes spark-draw { to { stroke-dashoffset: 0; } }
.os-ov .glass { position: relative; }
.os-ov .glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(160px 110px at var(--mx, 50%) var(--my, 0%), rgba(245, 196, 81, .14), transparent 72%);
  transition: opacity .2s linear;
}
.os-ov .glass:hover::after { opacity: 1; }
#tab-dashboard { position: relative; }
#tab-dashboard .retro-grid {
  position: absolute; left: -8%; right: -8%; top: -20px; height: 280px; z-index: 0; pointer-events: none; opacity: .2;
  background-image:
    linear-gradient(to bottom, transparent, var(--bg) 92%),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(98, 160, 255, .45) 48px),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(98, 160, 255, .32) 48px);
  transform: perspective(520px) rotateX(58deg); transform-origin: center top;
  mask-image: linear-gradient(#000, transparent 78%);
  animation: retro-drift 18s linear infinite;
}
#tab-dashboard .os-ov, #tab-dashboard .os-below { position: relative; z-index: 1; }
@keyframes retro-drift { to { background-position: 0 48px, 48px 0, 0 48px; } }
.donut-wrap { position: relative; width: 92px; height: 92px; flex: none; }
.donut { width: 92px; height: 92px; display: block; }
.donut-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-num b { font-family: var(--font); font-size: 22px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.donut-num small { font-size: 9px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.peak-line { fill: none; stroke: #4C8FFF; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(76, 143, 255, .65)); stroke-dasharray: 1; stroke-dashoffset: 1; animation: spark-draw 1.15s cubic-bezier(.22, 1, .36, 1) forwards; }
.peak-area { stroke: none; }
.peak-dot { fill: #F5C451; stroke: #0B1220; stroke-width: 2; }
.os-ov .score { position: relative; }
.os-ov .score .gauge-wrap { width: 188px; height: 188px; margin: 8px auto 2px; }
.os-ov .score .gauge { transform: rotate(-90deg); }
.os-ov .score .g-track { stroke: rgba(255, 255, 255, .08); stroke-width: 8; stroke-dasharray: none; }
.os-ov .score .g-guide { fill: none; stroke: rgba(245, 196, 81, .22); stroke-width: 1; }
.os-ov .score .g-val { stroke: url(#score-grad); stroke-width: 8; stroke-linecap: round; filter: url(#score-glow); }
#tab-dashboard .score .gauge-wrap { position: relative; width: 188px; height: 188px; margin: 8px auto 2px; }
#tab-dashboard .score .score-gauge { width: 188px; height: 188px; transform: rotate(-90deg); }
#tab-dashboard .score .gauge-num {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; pointer-events: none; bottom: 0;
}
#tab-dashboard .score .gauge-num span {
  font-family: var(--font); font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: .95;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.os-ov .score .gauge-num small { font-family: var(--font); font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); margin-top: 2px; }
.os-ov .score::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--beam, 0deg), transparent 0 68%, rgba(245, 196, 81, .85) 82%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: score-beam 7s linear infinite;
}
@property --beam { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes score-beam { to { --beam: 360deg; } }
.os-ov .checks { margin-top: auto; display: grid; gap: 8px; }
.os-ov .checks .row { display: grid; grid-template-columns: 62px 1fr 36px; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.os-ov .checks .row b { text-align: right; font-variant-numeric: tabular-nums; }
.os-ov .bar, .bar { height: 6px; border-radius: 9px; background: var(--track); overflow: hidden; }
.os-ov .bar i, .bar > i, .bar > span { display: block; height: 100%; border-radius: 9px; width: 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--track); color: var(--ink-3); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.nodot::before { display: none; }
.os-ep .ep-ring { width: 76px; height: 76px; margin: 0; }
.os-ep .gauge { transform: rotate(-90deg); }
.ic-brand { background: var(--brand-tint); color: var(--brand); }
.ic-crit { background: var(--crit-t); color: var(--crit); }
.ic-high { background: var(--high-t); color: var(--high); }
.ic-warn { background: var(--warn-t); color: var(--warn); }
.chip.ok { color: var(--ok); background: var(--ok-t); } .chip.warn { color: var(--warn); background: var(--warn-t); }
.chip.high { color: var(--high); background: var(--high-t); } .chip.crit { color: var(--crit); background: var(--crit-t); }
.chip.info { color: var(--info); background: var(--info-t); } .chip.brand { color: var(--brand); background: var(--brand-tint); }
.os-ov .findings .trend { flex: 1; min-height: 140px; position: relative; }
.os-ep { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.os-ep .n { font-size: 30px; font-weight: 250; letter-spacing: -.04em; line-height: 1; }
.fw { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fw .f { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.fw .f b { font-size: 15px; font-weight: 400; }
.fw .f span { font-size: 11.5px; font-weight: 600; }
.mat { margin-top: 14px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--track); }
.mat .steps { display: flex; gap: 4px; flex: 1; }
.mat .steps i { flex: 1; height: 6px; border-radius: 9px; background: var(--hair-2); }
.mat .steps i.on { background: linear-gradient(90deg, var(--brand-cyan), var(--brand)); }
.os-empty { margin: 8px 12px 12px; padding: 18px 12px; text-align: center; color: var(--ink-3); font-size: 12.5px; border-radius: var(--r-md); background: var(--track); }
.os-below { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; }
.os-kpis, .os-kpis.kpis6 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 0 0 14px; }
.os-split { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }
.os-stack { display: grid; gap: 14px; }
@media (max-width: 1000px) { .os-split { grid-template-columns: 1fr; } }
.os-kpis .kpi { margin: 0; min-height: 104px; }
#tab-analyze, #tab-exposure { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
#tab-analyze .toolbar, #tab-exposure .toolbar { margin: 0; max-width: 100%; }
#an-mode, #ex-mode { flex-wrap: wrap; max-width: 100%; }
.an-pane, .ex-pane { display: grid; gap: 14px; min-width: 0; }
#tab-analyze .an-pane .card, #tab-exposure .ex-pane .card { height: auto; }
.an-pane.os-on .card, .ex-pane.os-on .card { box-shadow: var(--glass-hi), 0 0 0 1.5px var(--brand); }
.pagebar .seg { margin-right: 4px; }
.os-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.btn-glass, button.btn.btn-glass { background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--glass-hi), var(--shadow-btn); backdrop-filter: var(--blur); }
.btn-plain, button.btn-plain { background: transparent; color: var(--brand); box-shadow: none; min-height: 0; height: auto; padding: 0 6px; }
.os-kpis .kpi { display: flex; flex-direction: column; justify-content: space-between; padding: 15px 18px; }
.os-kpis .top, .os-ov .kpi .top { display: flex; align-items: center; justify-content: space-between; }
.os-kpis .lab { font-size: 12px; font-weight: 550; color: var(--ink-3); }
.os-kpis .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.os-kpis .ic svg { width: 14px; height: 14px; }
.os-kpis .val { display: flex; align-items: baseline; gap: 8px; }
.os-kpis .n { font-size: 38px; font-weight: 250; letter-spacing: -.04em; line-height: 1; }
.os-kpis .d { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.card .big { font-weight: 250; letter-spacing: -.04em; }
.board { gap: 14px; }
.col { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--r-lg); box-shadow: var(--glass-hi), var(--shadow-1); }
.col .empty { margin: 8px 4px; padding: 16px 8px; text-align: center; color: var(--ink-3); border-radius: var(--r-md); background: var(--track); }
.tcard { border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 .5px var(--hair); }
@media (max-width: 1180px) {
  .os-ov { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .os-ov .score, .os-ov .k1, .os-ov .k2, .os-ov .k3, .os-ov .k4, .os-ov .findings, .os-ov .os-computers, .os-ov .companies, .os-ov .compliance { grid-column: auto; grid-row: auto; }
  .os-below, #tab-analyze, .os-kpis { grid-template-columns: 1fr; }
}
.gauge { transform: rotate(-90deg); }
.g-track { fill: none; stroke: var(--track); stroke-width: 7; }
.g-val { fill: none; stroke: var(--brand); stroke-width: 7; stroke-linecap: round; }
.g-val.good { stroke: var(--brand); } .g-val.mid { stroke: var(--warn); } .g-val.bad { stroke: var(--crit); }
.gauge-num span { font-size: 60px; font-weight: 200; letter-spacing: -.045em; }
.trend .b1 { fill: var(--brand-tint-2); } .trend .b3 { fill: var(--ink-2); }
.trend .grid-l { stroke: var(--hair); }

.auth { background: var(--bg); }
.auth-card {
  background: var(--overlay); color: var(--ink); border: 1px solid var(--overlay-edge); border-radius: 32px;
  box-shadow: var(--shadow-2), var(--glass-hi); backdrop-filter: var(--overlay-blur); -webkit-backdrop-filter: var(--overlay-blur);
}
.drop-menu {
  background: var(--overlay); color: var(--ink); border: 1px solid var(--overlay-edge);
  backdrop-filter: var(--overlay-blur); -webkit-backdrop-filter: var(--overlay-blur);
  box-shadow: var(--shadow-2);
}
/* Secondary text on a 92% light overlay, over the darkest page, stays above WCAG AA. */
:root:not([data-theme="dark"]) :is(.menu, .os-pop, .drop-menu, .os-pal, .ui-dialog, .os-dialog-body, #drawer, #toast, .auth-card) {
  --ink-3: #626268;
  --muted: #626268;
}
.auth-card .muted, .auth-card .brand-sub, .auth-or { color: var(--ink-3); }
.auth-card input { background: var(--surface); color: var(--ink); }
.auth-card a.btn.google { border-radius: var(--r-pill); }
.auth-msg { color: var(--crit); }

.menu-wrap { position: relative; }

@media (max-width: 1180px) {
  .os-ov > *, .card, .table-wrap, .board, .pagebar, .actions { min-width: 0; max-width: 100%; }
  .main-col { overflow-x: hidden; }
  .os-ov .companies { overflow-x: auto; }
  .os-ov .companies table { width: 100%; table-layout: fixed; }
  .os-ov .companies th, .os-ov .companies td { overflow: hidden; text-overflow: ellipsis; }
}
/* Tablets in portrait keep the sidebar and dock. The clock yields so search still fits. */
@media (min-width: 768px) and (max-width: 900px) {
  .clock { display: none; }
  .topbar .search { flex: 1 1 140px; width: auto; min-width: 0; margin-left: 0; }
  .switcher { min-width: 0; }
  #brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 900px) {
  .os-ov { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  main.os-swap, main.os-from-dock, #drawer.os-in, #drawer.os-out, #toast.os-in, .ui-dialog[open], #tk-timer:not([hidden]), .sk, .fan-item, #tab-dashboard .retro-grid, .os-ov .score::before, .spark .spark-line { animation: none; transition: none; }
  .spark .spark-line { stroke-dashoffset: 0; }
  #drawer.os-window.os-in, #drawer.os-sheet.os-in { animation: os-fade 180ms linear; }
  #drawer.os-window.os-out, #drawer.os-sheet.os-out, #os-drawer-scrim.os-out { animation: os-fade-out 180ms linear forwards; }
  .primary:active, .btn:active { transform: none; }
  .sidebar { transition: none; }
}
@media print {
  .topbar, .sidebar, #os-dock, .backdrop, #toast { display: none !important; }
  .main-col { position: static; overflow: visible; }
}

/* The old stylesheet still slides the sidebar off below 860px. Tablets keep it.
   The dock is recentered in the content column so it does not cover the sidebar. */
@media (min-width: 768px) and (max-width: 860px) {
  .sidebar { transform: none; }
  #nav-toggle, #nav-close { display: none; }
  #os-dock { left: calc(260px + (100% - 274px) / 2); transform: translateX(-50%) scale(.82); transform-origin: bottom center; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  #os-dock { left: calc(50% + 120px); }
}

#nav-close { display: none; }

/* Phones, and phones on their side (short and landscape, up to a large iPhone). */
@media (max-width: 767px), (max-height: 500px) and (orientation: landscape) and (max-width: 1024px) {
  .topbar {
    z-index: 55; height: auto; min-height: calc(52px + env(safe-area-inset-top, 0px));
    flex-wrap: wrap; align-items: center; gap: 6px;
    padding: env(safe-area-inset-top, 0px) max(8px, env(safe-area-inset-right, 0px)) 6px max(8px, env(safe-area-inset-left, 0px));
  }
  #nav-toggle, #nav-close, .topbar .icon-btn, #theme-btn.icon-btn, #os-bell.icon-btn, .topbar .search, .profile {
    width: 44px; height: 44px; min-width: 44px; min-height: 44px; flex: none;
  }
  #nav-toggle {
    display: inline-grid; place-items: center; padding: 0; color: var(--ink);
    border-radius: 50%; border: 1px solid var(--glass-border); background: var(--glass-strong);
    box-shadow: var(--glass-hi), var(--shadow-btn);
  }
  .switcher { flex: 1 1 auto; min-width: 0; max-width: max-content; height: 44px; padding-right: 10px; overflow: hidden; }
  #brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .clock, .profile .me-text { display: none; }
  .profile { padding: 0; justify-content: center; }
  .topbar .search {
    display: inline-grid; margin: 0; padding: 0; place-items: center; cursor: pointer;
    width: 44px; flex: none;
  }
  .topbar .search span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .topbar .right { margin-left: auto; gap: 6px; min-width: 0; }
  .topbar #tk-timer, .topbar #tk-timer:not([hidden]) {
    position: relative; transform: none; flex: 1 0 100%; order: 5; width: auto; height: 44px; margin: 0;
    justify-content: space-between;
  }
  .topbar #tkt-pause, .topbar #tkt-save, .topbar #tkt-discard { height: 44px; min-height: 44px !important; min-width: 44px; }
  .main-col {
    left: 0; right: 0; top: var(--os-top, calc(52px + env(safe-area-inset-top, 0px)));
    padding: 8px max(8px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    overflow-x: hidden;
  }
  h1 { font-size: 24px; overflow-wrap: anywhere; }
  .pagebar, .pagebar .titles, .actions, .toolbar { min-width: 0; max-width: 100%; }
  .actions { width: 100%; flex-wrap: wrap; }
  .actions > *, .toolbar select, .pagebar select { min-width: 0; max-width: 100%; }
  #account, .actions select { flex: 1 1 160px; width: auto; min-width: min(100%, 160px); }
  #os-dock { display: none; }
  .sidebar {
    z-index: 50; left: 0; bottom: 0; top: var(--os-top, calc(52px + env(safe-area-inset-top, 0px)));
    width: min(300px, calc(100vw - 48px)); border-radius: 0 var(--r-xl) var(--r-xl) 0;
    transform: translateX(-110%);
    transition: transform 280ms cubic-bezier(.16, 1, .3, 1);
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
  .sidebar.open { transform: none; }
  #nav-close {
    display: inline-grid; place-items: center; margin: 0 2px 8px auto; padding: 0; font-size: 22px; line-height: 1;
    border-radius: 50%; border: 1px solid var(--glass-border); background: var(--glass-strong); color: var(--ink);
    box-shadow: var(--glass-hi), var(--shadow-btn);
  }
  .scrim {
    z-index: 40; top: var(--os-top, calc(52px + env(safe-area-inset-top, 0px)));
    background: rgba(11, 18, 32, .28); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  }
  .tabs button, .nav-nest button { min-height: 44px; height: auto; }
  button.primary, a.primary, button.btn, a.btn, button.seg-btn, button.ghost, .seg-btn, .icon-btn {
    min-height: 44px; height: 44px;
  }
  button, .link { min-height: 44px; }
  .link { min-width: 44px; }
  .tc-save { min-height: 44px; height: 44px; padding: 0 12px; }
  #drawer .traffic { flex: none; }
  .os-ov { grid-template-columns: 1fr; }
  .os-kpis, .os-kpis.kpis6, .grid.kpis4, .grid.kpis5, .grid.kpis6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fw { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
  .board { max-width: 100%; }
  table.rtable, table.rtable > tbody, table.rtable > tbody > tr, table.rtable > tbody > tr > td { display: block; width: 100%; }
  table.rtable > thead { display: none; }
  table.rtable > tbody > tr { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px 14px; margin: 0 0 10px; }
  table.rtable > tbody > tr > td {
    height: auto; border: 0; padding: 6px 0 6px 34%; position: relative; min-height: 32px; overflow-wrap: anywhere; white-space: normal;
  }
  table.rtable > tbody > tr > td::before {
    content: attr(data-label); position: absolute; left: 0; top: 8px; width: calc(34% - 10px);
    font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-4);
  }
  table.rtable > tbody > tr > td[data-label=""] { padding-left: 0; }
  table.rtable > tbody > tr > td[data-label=""]::before { display: none; }
  .table-wrap { max-width: 100%; }
  .table-wrap:has(> table.rtable), .card.flush:has(table.rtable), .table-wrap.card:has(table.rtable) { overflow: visible; background: none; border: 0; box-shadow: none; }
  #os-drawer-scrim { z-index: 65; }
  #drawer, #drawer.wide, #drawer.os-window, #drawer.os-window.os-zoom, #drawer.os-sheet {
    z-index: 70; inset: 0; right: 0; bottom: 0; left: 0; top: 0; margin: 0;
    width: 100%; height: 100%; max-height: none; border-radius: 0;
    padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .tk-status { flex-wrap: nowrap; overflow-x: auto; }
  .tk-status .step { flex: 1 0 auto; min-height: 44px; }
  #drawer.os-window.os-min { display: none !important; }
  #os-dock:has(#os-dock-stack.has-mins) {
    display: flex !important; left: 50%; bottom: max(10px, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%); z-index: 60;
  }
  #os-dock:has(#os-dock-stack.has-mins) .dock-row { display: none; }
  #drawer .os-titlebar { height: 44px; padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
  #drawer .traffic { width: 44px; height: 44px; min-height: 44px; background: transparent; box-shadow: none; position: relative; }
  #drawer #win-close, #drawer #win-min, #drawer #win-zoom { background: transparent; box-shadow: none; }
  #drawer .traffic::before { content: ""; position: absolute; left: 16px; top: 16px; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
  #drawer #win-close::before { background: #FF5F57; }
  #drawer #win-min::before { background: #FEBC2E; }
  #drawer #win-zoom::before { background: #28C840; }
  .ui-dialog, .os-dialog-body {
    width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    overflow: auto; margin-top: env(safe-area-inset-top, 0px);
  }
  .os-pal-scrim { padding: max(8px, env(safe-area-inset-top, 0px)) 8px max(8px, env(safe-area-inset-bottom, 0px)); align-items: start; }
  .os-pal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; }
  .os-pal-q { font-size: 16px; height: 52px; }
  .os-pal-list { max-height: none; min-height: 0; }
  .os-pal .list-i, .menu button[role="menuitem"] { min-height: 44px; }
  .os-pop, .menu, #os-bell-slot .os-pop { width: min(320px, calc(100vw - 16px)); max-width: calc(100vw - 16px); max-height: min(70dvh, 420px); overflow: auto; }
  #toast { left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px)); width: auto; }
}
@media (max-width: 389px) {
  .switcher #brand-name, .switcher > svg { display: none; }
  .switcher { width: 44px; max-width: 44px; padding: 0; justify-content: center; flex: none; }
}
@media (max-width: 1180px) and (pointer: coarse) {
  .topbar .icon-btn, #theme-btn.icon-btn, #os-bell.icon-btn, #nav-toggle, #nav-close, button.primary, button.btn, .seg-btn {
    min-height: 44px; height: 44px;
  }
  .topbar .icon-btn, #theme-btn.icon-btn, #os-bell.icon-btn, #nav-toggle, #nav-close { min-width: 44px; width: 44px; }
  .switcher, .profile, .topbar .search { height: 44px; min-height: 44px; }
  .tabs button, .tk-status .step { min-height: 44px; height: auto; }
  .tc-save { min-height: 44px; height: 44px; padding: 0 12px; }
  #drawer .traffic { width: 44px; height: 44px; min-height: 44px; background: transparent; box-shadow: none; position: relative; flex: none; }
  #drawer #win-close, #drawer #win-min, #drawer #win-zoom { background: transparent; box-shadow: none; }
  #drawer .traffic::before { content: ""; position: absolute; left: 16px; top: 16px; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
  #drawer #win-close::before { background: #FF5F57; }
  #drawer #win-min::before { background: #FEBC2E; }
  #drawer #win-zoom::before { background: #28C840; }
  #drawer .os-titlebar { height: 44px; }
}
@media (hover: none) {
  .tabs button:hover:not([aria-selected="true"]) { background: transparent; }
  .menu button[role="menuitem"]:hover { background: transparent; }
  .primary:hover, a.primary:hover { filter: none; }
  table.findings tbody tr:hover, tr.clickable:hover { background: transparent; }
  .tabs button:active, table.findings tbody tr:active, tr.clickable:active { background: var(--hair); }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
  #drawer.os-window.os-in, #drawer.os-sheet.os-in { animation: os-fade 180ms linear; }
  #drawer.os-window.os-out, #drawer.os-sheet.os-out { animation: os-fade-out 180ms linear forwards; }
}
