:root {
  color-scheme: light;
  --app-bg: #f5f3ed;
  --app-paper: #fffefa;
  --app-ink: #1d3129;
  --app-muted: #647166;
  --app-line: #dce0d6;
  --app-accent: #bb7941;
  --app-green: #315343;
  --app-soft: #e9eee5;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--app-bg);
  color: var(--app-ink);
  font: 16px/1.6 "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea { font: inherit; }

a { color: inherit; }

.demo-shell {
  width: min(100% - 40px, 920px);
  margin: 0 auto;
  padding: 28px 0 56px;
}

.demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 48px;
}

.demo-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--app-ink);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.07em;
  text-decoration: none;
}

.demo-brand img {
  display: block;
  width: 42px;
  height: 42px;
}

.demo-brand-period {
  color: #d2964a;
}

.back-link {
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.demo-kicker {
  margin: 0 0 10px;
  color: #837b65;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.demo-header {
  max-width: 680px;
  margin-bottom: 30px;
}

.demo-header h1 {
  margin: 0;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: clamp(36px, 7vw, 62px);
  letter-spacing: -0.07em;
  line-height: 1.05;
}

.demo-header > p:last-child {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--app-muted);
}

.demo-banner {
  margin: 0 0 22px;
  padding: 12px 15px;
  border: 1px solid #e6d5bd;
  border-radius: 9px;
  background: #f5eadb;
  color: #654b34;
  font-size: 13px;
}

.demo-panel {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--app-line);
  border-radius: 16px;
  background: var(--app-paper);
  box-shadow: 0 16px 38px rgb(29 49 41 / 5%);
}

.demo-panel h2 {
  margin: 0 0 8px;
  font-family: Manrope, sans-serif;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.demo-panel-intro {
  margin: 0 0 24px;
  color: var(--app-muted);
  font-size: 14px;
}

.demo-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field { display: grid; gap: 7px; }
.field-wide { grid-column: 1 / -1; }

.field label,
.field-label {
  color: #394b3f;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 47px;
  padding: 11px 13px;
  border: 1px solid #cbd2c8;
  border-radius: 7px;
  background: #fff;
  color: var(--app-ink);
}

.field textarea { min-height: 110px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus,
.demo-button:focus-visible,
.check-row input:focus-visible,
.back-link:focus-visible {
  outline: 3px solid rgb(187 121 65 / 38%);
  outline-offset: 2px;
}

.field-hint {
  color: var(--app-muted);
  font-size: 12px;
}

.demo-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid var(--app-green);
  border-radius: 6px;
  background: var(--app-green);
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.demo-button:hover { background: #263f32; }
.demo-button-secondary { background: transparent; color: var(--app-green); }
.demo-button-secondary:hover { background: var(--app-soft); }
.demo-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.result-panel {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid #cbd9c9;
  border-radius: 12px;
  background: #f0f5ed;
}

.result-panel h2 { margin: 0 0 8px; font-size: 19px; }
.result-panel p { margin: 0; color: #435448; font-size: 14px; }
.result-panel[hidden] { display: none; }

.demo-footnote {
  margin: 18px 0 0;
  color: var(--app-muted);
  font-size: 12px;
}

.demo-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--app-line);
  color: var(--app-muted);
  font-size: 12px;
}

.zip-result[data-state="outside"] { border-color: #e6d5bd; background: #f5eadb; }
.zip-result[data-state="invalid"] { border-color: #e8c1bc; background: #fbefed; }

.coverage-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.coverage-examples li {
  padding: 5px 9px;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  background: var(--app-bg);
  color: #536153;
  font-size: 12px;
}

.checklist-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.checklist-toolbar .field { width: min(100%, 300px); }
.checklist-intro { margin: 6px 0 0; }
.selected-season { font-weight: 700; }
.checklist-actions { margin-top: 24px; }
.demo-result-actions { margin-top: 16px; }
.sample-heading { margin: 26px 0 0; font-size: 14px; }
.checklist-group + .checklist-group { margin-top: 24px; }
.checklist-group h3 { margin: 0 0 10px; font-size: 15px; }
.checklist { display: grid; gap: 9px; }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: #fff;
  color: #384b3e;
  font-size: 14px;
}

.check-row input { width: 18px; height: 18px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--app-green); }
.check-row small { display: block; margin-top: 2px; color: var(--app-muted); font-size: 12px; }
.progress-track { height: 9px; overflow: hidden; border-radius: 99px; background: #e5e9e1; }
.progress-value { width: 0; height: 100%; border-radius: inherit; background: #6a8b68; transition: width 180ms ease; }
.progress-copy { margin: 8px 0 0; color: var(--app-muted); font-size: 12px; }

.calculator-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.calculator-result { position: sticky; top: 20px; }
.calculator-result output { display: block; margin: 8px 0; color: var(--app-green); font-family: Manrope, sans-serif; font-size: 46px; font-weight: 800; letter-spacing: -0.06em; line-height: 1.1; }
.calculator-result p + p { margin-top: 12px; }
.calculator-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.calculator-step { padding: 12px; border: 1px solid var(--app-line); border-radius: 8px; background: #fff; }
.calculator-step strong { display: block; font-size: 13px; }
.calculator-step span { color: var(--app-muted); font-size: 12px; }

@media (max-width: 680px) {
  .demo-shell { width: min(100% - 28px, 920px); padding-top: 18px; }
  .demo-topbar { margin-bottom: 36px; }
  .demo-brand { gap: 9px; font-size: 17px; }
  .demo-brand img { width: 36px; height: 36px; }
  .demo-form,
  .calculator-grid { grid-template-columns: 1fr; }
  .calculator-result { position: static; }
  .calculator-steps { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; }
  .demo-topbar,
  .demo-header,
  .demo-banner,
  .demo-footer,
  .demo-footnote { display: none !important; }
  .checklist-toolbar .field { display: none; }
  .demo-shell { width: 100%; padding: 0; }
  .demo-panel { border: 0; box-shadow: none; }
}
