:root {
  color-scheme: light;
  --ink: #142018;
  --muted: #526158;
  --paper: #f7f4ec;
  --panel: #fffdf8;
  --line: #c9cec8;
  --green: #145c3b;
  --green-dark: #0a3b25;
  --red: #a1261d;
  --amber: #8a5100;
  --blue: #17557b;
  --focus: #8b35d1;
  --shadow: 0 12px 34px rgba(20, 32, 24, 0.09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 88% 0%, #d9eadf 0, transparent 28rem), var(--paper);
  color: var(--ink);
  line-height: 1.55;
}
button, input, textarea { font: inherit; }
button, input, textarea, a { touch-action: manipulation; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
a { color: var(--green-dark); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; top: 0.75rem; left: 0.75rem; z-index: 10; padding: 0.65rem 0.9rem; background: var(--ink); color: #fff; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.site-header, main, footer { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { display: flex; justify-content: space-between; gap: 2rem; align-items: flex-end; padding: 3.5rem 0 2rem; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0.5rem; font-family: Georgia, serif; font-size: clamp(2.5rem, 7vw, 5.3rem); line-height: 0.95; letter-spacing: -0.045em; }
h2 { margin-bottom: 0.65rem; font-family: Georgia, serif; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.1; }
.eyebrow, .step { margin-bottom: 0.45rem; color: var(--green); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.lede { max-width: 720px; margin-bottom: 0; color: var(--muted); font-size: 1.08rem; }
.privacy-badge { flex: none; padding: 0.55rem 0.8rem; border: 1px solid var(--green); border-radius: 999px; color: var(--green-dark); font-weight: 750; }
main { display: grid; gap: 1.1rem; padding-bottom: 2rem; }
.panel, .offer { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.panel { padding: clamp(1.1rem, 3vw, 2rem); }
.section-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 1.3rem; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.limit { max-width: 420px; color: var(--muted); font-size: 0.9rem; text-align: right; }
.input-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.35fr); gap: 1rem; align-items: center; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 0.45rem; font-weight: 800; }
input[type="file"], textarea { width: 100%; border: 2px solid #8c978f; border-radius: 10px; background: #fff; color: var(--ink); }
input[type="file"] { min-height: 3.2rem; padding: 0.6rem; }
textarea { min-height: 13rem; resize: vertical; padding: 0.8rem; font: 0.86rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.hint, .offer-action p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.88rem; }
.or { color: var(--muted); font-weight: 800; text-transform: uppercase; }
.actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.1rem; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0.65rem 1rem; border: 2px solid var(--green-dark); border-radius: 9px; background: #fff; color: var(--green-dark); font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover:not(:disabled) { background: #e5eee8; }
.button-primary { background: var(--green-dark); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--green); }
.button-quiet { border-color: #747d77; color: var(--ink); }
.button:disabled { opacity: 0.48; cursor: not-allowed; }
.status { min-height: 1.5em; margin: 0.85rem 0 0; color: var(--green-dark); font-weight: 700; }
.status-error { color: var(--red); }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.summary > div { display: flex; min-height: 92px; flex-direction: column; justify-content: center; padding: 0.85rem; border: 1px solid var(--line); border-radius: 12px; background: #f8faf7; }
.summary-number { font-family: Georgia, serif; font-size: 2rem; font-weight: 800; line-height: 1; }
.error-text { color: var(--red); }
.warning-text { color: var(--amber); }
.info-text { color: var(--blue); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: #e7eee9; }
tbody tr:last-child > * { border-bottom: 0; }
.severity { font-size: 0.75rem; letter-spacing: 0.06em; }
.severity-error { color: var(--red); }
.severity-warning { color: var(--amber); }
.severity-info { color: var(--blue); }
.empty { padding: 1rem; border-left: 5px solid var(--green); background: #eaf3ed; font-weight: 700; }
.scope-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.compact-panel p { margin-bottom: 0; color: var(--muted); }
.offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr); gap: 2rem; align-items: center; padding: clamp(1.2rem, 4vw, 2.5rem); background: var(--ink); color: #fff; }
.offer .eyebrow { color: #a9e1bd; }
.offer h2 { margin-bottom: 0.5rem; }
.offer p { margin-bottom: 0; }
.offer .button-primary { border-color: #fff; background: #fff; color: var(--green-dark); }
.offer-action p { color: #dce5df; }
footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0 3rem; color: var(--muted); font-size: 0.9rem; }
footer p { margin-bottom: 0; }
.test-page { max-width: 920px; margin: 0 auto; padding: 2rem 1rem; }
.test-summary { padding: 1rem; border-radius: 10px; font-weight: 800; }
.test-summary.pass { border-left: 6px solid var(--green); background: #e8f3ec; }
.test-summary.fail { border-left: 6px solid var(--red); background: #fae9e7; }
.test-results { padding-left: 1.5rem; }
.test-results li { margin-bottom: 0.55rem; padding: 0.55rem; }
.result-pass { color: var(--green-dark); }
.result-fail { color: var(--red); }
pre { overflow-wrap: anywhere; white-space: pre-wrap; }
[hidden] { display: none !important; }

@media (max-width: 800px) {
  .site-header, .section-heading, footer { align-items: flex-start; flex-direction: column; }
  .input-grid, .scope-grid, .offer { grid-template-columns: 1fr; }
  .or { text-align: center; }
  .limit { text-align: left; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .site-header { padding-top: 2rem; }
  .actions { flex-direction: column; }
  .actions .button { width: 100%; }
  .summary { grid-template-columns: 1fr; }
}
