/* GALE Capital Partners — owner application [NAR-489; GALE brand NAR-495]. Self-contained: no Clinic Hub shell or brand. */
/* [NAR-526] In the website's Light & Space identity (NAR-517; Cesar 2026-10-28: "it wasnt rethemed. it still looks
   old"): the --g-* tokens from tokens.css (loaded first), Cormorant Garamond headings, Manrope text, the olive
   wordmark on a white header, square olive buttons. These names map the application's roles onto those tokens; the
   markup and behaviour are unchanged. */
:root {
  --ink: var(--g-ink); --ink-2: var(--g-ink); --muted: var(--g-muted);
  --line: var(--g-rule); --control-line: var(--g-muted); --paper: var(--g-white); --card: var(--g-white);
  --soft: var(--g-ivory); --stone: var(--g-limestone);
  --gold: var(--g-olive); --gold-2: var(--g-brass); --focus: var(--g-olive);
  --sel: var(--g-olive); --sel-ink: var(--g-white); --ok: var(--g-olive);
  --warn: #8a4b14; /* errors only: 6.8:1 on white, 6.4:1 on ivory; not a brand colour (listed for review) */
  --shadow: none;
  --radius: 0;
  --serif: var(--g-display);
  --sans: var(--g-body);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
::selection { background: var(--g-stone); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px var(--g-gutter);
  min-height: 92px; background: var(--g-white); color: var(--g-olive); border-bottom: 1px solid var(--line); }
.top .confidential, .top .link-btn { color: var(--g-olive); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 66px; width: auto; display: block; }
.top-right { display: flex; align-items: center; gap: 16px; }
.confidential { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.confidential svg { width: 15px; height: 15px; }
.link-btn { background: none; border: 0; color: var(--g-olive); text-decoration: underline; text-decoration-color: var(--gold-2);
  text-underline-offset: 5px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 8px 4px; min-height: 44px; }

main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: clamp(28px, 6vw, 80px) var(--g-gutter); }
main:focus { outline: none; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font: 600 11px/1.5 var(--sans); color: var(--muted); margin: 0 0 18px; }
.eyebrow.intro { text-transform: none; letter-spacing: .01em; font: 400 15px/1.6 var(--sans); max-width: 46em; color: var(--muted); }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.03em; line-height: 1.06; color: var(--g-olive); }
.hero h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1.02; margin: 0 0 22px; max-width: 14ch; }
.lede { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.75; color: var(--ink-2); max-width: 60ch; margin: 0 0 32px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px;
  border-radius: var(--radius); border: 1px solid var(--g-olive); font: 500 14px/1.3 var(--sans); cursor: pointer;
  text-decoration: none; background: transparent; color: var(--g-olive); letter-spacing: .01em; }
.btn.primary { background: var(--sel); color: var(--sel-ink); border-color: var(--sel); }
.btn.primary:hover { background: var(--g-olive-hover); border-color: var(--g-olive-hover); }
.btn.ghost:hover { background: var(--stone); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.fine { font-size: 14px; color: var(--muted); margin-top: 16px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.trust { list-style: none; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 32px; }
.trust li { padding: 22px 0; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); }
.trust b { font-family: var(--serif); font-size: 26px; line-height: 1.1; font-weight: 500; color: var(--g-olive); }
.trust span { color: var(--muted); font-size: 14px; }
.how { margin-top: 64px; padding: clamp(28px, 5vw, 56px); background: var(--soft); }
.how h2 { font-size: clamp(32px, 3.6vw, 46px); margin: 0 0 18px; }
.how ol { margin: 0; padding-left: 22px; display: grid; gap: 12px; color: var(--ink-2); max-width: 70ch; }

/* progress */
.rail { display: flex; flex-wrap: wrap; gap: 6px 4px; margin: 0 0 24px; padding: 0; }
.rail span { font-size: 12px; letter-spacing: .02em; padding: 6px 10px; border: 1px solid var(--line);
  color: var(--muted); white-space: nowrap; }
.rail span.done { color: var(--ink-2); border-color: var(--line); background: var(--stone); }
.rail span.done::before { content: "✓ "; color: var(--g-olive); }
.rail span.current { color: var(--sel-ink); background: var(--sel); border-color: var(--sel); font-weight: 600; }
.rail-mobile { display: none; }
/* [operator, 2026-10-30] completion and questions remaining */
.progress { margin: 0 0 24px; }
.progress-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted);
  margin: 0 0 8px; }
.progress-row span:first-child { color: var(--ink-2); font-weight: 600; }
.progress .bar { height: 4px; background: var(--line); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--g-olive); transition: width .25s ease; }
@media (prefers-reduced-motion: reduce) { .progress .bar i { transition: none; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(22px, 4.5vw, 52px); }
.stage-intro { border-left: 2px solid var(--gold-2); padding: 2px 0 2px 16px; margin: 0 0 24px; color: var(--ink-2); }
.stage-intro b { display: block; font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.15; margin-bottom: 6px; color: var(--g-olive); }
.q-code { font-size: 11px; color: var(--muted); letter-spacing: .14em; margin: 0 0 8px; }
.q h1 { font-size: clamp(30px, 3.8vw, 44px); line-height: 1.1; margin: 0 0 10px; }
.q .help { color: var(--ink-2); margin: 0 0 18px; }
.q .hint { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 18px 0 8px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 60px; padding: 14px 16px;
  border-radius: var(--radius); border: 1px solid var(--control-line); background: var(--paper); color: var(--ink);
  font: 500 16px/1.3 var(--sans); cursor: pointer; transition: border-color .12s, background .12s; }
.opt:hover { border-color: var(--g-olive); background: var(--soft); }
.opt .mark { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--muted); display: grid; place-items: center; }
.opt[role="checkbox"] .mark { border-radius: 0; }
.opt[aria-checked="true"] { border-color: var(--sel); background: var(--sel); color: var(--sel-ink); }
.opt[aria-checked="true"] .mark { border-color: var(--sel-ink); }
.opt[aria-checked="true"] .mark::after { content: ""; width: 10px; height: 10px; border-radius: inherit; background: var(--sel-ink); }
.opt .key { margin-left: auto; font-size: 12px; opacity: .7; }
.field { display: grid; gap: 6px; margin: 16px 0; max-width: 520px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field .opt-note { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select {
  min-height: 52px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--control-line); background: var(--paper);
  color: var(--ink); font: 16px var(--sans); width: 100%; }
input:focus, select:focus { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 1px; }
.two { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; max-width: 520px; }
.consent-text { font-family: var(--serif); font-size: 22px; line-height: 1.45; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; background: var(--soft); margin: 12px 0 8px; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.actions .right { display: flex; gap: 10px; margin-left: auto; }
.err { color: var(--warn); font-size: 15px; min-height: 1.4em; margin: 10px 0 0; }
.review h2 { font-size: 26px; margin: 30px 0 8px; }
.review dl { margin: 0; border-top: 1px solid var(--line); }
.review .row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.review dt { color: var(--muted); font-size: 14px; }
.review dd { margin: 0; font-weight: 500; }
.review .missing dd { color: var(--warn); }
.review .edit { background: none; border: 0; text-decoration: underline; text-decoration-color: var(--gold-2); text-underline-offset: 4px;
  color: var(--g-olive); cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; }
.notice { background: var(--soft); border-left: 2px solid var(--gold-2); padding: 14px 18px; font-size: 14px; color: var(--ink-2); margin-top: 22px; }
.received { text-align: center; padding: clamp(28px, 7vw, 72px) 0; }
.received h1 { font-size: clamp(34px, 4.6vw, 54px); margin: 0 0 12px; }
.received .ref { font-family: var(--serif); font-size: 20px; color: var(--muted); }
.doc { max-width: 800px; }
.doc h1 { font-size: clamp(44px, 5vw, 64px); margin: 0 0 24px; }
.doc .legal-date { color: var(--muted); font-size: 13px; }
.doc .clause h2 { margin: 40px 0 14px; font-size: clamp(26px, 2.4vw, 30px); }
.doc .clause p { max-width: 68ch; }
.doc p + p { margin-top: 14px; }
.foot { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; align-items: center;
  padding: 24px var(--g-gutter); color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.foot a { text-decoration: underline; text-underline-offset: 4px; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); max-width: 480px;
  width: calc(100% - 32px); padding: 28px; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(48, 56, 36, .55); } /* olive (--g-olive) at 55% */
dialog h2 { margin: 0 0 10px; font-size: 32px; }
dialog p { color: var(--ink-2); font-size: 15px; }
dialog label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.msg { min-height: 1.4em; }

@media (max-width: 720px) {
  .top { padding: 12px 20px; min-height: 80px; }
  .brand img { height: 58px; }
  .confidential { display: none; }
  .rail { display: none; }
  .rail-mobile { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
  .progress { margin: 0 0 16px; }
  .card { padding: 22px 18px; }
  .opts { grid-template-columns: 1fr; }
  .opt .key { display: none; }
  .two { grid-template-columns: 1fr; }
  .review .row { grid-template-columns: 1fr auto; }
  .review dd { grid-column: 1 / 2; }
  .actions .btn { flex: 1 1 auto; }
  .actions { flex-direction: column-reverse; align-items: stretch; }
  .actions .right { margin-left: 0; flex-direction: column; }
  .foot { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.opt, .btn { transition: border-color var(--g-duration), background-color var(--g-duration), color var(--g-duration); }
/* [NAR-499] confirmation checkboxes (consents) and year + month */
.checks { display: grid; gap: 12px; margin: 8px 0 4px; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 14px 16px; border: 1px solid var(--control-line);
  border-radius: var(--radius); cursor: pointer; line-height: 1.5; background: var(--paper); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--g-olive); }
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

/* [NAR-512] the owner account step: forms in words, 44 px targets, one column at 390 px */
.acct { margin-top: 8px; max-width: 580px; }
.acct h2 { font-size: clamp(32px, 3.8vw, 44px); margin: 0 0 10px; }
.acct h2:focus { outline: none; }
.acct .help { color: var(--ink-2); margin: 0 0 12px; }
.acct .field { max-width: none; }
.acct input { min-height: 48px; }
.ferr { color: var(--warn); font-size: 14px; margin: 2px 0 0; min-height: 0; }
.ferr:empty { display: none; }
input[aria-invalid="true"] { border-color: var(--warn); }
.acct .link-btn { min-height: 44px; }
.loc-row { border: 1px solid var(--line); padding: 4px 14px 10px; margin: 0 0 12px; }
.loc-row legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.loc-row .three { display: grid; grid-template-columns: 1.2fr 1.4fr .8fr; gap: 12px; }
.loc-row .field { margin: 10px 0 0; }
.loc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 0; }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 14px; }
@media (max-width: 720px) { .loc-row .three { grid-template-columns: 1fr; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* [NAR-526] headings that receive focus from the script (each new question, the review, the result) are announced,
   not outlined: they are not controls. Every control keeps its focus ring. */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }
.review h1 { font-size: clamp(34px, 4.2vw, 52px); margin: 0 0 12px; }
