@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --ink: #242a27;
  --muted: #59635d;
  --green: #206352;
  --green-dark: #164d3f;
  --green-soft: #edf4ef;
  --lime: #96c93c;
  --paper: #fff;
  --canvas: #f6f7f3;
  --line: #d7dfd6;
  --line-dark: #78867b;
  --radius: 10px;
  --shell: 1120px;
  --gutter: clamp(16px, 4.5vw, 64px);
  --shadow: 0 2px 8px rgb(24 54 35 / 4%);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--green); text-underline-offset: .18em; }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid #1267a0; outline-offset: 3px; }
.shell { width: min(calc(100% - 2 * var(--gutter)), var(--shell)); margin-inline: auto; }
header, .site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
header > .shell, .site-header > .shell { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.toolbar, nav, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
nav a { display: inline-flex; align-items: center; min-height: 42px; font-weight: 500; text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .3em; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; font-weight: 600; text-decoration: none; }
.brand img, header > a > img { display: block; width: 112px; height: 56px; object-fit: contain; }
main { display: block; padding-block: clamp(24px, 4.5vw, 56px); }
main:not(.shell) { width: min(calc(100% - 2 * var(--gutter)), var(--shell)); margin-inline: auto; }
footer { margin-top: 24px; padding: 22px var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer .shell { width: min(100%, var(--shell)); }
h1, h2, h3, h4, p, dl { margin-block: 0 .65em; }
h1, h2, h3, h4 { line-height: 1.24; text-wrap: balance; }
h1 { font-size: clamp(24px, 2.75vw, 28px); font-weight: 650; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }
h4 { font-size: 15px; }
p:last-child, h1:last-child, h2:last-child, h3:last-child, dl:last-child { margin-bottom: 0; }
ul, ol { padding-inline-start: 1.35em; }
hr { border: 0; border-top: 1px solid var(--line); margin-block: 20px; }
small, .muted, .hint, .help { color: var(--muted); }
small, .hint, .help { font-size: 13px; }
.eyebrow { color: var(--green); font-size: 13px; font-weight: 600; }
.hero { padding-block: 0 22px; }
.hero p { max-width: 65ch; color: var(--muted); }
.card, fieldset { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.card { padding: clamp(18px, 2.6vw, 30px); box-shadow: var(--shadow); }
.card + .card, .notice + .card, .toolbar + .card { margin-block-start: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.grid > *, .stack > * { min-width: 0; }
.grid > .card, .stack > .card { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > :is(h1, h2, h3, p) { margin: 0; }
.login { width: min(100%, 480px); margin: clamp(20px, 7vh, 88px) auto; }
.login.card { padding: clamp(24px, 4vw, 42px); border-top: 4px solid var(--green); }
.login > p { color: var(--muted); }
.login form { margin-top: 24px; }
.login form :is(button, .button) { width: 100%; margin-top: 8px; }
.summary, .metric { padding: 16px 18px; background: var(--green-soft); border-radius: var(--radius); }
.metric { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.metric strong, .metric b { font-size: 26px; color: var(--green-dark); line-height: 1.25; }
.badge { display: inline-flex; align-items: center; width: fit-content; border: 1px solid #bfd5c8; border-radius: 20px; padding: 3px 10px; background: var(--green-soft); color: var(--green-dark); font-size: 13px; font-weight: 600; }
.notice, .error, [role="alert"] { padding: 12px 16px; border: 1px solid #bdd3c3; border-left: 3px solid var(--green); border-radius: 5px; background: #f1f7f2; color: var(--green-dark); }
.error, [role="alert"].error { border-color: #e4c5bc; border-left-color: #a33a23; color: #752819; background: #fff5f1; }
.notice:empty, .error:empty, [role="alert"]:empty { display: none; }
.notice + form, .error + form { margin-top: 16px; }
form, .field { min-width: 0; }
label { display: block; max-width: 100%; font-size: 14px; font-weight: 600; }
.field { display: grid; gap: 6px; }
label :is(input, select, textarea), label + :is(input, select, textarea) { margin-top: 6px; }
label:has(input:is([type="checkbox"], [type="radio"])) { display: flex; align-items: baseline; gap: 10px; font-weight: 500; }
form > label + label, form > .field + .field { margin-top: 14px; }
input, select, textarea, button { font: inherit; }
input:not([type="checkbox"],[type="radio"],[type="hidden"]), select, textarea {
  width: 100%; min-height: 42px; border: 1px solid var(--line-dark); border-radius: 5px;
  padding: 9px 11px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 400;
}
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--green); vertical-align: middle; }
input[type="file"] { padding: 6px; overflow: hidden; }
input::file-selector-button { cursor: pointer; margin-right: 8px; border: 0; padding: 5px 8px; border-radius: 3px; color: var(--green-dark); background: var(--green-soft); font: inherit; font-weight: 500; }
input[readonly], textarea[readonly], select:disabled, input:disabled { background: var(--canvas); color: var(--muted); }
textarea { min-height: 90px; resize: vertical; }
[aria-invalid="true"] { border-color: #a33a23 !important; }
fieldset { padding: 14px 16px 18px; margin: 16px 0; }
legend { padding-inline: 6px; color: var(--green-dark); font-weight: 600; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: fit-content;
  min-height: 42px; padding: 9px 16px; border: 1px solid var(--green); border-radius: 5px;
  background: var(--green); color: #fff; cursor: pointer; font-size: 14px; line-height: 1.3;
  font-weight: 600; text-align: center; text-decoration: none;
}
button:hover, .button:hover { color: #fff; background: var(--green-dark); border-color: var(--green-dark); }
button.secondary, .button.secondary { color: var(--green-dark); background: #fff; border-color: #b8c7bb; }
button.secondary:hover, .button.secondary:hover { background: var(--green-soft); border-color: var(--green); }
button:disabled, .button[aria-disabled="true"] { background: #e3e8e3; border-color: #d0d7d1; color: #59635d; cursor: default; }
.actions { align-items: end; margin-top: 16px; }
.actions form, nav form, .toolbar form { margin: 0; }
.table-wrap, .table-scroll { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--paper); text-align: left; font-size: 14px; }
caption { color: var(--muted); padding: 0 0 10px; text-align: left; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--green-dark); background: #eff3ed; font-size: 13px; font-weight: 600; }
td :is(button, .button) { min-height: 36px; }
details { margin-block: 14px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
summary { cursor: pointer; color: var(--green-dark); font-weight: 600; }
details[open] > summary { margin-bottom: 14px; }
dt { color: var(--muted); font-size: 13px; font-weight: 500; }
dd { margin: 2px 0 10px; overflow-wrap: anywhere; }
.skip-link { position: absolute; top: 0; left: 12px; z-index: 2; transform: translateY(-140%); background: var(--paper); padding: 10px; }
.skip-link:focus { transform: translateY(0); }
.brand span { padding-left: 14px; border-left: 1px solid var(--line); color: var(--ink); }
.back-link { display: inline-block; margin-bottom: 16px; font-size: 14px; }
.card-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.card-heading h2 { margin: 0; }
.report-column { max-width: 820px; }
.report-meta { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.report-meta dd { margin-bottom: 0; }
.report-date { padding-left: 8px; font-size: 14px; }
.correction-note { max-width: 820px; margin-bottom: 16px; }
.form-bottom { border-top: 1px solid var(--line); padding-block: 18px 10px; }
.form-bottom .actions { margin-top: 10px; }
.form-feedback a { display: inline-flex; min-height: 36px; align-items: center; }
.field-entry { margin-top: 20px; background: #fbfcfa; }
.result-select { max-width: 320px; }
.field-note { margin-top: 14px; }
.field-note textarea { min-height: 64px; }
.crop-row { display: grid; align-items: end; grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); gap: 12px; padding-top: 12px; }
.add-crop, .upload-label { margin-top: 12px; }
.document-list, .crop-summary { margin: 10px 0 14px; padding: 0; list-style: none; }
.document-list li, .crop-summary li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding-block: 7px; }
.document-list li { border-bottom: 1px solid var(--line); }
.document-list a { overflow-wrap: anywhere; }
.summary-field { padding-top: 16px; border-top: 1px solid var(--line); margin-top: 16px; }
.summary-field h3 { margin-bottom: 4px; }
.crop-summary { max-width: 440px; }
.wording { margin: 12px 0 20px; border-left: 3px solid var(--line-dark); padding: 4px 0 4px 16px; }
.preserve-lines, .wording { white-space: pre-line; }
@media (max-width: 430px) {
  .brand span { padding-left: 8px; }
  .brand { gap: 6px; }
  nav { width: 100%; justify-content: space-between; }
  .crop-row { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  header > .shell, .site-header > .shell { flex-wrap: wrap; gap: 0 12px; padding-block: 6px; }
  nav, .actions, .toolbar { gap: 7px 10px; }
  nav a { min-height: 38px; }
  .hero { padding-bottom: 16px; }
  .brand img, header > a > img { width: 96px; height: 48px; }
  .login { margin-block: 8px 36px; }
  :is(input:not([type="checkbox"],[type="radio"]),select,textarea) { font-size: 16px; }
  .card:has(> table), section:has(> table) { overflow-x: auto; }
  th, td { padding: 8px; }
}

@media print {
  :root, body { background: #fff; color: #000; }
  nav, .actions, .skip-link, button { display: none; }
  .shell, main:not(.shell) { width: 100%; }
  .card { box-shadow: none; }
  .table-wrap, .table-scroll { overflow: visible; }
}
