:root {
  --ink: #2e2417;
  --ink-dim: #6f6250;
  --bg: #f6f0e2;
  --card: #fffdf8;
  --gold: #a86f14;
  --gold-soft: #c08a2d;
  --gold-pale: #f7ecd4;
  --line: #e7dcc4;
  --field: #ffffff;
  --ok: #2e7d46;
  --ok-bg: #e9f4ec;
  --err: #b3372c;
  --err-bg: #fbecea;
  --info-bg: #faf3e0;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Poppins", "Helvetica Neue", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #fdfaf2 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
.page { max-width: 1120px; margin: 0 auto; padding: 28px 26px 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; max-width: 700px; margin-left: auto; margin-right: auto; }
.logo { height: 44px; }
.topbar-tag {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 999px; background: #fffdf8;
}
/* Form steps stay narrow and centered. */
#app.card { max-width: 700px; margin-left: auto; margin-right: auto; }
.footer { max-width: 700px; margin-left: auto; margin-right: auto; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 30px;
  box-shadow: 0 18px 45px rgba(120, 90, 30, 0.10);
}
h1, h2 { font-family: "Lora", serif; font-weight: 600; margin: 0 0 10px; line-height: 1.25; color: var(--ink); }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
p { line-height: 1.65; color: var(--ink-dim); }
p.lead { color: var(--ink); font-size: 1.05rem; }
.eyebrow {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px; font-weight: 700;
}
.steps { display: flex; gap: 8px; margin: 18px 0 26px; }
.step-dot { flex: 1; height: 5px; border-radius: 99px; background: #e9dfc8; }
.step-dot.done { background: var(--gold); }
label { display: block; font-weight: 500; margin: 18px 0 7px; font-size: 0.95rem; color: var(--ink); }
label .req { color: var(--gold); }
.hint { font-size: 0.85rem; color: var(--ink-dim); margin: -2px 0 6px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="date"], select, textarea {
  width: 100%; padding: 13px 15px; font-size: 1rem; font-family: inherit;
  color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: var(--radius);
}
input::placeholder, textarea::placeholder { color: #a89a80; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--gold-soft); outline-offset: 1px; border-color: var(--gold);
}
textarea { min-height: 110px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } .card { padding: 26px 20px; } }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin-top: 6px; }
.section-head { font-family: "Poppins", sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 20px 0 4px; }
@media (max-width: 560px) { .check-grid { grid-template-columns: 1fr; } }
.check-grid h4 { grid-column: 1 / -1; margin: 14px 0 4px; font-size: 0.9rem; color: var(--gold); letter-spacing: 0.04em; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 0.95rem; color: var(--ink); }
.check:hover { background: var(--gold-pale); }
.check input { margin-top: 3px; accent-color: var(--gold); width: 17px; height: 17px; }
.check strong { display: block; color: var(--ink); font-weight: 600; }
.check small { display: block; color: var(--ink-dim); line-height: 1.5; font-size: 0.8rem; margin-top: 2px; }
.radio-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 15px;
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-top: 10px; cursor: pointer; background: var(--field); color: var(--ink);
}
.radio-card:hover { border-color: var(--gold); background: #fffdf6; }
.radio-card input { margin-top: 3px; accent-color: var(--gold); width: 18px; height: 18px; }
.radio-card strong { display: block; margin-bottom: 3px; color: var(--ink); }
.radio-card small { color: var(--ink-dim); line-height: 1.5; }
.btn {
  display: inline-block; width: 100%; padding: 15px; margin-top: 26px;
  font-size: 1.05rem; font-weight: 700; font-family: inherit;
  color: #fffdf8; background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border: none; border-radius: var(--radius); cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn-ghost {
  background: transparent; color: var(--ink-dim);
  border: 1px solid var(--line); margin-top: 12px; font-weight: 500;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--gold); filter: none; }
.nav-row { display: flex; gap: 12px; }
.nav-row .btn-ghost { flex: 1; }
.nav-row .btn { flex: 2; margin-top: 26px; }
.alert {
  padding: 13px 16px; border-radius: var(--radius); margin: 16px 0;
  font-size: 0.95rem; line-height: 1.55;
}
.alert.err { background: var(--err-bg); border: 1px solid rgba(179,55,44,0.4); color: #8c2b23; }
.alert.ok { background: var(--ok-bg); border: 1px solid rgba(46,125,70,0.35); color: #256b3c; }
.alert.info { background: var(--info-bg); border: 1px solid rgba(168,111,20,0.35); color: #7a5410; }
.consent-box {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; background: #fffefa; margin-top: 14px;
  font-size: 0.93rem; line-height: 1.65; color: var(--ink-dim);
}
.consent-box strong { color: var(--ink); }
.review { margin-top: 8px; }
.review dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin-top: 14px; font-weight: 700; }
.review dd { margin: 4px 0 0; color: var(--ink); }
.refnum {
  font-size: 1.6rem; font-weight: 700; color: var(--gold);
  letter-spacing: 0.06em; text-align: center; margin: 18px 0;
  padding: 18px; border: 1px dashed var(--gold); border-radius: var(--radius);
  background: var(--gold-pale);
}
.refnum-wrap { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px 0 4px; flex-wrap: wrap; }
.refnum-wrap .refnum { margin: 0; }
.btn-sm { width: auto; padding: 8px 14px; font-size: 0.85rem; margin-top: 0; }
.ref-actions { text-align: center; margin: 2px 0 12px; }
.pc-line { text-align: center; }
.timeline { margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-align: left; }
.t-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid var(--line); }
.t-step:first-child { border-top: 0; }
.t-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; }
.t-step.done .t-dot { background: #2e7d32; color: #fff; }
.t-step.now .t-dot { background: var(--gold); color: #fff; }
.t-step.next .t-dot { background: hsl(40 20% 90%); color: var(--ink-dim); }
.t-text strong { display: block; font-size: 0.95rem; }
.t-text small { color: var(--ink-dim); font-size: 0.85rem; }
.support-box { margin: 16px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; font-size: 0.92rem; line-height: 1.6; }
.support-box a { color: #8f5c0e; font-weight: 600; }
.support-box small { color: var(--ink-dim); }
.alert.crisis { display: flex; gap: 10px; align-items: flex-start; background: #fdf1f0; border: 1px solid #e5b3ad; color: #8a2f27; }
.alert.crisis a { color: #8a2f27; font-weight: 700; }
.crisis-icon { font-size: 1.1rem; line-height: 1.4; }
@media print {
  .topbar, .footer, #copyRef, #printRef, #home, .ref-actions { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
.linklike { background: none; border: none; color: var(--gold); cursor: pointer; font-size: 0.95rem; padding: 0; text-decoration: underline; font-family: inherit; font-weight: 600; }
.center { text-align: center; }
.footer { margin-top: 30px; text-align: center; font-size: 0.9rem; }
.footer a { color: var(--gold); }
.footer .muted { color: #a89a80; font-size: 0.82rem; margin-top: 8px; }
ul.ticks { list-style: none; padding: 0; margin: 18px 0; }
ul.ticks li { padding: 8px 0 8px 30px; position: relative; color: var(--ink); }
ul.ticks li::before { content: "✓"; position: absolute; left: 4px; color: var(--gold); font-weight: 700; }

/* ---- Welcome screen: full-viewport split, Partner Connect style ----
   Both panels span the full viewport height and width, so they always line up. */
body.welcome .page { max-width: none; padding: 0; }
body.welcome #app.card {
  max-width: none; margin: 0; background: transparent; border: none;
  box-shadow: none; padding: 0; border-radius: 0;
}
body.welcome .footer { display: none; }
.entry-aside .aside-crisis {
  position: relative; z-index: 1;
  align-self: flex-start; max-width: 100%;
  margin: 28px 0 0; padding: 20px 36px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.92rem; color: hsl(36 30% 85%);
}
.entry-aside .aside-crisis strong { color: #fff; }
.entry-aside .aside-crisis a { color: #fff; font-weight: 600; }
.entry-aside .aside-tag {
  position: relative; z-index: 1;
  margin: 14px 0 0;
  display: flex; align-items: center; gap: 12px;
  font-size: 0.82rem; color: hsl(36 30% 68%);
}
.entry-aside .aside-tag img { height: 51px; flex: none; }
.entry { display: flex; gap: 0; align-items: stretch; min-height: 100vh; }
.entry-main {
  flex: 1.1; min-width: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; justify-content: safe center;
  background: var(--bg); padding: 44px 48px;
}
.entry-logo { height: 54px; display: block; margin: 0 auto 16px; }
.entry-main .card { width: 100%; max-width: 680px; }
/* Compact welcome card: everything fits above the fold. */
.welcome-card { padding: 30px 34px; }
.welcome-card h1 { font-size: 1.7rem; margin: 0 0 8px; }
.welcome-card .subline { font-size: 0.98rem; margin: 0 0 4px; }
.welcome-card .elig-line { font-size: 1rem; font-weight: 600; color: var(--ink); margin: 10px 0 2px; }
.welcome-card .btn { padding: 13px; margin-top: 16px; font-size: 1rem; background: linear-gradient(180deg, #9a6410, #744a0b); box-shadow: 0 10px 26px rgba(116, 74, 11, 0.45); }
/* Ghost buttons keep their minimalist look inside the welcome card. */
.welcome-card .btn-ghost { background: transparent; color: var(--ink-dim); border: 1px solid var(--line); box-shadow: none; font-weight: 500; }
.welcome-card .btn-ghost:hover { color: var(--ink); border-color: var(--gold); }
.welcome-card .btn-pair { display: flex; gap: 10px; margin-top: 10px; }
.welcome-card .btn-pair .btn-ghost { flex: 1; margin-top: 0; }
.welcome-card .btn-ghost { padding: 11px; margin-top: 10px; font-size: 0.95rem; }
.welcome-card .phases { margin: 18px 0 4px; }
.welcome-card .phase { padding: 9px 14px; gap: 12px; }
.welcome-card .phase strong { font-size: 0.95rem; }
.welcome-card .phase span { font-size: 0.86rem; }
.welcome-card .phase-when { font-size: 0.72rem; padding: 4px 10px; }
.welcome-card .muted-line { font-size: 0.87rem; margin: 12px 0 2px; }
.welcome-card .alert { padding: 11px 15px; font-size: 0.87rem; margin: 12px 0 2px; }
.welcome-card .next-steps { margin: 14px 0 2px; }
.welcome-card .next-steps .next-title { font-size: 0.95rem; margin: 0 0 8px; }
.welcome-card .nstep { font-size: 0.88rem; margin-bottom: 7px; line-height: 1.45; }
.welcome-card .nnum { width: 24px; height: 24px; font-size: 0.78rem; }
.entry-aside {
  flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden; color: #fff;
  background:
    linear-gradient(180deg, rgba(24, 18, 12, 0.84) 0%, rgba(24, 18, 12, 0.70) 55%, rgba(24, 18, 12, 0.86) 100%),
    url('./assets/aside-bg.jpg') center / cover no-repeat, hsl(40 6% 9%);
  border-radius: 0; padding: 56px 52px;
}
.entry-aside::after {
  content: ""; position: absolute; bottom: -6rem; right: -6rem; width: 24rem; height: 24rem;
  border-radius: 9999px; background: radial-gradient(circle, hsl(38 53% 51% / 0.20), transparent 70%);
  pointer-events: none;
}
.entry-aside .eyebrow { color: hsl(38 53% 51%); position: relative; z-index: 1; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.entry-aside h2 { color: #fff; font-family: "Poppins", sans-serif; font-weight: 800; font-size: 2rem; position: relative; z-index: 1; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6); }
.entry-aside p { color: hsl(36 30% 78%); position: relative; z-index: 1; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6); }
.entry-aside .aside-foot {
  display: flex; align-items: center; gap: 12px; margin-top: 32px;
  color: hsl(36 30% 70%); font-size: 0.9rem; position: relative; z-index: 1;
}
.entry-aside .aside-foot img { height: 30px; }
@media (max-width: 900px) {
  .entry { flex-direction: column; min-height: 0; }
  .entry-main { padding: 40px 22px; }
  .entry-aside { padding: 40px 28px; }
  .entry-aside h2 { font-size: 1.6rem; }
}
.topbar-hidden { display: none !important; }

.qa { margin: 20px 0 6px; }
.qa p { margin: 0 0 16px; font-size: 0.97rem; }
.qa p strong { color: var(--ink); }

.phases { margin: 22px 0 6px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.phase { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: var(--field); }
.phase + .phase { border-top: 1px solid var(--line); }
.phase-when {
  flex: none; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  color: #fffdf8; background: var(--gold); border-radius: 999px; padding: 5px 12px; margin-top: 2px;
  white-space: nowrap;
}
.phase strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 2px; }
.phase span span { color: var(--ink-dim); font-size: 0.93rem; }
.phase div span { color: var(--ink-dim); font-size: 0.93rem; }
.muted-line { font-size: 0.95rem; margin: 16px 0 4px; }

.subline { font-size: 1.02rem; color: var(--ink); margin: -4px 0 6px; font-weight: 500; }

.next-steps { margin: 22px 0 6px; }
.next-steps .next-title { margin: 0 0 12px; font-size: 1rem; color: var(--ink); }
.nstep { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 11px; font-size: 0.95rem; color: var(--ink-dim); line-height: 1.55; }
.nstep strong { color: var(--ink); }
.nnum {
  flex: none; width: 27px; height: 27px; border-radius: 999px;
  background: var(--gold); color: #fffdf8;
  font-weight: 700; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}

.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 70px; box-sizing: border-box; }
.pw-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 0.85rem; }
.pw-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 8px 0 6px; }
.pw-strength { display: inline-flex; align-items: center; gap: 8px; min-height: 1.4em; }
.pw-bar { width: 90px; height: 6px; border-radius: 999px; background: hsl(40 22% 88%); overflow: hidden; display: inline-block; }
.pw-bar span { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 0.2s ease; }
.pw-bar span.weak { width: 33%; background: #b3372c; }
.pw-bar span.okay { width: 66%; background: var(--gold); }
.pw-bar span.strong { width: 100%; background: #2e7d46; }
.pw-label { font-size: 0.85rem; font-weight: 600; }
.pw-label.weak { color: #b3372c; }
.pw-label.okay { color: var(--gold-deep, #7a5410); }
.pw-label.strong { color: #2e7d46; }

.flabel { display: block; font-weight: 600; font-size: 0.92rem; margin: 14px 0 6px; color: var(--ink); }
#phoneTypeBlock .check { display: flex; }
