:root {
  color-scheme: light;
  --ink: #213c38;
  --muted: #536a65;
  --line: #cbd7ce;
  --paper: #fbfaf5;
  --green: #215a48;
  --soft: #edf2e9;
  --orange: #945219;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--green);
}
header {
  border-bottom: 1px solid var(--line);
  padding: 18px max(20px, calc((100vw - 1200px) / 2));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: #fff;
}
header a {
  font-family: Georgia, serif;
  font-size: 24px;
  text-decoration: none;
}
header span,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 750;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 38px 20px 70px;
}
.intro {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 30px;
}
h1 {
  font-family: Georgia, serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.08;
  margin: 12px 0 16px;
  letter-spacing: -0.035em;
}
h2 {
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 500;
  margin: 0 0 12px;
}
h3 {
  font-size: 16px;
  margin: 0 0 14px;
}
p {
  line-height: 1.6;
  margin: 8px 0 16px;
}
.note {
  background: var(--soft);
  padding: 18px 20px;
  border-left: 3px solid var(--green);
  font-size: 14px;
}
.small {
  font-size: 13px;
  color: var(--muted);
}
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
  margin: 22px 0;
}
.toolbar label {
  min-width: 130px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  min-width: 0;
}
.step {
  font-size: 12px;
  font-weight: 750;
  color: var(--green);
  display: block;
  margin-bottom: 8px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}
select,
input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  margin: 5px 0 12px;
  background: #fff;
  color: var(--ink);
  border: 1px solid #8da69a;
  border-radius: 4px;
  padding: 8px;
  font: inherit;
}
input[type="checkbox"] {
  display: inline;
  width: 18px;
  min-height: 18px;
  vertical-align: middle;
  margin-right: 8px;
}
input[type="file"] {
  font-size: 12px;
}
.mapping {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.file-info {
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
button,
.button {
  border: 1px solid var(--green);
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  padding: 11px 18px;
  font:
    650 14px ui-sans-serif,
    system-ui;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.secondary,
.button.secondary {
  background: #fff;
  color: var(--green);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #e1a44a;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
#message {
  padding: 14px 18px;
  border: 1px solid var(--orange);
  background: #fff2df;
  overflow-wrap: anywhere;
}
#results {
  margin-top: 32px;
  border-top: 2px solid var(--green);
  padding-top: 25px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.stat {
  background: var(--soft);
  padding: 16px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
.stat strong {
  display: block;
  font-size: 23px;
  margin: 5px 0;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin: 15px 0;
  max-height: 550px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  padding: 11px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
  max-width: 280px;
}
th {
  background: var(--soft);
  position: sticky;
  top: 0;
}
td.numeric {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.review {
  color: #824217;
  font-weight: 650;
}
.badge {
  display: inline-block;
  background: #edf2e9;
  border: 1px solid #ccd9c8;
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
}
.empty {
  border: 1px dashed #94a89e;
  padding: 25px;
  margin-top: 25px;
  color: var(--muted);
}
footer {
  border-top: 1px solid var(--line);
  padding: 24px 20px;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
}
details {
  margin: 18px 0;
}
summary {
  cursor: pointer;
  font-weight: 650;
}
#manual-form {
  max-width: 700px;
}
.print-only {
  display: none;
}
@media (max-width: 700px) {
  .intro,
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  main {
    padding-top: 25px;
  }
  .panel {
    padding: 18px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .mapping {
    grid-template-columns: 1fr;
  }
  header span {
    font-size: 9px;
  }
  h1 {
    font-size: 36px;
  }
  .toolbar label {
    width: 100%;
  }
}
@media print {
  header,
  .intro,
  .toolbar,
  .grid,
  .actions,
  .empty,
  #manual-form,
  #message,
  footer,
  .no-print {
    display: none !important;
  }
  main {
    padding: 0;
    max-width: none;
  }
  #results {
    border: 0;
    margin: 0;
    padding: 0;
  }
  .print-only {
    display: block;
  }
  h1 {
    font-size: 26px;
  }
  .table-wrap {
    overflow: visible;
    max-height: none;
    border: 0;
  }
  table {
    font-size: 9px;
  }
  th {
    position: static;
  }
  td,
  th {
    padding: 5px;
    max-width: none;
  }
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .stat strong {
    font-size: 16px;
  }
  tr {
    break-inside: avoid;
  }
}
#report-meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* Preserve readable columns on phones; scroll the report, not the page. */
table {
  min-width: 900px;
}
th,
td {
  min-width: 90px;
}
@media print {
  table {
    min-width: 0;
  }
  th,
  td {
    min-width: 0;
  }
}
