:root {
  color-scheme: light;
  --bg: #f2f4f7;
  --surface: #ffffff;
  --ink: #101828;
  --muted: #596579;
  --border: #d7dde5;
  --accent: #2457f5;
  --accent-hover: #173fc5;
  --accent-soft: #eaf0ff;
  --success: #087443;
  --success-soft: #e7f6ed;
  --warning: #9a5b00;
  --warning-soft: #fff3d6;
  --error: #b42318;
  --error-soft: #feeceb;
  --radius: 10px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 18px 48px rgba(16, 24, 40, 0.12);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --text-xs: 13px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 20px;
  --text-xl: 25px;
  --text-2xl: 31px;
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-size: var(--text-base); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
p { color: var(--muted); line-height: 1.6; }
h1, h2, h3 { margin-top: 0; letter-spacing: -0.025em; }
h1 { line-height: 1.04; }
h2, h3 { line-height: 1.2; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.skip-link {
  position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px;
  background: var(--ink); color: white; transform: translateY(-150%);
  border-radius: var(--radius);
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.brand {
  display: inline-flex; align-items: center; gap: 11px; color: var(--ink);
  text-decoration: none; font-size: 21px; font-weight: 780; letter-spacing: -0.045em;
}
.brand-mark { position: relative; display: inline-flex; align-items: flex-end; gap: 3px; width: 28px; height: 25px; }
.brand-mark i { display: block; width: 6px; border-radius: 2px 2px 0 0; transform: skew(-18deg); }
.brand-mark i:nth-child(1) { height: 13px; background: var(--ink); }
.brand-mark i:nth-child(2) { height: 24px; background: var(--accent); }
.brand-mark i:nth-child(3) { height: 18px; background: #78a1ff; }
.brand-inverse { color: white; }
.brand-inverse .brand-mark i:first-child { background: white; }

.button, button {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  gap: 12px; border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 11px 17px; background: var(--accent); color: white; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: background-color 150ms ease,
  border-color 150ms ease, transform 150ms ease;
}
.button:hover, button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button:active, button:active { transform: translateY(1px); }
.button:disabled, button:disabled { opacity: 0.58; cursor: wait; transform: none; }
.button.secondary, .secondary {
  background: var(--surface); border-color: var(--border); color: var(--ink);
}
.button.secondary:hover, .secondary:hover { background: #f8fafc; border-color: #aeb8c6; }
.button.light { background: white; color: var(--ink); border-color: white; }
.button.light:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.button.compact, button.compact { min-height: 38px; padding: 8px 13px; font-size: var(--text-sm); }
.quiet-button { min-height: 38px; padding: 7px 12px; color: var(--ink); background: transparent; border-color: var(--border); font-size: var(--text-sm); }
.quiet-button:hover { color: var(--accent-hover); background: var(--accent-soft); border-color: #b8c7fa; }
.quiet-button.inverse { color: white; border-color: #44516a; }
.quiet-button.inverse:hover { color: white; background: #26334b; border-color: #62718e; }
.theme-toggle { gap: 8px; white-space: nowrap; }
.theme-icon {
  position: relative; width: 16px; height: 16px; display: inline-block;
  overflow: hidden; border: 1.5px solid currentColor; border-radius: 50%;
}
.theme-icon::after {
  content: ""; position: absolute; inset: -2px -2px -2px 50%;
  background: currentColor;
}
.text-link { color: var(--ink); font-size: var(--text-sm); font-weight: 700; text-underline-offset: 4px; }
.text-link:hover { color: var(--accent); }
.stop { background: var(--error); border-color: var(--error); }
.stop:hover { background: #8f1c13; border-color: #8f1c13; }
.stop.compact { min-height: 34px; padding: 5px 9px; font-size: 12px; }

.eyebrow, .panel-kicker, .rail-label {
  margin: 0; color: var(--accent); font-size: 11px; font-weight: 800;
  letter-spacing: 0.15em; line-height: 1.4; text-transform: uppercase;
}
.signal-dot, .pulse {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Landing */
.landing-page { background: #f7f8fa; }
.site-header {
  width: min(1280px, calc(100% - 48px)); min-height: 76px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav > a:not(.button) { color: var(--muted); text-decoration: none; font-size: var(--text-sm); font-weight: 650; }
.site-nav > a:not(.button):hover { color: var(--ink); }
.landing-page main { overflow: hidden; }
.product-hero {
  width: min(1280px, calc(100% - 48px)); min-height: 680px; margin: 0 auto;
  padding: 72px 0 88px; display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(520px, 1.12fr);
  gap: 64px; align-items: center;
}
.hero-copy { max-width: 610px; }
.hero-copy .eyebrow { display: flex; align-items: center; gap: 11px; }
.hero-copy h1 { margin: 20px 0 26px; font-size: clamp(49px, 5.5vw, 82px); letter-spacing: -0.067em; }
.hero-copy h1 span { color: #647087; }
.hero-lead { max-width: 590px; margin: 0; font-size: 18px; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 32px; }
.trust-strip { margin: 48px 0 0; padding-top: 22px; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-strip div { padding-right: 18px; }
.trust-strip dt { font-size: 18px; font-weight: 780; letter-spacing: -0.03em; }
.trust-strip dd { margin: 4px 0 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }

.product-frame {
  position: relative; overflow: hidden; background: #101827; color: white;
  border: 1px solid #2c3951; border-radius: var(--radius); box-shadow: var(--shadow-2);
}
.product-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(transparent 49%, rgba(120, 161, 255, 0.035) 50%);
  background-size: 100% 6px;
}
.frame-bar, .frame-footer {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 17px; border-bottom: 1px solid #2d3950; font-size: 12px;
}
.frame-title { display: flex; align-items: center; gap: 10px; color: #d9e0ec; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.pulse { width: 6px; height: 6px; background: #60d394; box-shadow: 0 0 0 4px rgba(96, 211, 148, 0.13); animation: pulse 2s ease-in-out infinite; }
.frame-body { position: relative; z-index: 1; min-height: 390px; display: grid; grid-template-columns: 50px 1fr; padding: 36px 28px 36px 18px; }
.trace-rail { display: flex; align-items: center; flex-direction: column; }
.trace-rail span { position: relative; width: 11px; height: 11px; margin-bottom: 67px; border: 2px solid #4c5a73; border-radius: 50%; background: #101827; }
.trace-rail span:not(:last-child)::after { content: ""; position: absolute; top: 10px; left: 3px; width: 1px; height: 68px; background: #344158; }
.trace-rail .done { border-color: #60d394; background: #60d394; }
.trace-rail .active { border-color: #78a1ff; box-shadow: 0 0 0 5px rgba(120, 161, 255, 0.15); }
.trace-time { margin: 0 0 48px; color: #8390a7; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.trace-time strong { display: block; margin-top: 6px; color: #e9edf4; font-family: "Aptos", "Segoe UI", sans-serif; font-size: 15px; }
.trace-focus { margin-top: -2px; padding: 18px; border: 1px solid #3b4b69; background: #19243a; border-radius: 7px; }
.trace-focus > div:first-child { display: flex; align-items: center; gap: 12px; }
.scanner-tag { padding: 4px 7px; color: #a9c0ff; background: #263a69; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; }
.trace-count { float: right; margin-top: -20px; color: #99a6bb; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.progress { height: 3px; margin-top: 22px; overflow: hidden; background: #344158; }
.progress i { display: block; width: 69%; height: 100%; background: #78a1ff; animation: scan-progress 3s ease-in-out infinite alternate; }
.trace-next { margin: 30px 0 0; color: #7e8ba1; font-size: 13px; }
.frame-footer { border-top: 1px solid #2d3950; border-bottom: 0; color: #8491a8; text-transform: uppercase; letter-spacing: 0.08em; }

.workflow-section, .coverage-section { padding: 96px max(24px, calc((100vw - 1280px) / 2)); }
.workflow-section { background: white; }
.section-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 56px; }
.section-intro h2, .coverage-statement h2 { max-width: 640px; margin: 10px 0 0; font-size: clamp(35px, 4vw, 57px); letter-spacing: -0.05em; }
.section-intro > p:last-child { max-width: 520px; margin: 0 0 5px auto; }
.workflow-grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.workflow-grid li { min-height: 250px; padding: 23px 28px 24px 0; border-right: 1px solid var(--border); }
.workflow-grid li + li { padding-left: 28px; }
.workflow-grid li:last-child { border-right: 0; }
.workflow-grid li > span, .coverage-list article > span { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.workflow-grid h3 { margin: 76px 0 10px; font-size: var(--text-lg); }
.workflow-grid p { margin: 0; font-size: var(--text-sm); }
.coverage-section { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 72px; background: #edf1f5; }
.coverage-statement { position: sticky; top: 32px; align-self: start; }
.coverage-list { border-top: 1px solid #cdd5df; }
.coverage-list article { display: grid; grid-template-columns: 130px 160px 1fr; gap: 24px; padding: 27px 0; align-items: baseline; border-bottom: 1px solid #cdd5df; }
.coverage-list h3 { margin: 0; font-size: var(--text-lg); }
.coverage-list p { margin: 0; font-size: var(--text-sm); }
.closing-callout { margin: 0; padding: 58px max(24px, calc((100vw - 1280px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 32px; background: var(--accent); color: white; }
.closing-callout .eyebrow { color: #c8d6ff; }
.closing-callout h2 { margin: 8px 0 0; font-size: var(--text-2xl); }
.site-footer { min-height: 108px; padding: 24px max(24px, calc((100vw - 1280px) / 2)); display: grid; grid-template-columns: 1fr auto auto; gap: 32px; align-items: center; background: #101827; color: white; }
.site-footer p { margin: 0; color: #8e9bb0; font-size: 12px; }
.site-footer .brand { color: white; }
.site-footer .brand-mark i:first-child { background: white; }

/* Authentication */
.auth-page { min-height: 100vh; background: #101827; }
.auth-header { min-height: 76px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; }
.auth-header .brand, .auth-header .text-link { color: white; }
.auth-header-actions { display: flex; align-items: center; gap: 18px; }
.auth-header .brand-mark i:first-child { background: white; }
.auth-main { width: min(1180px, calc(100% - 48px)); min-height: calc(100vh - 76px); margin: 0 auto; padding: 64px 0 96px; display: grid; grid-template-columns: 1fr 460px; gap: 100px; align-items: center; }
.auth-context { max-width: 600px; color: white; }
.auth-context .eyebrow { color: #9db6ff; }
.auth-context h1 { margin: 20px 0 24px; font-size: clamp(44px, 5.2vw, 72px); letter-spacing: -0.06em; }
.auth-context > p { max-width: 540px; color: #a8b3c5; font-size: 18px; }
.auth-facts { list-style: none; margin: 48px 0 0; padding: 0; border-top: 1px solid #344158; }
.auth-facts li { display: grid; grid-template-columns: 56px 1fr; padding: 17px 0; border-bottom: 1px solid #344158; color: #dbe2ed; }
.auth-facts span { color: #7894dd; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.auth-panel { padding: 38px; background: white; border: 1px solid #dfe4eb; border-radius: var(--radius); box-shadow: var(--shadow-2); }
.auth-panel h2 { margin: 10px 0 10px; font-size: var(--text-2xl); }
.auth-panel > p:not(.panel-kicker) { margin: 0 0 28px; font-size: var(--text-sm); }
.auth-form { display: grid; }
.auth-form label, .field > span { margin-bottom: 7px; color: var(--ink); font-size: var(--text-xs); font-weight: 720; }
.auth-form input { margin-bottom: 18px; }
.auth-form small { margin: -9px 0 22px; color: var(--muted); line-height: 1.45; }
.auth-form button { width: 100%; margin-top: 4px; }
.auth-form .auth-mode-switch { margin-top: 10px; color: var(--accent); background: transparent; border-color: transparent; }
.auth-form .auth-mode-switch:hover { color: var(--accent-hover); background: var(--accent-soft); }
#login-status, #form-status { min-height: 22px; margin: 12px 0 0; font-size: var(--text-sm); }
.form-error { margin: 2px 0 14px; padding: 11px 12px; color: #8e1f17; background: var(--error-soft); border-left: 3px solid var(--error); font-size: var(--text-sm); line-height: 1.45; }

/* Workspace */
.workspace-page { background: #eef1f5; }
.workspace-header {
  position: sticky; z-index: 20; top: 0; min-height: 66px; display: grid;
  grid-template-columns: 236px 1fr auto; align-items: center; padding: 0 24px;
  background: #101827; color: white; border-bottom: 1px solid #2b374d;
}
.workspace-product { display: flex; align-items: center; gap: 12px; color: #aeb9ca; font-size: var(--text-sm); }
.environment { padding: 3px 6px; color: #9db6ff; border: 1px solid #465a8a; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; letter-spacing: 0.12em; }
.operator-menu { display: flex; align-items: center; gap: 16px; font-size: var(--text-sm); }
.workspace-shell { width: min(1460px, 100%); min-height: calc(100vh - 66px); margin: 0 auto; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.workspace-rail { position: sticky; top: 66px; height: calc(100vh - 66px); padding: 38px 24px; border-right: 1px solid var(--border); background: #f7f8fa; }
.workspace-rail ol { list-style: none; margin: 24px 0; padding: 0; }
.workspace-rail li { position: relative; display: grid; grid-template-columns: 37px 1fr; align-items: center; min-height: 54px; color: #7a8699; font-size: var(--text-sm); font-weight: 650; }
.workspace-rail li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 39px; width: 1px; height: 30px; background: var(--border); }
.workspace-rail li span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--border); background: white; color: #7a8699; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.workspace-rail li.active { color: var(--ink); }
.workspace-rail li.active span { color: white; border-color: var(--accent); background: var(--accent); }
.workspace-rail li.complete { color: var(--ink); }
.workspace-rail li.complete span { color: var(--success); border-color: var(--success); background: var(--success-soft); }
.workspace-rail li.complete:not(:last-child)::after { background: var(--success); }
.workspace-rail li.active.complete span { color: white; border-color: var(--success); background: var(--success); }
.rail-note { position: absolute; bottom: 28px; left: 24px; right: 24px; display: flex; align-items: flex-start; gap: 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.rail-note .signal-dot { margin-top: 7px; width: 6px; height: 6px; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.rail-note p { margin: 0; font-size: 11px; line-height: 1.5; }
.rail-note strong { display: block; color: var(--ink); font-size: 12px; }
.workspace-content { min-width: 0; padding: 54px clamp(24px, 5vw, 72px) 90px; }
.workspace-intro { display: grid; grid-template-columns: 1fr minmax(280px, 460px); gap: 64px; align-items: end; margin-bottom: 42px; }
.workspace-intro h1 { margin: 13px 0 0; font-size: clamp(39px, 5vw, 64px); letter-spacing: -0.06em; }
.workspace-intro > p { margin: 0 0 5px; }
.scan-composer, .report-section { border: 1px solid var(--border); border-radius: var(--radius); background: white; box-shadow: var(--shadow-1); }
.scan-composer { padding: 30px; }
.composer-heading, .section-heading, .report-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.composer-heading > div, .section-heading > div { display: flex; gap: 16px; }
.composer-heading h2, .section-heading h2 { margin: 2px 0 0; font-size: var(--text-xl); }
.composer-heading > p { max-width: 280px; margin: 0; font-size: var(--text-sm); }
.section-number { flex: 0 0 auto; width: 29px; height: 29px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; font-weight: 800; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--border); }
.field { display: grid; align-content: start; }
.field.span-2 { grid-column: span 2; }
.field small { margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.4; }
input, select {
  width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink);
  background: white; border: 1px solid #bfc8d4; border-radius: 7px;
}
input::placeholder { color: #8b96a8; }
input:hover, select:hover { border-color: #8f9bad; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.upload-zone { position: relative; margin-top: 18px; padding: 18px; display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; border: 1px dashed #aeb8c7; border-radius: 7px; background: #fafbfc; }
.upload-zone label { display: contents; }
.upload-zone label span { font-size: var(--text-sm); font-weight: 720; }
.upload-zone label strong { grid-column: 2; grid-row: 1 / span 2; color: var(--accent); font-size: var(--text-sm); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-zone p { margin: 3px 0 0; font-size: 12px; }
.paste-file-open { grid-column: 3; grid-row: 1 / span 2; background: white; }
.staged-files { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 7px; background: white; }
.staged-heading { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: var(--text-xs); }
.staged-heading span { color: var(--muted); }
.staged-files ul { list-style: none; margin: 0; padding: 0; }
.staged-files li { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.staged-files li:last-child { border-bottom: 0; }
.staged-files li > div:first-child { min-width: 0; }
.staged-files li strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); }
.staged-files li span { color: var(--muted); font-size: 11px; }
.staged-files li > div:last-child { display: flex; gap: 7px; }
.remove-file { color: var(--error); }
.auth-disclosure { margin-top: 18px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.auth-disclosure summary { min-height: 52px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--text-sm); font-weight: 720; }
.auth-disclosure summary::marker { color: var(--accent); }
.auth-disclosure summary span { color: var(--muted); font-size: 11px; font-weight: 500; }
.auth-help { max-width: 760px; margin: 0 0 16px; font-size: 12px; }
.auth-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 4px 0 20px; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 24px; }
.attestation { display: flex; align-items: flex-start; gap: 10px; max-width: 660px; color: var(--muted); font-size: var(--text-sm); line-height: 1.45; }
.attestation input { flex: 0 0 auto; width: 18px; min-height: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); }
.runs-section { margin-top: 58px; }
.run-table-head { display: grid; grid-template-columns: minmax(260px, 1fr) 180px 90px 160px; gap: 16px; padding: 0 16px 10px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.scan-list { display: grid; gap: 8px; }
.scan { display: grid; grid-template-columns: minmax(260px, 1fr) 180px 90px 160px; gap: 16px; align-items: center; min-height: 70px; padding: 0 16px; background: white; border: 1px solid var(--border); border-radius: 7px; box-shadow: var(--shadow-1); }
.scan:hover { border-color: #aeb8c6; }
.scan-open { min-height: 68px; padding: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; color: var(--ink); background: transparent; border: 0; text-align: left; }
.scan-open:hover { color: var(--accent); background: transparent; border: 0; }
.scan-open strong { font-size: var(--text-sm); }
.scan-open span { color: var(--muted); font-size: 11px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.scan time, .finding-count { color: var(--muted); font-size: var(--text-xs); }
.scan-actions, .detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.status { width: max-content; padding: 5px 8px; color: #4f5b6d; background: #edf0f4; border-radius: 4px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.status.running, .status.queued { color: #1649cc; background: var(--accent-soft); }
.status.completed { color: var(--success); background: var(--success-soft); }
.status.failed { color: var(--error); background: var(--error-soft); }
.status.cancelled { color: var(--warning); background: var(--warning-soft); }
.empty-state { padding: 38px; text-align: center; border: 1px dashed #b9c2cf; border-radius: 7px; background: rgba(255, 255, 255, 0.55); }
.empty-state strong { display: block; margin-bottom: 5px; }
.empty-state p { margin: 0; font-size: var(--text-sm); }

.report-section { margin-top: 58px; padding: 30px; scroll-margin-top: 88px; }
.report-heading { padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.report-heading h2 { margin: 7px 0 0; font-size: var(--text-2xl); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-bottom: 1px solid var(--border); }
.metric { padding: 22px 18px 22px 0; }
.metric + .metric { padding-left: 18px; border-left: 1px solid var(--border); }
.metric span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.metric strong { display: block; margin-top: 7px; font-size: var(--text-lg); letter-spacing: -0.025em; text-transform: capitalize; }
.auth-coverage { margin-top: 22px; padding: 13px 15px; color: var(--muted); background: #f7f9fb; border-left: 3px solid var(--warning); font-size: var(--text-sm); line-height: 1.5; }
.finding-reconciliation { margin-top: 22px; padding: 13px 15px; color: var(--muted); background: var(--accent-soft); border-left: 3px solid var(--accent); font-size: var(--text-sm); line-height: 1.5; }
.finding-reconciliation strong { color: var(--ink); }
.auth-coverage.confirmed { border-left-color: var(--success); background: var(--success-soft); }
.auth-coverage.rejected { border-left-color: var(--error); background: var(--error-soft); }
.auth-coverage strong { color: var(--ink); text-transform: capitalize; }
.scanner-metadata { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border: 1px solid var(--border); border-radius: 7px; }
.scanner-metadata > div { min-width: 0; padding: 11px 13px; }
.scanner-metadata > div + div { border-left: 1px solid var(--border); }
.scanner-metadata strong { display: block; color: var(--ink); font-size: 10px; letter-spacing: 0.08em; }
.scanner-metadata span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 38px; padding-top: 32px; }
.report-main { min-width: 0; }
.report-main section + section { margin-top: 42px; padding-top: 32px; border-top: 1px solid var(--border); }
.subsection-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.subsection-heading h3 { margin: 0; font-size: var(--text-lg); }
.agent-output:empty::before { content: "The agent narrative will appear here as evidence is collected."; display: block; padding: 20px; color: var(--muted); background: #f8fafc; border-left: 3px solid var(--border); font-size: var(--text-sm); }
.agent { padding: 1px 0 1px 18px; border-left: 3px solid var(--accent); }
.markdown h2 { margin: 25px 0 10px; font-size: var(--text-lg); }
.markdown h3 { margin: 22px 0 8px; font-size: 17px; }
.markdown p { margin: 8px 0 15px; }
.markdown ul, .markdown ol { padding-left: 23px; color: var(--muted); line-height: 1.6; }
.markdown li { margin: 6px 0; }
.markdown code { padding: 2px 5px; color: var(--ink); background: #edf1f5; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.9em; }
.markdown table { width: 100%; margin: 16px 0 22px; border-collapse: collapse; color: var(--muted); font-size: var(--text-xs); }
.markdown th, .markdown td { padding: 9px 10px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.markdown th { color: var(--ink); background: #f5f7f9; }
.finding { padding: 17px 0; border-top: 1px solid var(--border); }
.finding:first-child { border-top: 0; }
.finding-head { display: flex; align-items: center; gap: 10px; }
.finding p { margin: 7px 0 0; font-size: var(--text-sm); }
.finding-locations { margin-top: 12px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; }
.finding-locations summary { color: var(--ink); cursor: pointer; font-size: 11px; font-weight: 750; }
.finding-locations ul { max-height: 230px; margin: 9px 0 0; padding: 9px 0 0 20px; overflow: auto; border-top: 1px solid var(--border); }
.finding-locations li { margin: 5px 0; color: var(--muted); font: 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.finding-locations a:not([href]) { color: var(--muted); }
.severity { flex: 0 0 auto; padding: 3px 6px; color: #4f5b6d; background: #edf0f4; font-size: 9px; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.severity.critical, .severity.high { color: var(--error); background: var(--error-soft); }
.severity.medium { color: var(--warning); background: var(--warning-soft); }
.severity.low, .severity.info { color: #2253c7; background: var(--accent-soft); }
.activity-panel { align-self: start; padding: 18px; background: #101827; color: white; border-radius: 7px; }
.activity-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 15px; border-bottom: 1px solid #334058; }
.activity-heading .signal-dot { width: 6px; height: 6px; background: #60d394; box-shadow: 0 0 0 4px rgba(96, 211, 148, 0.12); }
.activity-heading h3 { margin: 0; font-size: var(--text-sm); }
.events { max-height: 570px; margin: 0; padding: 15px 0 0 22px; overflow-y: auto; color: #aeb9ca; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 1.5; }
.events li { padding: 0 0 14px 5px; }
.events li::marker { color: #667895; }
.events strong { display: block; color: #e7ebf2; font-family: "Aptos", "Segoe UI", sans-serif; font-size: 12px; }
.events time { display: block; margin-top: 2px; color: #74829a; font-size: 9px; }
.workspace-footer { padding: 25px 32px; color: var(--muted); border-top: 1px solid var(--border); background: #e7ebf0; text-align: center; font-size: 11px; }

.paste-dialog {
  width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 48px); padding: 0;
  color: var(--ink); background: white; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
}
.paste-dialog::backdrop { background: rgba(9, 17, 31, 0.72); }
.paste-dialog form { padding: 28px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-heading h2 { margin: 7px 0 0; font-size: var(--text-xl); }
.dialog-close { min-width: 44px; width: 44px; padding: 0; color: var(--muted); background: transparent; border-color: transparent; font-size: 28px; font-weight: 400; }
.dialog-close:hover { color: var(--ink); background: #eef1f5; border-color: #eef1f5; }
.paste-dialog > form > p { margin: 10px 55px 24px 0; font-size: var(--text-sm); }
.paste-dialog .field { margin-top: 16px; }
.paste-dialog textarea {
  width: 100%; min-height: 270px; resize: vertical; padding: 12px; color: #dfe6f1;
  background: #111a2a; border: 1px solid #354158; border-radius: 7px;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.paste-dialog textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* Administration */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.admin-shell { width: min(1380px, calc(100% - 48px)); min-height: calc(100vh - 66px); margin: 0 auto; padding: 52px 0 90px; }
.admin-intro { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-bottom: 46px; }
.admin-intro h1 { margin: 9px 0 0; font-size: clamp(42px, 6vw, 68px); letter-spacing: -0.055em; }
.admin-actions { display: flex; align-items: center; gap: 18px; }
.admin-actions p { max-width: 370px; margin: 0; font-size: var(--text-sm); }
.admin-section { margin-top: 58px; }
.admin-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.admin-overview-card { min-width: 0; padding: 20px; background: white; border: 1px solid var(--border); border-radius: 7px; box-shadow: var(--shadow-1); }
.admin-overview-card > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.admin-overview-card > strong { display: block; margin-top: 10px; font-size: 30px; letter-spacing: -0.04em; }
.admin-overview-card > p { margin: 7px 0 0; font-size: 11px; }
.admin-table-wrap { margin-top: 20px; overflow-x: auto; background: white; border: 1px solid var(--border); border-radius: 7px; box-shadow: var(--shadow-1); }
.admin-table { width: 100%; min-width: 820px; border-collapse: collapse; }
.admin-table th { padding: 11px 14px; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--border); font-size: 9px; letter-spacing: 0.09em; text-align: left; text-transform: uppercase; }
.admin-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: var(--text-xs); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td strong, .admin-table td small { display: block; }
.admin-table td strong { color: var(--ink); font-size: var(--text-sm); }
.admin-table td small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.admin-table td .status + small { margin-top: 6px; }
.admin-table td:last-child { text-align: right; }
.admin-scan-open { min-height: 0; padding: 0; color: var(--ink); background: transparent; border: 0; font-size: var(--text-sm); text-align: left; }
.admin-scan-open:hover { color: var(--accent); background: transparent; border: 0; }
.invite-form { max-width: 720px; margin-top: 20px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.invite-form button { min-height: 46px; }
.admin-help { margin: 10px 0 16px; font-size: 11px; }
.invite-list { display: grid; max-width: 960px; border: 1px solid var(--border); border-radius: 7px; background: white; }
.invite-list article { min-height: 62px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--border); }
.invite-list article:last-child { border-bottom: 0; }
.invite-list strong, .invite-list span { display: block; }
.invite-list strong { font-size: var(--text-sm); }
.invite-list div > span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.workspace-cleanup-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.workspace-cleanup-list article { min-width: 0; min-height: 68px; padding: 11px 13px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; background: white; border: 1px solid var(--border); border-radius: 7px; }
.workspace-cleanup-list strong, .workspace-cleanup-list div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-cleanup-list strong { font-size: var(--text-sm); }
.workspace-cleanup-list div > span, .workspace-size { margin-top: 4px; color: var(--muted); font-size: 10px; }
.admin-scan-detail { background: white; }
.metrics .admin-overview-card { padding: 20px 16px; border: 0; border-radius: 0; box-shadow: none; }
.metrics .admin-overview-card + .admin-overview-card { border-left: 1px solid var(--border); }
.metrics .admin-overview-card > strong { font-size: var(--text-base); }
.metrics .admin-overview-card > p { display: none; }
.admin-detail-summary { padding: 25px 0; border-bottom: 1px solid var(--border); }
.admin-detail-summary h3, .admin-detail-findings h3 { margin: 0 0 12px; }
.admin-detail-summary > p:not(.auth-coverage) { max-width: 920px; }
.admin-detail-findings { padding-top: 25px; }
.admin-finding { padding: 13px 0; border-top: 1px solid var(--border); }
.admin-finding summary { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.admin-finding p { font-size: var(--text-sm); }
.admin-finding ul { max-height: 220px; overflow: auto; color: var(--muted); font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }

html[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #141e2e;
  --ink: #edf2f9;
  --muted: #a5b0c1;
  --border: #303c4f;
  --accent: #6f96ff;
  --accent-hover: #8babff;
  --accent-soft: #1c2e59;
  --success: #63d49a;
  --success-soft: #15392b;
  --warning: #f1b75d;
  --warning-soft: #46351a;
  --error: #ff8077;
  --error-soft: #482321;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-2: 0 20px 54px rgba(0, 0, 0, 0.38);
}
html[data-theme="dark"] body,
html[data-theme="dark"] .landing-page,
html[data-theme="dark"] .workspace-page { background: var(--bg); }
html[data-theme="dark"] .site-header { background: var(--bg); }
html[data-theme="dark"] .workflow-section { background: #101927; }
html[data-theme="dark"] .coverage-section { background: #172131; }
html[data-theme="dark"] .coverage-list,
html[data-theme="dark"] .coverage-list article { border-color: var(--border); }
html[data-theme="dark"] .workspace-rail { background: #101927; }
html[data-theme="dark"] .workspace-rail li span,
html[data-theme="dark"] .scan-composer,
html[data-theme="dark"] .report-section,
html[data-theme="dark"] .scan,
html[data-theme="dark"] .staged-files,
html[data-theme="dark"] .auth-panel,
html[data-theme="dark"] .paste-dialog { background: var(--surface); }
html[data-theme="dark"] .admin-overview-card,
html[data-theme="dark"] .admin-table-wrap,
html[data-theme="dark"] .invite-list,
html[data-theme="dark"] .workspace-cleanup-list article,
html[data-theme="dark"] .admin-scan-detail { background: var(--surface); }
html[data-theme="dark"] input,
html[data-theme="dark"] select {
  color: var(--ink); background: #0f1827; border-color: #46546a;
}
html[data-theme="dark"] input::placeholder { color: #76849a; }
html[data-theme="dark"] .button.secondary,
html[data-theme="dark"] .secondary,
html[data-theme="dark"] .paste-file-open { color: var(--ink); background: #182334; border-color: #3a485d; }
html[data-theme="dark"] .button.secondary:hover,
html[data-theme="dark"] .secondary:hover,
html[data-theme="dark"] .paste-file-open:hover { background: #202d41; border-color: #53627a; }
html[data-theme="dark"] .upload-zone,
html[data-theme="dark"] .empty-state { background: #101927; border-color: #46546a; }
html[data-theme="dark"] .agent-output:empty::before,
html[data-theme="dark"] .markdown th { background: #101927; }
html[data-theme="dark"] .markdown code { color: var(--ink); background: #202c3e; }
html[data-theme="dark"] .status { color: #bdc7d6; background: #253044; }
html[data-theme="dark"] .status.running,
html[data-theme="dark"] .status.queued { color: #b7c8ff; background: #203568; }
html[data-theme="dark"] .severity { color: #bdc7d6; background: #253044; }
html[data-theme="dark"] .auth-coverage { background: #20291f; }
html[data-theme="dark"] .finding-reconciliation { background: #172a52; }
html[data-theme="dark"] .workspace-footer { background: #101927; }
html[data-theme="dark"] .auth-page { background: #080e18; }
html[data-theme="dark"] .auth-panel .panel-kicker { color: #9bb4ff; }
html[data-theme="dark"] .dialog-close:hover { background: #202c3e; border-color: #202c3e; }
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .workspace-header,
html[data-theme="dark"] .product-frame,
html[data-theme="dark"] .activity-panel { background: #080f1c; }
html[data-theme="dark"] .closing-callout .button.light { color: #101827; }
html[data-theme="dark"] .closing-callout .button.light:hover {
  color: #101827; background: #dce5ff; border-color: #dce5ff;
}

@keyframes pulse { 50% { opacity: 0.45; } }
@keyframes scan-progress { from { width: 57%; } to { width: 78%; } }

@media (max-width: 1050px) {
  .product-hero { grid-template-columns: 1fr; padding-top: 52px; }
  .hero-copy { max-width: 760px; }
  .product-frame { max-width: 760px; }
  .coverage-section { grid-template-columns: 1fr; gap: 42px; }
  .coverage-statement { position: static; }
  .workspace-header { grid-template-columns: auto 1fr auto; }
  .workspace-product { padding-left: 24px; }
  .workspace-shell { grid-template-columns: 1fr; }
  .workspace-rail { display: none; }
  .report-grid { grid-template-columns: 1fr; }
  .activity-panel { position: static; }
  .admin-overview { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .site-header { width: min(100% - 32px, 1280px); }
  .site-nav > a:not(.button) { display: none; }
  .site-nav .theme-label { display: none; }
  .site-nav .theme-toggle { width: 44px; padding-inline: 0; }
  .site-nav { gap: 10px; }
  .product-hero { width: min(100% - 32px, 1280px); min-height: 0; padding: 48px 0 64px; gap: 44px; }
  .hero-copy h1 { font-size: clamp(43px, 13vw, 64px); }
  .hero-lead { font-size: var(--text-base); }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .trust-strip { gap: 12px; }
  .frame-body { min-height: 330px; padding: 26px 16px 26px 8px; grid-template-columns: 38px 1fr; }
  .frame-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
  .trace-time { margin-bottom: 37px; }
  .trace-rail span { margin-bottom: 57px; }
  .trace-rail span:not(:last-child)::after { height: 58px; }
  .workflow-section, .coverage-section { padding-top: 64px; padding-bottom: 64px; }
  .section-intro { grid-template-columns: 1fr; gap: 20px; margin-bottom: 38px; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-grid li, .workflow-grid li + li { min-height: 0; padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .workflow-grid h3 { margin: 28px 0 8px; }
  .coverage-list article { grid-template-columns: 1fr; gap: 6px; }
  .closing-callout { align-items: flex-start; flex-direction: column; }
  .site-footer { grid-template-columns: 1fr; gap: 13px; }
  .auth-main { width: min(100% - 32px, 1180px); padding-top: 28px; grid-template-columns: 1fr; gap: 42px; }
  .auth-context h1 { font-size: 43px; }
  .auth-context > p, .auth-facts { display: none; }
  .auth-panel { padding: 26px 22px; }
  .workspace-header { grid-template-columns: 1fr auto; padding: 0 16px; }
  .workspace-product { display: none; }
  .operator-menu > span { display: none; }
  .operator-menu .theme-label { display: none; }
  .operator-menu .theme-toggle { width: 44px; padding-inline: 0; }
  .workspace-content { padding: 35px 16px 64px; }
  .workspace-intro { grid-template-columns: 1fr; gap: 14px; margin-bottom: 30px; }
  .workspace-intro h1 { font-size: 42px; }
  .scan-composer, .report-section { padding: 20px 16px; }
  .composer-heading { display: block; }
  .composer-heading > p { margin: 12px 0 0 45px; }
  .field-grid, .auth-row { grid-template-columns: 1fr; gap: 16px; }
  .field.span-2 { grid-column: auto; }
  .upload-zone { grid-template-columns: 1fr; gap: 12px; }
  .upload-zone label strong { grid-column: 1; grid-row: auto; }
  .paste-file-open { grid-column: 1; grid-row: auto; width: 100%; }
  .staged-files li { align-items: flex-start; flex-direction: column; padding: 12px 0; }
  .paste-dialog form { padding: 22px 16px; }
  .composer-footer { align-items: stretch; flex-direction: column; }
  .composer-footer button { width: 100%; }
  .section-heading { align-items: center; }
  .run-table-head { display: none; }
  .scan { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 12px; }
  .scan time, .finding-count { display: none; }
  .scan-actions { justify-content: flex-end; }
  .report-heading { align-items: flex-start; flex-direction: column; }
  .detail-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(odd) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--border); }
  .metric { padding: 15px 12px 15px 0; }
  .metric + .metric { padding-left: 12px; }
  .scanner-metadata { grid-template-columns: 1fr; }
  .scanner-metadata > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .report-grid { gap: 30px; }
  .markdown { overflow-x: auto; }
  .admin-shell { width: min(100% - 32px, 1380px); padding-top: 34px; }
  .admin-intro { display: block; }
  .admin-actions { align-items: flex-start; flex-direction: column; margin-top: 18px; }
  .admin-overview { grid-template-columns: 1fr; }
  .invite-form { grid-template-columns: 1fr; }
  .invite-form button { width: 100%; }
  .metrics .admin-overview-card + .admin-overview-card { border-left: 0; border-top: 1px solid var(--border); }
  .workspace-cleanup-list { grid-template-columns: 1fr; }
  .admin-section .section-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 370px) {
  .site-header .brand + .site-nav .button { padding-inline: 10px; font-size: 12px; }
  .brand { font-size: 19px; }
  .auth-header { padding-inline: 16px; }
  .auth-header .text-link { font-size: 12px; }
  .auth-header-actions { gap: 8px; }
  .auth-header-actions .theme-label { display: none; }
  .auth-header-actions .theme-toggle { width: 44px; padding-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media (prefers-contrast: more) {
  :root { --border: #7b8492; --muted: #414b5a; }
  .status, .severity { border: 1px solid currentColor; }
}

@media (forced-colors: active) {
  .brand-mark i, .signal-dot, .pulse, .progress i { forced-color-adjust: none; }
  :focus-visible { outline: 3px solid Highlight; }
}
