@font-face {
  font-family: "DM Sans";
  src: url("dm-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #f3f5f1;
  --surface: #fff;
  --ink: #192825;
  --muted: #4f625c;
  --stroke: #dce4dd;
  --teal: #114a3f;
  --accent: #bcf3d7;
  --error: #a12d25;
  --warning: #84500b;
  --mono: "IBM Plex Mono", "DejaVu Sans Mono", monospace;
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--teal); }
:focus-visible { outline: 3px solid #25758d; outline-offset: 3px; }
.wrap { width: min(100% - 64px, 1200px); margin-inline: auto; }
.topbar { background: #172d27; color: #fafdf9; }
.topbar-inner { height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.wordmark { display: inline-flex; gap: 11px; align-items: center; font-weight: 750; letter-spacing: -.035em; font-size: 1.2rem; }
.mark {
  width: 25px; height: 25px; border: 1px solid #6b9e88; border-radius: 6px;
  background: repeating-linear-gradient(to bottom, #bbebd6 0 2px, transparent 2px 5px) center / 11px 12px no-repeat;
}
.local-label { font-family: var(--mono); color: #d7e7de; font-size: .72rem; }
.local-label span { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #8fe7bc; }
.intro { padding: 43px 0 29px; }
.intro h1 { margin: 0; font-size: clamp(2.15rem, 4.2vw, 3.6rem); font-weight: 760; line-height: 1.05; letter-spacing: -.065em; }
.intro p { margin: 13px 0 0; color: var(--muted); font-size: 1.04rem; max-width: 62ch; }
.workspace { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--stroke); border-radius: 15px; box-shadow: 0 3px 10px #19282506; min-width: 0; }
.controls { padding: 21px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend, .field-title { padding: 0; margin: 0 0 9px; display: block; font-weight: 740; font-size: .89rem; }
.mode-list { display: grid; gap: 7px; }
.mode { display: flex; align-items: center; gap: 10px; border: 1px solid var(--stroke); padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.mode:has(:checked) { border-color: #76a593; background: #edf7f0; }
.mode input { accent-color: var(--teal); width: 16px; height: 16px; margin: 2px; flex-shrink: 0; }
.mode small { display: block; color: var(--muted); font-size: .74rem; }
.mode strong { font-size: .88rem; }
.file-section { margin-top: 20px; }
#csv-file { width: 100%; min-width: 0; padding: 4px; border: 1px solid var(--stroke); border-radius: 8px; background: #f6f8f5; font-size: .78rem; color: var(--muted); }
#csv-file::file-selector-button { color: var(--ink); border: 1px solid #cdd9d2; border-radius: 5px; padding: 7px; background: #fff; margin-right: 7px; cursor: pointer; font: inherit; font-weight: 700; }
.hint { color: var(--muted); font-size: .72rem; line-height: 1.5; margin: 7px 0 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; font-size: .83rem; font-weight: 720; text-decoration: none; }
.main-button { background: var(--teal); color: white; }
.main-button:hover { background: #1a604f; }
.controls .main-button { width: 100%; justify-content: space-between; }
.main-button:disabled { background: #e9efeb; color: #53655e; }
.secondary { background: #fff; border-color: #cedbd3; color: var(--teal); white-space: nowrap; }
.secondary:hover { background: #edf7f0; }
.secondary:disabled { color: #65756e; background: #f6f8f6; }
.sample-section { border-top: 1px solid var(--stroke); padding-top: 15px; margin-top: 18px; }
.sample-buttons { display: grid; gap: 4px; }
.sample-button { display: flex; justify-content: space-between; align-items: center; border: 0; border-radius: 5px; padding: 7px 8px; background: #f3f7f3; color: var(--teal); font-size: .82rem; font-weight: 670; text-align: left; }
.sample-button:hover { background: #e6f2e8; }
.report { min-height: 430px; }
.report-header { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 10px; padding: 17px 20px; }
.report-header h2, .preview-heading h2 { margin: 0; line-height: 1.2; font-size: 1.18rem; letter-spacing: -.025em; }
.report-source { overflow-wrap: anywhere; margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--stroke); background: #f6f8f5; }
.metrics div { display: flex; flex-direction: column-reverse; padding: 10px 17px 11px; }
.metrics div + div { border-left: 1px solid var(--stroke); }
.metrics dt { color: var(--muted); font-size: .73rem; }
.metrics dd { margin: 0; font-size: 1.64rem; font-weight: 730; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.error-text { color: var(--error); }
.warning-text { color: var(--warning); }
.result-toolbar { min-height: 51px; padding: 8px 20px; display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .78rem; }
.result-toolbar p { margin: 0; }
select { border: 1px solid #cedbd3; border-radius: 6px; padding: 5px; background: white; color: var(--ink); }
.finding { display: grid; grid-template-columns: 65px minmax(0, 1fr); gap: 12px; border-top: 1px solid var(--stroke); padding: 13px 20px; overflow-wrap: anywhere; }
.line-label { color: var(--muted); font: .75rem var(--mono); padding-top: 5px; }
.finding-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 8px; font-size: .71rem; color: var(--muted); }
.rule { font-family: var(--mono); letter-spacing: -.015em; }
.severity { display: inline-block; border-radius: 4px; padding: 2px 6px; font-size: .68rem; font-weight: 750; }
.severity.error { background: #fbe9e5; color: var(--error); }
.severity.warning { background: #faeed6; color: var(--warning); }
.finding h3 { font-size: .91rem; line-height: 1.35; margin: 5px 0 0; }
.finding p { color: var(--muted); font-size: .81rem; line-height: 1.4; margin: 4px 0 0; }
.pagination { border-top: 1px solid var(--stroke); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 12px; font-size: .8rem; }
.empty-state { text-align: center; display: grid; place-content: center; justify-items: center; padding: 33px 16px; min-height: 230px; }
.empty-icon { color: var(--teal); background: #e4f1e8; border: 1px solid #d1e4d8; border-radius: 9px; width: 42px; height: 42px; font: 1.6rem/38px var(--mono); }
.empty-state h3 { margin: 11px 0 4px; font-size: 1rem; }
.empty-state p, .no-findings { margin: 0; color: var(--muted); font-size: .85rem; }
.no-findings, .failure { margin: 0; border-top: 1px solid var(--stroke); padding: 16px 20px; }
.failure { color: var(--error); background: #fff4f0; }
.footer { display: flex; justify-content: space-between; gap: 12px; padding: 17px 0 28px; color: var(--muted); font-size: .76rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.preview-action { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.preview-action .button { padding-inline: 15px; }
.preview-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 17px; align-items: start; }
.preview-heading { padding: 16px 18px; border-bottom: 1px solid var(--stroke); }
.preview-heading p { color: var(--muted); font-size: .77rem; margin: 4px 0 0; }
.preview-code { margin: 0; border-radius: 0 0 14px 14px; padding: 12px 13px 16px; color: #ecf7ef; background: #1b322b; font: .78rem/1.7 var(--mono); }
.code-row { display: grid; grid-template-columns: 2ch minmax(0, 1fr); gap: 9px; }
.code-row span:first-child { color: #a5baad; text-align: right; }
.code-row code { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.code-row + .code-row { margin-top: 5px; }
.preview-details { margin: 0; color: var(--muted); padding: 15px 18px; font-size: .84rem; }
.preview-grid .finding { grid-template-columns: 51px minmax(0, 1fr); }
.preview-grid .finding:first-of-type { border-top: 0; }
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .workspace, .preview-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .intro { padding: 28px 0 19px; }
  .intro p { margin-top: 8px; font-size: .92rem; }
  .topbar-inner { height: 51px; }
  .controls, .report-header { padding: 15px; }
  .mode-list, .sample-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode { padding: 8px 6px; gap: 5px; }
  .file-section { margin-top: 13px; }
  .sample-section { margin-top: 12px; padding-top: 10px; }
  .metrics div { padding-inline: 8px; }
  .metrics dd { font-size: 1.35rem; }
  .result-toolbar, .finding { padding-inline: 13px; }
  .finding { grid-template-columns: 48px minmax(0, 1fr); gap: 7px; }
  .report { min-height: 290px; }
}
.secondary[aria-disabled="true"] { cursor: default; color: #65756e; background: #f6f8f6; }
.preview-intro { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: end; }
.preview-intro .offer { font-size: .88rem; padding-left: 17px; border-left: 2px solid #8fae9b; }
.offer strong { display: block; color: var(--teal); font-size: 1.07rem; margin-bottom: 4px; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.preview-heading a { font-size: .77rem; font-weight: 700; white-space: nowrap; text-underline-offset: 3px; }
.preview-code .code-row { padding: 3px 5px; border-radius: 4px; }
.preview-code.checked .code-row:not(:first-child) { background: #28453a; }
@media (max-width: 760px) {
  .preview-intro { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .preview-intro .offer { margin: 0; }
}
