/*
 * The intake questions' look (PHASE3.md step 24), shared by the client form (index.html, linked in its head, so these
 * rules are page-wide there exactly as before) and the dashboard (linked inside the shadow root its New intake and
 * "Fix the client's answers" use, so nothing here touches the dashboard and nothing there touches the questions).
 * The page around the client form (header, landing page, footer) keeps its own styles in index.html.
 */
/* ---- Brand: the original look (Kaitlin 2026-11-06, back from the mayeuxlaw.com navy): burgundy #6a1831 from her logo,
   warm off-white page, white cards, Playfair Display headings, Montserrat body ---- */
:root, :host {
  --ink: #282828;
  --ink-soft: #5a5a5a;
  --accent: #6a1831;      /* Mayeux burgundy (from her logo) */
  --accent-soft: #f7eef1;
  --bg: #f8f6f5;
  --card: #ffffff;
  --line: #e4dfd7;
  --bad: #a3352b;
  --bad-soft: #fbeceb;
  --good: #2f6b4f;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body, :host { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Montserrat, system-ui, -apple-system, Segoe UI, sans-serif; -webkit-text-size-adjust: 100%; }
.f, .q, .rv, .step { scroll-margin-top: 76px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; box-shadow: 0 6px 24px rgba(40,40,40,.06); }
h1 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 30px; line-height: 1.15; margin: 4px 0 8px; }
h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 26px; margin: 0 0 4px; }
.sub { color: var(--ink-soft); margin: 0 0 18px; font-size: 15px; }
.sub a { color: var(--accent); }
.progress { display: flex; gap: 6px; margin: 0 0 18px; }
.progress span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.progress span.on { background: var(--accent); }
.stepname { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
label { display: block; font-weight: 500; font-size: 15px; margin: 14px 0 6px; }
label small { font-weight: 400; color: var(--ink-soft); }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #cfc8bd; border-radius: 10px; padding: 12px 12px; appearance: none; -webkit-appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
/* Keyboard pass (2026-11-09): one burgundy ring on whatever the keyboard is on (never on a tap); a heading that gets focus
   on a new step shows none, it's only where Tab starts */
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus { outline: none; }
.err input, .err select, .err textarea { border-color: var(--bad); background: var(--bad-soft); }
/* Action text (tells the client to do or check something): small, red, italic. .msg = validation, .zipnote = ZIP/parish prompts. */
.msg { font-size: 13px; color: var(--bad); font-style: italic; margin-top: 4px; display: none; }
.err .msg { display: block; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .row, .row3 { grid-template-columns: 1fr; } .row3 .keep { display: grid; } }
.yn { display: flex; gap: 8px; }
.yn label { flex: 1; margin: 0; position: relative; }
.yn input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; left: 0; top: 0; }
.yn span { display: block; text-align: center; padding: 12px 8px; border: 1px solid #cfc8bd; border-radius: 10px; font-weight: 500; cursor: pointer; background: #fff; }
.yn input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.yn input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.q { margin: 16px 0 0; }
.q > p { margin: 0 0 8px; font-weight: 500; font-size: 15px; }
.note { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--ink); margin: 16px 0 0; }
.stop { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 14px; font-size: 15px; margin: 16px 0 0; display: none; }
.stop.show { display: block; }
.nav { display: flex; gap: 10px; margin-top: 24px; }
.rbnav { margin-top: 10px; }
.rbnav button { flex: 1; }
button { font: inherit; font-weight: 600; font-size: 16px; border-radius: 10px; padding: 14px 18px; cursor: pointer; border: 1px solid var(--accent); }
.primary { background: var(--accent); color: #fff; flex: 1; }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.ghost { background: #fff; color: var(--accent); }
.link { background: none; border: 0; color: var(--accent); padding: 8px 0; font-size: 15px; }
/* Typed date (MM/DD/YYYY) with a calendar button; the real <input type=date> sits under the button */
.dt { position: relative; }
.dt .dtxt { padding-right: 56px; }
.dt .ghost-mask { position: absolute; left: 0; top: 0; right: 50px; bottom: 0; padding: 13px; white-space: pre; overflow: hidden; pointer-events: none; color: #a8a197; line-height: 24px; }
.dt .ghost-mask i { font-style: normal; visibility: hidden; }
.dt.bad .dtxt { color: var(--bad); }
.dt .cal { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 46px; display: flex; align-items: center; justify-content: center; color: var(--accent); border-left: 1px solid var(--line); border-radius: 0 9px 9px 0; overflow: hidden; }
.dt .cal svg { width: 20px; height: 20px; pointer-events: none; }
.dt .cal input { position: absolute; left: 0; top: 0; width: 100%; height: 100%; min-width: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.dt .cal input::-webkit-calendar-picker-indicator { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.dt .cal:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.zipnote { font-size: 13px; color: var(--bad); font-style: italic; margin-top: 4px; line-height: 1.45; }
.zipnote .chip { font-style: normal; font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: 99px; background: #fff; color: var(--accent); border: 1px solid var(--accent); margin: 8px 8px 0 0; }
.zipnote .chip.on { background: var(--accent); color: #fff; }
#restored { margin: 0 0 16px; display: none; }
#restored button { padding: 0; font-size: 14px; }
.step { display: none; }
.step.on { display: block; }
.review { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 8px; }
.review div { display: grid; grid-template-columns: 42% 58%; border-top: 1px solid var(--line); font-size: 14px; }
.review div:first-child { border-top: 0; }
.review b { font-weight: 500; color: var(--ink-soft); padding: 9px 10px; background: #fcfbf9; }
.review span { padding: 9px 10px; word-break: break-word; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-top: 18px; }
.check input { width: 20px; height: 20px; flex: none; margin-top: 2px; appearance: auto; -webkit-appearance: checkbox; }
.warn { background: #fff7e6; border: 1px solid #f0d9a8; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-top: 14px; display: none; }
.done { text-align: center; padding: 10px 0; }
.done .tick { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 30px; line-height: 56px; margin: 0 auto 12px; }
/* Sent page: the itemized price and Book a call (phase 2 steps 12, 13); full borders, no side stripe */
.price { border: 1px solid var(--line); border-radius: 12px; margin-top: 18px; overflow: hidden; background: #fff; text-align: left; }
.price h3 { margin: 0; padding: 11px 14px; background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.price .pl { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 15px; border-top: 1px solid var(--line); }
.price .pl:first-child { border-top: 0; }
.price .pa { white-space: nowrap; font-variant-numeric: tabular-nums; }
.price .ptotal { font-weight: 700; color: var(--ink); background: #faf8f6; }
.price .pmaybe, .price .pnote, .price .pcall { margin: 0; padding: 10px 14px; font-size: 14px; line-height: 1.45; border-top: 1px solid var(--line); }
.price .pnote { color: var(--ink-soft); font-size: 13px; }
.price .pcall { border-top: 0; font-size: 15px; }
.book { margin-top: 18px; text-align: center; }
.book p { margin: 0 0 10px; font-size: 15px; }
.bookbtn { display: block; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 10px; padding: 14px 18px; font-weight: 600; font-size: 16px; text-decoration: none; }
.bookbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Save our contact (2026-11-09): the quieter button under Book a call */
.savect { margin-top: 22px; }
.savebtn { display: block; background: #fff; color: var(--accent); border: 1px solid #d9d1c6; border-radius: 10px; padding: 14px 18px; font-weight: 600; font-size: 16px; text-decoration: none; }
.savebtn:hover { border-color: var(--accent); }
.savebtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { display: block; font-weight: 400; font-size: 13px; color: var(--ink-soft); margin: -2px 0 8px; line-height: 1.45; }
.q > .hint { margin: -4px 0 10px; }
.rv { border: 1px solid var(--line); border-radius: 12px; margin-top: 14px; overflow: hidden; background: #fff; }
.rv-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.rv-h h3 { margin: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.rv-h small { display: block; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--ink-soft); font-weight: 400; margin-top: 2px; }
.rv-h button { padding: 6px 12px; font-size: 13px; background: #fff; color: var(--accent); }
.rv-row { display: grid; grid-template-columns: 38% 62%; border-top: 1px solid var(--line); font-size: 14px; }
.rv-row:first-of-type { border-top: 0; }
.rv-row b { font-weight: 500; color: var(--ink-soft); padding: 10px 12px; }
.rv-row span { padding: 10px 12px; word-break: break-word; font-weight: 500; }
.rv-row span.empty { color: #aaa; font-weight: 400; }
.rv-edit { padding: 4px 14px 14px; }
.rv-edit .q:first-child, .rv-edit > .f:first-child { margin-top: 10px; }
.rv-err { display: none; background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-top: 12px; }
.rv-actions { display: flex; gap: 10px; margin-top: 14px; }
.rv-actions button { flex: 1; padding: 12px; }
.rv.editing { box-shadow: 0 0 0 2px var(--accent); }
.rv-h button:disabled { opacity: .4; cursor: not-allowed; }
.rv.spouse .rv-h { background: #f1f0ef; }
.rv.spouse .rv-h h3 { color: #4f4e4e; }
.kid { display: grid; grid-template-columns: 1fr 190px; gap: 0 10px; }
@media (max-width: 480px) { .kid { grid-template-columns: 1fr; } }
.kid label { margin-top: 10px; font-size: 14px; }
.hist { border: 1px solid var(--line); border-radius: 10px; padding: 2px 12px 10px; margin-top: 10px; }
.hist .row, .hist .row3 { gap: 0 10px; }
.hist label { margin-top: 10px; font-size: 14px; }
#kids { display: none; margin-top: 6px; }
#kids.show { display: block; }
.kid .kidAdopt { display: none; grid-column: 1 / -1; margin-top: 8px; font-size: 14px; }
#kidRows.adopt .kid .kidAdopt { display: flex; }
#adoptQ { margin-top: 16px; }
/* Custody only, no divorce (Build plan step 11): body.is-custody hides divorce-only parts and shows custody-only ones.
   Hidden parts are skipped by validate() (offsetParent null). */
body:not(.is-custody) .cu-only { display: none !important; }
body.is-custody .dv-only { display: none !important; }
/* The same inside the dashboard, where the questions sit in a shadow root and the mode class is on its host */
:host(:not(.is-custody)) .cu-only { display: none !important; }
:host(.is-custody) .dv-only { display: none !important; }
#custodyWantQ { display: none !important; }   /* answered by "What do you need help with?" since step 11 */
/* Step 0 on the client form (the page body; never matches inside the dashboard): the landing page already asked "What do you need help with?", so show the pick and a Change link */
/* The three "What do you need help with?" buttons (landing page and her New intake's start page; moved from index.html) */
.lp-ask { text-align: center; font-size: 23px; margin: 28px 0 14px; }
.lp-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: #fff; color: var(--ink); border: 1px solid #d9d1c6; border-radius: 10px; padding: 14px; margin: 0 0 12px; box-shadow: 0 1px 2px rgba(40,40,40,.05); font-weight: 400; transition: border-color .15s, background-color .15s; }
.lp-opt:hover, .lp-opt:active { border-color: var(--accent); background: #fffbfb; }
.lp-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lp-ic { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.lp-ic svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lp-opt b { display: block; font-size: 16px; font-weight: 600; }
.lp-opt small { display: block; font-size: 13px; color: var(--ink-soft); line-height: 1.35; margin-top: 2px; }
.lp-opt .chev { margin-left: auto; color: var(--accent); font-size: 26px; line-height: 1; padding-left: 4px; }
/* Her New intake's start page (Aaron 2026-11-06): the client's three buttons, nothing else; never on the client form */
#iqStart { display: none; }
:host(.is-landing) #iqStart { display: block; }
:host(.is-landing) #progress, :host(.is-landing) #restored, :host(.is-landing) .step, :host(.is-landing) #nav { display: none !important; }
#iqStart .lp-ask { margin-top: 4px; }
.needPicked { display: none; font-size: 14px; color: var(--ink-soft); }
body .step > [data-q="need"] > p, body .step > [data-q="need"] > .hint, body .step > [data-q="need"] > .yn { display: none; }
body .step > [data-q="need"] > .needPicked { display: block; }
:host(.is-newintake) .step > [data-q="need"] > p, :host(.is-newintake) .step > [data-q="need"] > .hint, :host(.is-newintake) .step > [data-q="need"] > .yn { display: none; }
:host(.is-newintake) .step > [data-q="need"] > .needPicked { display: block; }
.needPicked b { color: var(--ink); font-weight: 600; }
.needPicked button { padding: 0 0 0 6px; font-size: 14px; }
/* Other services (OTHER-SERVICES.md S1a; intake/services.js): .is-svc on the page body (client) or the dashboard's host
   shows #svc (the picker and a service's questions) and hides the divorce steps */
#svc { display: none; }
body.is-svc #svc { display: block; }
:host(.is-svc) #svc { display: block; }
body.is-svc #progress, body.is-svc #restored, body.is-svc .step, body.is-svc #nav, body.is-svc #iqStart { display: none !important; }
:host(.is-svc) #progress, :host(.is-svc) #restored, :host(.is-svc) .step, :host(.is-svc) #nav, :host(.is-svc) #iqStart { display: none !important; }
#svc .svc-ask { margin-top: 4px; }
#svc .svc-group { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; margin: 18px 0 8px; }
#svc .needPicked.svc-picked { display: block; margin: -6px 0 6px; }
#svc .svc-more { text-align: center; font-size: 14px; color: var(--ink-soft); margin: 16px 0 0; }
#svc .svc-more a, #svc .svc-how a { color: var(--accent); }
/* The documents to gather on both Sent pages (Other services; the divorce form's #sentExtra since the upload link 2b) */
#svc .svc-gather, #sentExtra .svc-gather { text-align: left; margin-top: 18px; }
#svc .svc-gather ul, #sentExtra .svc-gather ul { margin: 10px 0 4px; padding: 0 14px 0 34px; font-size: 15px; line-height: 1.45; }
#svc .svc-gather li, #sentExtra .svc-gather li { margin: 0 0 6px; }
#svc .svc-how, #sentExtra .svc-how { margin: 0; padding: 4px 14px 10px; font-size: 14px; color: var(--ink-soft); line-height: 1.45; }
#svc .svc-alert { margin: 0 0 16px; font-weight: 600; line-height: 1.45; }
#svc .svc-alert a { color: inherit; white-space: nowrap; }
/* Ask Kaitlin (W2; intake/ask.js): the welcome page's form, the Sent page's "Anything else?" box and a stop screen's
   call-or-message choice. Client page only (the dashboard never mounts these). */
.ask .f { margin: 0; }
.ask .f > label { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.ask-form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.ask-form[hidden], .ask-done[hidden], .ask [hidden] { display: none !important; }
.ask .lbl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ask-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ask-chip { min-height: 46px; border-radius: 10px; border: 1px solid #d9d1c6; background: #fff; color: var(--ink); font-weight: 500; font-size: 15px; padding: 0 6px; text-align: center; }
.ask-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ask .ask-check { margin-top: 0; align-items: center; font-size: 14px; }
.ask .ask-check input { width: 22px; height: 22px; margin-top: 0; accent-color: var(--accent); }
.ask-fine { margin: 0; font-size: 12px; color: var(--ink-soft); }
.ask-err { color: var(--bad); font-size: 14px; }
.ask-err:empty { display: none; }
.ask-send { width: 100%; min-height: 50px; padding: 0 18px; }
.ask-send:disabled { opacity: .6; cursor: wait; }
.ask-rather { margin: 0; font-size: 13px; color: var(--ink-soft); text-align: center; }
.ask-rather a { color: var(--accent); }
.ask-ghost, .ask-callbtn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; border-radius: 10px; font-weight: 600; font-size: 16px; text-decoration: none; padding: 0 18px; box-sizing: border-box; }
.ask-ghost { background: #fff; color: var(--accent); border: 1px solid #d9d1c6; }
.ask-ghost:hover { border-color: var(--accent); }
.ask-callbtn { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.ask-callbtn:hover { color: #fff; background: #57122a; }
.ask-done-big { margin-top: 20px; border: 1px solid #b9d5c6; background: #eef6f1; border-radius: 14px; padding: 20px; text-align: center; }
.ask-done-big h3 { font-size: 20px; margin: 0; }
.ask-done-big p { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.ask-done-big .ask-ghost { margin-top: 14px; }
.ask-tick { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 50%; background: var(--good); color: #fff; display: flex; align-items: center; justify-content: center; }
.ask-tick svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ask-done-line { margin-top: 16px; border: 1px solid #b9d5c6; background: #eef6f1; border-radius: 10px; padding: 14px; font-size: 14px; color: var(--good); font-weight: 600; }
/* The Sent page's "Anything else?" card: its own card under the thank-you card (#app), as in the mockup */
.ask-sent { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; text-align: left; background: #fff; box-shadow: 0 6px 24px rgba(40,40,40,.06); }
.ask-sent h3 { font-size: 22px; margin: 0; }
.ask-sent h3, .ask-done-big h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; }
.ask-sent .ask-lead { margin: 6px 0 0; color: var(--ink-soft); font-size: 14px; }
.ask-sent .ask-form { margin-top: 16px; gap: 14px; }
.ask-sent .ask-have { margin-top: 14px; }
/* SITE.md M1: the Sent pages' "Made a mistake?" line (bottom of the thank-you card, right above "Anything else?") and
   "Back to home" under that card. Client page only (index.html). */
.sent-fix { margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; color: var(--ink); text-align: center; }
.sent-home { margin-top: 16px; }
.sent-home button { width: 100%; }
/* A stop screen: the call-or-message choice right under the red message, shown with it */
.ask-stop { display: none; }
.stop.show + .ask-stop { display: block; }
.ask-acts { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.ask-stopform { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); gap: 14px; }

/* Busy spinner (Aaron 2026-11-09; BUILD-NOTES.md "Busy spinner"): keys.js marks a locked button that says it's working
   ("Building…", "Sending…") aria-busy; a spinner before its words, and after 5 seconds a gray "Still working…" under it
   (out of the flow, so nothing on screen moves). Reduced motion: a still dot. */
button[aria-busy="true"] { position: relative; cursor: wait; }
button[aria-busy="true"]:disabled { opacity: .8; }
button[aria-busy="true"] > svg { display: none; }
button[aria-busy="true"]::before, .busy-line::before { content: ""; display: inline-block; box-sizing: border-box; width: .9em; height: .9em; margin-right: .5em; vertical-align: -.1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ml-spin .8s linear infinite; }
.busy-line::before { color: var(--accent); }
button[aria-busy="true"]::after { content: "Still working\2026"; position: absolute; top: calc(100% + 5px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 500; line-height: 1.2; letter-spacing: 0; color: #6b6b6b; pointer-events: none; visibility: hidden; animation: ml-still 0s linear 5s forwards; }
@keyframes ml-spin { to { transform: rotate(360deg); } }
@keyframes ml-still { to { visibility: visible; } }
@media (prefers-reduced-motion: reduce) {
  button[aria-busy="true"]::before, .busy-line::before { animation: none; border: 0; width: .45em; height: .45em; vertical-align: .1em; background: currentColor; }
}
