/* ============================================================
   Child Emergency Safety Plan — Form Flow
   ============================================================ */

:root {
  --paper: #F4F6FA;
  --paper-2: #E8EBF0;
  --ink: #0A1A35;
  --ink-soft: #2A3A55;
  --ink-mute: #6B7890;
  --rule: #C9D0DC;
  --rule-soft: #DDE2EB;
  --terracotta: #E91E7A;
  --terracotta-deep: #B8145E;
  --blue: #1E8CFF;
  --blue-deep: #0A1A35;
  --amber-bg: #FFF0E0;
  --amber-ink: #B8145E;
  --sage: #1E8CFF;
  --focus: #E91E7A;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
}

.serif {
  font-family: 'Lato', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ================= Shell ================= */
.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 32px 120px;
  min-height: 100vh;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 40px;
}


.logo {
  width:100px;
}

.step-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

.step-meter-track {
  width: 140px;
  height: 3px;
  background: var(--rule-soft);
  border-radius: 2px;
  overflow: hidden;
}

.step-meter-fill {
  height: 100%;
  background: var(--terracotta);
  border-radius: 2px;
  transition: width 450ms cubic-bezier(.2,.7,.2,1);
}

/* ================= Intro ================= */
/* .intro {
  padding-top: 40px;
} */

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 20px;
  font-weight: 500;
}

h1.display {
  font-family: 'Lato', Arial, sans-serif;
  font-weight: 900;
  font-size: 52px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: var(--ink);
}

h1.display em {
  font-style: italic;
  font-weight: 900;
  color: var(--terracotta-deep);
}

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 32px;
  max-width: 58ch;
}

.privacy-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 28px 32px;
  margin: 32px 0;
  position: relative;
}

.privacy-card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 3px;
  background: var(--terracotta);
  border-radius: 2px 0 0 2px;
}

.privacy-card h3 {
  margin: 0 0 14px;
  font-family: 'Lato', Arial, sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.005em;
}

.privacy-card p {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}

.privacy-card p:last-child { margin-bottom: 0; }

.privacy-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.privacy-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.privacy-list .tick {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 50%;
  border: 1.5px solid var(--sage);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sage);
  font-size: 10px;
}

.meta-note {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 28px;
  line-height: 1.6;
  max-width: 60ch;
}

/* ================= Buttons ================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  transition: all 180ms ease;
  font-feature-settings: 'ss01';
}

.btn-primary {
  background: var(--terracotta);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--terracotta-deep);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
}

.btn-ghost:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.btn-ghost:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn .arrow {
  font-family: Arial, sans-serif;
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}

.btn-primary:hover .arrow {
  transform: translateX(3px);
}

.btn-xl {
  padding: 18px 36px;
  font-size: 16px;
}

.intro-alt-print {
  margin: 14px 0 0;
  max-width: 58ch;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-mute);
}

.intro-alt-print a {
  color: var(--ink-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.intro-alt-print a:hover {
  color: var(--ink);
}

/* ================= Form Step ================= */
.step {
  animation: fade-in 400ms cubic-bezier(.2,.7,.2,1);
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-header {
  margin-bottom: 36px;
}

.step-num {
  display: inline-block;
  font-family: 'Lato', Arial, sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 10px;
}

.step-num .bar {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--terracotta);
  vertical-align: middle;
  margin-right: 10px;
}

.step-title {
  font-family: 'Lato', Arial, sans-serif;
  font-weight: 900;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.step-sub {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0;
}

/* ================= Fields ================= */
.fieldgroup {
  margin-bottom: 28px;
}

.fieldgroup-title {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-soft);
}

.field {
  margin-bottom: 18px;
}

.field.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.field.two-col > .field { margin-bottom: 0; }

label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: 0.005em;
}

.label-hint {
  font-weight: 400;
  color: var(--ink-mute);
  font-size: 12.5px;
  margin-left: 4px;
}

input[type="text"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: border-color 150ms ease, background 150ms ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--terracotta);
  background: #FFFBF2;
}

textarea {
  min-height: 70px;
  resize: vertical;
  line-height: 1.5;
}

/* Checkbox list */
.check-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  margin: 10px 0 0;
}

.check-list.one-col { grid-template-columns: 1fr; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.4;
  user-select: none;
}

.check input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  margin: 2px 0 0;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 120ms ease;
  position: relative;
}

.check input[type="checkbox"]:checked {
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--paper);
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}

.check:hover input[type="checkbox"] {
  border-color: var(--terracotta);
}

/* Important callout within step */
.callout {
  background: var(--amber-bg);
  border-left: 3px solid var(--amber-ink);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 2px 2px 0;
}

.callout-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-ink);
  font-weight: 600;
  margin-bottom: 4px;
}

.callout p {
  margin: 0;
  font-size: 14px;
  color: var(--amber-ink);
  line-height: 1.55;
}

/* Sub-section heading inside a step */
.sub-head {
  font-family: 'Lato', Arial, sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 32px 0 6px;
  color: var(--ink);
}

.sub-head:first-child { margin-top: 0; }

.sub-desc {
  font-size: 13.5px;
  color: var(--ink-mute);
  margin: 0 0 16px;
  line-height: 1.5;
}

/* ================= Nav ================= */
.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--rule-soft);
}

.step-nav-info {
  font-size: 12.5px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

.step-nav-info-mobile {
  display: none;
  font-size: 12.5px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

@media (max-width: 600px) {
  .step-nav {
    padding-bottom: 24px;
  }
  .step-nav-info {
    display: none;
  }
  .step-nav-info-mobile {
    display: flex;
    justify-content: center;
    text-align: center;
  }
}

/* ================= Preview Screen ================= */
.preview-wrap {
  max-width: 940px;
  margin: 0 auto;
}

.preview-top {
  margin-bottom: 32px;
}

.preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  margin-bottom: 32px;
  position: sticky;
  top: 20px;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.preview-banner-text h4 {
  margin: 0 0 2px;
  font-family: 'Lato', Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.preview-banner-text p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-mute);
}

.preview-banner .actions {
  display: flex;
  gap: 10px;
}

.preview-page-wrap {
  background: var(--paper-2);
  padding: 40px;
  border-radius: 4px;
  border: 1px solid var(--rule);
}

/* ================= Printable Document ================= */

.staroflife {
  width:100px;
}
.doc {
  background: white;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10.5pt;
  line-height: 1.42;
  width: 8.5in;
  min-height: 11in;
  margin: 0 auto;
  padding: 0.55in 0.6in;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
}

/* Document is always B&W for max printer compatibility */
.doc, .doc * {
  color: #000 !important;
  background-color: #ffffff !important;
  border-color: #000 !important;
}
.doc { background-color: #ffffff !important; }
.doc .doc-chip { background-color: transparent !important; border: 1px solid #000 !important; }
.doc .doc-chip.on { color: #000 !important; }
.doc .doc-chip.off { color: #777 !important; border-color: #999 !important; }
.doc .doc-alert { background-color: #fff !important; border: 2px solid #000 !important; }
.doc .doc-quote { background-color: #f2f2f2 !important; border: 1px solid #000 !important; border-left: 4px solid #000 !important; padding: 10px 14px !important; }
.doc .doc-row { border-bottom: 1px dotted #555 !important; }
.doc .doc-sig-block .line { border-bottom: 1px solid #000 !important; }
.doc .doc-section h2 { border-bottom: 1px solid #000 !important; }
.doc .doc-header { border-bottom: 2px solid #000 !important; }
.doc .doc-footer { border-top: 1px solid #555 !important; }

.doc h1 {
  font-family: 'Lato', Arial, sans-serif;
  font-size: 24pt;
  font-weight: 900;
  margin: 0 0 4px;
  letter-spacing: -0.015em;
  line-height: 1.08;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.doc-header-r {
  text-align: right;
  font-size: 8pt;
  color: #555;
  line-height: 1.4;
}

.doc-subtitle {
  font-size: 10.5pt;
  color: #555;
  margin-top: 2px;
  font-style: italic;
  font-family: Arial, sans-serif;
}

.doc-alert {
  background: #FFE8F2;
  border: 1px solid #E91E7A;
  border-left: 4px solid #E91E7A;
  padding: 10px 14px;
  margin: 0 0 16px;
  font-size: 10pt;
  line-height: 1.4;
}

.doc-alert strong { color: #B8145E; }

.doc-section {
  margin: 14px 0;
  page-break-inside: avoid;
  break-inside: avoid;
}

.doc-section h2 {
  font-family: 'Lato', Arial, sans-serif;
  font-size: 13pt;
  font-weight: 700;
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #1a1a1a;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.doc-section h2 .sec-num {
  font-size: 8.5pt;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #E91E7A;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.doc-section h3 {
  font-family: 'Lato', Arial, sans-serif;
  font-size: 9.5pt;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin: 10px 0 4px;
  color: #333;
}

.doc-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  padding: 3px 0;
  border-bottom: 1px dotted #d5d5d5;
  align-items: baseline;
}

.doc-row .key {
  font-weight: 500;
  color: #555;
  font-size: 9.5pt;
}

.doc-row .val {
  color: #111;
  font-size: 10.5pt;
  min-height: 14px;
}

.doc-row .val:empty::after,
.doc-row .val.empty::after {
  content: "—";
  color: #bbb;
}

.blank-form .doc-row .val:empty::after,
.blank-form .doc-row .val.empty::after {
  content: "";
}

.blank-form .doc-checks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.blank-check-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 8px;
  align-items: start;
  color: #111;
  font-size: 10pt;
  line-height: 1.35;
}

.blank-check-box {
  width: 12px;
  height: 12px;
  border: 1px solid #111;
  margin-top: 2px;
}

.doc-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.doc-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 4px 0;
}

.doc-chip {
  font-size: 9.5pt;
  padding: 2px 8px;
  background: #E8EBF0;
  border: 1px solid #C9D0DC;
  border-radius: 2px;
  color: #0A1A35;
}

.doc-chip.on { background: #0A1A35; color: white; border-color: #0A1A35; }
.doc-chip.off { color: #aaa; }

.doc-paragraph {
  font-size: 10pt;
  margin: 4px 0 6px;
  color: #222;
}

.doc-footer {
  border-top: 1px solid #999;
  margin-top: 24px;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 8.5pt;
  color: #666;
}

.doc-signature {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
}

.doc-sig-block .line {
  border-bottom: 1px solid #1a1a1a;
  height: 24px;
  margin-bottom: 4px;
}

.doc-sig-block .line-text {
  padding: 0 4px 2px;
  font-size: 11pt;
  line-height: 1.4;
}

.doc-sig-block .sig-label {
  font-size: 8.5pt;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.doc-quote {
  font-family: Arial, sans-serif;
  font-size: 11pt;
  font-style: italic;
  line-height: 1.45;
  padding: 8px 14px;
  border-left: 3px solid #E91E7A;
  background: #FFE8F2;
  margin: 8px 0;
}

/* ================= Thank you ================= */
.thanks {
  text-align: center;
  padding-top: 80px;
  max-width: 560px;
  margin: 0 auto;
}

.thanks-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lato', Arial, sans-serif;
  font-weight: 900;
  font-size: 28px;
  color: var(--terracotta);
}

.thanks h1 {
  font-family: 'Lato', Arial, sans-serif;
  font-weight: 900;
  font-size: 42px;
  margin: 0 0 16px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.thanks p {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 16px;
}

.thanks .close-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 20px 24px;
  margin: 32px auto 0;
  text-align: left;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.thanks .close-card strong { color: var(--ink); }

/* ================= Print ================= */
@media print {
  body { background: white; }
  .no-print { display: none !important; }
  .preview-page-wrap { background: white; padding: 0; border: none; }
  .doc { box-shadow: none; margin: 0; padding: 0.4in 0.45in; }
  .doc-section { page-break-inside: auto; }
  @page { size: letter; margin: 0.4in; }
}

/* ================= Responsive ================= */
@media (max-width: 680px) {
  .shell { padding: 32px 20px 100px; }
  h1.display { font-size: 42px; }
  .step-title { font-size: 28px; }
  .field.two-col { grid-template-columns: 1fr; gap: 18px; }
  .check-list { grid-template-columns: 1fr; }
  .doc { width: 100%; padding: 24px; }
  .doc-row { grid-template-columns: 1fr; gap: 2px; }
  .doc-two-col { grid-template-columns: 1fr; gap: 12px; }
  .preview-page-wrap { padding: 16px; }
  .preview-banner { flex-direction: column; align-items: stretch; gap: 12px; }
  .step-meter-track { width: 90px; }
}
