:root {
  color-scheme: light;
  --ink: #18231f;
  --muted: #5f6f69;
  --paper: #f5f2e9;
  --panel: #fffdf7;
  --line: #d8d2c3;
  --accent: #0a6750;
  --accent-dark: #064737;
  --warn: #8a5410;
  --error: #a22f2f;
  --shadow: 0 12px 36px rgba(32, 48, 41, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 80px; }

.hero { padding: 44px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(135deg, #fffdf7 0%, #e8f0e8 100%); box-shadow: var(--shadow); }
.eyebrow, .step { margin: 0 0 8px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 900px; margin-bottom: 18px; font: 800 clamp(2.3rem, 6vw, 4.9rem)/.98 Georgia, serif; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font: 750 clamp(1.55rem, 3vw, 2.3rem)/1.1 Georgia, serif; }
h3 { margin-bottom: 12px; font-size: 1rem; }
.lede { max-width: 770px; color: #35443e; font-size: 1.14rem; }
.privacy, .boundary { padding: 16px 18px; border-left: 4px solid var(--accent); background: rgba(255,255,255,.64); }

section { margin-top: 54px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 18px; }
.section-heading > p { max-width: 490px; margin-bottom: 0; color: var(--muted); }
.input-grid, .summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.panel, .summary-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
label { display: block; margin-bottom: 8px; font-weight: 750; }
textarea, select, button { font: inherit; }
textarea, select { width: 100%; border: 1px solid #aaa79d; border-radius: 10px; background: white; color: var(--ink); }
textarea { min-height: 230px; padding: 14px; resize: vertical; font: .9rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
select { padding: 10px; }
textarea + label { margin-top: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
button { padding: 11px 16px; border: 1px solid #9c9b93; border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; font-weight: 750; }
button:hover { border-color: var(--accent); }
button:focus-visible, textarea:focus-visible, select:focus-visible, .table-wrap:focus-visible { outline: 3px solid rgba(10,103,80,.25); outline-offset: 2px; }
button.primary { border-color: var(--accent); background: var(--accent); color: white; }
button.primary:hover { background: var(--accent-dark); }
button:disabled { cursor: not-allowed; opacity: .48; }
.message { margin-top: 14px; padding: 12px 14px; border-radius: 10px; }
.message.success { background: #e3f3e9; color: #20563c; }
.message.warning { background: #fff0c7; color: #7b4c09; }
.message.error { background: #f9dfdf; color: var(--error); }

.summary-card dl { display: grid; gap: 7px; margin: 0; }
.summary-card dl div { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px dashed var(--line); }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; font-weight: 700; }
.warning-list { color: var(--warn); }
.ok { margin: 16px 0 0; color: var(--accent); }
.diff-panel { margin-top: 18px; }
.mapping-heading { margin-top: 42px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
table { width: 100%; min-width: 780px; border-collapse: collapse; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: #e7ece5; color: #31453c; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
td:first-child { min-width: 210px; }
td span { display: block; color: var(--muted); font-size: .82rem; }
.confirm { margin: 0; white-space: nowrap; }
.status { width: fit-content; margin-bottom: 4px; padding: 3px 8px; border-radius: 999px; background: #eee; color: var(--ink); font-weight: 750; }
.status.confirmed { background: #d9efe2; color: #195238; }
.status.review-required { background: #fff0c7; color: #7b4c09; }
.status.conflict { background: #f8d9d9; color: #8d2929; }
.export-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 16px; }
.export-row p { margin: 0; color: var(--muted); }
.boundary { margin-top: 22px; border-radius: 0 12px 12px 0; }
.boundary ul, .sources ul { margin-bottom: 0; }
.sources { padding-top: 8px; border-top: 1px solid var(--line); }
a { color: var(--accent-dark); text-underline-offset: 3px; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

@media (max-width: 760px) {
  main { width: min(100% - 20px, 1120px); padding-top: 10px; }
  .hero { padding: 26px 20px; border-radius: 18px; }
  .input-grid, .summary-grid { grid-template-columns: 1fr; }
  .section-heading, .export-row { align-items: stretch; flex-direction: column; }
  .section-heading { gap: 8px; }
  .export-row button { width: 100%; }
}

.measurement-consent{margin-top:32px}.measurement-consent .consent{font-weight:700}footer{margin-top:40px;color:var(--muted)}
