:root {
  --ink: #0a0d0c;
  --ink-soft: #141918;
  --paper: #f2f3eb;
  --paper-strong: #fbfcf6;
  --muted: #66706a;
  --line: #aeb7b0;
  --line-dark: #3d4842;
  --coral: #ff705c;
  --cyan: #38dbe5;
  --acid: #c7ff3f;
  --amber: #ffca4a;
  --danger: #ff4f4f;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 300px; margin: 0; background: var(--paper); color: var(--ink); }
button, textarea, input { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 100; left: 12px; top: -80px; padding: 10px 14px; color: var(--ink); background: var(--acid); font: 800 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.skip-link:focus { top: 12px; }
.topbar { min-height: 68px; display: flex; align-items: stretch; justify-content: space-between; border-bottom: 1px solid var(--line-dark); color: var(--paper-strong); background: var(--ink); }
.brand { min-width: 310px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 12px 22px; border-right: 1px solid var(--line-dark); color: inherit; text-decoration: none; }
.brand strong, .brand span { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.brand strong { font-size: 13px; }
.brand span { color: #93a098; font-size: 8px; }
.topbar nav { display: flex; align-items: stretch; margin-left: auto; }
.topbar nav a { min-width: 96px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-left: 1px solid var(--line-dark); color: #c9d0cb; font: 800 9px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; text-decoration: none; }
.topbar nav a:hover, .topbar nav a:focus-visible { color: var(--ink); background: var(--cyan); outline: 0; }

.scanner-band { background: var(--paper); border-bottom: 1px solid var(--ink); }
.scanner-shell { width: min(100%, 1540px); margin: 0 auto; padding: 54px 28px 72px; }
.scanner-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 56px; align-items: end; }
.eyebrow { margin: 0; color: #087d84; font: 800 9px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.scanner-intro h1 { max-width: 940px; margin: 14px 0 0; font: 800 58px/.96 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; text-wrap: balance; }
.scanner-intro > p { max-width: 580px; margin: 0; color: #4f5953; font-size: 16px; line-height: 1.62; }
.telemetry { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 34px; border: 1px solid var(--ink); background: var(--paper-strong); }
.telemetry span { min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-right: 1px solid var(--ink); color: #4c5650; font: 800 8px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; overflow-wrap: anywhere; }
.telemetry span:last-child { border-right: 0; }
.telemetry i { width: 7px; height: 7px; flex: 0 0 7px; border: 1px solid var(--ink); background: var(--acid); }
.telemetry b { color: var(--ink); }

.workbench { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(0, 1.1fr); min-height: 690px; margin-top: 18px; border: 1px solid var(--ink); background: var(--paper-strong); }
.input-panel { min-width: 0; display: flex; flex-direction: column; padding: 24px; border-right: 1px solid var(--ink); }
.mode-control { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; border: 1px solid var(--ink); }
.mode-control legend { grid-column: 1 / -1; float: none; width: 100%; padding: 0 0 10px; color: #59635d; font: 800 8px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.mode-control label { position: relative; min-width: 0; min-height: 82px; display: flex; align-items: stretch; border-right: 1px solid var(--ink); cursor: pointer; }
.mode-control label:last-child { border-right: 0; }
.mode-control input { position: absolute; opacity: 0; pointer-events: none; }
.mode-control label > span { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 12px; background: #e6e9df; }
.mode-control b, .mode-control small { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.mode-control b { font-size: 10px; }
.mode-control small { color: #5e6862; font-size: 8px; line-height: 1.4; }
.mode-control input:checked + span { color: var(--paper-strong); background: var(--ink); box-shadow: inset 0 -5px 0 var(--coral); }
.mode-control input:checked + span small { color: #c5cec8; }
.mode-control input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: -3px; }

.source-tools { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.file-command { min-height: 34px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--ink); cursor: pointer; }
.file-command input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.file-command span { font-size: 18px; line-height: 1; }
.file-command b, .source-tools > span { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.file-command b { font-size: 8px; }
.file-command:hover, .file-command:focus-within { color: var(--ink); background: var(--cyan); }
.source-tools > span { max-width: 260px; color: #6b756f; font-size: 7px; line-height: 1.35; text-align: right; overflow-wrap: anywhere; }
.editor-field { min-width: 0; display: flex; flex: 1; flex-direction: column; margin-top: 18px; }
.editor-field > span { margin-bottom: 8px; color: #59635d; font: 800 8px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.editor-field textarea { width: 100%; min-height: 360px; flex: 1; resize: vertical; padding: 16px; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); background: #fff; font: 500 13px/1.58 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; tab-size: 2; }
.editor-field textarea:focus { border-color: #087d84; outline: 3px solid rgba(56, 219, 229, .34); }
.editor-meta { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #66706a; font: 800 7px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.form-error { color: #b72c2c; text-align: right; }
.input-actions, .result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.command { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 13px; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); background: transparent; font: 800 8px/1.25 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; cursor: pointer; }
.command:hover, .command:focus-visible { color: var(--ink); background: var(--acid); outline: 0; }
.command--coral { color: var(--ink); background: var(--coral); }
.command--cyan { color: var(--ink); background: var(--cyan); }
.command--quiet { color: #6b756f; border-color: var(--line); }
.sample-notice { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin: 14px 0 0; padding: 10px 12px; border-left: 5px solid var(--amber); color: #4d5751; background: #fff4d5; font-size: 11px; line-height: 1.45; }
.sample-notice b { font: 800 8px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }

.result-panel { min-width: 0; color: var(--paper-strong); background: var(--ink); }
.result-idle { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 44px; }
.idle-mark { color: var(--cyan); font: 800 48px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.result-idle .eyebrow { margin-top: 30px; color: var(--cyan); }
.result-idle h2 { max-width: 720px; margin: 14px 0 0; font: 800 38px/1.02 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; text-wrap: balance; }
.result-idle > p:last-of-type { max-width: 600px; margin: 18px 0 0; color: #aeb9b2; line-height: 1.6; }
.result-idle ol { max-width: 620px; margin: 36px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-dark); }
.result-idle li { min-height: 48px; display: grid; grid-template-columns: 44px 1fr; align-items: center; border-bottom: 1px solid var(--line-dark); }
.result-idle li span { color: var(--cyan); font: 800 9px ui-monospace, SFMono-Regular, Consolas, monospace; }
.result-idle li b { font-size: 12px; }
.result-ready { padding: 26px; }
.result-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line-dark); }
.result-header .eyebrow { color: var(--cyan); }
.result-header h2 { margin: 9px 0 0; font: 800 24px/1.06 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.digest { flex: 0 0 auto; text-align: right; }
.digest span, .digest code { display: block; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.digest span { color: #849189; font-size: 7px; }
.digest code { margin-top: 6px; color: var(--acid); font-size: 10px; }
.risk-readout { padding: 20px 0; border-bottom: 1px solid var(--line-dark); }
.risk-readout__label { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.risk-readout__label span, .risk-readout__label strong { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.risk-readout__label span { color: #94a199; font-size: 8px; }
.risk-readout__label strong { color: var(--acid); font-size: 13px; }
.risk-track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; height: 12px; margin-top: 12px; }
.risk-track i { border: 1px solid #4a5650; background: #202624; }
body[data-risk="watch"] .risk-track i:nth-child(-n+1), body[data-risk="elevated"] .risk-track i:nth-child(-n+3), body[data-risk="high"] .risk-track i:nth-child(-n+4), body[data-risk="critical"] .risk-track i { border-color: var(--coral); background: var(--coral); }
body[data-risk="none"] .risk-track i:nth-child(-n+1) { border-color: var(--acid); background: var(--acid); }
body[data-risk="critical"] .risk-readout__label strong { color: var(--danger); }
.risk-readout > p { margin: 12px 0 0; color: #aeb9b2; font-size: 12px; line-height: 1.55; }
.signal-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--line-dark); }
.signal-summary div { min-width: 0; padding: 16px 10px; border-right: 1px solid var(--line-dark); }
.signal-summary div:last-child { border-right: 0; }
.signal-summary dt { min-height: 24px; color: #8b9890; font: 800 7px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.signal-summary dd { margin: 8px 0 0; color: var(--paper-strong); font: 800 24px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.finding-list { display: grid; gap: 8px; margin-top: 18px; }
.finding { min-width: 0; border: 1px solid var(--line-dark); background: var(--ink-soft); }
.finding__head { min-height: 38px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line-dark); }
.finding__severity, .finding__type, .finding__location { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.finding__severity { padding: 5px 7px; color: var(--ink); background: var(--amber); font-size: 7px; }
.finding[data-severity="critical"] .finding__severity { color: white; background: var(--danger); }
.finding[data-severity="high"] .finding__severity { background: var(--coral); }
.finding[data-severity="low"] .finding__severity { background: var(--cyan); }
.finding__type { min-width: 0; font-size: 9px; overflow-wrap: anywhere; }
.finding__location { color: #8f9b94; font-size: 7px; white-space: nowrap; }
.finding__body { padding: 12px; }
.finding__body p { margin: 0; }
.finding__evidence { color: #f1f4ee; font: 500 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; overflow-wrap: anywhere; }
.finding__recommendation { margin-top: 10px !important; padding-top: 10px; border-top: 1px solid #323b36; color: #aeb9b2; font-size: 11px; line-height: 1.5; }
.finding-empty { margin-top: 18px; padding: 18px; border: 1px solid #55615a; border-left: 6px solid var(--acid); }
.finding-empty strong { font: 800 13px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.finding-empty p { margin: 8px 0 0; color: #aeb9b2; font-size: 11px; line-height: 1.5; }
.redaction-output { margin-top: 20px; border-top: 1px solid var(--line-dark); }
.redaction-output header { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.redaction-output header span, .redaction-output h3 { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.redaction-output header div > span { color: var(--cyan); font-size: 7px; }
.redaction-output h3 { margin: 6px 0 0; font-size: 13px; }
.redaction-output header > span { min-width: 36px; text-align: right; color: var(--acid); font-size: 18px; }
.redaction-output pre { max-height: 220px; margin: 0; padding: 14px; overflow: auto; border: 1px solid #4a5650; color: #dce4de; background: #060807; font: 500 10px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.redaction-output > p { margin: 9px 0 0; color: #8e9b93; font-size: 10px; line-height: 1.5; }
.result-actions { margin-top: 18px; }
.result-panel .command { color: var(--paper-strong); border-color: #69766e; }
.result-panel .command:hover, .result-panel .command:focus-visible, .result-panel .command--cyan { color: var(--ink); border-color: var(--cyan); background: var(--cyan); }
.action-status { min-height: 18px; margin: 10px 0 0; color: var(--acid); font: 800 8px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }

.method-band { color: var(--paper-strong); background: #131817; border-bottom: 1px solid var(--line-dark); }
.method-shell, .limits-shell { width: min(100%, 1540px); margin: 0 auto; padding: 70px 28px; }
.method-shell > header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .65fr); gap: 60px; }
.method-shell > header .eyebrow { grid-column: 1 / -1; color: var(--cyan); }
.method-shell h2, .limits-shell h2 { margin: 0; font: 800 38px/1.02 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; text-wrap: balance; }
.method-shell > header > p:last-child { margin: 0; color: #aeb9b2; line-height: 1.65; }
.control-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 44px; border-top: 1px solid var(--line-dark); border-left: 1px solid var(--line-dark); }
.control-grid article { min-width: 0; min-height: 210px; padding: 20px; border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.control-grid span { color: var(--coral); font: 800 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.control-grid h3 { margin: 34px 0 0; font: 800 15px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.control-grid p { margin: 12px 0 0; color: #aeb9b2; font-size: 12px; line-height: 1.6; }
.limits-band { background: var(--paper-strong); }
.limits-shell { display: grid; grid-template-columns: minmax(280px, .65fr) minmax(360px, 1fr); gap: 54px 80px; }
.limits-shell .eyebrow { margin-bottom: 12px; }
.limits-shell ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.limits-shell li { min-height: 54px; display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.5; }
.limits-shell nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.limits-shell nav a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--ink); color: var(--ink); font: 800 8px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; text-decoration: none; }
.limits-shell nav a:hover, .limits-shell nav a:focus-visible { background: var(--acid); outline: 0; }

.footer { min-height: 64px; display: flex; align-items: center; gap: 22px; padding: 12px 22px; color: #aab5ae; background: var(--ink); border-top: 1px solid var(--line-dark); font: 800 8px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.footer > a { color: var(--paper-strong); text-decoration: none; }
.footer nav { display: flex; flex-wrap: wrap; gap: 16px; margin-left: auto; }
.footer nav a { color: #aab5ae; text-decoration: none; }
.footer nav a:hover { color: var(--cyan); }
.noscript { margin: 0; padding: 14px; color: white; background: #9d2424; text-align: center; }

@media (max-width: 1100px) {
  .scanner-intro { grid-template-columns: 1fr; gap: 22px; }
  .workbench { grid-template-columns: 1fr; }
  .input-panel { border-right: 0; border-bottom: 1px solid var(--ink); }
  .method-shell > header { grid-template-columns: 1fr; gap: 20px; }
  .control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .topbar { align-items: stretch; flex-direction: column; }
  .brand { min-width: 0; border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .topbar nav { width: 100%; overflow-x: auto; }
  .topbar nav a { min-width: 88px; flex: 1 0 auto; }
  .scanner-shell, .method-shell, .limits-shell { padding-right: 14px; padding-left: 14px; }
  .scanner-intro h1 { font-size: 42px; }
  .telemetry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .telemetry span:nth-child(2) { border-right: 0; }
  .telemetry span:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
  .input-panel, .result-ready, .result-idle { padding: 18px; }
  .signal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signal-summary div:nth-child(2) { border-right: 0; }
  .signal-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--line-dark); }
  .limits-shell { grid-template-columns: 1fr; gap: 28px; }
  .limits-shell nav { grid-column: 1; }
  .footer { align-items: flex-start; flex-direction: column; }
  .footer nav { margin-left: 0; }
}

@media (max-width: 520px) {
  .scanner-shell { padding-top: 38px; padding-bottom: 48px; }
  .scanner-intro h1 { font-size: 34px; line-height: 1.02; }
  .telemetry span { min-height: 52px; }
  .mode-control { grid-template-columns: 1fr; }
  .mode-control label { border-right: 0; border-bottom: 1px solid var(--ink); }
  .mode-control label:last-child { border-bottom: 0; }
  .source-tools { align-items: flex-start; flex-direction: column; }
  .source-tools > span { max-width: none; text-align: left; }
  .editor-field textarea { min-height: 330px; }
  .input-actions .command, .result-actions .command { width: 100%; }
  .result-idle h2 { font-size: 29px; }
  .result-header { align-items: flex-start; flex-direction: column; }
  .digest { text-align: left; }
  .finding__head { grid-template-columns: auto 1fr; }
  .finding__location { grid-column: 2; }
  .control-grid { grid-template-columns: 1fr; }
  .control-grid article { min-height: 180px; }
  .method-shell h2, .limits-shell h2 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
