/* Star Advantage Funding: "Atelier" design system (warm stone, EB Garamond headlines, Instrument Sans text).
   Fonts are self-hosted from /assets/fonts (SIL Open Font License); no third-party requests. */
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/fonts/eb-garamond.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400 600; font-display: swap; src: url("/assets/fonts/eb-garamond-italic.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/instrument-sans.woff2") format("woff2"); }

:root {
  --paper: #f7f4ee;
  --stone: #ebe5db;
  --stone-2: #ddd4c6;
  --sand: #cfc6b8;
  --ink: #2b2a27;
  --ink-2: #45413a;
  --muted: #6b665c;
  --faint: #8f897e;
  --line: #ddd5c9;
  --card: #fffdf9;
  --accent: #7a6a4f;
  --accent-ink: #5c4f39;
  --accent-soft: #efe8dc;
  --up: #3d6b4f;
  --down: #9a4034;
  --warn: #8a6a1f;
  --focus: #2f5d8a;
  /* Result panels and highlight bands (option A, sage). Swap these four to try another option. */
  --out-bg: #e6ece3;
  --out-line: #cfd9cb;
  --out-accent: #4c6b52;
  --good: #2f6b45; --good-soft: #dcebdf; --bad: #a3392c; --bad-soft: #f6e0dc;
  /* legacy names used by scripts and older markup */
  --navy: var(--ink); --navy-3: var(--ink-2); --gold: var(--accent); --gold-soft: var(--accent-soft); --slate: var(--muted); --mist: var(--faint); --cloud: var(--stone); --charcoal: var(--ink-2);
  --serif: "EB Garamond", Garamond, "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 3px;
  --shadow: 0 1px 2px rgba(43, 42, 39, .05), 0 10px 30px rgba(43, 42, 39, .07);
  --wrap: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-color: var(--sand); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); text-decoration-color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--ink); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.15rem; }
h1 em, h2 em { font-style: italic; color: var(--accent-ink); }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.eyebrow { font: 600 .74rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 .9rem; }
.lead { font-size: 1.18rem; line-height: 1.6; color: var(--ink-2); max-width: 40rem; }
.rule { width: 40px; height: 1px; background: var(--accent); border: 0; margin: 1.25rem 0; }
.pill { display: inline-block; font-size: .75rem; padding: .12rem .55rem; border-radius: 99px; background: var(--stone); color: var(--muted); border: 1px solid var(--line); font-weight: 500; white-space: nowrap; }
.pill.gold { background: var(--accent-soft); color: var(--accent-ink); border-color: #e2d6c2; }
.pill.ok { background: #e6efe8; color: var(--up); border-color: #cfe0d4; }
.pill.bad { background: #f5e6e2; color: var(--down); border-color: #ebd0ca; }
.pill.warn { background: #f6eedb; color: var(--warn); border-color: #ead9b2; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .85rem 1.4rem; border-radius: var(--radius); border: 1px solid transparent;
  font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn-gold, .btn-navy { background: var(--ink); color: var(--paper); }
.btn-gold:hover, .btn-navy:hover { background: var(--accent-ink); color: #fff; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--paper); border-color: rgba(247, 244, 238, .5); }
.btn-ghost:hover { background: rgba(247, 244, 238, .1); color: #fff; }
.btn-sm { padding: .5rem .85rem; font-size: .86rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.text-link { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--sand); padding-bottom: 1px; }
.text-link:hover { border-color: var(--accent); }

/* ---------- icons ---------- */
.ico { width: 28px; height: 28px; color: var(--accent); flex-shrink: 0; }
.ico-lg { width: 36px; height: 36px; }

/* ---------- rates line (top of every page) ---------- */
.ticker { background: var(--ink); color: #d9d2c5; font: 500 .8rem/1 var(--sans); }
.ticker .wrap { display: flex; align-items: center; gap: 1rem; min-height: 34px; }
.ticker-label { color: var(--sand); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .66rem; white-space: nowrap; }
.ticker-track { display: flex; gap: 1.75rem; overflow-x: auto; scrollbar-width: none; flex: 1; padding: .55rem 0; }
.ticker-track::-webkit-scrollbar { display: none; }
.tick { display: inline-flex; gap: .45rem; align-items: baseline; white-space: nowrap; color: inherit; text-decoration: none; }
.tick:hover { color: #fff; }
.tick b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.tick .chg { font-variant-numeric: tabular-nums; font-size: .74rem; }
.chg.up { color: #9fcfae; } .chg.down { color: #e7a095; } .chg.flat { color: var(--faint); }
.tick .stale { color: #e5c27a; }
.ticker-note { color: var(--faint); font-size: .7rem; white-space: nowrap; }
.ticker-loading { color: var(--faint); }

/* ---------- header and navigation ---------- */
.site-header { background: var(--paper); color: var(--ink); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font: 500 1.35rem/1.05 var(--serif); letter-spacing: .005em; }
.brand-text span { font: 600 .58rem/1.6 var(--sans); letter-spacing: .34em; color: var(--accent); }
.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav > ul { display: flex; list-style: none; margin: 0; padding: 0; gap: .15rem; }
.nav li { position: relative; }
.nav a, .nav button.nav-top { white-space: nowrap; display: block; color: var(--ink-2); text-decoration: none; font: 500 .93rem/1 var(--sans); padding: .75rem .6rem; background: none; border: 0; cursor: pointer; border-radius: var(--radius); }
.nav a:hover, .nav button.nav-top:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--stone); }
.nav button.nav-top::after { content: ""; display: inline-block; margin-left: .4rem; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.subnav { display: none; position: absolute; top: 100%; left: 0; min-width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .4rem; list-style: none; margin: 0; }
.nav li.open > .subnav, .nav li:focus-within > .subnav { display: block; }
@media (hover: hover) { .nav li:hover > .subnav { display: block; } }
.subnav a { color: var(--ink); padding: .65rem .75rem; font-size: .93rem; }
.subnav a:hover { background: var(--stone); color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: .75rem; margin-left: .75rem; flex-shrink: 0; }
.nav .nav-actions .btn { background: var(--ink); color: var(--paper); padding: .65rem 1.05rem; font: 600 .9rem/1 var(--sans); }
.nav .nav-actions .btn:hover { background: var(--accent-ink); color: #fff; }
.nav-login { color: var(--ink-2); font-size: .93rem; font-weight: 500; text-decoration: none; white-space: nowrap; display: inline-flex; gap: .35rem; align-items: center; }
.nav-login:hover { color: var(--ink); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--ink); color: var(--ink); border-radius: var(--radius); padding: .5rem .8rem; font: 600 .88rem var(--sans); cursor: pointer; }
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: .5rem 24px 1.5rem; max-height: calc(100vh - 110px); overflow-y: auto; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav > ul { flex-direction: column; }
  .nav a, .nav button.nav-top { padding: .9rem .5rem; font-size: 1.05rem; width: 100%; text-align: left; }
  .subnav { position: static; box-shadow: none; background: transparent; border: 0; padding: 0 0 0 .9rem; }
  .nav li.open > .subnav { display: block; }
  @media (hover: hover) { .nav li:hover > .subnav { display: none; } .nav li.open > .subnav { display: block; } }
  .nav-actions { margin: .9rem 0 0; flex-direction: column; align-items: stretch; }
  .nav-login { padding: .6rem .5rem; }
}

/* ---------- home hero ---------- */
.hero { background: var(--stone); position: relative; overflow: hidden; }
.hero .wrap { padding-top: clamp(3.5rem, 9vw, 7rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 3.5rem; align-items: end; }
.hero h1 { max-width: 13em; margin-bottom: .45em; }
.hero .lead { margin-bottom: 1.6rem; }
.hero-note { color: var(--muted); margin: .9rem 0 0; font-size: .9rem; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.hero-points li { display: flex; gap: .75rem; align-items: center; font-size: 1rem; color: var(--ink-2); }
.hero-points .ico { width: 24px; height: 24px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }
.page-hero { background: var(--stone); border-bottom: 1px solid var(--line); }
.page-hero .wrap { padding-top: clamp(2.75rem, 6vw, 4.25rem); padding-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); max-width: 18em; }
.page-hero .lead { margin-bottom: 0; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* ---------- sections and grids ---------- */
.section { padding: clamp(3.25rem, 7.5vw, 6rem) 0; }
.section.alt { background: var(--stone); }
.section.dark { background: var(--out-bg); color: var(--ink-2); border-top: 1px solid var(--out-line); border-bottom: 1px solid var(--out-line); }
.section.dark h2, .section.dark h3 { color: var(--ink); }
.section.dark .eyebrow { color: var(--out-accent); }
.section.tight { padding: clamp(2.25rem, 5vw, 3.5rem) 0; }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.grid { display: grid; gap: 1.25rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; position: relative; }
.card h3 { margin-bottom: .35rem; font-size: 1.35rem; }
.card p { color: var(--ink-2); }
.card p:last-child { margin-bottom: 0; }
a.card { display: block; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
a.card .more { display: inline-block; margin-top: .8rem; font-weight: 600; font-size: .9rem; color: var(--ink); }
a.card:hover .more { color: var(--accent-ink); }
.card .num { font: 600 .8rem/1 var(--sans); color: var(--accent); letter-spacing: .1em; display: block; margin-bottom: 1rem; }
.card .ico { margin-bottom: .9rem; }
.cap-card { border-top: 2px solid var(--accent); }
.icon { width: 36px; height: 36px; color: var(--accent); margin-bottom: 1rem; }
.list { padding-left: 1.15rem; margin: 0 0 1em; }
.list li { margin-bottom: .35rem; }
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding-left: 1.6rem; margin-bottom: .55rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: .5em; width: .7rem; height: .38rem; border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg); }
.cols-2 { columns: 2; column-gap: 2.5rem; }
@media (max-width: 640px) { .cols-2 { columns: 1; } }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: 1.1rem; color: var(--ink-2); }
.steps li::before { content: counter(step); display: block; font: italic 500 2.2rem/1 var(--serif); color: var(--accent); margin-bottom: .6rem; }
.steps b { display: block; font: 500 1.35rem/1.2 var(--serif); color: var(--ink); margin-bottom: .35rem; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
.callout { background: var(--accent-soft); border-left: 2px solid var(--accent); padding: 1.1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }
.callout p:last-child { margin: 0; }
.notice { font-size: .84rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2rem; }
.prose { max-width: 42rem; }
.prose h2 { margin-top: 2.25rem; font-size: 1.9rem; }
.prose h3 { margin-top: 1.75rem; }
.toc { position: sticky; top: 100px; border-left: 1px solid var(--line); padding-left: 1rem; font-size: .92rem; }
.toc a { display: block; text-decoration: none; color: var(--muted); padding: .3rem 0; }
.toc a:hover { color: var(--ink); }
.diff-table, .data-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.diff-table th, .diff-table td, .data-table th, .data-table td { text-align: left; padding: .75rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.diff-table th, .data-table th { font: 600 .74rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--stone); }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.table-scroll table { min-width: 560px; }

/* ---------- home: goal tiles, why list, rates, lender band ---------- */
.goal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.goal { display: flex; align-items: center; gap: 1rem; padding: 1.5rem 1.4rem; background: var(--card); text-decoration: none; color: var(--ink); transition: background .15s; }
.goal:hover { background: var(--accent-soft); color: var(--ink); }
.goal b { display: block; font: 500 1.3rem/1.15 var(--serif); }
.goal span { display: block; font-size: .88rem; color: var(--muted); margin-top: .15rem; }
.goal .arrow { margin-left: auto; color: var(--faint); transition: transform .15s, color .15s; }
.goal:hover .arrow { transform: translateX(3px); color: var(--accent-ink); }
@media (max-width: 860px) { .goal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .goal-grid { grid-template-columns: minmax(0, 1fr); } .goal { padding: 1.15rem 1rem; } }
.why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
.why > div { display: flex; gap: 1rem; align-items: flex-start; }
.why h3 { font-size: 1.3rem; margin-bottom: .25rem; }
.why p { margin: 0; color: var(--ink-2); font-size: .98rem; }
@media (max-width: 760px) { .why { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
.big-quote { font: italic 400 clamp(1.6rem, 3vw, 2.2rem)/1.3 var(--serif); color: var(--ink); max-width: 30em; margin: 0; }
.rate-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.rate-row > a { padding: 1.25rem 1.25rem 1.25rem 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.rate-row > a + a { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.rate-row span { display: block; font-size: .82rem; color: var(--muted); font-weight: 500; }
.rate-row b { display: block; font: 500 2.4rem/1.1 var(--serif); font-variant-numeric: tabular-nums; margin: .25rem 0; }
.rate-row small { display: block; color: var(--faint); font-size: .76rem; }
@media (max-width: 760px) { .rate-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rate-row > a:nth-child(3) { padding-left: 0; border-left: 0; } }
.band-lender { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 1.75rem 2rem; }
.band-lender > div { display: flex; gap: 1.1rem; align-items: center; }
.band-lender h3 { margin: 0 0 .2rem; }
.band-lender p { margin: 0; color: var(--muted); }
.bio { display: grid; grid-template-columns: 1fr; gap: .25rem; }
.bio p { color: var(--ink-2); }

/* ---------- property types (simple list) ---------- */
.type-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.type-item { display: flex; gap: 1.1rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.type-item h3 { font-size: 1.4rem; margin-bottom: .2rem; }
.type-item p { margin: 0 0 .4rem; color: var(--ink-2); }
.type-item .fits { font-size: .88rem; color: var(--muted); }
@media (max-width: 760px) { .type-list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- capability band (kept for older pages) ---------- */
.band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--out-line); }
.band > div { padding: 1.5rem 1.5rem 1.5rem 0; }
.band b { display: block; font: 500 1.3rem/1.25 var(--serif); color: var(--ink); margin-bottom: .4rem; }
.band p { font-size: .94rem; color: var(--ink-2); margin: 0; }
@media (max-width: 900px) { .band { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .band { grid-template-columns: minmax(0, 1fr); } }

/* ---------- market dashboard ---------- */
.rates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.rate-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.25rem; background: var(--card); display: flex; flex-direction: column; gap: .35rem; }
.rate-card.featured { border-top: 2px solid var(--accent); }
.rate-card .label { font: 600 .74rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rate-card .value { font: 500 2.2rem/1.05 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.rate-card .meta { font-size: .8rem; color: var(--muted); }
.rate-card .about { font-size: .9rem; color: var(--ink-2); margin-top: .35rem; }
.rate-card a { font-size: .8rem; }
.rate-card.unavailable .value { color: var(--faint); font-size: 1.1rem; }
.chart-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: var(--card); }
.chart-box h3 { font-size: 1.2rem; margin-bottom: .25rem; }
.chart { width: 100%; height: 260px; display: block; }
.chart text { font: 11px var(--sans); fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .82rem; color: var(--muted); margin-top: .5rem; }
.legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: .35rem; }
.legend i.lg0 { background: #2b2a27; } .legend i.lg1 { background: #a8875a; } .legend i.lg2 { background: #5f7f8c; } .legend i.lg3 { background: #7f8a5e; }
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.summary-strip > a { padding: 1rem 1.1rem; border-right: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.summary-strip > a:last-child { border-right: 0; }
.summary-strip span { display: block; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.summary-strip b { font: 500 1.6rem/1.3 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.summary-strip small { display: block; color: var(--muted); font-size: .76rem; }
@media (max-width: 900px) { .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .summary-strip > a { border-bottom: 1px solid var(--line); } }
.sba-table td:last-child, .sba-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- forms ---------- */
.form { display: grid; gap: 1.15rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; align-items: end; }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-row:has(textarea) { align-items: start; }
@media (max-width: 640px) { .form-row, .form-row.three { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 400px) and (max-width: 640px) { .calc .form-row, .calc .form-row.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
label, .label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink-2); margin-bottom: .4rem; text-wrap: balance; }
.req::after { content: " *"; color: var(--down); }
.hint { font-size: .82rem; color: var(--muted); font-weight: 400; margin-top: .3rem; }
input:not([type]), input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=url], select, textarea {
  width: 100%; padding: .75rem .85rem; border: 1px solid var(--sand); border-radius: var(--radius); font: inherit; font-size: 1rem; background: var(--card); color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 2px solid rgba(47, 93, 138, .2); outline-offset: 0; }
textarea { min-height: 120px; resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin: 0; background: var(--card); }
legend { font: 500 1.15rem var(--serif); color: var(--ink); padding: 0 .4rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .93rem; }
.check input { margin-top: .3rem; width: 1.05rem; height: 1.05rem; flex-shrink: 0; accent-color: var(--ink); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--sand); border-radius: var(--radius); padding: .8rem .9rem; font-weight: 500; font-size: .95rem; background: var(--card); cursor: pointer; }
.choice span .ico { width: 22px; height: 22px; }
.choice input:checked + span { border-color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--ink); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { padding: .9rem 1rem; border-radius: var(--radius); font-size: .95rem; display: none; }
.form-msg.show { display: block; }
.form-msg.ok { background: #e6efe8; color: #2f5a40; border: 1px solid #cfe0d4; }
.form-msg.err { background: #f5e6e2; color: #7e3328; border: 1px solid #ebd0ca; }
.seg { display: inline-flex; border: 1px solid var(--sand); border-radius: var(--radius); overflow: hidden; flex-wrap: wrap; }
.seg button { background: var(--card); border: 0; border-right: 1px solid var(--sand); padding: .6rem 1rem; font: 600 .9rem var(--sans); color: var(--ink-2); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
details.more-fields { border-top: 1px solid var(--line); padding-top: .75rem; }
details.more-fields > summary { font-weight: 600; color: var(--ink); }
details.more-fields[open] > summary { margin-bottom: 1rem; }

/* ---------- calculators ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 1040px) { .calc { grid-template-columns: minmax(0, 1fr); } .calc-out { position: static; } }
.calc-out { position: sticky; top: 100px; background: var(--out-bg); color: var(--ink-2); border: 1px solid var(--out-line); border-radius: var(--radius); padding: 1.6rem; }
.calc-out h3 { color: var(--ink); }
.calc-out .eyebrow { color: var(--out-accent); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0 1.25rem; }
.kpi { background: var(--card); border: 1px solid var(--out-line); border-radius: var(--radius); padding: .85rem 1rem; }
.kpi span { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi b { font: 500 1.6rem/1.25 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi b.pos, .pos { color: var(--good); } .kpi b.neg, .neg { color: var(--bad); }
.calc-out table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.calc-out td { padding: .45rem 0; border-bottom: 1px solid var(--out-line); }
.calc-out td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.calc-out .notice { color: var(--muted); border-color: var(--out-line); }
.calc-out a { color: var(--ink); } .calc-out .kpi .small { color: var(--muted); margin-top: .25rem; }
.verdict { display: inline-block; margin: 0 0 .6rem; padding: .35rem .75rem; border-radius: 99px; font-weight: 600; font-size: .9rem; }
.verdict:empty { display: none; }
.verdict.good { background: var(--good-soft); color: var(--good); }
.verdict.bad { background: var(--bad-soft); color: var(--bad); }
.verdict.warn { background: #f6eedb; color: var(--warn); }
.compare td .pos, .compare td .neg { font-weight: 600; }
.compare { width: 100%; border-collapse: collapse; font-size: .92rem; margin-top: 1.25rem; }
.compare th, .compare td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare thead th { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--stone); }
.compare tr.active td { background: var(--accent-soft); font-weight: 600; }

/* ---------- track record ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.filters select { width: auto; min-width: 180px; }
.tx-card .tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.tx-card dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; font-size: .9rem; margin: .75rem 0 0; }
.tx-card dt { color: var(--muted); }
.tx-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.empty { border: 1px dashed var(--sand); border-radius: var(--radius); padding: 2.5rem; text-align: center; color: var(--muted); background: var(--card); }

/* ---------- CTA and footer ---------- */
.cta-band { background: var(--out-bg); color: var(--ink-2); border-top: 1px solid var(--out-line); }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-top: 3.5rem; padding-bottom: 3.5rem; flex-wrap: wrap; }
.cta-band h2 { color: var(--ink); margin: 0 0 .35rem; }
.cta-band p { margin: 0; }

.site-footer { background: #22211e; color: #a9a294; font-size: .92rem; }
.site-footer .wrap { padding-top: 3.5rem; padding-bottom: 2rem; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }
.site-footer .brand { color: var(--paper); }
.site-footer .brand-text span { color: var(--sand); }
.site-footer h4 { color: var(--paper); font: 600 .74rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: #d6cfc2; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.foot-legal { border-top: 1px solid #3a3833; margin-top: 2.5rem; padding-top: 1.5rem; font-size: .8rem; line-height: 1.6; color: #8f897e; }
.foot-legal p { margin-bottom: .6rem; }

/* ---------- app screens (portal, admin) ---------- */
.app { min-height: 70vh; background: var(--paper); }
.app .wrap { padding-top: 2rem; padding-bottom: 3.5rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; margin-bottom: 1.5rem; }
.panel h2 { font-size: 1.7rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel h3 { margin-top: 1.25rem; } .panel-head h3 { margin-top: 0; }
.auth-box { max-width: 460px; margin: 3rem auto; }
.code-input { font: 600 1.6rem/1 var(--mono) !important; letter-spacing: .4em; text-align: center; }
.dropzone { border: 1.5px dashed var(--sand); border-radius: var(--radius); padding: 2rem; text-align: center; background: var(--paper); color: var(--muted); }
.dropzone.drag { border-color: var(--ink); background: var(--accent-soft); }
.dropzone.big { padding: clamp(2rem, 6vw, 3.5rem) 1.5rem; }
.dropzone.big .ico { width: 44px; height: 44px; margin: 0 auto .75rem; display: block; }
.dropzone.big h3 { margin-bottom: .35rem; }
.file-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.file-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .4rem; font-size: .92rem; background: var(--card); flex-wrap: wrap; align-items: center; }
.file-list li .what { color: var(--muted); font-size: .86rem; }
.file-list li.not-needed { background: #f8f1ea; }
.check-group { margin-bottom: 1.25rem; }
.check-group h4 { font: 600 .78rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.check-item { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: center; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .4rem; background: var(--card); }
.check-item .lbl { font-size: .94rem; }
.check-item .lbl small { display: block; color: var(--muted); }
.check-item.done { border-color: #cfe0d4; background: #f3f7f3; }
.next-card { border: 1px solid var(--ink); border-radius: var(--radius); padding: 1.5rem; background: var(--card); }
.next-card .step-of { font-size: .82rem; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.next-card h3 { font-size: 1.6rem; margin: .35rem 0 .35rem; }
.next-card .who { color: var(--accent-ink); font-size: .9rem; margin-bottom: .5rem; }
.next-card .help { color: var(--ink-2); font-size: .95rem; }
.all-done { text-align: center; padding: 2rem 1rem; }
.all-done h3 { font-size: 1.8rem; }
.progress { height: 6px; background: var(--stone-2); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ink); }
.tabs { display: flex; flex-wrap: wrap; gap: 0 .1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
@media (max-width: 760px) { .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; } }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: .8rem .85rem; font: 600 .92rem var(--sans); color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.agreement-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); max-height: 420px; overflow-y: auto; padding: 1.25rem 1.4rem; font-size: .92rem; }
.agreement-box h4 { font: 600 .95rem var(--sans); color: var(--ink); margin: 1rem 0 .3rem; }
.uses-total { display: flex; justify-content: space-between; font-weight: 600; padding: .75rem 0; border-top: 1px solid var(--ink); margin-top: .5rem; }
.owner-row { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: .75rem; background: var(--paper); }
#owners + .btn, #affiliates + .btn { margin-bottom: .5rem; }
.badge-count { background: var(--ink); color: var(--paper); border-radius: 99px; font-size: .72rem; padding: .05rem .45rem; margin-left: .35rem; }
.mono { font-family: var(--mono); font-size: .85em; }
.hidden { display: none !important; }
.pad { padding: 1rem; }
details summary { cursor: pointer; margin: .75rem 0; }
.h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); }
.kpi-n { display: block; font: 500 2.2rem/1.1 var(--serif); color: var(--ink); }
details.faq { border-bottom: 1px solid var(--line); padding: .25rem 0; }
details.faq summary { font: 500 1.25rem/1.3 var(--serif); color: var(--ink); padding: .8rem 2rem .8rem 0; cursor: pointer; list-style: none; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .6rem; color: var(--accent); font: 400 1.5rem/1 var(--sans); }
details.faq[open] summary::after { content: "\2212"; }
details.faq p { margin: 0 0 1rem; color: var(--ink-2); }
.stage-track { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .4rem; margin: .75rem 0 1rem; }
.stage-track div { font-size: .8rem; padding: .55rem .5rem; border-top: 3px solid var(--stone-2); color: var(--muted); }
.stage-track div.done { border-top-color: var(--up); color: var(--ink); }
.stage-track div.now { border-top-color: var(--ink); color: var(--ink); font-weight: 600; }
.stage-track div.lost { border-top-color: var(--down); }
.auth-alt { display: grid; gap: .6rem; margin-top: 1rem; } .auth-alt .btn { width: 100%; }
.or { text-align: center; color: var(--faint); font-size: .82rem; margin: .5rem 0; }
.pfs-sec { margin: 1.25rem 0; } .pfs-sec h4 { font: 600 .85rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.pfs-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; margin-bottom: .5rem; align-items: end; }
.pfs-total { display: flex; justify-content: space-between; font-weight: 600; border-top: 1px solid var(--ink); padding-top: .5rem; }
.tip { position: relative; display: inline-block; margin-left: .15rem; vertical-align: middle; }
.tip-i { display: inline-flex; width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font: 700 .7rem/1 var(--sans); align-items: center; justify-content: center; cursor: help; }
.tip-box { display: none; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 260px; max-width: 80vw; background: var(--ink); color: var(--paper); font: 400 .82rem/1.5 var(--sans); padding: .6rem .75rem; border-radius: var(--radius); box-shadow: var(--shadow); z-index: 20; text-transform: none; letter-spacing: 0; }
.tip:hover .tip-box, .tip:focus .tip-box, .tip:focus-within .tip-box { display: block; }
.tip:focus { outline: none; } .tip:focus .tip-i { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 640px) { .tip-box { left: auto; right: -8px; transform: none; } .ticker-note { display: none; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .ticker, .site-header, .site-footer, .cta-band, .nav-toggle { display: none !important; } body { font-size: 12pt; background: #fff; } }

/* ---------- portal: deal switcher, on-file items, printable checklist ---------- */
.deal-switch { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin: 0 0 1.25rem; }
.deal-switch label { margin: 0; }
.deal-switch select { width: auto; min-width: 260px; max-width: 100%; }
.check-item .lbl small.onfile, small.onfile { color: var(--good); font-weight: 600; }
details.other-doc { margin: .25rem 0 1rem; }
#print-area { display: none; }
@media print {
  body.print-checklist > *:not(#print-area) { display: none !important; }
  body.print-checklist #print-area { display: block; font: 11pt/1.45 var(--sans); color: #000; }
  #print-area h1 { font-size: 18pt; margin-bottom: .3rem; } #print-area h2 { font-size: 12.5pt; margin: 1rem 0 .3rem; }
  #print-area ol { padding-left: 1.6rem; margin: 0; } #print-area li { margin: .35rem 0; }
  #print-area .box { display: inline-block; width: 11px; height: 11px; border: 1.5px solid #000; margin-right: 8px; vertical-align: -1px; }
  #print-area .box.ticked { background: #000; }
}
.tx-photo { width: calc(100% + 3.2rem); max-width: none; margin: -1.6rem -1.6rem 1rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; display: block; }

/* ---------- admin: toolbars, paging, collapsible clients and deals ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .5rem 0 1rem; }
.toolbar input[type=search] { width: auto; flex: 1 1 260px; max-width: 420px; }
.pager { display: flex; gap: .75rem; align-items: center; justify-content: center; margin: 1rem 0; }
details.client-card > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; margin: 0; }
details.client-card > summary::-webkit-details-marker { display: none; }
details.client-card > summary::before { content: "+"; font: 400 1.3rem/1 var(--sans); color: var(--accent); width: 1rem; }
details.client-card[open] > summary::before { content: "\2212"; }
.client-line { flex: 1; }
details.client-card[open] > summary { margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
details.owner-row > summary { cursor: pointer; margin: 0; }
details.owner-row[open] > summary { margin-bottom: .75rem; }
details.inline-details { display: inline-block; }
details.inline-details[open] { display: block; width: 100%; margin-top: .75rem; }
.pkg-panel { border-left: 2px solid var(--out-line); padding-left: .9rem; margin: .75rem 0; }
.form-inline { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.form-inline input { width: auto; flex: 1 1 220px; }
.detail-list { display: grid; gap: .1rem; margin-top: .3rem; color: var(--ink-2); }
td.actions { white-space: nowrap; }

/* ---------- compare guide: green shortlist and ranked table ---------- */
.fit-card { background: var(--card); border: 1px solid var(--out-line); border-left: 4px solid var(--good); border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: .75rem; }
.fit-card.best { background: var(--good-soft); border-color: #b9d6c2; border-left-color: var(--good); }
.fit-card span { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--good); font-weight: 600; }
.fit-card b { display: block; font: 500 1.45rem/1.25 var(--serif); }
.fit-card b a { color: var(--ink); text-decoration-color: var(--good); }
.fit-card .small { color: var(--ink-2); margin-top: .2rem; }
#cmp-table tr.active td { background: var(--good-soft); }
.rank { display: inline-flex; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--stone-2); color: var(--ink); font: 600 .78rem/1 var(--sans); align-items: center; justify-content: center; margin-right: .25rem; }

/* ---------- document checklist page: collapsible groups ---------- */
details.check-group { border-top: 1px solid var(--line); padding: .4rem 0; }
details.check-group > summary { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; padding: .5rem 0; }
details.check-group > summary::-webkit-details-marker { display: none; }
details.check-group > summary h4 { margin: 0; }
details.check-group > summary h4::before { content: '+'; display: inline-block; width: 1.1rem; color: var(--accent); }
details.check-group[open] > summary h4::before { content: '–'; }

/* ---------- form rhythm: every form on the site, portal and admin ---------- */
/* One height for every single-line box, so text boxes, dropdowns and date pickers line up exactly. */
input:not([type]), input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=url], input[type=search], select { height: 3rem; line-height: 1.3; }
/* Fields in a row line up by their tops, so a hint under one box never pushes its neighbours down. */
.form-row { align-items: start; }
/* A checkbox sitting in a row of fields lines up with the boxes, not with the labels above them. */
.form-row > div:not(.btn-row) > .check:first-child { min-height: 3rem; align-items: center; margin-top: calc(.9rem * 1.65 + .4rem); }
.form-row > div:not(.btn-row) > .check:first-child input { margin-top: 0; }
.btn-row > .check { align-items: center; } .btn-row > .check input { margin-top: 0; }
/* Rows and blocks stacked inside a section get the same space between them as fields do. */
:is(.panel, .owner-row, .pkg-panel, fieldset) > :is(.form-row, .grid, .uses-total, table, .table-scroll, textarea, div, .btn-row, form, .callout, .check, label)
  + :is(.form-row, .grid, .uses-total, table, .table-scroll, textarea, div, .btn-row, form, .callout, .check, label) { margin-top: 1.15rem; }
/* Tables placed side by side keep their own height instead of stretching to match the taller one. */
.grid > table, .grid > .table-scroll { align-self: start; }
/* Rows stacked directly on top of each other always get breathing room (forms laid out as a grid already have it). */
:not(.form) > .form-row + .form-row { margin-top: 1.15rem; }
[data-items] > .form-row + .form-row { margin-top: .6rem; }
[data-items] > .form-row { align-items: center; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 15rem; }
[data-items] > .form-row > .btn-row { flex-wrap: nowrap; white-space: nowrap; margin: 0; }
/* Buttons placed straight into a form keep their natural width instead of stretching across it. */
.form > button, .form > .btn, .form > a.btn { justify-self: start; }
/* Separate forms stacked in the same card get clear space between them. */
form + form, [data-deal-out] + form, details + form, .pkg-panel + form { margin-top: 1.5rem; }
details.owner-row + details:not(.owner-row) { margin-top: 1.25rem; }
details > summary.label + form { margin-top: .75rem; }

/* Upload tracker: stays on screen while files send, so clients can see each one arrive. */
.upload-tray { position: fixed; right: 1rem; bottom: 1rem; width: min(420px, calc(100vw - 2rem)); max-height: 70vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem; z-index: 80; }
.upload-tray .tray-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.upload-tray .tray-close { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 .25rem; }
.upload-tray .file-list { margin-top: .25rem; }
.upload-tray .file-list li > span:first-child { flex: 1 1 60%; min-width: 0; overflow-wrap: anywhere; }
.upload-tray .tray-note { display: block; border: 0; background: none; padding: .3rem 0; font-size: .92rem; }
.upload-tray .tray-note.bad { color: var(--bad); }
.tray-bar { display: block; height: 4px; background: var(--stone); border-radius: 4px; margin-top: .35rem; overflow: hidden; }
.tray-bar i { display: block; height: 100%; width: 0; background: var(--good); transition: width .2s; }
.file-list li.locked { border-color: var(--bad); }
.unlock-form { flex-basis: 100%; margin-top: .5rem; display: grid; gap: .4rem; }
.unlock-form p { margin: 0; }
.unlock-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.unlock-row input { flex: 1 1 12rem; }
@media (max-width: 640px) { .upload-tray { right: .5rem; left: .5rem; bottom: .5rem; width: auto; } }

.btn-danger { color: var(--bad); border-color: var(--bad-soft); }
.btn-danger:hover { background: var(--bad-soft); }

/* Intake: missing fields are outlined and explained right where they are. */
.form .invalid, .seg.invalid { border-color: var(--bad) !important; box-shadow: 0 0 0 3px var(--bad-soft); }
.seg.invalid { border-radius: var(--radius); }
.field-error { color: var(--bad); font-size: .86rem; margin: .3rem 0 0; }
/* Address suggestions under the street address field. */
.form-row > div:has(> #i-addr) { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; list-style: none; margin: .2rem 0 0; padding: .25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); max-height: 18rem; overflow-y: auto; }
.suggest li { padding: .55rem .6rem; border-radius: 6px; cursor: pointer; font-size: .92rem; }
.suggest li:hover, .suggest li:focus { background: var(--accent-soft); outline: none; }
.suggest li.suggest-foot { cursor: default; background: none; font-size: .8rem; }

/* Admin usage: a tiny bar chart of daily AI cost. */
.spark { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.spark span { flex: 1; min-width: 4px; background: var(--accent); border-radius: 2px 2px 0 0; }

/* Home "Recent closings" cards and leader photos / LinkedIn. */
a.closing-card { color: inherit; text-decoration: none; display: block; transition: box-shadow .15s, transform .15s; }
a.closing-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.bio-photo { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; margin-bottom: .75rem; }
.social-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; }
.social-link .ico { width: 18px; height: 18px; color: #0a66c2; }

/* Email sign-up: pop-up and footer form. */
.signup-pop { position: fixed; inset: 0; background: rgba(20, 24, 33, .55); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: sp-in .2s ease-out; }
@keyframes sp-in { from { opacity: 0; } to { opacity: 1; } }
.signup-card { position: relative; background: var(--card); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25); width: min(820px, 100%); display: grid; grid-template-columns: 1fr 1.25fr; overflow: hidden; }
.signup-art { background: var(--ink); color: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; gap: .75rem; }
.signup-art svg { width: 96px; height: 96px; color: var(--accent); }
.signup-brand { font-family: var(--serif, Georgia, serif); font-size: 1.5rem; text-align: center; margin: 0; line-height: 1.1; color: var(--paper); }
.signup-brand span { display: block; font-size: .75rem; letter-spacing: .3em; color: var(--accent); margin-top: .35rem; }
.signup-body { padding: 2.5rem 2.25rem 2rem; }
.signup-body h2 { margin: .25rem 0 .6rem; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.15; }
.signup-close { position: absolute; top: .6rem; right: .7rem; width: 2.25rem; height: 2.25rem; border: 0; background: none; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--muted); border-radius: 50%; }
.signup-close:hover { background: var(--stone); color: var(--ink); }
.signup-form { display: grid; gap: .6rem; margin: 1rem 0 .5rem; }
.signup-form input[type=email] { height: 3rem; }
.signup-form .btn { width: 100%; justify-content: center; }
.signup-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup-form .form-err { color: var(--bad); min-height: 1em; }
.signup-done { margin: .5rem 0; }
#foot-signup .signup-form { grid-template-columns: 1fr auto; gap: .5rem; margin: .4rem 0 0; max-width: 26rem; }
#foot-signup .signup-form .btn { width: auto; }
#foot-signup .signup-form .form-err { grid-column: 1 / -1; }
.foot-signup-label { margin: 1.25rem 0 0; }
@media (max-width: 640px) {
  .signup-pop { align-items: flex-end; padding: 0; }
  .signup-card { grid-template-columns: 1fr; border-radius: 14px 14px 0 0; }
  .signup-art { flex-direction: row; padding: 1rem 1.25rem; justify-content: flex-start; }
  .signup-art svg { width: 44px; height: 44px; }
  .signup-brand { font-size: 1.1rem; text-align: left; }
  .signup-body { padding: 1.25rem 1.25rem 1.5rem; }
  #foot-signup .signup-form { grid-template-columns: 1fr; }
}

/* Portal sign-in: one main way, a clear button for new clients. */
.other-ways { margin-top: .75rem; }
.other-ways .btn-row { margin-top: .5rem; }
.new-here { border-top: 1px solid var(--line); padding-top: 1rem; display: grid; gap: .6rem; justify-items: start; }
.new-here p { margin: 0; }

.more-upload { margin: 1rem 0 1.5rem; }
.more-upload > summary { cursor: pointer; }
.more-upload > .dropzone, .more-upload > details { margin-top: .75rem; }
