:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #65706b;
  --line: #dce4df;
  --soft: #f4f7f5;
  --paper: #fff;
  --accent: #116149;
  --accent-dark: #0b4937;
  --accent-soft: #e5f3ed;
  --error: #a44343;
  --error-soft: #f9eaea;
  --warning: #9a5d12;
  --warning-soft: #fbf0df;
  --shadow: 0 24px 70px rgba(31, 54, 45, .09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: radial-gradient(circle at 20% 0%, rgba(202, 233, 220, .48), transparent 30rem), linear-gradient(180deg, #fbfcfb 0%, #f4f7f5 100%);
}
button, select, input { font: inherit; }
button, select, .file-drop { transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease; }
button:focus-visible, select:focus-visible, .file-drop:focus-within, a:focus-visible { outline: 3px solid rgba(17, 97, 73, .23); outline-offset: 3px; }
a { color: inherit; }
.page-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; font-weight: 760; letter-spacing: -.01em; text-decoration: none; }
.brand-mark { display: flex; width: 34px; height: 34px; align-items: flex-end; justify-content: center; gap: 3px; padding: 8px; border-radius: 10px; background: var(--accent); }
.brand-mark i { display: block; width: 4px; border-radius: 3px; background: white; }
.brand-mark i:nth-child(1) { height: 7px; }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 11px; }
.privacy-badge { display: inline-flex; align-items: center; gap: 8px; color: #425049; font-size: 13px; font-weight: 650; }
.privacy-dot { width: 8px; height: 8px; border-radius: 50%; background: #28a778; box-shadow: 0 0 0 4px rgba(40, 167, 120, .12); }

.hero { max-width: 880px; padding: 72px 0 54px; }
.eyebrow, .step-label { margin: 0 0 9px; color: var(--accent); font-size: 12px; font-weight: 820; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { max-width: 850px; margin-bottom: 23px; font-size: clamp(46px, 7.5vw, 78px); letter-spacing: -.055em; line-height: .98; }
h2 { margin-bottom: 0; font-size: clamp(28px, 3.5vw, 40px); letter-spacing: -.03em; line-height: 1.06; }
h3 { margin: 0; font-size: 18px; letter-spacing: -.015em; }
.hero-copy { max-width: 720px; margin-bottom: 26px; color: #4e5a55; font-size: 18px; line-height: 1.65; }
.trust-list { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; color: #48564f; font-size: 13px; font-weight: 650; list-style: none; }
.trust-list li::before { margin-right: 7px; color: var(--accent); content: "✓"; }

.workspace-card, .results { border: 1px solid rgba(207, 218, 212, .95); border-radius: 24px; background: rgba(255,255,255,.95); box-shadow: var(--shadow); }
.workspace-card { padding: clamp(22px, 4vw, 42px); }
.section-heading, .results-heading, .options-heading, .report-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.small-actions { display: flex; align-items: center; gap: 14px; }
.text-button, .filter-button { border: 0; color: var(--accent); background: transparent; cursor: pointer; font-weight: 760; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-button.danger { color: var(--error); }
.text-button:disabled { color: #9ba39f; cursor: not-allowed; text-decoration: none; }

.file-drop { display: flex; min-height: 146px; align-items: center; gap: 18px; margin: 30px 0 20px; padding: 26px; border: 1.5px dashed #b7c7bf; border-radius: 18px; background: #fafcfb; cursor: pointer; }
.file-drop:hover, .file-drop.loaded { border-color: var(--accent); background: var(--accent-soft); }
.file-drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.file-icon { display: grid; flex: 0 0 auto; width: 50px; height: 50px; place-items: center; border-radius: 14px; color: white; background: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .04em; }
.file-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 6px; }
.file-copy strong { font-size: 16px; }
.file-copy span { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.file-action { padding: 9px 13px; border: 1px solid #bfd0c7; border-radius: 9px; color: var(--accent); background: white; font-size: 12px; font-weight: 760; }
.status-message { min-height: 46px; padding: 14px 16px; border-left: 4px solid var(--accent); border-radius: 10px; color: #47534d; background: var(--soft); font-size: 13px; line-height: 1.4; }
.status-message.success { border-color: var(--accent); background: var(--accent-soft); }
.status-message.warning { border-color: var(--warning); background: var(--warning-soft); }
.status-message.error { border-color: var(--error); background: var(--error-soft); }

.interpretation { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.options-heading > p, .report-heading > p { max-width: 430px; margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; }
.fact-grid > div { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfb; }
.fact-grid dt, .delimiter-fact > label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; }
.fact-grid dd { min-height: 38px; margin: 0; font-size: 15px; font-weight: 760; line-height: 1.3; }
.fact-grid dd[data-certainty="uncertain"] { color: var(--warning); }
.fact-grid small { display: block; margin-top: 8px; color: #7a8580; font-size: 10px; line-height: 1.4; }
.delimiter-fact select { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #bdcbc4; border-radius: 8px; color: var(--ink); background: white; font-size: 12px; }

.results { margin-top: 28px; overflow: hidden; }
.results-heading { align-items: flex-start; padding: clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.results-heading > div > p:last-child { max-width: 650px; margin: 12px 0 0; color: var(--muted); line-height: 1.55; }
.primary-button { flex: 0 0 auto; padding: 13px 17px; border: 0; border-radius: 10px; color: white; background: var(--accent); cursor: pointer; font-weight: 760; }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.primary-button:disabled { color: #84908a; background: #dbe2de; cursor: not-allowed; transform: none; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.summary-grid article { padding: 22px clamp(18px, 3vw, 30px); background: white; }
.summary-grid span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.summary-grid strong { font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 500; }
.summary-grid .error-card strong { color: var(--error); }
.summary-grid .warning-card strong { color: var(--warning); }

.report-section { padding: clamp(24px, 4vw, 40px); border-top: 1px solid var(--line); }
.table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 12px 15px; color: var(--muted); background: var(--soft); font-size: 10px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
td { padding: 14px 15px; border-top: 1px solid var(--line); vertical-align: top; }
td strong { display: block; }
td small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.4; }
.finding-meta { display: flex; justify-content: space-between; gap: 20px; margin-top: 20px; color: var(--muted); font-size: 11px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px; border-radius: 10px; background: var(--soft); }
.filter-button { padding: 8px 10px; border-radius: 7px; color: #5a6660; font-size: 11px; }
.filter-button.active { color: white; background: var(--accent); }
.severity { display: inline-block; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: capitalize; }
.severity.error { color: var(--error); background: var(--error-soft); }
.severity.warning { color: var(--warning); background: var(--warning-soft); }
.severity.information { color: var(--accent); background: var(--accent-soft); }
.issue-table th:nth-child(1) { width: 100px; }
.issue-table th:nth-child(4) { width: 70px; }

.next-tools { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; margin: 28px 0 0; padding: clamp(32px, 5vw, 54px); border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.75); }
.next-tools > div:first-child > p:last-child { margin: 18px 0 0; color: var(--muted); line-height: 1.6; }
.next-grid { display: grid; gap: 12px; }
.next-grid a { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 20px 52px 20px 20px; border: 1px solid var(--line); border-radius: 14px; background: white; text-decoration: none; }
.next-grid a:hover { border-color: var(--accent); box-shadow: 0 10px 28px rgba(31,54,45,.08); transform: translateY(-1px); }
.next-grid span { color: var(--muted); font-size: 11px; }
.next-grid strong { font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; }
.next-grid i { position: absolute; top: 50%; right: 20px; color: var(--accent); font-size: 18px; font-style: normal; transform: translateY(-50%); }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 38px 0 48px; color: var(--muted); font-size: 11px; }
footer p { margin: 0; }
footer a { color: var(--accent); font-weight: 720; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .next-tools { grid-template-columns: 1fr; gap: 28px; }
  .results-heading { align-items: stretch; flex-direction: column; }
  .primary-button { align-self: flex-start; }
}

@media (max-width: 620px) {
  .page-shell { width: min(100% - 24px, 1120px); }
  .privacy-badge { display: none; }
  .hero { padding: 52px 0 38px; }
  h1 { font-size: 48px; }
  .section-heading, .options-heading, .report-heading { align-items: flex-start; flex-direction: column; }
  .small-actions { width: 100%; justify-content: space-between; }
  .file-drop { min-height: 176px; align-items: flex-start; flex-wrap: wrap; }
  .file-copy { min-width: calc(100% - 70px); }
  .file-action { margin-left: 68px; }
  .fact-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .options-heading > p, .report-heading > p { text-align: left; }
  .findings-heading { gap: 16px; }
  .finding-meta { flex-direction: column; gap: 6px; }
  .table-wrap { margin-right: -10px; }
  table { min-width: 580px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
