/* Therapy Scope /pbs pages — mirrors the main site theme (Tailwind tokens in src/index.css).
   Scoped: every rule here is only loaded on /pbs pages. */
@font-face {
  font-family: "Manrope Variable";
  src: url("/pbs/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans Variable";
  src: url("/pbs/assets/fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --ink: #0F172A;
  --brand: #0E7490;
  --brand-hover: #155E75;
  --tint: rgba(14, 116, 144, 0.08);
  --bg: #F8FAFC;
  --bg-soft: #F1F5F9;
  --border: #E2E8F0;
  --accent: #F59E0B;
  --accent-ink: #451A03;
  --white: #ffffff;
  --muted-fg: #475569;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "DM Sans Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Manrope Variable", "DM Sans Variable", sans-serif; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 2.4rem; margin: 0 0 1.1rem; }
h2 { font-size: 1.55rem; margin: 0 0 1.1rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.45rem; }
p { margin: 0 0 1rem; }
a { color: var(--brand); }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 640px) { h1 { font-size: 1.9rem; } h2 { font-size: 1.3rem; } }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 0.75rem 1.25rem;
  border-radius: 0 0 12px 0; font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

.wrap { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header (mirrors the React site header) ---------- */
.topbar { background: var(--ink); color: #fff; font-size: 0.78rem; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.topbar-note { color: rgba(255,255,255,0.8); font-weight: 500; white-space: nowrap; }
.topbar-contact { display: flex; gap: 1.25rem; align-items: center; }
.topbar-contact a { color: rgba(255,255,255,0.8); text-decoration: none; }
.topbar-contact a:hover { color: #fff; }
.topbar-phone { font-weight: 700; color: #fff !important; white-space: nowrap; }
@media (max-width: 700px) {
  .topbar-contact a:first-child { display: none; }
  .topbar-note { font-size: 0.72rem; }
}

.mainbar { background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(226,232,240,0.7); }
.site-header { position: sticky; top: 0; z-index: 60; }
.mainbar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.logo { height: 2.75rem; width: auto; display: block; }

.main-nav { display: flex; align-items: center; gap: 0.05rem; }
.main-nav > a, .nav-drop-btn {
  color: rgba(15,23,42,0.8); text-decoration: none; font-weight: 600; font-size: 0.88rem;
  padding: 0.5rem 0.55rem; border-radius: 8px; background: none; border: 0; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.main-nav > a:hover, .nav-drop-btn:hover { color: var(--brand); background: var(--bg-soft); }

.nav-drop { position: relative; }
.nav-drop-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 15rem; z-index: 70;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 0.4rem;
  box-shadow: 0 12px 32px -8px rgba(15,23,42,0.18);
}
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { display: block; }
.nav-drop-menu a {
  display: block; padding: 0.55rem 0.8rem; border-radius: 8px; color: var(--ink);
  text-decoration: none; font-weight: 500; font-size: 0.9rem;
}
.nav-drop-menu a:hover { background: var(--bg-soft); color: var(--brand); }

.header-ctas { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }
@media (max-width: 1320px) { .header-ctas .header-phone { display: none; } }
@media (max-width: 1200px) { .main-nav { display: none; } }

/* mobile nav (checkbox driven, no JS needed) */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 0.6rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: #fff; }
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--ink); }
.mobile-nav { display: none; background: #fff; border-bottom: 1px solid var(--border); padding: 0.75rem 1.5rem 1.25rem; }
.mobile-nav a { display: block; padding: 0.55rem 0.4rem; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--bg-soft); }
.mobile-nav a:hover { color: var(--brand); }
.mobile-cta { margin-top: 0.75rem; text-align: center; border-bottom: 0 !important; color: #fff !important; }
@media (max-width: 1200px) {
  .nav-burger { display: flex; }
  .site-header:has(.nav-toggle:checked) .mobile-nav { display: block; }
}
@media (min-width: 1201px) { .mobile-nav { display: none !important; } }

/* ---------- PBS sub-nav ---------- */
.pbs-subnav { background: var(--tint); border-bottom: 1px solid var(--border); }
.pbs-subnav-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.55rem; padding-bottom: 0.55rem; flex-wrap: wrap; }
.pbs-subnav-links { display: flex; gap: 0.15rem; flex-wrap: wrap; }
.pbs-subnav-links a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9rem;
  padding: 0.4rem 0.75rem; border-radius: 999px;
}
.pbs-subnav-links a:hover { background: #fff; color: var(--brand); }
.pbs-subnav-links a[aria-current="page"] { background: var(--brand); color: #fff; }

/* ---------- banner ---------- */
.banner { background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 0.95rem; }
.banner .wrap { padding-top: 0.65rem; padding-bottom: 0.65rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border-radius: 999px; font-weight: 700; text-decoration: none;
  padding: 0.7rem 1.5rem; font-size: 1rem; cursor: pointer; border: 2px solid transparent;
  font-family: inherit; white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.9rem; }

/* ---------- sections ---------- */
section { padding: 3.5rem 0; }
section.alt { background: var(--bg-soft); }
section.hero { padding: 3rem 0 3.5rem; background: var(--white); }
.breadcrumb { font-size: 0.88rem; color: var(--muted-fg); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb a:hover { text-decoration: underline; }
.lead { font-size: 1.08rem; max-width: 52rem; color: rgba(15,23,42,0.85); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.chips li {
  background: var(--bg-soft); color: var(--muted-fg); font-weight: 700; font-size: 0.8rem;
  border-radius: 999px; padding: 0.35rem 0.9rem; border: 1px solid var(--border);
  letter-spacing: 0.02em; text-transform: uppercase;
}

.grid { display: grid; gap: 1.1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; height: 100%;
}
.card h3 { color: var(--ink); }
.card p { color: var(--muted-fg); font-size: 0.95rem; margin: 0; }

.state-card {
  display: block; text-decoration: none; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.state-card:hover { border-color: var(--brand); box-shadow: 0 10px 24px -10px rgba(14,116,144,0.25); transform: translateY(-2px); }
.state-card .abbr { display: block; font-family: "Manrope Variable", sans-serif; font-size: 1.9rem; font-weight: 800; color: var(--brand); }
.state-card .label { color: var(--ink); font-weight: 600; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: #fff;
  font-weight: 800; margin-bottom: 0.6rem; font-family: "Manrope Variable", sans-serif;
}
.steps p { color: var(--muted-fg); font-size: 0.95rem; margin: 0; }

.two-col { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.practitioner-card { background: var(--tint); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.practitioner-card .p-name { font-family: "Manrope Variable", sans-serif; font-size: 1.25rem; font-weight: 800; margin: 0; }
.practitioner-card .p-title { color: var(--brand-hover); font-weight: 600; margin: 0.25rem 0 1rem; }
.practitioner-card ul { margin: 0; padding-left: 1.15rem; }
.practitioner-card li { margin-bottom: 0.5rem; font-size: 0.95rem; }

.disclosure {
  background: var(--tint); border: 1px solid var(--border); border-left: 6px solid var(--brand);
  border-radius: var(--radius); padding: 1.75rem;
}

.panel { background: var(--white); border: 1px solid var(--border); border-left: 6px solid var(--accent); border-radius: var(--radius); padding: 1.5rem; }
.panel-soft { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-top: 1.5rem; }
.visit-note { margin-top: 1.25rem; }

details { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; overflow: hidden; }
details summary {
  cursor: pointer; font-weight: 700; padding: 1.05rem 1.4rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 1.35rem; font-weight: 400; color: var(--brand); flex-shrink: 0; }
details[open] summary::after { content: "\2013"; }
details summary:hover { background: var(--bg); }
details .faq-body { padding: 0 1.4rem 1.2rem; }
details .faq-body p { color: var(--muted-fg); margin: 0; }

/* ---------- form ---------- */
form.pbs-form { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.05rem; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35rem; }
.field .req { color: #BE123C; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.65rem 0.85rem; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-size: 0.98rem; color: var(--ink); background: var(--white);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid rgba(14,116,144,0.3); border-color: var(--brand);
}
.field .hint { font-size: 0.84rem; color: var(--muted-fg); margin-top: 0.3rem; }
.consent { display: flex; gap: 0.7rem; align-items: flex-start; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; margin-bottom: 1.1rem; }
.consent input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; flex-shrink: 0; accent-color: var(--brand); }
.consent label { font-size: 0.9rem; color: rgba(15,23,42,0.9); }
.form-error { background: #FDECEA; border: 1px solid #F5C6C2; color: #842029; border-radius: 10px; padding: 0.85rem 1rem; margin-bottom: 1rem; font-weight: 600; font-size: 0.95rem; }
.form-success { background: #E7F6F1; border: 1px solid #BFE6DA; color: #0B4F3F; border-radius: 10px; padding: 1.1rem 1.25rem; margin-bottom: 1rem; font-weight: 600; }
.hp { position: absolute; left: -9999px; top: 0; }
.refer-grid { align-items: start; }

/* ---------- footer (mirrors the React site footer) ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.75); padding: 3.5rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-family: "Manrope Variable", sans-serif; font-size: 1.3rem; font-weight: 800; color: #fff; margin: 0 0 0.75rem; }
.footer-brand span { color: var(--accent); }
.footer-ack { font-size: 0.8rem; color: rgba(255,255,255,0.5); line-height: 1.6; }
.site-footer h2 { color: rgba(255,255,255,0.5); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 0.9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; font-size: 0.92rem; }
.site-footer a { color: rgba(255,255,255,0.75); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-appt { color: var(--accent); font-weight: 700; }
.footer-note {
  border-top: 1px solid rgba(255,255,255,0.1); margin-top: 2.5rem; padding: 1.25rem 0;
  display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap;
  font-size: 0.78rem; color: rgba(255,255,255,0.5);
}
.footer-note p { margin: 0; }

.other-locs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.other-locs a {
  display: inline-block; background: var(--tint); border: 1px solid var(--border); border-radius: 999px;
  padding: 0.45rem 1rem; text-decoration: none; font-weight: 600; color: var(--brand);
}
.other-locs a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* links inside running text must not rely on colour alone (WCAG 1.4.1) */
main :is(p, li, .faq-body, .consent) a:not(.btn):not(.state-card) { text-decoration: underline; text-underline-offset: 2px; }
.other-locs a, .chips a { text-decoration: none; }
