:root {
  --navy: #12759e;
  --navy-deep: #0d5a7a;
  --teal: #3aaab8;
  --teal-soft: #e3f3f5;
  --teal-softer: #f1f9fa;
  --bg: #f4f8f9;
  --card: #ffffff;
  --ink: #1d2a30;
  --ink-2: #4b5b62;
  --ink-3: #74848b;
  --line: #d8e3e6;
  --danger: #b3261e;
  --danger-soft: #fbeceb;
  --warn: #8a5a00;
  --warn-soft: #fff4dc;
  --ok: #1d6b3a;
  --ok-soft: #e6f4ea;
  --radius: 14px;
  --serif: "EB Garamond", Garamond, "Adobe Garamond Pro", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Likert diverging scale: brand navy/teal = agree, neutral grey, warm = disagree */
  --lk5: #12759e;
  --lk4: #3aaab8;
  --lk3: #d3d8da;
  --lk2: #e8895a;
  --lk1: #b8401c;
  --lk0: #eef1f2;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); color: var(--navy); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--navy); }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout */
.wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px 60px; }
.brand { text-align: center; padding: 18px 0 10px; }
.brand img { width: 220px; max-width: 60%; height: auto; }
.brand .title { font-family: var(--serif); color: var(--navy); font-size: 1.35rem; margin-top: 6px; letter-spacing: .02em; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(18, 117, 158, .06), 0 6px 24px rgba(18, 117, 158, .06);
  padding: 28px 26px;
  margin-bottom: 18px;
}
@media (max-width: 560px) { .card { padding: 22px 16px; } h1 { font-size: 1.7rem; } }

/* ---------- progress */
.progress { margin: 6px 0 18px; }
.progress .bar { height: 8px; background: var(--teal-soft); border-radius: 99px; overflow: hidden; }
.progress .fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--navy)); border-radius: 99px; transition: width .35s ease; }
.progress .label { display: flex; justify-content: space-between; font-size: .85rem; color: var(--ink-2); margin-top: 6px; }

/* ---------- form */
fieldset { border: 0; padding: 0; margin: 0 0 26px; }
legend { font-weight: 600; margin-bottom: 10px; padding: 0; font-size: 1.02rem; }
.q-num { color: var(--teal); font-weight: 700; margin-right: 6px; }
.options { display: grid; gap: 8px; }
.options.likert { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 680px) { .options.likert { grid-template-columns: 1fr; } }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: .9rem; line-height: 1.25; background: #fff; transition: all .15s ease; cursor: pointer;
}
.options.list .opt span { justify-content: flex-start; text-align: left; padding: 12px 14px; font-size: 1rem; }
@media (max-width: 680px) { .options.likert .opt span { justify-content: flex-start; text-align: left; min-height: 46px; padding: 10px 14px; font-size: .98rem; } }
.opt input:hover + span { border-color: var(--teal); background: var(--teal-softer); }
.opt input:focus-visible + span { outline: 3px solid rgba(58, 170, 184, .45); outline-offset: 2px; }
.opt input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; font-weight: 600; }
.opt.dk input:checked + span { background: #5d6d73; border-color: #5d6d73; }

label.field { display: block; font-weight: 600; margin: 0 0 6px; }
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; color: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(58, 170, 184, .35); border-color: var(--teal); }
.checkline { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.checkline input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--navy); }
.help { font-size: .88rem; color: var(--ink-2); margin: 4px 0 0; }

/* person picker */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.people .opt span { min-height: 72px; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; flex-direction: column; letter-spacing: .06em; }
.people .opt span small { font-family: var(--sans); font-size: .72rem; font-weight: 400; letter-spacing: 0; color: var(--ink-3); margin-top: 2px; }
.people .opt input:checked + span small { color: #d9f0f3; }
.people .opt.none span { font-family: var(--sans); font-size: .85rem; letter-spacing: 0; font-weight: 500; }

/* ---------- buttons */
.actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.btn {
  appearance: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; border-radius: 10px;
  padding: 13px 22px; background: var(--navy); color: #fff; transition: background .15s ease, transform .05s ease; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { background: var(--navy-deep); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.btn.secondary:hover { border-color: var(--teal); background: var(--teal-softer); }
.btn.ghost { background: transparent; color: var(--navy); padding: 8px 10px; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 8px 14px; font-size: .88rem; }

/* ---------- notices */
.notice { border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; font-size: .95rem; }
.notice.info { background: var(--teal-soft); color: var(--navy-deep); }
.notice.error { background: var(--danger-soft); color: var(--danger); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.section-tag { display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); margin-bottom: 4px; }
.privacy { background: var(--teal-softer); border-left: 4px solid var(--teal); padding: 14px 16px; border-radius: 0 10px 10px 0; font-size: .92rem; color: var(--ink-2); }
.privacy summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.privacy ul { margin: 8px 0 0; padding-left: 20px; }
.footer { text-align: center; color: var(--ink-3); font-size: .82rem; margin-top: 24px; }
.hp { position: absolute; left: -9999px; top: -9999px; }
.done-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--teal-soft); color: var(--navy); display: grid; place-items: center; margin: 0 auto 14px; font-size: 2rem; }
