/* Hill Family Memories: warm, modern, phone-first. */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e9e3da;
  --track: #f4efe7;
  --accent: #c2410c;        /* terracotta: buttons, links, "very" bars */
  --accent-strong: #9a3412;
  --accent-ink: #ffffff;
  --accent-soft: #fff1e6;
  --mid: #fdba74;           /* "somewhat" segment */
  --low: #e7e0d6;           /* "not" segment */
  --teal: #0f766e;
  --err: #b42318;
  --radius: 20px;
  --radius-sm: 14px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 8px 24px -12px rgba(28, 25, 23, .12);
  --shadow-lg: 0 2px 4px rgba(28, 25, 23, .04), 0 24px 48px -20px rgba(124, 45, 18, .28);
  --hero: radial-gradient(120% 90% at 100% 0%, rgba(245, 158, 11, .55) 0%, rgba(245, 158, 11, 0) 55%),
          radial-gradient(90% 80% at 0% 100%, rgba(15, 118, 110, .45) 0%, rgba(15, 118, 110, 0) 60%),
          linear-gradient(140deg, #3b1206 0%, #7c2d12 45%, #b23a0e 100%);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 18px/1.6 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.12; margin: 0 0 .45em; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); }
h2 { font-size: clamp(1.4rem, 4.5vw, 1.75rem); }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--accent); text-underline-offset: 3px; }
p { margin: 0 0 1em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
@media (min-width: 720px) { :root { --gutter: 28px; } }

/* ---------- header / footer ---------- */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 247, 242, .82); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(233, 227, 218, .8);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--hero); color: #fff; font-size: .95rem; font-weight: 800; letter-spacing: 0;
}
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { padding: 9px 13px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--ink); background: rgba(28, 25, 23, .05); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
/* On phones the menu can wrap to two rows, so the header scrolls away and the
   page's own sticky bars (survey progress, tree search) pin to the very top. */
@media (max-width: 719px) {
  .site-head { position: static; }
  .site-head .wrap { padding-top: 6px; padding-bottom: 6px; }
  .nav a { padding: 8px 11px; }
}
@media (max-width: 400px) { .brand-text { display: none; } }
main { padding: 0 0 64px; }
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; padding: 26px 0 44px; text-align: center; }

/* ---------- hero (home) ---------- */
.hero { background: var(--hero); color: #fff; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 70% 30%, rgba(255, 255, 255, .10), transparent 70%);
}
.hero .wrap { position: relative; z-index: 1; padding-top: 48px; padding-bottom: 56px; }
@media (min-width: 720px) { .hero .wrap { padding-top: 88px; padding-bottom: 96px; } }
.hero h1 { max-width: 13ch; }
.hero .lede { color: rgba(255, 255, 255, .86); max-width: 36em; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; margin: 0 0 20px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); font-size: .88rem; font-weight: 600;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 4px rgba(251, 191, 36, .25); }
.countdown { display: flex; gap: 10px; margin: 28px 0 0; flex-wrap: wrap; }
.countdown div {
  min-width: 84px; padding: 12px 14px; border-radius: 16px; text-align: center;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
}
.countdown b { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.countdown span { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .78); }

/* ---------- page heading band (inner pages) ---------- */
.page-head { background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg) 100%); padding: 36px 0 18px; margin-bottom: 8px; }
@media (min-width: 720px) { .page-head { padding: 56px 0 24px; } }
.page-head h1 { font-size: clamp(2rem, 7vw, 2.8rem); }

/* ---------- generic pieces ---------- */
.section { padding-top: 40px; }
@media (min-width: 720px) { .section { padding-top: 64px; } }
.section-head { margin-bottom: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 0 0 18px; box-shadow: var(--shadow);
}
@media (min-width: 720px) { .card { padding: 28px; } }
.lede { font-size: 1.15rem; color: var(--muted); }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--accent); margin: 0 0 .6em; }
.hero .kicker { color: #fed7aa; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 26px; border-radius: 999px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(194, 65, 12, .7); transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--accent); box-shadow: none; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.light { background: #fff; border-color: #fff; color: var(--accent-strong); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5); }
.btn.light:hover { background: #fff7ed; }
.btn.outline-light { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .7); color: #fff; box-shadow: none; }
.btn.outline-light:hover { background: rgba(255, 255, 255, .16); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, .nav a:focus-visible, .tabs button:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 3px;
}
.hero .btn:focus-visible, .feature .btn:focus-visible { outline-color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-row { display: grid; gap: 12px; margin: 30px 0 10px; max-width: 560px; }
@media (min-width: 560px) { .btn-row { grid-template-columns: 1fr 1fr; } }
.fine { font-size: .9rem; color: var(--muted); }
.hero .fine { color: rgba(255, 255, 255, .72); margin: 10px 0 0; }

/* info tiles */
.tiles { display: grid; gap: 14px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.tile { margin: 0; display: flex; flex-direction: column; }
.tile .icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--accent-soft); color: var(--accent);
}
.tile .icon svg { width: 24px; height: 24px; }
.tile.teal .icon { background: #e6f4f2; color: var(--teal); }
.tile.gold .icon { background: #fef3c7; color: #b45309; }
.tile h3 { margin-bottom: 6px; }
.tile .big-line { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; }
.tile p { color: var(--muted); margin: 0; }
.tile .tag { margin-top: 14px; align-self: flex-start; font-size: .82rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--track); color: var(--ink); }
.tile .tile-btn { margin-top: 16px; width: 100%; }

/* steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.steps li { position: relative; padding-top: 64px; margin: 0; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 22px; left: 22px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 800; font-size: .95rem;
}
@media (min-width: 720px) { .steps li::before { top: 28px; left: 28px; } .steps li { padding-top: 72px; } }
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--muted); margin: 0 0 10px; }
.steps a { font-weight: 700; text-decoration: none; }
.steps a:hover { text-decoration: underline; }

.feature {
  border: 0; color: #fff; background: var(--hero); box-shadow: var(--shadow-lg);
  display: grid; gap: 18px; align-items: center;
}
@media (min-width: 720px) { .feature { grid-template-columns: 1fr auto; padding: 36px; } }
.feature h2 { margin-bottom: 6px; }
.feature p { color: rgba(255, 255, 255, .84); margin: 0; }

/* ---------- survey form ---------- */
.progress {
  position: sticky; top: 64px; z-index: 5; margin: 0 0 18px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .9rem; font-weight: 600; color: var(--muted);
}
.progress .track { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; margin-top: 8px; }
.progress .fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #f59e0b); transition: width .3s ease; }
.q {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 0 0 16px; box-shadow: var(--shadow);
}
@media (min-width: 720px) { .q { padding: 28px; } }
.q legend, .q > label.q-head { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; padding: 0; margin-bottom: 6px; display: block; line-height: 1.35; }
.q .num {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; margin-right: 10px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent); font-size: .9rem; font-weight: 800; vertical-align: 2px;
}
.q .req, .q .opt { font-size: .74rem; font-weight: 700; margin-left: 6px; white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; vertical-align: 2px; }
.q .req { color: var(--err); background: #fdecea; }
.q .opt { color: var(--muted); background: var(--track); }
.q .help { color: var(--muted); font-size: .95rem; margin: 2px 0 14px; }
fieldset.q { min-width: 0; }
fieldset.q > legend { float: left; width: 100%; }  /* keeps the title inside the card instead of on its border */
fieldset.q > legend ~ * { clear: both; }
input[type="text"], input[type="number"], input[type="password"], textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fcfbf9; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 16px; min-height: 54px; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus, textarea:focus {
  border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(194, 65, 12, .14);
}
textarea { min-height: 120px; resize: vertical; }
.q.invalid { border-color: var(--err); box-shadow: 0 0 0 3px rgba(180, 35, 24, .14); }
.q .err { color: var(--err); font-weight: 700; font-size: .95rem; margin: 12px 0 0; }
.q .err:empty { display: none; }

.age-grid { display: grid; gap: 10px; }
@media (min-width: 560px) { .age-grid { grid-template-columns: 1fr 1fr; column-gap: 20px; } }
.age-row { display: grid; grid-template-columns: 1fr 6.5em; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--track); }
.age-row label { font-weight: 600; }
.age-row input { text-align: center; background: #fff; min-height: 48px; }
.sum-note { font-size: .95rem; color: var(--muted); margin: 12px 0 0; font-weight: 600; }

.rate-item { border-top: 1px solid var(--line); padding: 16px 0 6px; }
.rate-item:first-of-type { border-top: 0; padding-top: 4px; }
.rate-item .act { float: left; width: 100%; padding: 0; font-weight: 700; margin: 0 0 10px; }  /* float lets a legend take normal margins */
.rate-item .choices { clear: both; }
.choices { display: grid; gap: 8px; }
@media (min-width: 560px) { .rate-item .choices { grid-template-columns: repeat(3, 1fr); } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 16px; border: 1.5px solid var(--line);
  border-radius: 14px; background: #fcfbf9; font-weight: 600; transition: border-color .15s ease, background .15s ease;
}
.choice:hover span { border-color: #d6cdbf; background: #fff; }
.choice span::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #a8a29e; background: #fff; transition: all .15s ease; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.choice input:checked + span::before { border-color: var(--accent); background: radial-gradient(var(--accent) 42%, #fff 47%); }
.choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }

.form-alert { border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 18px; font-weight: 600; }
.form-alert.error { background: #fdecea; color: var(--err); border: 1px solid #f6c7c1; }
.thanks { text-align: center; padding: 44px 22px; }
.thanks .big {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.6rem; line-height: 1; background: var(--accent-soft);
}
.loading { color: var(--muted); padding: 30px 0; text-align: center; }

/* ---------- results ---------- */
.gate { max-width: 460px; margin: 28px auto; }
.gate label { display: block; font-weight: 700; margin-bottom: 8px; }
.gate .btn { width: 100%; margin-top: 14px; }
.res-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 28px 0 22px; }
.res-head .count { font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--accent); }
.res-head .meta { color: var(--muted); font-size: .92rem; }
.res-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.res-actions .btn { min-height: 46px; padding: 10px 18px; font-size: .95rem; }
.tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--track); margin: 0 0 20px; max-width: 100%; }
.tabs button {
  font: inherit; font-weight: 700; font-size: .95rem; padding: 10px 18px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; min-height: 46px;
}
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(28, 25, 23, .12); }

.qcard h3 { margin-bottom: 4px; }
.qcard .qnum { color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: 6px; }
.answered { color: var(--muted); font-size: .88rem; margin: 0 0 16px; }
.answered b { color: var(--ink); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9em, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--track); border-radius: var(--radius-sm); padding: 14px 16px; }
.stat .v { font-size: 1.9rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: .88rem; }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(7em, 38%) 1fr; gap: 12px; align-items: center; }
.bar-row .lab { font-weight: 600; font-size: .96rem; }
.bar-track { background: var(--track); border-radius: 10px; min-height: 36px; position: relative; overflow: hidden; }
.bar-fill { background: linear-gradient(90deg, #f59e0b, var(--accent)); height: 100%; min-height: 36px; border-radius: 10px; opacity: .9; }
.bar-val { position: absolute; inset: 0 12px 0 auto; display: flex; align-items: center; font-weight: 700; font-size: .92rem; }
.bar-row.top .lab::after { content: " ★ Top"; color: var(--accent); font-size: .82rem; font-weight: 800; }

.stack-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; margin: 0 0 16px; }
.stack-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stack-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.stack { display: grid; gap: 16px; }
.stack-row .lab { font-weight: 700; margin-bottom: 6px; }
.stack-bar { display: flex; min-height: 40px; border-radius: 10px; overflow: hidden; background: var(--track); gap: 2px; }
.seg { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .88rem; white-space: nowrap; overflow: hidden; }
.seg.very { background: var(--accent); color: #fff; }
.seg.some { background: var(--mid); color: var(--ink); }
.seg.not { background: var(--low); color: var(--ink); }
.stack-nums { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.stack-nums b { color: var(--ink); }

.names, .texts { list-style: none; padding: 0; margin: 0; }
.names { columns: 2 11em; column-gap: 24px; }
.names li { padding: 8px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.texts li { padding: 14px 16px; background: var(--track); border-radius: var(--radius-sm); margin-bottom: 8px; }
.texts li .who { display: block; color: var(--muted); font-size: .84rem; margin-top: 4px; }
.empty { color: var(--muted); font-style: italic; }

.resp { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; box-shadow: var(--shadow); }
.resp summary { list-style: none; cursor: pointer; padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; min-height: 56px; }
.resp summary::-webkit-details-marker { display: none; }
.resp summary .n { font-weight: 700; }
.resp summary .d { color: var(--muted); font-size: .88rem; text-align: right; }
.resp summary .s { color: var(--muted); font-size: .9rem; grid-column: 1 / -1; }
.resp summary .s::after { content: " ▾"; }
.resp[open] summary .s::after { content: " ▴"; }
.resp dl { margin: 0; padding: 0 18px 18px; display: grid; gap: 12px; }
.resp dt { font-weight: 700; font-size: .9rem; color: var(--muted); }
.resp dd { margin: 0; }
.resp dd ul { margin: 0; padding-left: 1.1em; }

.coming { text-align: center; padding: 48px 22px; margin-top: 28px; }
.coming .big {
  width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 28px; display: grid; place-items: center;
  font-size: 2.8rem; background: var(--hero); box-shadow: var(--shadow-lg);
}
.coming .lede { max-width: 32em; margin-left: auto; margin-right: auto; }

@media (max-width: 719px) { .progress { top: 8px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
