:root {
  --teal-900: #062F38;
  --teal-800: #0A4150;
  --teal-700: #0E5566;
  --teal-600: #136B7E;
  --teal-500: #1A8597;
  --teal-300: #67C3CF;
  --teal-100: #CDECF0;
  --sand: #F4F1EC;
  --ink: #10262C;
  --muted: #5E7A80;
  --line: rgba(255, 255, 255, 0.18);
  --radius: 14px;
  --shadow: 0 10px 40px rgba(6, 47, 56, 0.16);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
  font-size: 17px;
}

h1, h2, h3, .wordmark, .eyebrow, .btn {
  font-family: "Jost", "Inter", -apple-system, sans-serif;
}

a { color: var(--teal-600); }

/* ---------- Masthead ---------- */
.masthead {
  position: relative;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(123, 160, 196, 0.35) 0%, rgba(123, 160, 196, 0) 55%),
    radial-gradient(90% 70% at 10% 95%, rgba(170, 140, 175, 0.3) 0%, rgba(170, 140, 175, 0) 60%),
    linear-gradient(155deg, var(--teal-500) 0%, var(--teal-700) 45%, var(--teal-900) 100%);
  color: #fff;
  padding: 36px 20px 40px;
  overflow: hidden;
}

.masthead::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    -26px 16px 0 -1px rgba(255, 255, 255, 0.18),
    -52px 32px 0 -2px rgba(255, 255, 255, 0.12);
  transform: rotate(-18deg);
  pointer-events: none;
}

.masthead-inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 300;
  letter-spacing: 0.3em;
  font-size: 19px;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.wordmark .mono {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-left: 2px solid #fff;
  border-right: 2px solid #fff;
  position: relative;
  flex: none;
}

.wordmark .mono::before {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  height: 2px;
  background: #fff;
}

.wordmark small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.26em;
  opacity: 0.85;
  font-weight: 300;
}

.tagline {
  letter-spacing: 0.08em;
  font-size: 13px;
  text-transform: uppercase;
  opacity: 0.9;
  margin: 10px 0 0;
  font-family: "Jost", sans-serif;
}

.masthead h1 {
  font-size: clamp(30px, 7vw, 44px);
  line-height: 1.1;
  margin: 18px 0 10px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.masthead p.lede { margin: 0; max-width: 46ch; opacity: 0.94; font-size: 17px; }

/* ---------- Layout ---------- */
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

main { padding-bottom: 72px; }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 18px 0;
  border: 1px solid rgba(6, 47, 56, 0.07);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-600);
  margin: 0 0 6px;
}

/* ---------- Hub cards ---------- */
.parts { margin-top: -26px; position: relative; z-index: 2; }

.part-card { display: block; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.part-card:hover { transform: translateY(-2px); box-shadow: 0 16px 48px rgba(6,47,56,.2); }

.part-card h2 { margin: 2px 0 6px; font-size: 25px; font-weight: 500; }
.part-card p { margin: 0 0 14px; color: var(--muted); }

.part-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.pill {
  font-size: 12px;
  letter-spacing: .04em;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--teal-100);
  color: var(--teal-800);
  font-weight: 600;
}

.pill.done { background: #D8F0DF; color: #1D5E33; }
.pill.soon { background: #EFEAE1; color: #7A6A4F; }
.pill.hint { background: #FBEEE2; color: #8A5B2B; }

.part-card[aria-disabled="true"] { opacity: .62; pointer-events: none; }

/* ---------- Questions ---------- */
.q { padding: 22px 0; border-top: 1px solid rgba(6,47,56,.09); }
.q:first-of-type { border-top: 0; padding-top: 4px; }

.q-label { font-weight: 600; font-size: 18px; display: block; margin-bottom: 4px; }
.q-help { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.req { color: #B4472F; font-weight: 600; }

input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  font-size: 16px;
  border: 1.5px solid rgba(6,47,56,.22);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

textarea { min-height: 108px; resize: vertical; }

input:focus, textarea:focus, select:focus {
  outline: 3px solid rgba(26,133,151,.28);
  outline-offset: 1px;
  border-color: var(--teal-500);
}

.opts { display: grid; gap: 8px; }

.opt {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1.5px solid rgba(6,47,56,.16);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
}

.opt:hover { border-color: var(--teal-300); background: #FBFDFD; }
.opt input { margin: 3px 0 0; accent-color: var(--teal-600); width: 18px; height: 18px; flex: none; }
.opt.checked { border-color: var(--teal-500); background: #F2FAFB; }
.opt span { flex: 1; }

.other-text { margin-top: 8px; }

/* ---------- Scale ---------- */
.scale { display: flex; gap: 8px; }
.scale label {
  flex: 1;
  text-align: center;
  padding: 14px 4px;
  border: 1.5px solid rgba(6,47,56,.16);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  background: #fff;
}
.scale label.checked { background: var(--teal-600); color: #fff; border-color: var(--teal-600); }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ---------- Grid ---------- */
.grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table.grid { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14px; }
table.grid th, table.grid td { padding: 9px 6px; text-align: center; border-bottom: 1px solid rgba(6,47,56,.09); }
table.grid th:first-child, table.grid td:first-child { text-align: left; font-weight: 600; position: sticky; left: 0; background: #fff; min-width: 86px; }
table.grid thead th { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.25; vertical-align: bottom; }
table.grid input { width: 19px; height: 19px; accent-color: var(--teal-600); }
.grid-hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--teal-600);
  color: #fff;
  border: 0;
  padding: 15px 26px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn:hover { background: var(--teal-700); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--teal-700); border: 1.5px solid var(--teal-600); }
.btn.block { display: block; width: 100%; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

/* ---------- Progress ---------- */
.progress { position: sticky; top: 0; z-index: 5; background: var(--sand); padding: 10px 0 6px; }
.progress-bar { height: 6px; background: rgba(6,47,56,.12); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--teal-500); width: 0%; transition: width .3s ease; }
.progress-text { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* ---------- Misc ---------- */
.saved-note { font-size: 13px; color: var(--muted); }
.err { color: #B4472F; font-size: 14px; margin-top: 6px; }
.banner { background: #FFF4E5; border: 1px solid #F0D8AE; color: #6B4E16; padding: 12px 14px; border-radius: 10px; font-size: 15px; }

footer { text-align: center; color: var(--muted); font-size: 14px; padding: 28px 20px 48px; }
footer a { color: var(--teal-600); }

.done-mark { font-size: 46px; line-height: 1; margin: 0 0 8px; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .card { padding: 20px 17px; }
  .masthead { padding: 28px 18px 36px; }
}

/* ---------- Answer recap on the thank-you screen ---------- */
.recap { margin: 10px 0 0; }
.recap dt { font-weight: 600; font-size: 15px; margin-top: 14px; color: var(--teal-800); }
.recap dd { margin: 3px 0 0; font-size: 15px; color: var(--ink); }

.swipe-hint {
  font-size: 14px;
  color: var(--teal-700);
  background: var(--teal-100);
  padding: 9px 12px;
  border-radius: 8px;
  margin: 0 0 10px;
  font-weight: 500;
}

@media print {
  .masthead, .progress, .actions, footer, .btn { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
}
