/* Styled to match finbroscapital.com (Outfit + Newsreader, cream/ink/blue/gold) */
:root {
  --cream: #f6f5f1; --paper: #ffffff; --sand: #ece9e1;
  --ink: #0c1b3a; --soft: #5b6475; --line: rgba(12, 27, 58, 0.12);
  --gold: #c4a017; --gold-2: #d4b12a; --blue: #0047c2; --blue-2: #0a3ea6;
  --mint: #d7e6f8; --error: #b42318;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Outfit, system-ui, sans-serif; background: var(--cream); color: var(--ink);
  font-size: clamp(1rem, 0.96rem + 0.22vw, 1.08rem); line-height: 1.6;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
.wrap { width: min(820px, calc(100% - 2.4rem)); margin: 0 auto; }
header { position: sticky; top: 0; z-index: 20; background: rgba(246,245,241,.9); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 1rem; width: min(1180px, calc(100% - 2.4rem)); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.logo-mark { height: 40px; width: auto; }
.logo-word { height: 46px; width: auto; }
.back-link { color: var(--soft); text-decoration: none; font-size: .92rem; font-weight: 500; }
.back-link:hover { color: var(--ink); }

.page-hero { padding: clamp(2.2rem, 1.6rem + 2.5vw, 3.6rem) 0 1.4rem; }
.eyebrow { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); font-weight: 600; margin-bottom: .8rem; }
h1 { font-size: clamp(2rem, 1.28rem + 2.2vw, 3.1rem); line-height: 1.04; letter-spacing: -.04em; font-weight: 800; max-width: 18ch; }
.lede { margin-top: 1rem; color: var(--soft); max-width: 38rem; }

.progress { height: 6px; background: var(--sand); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--gold)); border-radius: 99px; transition: width .4s ease; }
.step-label { font-size: .84rem; color: var(--soft); margin: .5rem 0 1rem; }

.card-form { background: var(--paper); border-radius: 28px; padding: clamp(1.3rem, .8rem + 2vw, 2.4rem); margin-bottom: 3rem; box-shadow: 0 1px 0 var(--line); }
h2.section { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); letter-spacing: -.02em; font-weight: 700; line-height: 1.25; margin: 2rem 0 1rem; padding-top: .2rem; }
.page > h2.section:first-child { margin-top: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.text { color: var(--soft); margin: .2rem 0 1.2rem; font-size: .97rem; }
.text strong { color: var(--ink); }
.normal { font-weight: 400; }

.field { border: 0; margin: 0 0 1.4rem; min-width: 0; }
.q { display: block; font-weight: 600; font-size: 1rem; margin-bottom: .5rem; color: var(--ink); line-height: 1.4; padding: 0; }
legend.q { float: left; width: 100%; }
legend.q + * { clear: both; }
.req { color: var(--error); margin-left: .2rem; }
.inp {
  width: 100%; border: 1px solid var(--line); background: var(--cream); border-radius: 14px;
  padding: .85rem .95rem; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.inp::placeholder { color: #8a909c; }
.inp:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,71,194,.14); background: #fff; }
textarea.inp { min-height: 110px; resize: vertical; }
input[type=date].inp { min-height: 3.1rem; }

.opts { display: grid; gap: .55rem; }
.opt {
  display: flex; align-items: center; gap: .75rem; cursor: pointer; padding: .7rem .9rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--cream); transition: border-color .15s, background .15s;
}
.opt:hover { border-color: rgba(0,71,194,.4); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.badge {
  flex: 0 0 auto; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 8px;
  font-size: .8rem; font-weight: 700; background: #fff; border: 1px solid var(--line); color: var(--soft);
}
.box { flex: 0 0 auto; width: 1.3rem; height: 1.3rem; border-radius: 6px; border: 1.5px solid #9aa1ad; background: #fff; display: grid; place-items: center; }
.opt-text { line-height: 1.4; }
.opt:has(input:checked) { border-color: var(--blue); background: #eef4ff; }
.opt:has(input:checked) .badge { background: var(--blue); border-color: var(--blue); color: #fff; }
.opt:has(input:checked) .box { background: var(--blue); border-color: var(--blue); }
.opt:has(input:checked) .box::after { content: "✓"; color: #fff; font-size: .85rem; font-weight: 700; }
.opt:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(0,71,194,.18); }

.sig { position: relative; border: 1px dashed #9aa1ad; border-radius: 14px; background: var(--cream); }
.sig canvas { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; border-radius: 14px; }
.sig-clear { position: absolute; top: .5rem; right: .5rem; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: .25rem .75rem; font: inherit; font-size: .8rem; cursor: pointer; }
.sig-hint { position: absolute; left: .9rem; bottom: .5rem; font-size: .78rem; color: #8a909c; pointer-events: none; }

.field.invalid .inp, .field.invalid .opt, .field.invalid .sig { border-color: var(--error); }
.err { color: var(--error); font-size: .85rem; margin-top: .35rem; min-height: 0; }
.err:empty { display: none; }

.nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.nav .btn:only-child { margin-left: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; border-radius: 999px; padding: .85rem 1.6rem; background: var(--blue); color: #fff;
  transition: transform .25s cubic-bezier(.22,1,.36,1), filter .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-gold { background: var(--gold); color: var(--ink); }
.form-status { margin-top: 1rem; color: var(--error); font-size: .92rem; }
.form-status:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.thanks { text-align: center; padding: 3rem 1.5rem; }
.thanks h2 { font-size: 2rem; letter-spacing: -.03em; margin: .8rem 0 .5rem; }
.thanks p { color: var(--soft); max-width: 30rem; margin: 0 auto 1.6rem; }
.check { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 2rem; }

footer { border-top: 1px solid var(--line); padding: 1.6rem 0 2.4rem; color: var(--soft); font-size: .88rem; }
.legal { margin-top: .6rem; font-size: .76rem; max-width: 46rem; }

@media (max-width: 600px) {
  .logo-word { height: 36px; } .logo-mark { height: 32px; }
  .card-form { border-radius: 20px; }
  .nav { flex-direction: column-reverse; } .nav .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* v2: phone country code, conditional fields, date inputs */
.phone-row { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: .5rem; }
select.inp.cc {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.2rem; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b6475' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center;
}
.field.invalid select.inp.cc { border-color: var(--line); }
.q-sub { font-weight: 500; font-size: .92rem; color: var(--soft); }
.opt-note { font-weight: 400; color: #8a909c; }
.opt-note[hidden], .req[hidden] { display: none; }
input.inp.date { max-width: 14rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .phone-row { grid-template-columns: 1fr; }
  input.inp.date { max-width: none; }
}

/* v3: hidden-until-chosen custom boxes */
.field.cond[hidden] { display: none; }
.field.cond { margin-top: -.4rem; padding-left: .9rem; border-left: 3px solid var(--mint); }
.field.cond-in { animation: condIn .22s ease-out; }
@keyframes condIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* v3: country picker (custom combobox on mouse/trackpad, native select on touch) */
.phone-row { grid-template-columns: auto minmax(0, 1fr); }
.cc-wrap { position: relative; min-width: 0; }
.cc-native { min-width: 0; max-width: 15rem; }
.cc-btn {
  display: inline-flex; align-items: center; gap: .45rem; height: 100%; min-width: 7.4rem; cursor: pointer;
  text-align: left; padding-right: 2.2rem; white-space: nowrap;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b6475' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center;
}
.cc-btn[aria-expanded="true"] { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,71,194,.14); background-color: #fff; }
.cc-btn:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,71,194,.14); }
.cc-flag { font-size: 1.15rem; line-height: 1; }
.cc-code { font-variant-numeric: tabular-nums; }
.cc-pop {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(22rem, 86vw);
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px rgba(12,27,58,.14); overflow: hidden;
  animation: condIn .14s ease-out;
}
.cc-hint { padding: .55rem .9rem; font-size: .78rem; color: #8a909c; border-bottom: 1px solid var(--line); background: var(--cream); min-height: 2.1rem; }
.cc-hint.typing { color: var(--blue); font-weight: 600; letter-spacing: .02em; }
.cc-list { list-style: none; max-height: 16.5rem; overflow-y: auto; padding: .3rem; overscroll-behavior: contain; }
.cc-list li { display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem; border-radius: 10px; cursor: pointer; font-size: .95rem; }
.cc-list li .cc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-list li .cc-dial { color: var(--soft); font-variant-numeric: tabular-nums; }
.cc-list li.active { background: #eef4ff; }
.cc-list li[aria-selected="true"] { font-weight: 600; }
.cc-list li[aria-selected="true"]::after { content: "✓"; color: var(--blue); margin-left: .2rem; }
@media (max-width: 600px) {
  .phone-row { grid-template-columns: 1fr; }
  .cc-native { max-width: none; }
  .cc-btn { width: 100%; }
}
.cc-btn[hidden], .cc-native[hidden], .cc-pop[hidden] { display: none !important; }

/* v4: calendar date picker */
.date-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.date-wrap { position: relative; width: 14rem; max-width: 100%; }
.date-wrap input.inp.date { max-width: none; width: 100%; padding-right: 3rem; }
.cal-btn {
  position: absolute; top: 50%; right: .35rem; transform: translateY(-50%); width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--soft); cursor: pointer;
}
.cal-btn:hover, .cal-btn[aria-expanded="true"] { background: #eef4ff; color: var(--blue); }
.cal-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.cal-native { display: none; }
.touch .cal-native {
  display: block; position: absolute; top: 50%; right: .35rem; transform: translateY(-50%); width: 2.4rem; height: 2.4rem;
  opacity: 0; cursor: pointer; border: 0; padding: 0; margin: 0;
}
.touch .cal-native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.today-btn {
  border: 1px solid var(--line); background: #fff; color: var(--blue); font: inherit; font-weight: 600; font-size: .9rem;
  border-radius: 999px; padding: .55rem 1rem; cursor: pointer; transition: background .15s;
}
.today-btn:hover { background: #eef4ff; }
.today-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.cal {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(20.5rem, calc(100vw - 2.6rem));
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: .75rem;
  box-shadow: 0 18px 40px rgba(12,27,58,.16); animation: condIn .14s ease-out;
}
.cal[hidden] { display: none; }
.cal-head { display: grid; grid-template-columns: 2.2rem 1fr auto 2.2rem; gap: .35rem; align-items: center; margin-bottom: .5rem; }
.cal-head select {
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink); border: 1px solid var(--line); background: var(--cream);
  border-radius: 10px; padding: .4rem .5rem; min-width: 0; cursor: pointer;
}
.cal-head select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.cal-nav { width: 2.2rem; height: 2.2rem; border: 0; border-radius: 10px; background: transparent; font-size: 1.4rem; line-height: 1; color: var(--ink); cursor: pointer; }
.cal-nav:hover:not(:disabled) { background: #eef4ff; color: var(--blue); }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-nav:focus-visible { outline: 2px solid var(--blue); }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-grid th { font-size: .72rem; font-weight: 600; color: #8a909c; text-transform: uppercase; letter-spacing: .04em; padding: .25rem 0 .35rem; }
.cal-grid td { padding: 1px; text-align: center; }
.cal-day {
  width: 100%; aspect-ratio: 1; max-height: 2.5rem; border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums;
}
.cal-day:hover:not(:disabled) { background: #eef4ff; }
.cal-day:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--gold); font-weight: 700; }
.cal-day.is-selected { background: var(--blue); color: #fff; font-weight: 700; }
.cal-day:disabled { color: #c3c7cf; cursor: default; }
.cal-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.cal-foot button { font: inherit; font-size: .85rem; font-weight: 600; border: 0; background: transparent; color: var(--blue); padding: .35rem .6rem; border-radius: 8px; cursor: pointer; }
.cal-foot button:hover { background: #eef4ff; }
.cal-foot button[hidden] { display: none; }
.cal-foot .cal-close { color: var(--soft); margin-left: auto; }
.cal-hint { font-size: .72rem; color: #8a909c; }
@media (max-width: 600px) {
  .date-wrap { width: 100%; flex: 1 1 12rem; }
  .cal-hint { display: none; }
}
