:root {
  --paper: #fff;
  --canvas: #f7f7fb;
  --ink: #23203a;
  --muted: #656278;
  --border: #e5e3ec;
  --border-strong: #d6d2e1;
  --purple: #6238c9;
  --purple-dark: #4d269f;
  --purple-soft: #eee8ff;
  --nav: #1d1932;
  --nav-selected: #32274d;
  --nav-text: #bbb3d0;
  --green: #17694f;
  --green-bg: #e6f6ef;
  --amber: #804b15;
  --amber-bg: #fff2df;
  --rose: #97344a;
  --rose-bg: #fceaf0;
  --shadow: 0 2px 5px rgb(34 19 68 / 3%);
  --sidebar: 248px;
  font: 15px/1.5 'DM Sans', 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
a { color: var(--purple-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #8f64f5; outline-offset: 3px; }
button, a, input, select, textarea { touch-action: manipulation; }
strong, b { font-weight: 700; }
h1, h2, h3, p { margin: 0; }
p { overflow-wrap: anywhere; }
svg { width: 18px; height: 18px; flex-shrink: 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 8px 16px; background: white; border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.boot { display: grid; min-height: 100vh; place-items: center; color: var(--muted); }
.workspace { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: sticky; z-index: 3; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--nav); color: white; padding: 25px 16px 16px; }
.brand { display: flex; align-items: center; gap: 11px; width: fit-content; color: white; text-decoration: none; font-size: 21px; line-height: 1.18; letter-spacing: -.045em; font-weight: 610; padding: 0 8px; }
.brand b { font-weight: 780; }
.brand small { display: block; font-weight: 520; letter-spacing: .005em; color: #bdb3cf; font-size: 11px; margin-top: 4px; }
.brand-mark { position: relative; width: 36px; height: 36px; overflow: hidden; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: #ac91fc; color: #25183d; }
.brand-mark::before, .brand-mark::after, .brand-mark>span { content: ''; position: absolute; border: 1.5px solid currentColor; width: 23px; height: 11px; border-radius: 50%; transform: rotate(48deg); }
.brand-mark::after { transform: rotate(-48deg); }
.brand-mark>span { width: 5px; height: 5px; background: currentColor; }
#navigation { overflow-y: auto; margin-top: 33px; padding: 0 1px 20px; scrollbar-color: #72648b transparent; }
.nav-group + .nav-group { margin-top: 23px; }
.nav-group h2 { font-size: 10px; font-weight: 750; letter-spacing: .105em; text-transform: uppercase; margin: 0 0 8px 12px; color: #a49ab8; }
.nav-group ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.nav-link { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 38px; padding: 8px 11px; color: var(--nav-text); border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 630; }
.nav-link>svg { color: #aa9fbd; width: 16px; height: 16px; }
.nav-link:hover { background: #29223e; color: white; }
.nav-link[aria-current='page'] { background: var(--nav-selected); border-color: #46365e; color: #fff; }
.nav-link[aria-current='page'] svg { color: #c3acff; }
.nav-count { display: inline-grid; min-width: 20px; height: 19px; padding-inline: 4px; place-items: center; margin-left: auto; background: #4b386a; color: #f4ecff; border-radius: 5px; font-size: 10px; }
.sidebar-footer { margin-top: auto; border-top: 1px solid #3b324f; padding: 16px 1px 0 7px; display: flex; justify-content: space-between; gap: 4px; align-items: center; }
.workspace-account { display: flex; gap: 9px; align-items: center; font-size: 12px; line-height: 1.35; }
.workspace-account small { display: block; color: var(--nav-text); font-size: 10px; margin-top: 1px; }
.account-avatar { width: 32px; height: 32px; border-radius: 8px; background: #403057; color: #eee4ff; display: grid; place-items: center; letter-spacing: -.03em; font-size: 10px; font-weight: 780; }
.icon-button { display: inline-grid; width: 35px; height: 35px; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 7px; padding: 0; }
.icon-button:hover { background: var(--purple-soft); color: var(--purple-dark); }
.sign-out { color: var(--nav-text); }
.sign-out:hover { color: white; background: #392d51; }
.workspace-body { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 2; padding: 0 31px; min-height: 62px; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--paper); border-bottom: 1px solid var(--border); }
.breadcrumb, .topbar-tools { display: flex; align-items: center; gap: 11px; font-size: 12px; min-width: 0; }
.breadcrumb { color: var(--muted); }
.breadcrumb strong { color: var(--ink); }
.divider { height: 20px; border-right: 1px solid var(--border); }
.environment { color: #464256; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.environment>span, .live-dot { display: inline-block; width: 7px; height: 7px; background: #35a47d; border-radius: 50%; }
.mobile-menu { display: none; }
#main { max-width: 1536px; margin: 0 auto; padding: 32px 31px 44px; }
#main:focus { outline: none; }
.loading { padding: 45px 15px; color: var(--muted); }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-header h1 { font-size: clamp(29px, 3.3vw, 39px); line-height: 1.07; font-weight: 760; letter-spacing: -.052em; }
.page-header p { margin-top: 7px; color: var(--muted); max-width: 620px; font-size: 14px; }
.page-header .eyebrow { margin-bottom: 7px; }
.eyebrow { color: var(--purple-dark); font-size: 10px; text-transform: uppercase; letter-spacing: .115em; font-weight: 790; display: block; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--ink); background: var(--paper); padding: 7px 12px; text-decoration: none; font-weight: 700; line-height: 1.28; font-size: 12px; }
.button:hover { border-color: #b8a7da; background: #faf8ff; }
.button svg { width: 15px; height: 15px; }
.button.primary { background: var(--purple); border-color: var(--purple); color: white; }
.button.primary:hover { background: #5127b4; border-color: #5127b4; }
.button.danger { color: var(--rose); }
.button.small { min-height: 32px; padding: 4px 9px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 190px; background: linear-gradient(115deg, #2d204d, #3d2567 69%, #482c76); color: white; border-radius: 13px; padding: 24px 27px; margin: 0 0 23px; }
.hero-content { position: relative; z-index: 1; max-width: 540px; }
.hero h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.13; letter-spacing: -.043em; margin: 6px 0; }
.hero .eyebrow { color: #dccbff; }
.hero p { color: #e2d7f5; margin-bottom: 17px; font-size: 13px; }
.hero .button { background: #e6d9ff; color: #33214f; border-color: #e6d9ff; }
.hero .button:hover { background: white; border-color: white; }
.hero-art, .login-art { position: absolute; overflow: hidden; inset: 0; pointer-events: none; }
.hero-art { left: 53%; opacity: .86; }
.orbit { position: absolute; display: block; border: 1px solid rgb(222 200 255 / 28%); border-radius: 50%; width: 330px; height: 160px; top: 52%; left: 48%; }
.orbit-one { transform: translate(-50%, -50%) rotate(-34deg); }
.orbit-two { transform: translate(-50%, -50%) rotate(30deg); }
.orbit-three { transform: translate(-50%, -50%) rotate(88deg); }
.orbit-four { transform: translate(-50%, -50%) rotate(-34deg) scale(1.36); }
.orbit-signal { position: absolute; top: 52%; left: 48%; transform: translate(-50%, -50%); width: 18px; height: 18px; border-radius: 50%; background: #cfadff; box-shadow: 0 0 19px #cfadff9e, 0 0 45px #b589ffaf; }
.orbit-signal::before, .orbit-signal::after { content: ''; width: 7px; height: 7px; background: #e5d4ff; position: absolute; border-radius: 50%; }
.orbit-signal::before { transform: translate(95px, -50px); }
.orbit-signal::after { transform: translate(-75px, 49px); opacity: .75; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 21px; }
.metric { color: var(--ink); text-decoration: none; display: block; border: 1px solid var(--border); background: var(--paper); border-radius: 11px; box-shadow: var(--shadow); padding: 14px 15px; min-width: 0; }
.metric:hover { border-color: #b8a7da; }
.metric-header { display: flex; align-items: center; gap: 8px; min-width: 0; color: #555167; font-size: 12px; font-weight: 680; }
.metric-header>svg { width: 15px; height: 15px; margin-left: auto; color: #796d92; }
.metric-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 7px; color: var(--purple-dark); background: var(--purple-soft); }
.metric-icon svg { width: 15px; height: 15px; }
.metric-icon.green { background: var(--green-bg); color: var(--green); }
.metric-icon.amber { background: var(--amber-bg); color: var(--amber); }
.metric-value { display: block; margin: 7px 0 1px; font-size: 29px; font-weight: 750; letter-spacing: -.054em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric-note { font-size: 11px; color: var(--muted); }
.grid { display: grid; gap: 16px; align-items: start; }
.grid.two { grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); }
.grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: grid; gap: 17px; }
.panel { background: var(--paper); border: 1px solid var(--border); border-radius: 11px; padding: 16px 17px; min-width: 0; box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: start; justify-content: space-between; gap: 11px; margin-bottom: 12px; }
.panel-header h2, .panel h2 { font-size: 17px; line-height: 1.27; font-weight: 750; letter-spacing: -.025em; }
.panel-header h3 { font-size: 15px; line-height: 1.3; letter-spacing: -.015em; }
.panel-header p, .muted { color: var(--muted); font-size: 12px; }
.panel-header p { margin-top: 4px; }
.text-link { display: inline-flex; align-items: center; gap: 3px; color: var(--purple-dark); font-size: 11px; font-weight: 750; min-height: 25px; white-space: nowrap; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link svg { height: 12px; width: 12px; }
.empty { display: grid; align-items: center; justify-items: center; text-align: center; min-height: 130px; padding: 18px 10px; gap: 3px; }
.empty .metric-icon { width: 33px; height: 33px; margin-bottom: 4px; }
.empty strong { font-size: 13px; }
.empty p { max-width: 390px; color: var(--muted); font-size: 12px; }
.empty .button { margin-top: 7px; }
.list-row { min-width: 0; display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row>div, td { min-width: 0; overflow-wrap: anywhere; }
.list-row strong, .table-wrap strong { font-size: 13px; display: block; }
.list-row p { overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; gap: 5px; width: max-content; max-width: 100%; background: #f1eff5; color: #5b546a; padding: 3px 7px; border-radius: 6px; font-weight: 700; font-size: 10px; line-height: 1.35; white-space: nowrap; }
.status.purple { color: var(--purple-dark); background: var(--purple-soft); }
.status.green { color: var(--green); background: var(--green-bg); }
.status.amber { color: var(--amber); background: var(--amber-bg); }
.status.rose { color: var(--rose); background: var(--rose-bg); }
.table-wrap { overflow: auto; }
.table-wrap table { min-width: 540px; width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.table-wrap th { color: #555166; font-size: 11px; font-weight: 740; }
.table-wrap th, .table-wrap td { border-bottom: 1px solid var(--border); padding: 9px 8px; vertical-align: middle; }
.table-wrap th:first-child, .table-wrap td:first-child { padding-left: 0; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td .actions { min-width: max-content; }
.filters { display: flex; gap: 9px; align-items: end; flex-wrap: wrap; }
.filters select { min-width: 160px; }
.field { display: grid; gap: 4px; min-width: 0; color: var(--ink); font-weight: 710; font-size: 12px; }
.field small { color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; min-height: 38px; padding: 6px 9px; border: 1px solid var(--border-strong); border-radius: 7px; background: white; color: var(--ink); font-weight: 500; }
textarea { min-height: 105px; resize: vertical; }
input[type='checkbox'] { width: 15px; height: 15px; min-height: auto; accent-color: var(--purple); }
.field.check { display: flex; align-items: center; gap: 7px; }
.field-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid .wide { grid-column: 1 / -1; }
.form-error { color: var(--rose); background: var(--rose-bg); border-radius: 7px; padding: 9px 11px; font-size: 13px; }
.warning { background: var(--amber-bg); color: var(--amber); border-radius: 7px; padding: 9px 11px; font-size: 12px; }
.stat-pairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 8px; margin: 10px 0 15px; }
.stat-pairs>div { padding: 8px 10px; background: var(--canvas); border-radius: 7px; min-width: 0; overflow-wrap: anywhere; }
.stat-pairs dt { color: var(--muted); font-size: 11px; }
.stat-pairs dd { margin: 2px 0 0; font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; }
.details dl { margin: 0; }
.details dt { color: var(--muted); font-size: 11px; font-weight: 750; margin-top: 12px; }
.details dd { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.details code { font-size: 12px; }
.tag-row { display: flex; gap: 5px; flex-wrap: wrap; }
.tag-row span { background: var(--canvas); padding: 3px 7px; border-radius: 5px; color: #524a62; font-size: 11px; }
.js-refresh { animation: turn .9s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
#dialog { box-sizing: border-box; width: min(610px, calc(100% - 28px)); max-height: calc(100vh - 28px); overflow: auto; border: 1px solid var(--border); border-radius: 13px; padding: 0; color: var(--ink); box-shadow: 0 22px 75px #1d133d38; }
#dialog::backdrop { background: #1a143a70; }
.dialog-header { padding: 19px 20px 13px; display: flex; align-items: start; gap: 10px; justify-content: space-between; border-bottom: 1px solid var(--border); }
.dialog-header h2 { font-size: 22px; line-height: 1.2; letter-spacing: -.033em; }
.dialog-body { padding: 16px 20px 19px; }
.dialog-body .form-error { margin-top: 12px; }
.dialog-body .actions { margin-top: 15px; justify-content: end; }
.dialog-notice { margin-top: 12px; padding: 9px 11px; border-radius: 7px; background: var(--green-bg); color: var(--green); font-size: 13px; }
.dialog-notice.error { background: var(--rose-bg); color: var(--rose); }
.toast { position: fixed; z-index: 12; bottom: 18px; right: 18px; background: var(--nav); color: white; max-width: calc(100vw - 36px); padding: 10px 13px; border-radius: 8px; box-shadow: 0 12px 35px #1e114139; font-size: 13px; }
.toast.error { background: #7f2540; }
.login-screen { display: grid; min-height: 100vh; place-items: center; position: relative; overflow: hidden; padding: 22px; background: linear-gradient(125deg, #19152e, #3f275e); }
.login-wrap { width: min(100%, 413px); z-index: 1; }
.login-brand { margin: 0 0 17px 0; padding: 0; font-size: 24px; }
.login-card { border-radius: 15px; padding: 27px; background: var(--paper); box-shadow: 0 24px 75px #150b33aa; }
.login-card h1 { font-size: 32px; line-height: 1.12; letter-spacing: -.055em; margin: 5px 0; }
.login-card > p { color: var(--muted); font-size: 13px; margin-bottom: 15px; }
.login-card form, #login-fields { display: grid; gap: 12px; }
.login-card .primary { min-height: 42px; }
.login-art { opacity: .58; }
.login-art .orbit { width: min(72vw, 920px); height: min(41vw, 500px); left: 55%; }
.login-art .orbit-signal { display: none; }
@media (max-width: 1080px) {
  :root { --sidebar: 212px; }
  .topbar { padding-inline: 22px; }
  #main { padding-inline: 22px; }
  .metric { padding-inline: 12px; }
  .metric-header>svg { display: none; }
}
@media (max-width: 850px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .hero-art { left: 55%; }
}
@media (max-width: 679px) {
  .workspace { display: block; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; height: auto; height: 100dvh; width: min(248px, 90vw); transform: translateX(-100%); visibility: hidden; transition: transform 180ms ease-out, visibility 180ms; }
  .workspace.nav-open .sidebar { transform: translateX(0); visibility: visible; box-shadow: 8px 0 40px #1e143e55; }
  .workspace.nav-open .workspace-body::before { content: ''; position: fixed; inset: 0; z-index: 2; background: #1a143a50; }
  .mobile-menu { display: inline-grid; margin-left: -7px; }
  .topbar { min-height: 51px; padding-inline: 12px; }
  .breadcrumb, .topbar-tools { gap: 6px; }
  #main { padding: 20px 13px 30px; }
  .page-header { align-items: start; flex-direction: column; margin-bottom: 15px; }
  .hero { padding: 18px 15px; min-height: 165px; margin-bottom: 15px; }
  .hero-art { left: 47%; opacity: .38; }
  .metrics { gap: 8px; margin-bottom: 15px; }
  .metric { padding: 9px; }
  .metric-note { font-size: 10px; }
  .grid.equal, .field-grid { grid-template-columns: 1fr; }
  .field-grid .wide { grid-column: auto; }
  .panel { padding: 12px; }
}
@media (max-width: 350px) {
  .breadcrumb span, .environment { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.inline-actions { margin-top: 12px; }
.form-intro { margin-bottom: 13px; }
.prompt-preview { white-space: pre-wrap; overflow-wrap: anywhere; }
.decision-note { margin-top: 8px; text-align: right; }
.detail-heading { font-size: 15px; margin: 16px 0 6px; }
.audit-actions { justify-content: start !important; margin-bottom: 6px; }
.audit-finding { border-bottom: 1px solid var(--border); padding: 8px 0; }
.audit-finding:last-of-type { border-bottom: 0; }
.audit-finding strong { display: inline-block; margin-left: 5px; font-size: 13px; }
.audit-finding p, .audit-finding small { font-size: 12px; overflow-wrap: anywhere; }
.audit-finding small { color: var(--muted); }

/* Detailed audit evidence and category summaries. */
.audit-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.audit-category {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border, #e5e0ed);
  border-radius: 10px;
  background: #f7f5fa;
}
.audit-category strong { font-size: 25px; line-height: 1.2; }
.audit-category small { font-size: 11px; color: #736b80; padding-left: 3px; }
.audit-category span { font-size: 11px; line-height: 1.4; color: #625b70; }
.audit-check-counts { margin: 12px 0 20px; font-size: 12px; color: #625b70; }
.audit-evidence { padding: 11px 13px; background: #f6f4f9; border-radius: 7px; margin-top: 12px; overflow-wrap: anywhere; }
.audit-evidence p { font-size: 12px; margin: 5px 0 0; }
.audit-passed { margin-top: 18px; border: 1px solid #e5e0ed; padding: 14px; border-radius: 10px; }
.audit-passed summary { cursor: pointer; font-weight: 600; }
.audit-check { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid #eeeaf4; font-size: 12px; }
.audit-check:last-child { border-bottom: 0; }
.fix-plan-item { margin: 14px 0; border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.fix-plan-item summary { cursor: pointer; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.fix-plan-item p, .fix-plan-item li { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.fix-plan-item h3 { margin: 14px 0 6px; font-size: 13px; }
.fix-plan-item ul { padding-left: 20px; }
