/* CivilPsych shared styles. Layout: one left-aligned column; each section pairs a short label column with its content, stacking on phones. */
:root {
  --paper: #f5f7f6;
  --panel: #ffffff;
  --ink: #16212a;
  --muted: #4c5a64;
  --rule: #d6dddd;
  --accent: #2c5a5f;
  --accent-ink: #ffffff;
  --signal: #9a6408;
  --signal-soft: #f6ead2;
  --accent-soft: #e2ecec;
  --c-therapy: #3a7454; --c-programs: #946716; --c-forensic: #46587c; --c-sap: #b0520f;
  --accent-line: #a9c4c5;
  --confirm: #fff2a8;
  --confirm-ink: #4a3b00;
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #11181d; --panel: #18222a; --ink: #e8eef0; --muted: #a9b6bc; --rule: #2b3842;
    --accent: #7fb7bb; --accent-ink: #0d1519; --signal: #e3a947; --signal-soft: #2e2615; --accent-soft: #1b2e33; --accent-line: #3d5f64; --c-therapy: #7cc39a; --c-programs: #e0b45a; --c-forensic: #a4b5da; --c-sap: #f0a060;
    --confirm: #4d4210; --confirm-ink: #fff1a6; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #11181d; --panel: #18222a; --ink: #e8eef0; --muted: #a9b6bc; --rule: #2b3842;
  --accent: #7fb7bb; --accent-ink: #0d1519; --signal: #e3a947; --signal-soft: #2e2615; --accent-soft: #1b2e33; --accent-line: #3d5f64; --c-therapy: #7cc39a; --c-programs: #e0b45a; --c-forensic: #a4b5da; --c-sap: #f0a060;
  --confirm: #4d4210; --confirm-ink: #fff1a6; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.65;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; z-index: 20; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); top: calc(8px + env(safe-area-inset-top, 0px)); }
.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.confirm {
  background: var(--confirm); color: var(--confirm-ink);
  padding: 0 .3em; border-radius: 3px; font-size: .92em;
}

/* Top bar */
.top { border-bottom: 1px solid var(--rule); background: var(--panel); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 14px; }
.brand { font-family: var(--display); font-size: 1.45rem; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.brand span { color: var(--muted); font-weight: 500; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; font-size: .95rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav .phone { font-weight: 700; color: var(--accent); }

/* Hero */
.hero .wrap { padding-block: 56px 44px; display: grid; gap: 26px; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); max-width: 20ch; }
.lede { font-size: 1.2rem; max-width: 58ch; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 6px;
  font-weight: 600; text-decoration: none; border: 2px solid var(--accent); font-size: 1rem;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { color: var(--accent); background: transparent; }
.fact-strip { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; font-size: .95rem; color: var(--muted); }
.fact-strip strong { color: var(--ink); }

/* Phone call bar, phones only */
.callbar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .callbar {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--panel); border-top: 1px solid var(--rule);
    padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  }
  .callbar .btn { justify-content: center; padding: 11px 12px; }
  .nav a:not(.phone) { font-size: .9rem; }
}

/* Doors */
.doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
@media (max-width: 980px) { .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .doors { grid-template-columns: minmax(0, 1fr); } }
.door { display: grid; gap: 4px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; color: var(--ink); }
.door:hover { border-color: var(--accent); }
.door b { font-size: 1.05rem; }
.door span { color: var(--muted); font-size: .93rem; }

/* Sections */
section { border-top: 1px solid var(--rule); }
section > .wrap { padding-block: 56px; display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 24px 48px; }
@media (max-width: 760px) { section > .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 44px; } }
.label h2 { font-size: 1.75rem; }
.label p { color: var(--muted); font-size: .95rem; margin: 10px 0 0; }
.content { min-width: 0; display: grid; gap: 18px; }
.content p { margin: 0; max-width: 64ch; }
h3 { font-size: 1.25rem; }

ol.steps { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--rule); counter-reset: step; }
ol.steps li { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--rule); counter-increment: step; }
ol.steps li b::before { content: counter(step) ". "; color: var(--muted); font-weight: 500; }
@media (max-width: 520px) { ol.steps li { grid-template-columns: minmax(0, 1fr); } }
ol.steps b { font-weight: 600; }

.sap-note {
  background: var(--signal-soft); border-left: 4px solid var(--signal);
  padding: 16px 20px; border-radius: 0 6px 6px 0; max-width: 64ch;
}
.sap-note p + p { margin-top: 8px; }

ul.plain { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; max-width: 64ch; }

.faq { display: grid; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 8px; }

.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 760px) { .two { grid-template-columns: minmax(0, 1fr); } }
.two > div { display: grid; gap: 10px; align-content: start; }

.book { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .book { grid-template-columns: minmax(0, 1fr); } }
.way { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px; display: grid; gap: 6px; align-content: start; }
.way .k { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.way .v { font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; }
.way .v a { color: var(--ink); text-decoration: none; }
.way .v a:hover { text-decoration: underline; }
.way small { color: var(--muted); font-size: .9rem; }

.signup { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 22px; display: grid; gap: 12px; max-width: 40rem; }

.small { font-size: .95rem; color: var(--muted); }
.program { display: grid; gap: 10px; padding-top: 22px; border-top: 1px solid var(--rule); }
.program:first-of-type { padding-top: 0; border-top: 0; }
.program .who { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.fit { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 18px; max-width: 64ch; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer { border-top: 1px solid var(--rule); background: var(--panel); }
footer .wrap { padding-block: 28px; display: grid; gap: 10px; font-size: .9rem; color: var(--muted); }
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
footer a { color: var(--muted); }

/* Current page in the nav */
.nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
footer nav a[aria-current="page"] { color: var(--ink); }

/* Hero with art */
.hero.split .wrap { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 26px 48px; }
.hero.split .copy { display: grid; gap: 22px; min-width: 0; }
.hero.split .art { min-width: 0; }
.hero.split .wide { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .hero.split .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero.split .art { max-width: 420px; }
}
.art svg { display: block; width: 100%; height: auto; }
.art figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.art { margin: 0; }

/* SVG paint, so the art follows light and dark */
.s-acc { stroke: var(--accent); fill: none; }
.f-acc { fill: var(--accent); }
.f-soft { fill: var(--accent-soft); }
.s-line { stroke: var(--accent-line); fill: none; }
.f-panel { fill: var(--panel); }
.f-paper { fill: var(--paper); }
.s-rule { stroke: var(--rule); fill: none; }
.s-sig { stroke: var(--signal); fill: none; }
.f-sig { fill: var(--signal); }
.f-sigsoft { fill: var(--signal-soft); }
.f-ink { fill: var(--ink); }
.f-muted { fill: var(--muted); }
.s-ink { stroke: var(--ink); fill: none; }
.svg-label { font-family: var(--body); font-size: 15px; font-weight: 600; fill: var(--ink); }
.svg-small { font-family: var(--body); font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; fill: var(--muted); }
.svg-num { font-family: var(--display); font-size: 20px; font-weight: 600; fill: var(--accent-ink); }

/* Service cards on the home page */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .services { grid-template-columns: minmax(0, 1fr); } }
.service {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 18px; align-content: start;
  padding: 22px; background: var(--panel); border: 1px solid var(--rule); border-radius: 10px;
  color: var(--ink); text-decoration: none;
}
.service:hover { border-color: var(--accent); }
.service .icon { grid-row: span 3; width: 56px; height: 56px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); }
.service .icon svg { width: 34px; height: 34px; }
.service .who { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.service b { font-family: var(--display); font-size: 1.4rem; font-weight: 600; line-height: 1.2; }
.service span.d { color: var(--muted); font-size: .97rem; }
.service .go { grid-column: 2; margin-top: 8px; font-weight: 600; color: var(--accent); }

/* Spot icon inside a program block */
.program .spot { width: 52px; height: 52px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.program .spot svg { width: 32px; height: 32px; }

/* Method band */
.method { background: var(--panel); }
.method .big { font-family: var(--display); font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.2; margin: 0; max-width: 24ch; }

/* Substack sign-up embed */
iframe.substack { width: 100%; max-width: 480px; height: 320px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; }

/* One color per service, for wayfinding (borrowed from the Wayfinding direction) */
.svc-home { --svc: var(--accent); }
.svc-therapy { --svc: var(--c-therapy); }
.svc-programs { --svc: var(--c-programs); }
.svc-forensic { --svc: var(--c-forensic); }
.svc-sap { --svc: var(--c-sap); }
.top { border-top: 5px solid var(--svc, var(--accent)); }
.hero .eyebrow { color: var(--svc, var(--muted)); }
.nav a[data-svc]::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; margin-right: .4em; vertical-align: .08em; }
.nav a[data-svc="therapy"]::before { background: var(--c-therapy); }
.nav a[data-svc="programs"]::before { background: var(--c-programs); }
.nav a[data-svc="forensic"]::before { background: var(--c-forensic); }
.nav a[data-svc="sap"]::before { background: var(--c-sap); }
.nav a[aria-current="page"] { text-decoration-color: var(--svc, var(--accent)); }
.service .icon { color: var(--svc, var(--accent)); }
.service:hover { border-color: var(--svc, var(--accent)); }
.service .go { color: var(--svc, var(--accent)); }
