:root {
  font: 16px/1.5 system-ui, sans-serif;
  --bg: #f5f7f2;
  --ink: #1b2721;
  --muted: #4b5c53;
  --panel: #fff;
  --line: #d7dfd4;
  --green: #245641;
  color: var(--ink);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button, select { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 3px solid #659a70; outline-offset: 3px; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; z-index: 3; left: 1rem; top: -4rem; padding: 8px; background: white; }
.skip:focus { top: 1rem; }
.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar, .footer-inner { min-height: 67px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 24px; font-weight: 760; letter-spacing: -.05em; }
.mark { width: 26px; height: 26px; padding: 6px; background: var(--green); border-radius: 4px; display: grid; align-content: space-between; }
.mark i { height: 2px; width: 100%; background: #e8f4eb; }
.mark i:nth-child(2) { width: 72%; }
.mark i:nth-child(3) { width: 48%; }
nav { display: flex; gap: clamp(12px, 3vw, 36px); font-size: .88rem; color: var(--muted); }
nav a, .header-action { display: inline-flex; align-items: center; min-height: 44px; }
nav a:hover, .header-action:hover { color: var(--green); text-decoration: underline; }
.header-action { font-size: .88rem; font-weight: 680; color: var(--green); }
.hero { background: #e8efe7; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); align-items: start; gap: 20px clamp(28px, 5vw, 76px); padding-block: clamp(35px, 5vw, 72px); }
h1 { font-size: clamp(2.35rem, 4.5vw, 4.1rem); line-height: 1.02; letter-spacing: -.06em; font-weight: 720; text-wrap: balance; }
.intro > p { max-width: 46ch; margin-top: 16px; color: var(--muted); font-size: 1.04rem; }
.workspace { background: var(--panel); border: 1px solid #c0cec3; padding: clamp(18px, 2.7vw, 32px); border-radius: 8px; min-width: 0; align-self: center; grid-column: 2; grid-row: 1 / span 2; }
.sample-report { margin: 0; background: var(--panel); border: 1px solid #c0cec3; border-radius: 6px; overflow: hidden; }
.sample-report figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; align-items: center; padding: 11px 14px; font-size: .87rem; }
.sample-report figcaption span { font-size: .75rem; color: var(--muted); }
.sample-totals { display: grid; grid-template-columns: repeat(3, 1fr); background: #f4f7f3; border-block: 1px solid var(--line); }
.sample-totals div { padding: 9px 14px; }
.sample-totals div + div { border-left: 1px solid var(--line); }
.sample-totals dt { color: var(--muted); font-size: .73rem; }
.sample-totals dd { font-weight: 720; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.sample-report th:first-child { width: 42%; }
.sample-report th, .sample-report td { padding: 6px 12px; font-size: .78rem; }
.sample-report tr:last-child td { border-bottom: 0; }
.sample-report code { font-size: .82em; }
.profile-hero { align-items: center; }
.profile-hero .sample-report { margin-block: 0; }
.profile-details { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }

h2 { font-size: clamp(1.6rem, 2.7vw, 2.35rem); line-height: 1.15; letter-spacing: -.05em; }
.workspace h2 { font-size: 1.8rem; }
.workspace > p, .dialog-header p { color: var(--muted); margin-top: 5px; font-size: .9rem; }
.controls, .filters { display: grid; gap: 12px; }
.controls { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block: 20px 14px; }
.controls:has(label[hidden]) { grid-template-columns: 1fr; }
label { display: grid; gap: 5px; color: var(--muted); font-weight: 650; font-size: .79rem; }
select, input[type="search"] { width: 100%; min-width: 0; height: 44px; border: 1px solid #c8d2c8; border-radius: 4px; color: var(--ink); padding: 0 9px; background: white; }
.dropzone { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 25px 12px; border: 1px dashed #91a896; background: #f4f8f2; border-radius: 5px; }
.dropzone.dragging { background: #e0edc5; outline: 2px solid #68936d; }
.drop-action { font-size: .88rem; font-weight: 650; }
.file-help { color: var(--muted); font-size: .74rem; }
.primary, .secondary, .link-button { border-radius: 4px; min-height: 44px; border: 1px solid transparent; padding: 9px 14px; font-weight: 650; font-size: .83rem; }
.primary { background: var(--green); color: #fff; }
.primary:hover:not(:disabled) { background: #173c2c; }
.secondary { background: var(--panel); border-color: #bccbc1; color: var(--ink); }
.secondary:hover:not(:disabled) { background: #eaf0e6; }
.link-button { background: transparent; padding: 7px 0; color: var(--green); }
.link-button:hover { text-decoration: underline; }
.demo-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0 12px; margin-top: 11px; }
.file-status { overflow-wrap: anywhere; }
.file-status.failure { color: #963626; }
.coverage, .results { padding-block: 47px; }
.results + .coverage { border-top: 1px solid var(--line); }
.coverage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 21px; }
.coverage article { border-top: 2px solid #aebfb0; padding: 12px 0 0; }
.coverage > h2 + p, .profile-details h2 + p { margin-top: 9px; max-width: 65ch; }
.coverage h3 { margin: 10px 0 3px; letter-spacing: -.025em; font-size: 1.08rem; }
.coverage p, .scope, footer, #result-meta { color: var(--muted); font-size: .87rem; }
.scope { margin-top: 18px; }
footer { border-top: 1px solid var(--line); }
.result-header { display: flex; justify-content: space-between; align-items: end; gap: 15px; }
.result-header > div { min-width: 0; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.source-name { color: var(--green); font-size: .81rem; font-weight: 660; overflow-wrap: anywhere; }
#result-meta { margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block: 20px; border: 1px solid var(--line); background: var(--panel); }
.stats > div { padding: 12px 14px; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats dt { font-size: .84rem; color: var(--muted); }
.stats dd { font-size: 1.9rem; line-height: 1.12; font-weight: 700; font-variant-numeric: tabular-nums; }
.error-text { color: #963626; }
.notice { padding: 12px; margin-bottom: 12px; background: #f5ead1; border-radius: 8px; font-size: .9rem; }
.findings { border: 1px solid var(--line); border-radius: 5px; background: var(--panel); overflow: hidden; }
.filters { grid-template-columns: 2fr 1fr 1fr; padding: 15px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { padding: 9px 12px; border-block: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; white-space: pre-wrap; }
th { background: #edf1e8; font-size: .8rem; }
td { font-size: .86rem; }
.findings th:nth-child(1) { width: 17%; }
.findings th:nth-child(2) { width: 15%; }
.findings th:nth-child(3) { width: 20%; }
.detail { color: var(--muted); display: block; }
.chip { display: inline-block; font-size: .74rem; font-weight: 680; padding: 2px 6px; border-radius: 6px; color: #745515; background: #fff1ca; }
.chip.error { color: #8c2824; background: #fce1d8; }
.pagination, .dialog-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 15px; color: var(--muted); font-size: .8rem; }
.pagination > div { display: flex; gap: 6px; }
.empty { padding: 15px; font-size: .9rem; }
dialog { width: min(780px, calc(100% - 22px)); max-height: 90svh; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 7px; padding: 0; }
dialog::backdrop { background: #12241bb0; }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 18px 15px 10px; }
.icon-button { padding: 3px 11px; font-size: 1.3rem; }
.select-page { display: flex; align-items: center; padding: 0 15px 12px; }
dialog .table-wrap { max-height: 48svh; }
dialog th:first-child { width: 66px; }
.dialog-footer { border-top: 1px solid var(--line); }
@media (max-width: 870px) {
  .hero-grid { gap: 25px; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 32px); }
  .hero-grid { grid-template-columns: 1fr; padding-block: 34px; }
  .topbar { min-height: 58px; flex-wrap: wrap; column-gap: 12px; row-gap: 0; }
  .topbar nav { order: 2; width: 100%; border-top: 1px solid var(--line); }
  .workspace { grid-column: 1; grid-row: 2; }
  .audit-grid, .profile-details { grid-template-columns: 1fr; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats > div:nth-child(odd) { border-left: 0; }
  .coverage-grid { grid-template-columns: 1fr; }
  .result-header { flex-direction: column; align-items: start; }
  .result-actions { justify-content: start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters label:first-child { grid-column: span 2; }
  .findings th:nth-child(1) { width: 20%; }
  .findings th:nth-child(2) { width: 19%; }
  .findings th:nth-child(3) { width: 19%; }
  .findings th, .findings td { padding-inline: 5px; font-size: .75rem; }
  .findings .chip { font-size: .65rem; padding-inline: 3px; }
  .footer-inner { flex-wrap: wrap; padding-block: 10px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.csv-options { margin-top: 12px; color: var(--muted); font-size: .85rem; }
.csv-options summary { cursor: pointer; }
.csv-options .controls { margin-top: 10px; }
.audit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-block: 20px; }
.audit-grid article { padding: 13px 15px 15px; background: var(--panel); }
#audit .price, .profile-details .price { color: var(--green); font-size: 1.9rem; font-weight: 720; margin-block: 4px; }
.price small { font-size: .82rem; font-weight: 600; }
#audit > p + p { margin-top: 8px; }
.cta { display: inline-flex; align-items: center; margin-top: 12px; text-decoration: none; }
.footer-inner nav { flex-wrap: wrap; gap: 12px; }
.content-page { max-width: 760px; padding-block: 54px; }
.content-page h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); margin-bottom: 20px; }
.content-page h2 { margin-top: 28px; }
.content-page p { margin-block: 10px; }
@media (max-width: 420px) {
  .audit-grid { grid-template-columns: 1fr; }
  .findings table { min-width: 348px; }
  dialog table { min-width: 440px; }
  .topbar nav { gap: 12px; }
}
.footer-inner nav { color: var(--green); }
.footer-inner nav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 360px) {
  .topbar { flex-wrap: wrap; column-gap: 12px; row-gap: 4px; padding-block: 8px; }
  .result-actions button, .demo-actions button { min-height: 44px; }
}

.coverage.profile-details > article { padding: 18px; border: 1px solid var(--line); background: var(--panel); }

.scroll-hint { display: none; padding: 5px 15px 9px; color: var(--muted); font-size: .75rem; }
@media (max-width: 460px) {
  dialog .scroll-hint { display: block; }
}
@media (max-width: 383px) {
  .findings-hint { display: block; }
}
