@font-face { font-family: "Plus Jakarta Sans"; src: url("/fonts/jakarta.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/fonts/sora-extrabold.ttf") format("truetype"); font-weight: 800; font-style: normal; font-display: swap; }
/* Finance survey form. Kente-Gold tokens; light by default, espresso at night. */
:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #fbf8f2;
  --ink: #1d1710;
  --muted: #6b6152;
  --line: #e7e0d2;
  --line-strong: #cfc5b1;
  --control: #7f7767;
  --gold: #8f590d;
  --gold-strong: #d69a2e;
  --gold-soft: #fbf1dc;
  --check: #8f590d;
  --gold-grad: linear-gradient(120deg, #c98f24, #a86a12 52%, #875210);
  --danger: #a3301c;
  --danger-soft: #fbe9e4;
  --ok: #2f6b3c;
  --shadow: 0 1px 2px rgba(29, 23, 16, .05), 0 8px 28px rgba(29, 23, 16, .07);
  --radius: 20px;
  --radius-sm: 14px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Sora", "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0b07;
    --surface: #16120b;
    --surface-2: #1c170e;
    --ink: #f4ecdb;
    --muted: #ac9f88;
    --line: #2c2415;
    --line-strong: #4a3d24;
    --control: #9a8a68;
    --gold: #f6ce7a;
    --gold-strong: #d69a2e;
    --gold-soft: #241a0c;
    --check: #d69a2e;
    --gold-grad: linear-gradient(120deg, #f6ce7a, #d69a2e 52%, #a86a12);
    --danger: #f0a394;
    --danger-soft: #2a1410;
    --ok: #9fd3aa;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; scroll-padding-bottom: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px;
}
.skip:focus { top: 12px; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__in {
  max-width: 760px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; row-gap: 4px;
}
.brand { display: flex; align-items: center; min-width: 0; text-decoration: none; color: inherit; }
.brand__mark { width: 28px; height: 28px; flex: none; margin-right: -3px; }
.brand__word { font: 800 clamp(16px, 5vw, 19px)/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.gold { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__kicker {
  margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line-strong);
  color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.save {
  flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--muted);
}
.save__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.save[data-state="saved"] .save__dot { background: var(--ok); }
.save[data-state="saving"] .save__dot { background: var(--gold-strong); animation: pulse 1s ease-in-out infinite; }
.save[data-state="local"] .save__dot { background: var(--gold-strong); }
.save[data-state="error"] .save__dot { background: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }

.progress { height: 4px; background: var(--line); }
.progress__bar { height: 100%; width: 0; background: var(--gold-strong); transition: width .35s ease; }

/* ---------- layout ---------- */
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 22px 16px 28px; outline: none; }
.step { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.title { font: 800 clamp(26px, 6vw, 34px)/1.15 var(--display); letter-spacing: -.02em; margin-top: 6px; }
.title:focus { outline: none; }
.lead { color: var(--muted); font-size: 17px; margin-top: 8px; max-width: 60ch; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-top: 18px;
}
.card--flat { box-shadow: none; background: var(--surface-2); }

.points { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.points li { position: relative; padding-left: 30px; }
.points li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold-soft); border: 1px solid var(--gold-strong);
}
.points li::after {
  content: ""; position: absolute; left: 6px; top: 8px; width: 8px; height: 5px;
  border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  padding: 6px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--gold);
  font-size: 14px; font-weight: 600; border: 1px solid color-mix(in srgb, var(--gold-strong) 45%, transparent);
}
.terms { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 15px; display: grid; gap: 7px; }
.h2 { font: 700 18px/1.3 var(--font); }
.ref { color: var(--gold); letter-spacing: .08em; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- questions ---------- */
.q { border: 0; padding: 0; margin: 0; min-width: 0; }
.q + .q, .card > .q:not(:first-child) { margin-top: 0; }
.q__title { font: 600 18px/1.35 var(--font); padding: 0; display: block; width: 100%; }
.q__req { color: var(--gold); font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.q__help { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.q__err {
  margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger);
  font-size: 14.5px; font-weight: 600;
}
.q__clear {
  margin-top: 8px; background: none; border: 0; padding: 6px 0; color: var(--muted);
  font-size: 14px; text-decoration: underline; cursor: pointer;
}
.opts { display: grid; gap: 8px; margin-top: 12px; }
.opt {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 14px; min-height: 52px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; transition: border-color .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.opt:hover { border-color: var(--gold-strong); }
.opt input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 1px 0 0; width: 22px; height: 22px;
  border: 2px solid var(--control); background: var(--surface); cursor: pointer; position: relative;
}
.opt input[type="radio"] { border-radius: 50%; }
.opt input[type="checkbox"] { border-radius: 7px; }
.opt input:checked { border-color: var(--check); background: var(--check); }
.opt input[type="radio"]:checked::after {
  content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface);
}
.opt input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 5px; top: 5px; width: 9px; height: 5px;
  border-left: 2.5px solid var(--surface); border-bottom: 2.5px solid var(--surface); transform: rotate(-45deg);
}
.opt input:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold-strong) 55%, transparent); outline-offset: 2px; }
.opt.is-on { border-color: var(--gold-strong); background: var(--gold-soft); }
.opt.is-off { opacity: .5; cursor: not-allowed; }
.opt.is-off input { cursor: not-allowed; }
.opt__body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.opt__label { font-size: 16px; line-height: 1.4; }
.opt__hint { color: var(--muted); font-size: 14px; line-height: 1.35; }
.opt__more { margin: -2px 0 2px 34px; }
.note { color: var(--muted); font-size: 14px; margin-top: 8px; }

.field {
  width: 100%; padding: 13px 14px; border: 1px solid var(--control); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 16px; line-height: 1.45;
}
.field::placeholder { color: var(--muted); opacity: 1; }
.field:focus { outline: 3px solid color-mix(in srgb, var(--gold-strong) 45%, transparent); outline-offset: 1px; border-color: var(--gold-strong); }
textarea.field { min-height: 108px; resize: vertical; }
.q .field { margin-top: 12px; }
.opt__more .field { margin-top: 0; }

/* grid: one small choice per row */
.grid { display: grid; gap: 16px; margin-top: 14px; }
.grid__row { border: 0; padding: 0; margin: 0; min-width: 0; }
.grid__label { font-weight: 600; font-size: 15.5px; padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; min-height: 42px; padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--control); background: var(--surface); font-size: 14.5px; line-height: 1.25;
}
.pill input:checked + span { background: var(--gold-soft); border-color: var(--check); box-shadow: inset 0 0 0 1px var(--check); font-weight: 600; }
.pill input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--gold-strong) 55%, transparent); outline-offset: 2px; }

/* scale */
.scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.scale .pill span { width: 100%; justify-content: center; padding: 8px 0; border-radius: 12px; font-variant-numeric: tabular-nums; }
.scale__ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 13.5px; margin-top: 8px; gap: 12px; }
@media (max-width: 520px) { .scale { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- voice ---------- */
.rec { display: grid; gap: 14px; margin-top: 14px; }
.rec__prompt { font: 600 18px/1.4 var(--font); }
.rec__row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rec__btn {
  flex: none; width: 76px; height: 76px; border-radius: 50%; border: 2px solid var(--gold-strong);
  background: var(--surface); cursor: pointer; display: grid; place-items: center; position: relative;
  -webkit-tap-highlight-color: transparent;
}
.rec__btn::after { content: ""; width: 30px; height: 30px; border-radius: 50%; background: #c2351e; transition: border-radius .15s ease, transform .15s ease; }
.rec__btn[data-on="true"] { border-color: #c2351e; }
.rec__btn[data-on="true"]::after { border-radius: 7px; transform: scale(.8); }
.rec__btn:disabled { opacity: .45; cursor: not-allowed; }
.rec__btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold-strong) 55%, transparent); outline-offset: 3px; }
.rec__meta { display: grid; gap: 4px; min-width: 0; flex: 1; }
.rec__state { font-weight: 600; }
.rec__time { font: 600 22px/1 var(--font); font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; max-width: 260px; }
.meter__bar { height: 100%; width: 0; background: var(--gold-strong); }
.notes { display: grid; gap: 10px; }
.vnote {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px;
  display: grid; gap: 8px; background: var(--surface);
}
.vnote__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.vnote { min-width: 0; }
.vnote__name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.vnote__status { font-size: 14px; color: var(--muted); }
.vnote__status[data-s="saved"] { color: var(--ok); }
.vnote__status[data-s="error"] { color: var(--danger); }
.vnote audio { width: 100%; height: 40px; }
.vnote__bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.vnote__fill { height: 100%; width: 0; background: var(--gold-strong); transition: width .2s linear; }
.vnote__acts { display: flex; gap: 14px; flex-wrap: wrap; }
.link {
  background: none; border: 0; padding: 6px 0; color: var(--gold); font-weight: 600; font-size: 14.5px;
  text-decoration: underline; cursor: pointer;
}
.link--danger { color: var(--danger); }
.file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* ---------- nav ---------- */
.nav {
  position: sticky; bottom: 0; z-index: 9;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav__in { max-width: 760px; margin: 0 auto; padding: 12px 16px; display: flex; gap: 10px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 22px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn--primary { background: var(--ink); color: var(--bg); flex: 1; }
.btn--primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--gold-strong)); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--soft { background: var(--gold-soft); color: var(--gold); border-color: color-mix(in srgb, var(--gold-strong) 45%, transparent); }
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold-strong) 60%, transparent); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.banner {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 15px;
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold-strong) 45%, transparent);
}
.banner--warn { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 30;
  background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-size: 15px;
  box-shadow: var(--shadow); max-width: calc(100vw - 32px);
}
.foot { color: var(--muted); font-size: 13.5px; text-align: center; padding: 6px 16px 18px; }
.foot a { color: inherit; }

@media (min-width: 720px) {
  main { padding-top: 34px; }
  .card { padding: 26px; }
  .opts--two { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .brand__kicker { display: none; }
}
@media (max-height: 520px) { .nav { position: static; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
