/* Zenquire site styles. Moved out of the approved preview (site-preview/zenquire.html).
   Changes from the preview: system font stacks instead of Google Fonts (no external requests);
   inline style="" attributes moved into classes (strict CSP); darker light-theme amber and
   stronger form-field borders so text and field edges pass WCAG AA; skip link, legal-page
   article layout, draft banner, phone and honeypot styles added. */
:root {
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --sunk: #ECEEF7;
  --ink: #0E1330;
  --muted: #586080;
  --line: #D8DCEC;
  --field-line: #7D84A3;  /* form field edges, 3:1 or better against the page */
  --accent: #2F45E6;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3E7FF;
  --signal: #9A4708;      /* urgent amber (darkened from #B4540A for 4.5:1 on its tint) */
  --signal-soft: #FBEBDD;
  --shadow: rgba(24, 34, 110, .38);
  --f-display: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --r: 14px;
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0D1E; --surface: #12162F; --sunk: #1A1F3E; --ink: #E9EBF8; --muted: #9AA1C6;
    --line: #2A3058; --field-line: #6A72A3; --accent: #8E9CFF; --accent-ink: #0A0D1E; --accent-soft: #1F2554;
    --signal: #F2A766; --signal-soft: #3A2A1C; --shadow: rgba(0, 0, 0, .65); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0D1E; --surface: #12162F; --sunk: #1A1F3E; --ink: #E9EBF8; --muted: #9AA1C6;
  --line: #2A3058; --field-line: #6A72A3; --accent: #8E9CFF; --accent-ink: #0A0D1E; --accent-soft: #1F2554;
  --signal: #F2A766; --signal-soft: #3A2A1C; --shadow: rgba(0, 0, 0, .65); color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); }
.eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font: 600 .95rem/1.2 var(--f-body); padding: .85rem 1.2rem; border-radius: 999px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  cursor: pointer; text-decoration: none; transition: transform .15s ease, filter .15s ease; text-align: center;
  box-shadow: 0 8px 20px -12px var(--shadow);
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:focus-visible { outline-offset: 3px; border-radius: 999px; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost, .firm .choose { box-shadow: none; }
.btn[disabled] { opacity: .6; cursor: progress; }
.linkbtn { font: 500 .85rem var(--f-body); background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; text-align: left; }
.linkbtn:hover { color: var(--accent); }

/* Skip link and helpers */
.skip { position: absolute; left: 16px; top: -100px; z-index: 20; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; border-radius: 999px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
header.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
header.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding-block: .9rem; flex-wrap: wrap; }
.logo { display: flex; align-items: center; font-family: var(--f-display); font-weight: 700; font-size: 1.4rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo svg { margin-right: .45rem; flex: none; }
.logo .logo-z { stroke: var(--accent); }
.logo small { font-family: var(--f-mono); font-size: .75rem; color: var(--muted); font-weight: 400; align-self: baseline; }
.logo.foot { font-size: 1.1rem; }
header.site-header .btn { padding: .6rem 1.05rem; font-size: .88rem; }
header.site-header .actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.themebtn { font: 500 .82rem var(--f-body); background: transparent; color: var(--muted); border: 1px solid var(--field-line); border-radius: 999px; padding: .5rem .85rem; cursor: pointer; }
.themebtn:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 400px) {
  header.site-header .wrap { padding-block: .6rem; }
  header.site-header .btn { padding: .5rem .8rem; font-size: .82rem; }
  .themebtn { padding: .45rem .7rem; }
}

/* Hero */
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; padding-block: 4rem 4.5rem; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 1.4rem; min-width: 0; }
.hero-copy h1 em { font-style: normal; color: var(--accent); }
.hero-copy .lede { font-size: 1.12rem; color: var(--muted); max-width: 32rem; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.chip.pill { text-decoration: none; display: inline-block; background: var(--surface); }
.quietlink { font-size: .88rem; color: var(--muted); align-self: flex-start; }
.quietlink:hover { color: var(--accent); }
.hero-photo { position: relative; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; min-width: 0;
  background: radial-gradient(120% 90% at 20% 15%, var(--accent-soft) 0%, transparent 60%), linear-gradient(160deg, var(--sunk) 0%, var(--accent-soft) 100%);
  display: flex; align-items: flex-end; justify-content: flex-start; padding: 1rem 1.1rem; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 2.2rem; padding-block: 2.6rem 3rem; } }

/* Three steps */
.howto { list-style: none; margin: 0 auto; padding: 0 0 3.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 52rem; }
.howto li { display: flex; align-items: center; justify-content: center; gap: .7rem; font-family: var(--f-display); font-weight: 700; font-size: 1rem; min-width: 0; }
.howto svg { flex: none; color: var(--accent); }
@media (max-width: 640px) { .howto { grid-template-columns: 1fr; gap: 1rem; max-width: 20rem; } .howto li { justify-content: flex-start; } }

/* Firm line: still, random order per visit */
.firmband { text-align: center; padding-block: 2.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.firmband .label { margin-bottom: .6rem; }
.firm-line { margin: 0; font-weight: 500; font-size: .98rem; line-height: 2; color: var(--ink); overflow-wrap: anywhere; }
.firm-line span + span::before { content: "·"; margin: 0 .75rem; color: var(--muted); }
.firm-order { margin: .6rem 0 0; font-size: .8rem; color: var(--muted); }
.firms .firm-order { grid-column: 1 / -1; margin-top: 0; }
@media (min-width: 761px) { .firm-line span { display: inline-block; } }
@media (max-width: 760px) { .firm-line span { display: block; } .firm-line span + span::before { content: none; } }
.notlaw-line { text-align: center; font-size: .88rem; color: var(--muted); padding-block: 2rem 0; }

/* Picker */
.pick-sec { padding-block: 3.5rem 2rem; }
.pick-sec .wrap { max-width: calc(760px + 32px); display: flex; flex-direction: column; gap: 1.2rem; }
.pick-sec .intro { font-size: .95rem; color: var(--muted); text-align: center; max-width: 40rem; margin-inline: auto; }
.pick { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1.6rem; display: flex; flex-direction: column; gap: 1.3rem; box-shadow: 0 18px 40px -28px var(--shadow); min-width: 0; }
.stage { display: flex; flex-direction: column; gap: .65rem; min-width: 0; }
.stage-h { display: flex; align-items: baseline; gap: .6rem; }
.stage-h .n { font-family: var(--f-mono); font-size: .75rem; color: var(--accent); }
.stage-h h2, .stage-h h3 { font-size: 1.05rem; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { font: 500 .88rem/1.1 var(--f-body); padding: .6rem .85rem; border-radius: 999px; border: 1px solid var(--field-line); background: var(--bg); color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sub select { font: 400 .95rem var(--f-body); color: var(--ink); background: var(--surface); border: 1px solid var(--field-line); border-radius: 8px; padding: .6rem .7rem; width: 100%; }
.firms { display: grid; grid-template-columns: 1fr; gap: .7rem; }
.firms.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .firms.two { grid-template-columns: 1fr; } }
.firm { background: var(--sunk); border: 1px solid transparent; border-radius: var(--r); padding: 1rem 1.05rem; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.firm .lic { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); line-height: 1.45; }
.firm .desc { font-size: .92rem; }
.firm .rel { font-size: .82rem; color: var(--muted); }
.firm .facts { font-size: .82rem; }
.firm .facts strong, .noscript-firms strong { font-weight: 600; }
.noscript-firms { margin: .8rem 0 0; padding-left: 1.2rem; display: grid; gap: .5rem; font-size: .88rem; }
.firm .choose { margin-top: auto; align-self: stretch; font-size: .88rem; padding: .65rem .9rem; background: var(--surface); color: var(--accent); }
.firm .choose[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.firm.chosen { border-color: var(--accent); }
.disclose { font-size: .82rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: .7rem; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: var(--ink); cursor: pointer; }
.consent input { margin-top: .25rem; accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: none; }
.pick-foot { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
.urgent { background: var(--signal-soft); border-radius: var(--r); padding: .9rem 1rem; font-size: .9rem; color: var(--ink); }
.urgent strong { color: var(--signal); }
.err { color: var(--signal); font-size: .86rem; font-weight: 500; }
.note { background: var(--accent-soft); border-radius: var(--r); padding: .9rem 1rem; font-size: .9rem; }
.noscript-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; font-size: .92rem; }

/* Sections */
section.block { padding-block: 4.5rem; }
.sec-head { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 2rem; max-width: 44rem; }

/* Request form */
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field label, .field .lbl { font-size: .85rem; font-weight: 600; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="date"], .field select, .field textarea {
  font: 400 1rem var(--f-body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: 8px; padding: .7rem .8rem; width: 100%; min-width: 0;
}
.field [aria-invalid="true"] { border-color: var(--signal); border-width: 2px; }
.field textarea { min-height: 6.5rem; resize: vertical; }
.field textarea.short { min-height: 4.5rem; }
#start { padding-top: 2.5rem; }
.intake { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start; }
.intake aside { display: flex; flex-direction: column; gap: 1rem; color: var(--muted); font-size: .93rem; min-width: 0; }
.intake aside h2 { color: var(--ink); font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.intake aside .start { border-left: 3px solid var(--line); padding-left: .9rem; font-size: .86rem; }
.ink { color: var(--ink); }
.phone-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.phone-soon { font-weight: 600; color: var(--ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1.6rem; min-width: 0; }
.locked { display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }
.locked h3 { font-size: 1.3rem; }
.locked .muted { color: var(--muted); }
form.card { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
form.card .full { grid-column: 1 / -1; }
.hint { font-size: .8rem; color: var(--muted); font-weight: 400; }
.chosen-bar { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: baseline; justify-content: space-between; background: var(--accent-soft); border-radius: var(--r); padding: .8rem 1rem; }
.chosen-bar strong { font-family: var(--f-display); font-size: 1.05rem; }
.group-h { font-family: var(--f-mono); font-size: .75rem; color: var(--accent); letter-spacing: .04em; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: .2rem; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font-size: .93rem; }
.checks label { display: flex; gap: .45rem; align-items: center; cursor: pointer; }
.checks input { accent-color: var(--accent); width: 1rem; height: 1rem; }
label.checks.plain { font-weight: 400; display: flex; gap: .45rem; align-items: center; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { font-size: .85rem; font-weight: 600; padding: 0; margin-bottom: .35rem; }
.contents { display: contents; }
.crim-grid { display: grid; gap: 1rem; }
.conf { background: var(--sunk); border-radius: var(--r); padding: 1rem; font-size: .88rem; display: flex; flex-direction: column; gap: .6rem; }
.submit-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.status { font-size: .9rem; }
.done { display: flex; flex-direction: column; gap: .9rem; }
.done h3 { font-size: 1.4rem; }
.done .ref { font-family: var(--f-mono); background: var(--sunk); padding: .5rem .7rem; border-radius: 6px; align-self: flex-start; }
.done ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; color: var(--muted); font-size: .93rem; }
.done .small { font-size: .93rem; }
@media (max-width: 860px) { .intake { grid-template-columns: 1fr; gap: 2rem; } }
@media (max-width: 520px) { form.card { grid-template-columns: 1fr; } .panel { padding: 1.1rem; } .pick { padding: 1.1rem; } }

/* FAQ */
#faq { border-top: 1px solid var(--line); }
#faq h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.faq { display: grid; border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary { cursor: pointer; font-family: var(--f-display); font-size: 1.08rem; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--accent); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin-top: .7rem; color: var(--muted); max-width: 46rem; }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: .85rem; color: var(--muted); }
footer .wrap { display: grid; gap: 1.2rem; }
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
footer .legal { max-width: 52rem; font-size: .8rem; }
footer .disc { max-width: 52rem; font-size: .88rem; color: var(--ink); border-left: 3px solid var(--accent); padding-left: .9rem; }
.footnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .85rem; }
.footnav a { color: var(--accent); }

/* Legal pages: simple readable article */
.article { max-width: 46rem; padding-block: 3rem 4rem; }
.article h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: .6rem; }
.article .meta { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; }
.article h2 { font-size: 1.35rem; margin: 2.2rem 0 .7rem; }
.article h3 { font-size: 1.08rem; margin: 1.4rem 0 .5rem; }
.article p, .article li { color: var(--ink); }
.article p + p { margin-top: .8rem; }
.article ul, .article ol { padding-left: 1.3rem; margin: .7rem 0; display: grid; gap: .35rem; }
.article .callout { background: var(--sunk); border-radius: var(--r); padding: 1rem 1.1rem; margin: 1.2rem 0; }
.article .urgent { margin: 1.2rem 0; }
.ph { background: var(--accent-soft); padding: 0 .25rem; border-radius: 4px; font-family: var(--f-mono); font-size: .9em; }

/* Not found */
.notfound { padding-block: 4rem 5rem; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; max-width: 40rem; }

section[id], div[id] { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } html { scroll-behavior: auto; } }
