:root {
  --deep: #15110f;
  --ink: #261d18;
  --ink-soft: #67594f;
  --orange: #f79300;
  --orange-dark: #9a4c00;
  --orange-soft: #fff0d8;
  --paper: #fffdf9;
  --line: #dfd1c0;
  --success: #21683d;
  --danger: #8a2d21;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #f3ede5;
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.checklist-site-header {
  min-height: 78px;
  padding: 10px clamp(18px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--deep);
  color: white;
}
.checklist-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
}
.checklist-brand img { width: 56px; height: 56px; object-fit: contain; }
.checklist-brand strong { display: block; font-family: "Newsreader", Georgia, serif; font-size: 25px; font-weight: 600; line-height: 1; }
.checklist-brand small { display: block; margin-top: 5px; color: #d8cbc0; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.header-contact {
  min-height: 44px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--orange);
  color: var(--deep);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.header-contact:hover, .header-contact:focus-visible { background: white; outline: 2px solid var(--orange); outline-offset: 2px; }

.checklist-page { padding: 34px 18px 70px; }
.checklist-shell { width: min(100%, 980px); margin: 0 auto; }
.back-link { display: inline-block; margin-bottom: 22px; color: var(--orange-dark); font-weight: 700; text-underline-offset: 3px; }
.checklist-intro {
  padding: clamp(24px, 5vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 300px);
  align-items: end;
  gap: 34px;
  background: var(--deep);
  color: white;
  border-top: 6px solid var(--orange);
}
.eyebrow { margin: 0 0 8px; color: var(--orange); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { font-family: "Newsreader", Georgia, serif; }
.checklist-intro h1 { margin: 0; font-size: clamp(39px, 6vw, 62px); font-weight: 500; line-height: .98; }
.checklist-intro-copy > p:last-child { max-width: 650px; margin: 18px 0 0; color: #dfd5cc; font-size: 17px; white-space: pre-line; }
.checklist-switcher label { display: block; margin-bottom: 7px; color: #dfd5cc; font-size: 13px; font-weight: 700; }
.checklist-switcher select {
  width: 100%;
  min-height: 48px;
  padding: 10px 38px 10px 13px;
  border: 2px solid var(--orange);
  border-radius: 6px;
  background: white;
  color: var(--deep);
  font-weight: 700;
}

.save-panel {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr minmax(160px, 250px);
  align-items: center;
  gap: 18px;
  border: 1px solid #d07a08;
  border-top: 0;
  background: #fff8ec;
  box-shadow: 0 9px 24px rgba(58, 37, 21, .12);
}
.save-panel strong, .save-panel span { display: block; }
.save-panel strong { font-size: 15px; }
.save-panel span { margin-top: 2px; color: var(--success); font-size: 13px; }
.save-panel span.save-error { color: var(--danger); }
.progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: #e4d8ca; }
.progress-track span { width: 0; height: 100%; margin: 0; display: block; border-radius: inherit; background: linear-gradient(90deg, #d87000, var(--orange)); transition: width .2s ease; }

#interactiveChecklist { margin-top: 18px; }
.matter-card, .checklist-section, .general-notes-card {
  margin-top: 14px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(55, 40, 26, .06);
}
.section-heading { margin-bottom: 20px; display: flex; align-items: flex-start; gap: 18px; }
.section-heading > span {
  min-width: 62px;
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}
.section-heading h2, .general-notes-card h2 { margin: 0; font-size: clamp(26px, 4vw, 34px); font-weight: 600; line-height: 1.05; }
.section-heading p, .general-notes-card > p { margin: 7px 0 0; color: var(--ink-soft); font-size: 14px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field-grid label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.field-grid input, textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #bdaa97;
  border-radius: 6px;
  background: white;
  color: var(--ink);
}
textarea { min-height: 105px; resize: vertical; line-height: 1.5; }
.field-grid input:focus, textarea:focus, select:focus { border-color: var(--orange-dark); outline: 3px solid rgba(247, 147, 0, .23); }

.checklist-items { display: grid; gap: 9px; }
.checklist-item {
  min-height: 54px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #e4d9cc;
  border-radius: 8px;
  background: white;
  cursor: pointer;
}
.checklist-item:hover { border-color: var(--orange); background: #fffaf2; }
.checklist-item:has(input:checked) { border-color: #91b29d; background: #f2faf4; }
.checklist-item input { width: 24px; height: 24px; margin: 1px 0 0; flex: none; accent-color: var(--success); }
.checklist-item span { font-size: 15px; line-height: 1.45; }
.section-notes { margin-top: 17px; }
.section-notes label { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.note-privacy-warning { margin: 0 0 8px !important; color: var(--danger) !important; font-size: 12px !important; font-weight: 700; line-height: 1.45; }
.general-notes-card textarea { margin-top: 14px; }

.device-notice, .checklist-disclaimer {
  margin-top: 18px;
  padding: 18px 20px;
  border-left: 5px solid var(--orange);
  background: #fff4df;
}
.device-notice strong, .checklist-disclaimer strong { font-family: "Newsreader", Georgia, serif; font-size: 22px; }
.device-notice p, .checklist-disclaimer p { margin: 7px 0 0; color: var(--ink-soft); font-size: 14px; }
.checklist-disclaimer { border-left-color: #5c4b40; background: #eee7df; }

.checklist-actions {
  margin-top: 18px;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  border: 1px solid var(--line);
  background: white;
  box-shadow: 0 9px 24px rgba(58, 37, 21, .1);
}
.checklist-actions button, .checklist-actions a {
  min-height: 46px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--deep);
  border-radius: 5px;
  background: white;
  color: var(--deep);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.checklist-actions button:hover, .checklist-actions button:focus-visible, .checklist-actions a:hover, .checklist-actions a:focus-visible { background: var(--deep); color: white; outline: 2px solid var(--orange); outline-offset: 2px; }
.checklist-actions .action-primary { border-color: #9a4c00; background: var(--orange); }
.checklist-actions .action-danger { margin-left: auto; border-color: #c9a49d; color: var(--danger); }
.action-note { margin: 8px 2px 0; color: var(--ink-soft); font-size: 13px; }

footer {
  padding: 25px clamp(18px, 5vw, 72px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 22px;
  background: var(--deep);
  color: #d8cbc0;
  font-size: 12px;
}
footer span:last-child { display: flex; gap: 18px; }
footer a { color: white; text-underline-offset: 3px; }

@media (max-width: 700px) {
  .checklist-site-header { min-height: 68px; padding: 7px 14px; }
  .checklist-brand { gap: 7px; }
  .checklist-brand img { width: 48px; height: 48px; }
  .checklist-brand strong { font-size: 16px; white-space: nowrap; }
  .checklist-brand small { display: none; }
  .header-contact { min-height: 40px; padding: 8px 10px; font-size: 12px; }
  .checklist-page { padding: 22px 12px 48px; }
  .back-link { margin-left: 4px; margin-bottom: 14px; }
  .checklist-intro { padding: 24px 19px; grid-template-columns: 1fr; gap: 22px; }
  .checklist-intro h1 { font-size: 40px; }
  .checklist-intro-copy > p:last-child { font-size: 15px; }
  .save-panel { grid-template-columns: 1fr; gap: 10px; }
  .matter-card, .checklist-section, .general-notes-card { padding: 19px 16px; }
  .section-heading { gap: 11px; }
  .section-heading > span { min-width: 52px; }
  .section-heading h2, .general-notes-card h2 { font-size: 27px; }
  .field-grid { grid-template-columns: 1fr; }
  .checklist-item { min-height: 60px; padding: 13px 12px; }
  .checklist-item span { font-size: 15px; }
  .checklist-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checklist-actions .action-danger { margin-left: 0; grid-column: 1 / -1; }
  footer { flex-direction: column; }
}

@media (max-width: 390px) {
  .checklist-brand strong { font-size: 15px; }
  .header-contact { padding-inline: 8px; }
  .checklist-actions { grid-template-columns: 1fr; }
  .checklist-actions .action-danger { grid-column: auto; }
}

@media print {
  body { background: white; font-size: 11pt; }
  .checklist-site-header, .back-link, .checklist-switcher, .save-panel, .device-notice, .checklist-actions, .action-note, footer { display: none !important; }
  .checklist-page { padding: 0; }
  .checklist-intro { padding: 18px 0; grid-template-columns: 1fr; border-top: 0; border-bottom: 3px solid var(--orange); background: white; color: black; }
  .checklist-intro .eyebrow { color: var(--orange-dark); }
  .checklist-intro h1 { color: black; font-size: 31pt; }
  .checklist-intro-copy > p:last-child { color: #333; }
  .matter-card, .checklist-section, .general-notes-card { margin-top: 12px; padding: 14px; break-inside: avoid; box-shadow: none; }
  .checklist-item { min-height: 0; padding: 7px 9px; }
  .section-notes textarea, .general-notes-card textarea { min-height: 70px; }
  .checklist-disclaimer { break-inside: avoid; }
}
