/* ============================================================
   css/finedge.css — FinEdge customer portal design system
   One stylesheet for every page. Brand: cream / orange / gold with warm
   charcoal text, Fraunces (display) + Inter (UI). Light and dark themes.

   Components: header · footer · buttons · inputs/selects · status badges ·
   cards · alerts · application card · progress tracker · form stepper ·
   document/upload cards · form sections · review cards · modal · toast ·
   loading / empty / error states.
   ============================================================ */

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  /* brand palette (unchanged FinEdge identity) */
  --cream: #FFF8F1;
  --peach: #FFE7CE;
  --surface: #FFFFFF;
  --surface-2: #FFFBF6;
  --ink: #241A12;
  --ink-soft: #6B5C4E;
  --ink-faint: #A08E7A;
  --orange: #F97316;
  --orange-deep: #C2410C;
  --gold: #C9A227;
  --gold-soft: #F4E3B5;
  --gold-ink: #8A6A0C;
  --ok: #16A34A;
  --ok-ink: #15803D;
  --ok-bg: rgba(22, 163, 74, .10);
  --warn: #B45309;
  --warn-bg: #FFF7E6;
  --warn-line: #FDE2A7;
  --bad: #DC2626;
  --bad-bg: #FEF2F2;
  --bad-line: #FECACA;
  --line: #F0DAB8;
  --line-soft: #F6E8D3;
  --rad1: #FFD9A8;
  --rad2: #FFC98C;
  --input-bg: #FFFFFF;

  /* semantic aliases — use these in new code */
  --primary-orange: var(--orange);
  --primary-orange-dark: var(--orange-deep);
  --charcoal: var(--ink);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-soft);
  --text-muted: var(--ink-faint);
  --border: var(--line);
  --border-soft: var(--line-soft);
  --card-background: var(--surface);
  --success: var(--ok);
  --warning: var(--warn);
  --error: var(--bad);
  --orange-tint: color-mix(in srgb, var(--orange) 8%, var(--surface));
  --orange-ring: rgba(249, 115, 22, .16);

  /* shape, depth, rhythm */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 2px rgba(36, 26, 18, .05);
  --shadow-sm: 0 1px 2px rgba(36, 26, 18, .04), 0 4px 14px rgba(194, 65, 12, .06);
  --shadow: 0 1px 3px rgba(36, 26, 18, .04), 0 14px 36px rgba(194, 65, 12, .09);
  --shadow-lg: 0 2px 6px rgba(36, 26, 18, .05), 0 28px 64px rgba(194, 65, 12, .14);
  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --hdr-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --cream: #120E08;
  --peach: #1E1810;
  --surface: #1C160F;
  --surface-2: #231B12;
  --ink: #EDE0CC;
  --ink-soft: #B3A28A;
  --ink-faint: #7A6A55;
  --orange-deep: #FB923C;
  --gold: #E0BE57;
  --gold-soft: #3A2E12;
  --gold-ink: #E0BE57;
  --ok-ink: #4ADE80;
  --ok-bg: rgba(22, 163, 74, .16);
  --warn: #FBBF24;
  --warn-bg: #2A2008;
  --warn-line: #5A4512;
  --bad: #F87171;
  --bad-bg: #2A1212;
  --bad-line: #5A2020;
  --line: #3A2E20;
  --line-soft: #2A2117;
  --rad1: #3D2208;
  --rad2: #2A1805;
  --input-bg: #17120C;
  --orange-ring: rgba(249, 115, 22, .24);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .28);
  --shadow: 0 14px 36px rgba(0, 0, 0, .38);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ── Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h) + 16px); }
body {
  font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--ink);
  background: var(--cream); min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s, color .25s;
}
/* warm brand glow — public / auth pages */
body.glow {
  background:
    radial-gradient(900px 520px at 88% -12%, var(--rad1) 0%, transparent 60%),
    radial-gradient(700px 520px at 100% 100%, color-mix(in srgb, var(--rad2) 55%, transparent) 0%, transparent 55%),
    var(--cream);
  background-attachment: fixed;
}
a { color: var(--orange-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--orange) 25%, transparent); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 600; background: var(--ink); color: var(--cream); padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* icons (Lucide paths, rendered by FE.icon in js/common.js) */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
i[data-i] { display: inline-block; width: 18px; height: 18px; flex: none; }
.i-sm { width: 15px; height: 15px; } .i-lg { width: 22px; height: 22px; } .i-xl { width: 28px; height: 28px; }

/* ── Typography ──────────────────────────────────────────── */
.display { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.07; letter-spacing: -.025em; }
.h-page { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; letter-spacing: -.02em; }
.h-sec { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -.015em; }
.lead { font-size: 16.5px; line-height: 1.65; color: var(--ink-soft); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-deep); }
.muted { color: var(--ink-soft); }
.fine { font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.serif { font-family: var(--serif); }
.num { font-variant-numeric: tabular-nums; }

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.container.form-w { max-width: 920px; }
.page { padding-top: 32px; padding-bottom: 72px; }
.page-head { margin-bottom: 24px; }
.page-head p { color: var(--ink-soft); margin-top: 6px; font-size: 15px; }
.stack > * + * { margin-top: 20px; }

/* ── Header ──────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.hdr.clear { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; position: relative; }
.hdr-in { max-width: var(--maxw); margin: 0 auto; height: var(--hdr-h); padding: 0 var(--gutter); display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { height: 36px; width: auto; display: block; border-radius: 6px; box-shadow: var(--shadow-xs); }
.brand-tag { padding-left: 12px; border-left: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.hdr-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.hdr-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hdr-nav + .hdr-right { margin-left: 8px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none; transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--ink); background: color-mix(in srgb, var(--orange) 7%, transparent); }
.nav-link[aria-current="page"] { color: var(--ink); font-weight: 600; }

.icon-btn {
  position: relative; width: 40px; height: 40px; flex: none; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  display: inline-grid; place-items: center; cursor: pointer; text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--orange-deep); border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); }
.icon-btn[aria-expanded="true"] { color: var(--orange-deep); border-color: var(--orange); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px var(--surface); }
.theme-btn .i-sun { display: none; }
[data-theme="dark"] .theme-btn .i-moon { display: none; }
[data-theme="dark"] .theme-btn .i-sun { display: block; }

/* signed-in user chip + dropdown menus */
.user-btn {
  display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px 0 4px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer;
  transition: border-color .15s;
}
.user-btn:hover, .user-btn[aria-expanded="true"] { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); }
.user-btn .nm { font-size: 13.5px; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn .i { color: var(--ink-faint); width: 15px; height: 15px; }
.avatar {
  width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--orange-tint); color: var(--orange-deep); font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
}
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(340px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 6px; transform-origin: top right; animation: fe-pop .14s var(--ease);
}
.menu-h { padding: 12px 12px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.menu-h b { display: block; font-size: 14px; }
.menu-h span { display: block; font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: none; background: none;
  border-radius: 10px; font-size: 14px; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--orange-tint); }
.menu-item .i { color: var(--ink-soft); }
.notes { max-height: 360px; overflow-y: auto; }
.note { display: flex; gap: 12px; padding: 12px; border-radius: 10px; }
.note + .note { border-top: 1px solid var(--line-soft); border-radius: 0; }
.note-ic { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--orange-tint); color: var(--orange-deep); }
.note-ic .i { width: 16px; height: 16px; }
.note b { display: block; font-size: 13.5px; font-weight: 600; }
.note p { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.note time { display: block; font-size: 11.5px; color: var(--ink-faint); margin-top: 4px; }

/* ── Footer ──────────────────────────────────────────────── */
.ftr { border-top: 1px solid var(--line-soft); }
.ftr-in {
  max-width: var(--maxw); margin: 0 auto; padding: 24px var(--gutter) 32px;
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--ink-soft);
}
.ftr a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.ftr a:hover { color: var(--orange-deep); }
.ftr .sec { display: inline-flex; align-items: center; gap: 7px; }
.ftr .sec .i { color: var(--ok); width: 16px; height: 16px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h); padding: 0 22px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  font-size: 14.5px; font-weight: 600; letter-spacing: .005em; text-decoration: none; white-space: nowrap;
  background: linear-gradient(180deg, var(--orange) -30%, var(--orange-deep) 115%); color: #fff;
  box-shadow: 0 1px 2px rgba(124, 45, 18, .2), 0 6px 16px rgba(194, 65, 12, .22);
  transition: transform .15s var(--ease), box-shadow .15s, background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(124, 45, 18, .2), 0 10px 22px rgba(194, 65, 12, .3); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .i { width: 17px; height: 17px; }
.btn .i-arrow { transition: transform .15s var(--ease); }
.btn:hover .i-arrow { transform: translateX(2px); }
.btn.sm { --h: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn.lg { --h: 52px; padding: 0 26px; font-size: 15.5px; }
.btn.block { width: 100%; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-xs); }
.btn.secondary:hover { border-color: color-mix(in srgb, var(--orange) 50%, var(--line)); color: var(--orange-deep); box-shadow: var(--shadow-xs); }
.btn.text { background: none; box-shadow: none; color: var(--ink-soft); padding: 0 10px; }
.btn.text:hover { color: var(--orange-deep); transform: none; background: color-mix(in srgb, var(--orange) 7%, transparent); }
.btn.on-orange { background: #fff; color: var(--orange-deep); box-shadow: 0 6px 18px rgba(0, 0, 0, .14); }
[data-theme="dark"] .btn.on-orange { background: #1C160F; color: #FB923C; }
.spin {
  width: 16px; height: 16px; border-radius: 50%; display: none; flex: none;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: fe-spin .7s linear infinite;
}
.btn.secondary .spin { border-color: var(--line); border-top-color: var(--orange); }
.btn.loading .spin { display: inline-block; }
.btn.loading .i { display: none; }
.btn.loading .lbl { opacity: .85; }
.link { color: var(--orange-deep); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.copy-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer; transition: .15s;
}
.copy-btn:hover { color: var(--orange-deep); border-color: var(--orange); }
.copy-btn .i { width: 15px; height: 15px; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: clamp(18px, 2.6vw, 28px); box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 20px; }
.card.raised { box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.card-h .grow { flex: 1 1 220px; min-width: 0; }
.card-title { font-size: 17px; font-weight: 650; letter-spacing: -.005em; line-height: 1.3; }
.card-title.serif { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -.01em; }
.card-sub { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; margin-top: 3px; }
.card-ic {
  width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: var(--orange-tint); color: var(--orange-deep);
}
.card-ic .i { width: 20px; height: 20px; }
.card-ic.gold { background: var(--gold-soft); color: var(--gold-ink); }
.divider { height: 1px; background: var(--line-soft); margin: 20px 0; border: 0; }

/* ── Status badges (colour + dot + text, never colour alone) ── */
.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1.2; border: 1px solid transparent;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge.review { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge.processing { background: var(--orange-tint); color: var(--orange-deep); border-color: color-mix(in srgb, var(--orange) 28%, transparent); }
.badge.approved, .badge.done { background: var(--ok-bg); color: var(--ok-ink); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.badge.closed { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.badge.draft { background: var(--gold-soft); color: var(--gold-ink); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.badge.muted { background: var(--surface-2); color: var(--ink-soft); border-color: var(--line-soft); }
.badge.live::before { box-shadow: 0 0 0 0 currentColor; animation: fe-pulse 2s infinite; }

/* ── Alerts (icon drawn by CSS so JS can keep using textContent) ── */
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  font-size: 13.5px; line-height: 1.55; border: 1px solid transparent; margin-bottom: 16px;
}
.alert:empty { display: none; }
.alert::before {
  content: ''; width: 18px; height: 18px; flex: none; margin-top: 1px; background: currentColor;
  -webkit-mask: var(--alert-ic) center / contain no-repeat; mask: var(--alert-ic) center / contain no-repeat;
}
.alert.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); --alert-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.alert.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); --alert-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E"); }
.alert.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok-ink); --alert-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E"); }
.alert.info { background: var(--orange-tint); border-color: color-mix(in srgb, var(--orange) 22%, transparent); color: var(--ink); --alert-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E"); }
.alert.info::before { background: var(--orange-deep); }
.alert.flat { margin-bottom: 0; }

/* ── Forms ───────────────────────────────────────────────── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.grid1 { display: grid; gap: 18px; }
.grid2 + .grid2, .grid2 + .grid1, .grid1 + .grid2, .grid1 + .grid1 { margin-top: 18px; }
.span2 { grid-column: 1 / -1; }
.fg { min-width: 0; }
.fg > label, .fg > .lbl {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px;
  font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px;
}
.fg small { font-weight: 400; color: var(--ink-soft); }
.req { color: var(--bad); font-weight: 600; }
.hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.input, .fg input:not([type=radio]):not([type=checkbox]):not([type=file]), .fg select, .fg textarea {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px;
  font-size: 14.5px; color: var(--ink); background: var(--input-bg); outline: none;
  box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s, background .15s;
}
.fg select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B5C4E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 16px;
}
.fg textarea { height: auto; min-height: 92px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.fg input::placeholder, .fg textarea::placeholder, .input::placeholder { color: var(--ink-faint); }
.fg input:hover, .fg select:hover, .fg textarea:hover { border-color: color-mix(in srgb, var(--orange) 30%, var(--line)); }
.fg input:focus, .fg select:focus, .fg textarea:focus, .input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-ring); }
.fg.err input, .fg.err select, .fg.err textarea { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 12%, transparent); }
.ferr { display: none; align-items: flex-start; gap: 6px; color: var(--bad); font-size: 12.5px; margin-top: 6px; line-height: 1.45; }
.ferr::before {
  content: ''; width: 14px; height: 14px; flex: none; margin-top: 2px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fg.err .ferr:not(:empty) { display: flex; }

/* inputs with a leading icon and/or trailing button */
.input-wrap { position: relative; }
.input-wrap > .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }
.input-wrap.has-ic input { padding-left: 42px !important; }
.input-wrap .eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
  display: grid; place-items: center; background: none; border: none; border-radius: 8px; cursor: pointer; color: var(--ink-soft);
}
.input-wrap .eye:hover { color: var(--orange-deep); background: var(--orange-tint); }
.input-wrap .eye .i-eye-off { display: none; }
.input-wrap .eye[aria-pressed="true"] .i-eye { display: none; }
.input-wrap .eye[aria-pressed="true"] .i-eye-off { display: block; }
.input-wrap.has-eye input { padding-right: 46px !important; }
.input-wrap:focus-within > .i { color: var(--orange-deep); }

/* auto-filled field marker — subtle, gold */
.af {
  display: inline-flex; align-items: center; gap: 5px; margin-left: auto;
  font-size: 11.5px; font-weight: 500; color: var(--gold-ink); white-space: nowrap;
}
.af .i { width: 13px; height: 13px; }
.af.verify { color: var(--warn); }
.fg.autofilled input, .fg.autofilled select, .fg.autofilled textarea {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  background: color-mix(in srgb, var(--gold-soft) 22%, var(--input-bg));
}
.fg.autofilled.verify input, .fg.autofilled.verify select, .fg.autofilled.verify textarea { border-color: var(--warn-line); background: color-mix(in srgb, var(--warn-bg) 60%, var(--input-bg)); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.55; cursor: pointer; color: var(--ink-soft); }
.check input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--orange-deep); cursor: pointer; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-chip {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 11px; cursor: pointer; font-weight: 600; font-size: 14px;
  background: var(--input-bg); transition: border-color .15s, background .15s;
}
.radio-chip:hover { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); }
.radio-chip:has(input:checked) { border-color: var(--orange); background: var(--orange-tint); box-shadow: 0 0 0 3px var(--orange-ring); }
.radio-chip input { accent-color: var(--orange-deep); width: 16px; height: 16px; }

/* form section (heading + body inside a card) */
.fsec + .fsec { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.fsec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.fsec-h .i { color: var(--orange-deep); width: 18px; height: 18px; }
.fsec-h h3 { font-size: 15px; font-weight: 650; }
.fsec-h span { font-size: 12.5px; color: var(--ink-soft); margin-left: auto; }

/* ── Toast ───────────────────────────────────────────────── */
#toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 300; transform: translate(-50%, 16px);
  display: flex; align-items: flex-start; gap: 10px; max-width: min(92vw, 520px);
  padding: 13px 18px; border-radius: 12px; background: #241A12; color: #FFF8F1;
  font-size: 13.5px; font-weight: 500; line-height: 1.45; box-shadow: 0 14px 36px rgba(0, 0, 0, .28);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
  --t-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E");
}
[data-theme="dark"] #toast { background: #EDE0CC; color: #241A12; }
#toast::before { content: ''; width: 18px; height: 18px; flex: none; margin-top: 1px; background: #FDBA74; -webkit-mask: var(--t-ic) center / contain no-repeat; mask: var(--t-ic) center / contain no-repeat; }
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast.error { --t-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E"); }
#toast.error::before { background: #F87171; }
#toast.ok { --t-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E"); }
#toast.ok::before { background: #4ADE80; }
[data-theme="dark"] #toast::before { background: var(--orange-deep); }
[data-theme="dark"] #toast.error::before { background: #DC2626; }
[data-theme="dark"] #toast.ok::before { background: #16A34A; }

/* ── Modal ───────────────────────────────────────────────── */
.overlay {
  display: none; position: fixed; inset: 0; z-index: 200; padding: 16px;
  background: rgba(20, 12, 4, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  align-items: center; justify-content: center;
}
.overlay.open { display: flex; animation: fe-fade .15s ease; }
.modal {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-lg); animation: fe-rise .2s var(--ease);
}
.modal-ic { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px; background: var(--orange-tint); color: var(--orange-deep); }
.modal-ic .i { width: 24px; height: 24px; }
.modal h2 { font-size: 19px; font-weight: 650; margin-bottom: 6px; }
.modal p { color: var(--ink-soft); font-size: 14px; line-height: 1.6; margin-bottom: 18px; }
.modal .row { display: flex; gap: 10px; margin-top: 18px; }
.modal .row .btn { flex: 1; }

/* ── Loading / empty / error states ──────────────────────── */
.state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 44px 16px; color: var(--ink-soft); font-size: 14px; }
.state-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--orange-tint); color: var(--orange-deep); margin-bottom: 4px; }
.state-ic .i { width: 24px; height: 24px; }
.state.error .state-ic { background: var(--bad-bg); color: var(--bad); }
.state b { color: var(--ink); font-size: 15.5px; font-weight: 650; }
.state .btn { margin-top: 8px; }
.loader { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--orange); animation: fe-spin .8s linear infinite; }
.skel { border-radius: 8px; background: linear-gradient(90deg, var(--line-soft) 25%, color-mix(in srgb, var(--peach) 70%, var(--surface)) 50%, var(--line-soft) 75%); background-size: 200% 100%; animation: fe-shimmer 1.3s infinite linear; }
.skel-line { height: 12px; margin: 10px 0; }

/* ============================================================
   PUBLIC LANDING
   ============================================================ */
.hero {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(28px, 6vw, 72px) var(--gutter) clamp(40px, 6vw, 80px);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 64px); align-items: center;
}
.hero .display .accent { color: var(--orange); }
.hero .lead { margin-top: 20px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-points li { list-style: none; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); }
.hero-points .i { color: var(--orange-deep); width: 17px; height: 17px; }

/* illustrative application card (decorative, aria-hidden) */
.preview { position: relative; display: flex; justify-content: center; padding: 18px 0 40px; }
.preview::before {
  content: ''; position: absolute; inset: 6% 4% 10%; border-radius: 32px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--orange) 14%, transparent), color-mix(in srgb, var(--gold) 12%, transparent));
  transform: rotate(-3deg);
}
.pv-card { position: relative; width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line-soft); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 22px; animation: fe-rise .5s var(--ease) both; }
.pv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pv-lbl { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.pv-id { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin-top: 2px; }
.pv-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 20px 0 8px; }
.pv-track span { height: 6px; border-radius: 6px; background: var(--line-soft); }
.pv-track span.d { background: var(--gold); }
.pv-track span.c { background: var(--orange); }
.pv-stage { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-soft); }
.pv-stage b { color: var(--ink); font-weight: 600; }
.pv-list { list-style: none; margin-top: 18px; border-top: 1px solid var(--line-soft); }
.pv-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.pv-list li:last-child { border-bottom: none; }
.pv-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--line-soft); color: var(--ink-faint); }
.pv-dot .i { width: 14px; height: 14px; stroke-width: 2.2; }
.pv-list .d .pv-dot { background: var(--gold-soft); color: var(--gold-ink); }
.pv-list .c .pv-dot { background: var(--orange); color: #fff; box-shadow: 0 0 0 4px var(--orange-ring); }
.pv-list span { flex: 1; }
.pv-list .pv-dot { flex: none; }
.pv-list .c span { font-weight: 600; }
.pv-list small { color: var(--ink-faint); font-size: 12px; }
.pv-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pv-kv div { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; }
.pv-kv small { display: block; font-size: 11.5px; color: var(--ink-soft); }
.pv-kv b { font-size: 15px; font-weight: 650; }
.pv-float {
  position: absolute; left: -2%; bottom: 8px; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; padding: 11px 14px; box-shadow: var(--shadow);
  font-size: 13px; animation: fe-rise .5s .15s var(--ease) both;
}
.pv-float .card-ic { width: 34px; height: 34px; background: var(--ok-bg); color: var(--ok-ink); }
.pv-float b { display: block; font-weight: 600; }
.pv-float small { color: var(--ink-soft); font-size: 12px; }

.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter); }
.section-head { max-width: 620px; margin-bottom: 36px; }
.section-head p { margin-top: 10px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.65; }
.section.alt { max-width: none; background: var(--surface); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section.alt > .in { max-width: calc(var(--maxw) - 2 * var(--gutter)); margin: 0 auto; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-xs); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.feature:hover { border-color: var(--line); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.feature .num-tag { font-size: 12px; font-weight: 700; color: var(--orange-deep); letter-spacing: .06em; margin: 16px 0 6px; display: block; }
.feature h3 { font-size: 16px; font-weight: 650; margin-bottom: 6px; }
.feature p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.doc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.doc-tile { display: flex; align-items: center; gap: 14px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 16px; padding: 16px; }
.doc-tile b { display: block; font-size: 14.5px; font-weight: 600; }
.doc-tile span { font-size: 12.5px; color: var(--ink-soft); }
.trust-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-item b { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 2px; }
.trust-item p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: clamp(26px, 4vw, 40px) clamp(22px, 4vw, 48px); border-radius: 24px; color: #fff;
  background: radial-gradient(600px 300px at 100% 0%, rgba(255, 255, 255, .18), transparent 60%), linear-gradient(135deg, var(--orange) 0%, #C2410C 100%);
  box-shadow: var(--shadow);
}
[data-theme="dark"] .cta-band { background: radial-gradient(600px 300px at 100% 0%, rgba(255, 255, 255, .1), transparent 60%), linear-gradient(135deg, #B4541A 0%, #7C2D12 100%); }
.cta-band h2 { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; letter-spacing: -.01em; }
.cta-band p { color: rgba(255, 255, 255, .9); margin-top: 6px; font-size: 15px; }

/* ============================================================
   AUTH (sign in / create account / reset password)
   ============================================================ */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side {
  position: relative; overflow: hidden; color: #fff; padding: 36px clamp(28px, 4vw, 56px);
  display: flex; flex-direction: column;
  background: radial-gradient(640px 380px at 100% -10%, rgba(255, 255, 255, .22) 0%, transparent 60%), linear-gradient(160deg, #FDA95D 0%, var(--orange) 55%, #C2410C 100%);
}
[data-theme="dark"] .auth-side { background: radial-gradient(640px 380px at 100% -10%, rgba(255, 255, 255, .1) 0%, transparent 60%), linear-gradient(160deg, #B4541A 0%, #7C2D12 100%); }
.auth-side::after { content: ''; position: absolute; width: 420px; height: 420px; right: -160px; bottom: -160px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 0 0 60px rgba(255, 255, 255, .04), 0 0 0 120px rgba(255, 255, 255, .03); }
.auth-side .brand img { height: 44px; box-shadow: 0 4px 16px rgba(0, 0, 0, .16); }
.auth-side-body { margin: auto 0; max-width: 440px; position: relative; z-index: 1; padding: 40px 0; }
.auth-side h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.12; letter-spacing: -.02em; }
.auth-side .sub { margin-top: 14px; font-size: 15.5px; line-height: 1.65; color: rgba(255, 255, 255, .92); }
.auth-points { list-style: none; margin-top: 30px; display: grid; gap: 16px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; }
.auth-points .pt-ic { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); }
.auth-points b { display: block; font-size: 14.5px; font-weight: 600; }
.auth-points span { font-size: 13.5px; color: rgba(255, 255, 255, .85); }
.auth-side .foot { font-size: 12.5px; color: rgba(255, 255, 255, .8); position: relative; z-index: 1; }
.auth-main { display: flex; flex-direction: column; padding: 24px clamp(16px, 4vw, 48px); }
.auth-top { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.auth-top .brand { margin-right: auto; display: none; }
.auth-card {
  width: 100%; max-width: 440px; margin: auto; padding: clamp(24px, 4vw, 40px) 0;
}
.auth-card h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 3vw, 34px); letter-spacing: -.02em; line-height: 1.15; }
.auth-card .sub { color: var(--ink-soft); margin-top: 8px; font-size: 15px; margin-bottom: 26px; }
.auth-card .fg + .fg { margin-top: 18px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; }
.auth-row .check { align-items: center; color: var(--ink); }
.auth-card .btn.block { margin-top: 24px; }
.auth-switch { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line-soft); text-align: center; font-size: 14px; color: var(--ink-soft); }
.auth-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px; font-size: 12.5px; color: var(--ink-soft); }
.auth-note .i { width: 15px; height: 15px; color: var(--ok); }
.auth-done-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px; background: var(--ok-bg); color: var(--ok-ink); }
.auth-done-ic .i { width: 28px; height: 28px; }
.pw-meter { height: 4px; background: var(--line-soft); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.pw-meter div { height: 100%; width: 0; border-radius: 4px; transition: width .2s, background .2s; }
.pw-lbl { font-size: 12px; color: var(--ink-soft); margin-top: 5px; min-height: 16px; }
.form-msg { margin: 0 0 18px; }

/* ============================================================
   MY ACCOUNT (dashboard)
   ============================================================ */
.welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.welcome p { color: var(--ink-soft); margin-top: 6px; font-size: 15px; }
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.dash-main > * + *, .dash-side > * + * { margin-top: 20px; }

/* application card */
.app-card { border-color: color-mix(in srgb, var(--orange) 22%, var(--line-soft)); box-shadow: var(--shadow); }
.app-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.app-id-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.app-id { font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 22px; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.kv > div { padding: 14px 16px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); min-width: 0; background: var(--surface-2); }
.kv > div:nth-child(3n) { border-right: none; }
.kv > div:nth-last-child(-n+3) { border-bottom: none; }
.kv span { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 500; margin-bottom: 3px; }
.kv b { font-size: 14.5px; font-weight: 600; word-break: break-word; }
.app-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; }
.app-foot .i { width: 15px; height: 15px; }

/* progress tracker (phases) — horizontal on desktop, vertical on mobile */
.track { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 4px 0 6px; }
.track li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 6px; }
.track li::before { content: ''; position: absolute; top: 19px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.track li:first-child::before { display: none; }
.track li.done::before, .track li.cur::before { background: var(--gold); }
.track .t-dot {
  position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-faint); transition: .2s;
}
.track .t-dot .i { width: 18px; height: 18px; }
.track li.done .t-dot { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 60%, transparent); color: var(--gold-ink); }
.track li.cur .t-dot { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 0 0 5px var(--orange-ring); }
.track li.fail .t-dot { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.track .t-t { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink-soft); line-height: 1.3; }
.track li.done .t-t, .track li.cur .t-t { color: var(--ink); }
.track .t-s { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.track li.cur .t-s { color: var(--orange-deep); font-weight: 600; }

.meter { height: 6px; background: var(--line-soft); border-radius: 6px; overflow: hidden; }
.meter > div { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--gold), var(--orange)); transition: width .6s var(--ease); }
.meter-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-soft); margin: 22px 0 8px; }
.meter-row b { color: var(--ink); font-weight: 600; }
.meter-row > span:last-child { white-space: nowrap; }

/* processing sub-stages (vertical list) */
.stages { margin-top: 20px; border-top: 1px solid var(--line-soft); padding-top: 4px; }
.stages > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 14px 0; font-size: 14px; font-weight: 600; }
.stages > summary::-webkit-details-marker { display: none; }
.stages > summary .i { margin-left: auto; color: var(--ink-soft); transition: transform .2s; }
.stages[open] > summary .i { transform: rotate(180deg); }
.vt { list-style: none; padding: 4px 0 4px; }
.vt li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.vt li:last-child { padding-bottom: 4px; }
.vt li::before { content: ''; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--line-soft); }
.vt li:last-child::before { display: none; }
.vt li.done::before { background: color-mix(in srgb, var(--gold) 55%, transparent); }
.vt .v-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); border: 1.5px solid var(--line); color: var(--ink-faint); }
.vt .v-dot .i { width: 14px; height: 14px; stroke-width: 2.2; }
.vt li.done .v-dot { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 60%, transparent); color: var(--gold-ink); }
.vt li.cur .v-dot { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 0 0 4px var(--orange-ring); }
.vt .v-t { font-size: 14px; font-weight: 600; color: var(--ink-soft); padding-top: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vt li.done .v-t, .vt li.cur .v-t { color: var(--ink); }
.vt .v-s { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.vt .badge { font-size: 11.5px; padding: 3px 9px; }

/* start / draft CTA */
.start { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; }
.start-ic { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(150deg, var(--orange-tint), color-mix(in srgb, var(--gold-soft) 70%, var(--surface))); color: var(--orange-deep); border: 1px solid color-mix(in srgb, var(--orange) 18%, transparent); }
.start-ic .i { width: 28px; height: 28px; stroke-width: 1.6; }
.start h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 2.4vw, 26px); letter-spacing: -.015em; line-height: 1.2; }
.start p { color: var(--ink-soft); margin-top: 6px; font-size: 14.5px; }
.need { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 20px 0 22px; }
.need li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink-soft); }
.need li .i { color: var(--orange-deep); }
.need b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.start-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* documents on file */
.doc-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.doc-row:last-child { border-bottom: none; padding-bottom: 0; }
.doc-row .card-ic { width: 38px; height: 38px; }
.doc-meta { min-width: 0; flex: 1; }
.doc-meta b { display: block; font-size: 14px; font-weight: 600; }
.doc-meta span { display: block; font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sidebar: advisor, calculator, security */
.advisor { display: flex; gap: 14px; align-items: flex-start; }
.advisor-links { display: grid; gap: 8px; margin-top: 14px; }
.advisor-links a { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-soft); overflow: hidden; text-overflow: ellipsis; }
.advisor-links a:hover { border-color: var(--line); color: var(--orange-deep); }
.advisor-links .i { color: var(--orange-deep); width: 16px; height: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; margin-bottom: 18px; }
.seg button { border: none; background: none; border-radius: 9px; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: .15s; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.calc .fg > label { font-size: 12.5px; margin-bottom: 6px; }
.calc .fg input { height: 42px; font-size: 14px; }
.res { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.res div { background: var(--orange-tint); border-radius: 12px; padding: 12px 14px; }
.res span { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.res b { font-size: 18px; font-weight: 700; color: var(--orange-deep); font-variant-numeric: tabular-nums; }
.sec-note { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.sec-note .card-ic { width: 36px; height: 36px; background: var(--ok-bg); color: var(--ok-ink); }
.sec-note b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; margin-bottom: 2px; }

/* ============================================================
   APPLICATION FORM
   ============================================================ */
.save-state { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.save-state .i { width: 15px; height: 15px; }
.save-state.ok .i { color: var(--ok); }
.save-state.err { color: var(--bad); font-weight: 600; }
.save-state.busy::before { content: ''; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--orange); animation: fe-spin .8s linear infinite; }

/* stepper */
.stepper { display: flex; align-items: flex-start; margin: 4px 0 28px; }
.ps {
  position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 112px; background: none; border: none; cursor: default; padding: 0; text-align: center;
}
.ps.done { cursor: pointer; }
.pdot {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-faint);
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.pdot .i { width: 17px; height: 17px; stroke-width: 2.4; }
.ps.done .pdot { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 65%, transparent); color: var(--gold-ink); }
.ps.done:hover .pdot { border-color: var(--gold); }
.ps.on .pdot { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 0 0 5px var(--orange-ring); }
.plbl { font-size: 12.5px; font-weight: 600; color: var(--ink-faint); line-height: 1.3; }
.ps.done .plbl { color: var(--ink-soft); }
.ps.on .plbl { color: var(--ink); }
.pline { flex: 1; height: 2px; margin-top: 18px; min-width: 10px; background: var(--line); border-radius: 2px; transition: background .3s; }
.pline.done { background: var(--gold); }

.step { display: none; }
.step.on { display: block; animation: fe-step .22s var(--ease); }
.step-h { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.step-h h2 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
.step-h p { font-size: 14px; color: var(--ink-soft); margin-top: 3px; line-height: 1.6; }
.step-h h2:focus { outline: none; }

/* consent box */
.consent {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; cursor: pointer;
  background: var(--orange-tint); border: 1px solid color-mix(in srgb, var(--orange) 22%, transparent);
  font-size: 13.5px; line-height: 1.6; color: var(--ink);
}
.consent input { width: 19px; height: 19px; margin-top: 2px; flex-shrink: 0; accent-color: var(--orange-deep); cursor: pointer; }
.consent:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--orange-ring); }

/* document upload cards */
.docs.locked { opacity: .5; pointer-events: none; filter: grayscale(.3); }
.docs-h { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 14px; }
.docs-h h3 { font-size: 15px; font-weight: 650; }
.docs-h span { font-size: 12.5px; color: var(--ink-soft); }
.docgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.slot {
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: 18px;
  border: 1.5px dashed var(--line); border-radius: 16px; background: var(--surface-2);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.slot:hover { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); }
.slot.ok { border-style: solid; border-color: color-mix(in srgb, var(--ok) 35%, var(--line-soft)); background: var(--surface); }
.slot.warnd { border-style: solid; border-color: var(--warn-line); background: var(--surface); }
.slot.bad { border-style: solid; border-color: var(--bad-line); background: var(--bad-bg); }
.slot.drag { border-color: var(--orange); border-style: solid; background: var(--orange-tint); box-shadow: 0 0 0 4px var(--orange-ring); }
.slot.busy { border-style: solid; border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); background: var(--surface); }
.slot-h { display: flex; align-items: flex-start; gap: 12px; }
.slot-ic { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-soft); color: var(--orange-deep); transition: .15s; }
.slot-ic .i { width: 20px; height: 20px; }
.slot.ok .slot-ic { background: var(--ok-bg); border-color: transparent; color: var(--ok-ink); }
.slot.warnd .slot-ic { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.slot-ttl { min-width: 0; flex: 1; }
.slot-ttl b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.slot-hint { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin-top: 2px; }
.tag { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--orange-tint); color: var(--orange-deep); white-space: nowrap; }
.tag .i { width: 12px; height: 12px; stroke-width: 2.4; }
.tag.opt { background: var(--line-soft); color: var(--ink-soft); }
.tag.okt { background: var(--ok-bg); color: var(--ok-ink); }
.tag.wt { background: var(--warn-bg); color: var(--warn); }
.slot-file { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 13px; min-width: 0; }
.slot-file .i { color: var(--ink-soft); }
.slot-file .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.slot-stat { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); margin-top: 12px; }
.slot-stat:empty { display: none; }
.slot-stat .i { width: 15px; height: 15px; margin-top: 1px; }
.slot-stat.ok { color: var(--ok-ink); }
.slot-stat.work { color: var(--orange-deep); font-weight: 500; }
.slot-stat.work::before { content: ''; width: 13px; height: 13px; margin-top: 2px; flex: none; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--orange) 30%, transparent); border-top-color: var(--orange); animation: fe-spin .8s linear infinite; }
.slot-stat.warn { color: var(--warn); }
.slot-stat.bad { color: var(--bad); font-weight: 500; }
.bar { height: 4px; background: var(--line-soft); border-radius: 4px; overflow: hidden; margin-top: 12px; }
.bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--orange)); border-radius: 4px; transition: width .25s var(--ease); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips:empty { display: none; }
.chip { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 7px; background: color-mix(in srgb, var(--gold-soft) 55%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; }
.btn-s {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.btn-s .i { width: 15px; height: 15px; }
.btn-s:hover { border-color: color-mix(in srgb, var(--orange) 50%, var(--line)); color: var(--orange-deep); }
.btn-s.pri { background: var(--orange-deep); border-color: var(--orange-deep); color: #fff; }
.btn-s.pri:hover { background: color-mix(in srgb, var(--orange-deep) 88%, #000); color: #fff; }
[data-theme="dark"] .btn-s.pri { background: var(--orange); border-color: var(--orange); color: #1C160F; }
.btn-s.danger:hover { border-color: var(--bad-line); color: var(--bad); }
.btn-s:disabled { opacity: .5; cursor: not-allowed; }
.toggle-row { display: flex; align-items: center; gap: 12px; margin: 26px 0 0; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.toggle-row input { width: 18px; height: 18px; accent-color: var(--orange-deep); }
.toggle-row .i { color: var(--orange-deep); }
.secure-line { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.secure-line .i { color: var(--ok); margin-top: 1px; }

.suggest { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13.5px; padding: 14px 16px; border-radius: 12px; background: var(--orange-tint); border: 1px solid color-mix(in srgb, var(--orange) 20%, transparent); margin-bottom: 20px; }
.suggest > span { flex: 1; min-width: 200px; }

/* review */
.issues { list-style: none; display: grid; gap: 8px; margin-bottom: 22px; }
.issues li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; padding: 11px 14px; border-radius: 11px; border: 1px solid transparent; }
.issues li .i { width: 17px; height: 17px; margin-top: 1px; }
.issues li > span { flex: 1; min-width: 0; }
.issues li.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.issues li.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.issues li button { flex-shrink: 0; background: none; border: none; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; padding: 0 2px; }
.rv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rv-card { border: 1px solid var(--line-soft); border-radius: 16px; background: var(--surface-2); padding: 16px 18px; min-width: 0; }
.rv-card.wide { grid-column: 1 / -1; }
.rv-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rv-h .i { color: var(--orange-deep); width: 17px; height: 17px; }
.rv-h h4 { font-size: 14.5px; font-weight: 650; flex: 1; }
.rv-edit { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .15s; }
.rv-edit:hover { color: var(--orange-deep); border-color: var(--orange); }
.rv-edit .i { width: 13px; height: 13px; }
.rv { display: grid; grid-template-columns: 1fr; }
.rv-card.wide .rv { grid-template-columns: 1fr 1fr; column-gap: 28px; }
.rv-card.wide .rv.one { grid-template-columns: 1fr; }
.rv > div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; min-width: 0; }
.rv > div:last-child { border-bottom: none; }
.rv-card.wide .rv > div:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.rv span { color: var(--ink-soft); flex-shrink: 0; }
.rv b { text-align: right; word-break: break-word; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.rv b.miss { color: var(--ink-faint); font-weight: 400; }
.rv .afm { color: var(--gold-ink); display: inline-flex; }
.rv .afm .i { width: 14px; height: 14px; }
.doc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.doc-list > div { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-soft); min-width: 0; }
.doc-list .i { width: 16px; height: 16px; }
.doc-list .ok, .doc-list .no { display: inline-flex; flex: none; }
.doc-list .ok { color: var(--ok-ink); }
.doc-list .no { color: var(--bad); }
.doc-list b { font-weight: 600; white-space: nowrap; }
.doc-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); font-size: 12.5px; margin-left: auto; min-width: 0; }
.confirm { margin-top: 22px; }

/* step actions — sticky bottom bar on phones */
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.form-actions .push { margin-left: auto; }

/* success */
.done-wrap { max-width: 560px; margin: 8px auto 0; text-align: center; }
.done-ic { width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok-ink); box-shadow: 0 0 0 10px color-mix(in srgb, var(--ok) 6%, transparent); animation: fe-rise .35s var(--ease) both; }
.done-ic .i { width: 34px; height: 34px; stroke-width: 2; }
.done-wrap h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 3.4vw, 36px); letter-spacing: -.02em; }
.done-wrap > p { color: var(--ink-soft); margin: 10px auto 0; max-width: 460px; font-size: 15px; line-height: 1.65; }
.done-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 26px 0; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; text-align: left; }
.done-facts > div { padding: 16px 18px; background: var(--surface-2); }
.done-facts > div + div { border-left: 1px solid var(--line-soft); }
.done-facts > div > span:first-child { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; }
.done-facts .idv { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Motion ──────────────────────────────────────────────── */
@keyframes fe-spin { to { transform: rotate(360deg); } }
@keyframes fe-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fe-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fe-step { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes fe-pop { from { opacity: 0; transform: scale(.97) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes fe-shimmer { to { background-position: -200% 0; } }
@keyframes fe-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .feature-grid, .doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-points { justify-content: center; }
  .preview { max-width: 460px; margin: 0 auto; width: 100%; }
  .dash { grid-template-columns: 1fr; }
  .dash-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .dash-side > * + * { margin-top: 0; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-top .brand { display: flex; }
  .trust-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --hdr-h: 60px; }
  .hdr-nav .nav-link.opt { display: none; }
  .brand img { height: 32px; }
  .user-btn .nm, .user-btn > .i { display: none; }
  .user-btn { padding: 0 3px; }
  .hide-sm { display: none !important; }
  .grid2 { grid-template-columns: 1fr; }
  .docgrid, .rv-grid, .doc-list, .need { grid-template-columns: 1fr; }
  .rv-card.wide .rv { grid-template-columns: 1fr; }
  .rv-card.wide .rv > div:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--line-soft); }
  .kv { grid-template-columns: 1fr 1fr; }
  .kv > div:nth-child(3n) { border-right: 1px solid var(--line-soft); }
  .kv > div:nth-child(2n) { border-right: none; }
  .kv > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line-soft); }
  .kv > div:nth-last-child(-n+2) { border-bottom: none; }
  .dash-side { grid-template-columns: 1fr; }
  /* tracker turns vertical */
  .track { grid-template-columns: 1fr; gap: 0; }
  .track li { flex-direction: row; align-items: center; text-align: left; gap: 14px; padding: 0 0 18px; }
  .track li:last-child { padding-bottom: 0; }
  .track li::before { top: 40px; bottom: 0; right: auto; left: 19px; width: 2px; height: auto; }
  .track li:first-child::before { display: block; }
  .track li:last-child::before { display: none; }
  .track li.done::before { background: var(--gold); }
  .track li.cur::before { background: var(--line); }
  .track .t-t { margin-top: 0; }
  /* stepper: compact dots, current label only */
  .ps { width: 38px; }
  .plbl { display: none; }
  .stepper { margin-bottom: 18px; }
  .step-label:not([hidden]) { display: block; }
  /* sticky action bar */
  .form-actions {
    position: sticky; bottom: 0; z-index: 30; margin: 16px calc(-1 * var(--gutter)) 0; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--cream) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line-soft);
  }
  .form-actions .btn { --h: 48px; }
  .form-actions .btn.secondary { padding: 0 14px; }
  .form-actions .push { flex: 1; }
  .form-actions .btn.text { display: none; }
  .done-facts { grid-template-columns: 1fr; }
  .done-facts > div + div { border-left: none; border-top: 1px solid var(--line-soft); }
  .done-actions .btn { width: 100%; }
  .start { grid-template-columns: 1fr; gap: 16px; }
  .welcome { margin-bottom: 20px; }
  .page { padding-top: 22px; }
}
@media (max-width: 600px) {
  .feature-grid, .doc-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .brand-tag { display: none; }
  .cta-band .btn { width: 100%; }
  .modal { padding: 22px; }
  .pv-float { left: 0; }
}
@media (max-width: 380px) {
  .hdr-right { gap: 6px; }
  .icon-btn { width: 38px; height: 38px; }
  .seg button { font-size: 12px; padding: 8px 6px; }
}
.step-label { display: none; text-align: center; font-size: 13px; color: var(--ink-soft); margin: -8px 0 18px; }
.step-label b { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .hdr, .ftr, .form-actions, .icon-btn { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
