/* Design Contract: Crisp Swiss-engineering light mode; precise spacing, legible code, responsive two-column workbench, and no horizontal page overflow. */

```css
:root {
  color-scheme: light;
  --paper: #f7f7f5;
  --surface: #ffffff;
  --border: #e4e4e0;
  --ink: #141413;
  --muted: #57534e;
  --cobalt: #1d4ed8;
  --amber: #d97706;
  --crimson: #dc2626;
  --green: #059669;
  --soft-blue: #eff6ff;
  --soft-amber: #fffbeb;
  --soft-red: #fef2f2;
  --soft-green: #ecfdf5;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgb(20 20 19 / 5%), 0 8px 24px rgb(20 20 19 / 3%);
  --sans: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  overflow-x: clip;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

a {
  color: var(--cobalt);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #1e40af;
}

:focus-visible {
  outline: 3px solid rgb(29 78 216 / 35%);
  outline-offset: 2px;
}

::selection {
  background: #dbeafe;
  color: var(--ink);
}

.hidden {
  display: none !important;
}

.topbar,
.hero,
.sample-bar,
.workspace,
.cta-band,
.footer {
  width: min(1160px, calc(100% - 48px));
  min-width: 0;
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font: 700 13px/1 var(--mono);
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.trust-pill::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.hero {
  padding: 42px 0 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cobalt);
  font: 700 11px/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.hero p {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.sample-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.sample-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sample-options,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.btn {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.btn:hover {
  border-color: #b8b8b2;
  background: #fafaf9;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: #fff;
}

.btn-primary:hover {
  border-color: #1e40af;
  background: #1e40af;
  color: #fff;
}

.btn-ghost {
  background: transparent;
}

.btn-amber {
  border-color: #f2c783;
  background: var(--soft-amber);
  color: #92400e;
}

.btn-amber:hover {
  border-color: var(--amber);
  background: #fef3c7;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: 16px;
  margin-bottom: 34px;
}

.workspace > *,
.panel,
.panel-body,
.panel-head,
.stat-card,
.finding-card,
.cta-card {
  min-width: 0;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 14px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.panel-head h2,
.panel-head h3 {
  min-width: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.panel-body {
  padding: 16px;
}

.panel-kicker,
.field-label,
.sim-field label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.editor {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 250px;
  resize: vertical;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfbfa;
  color: var(--ink);
  font: 12px/1.65 var(--mono);
  tab-size: 2;
  overflow-wrap: anywhere;
}

.editor-sm {
  min-height: 92px;
  padding: 10px 11px;
  font-size: 11px;
  line-height: 1.55;
}

input[type="text"],
input[type="number"],
input[type="search"],
select,
textarea {
  min-width: 0;
  max-width: 100%;
}

input[type="text"],
input[type="number"],
select {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: var(--cobalt);
  outline: 3px solid rgb(29 78 216 / 12%);
}

.editor:focus {
  border-color: var(--cobalt);
  outline: 3px solid rgb(29 78 216 / 12%);
}

.hash-box {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  background: var(--soft-blue);
}

.hash-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #1e3a8a;
  font: 11px/1.65 var(--mono);
}

.hash-box .btn {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 6px 9px;
  font-size: 11px;
}

.score-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #fbfbfa;
}

.score-main {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.score-value {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 780;
  letter-spacing: -0.06em;
  line-height: 1;
}

.score-suffix,
.score-caption {
  color: var(--muted);
  font-size: 11px;
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  background: var(--soft-green);
  color: #065f46;
  font: 800 16px/1 var(--mono);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.stat-card {
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.stat-value {
  display: block;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.stat-label {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
}

.finding-list {
  display: grid;
  gap: 8px;
}

.finding-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.finding-card strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  line-height: 1.4;
}

.finding-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sev-CRITICAL,
.sev-HIGH,
.sev-MEDIUM {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  font: 750 9px/1.2 var(--mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sev-CRITICAL {
  border-color: #fecaca;
  background: var(--soft-red);
  color: #991b1b;
}

/* Layout & component polish additions */
.container { max-width: 1320px; margin: 0 auto; padding: 20px; box-sizing: border-box; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: #141413; color: #ffffff; border: 2px solid #d97706; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.brand-title { font-weight: 700; font-size: 15px; color: #141413; }
.brand-sub { font-size: 12px; color: #57534e; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: #57534e; margin: 12px 0 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.editor-sm { width: 100%; min-height: 82px; box-sizing: border-box; }
.sim-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e4e4e0; }
.sim-block h3 { font-size: 14px; margin: 0 0 10px; color: #141413; }
.sim-summary { margin: 10px 0; padding: 10px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.sim-summary.sim-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.sim-summary.sim-dlq { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.status-pill { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.status-ok { background: #dcfce7; color: #166534; }
.status-dlq { background: #fef3c7; color: #92400e; }
.status-fail { background: #fee2e2; color: #991b1b; }
.score-box { display: flex; align-items: baseline; gap: 4px; padding: 12px 16px; background: #f7f7f5; border: 1px solid #e4e4e0; border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.score-box strong { font-size: 28px; color: #141413; }
.score-meta { flex: 1; min-width: 0; }
.grade-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.provider-pill { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; padding: 2px 8px; border-radius: 4px; background: #eef2ff; color: #1d4ed8; font-weight: 600; }
.hash-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #57534e; }
.hash-box code { display: block; word-break: break-all; font-size: 12px; color: #1d4ed8; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.tab-copy { margin-left: auto; }
.finding-head { margin-bottom: 4px; }
.sev-badge { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.sev-badge.sev-CRITICAL { background: #fee2e2; color: #991b1b; }
.sev-badge.sev-HIGH { background: #fef3c7; color: #92400e; }
.sev-badge.sev-MEDIUM { background: #e0f2fe; color: #075985; }
.finding-card.sev-PASS { border-left: 3px solid #059669; background: #ecfdf5; }
.finding-card h4 { margin: 4px 0 6px; font-size: 14px; color: #141413; }
.finding-card p { margin: 6px 0 0; font-size: 13px; color: #44403c; line-height: 1.5; }
.fix-line { font-weight: 600; color: #1d4ed8 !important; }
.excerpt { display: block; padding: 6px 8px; background: #f7f7f5; border: 1px solid #e4e4e0; border-radius: 6px; font-size: 12px; color: #b91c1c; word-break: break-word; }
.code-section { margin-top: 16px; }
.code-block { max-height: 300px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.toast { position: fixed; bottom: 20px; right: 20px; background: #141413; color: #ffffff; font-weight: 600; padding: 10px 16px; border-radius: 8px; font-size: 13px; z-index: 99; }
.hidden { display: none !important; }
@media (max-width: 640px) { .container { padding: 12px; } .topbar { flex-wrap: wrap; gap: 10px; } }
