/* Brand tokens: navy, teal and gold sampled from the SFPP logo. */
:root {
  --primary: #02224B;
  --primary-dark: #011735;
  --primary-soft: #E5EBF3;
  --teal: #035D68;
  --teal-soft: #E1F0F1;
  --gold: #CA9217;
  --accent: #035D68;
  --ink: #0E1A2E;
  --muted: #4A586C;
  --line: #D4DBE5;
  --soft: #F4F6FA;
  --white: #FFFFFF;
  --alert: #B3261E;
  --alert-soft: #FBEDEB;
  --display: "Newsreader", Georgia, serif;
  --body: "Figtree", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); color: var(--ink); background: var(--white); font-size: 17px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; display: block; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 26px; border-radius: 999px; font-weight: 600; font-size: 16px; border: 1.5px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary-soft); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: var(--primary-soft); }
.btn-ghost { border-color: rgba(255,255,255,.85); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.link { color: var(--primary); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* Header */
.header { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 60px; width: auto; }
.footer-logo { display: inline-flex; background: #fff; border-radius: 8px; padding: 12px 16px; }
.footer-logo .brand-logo { height: 54px; }
.header-actions { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 600; }
.header-actions > a:hover { color: var(--primary); text-decoration: underline; }
.icon-btn { background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px; color: var(--ink); font-weight: 600; font-size: 15px; }
.icon-btn svg { width: 22px; height: 22px; }

/* Mega menu */
.panel { position: fixed; inset: 134px 0 0 0; background: #fff; overflow-y: auto; z-index: 55; border-top: 1px solid var(--line); }
.panel[hidden] { display: none; }
.panel-inner { padding: 40px 24px 64px; }
.panel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.panel h2 { font-size: 24px; margin-bottom: 14px; }
.panel ul { list-style: none; display: grid; gap: 10px; }
.panel ul a { color: var(--primary); font-weight: 500; }
.panel ul a:hover { text-decoration: underline; }
.panel-help { margin-top: 48px; padding: 24px; background: var(--alert-soft); display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; font-size: 15px; }
.panel-help b { color: var(--alert); }

/* Emergency strip */
.strip { background: var(--primary-dark); color: #fff; font-size: 14px; }
.strip .wrap { display: flex; flex-wrap: wrap; gap: 6px 28px; padding-top: 8px; padding-bottom: 8px; }
.strip a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* Hero */
.hero { position: relative; min-height: 580px; display: flex; align-items: flex-end; color: #fff;
  background: var(--primary-dark) url("https://images.unsplash.com/photo-1584516150909-c43483ee7932?auto=format&fit=crop&w=2000&q=70") center 30%/cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2,22,52,.88) 0%, rgba(2,22,52,.55) 50%, rgba(2,22,52,.1) 100%); }
.hero .wrap { position: relative; width: 100%; padding-top: 120px; padding-bottom: 72px; }
.hero .eyebrow { color: #F0C25C; }
.hero h1 { font-size: clamp(42px, 6.2vw, 80px); max-width: 820px; }
.hero p { font-size: 20px; max-width: 600px; margin: 18px 0 32px; opacity: .92; }

/* Sections */
.section { padding: 88px 0; }
.section.soft { background: var(--soft); }
.section.tint { background: var(--teal-soft); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.section-head h2, .h2 { font-size: clamp(32px, 3.6vw, 44px); }
.section-head p { color: var(--muted); max-width: 620px; margin-top: 10px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
.split p { color: var(--muted); margin: 16px 0 26px; }

/* Search finder (home + A-Z) */
.finder { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.search { position: relative; }
.search label { display: block; font-weight: 700; margin-bottom: 10px; }
.search-box { display: flex; align-items: center; gap: 10px; border: 1.5px solid #8C99AD; border-radius: 999px; padding: 0 8px 0 20px; background: #fff; }
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-box input { border: 0; outline: 0; font: inherit; font-size: 18px; flex: 1; padding: 14px 0; background: transparent; min-width: 0; }
.search-box svg { width: 20px; height: 20px; color: var(--muted); flex: 0 0 auto; }
.search-box .btn { padding: 9px 20px; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 40px rgba(2,22,52,.15); list-style: none; z-index: 20; overflow: hidden; }
.suggest[hidden] { display: none; }
.suggest a, .suggest span { display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px; font-size: 16px; }
.suggest a:hover, .suggest a.active { background: var(--primary-soft); }
.suggest small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.hint { font-size: 14px; color: var(--muted); margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--primary); background: #fff; cursor: pointer; }
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* A-Z page */
.az-tools { display: grid; gap: 22px; margin-bottom: 36px; }
.letters { display: grid; grid-template-columns: repeat(13, 1fr); gap: 6px; }
.letters a, .letters span { display: grid; place-items: center; height: 44px; border-radius: 6px; font-weight: 700; font-size: 16px; }
.letters a { background: var(--primary-soft); color: var(--primary); }
.letters a:hover { background: var(--primary); color: #fff; }
.letters span { color: #B7C0CD; background: var(--soft); }
.az-group { scroll-margin-top: 150px; padding: 28px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 80px 1fr; gap: 24px; }
.az-group > h2 { font-size: 48px; color: var(--primary); line-height: 1; }
.az-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.az-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; min-height: 96px; }
a.az-card:hover { border-color: var(--primary); box-shadow: 0 8px 24px rgba(2,22,52,.1); }
.az-card b { font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.2; }
a.az-card b { color: var(--primary); }
.az-card small { font-size: 13px; color: var(--muted); }
.az-card .soon { margin-top: auto; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8C99AD; }
.az-card .read { margin-top: auto; font-size: 14px; font-weight: 700; color: var(--accent); }
.az-empty { padding: 40px 0; color: var(--muted); }
.az-count { font-size: 15px; color: var(--muted); }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 26px; display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s; }
a.card:hover { border-color: var(--primary); box-shadow: 0 12px 30px rgba(2,22,52,.12); }
.card .tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.card h3 { font-size: 26px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 16px; flex: 1; }
.card .link { margin-top: 18px; }

/* Provinces */
.provinces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.province { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; }
a.province:hover { border-color: var(--primary); color: var(--primary); }
.province small { font-weight: 600; color: var(--muted); font-size: 13px; }

/* Promo trio */
.promos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.promo { padding: 36px 32px 36px 0; }
.promo + .promo { padding-left: 32px; border-left: 1px solid var(--line); }
.promo h3 { font-size: 28px; margin-bottom: 10px; }
.promo p { color: var(--muted); margin-bottom: 16px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 48px; color: var(--teal); line-height: 1.1; }
.stat { border-top: 3px solid var(--gold); padding-top: 18px; }
.stat span { color: var(--muted); font-size: 15px; }

/* Page hero (inner pages) */
.page-hero { background: var(--primary); color: #fff; padding: 52px 0 56px; border-bottom: 5px solid var(--gold); }
.page-hero .crumbs { font-size: 14px; opacity: .85; margin-bottom: 14px; }
.page-hero .crumbs a:hover { text-decoration: underline; }
.page-hero h1 { font-size: clamp(36px, 5vw, 58px); max-width: 860px; }
.page-hero .lead { font-size: 19px; max-width: 700px; margin-top: 14px; opacity: .92; }
.page-hero .btns { margin-top: 26px; }

/* Article layout */
.page { padding: 56px 0 88px; }
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 64px; align-items: start; }
.layout.left { grid-template-columns: 240px 1fr; }
.layout > * { min-width: 0; } /* lets wide tables scroll inside .table-wrap instead of widening the page */
.prose { max-width: 780px; }
.prose > section { scroll-margin-top: 150px; }
.prose > section + section { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.prose h2 { font-size: 34px; margin-bottom: 16px; }
.prose h3 { font-size: 23px; margin: 26px 0 10px; }
.prose p { margin-bottom: 16px; color: #26344A; }
.prose ul, .prose ol { margin: 0 0 18px 22px; color: #26344A; }
.prose li { margin-bottom: 8px; }
.prose a:not(.btn) { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.prose .lead-p { font-size: 20px; color: var(--ink); }
.callout { border-left: 4px solid var(--alert); background: var(--alert-soft); padding: 16px 20px; margin: 18px 0; }
.callout.info { border-left-color: var(--primary); background: var(--primary-soft); }
.callout p:last-child { margin-bottom: 0; }
.review-note { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 48px; padding-top: 18px; }

.toc { position: sticky; top: 150px; border-left: 2px solid var(--line); }
.toc p { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 0 10px 18px; }
.toc a { display: block; padding: 7px 18px; margin-left: -2px; border-left: 2px solid transparent; font-size: 15px; font-weight: 500; color: var(--primary); }
.toc a:hover { border-left-color: var(--primary); background: var(--soft); }

.aside { position: sticky; top: 100px; display: grid; gap: 18px; }
.box { border: 1px solid var(--line); border-radius: 6px; padding: 22px; background: #fff; }
.box h3 { font-size: 21px; margin-bottom: 12px; }
.box p { font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.box.brand-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.box.brand-box p { color: rgba(255,255,255,.88); }
.facts { display: grid; gap: 10px; font-size: 15px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 700; text-align: right; }
.related { list-style: none; display: grid; gap: 8px; }
.related a { color: var(--primary); font-weight: 600; font-size: 15px; }
.related a:hover { text-decoration: underline; }

/* Condition tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 36px; }
.tab { background: none; border: 0; padding: 14px 20px; margin-bottom: -2px; border-bottom: 3px solid transparent; font-weight: 700; font-size: 16px; color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.tab:hover { color: var(--primary); }
.js .tabpanel[hidden] { display: none; }

/* People */
.bios { display: grid; gap: 28px; }
.bio { display: grid; grid-template-columns: 72px 1fr; gap: 20px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-family: var(--display); font-size: 28px; }
.bio h3 { margin: 0 0 2px; font-size: 23px; }
.bio .role { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.bio p { color: #26344A; margin: 0; }

/* Lists of items (library tabs) */
.item-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; list-style: none; margin: 0 !important; }
.item-grid li { margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; display: flex; justify-content: space-between; gap: 10px; align-items: center; font-weight: 600; color: var(--ink); }
.item-grid small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8C99AD; white-space: nowrap; }

/* Numbers */
.numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.number { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 6px; }
.number b { font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--alert); white-space: nowrap; }
.number span { font-weight: 600; }

/* Forms */
.form { display: grid; gap: 16px; max-width: 680px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label, .form legend { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form fieldset { border: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.form fieldset label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.form input:not([type=radio]), .form select, .form textarea { font: inherit; padding: 12px 14px; border: 1.5px solid #8C99AD; border-radius: 6px; background: #fff; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form .btn { justify-self: start; }
.form-note { font-size: 14px; color: var(--muted); }
.form-done { padding: 18px 20px; background: var(--primary-soft); border-left: 4px solid var(--primary); }
.form-done[hidden] { display: none; }

/* Join plan */
.plan { border: 2px solid var(--primary); border-top: 6px solid var(--gold); border-radius: 6px; padding: 28px; max-width: 520px; }
.plan .amount { font-family: var(--display); font-size: 52px; color: var(--primary); line-height: 1.1; }
.plan .amount small { font-family: var(--body); font-size: 16px; color: var(--muted); }
.plan p { color: var(--muted); margin: 10px 0 20px; }

.downloads { list-style: none; margin: 0 !important; display: grid; gap: 10px; }
.downloads a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; color: var(--primary) !important; text-decoration: none !important; }
.downloads a:hover { border-color: var(--primary); background: var(--soft); }
.downloads span { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Footer */
.footer { background: #011735; color: #C5CEDC; padding: 64px 0 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; margin-bottom: 44px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 9px; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-help { margin-top: 18px; line-height: 1.8; }
.footer-help b { color: #fff; }
.footer-bottom { border-top: 1px solid #1C3152; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.disclaimer { font-size: 13px; color: #8C99AD; margin-bottom: 18px; max-width: 760px; }

@media (max-width: 1000px) {
  .panel-grid, .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .cards, .az-cards, .item-grid { grid-template-columns: repeat(2, 1fr); }
  .layout, .layout.left { grid-template-columns: 1fr; gap: 40px; }
  .toc, .aside { position: static; }
  .toc { display: none; }
}
@media (max-width: 800px) {
  .split, .finder { grid-template-columns: 1fr; gap: 36px; }
  .provinces, .promos { grid-template-columns: 1fr; }
  .promo, .promo + .promo { padding: 28px 0; border-left: 0; }
  .promo + .promo { border-top: 1px solid var(--line); }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .letters { grid-template-columns: repeat(9, 1fr); }
  .az-group { grid-template-columns: 1fr; gap: 14px; }
  .numbers, .form-row { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .hero { min-height: 500px; }
  .section { padding: 64px 0; }
  .section-head { flex-direction: column; align-items: start; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .cards, .az-cards, .item-grid, .panel-grid { grid-template-columns: 1fr; }
  .letters { grid-template-columns: repeat(7, 1fr); }
  .brand-logo { height: 48px; }
  .icon-btn .label { display: none; }
  .tab { padding: 12px 12px; font-size: 15px; }
  .stat b { font-size: 38px; }
}
.tabpanel > section { scroll-margin-top: 150px; }
.tabpanel > section + section { margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line); }

/* Top utility bar */
.topbar { background: var(--primary); color: #fff; font-size: 14px; font-weight: 600; }
.topbar .wrap { display: flex; justify-content: flex-end; gap: 26px; height: 36px; align-items: center; }
.topbar a:hover { text-decoration: underline; }

/* Affiliations */
.affiliates { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.affiliate { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: start; padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 6px; background: #fff; text-decoration: none !important; color: var(--ink) !important; }
.affiliate:hover { border-color: var(--primary); box-shadow: 0 12px 30px rgba(2,22,52,.1); }
.affiliate-abbr { display: grid; place-items: center; height: 96px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 22px; letter-spacing: .04em; }
.affiliate b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.2; margin-bottom: 6px; }
.affiliate > span:last-child > span { display: block; color: var(--muted); font-size: 15px; }
.affiliate .link { margin-top: 12px; color: var(--primary) !important; }
.footer-affil { font-size: 14px; margin-bottom: 18px; }
.footer-affil a { color: #fff; text-decoration: underline; }
@media (max-width: 1000px) { .icon-btn .label { display: none; } }
@media (max-width: 800px) {
  .affiliates { grid-template-columns: 1fr; }
  .affiliate { grid-template-columns: 64px 1fr; padding: 20px; }
  .affiliate-abbr { height: 64px; font-size: 16px; }
  .topbar .wrap { justify-content: flex-start; }
}

/* Forum content: tables, steps, cases */
.table-wrap { overflow-x: auto; margin: 16px 0 24px; border: 1px solid var(--line); border-radius: 6px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th { background: var(--primary); color: #fff; text-align: left; padding: 12px 16px; font-weight: 700; }
.data-table td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.data-table tbody tr:nth-child(even) td { background: var(--soft); }
.data-table.compare td:last-child { background: var(--teal-soft); }
.steps { list-style: none; counter-reset: step; margin: 0 !important; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 18px 20px 18px 68px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 16px; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }
.steps b { display: block; font-size: 18px; margin-bottom: 4px; color: var(--ink); }
.steps span { display: block; color: var(--muted); }
.steps .btn { margin-top: 12px; }
.case { border-left: 4px solid var(--gold); background: var(--soft); padding: 20px 24px; margin: 16px 0; border-radius: 0 6px 6px 0; }
.case h3 { margin-bottom: 8px; }
.case p:last-child { margin-bottom: 0; }
.problem { border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 6px; padding: 20px 24px; margin: 14px 0; }
.problem h3 { margin-bottom: 8px; }
.problem p:last-child { margin-bottom: 0; }
.mini-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.mini-cards div { border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; }
.mini-cards b { display: block; color: var(--primary); margin-bottom: 4px; }
.mini-cards span { color: var(--muted); font-size: 15px; }
.ps-stats { grid-template-columns: repeat(2, 1fr); text-align: left; }
.contact-list { list-style: none; margin: 0 0 20px !important; padding: 0; display: grid; gap: 8px; }
.contact-list li { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; align-items: center; }
.contact-list span { color: var(--muted); font-size: 15px; }
.contact-list a { word-break: break-all; }
.bio .link { display: inline-block; margin-top: 10px; }
.bio p + p { margin-top: 10px; }
.doctors-band { background: var(--primary); color: #fff; }
.doctors-band .eyebrow { color: var(--gold); }
.doctors-band h2, .doctors-band p { color: #fff; }
.doctors-band p { opacity: .9; }
.downloads.on-dark a { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.25); color: #fff; }
.downloads.on-dark a:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.downloads.on-dark span { color: rgba(255,255,255,.75); }
@media (max-width: 800px) {
  .mini-cards { grid-template-columns: 1fr; }
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
  .steps li { padding-left: 60px; }
}

/* Forum page: photos, document cards, accordion */
.bio { grid-template-columns: 120px 1fr; }
.bio-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; border-bottom: 4px solid var(--gold); }
.forum-banner { width: 100%; height: auto; border-radius: 6px; margin-bottom: 24px; }
.doc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.doc-card { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; padding: 20px; border: 1px solid var(--line); border-top: 4px solid var(--primary); border-radius: 6px; color: var(--ink) !important; text-decoration: none !important; }
.doc-card:hover { border-color: var(--primary); box-shadow: 0 12px 30px rgba(2,22,52,.1); }
.doc-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: #fff; }
.doc-icon svg { width: 30px; height: 30px; }
.doc-card b { display: block; font-size: 18px; margin-bottom: 4px; }
.doc-card span span { display: block; color: var(--muted); font-size: 15px; }
.doc-card .link { margin-top: 10px; color: var(--primary) !important; font-weight: 700; }
.accordion { border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.accordion summary { cursor: pointer; padding: 18px 22px; font-weight: 700; color: var(--primary); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "\25BE"; color: var(--primary); }
.accordion[open] summary::after { content: "\25B4"; }
.accordion > div { padding: 0 22px 22px; }
@media (max-width: 800px) {
  .doc-cards { grid-template-columns: 1fr; }
  .bio { grid-template-columns: 88px 1fr; gap: 16px; }
  .bio-photo { width: 88px; height: 88px; }
}

/* Main navigation bar under the logo row */
.mainnav { border-top: 1px solid var(--line); }
.mainnav .wrap { display: flex; gap: 4px; height: 48px; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.mainnav .wrap::-webkit-scrollbar { display: none; }
.mainnav a { display: flex; align-items: center; padding: 0 14px; white-space: nowrap; font-size: 15px; font-weight: 600; color: var(--ink); border-bottom: 3px solid transparent; }
.mainnav a:first-child { padding-left: 0; }
.mainnav a:hover { color: var(--primary); border-bottom-color: var(--line); }
.mainnav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--gold); }
.topbar .wrap { justify-content: flex-end; }
.topbar-help { margin-right: auto; opacity: .9; }
.topbar-help a { text-decoration: underline; }
@media (max-width: 800px) {
  .mainnav .wrap { height: 44px; }
  .mainnav a { font-size: 14px; padding: 0 10px; }
  .topbar .wrap { justify-content: flex-end; gap: 18px; }
}
.affiliate-abbr { font-size: 18px; padding: 0 6px; text-align: center; }
@media (max-width: 800px) { .affiliate-abbr { font-size: 13px; padding: 0 4px; letter-spacing: 0; } }

/* Homepage mission */
.mission { background: var(--teal-soft); }
.mission-grid { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; }
.mission-logo { width: 260px; max-width: 100%; height: auto; }
.mission-list { list-style: none; counter-reset: m; margin: 24px 0 0 !important; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mission-list li { counter-increment: m; position: relative; padding: 20px 20px 20px 72px; background: #fff; border-radius: 6px; border-top: 4px solid var(--gold); font-weight: 600; font-size: 17px; line-height: 1.45; }
.mission-list li::before { content: counter(m); position: absolute; left: 20px; top: 18px; width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 800; }
@media (max-width: 800px) {
  .mission-grid { grid-template-columns: 1fr; gap: 28px; }
  .mission-logo { width: 180px; }
  .mission-list { grid-template-columns: 1fr; }
}


/* Condition guides: "Questions people ask" (answer-first FAQ, mirrored in FAQPage structured data) */
.faq { margin-top: 48px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 700; font-size: 18px; color: var(--primary); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > :not(summary) { margin-bottom: 16px; }

/* Medical aid: Chronic Disease List */
.cdl-list { columns: 2; column-gap: 32px; }
.cdl-list li { break-inside: avoid; }

/* Inhaler-with-spacer step cards with line illustrations */
.step-cards { list-style: none; counter-reset: sc; margin: 24px 0 0 !important; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.step-card { counter-increment: sc; border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px 20px; background: #fff; margin: 0 !important; }
.step-card .step-art { display: block; width: 100%; max-width: 260px; height: auto; color: var(--primary); background: var(--soft); border-radius: 4px; margin-bottom: 14px; padding: 8px; }
.step-card > b { display: block; font-size: 18px; color: var(--ink); margin-bottom: 4px; }
.step-card > b::before { content: counter(sc) ". "; color: var(--accent); }
.step-card > span { color: var(--muted); }
@media (max-width: 640px) { .step-cards { grid-template-columns: 1fr; } .cdl-list { columns: 1; } }

/* Patient handout box (guide sidebar) + member practice branding preview */
.handout-box .btn { width: 100%; }
.practice { margin-top: 14px; font-size: 15px; }
.practice summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.member-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.practice-form { display: grid; gap: 10px; margin-top: 12px; }
.practice-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.practice-form input[type=text], .practice-form input[type=tel] { padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.practice-form .form-note { font-size: 13px; color: var(--muted); margin: 0; }

/* The handout itself only exists on paper */
.handout { display: none; }

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; color: #000; }
  .skip, .topbar, .header, .mainnav, .panel, .footer, .aside, .toc, .tabs, .btns, .faq summary::after { display: none !important; }
  .tabpanel { display: block !important; }
  .faq details > * { display: block !important; }
  .tr .w, [data-rv], .tile-pins i, .tile-sheet { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .page-hero { background: none !important; color: #000 !important; border: 0; padding: 0 0 6mm; }
  .page-hero .wrap > *, .page-hero .w { animation: none !important; opacity: 1 !important; transform: none !important; }
  .page { padding: 0; }
  .layout, .layout.left { display: block; }
  .prose { max-width: none; }
  a { color: #000 !important; text-decoration: none !important; }
  .step-cards { grid-template-columns: repeat(4, 1fr); gap: 3mm; }
  .step-card { break-inside: avoid; padding: 2.5mm 3mm; font-size: 9.5pt; }
  .step-card > b { font-size: 10.5pt; }
  .prose .lead-p { font-size: 11pt; }
  .step-card .step-art { max-width: none; background: none; border: 1px solid #ccc; margin-bottom: 2mm; }
  .faq { display: none !important; }
  .prose > section + section { margin-top: 5mm; padding-top: 4mm; }
  .prose h2 { font-size: 17pt; margin-bottom: 2mm; }
  .prose p, .prose li { font-size: 10pt; margin-bottom: 1.5mm; }
  .steps li { padding: 2mm 3mm 2mm 12mm; }
  .steps li::before { left: 3mm; top: 2mm; width: 6mm; height: 6mm; font-size: 9pt; }
  .page-hero h1 { font-size: 24pt; }

  /* Pages with a patient handout print only the handout: one A4 sheet */
  body:has(.handout) main > :not(.handout) { display: none !important; }
  .handout { display: block !important; font-size: 11pt; line-height: 1.4; color: #000; }
  .ho-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #000; padding-bottom: 3mm; margin-bottom: 4mm; }
  .ho-logo { height: 15mm; width: auto; }
  .ho-practice { text-align: right; font-size: 10pt; }
  .ho-practice img { max-height: 15mm; max-width: 50mm; display: block; margin-left: auto; margin-bottom: 1mm; }
  .ho-practice b { font-size: 12pt; display: block; }
  .ho-title { font-family: var(--display); font-size: 24pt; line-height: 1.1; margin: 0; }
  .ho-sub { margin: 1mm 0 4mm; font-size: 10pt; }
  .ho-body { columns: 2; column-gap: 7mm; }
  .ho-block { break-inside: avoid; margin-bottom: 3.5mm; }
  .ho-h { font-weight: 700; font-size: 11.5pt; margin: 0 0 1mm; }
  .ho-block p, .ho-block li { margin: 0 0 1.5mm; }
  .ho-block ul { margin: 0 0 1.5mm 4mm; padding: 0; }
  .ho-block .callout { border: 1.5px solid #000; background: none; padding: 2mm 3mm; margin: 1.5mm 0; }
  .ho-notes { border: 1.5px solid #000; border-radius: 2mm; padding: 3mm 4mm; margin-top: 3mm; break-inside: avoid; }
  .ho-lines { height: 38mm; background: repeating-linear-gradient(#fff 0 7.4mm, #999 7.4mm 7.6mm); }
  .ho-foot { margin-top: 3mm; font-size: 8pt; color: #333; }
}

/* ===================== Thursday build: golden brand, alive homepage, doctor finder ===================== */
:root { --gold-light: #F3D27A; --gold-deep: #A8760E; }

/* Brand: golden badge + wordmark (replaces the old logo everywhere) */
.brand { gap: 12px; color: var(--ink); text-decoration: none; }
.brand-badge { position: relative; display: block; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; flex: none;
  box-shadow: 0 6px 18px -8px rgba(168,118,14,.55); }
.brand-badge img { width: 100%; height: 100%; display: block; }
.brand-badge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.9) 50%, transparent 70%);
  transform: translateX(-130%); }
@keyframes badge-shine { to { transform: translateX(130%); } }
.brand-text { display: grid; line-height: 1.05; }
.brand-text b { font-size: 26px; font-weight: 800; letter-spacing: .02em; color: var(--ink); }
.brand-text small { font-family: var(--display); font-size: 14px; color: var(--gold-deep); margin-top: 3px; }
.footer-logo { background: none; padding: 0; }
.footer-logo .brand-text b { color: #fff; }
.footer-logo .brand-text small { color: var(--gold-light); }
@media (max-width: 560px) {
  .brand-badge { width: 46px; height: 46px; }
  .brand-text b { font-size: 21px; }
  .brand-text small { font-size: 11.5px; max-width: 150px; }
}

/* "Be part of the change": the link list was dark blue on dark blue */
.downloads.on-dark a { color: #fff !important; }
.downloads.on-dark a:hover { color: #fff !important; }
.doctors-band .eyebrow { color: var(--gold-light); }

/* Buttons: sizes + press feedback */
.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn-sm { padding: 9px 18px; font-size: 15px; }
.hero .btn-light { box-shadow: 0 10px 30px -10px rgba(243,210,122,.6); }
.hero .btn-light:hover { background: var(--gold-light); color: var(--ink); }

/* Golden glass medallion (mission section) */
.glass-medal { position: relative; width: 300px; max-width: 70vw; aspect-ratio: 1; border-radius: 50%; padding: 20px; flex: none;
  background: linear-gradient(145deg, rgba(255,255,255,.85), rgba(255,255,255,.35));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); overflow: hidden;
  box-shadow: 0 40px 70px -30px rgba(2,34,75,.45), 0 0 0 1px rgba(202,146,23,.45), inset 0 2px 0 rgba(255,255,255,.95), inset 0 -10px 30px rgba(202,146,23,.12); }
.glass-medal img { width: 100%; height: 100%; display: block; border-radius: 50%; }
.glass-medal::before { content: ""; position: absolute; inset: -40%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(243,210,122,.0) 40%, rgba(243,210,122,.55) 55%, rgba(243,210,122,0) 70%); opacity: 0; }
.glass-shine { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.95) 48%, rgba(255,240,200,.6) 52%, transparent 66%); transform: translateX(-130%); }
@keyframes glass-sweep { to { transform: translateX(130%); } }
@keyframes glass-glow { 0% { opacity: 0; transform: scale(.7); } 45% { opacity: 1; } 100% { opacity: 0; transform: scale(1.15); } }
@media (max-width: 800px) { .glass-medal { width: 220px; } }

/* Scrollytelling: "One doctor, your whole story" */
.story { background: linear-gradient(180deg, #fff 0%, var(--soft) 100%); }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.story-visual { position: sticky; top: 150px; min-height: min(62vh, 560px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; }
.story-stage { position: relative; width: min(400px, calc(100% - 32px), 48vh); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--primary-soft) 70%); box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -40px rgba(2,34,75,.35); }
.story-ring { position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(202,146,23,.16); border-top-color: var(--gold);
  transform: rotate(calc(var(--step, 0) * 72deg)); }
.story-art { position: absolute; inset: 24%; color: var(--primary); opacity: 0; transform: scale(.85) translateY(14px); }
.story-art svg { width: 100%; height: 100%; }
.story-art.is-active { opacity: 1; transform: none; }
.story-dots { display: flex; gap: 12px; }
.story-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.story-dots span.is-active { background: var(--gold); transform: scale(1.4); }
.story-intro { margin-bottom: 24px; }
.story-step { min-height: 52vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; opacity: .28; }
.story-step.is-active { opacity: 1; }
.story-num { font-family: var(--display); font-size: 20px; color: var(--gold-deep); letter-spacing: .08em; }
.story-step h3 { font-size: clamp(28px, 3vw, 40px); margin: 8px 0 12px; }
.story-step p { font-size: 19px; color: var(--muted); max-width: 520px; }
.story-art-inline { display: none; }
.story-cta { padding: 12px 0 40px; }
@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; gap: 0; }
  .story-visual { display: none; }
  .story-step { min-height: 0; opacity: 1; padding: 26px 0; border-top: 1px solid var(--line); }
  .story-art-inline { display: block; width: 64px; height: 64px; color: var(--primary); margin: 10px 0 4px; }
}
html:not(.js) .story-step { opacity: 1; }

/* Bento grid: "What SFPP does for you" */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(190px, auto); gap: 16px;
  grid-template-areas: "find find hand hand" "find find lib  aid" "spc  cpd  join join"; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tile h3 { font-size: 23px; line-height: 1.2; }
.tile p { color: var(--muted); font-size: 15.5px; }
.tile .link { margin-top: auto; }
.tile-kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.bento > :nth-child(1) { grid-area: find; } .bento > :nth-child(2) { grid-area: hand; } .bento > :nth-child(3) { grid-area: lib; }
.bento > :nth-child(4) { grid-area: aid; } .bento > :nth-child(5) { grid-area: spc; } .bento > :nth-child(6) { grid-area: cpd; }
.bento > :nth-child(7) { grid-area: join; }
.t-find { background: radial-gradient(circle at 85% 85%, rgba(243,210,122,.35), transparent 45%), var(--primary); color: #fff; border-color: var(--primary); padding: 36px; }
.t-find h3 { font-size: clamp(30px, 3vw, 42px); color: #fff; max-width: 440px; }
.t-find p { color: rgba(255,255,255,.85); font-size: 17px; max-width: 420px; }
.t-find .tile-kicker, .t-find .link { color: var(--gold-light); }
.tile-pins { position: absolute; right: 36px; bottom: 30px; width: 150px; height: 120px; }
.tile-pins i { position: absolute; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--gold-light);
  box-shadow: 0 0 0 6px rgba(243,210,122,.18); }
.tile-pins i:nth-child(1) { left: 10px; top: 60px; } .tile-pins i:nth-child(2) { left: 70px; top: 18px; }
.tile-pins i:nth-child(3) { left: 118px; top: 74px; }
.t-handout { padding-right: 150px; }
.tile-sheet { position: absolute; right: 26px; top: 26px; width: 96px; height: 128px; background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 16px 30px -18px rgba(2,34,75,.5); padding: 12px; display: grid; gap: 8px; align-content: start; transform: rotate(4deg); }
.tile-sheet b { height: 18px; width: 18px; border-radius: 50%; background: var(--gold); }
.tile-sheet i { height: 5px; border-radius: 3px; background: var(--line); }
.tile-sheet i:nth-child(3) { width: 70%; } .tile-sheet i:nth-child(5) { width: 55%; }
.t-handout:hover .tile-sheet { transform: rotate(0) translateY(-4px); }
.t-join { background: linear-gradient(135deg, #FFF8E6, #fff 60%); border-color: rgba(202,146,23,.45); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "find find" "hand hand" "lib aid" "spc cpd" "join join"; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "find" "hand" "lib" "aid" "spc" "cpd" "join"; }
  .t-handout { padding-right: 26px; } .tile-sheet { display: none; } .tile-pins { opacity: .35; }
}

/* Doctor finder */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.finder-box { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.prose > .finder-box + section { border-top: 0; }
.finder-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 4px 0 10px; }
.finder-controls select { padding: 12px 14px; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: #fff; min-width: 240px; max-width: 100%; }
.finder-or { color: var(--muted); }
.finder-status { font-size: 15px; color: var(--muted); }
.doc-list { display: grid; gap: 14px; margin: 16px 0; }
.dr-card { display: grid; grid-template-columns: 96px 1fr; gap: 18px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.dr-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(202,146,23,.5); }
.dr-card h3 { font-size: 22px; margin: 0 0 4px; }
.prose .dr-card p { margin: 0 0 6px; font-size: 15px; }
.doc-area { font-weight: 600; color: var(--ink) !important; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.doc-dist { color: var(--gold-deep); }
.pin { width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--gold); flex: none; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 10px; }
.prose .doc-actions .btn { color: #fff; text-decoration: none; }
.dr-card.is-nearest { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243,210,122,.35); }
@media (max-width: 560px) { .dr-card { grid-template-columns: 64px 1fr; } .dr-card img { width: 64px; height: 64px; } .finder-box { padding: 20px; } }

/* About: priorities */
.priorities { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.priority { border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 8px; padding: 18px 20px; background: #fff; }
.prose .priority h3 { font-size: 20px; margin: 0 0 6px; }
.prose .priority p { font-size: 15px; margin: 0; color: var(--muted); }
@media (max-width: 640px) { .priorities { grid-template-columns: 1fr; } }

/* Hero parallax (background moves slower than the page; set by app.js) */
.hero { background-position: center calc(30% + var(--parallax, 0px)); }

/* Useful-links lists: descriptions wrap instead of widening the page */
.downloads.links span { white-space: normal; text-align: right; max-width: 48%; }
@media (max-width: 560px) { .downloads.links a { flex-direction: column; align-items: start; gap: 4px; } .downloads.links span { text-align: left; max-width: none; } }

/* ===================== Remaining features: share, leaders, 5-question guide, action plan, brand page ===================== */
/* Gold text on white must meet WCAG AA (4.5:1) */
:root { --gold-deep: #8A6008; }

/* Recognised SFPP member badge on doctor cards */
.member-badge { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 9px; border-radius: 999px; font-family: var(--body);
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); background: linear-gradient(135deg, var(--gold-light), var(--gold)); }

/* Share bar (WhatsApp first: how South Africans pass health information on) */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; }
.share-bar > span { font-weight: 700; color: var(--ink); margin-right: 4px; }
.share-wa, .share-copy { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.prose .share-wa, .share-wa { background: #1F9D55; color: #fff; text-decoration: none; border: 0; }
.share-wa:hover { background: #17824A; }
.share-wa svg { width: 18px; height: 18px; }
.share-copy { background: #fff; border: 1.5px solid var(--line); color: var(--primary); }
.share-copy.is-done { border-color: var(--teal); color: var(--teal); }

/* Homepage: leadership strip + partners */
.leader-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.leader { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 22px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; }
.leader img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(202,146,23,.55); margin-bottom: 6px; }
.leader b { font-family: var(--display); font-weight: 500; font-size: 18px; line-height: 1.2; }
.leader span { font-size: 13.5px; color: var(--muted); }
.affil-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; justify-content: center; margin-top: 28px; color: var(--muted); font-size: 14px; }
.affil-row span { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.affil-row a { font-weight: 700; color: var(--primary); font-size: 17px; letter-spacing: .02em; }
.affil-row a:hover { color: var(--gold-deep); }
@media (max-width: 900px) { .leader-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .leader-row { grid-template-columns: repeat(2, 1fr); } .leader img { width: 88px; height: 88px; } }

/* "Should I see a specialist family physician?" */
.sq { display: grid; gap: 14px; margin: 24px 0; }
.sq-q { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: #fff; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.sq-q legend { float: left; width: 100%; font-weight: 600; font-size: 17px; color: var(--ink); display: flex; gap: 12px; margin-bottom: 6px; }
.sq-q legend span { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 14px; }
.sq-q label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600; }
.sq-q label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.sq-q input { accent-color: var(--primary); }
.sq-result { border-radius: 14px; padding: 24px 26px; background: var(--primary); color: #fff; margin: 8px 0 24px; }
.sq-result h2 { color: #fff; font-size: 28px; margin-bottom: 8px; }
.prose .sq-result p { color: rgba(255,255,255,.9); }
.sq-result.is-maybe { background: var(--teal-soft); color: var(--ink); }
.sq-result.is-maybe h2 { color: var(--ink); }
.prose .sq-result.is-maybe p { color: var(--ink); }

/* Asthma action plan: visible on screen, prints alone on one A4 page */
.handout.handout-visible { display: block; padding: 48px 0 8px; }
.ap-inner { max-width: 1000px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px; box-shadow: 0 30px 60px -40px rgba(2,34,75,.4); }
.ap .ho-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 14px; }
.ap .ho-logo { height: 64px; width: auto; }
.ap .ho-practice { text-align: right; font-size: 14px; }
.ap .ho-practice img { max-height: 56px; max-width: 200px; display: block; margin-left: auto; }
.ap .ho-practice b { display: block; font-size: 17px; }
.ap .ho-title { font-family: var(--display); font-size: 34px; margin: 0 0 10px; }
.ap-who { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: flex-end; margin-bottom: 16px; font-weight: 600; }
.ap-blank { display: inline-block; border-bottom: 1.5px solid var(--ink); height: 1.1em; vertical-align: bottom; margin: 0 2px; }
.ap-zone { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 18px; padding: 16px; border-radius: 10px; margin-bottom: 12px; border-left: 10px solid;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ap-zone ul { margin: 0 0 0 18px; padding: 0; }
.ap-zone li { margin-bottom: 6px; line-height: 1.45; }
.ap-tag b { display: block; font-size: 22px; letter-spacing: .06em; }
.ap-tag small { font-weight: 600; }
.ap-h { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin: 0 0 6px; }
.ap-green { background: #E8F5EC; border-color: #2E8B57; } .ap-green .ap-tag b { color: #1E6B40; }
.ap-yellow { background: #FFF6DA; border-color: #E0A800; } .ap-yellow .ap-tag b { color: #7A5A00; }
.ap-red { background: #FDE8E6; border-color: #C62828; } .ap-red .ap-tag b { color: #A01F1F; }
.ap .ho-notes { border: 1.5px solid var(--ink); border-radius: 8px; padding: 10px 14px; margin-top: 10px; }
.ap .ho-h { font-weight: 700; margin: 0 0 4px; }
.ap .ho-lines.ap-lines { height: 60px; background: repeating-linear-gradient(#fff 0 27px, #bbb 27px 28px); }
.ap .ho-foot { font-size: 13px; color: var(--muted); margin-top: 10px; }
@media (max-width: 760px) { .ap-zone { grid-template-columns: 1fr; } .ap-inner { padding: 20px; } }
@media print {
  .handout.handout-visible { padding: 0; }
  .ap-inner { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .ap .ho-title { font-size: 22pt; margin-bottom: 2mm; }
  .ap-who { font-size: 10pt; margin-bottom: 3mm; }
  .ap-zone { grid-template-columns: 26mm 1fr 1fr; gap: 4mm; padding: 3mm 4mm; margin-bottom: 3mm; font-size: 10pt; break-inside: avoid; }
  .ap-tag b { font-size: 15pt; }
  .ap .ho-lines.ap-lines { height: 18mm; background: repeating-linear-gradient(#fff 0 8.6mm, #999 8.6mm 8.8mm); }
  .ap .ho-foot { font-size: 8pt; }
  .ap .ho-logo { height: 15mm; }
}

/* Brand identity page */
.brand-logos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.brand-logos > div { border-radius: 14px; padding: 36px; display: grid; place-items: center; border: 1px solid var(--line); }
.brand-logos img { width: 180px; height: auto; }
.bl-dark { background: var(--primary); }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.swatch { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; background: #fff; }
.swatch > span { height: 84px; }
.swatch b, .swatch code, .swatch small { padding: 0 14px; }
.swatch b { padding-top: 10px; }
.swatch code { font-size: 14px; color: var(--muted); }
.swatch small { padding-bottom: 12px; font-size: 13px; color: var(--muted); }
.type-display { font-family: var(--display); font-size: 40px; color: var(--ink) !important; margin-bottom: 4px !important; }
.type-body { font-size: 26px; font-weight: 700; color: var(--ink) !important; margin: 18px 0 4px !important; }
@media (max-width: 760px) { .swatches { grid-template-columns: 1fr 1fr; } .brand-logos { grid-template-columns: 1fr; } }

/* =====================================================================================
   MOTION SYSTEM: one curve, one clock per scene, one direction per role
   -------------------------------------------------------------------------------------
   Curve      --ease for every entrance, hover and state change on the site.
   Speeds     --t-ui (hover, press, menus) < --t-state (story steps, swaps)
              < --t-reveal (scroll reveals) < page entrance (hero, banners).
   Direction  Page entrances arrive from the left, headline included.
              Content revealed while scrolling rises.
              Photos and the medal arrive from their outer edge.
   Order      Page entrance: pure CSS, starts with the first paint.
              Scenes (app.js): label + media at 0, headline words from 80ms,
              body text once the first words have landed, then items in an
              easing stagger. --d is each element's start on its scene's clock.
   Lead       The headline travels furthest; body and items travel less;
              labels (eyebrows) only fade.
   ===================================================================================== */
:root {
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-ui: 220ms;
  --t-state: 650ms;
  --t-word: 900ms;
  --gap-word: 100ms;
  --t-reveal: 1200ms;
}
@keyframes from-left  { from { opacity: 0; transform: translateX(var(--from, -20px)); } }
@keyframes from-below { from { opacity: 0; transform: translateY(var(--from, 24px)); } }
@keyframes fade-in    { from { opacity: 0; } }
@keyframes drop-in    { from { opacity: 0; transform: translateY(-8px); } }

/* ---- Page entrance: homepage hero (seen once per visit, so it gets room) ----
   eyebrow 100ms → headline words from 220ms, 100ms apart → paragraph 620ms → buttons 820ms.
   Everything lands together around 2.1s; the buttons are clickable from the first frame. */
.hero { overflow: hidden; }
.hero .eyebrow  { --from: -16px; animation: from-left 1200ms var(--ease) 100ms backwards; }
.tr .w { display: inline-block; }
.hero h1 .w     { --from: -.35em; animation: from-left 1100ms var(--ease) backwards; animation-delay: calc(220ms + var(--i) * var(--gap-word)); }
.hero .wrap > p { --from: -20px; animation: from-left 1400ms var(--ease) 620ms backwards; }
.hero .btns     { --from: -16px; animation: from-left 1400ms var(--ease) 820ms backwards; }

/* ---- Page entrance: inner page banners (seen on every click, so lighter and quicker) ---- */
.page-hero .crumbs { animation: fade-in 600ms var(--ease) backwards; }
.page-hero h1 .w   { --from: -.25em; animation: from-left 800ms var(--ease) backwards; animation-delay: calc(60ms + var(--i) * 55ms); }
.page-hero .lead   { --from: -14px; animation: from-left 900ms var(--ease) 200ms backwards; }
.page-hero .btns   { --from: -12px; animation: from-left 900ms var(--ease) 280ms backwards; }

/* The header badge catches the light once per visit, as the page headline lands */
.first-view .brand-badge::after { animation: badge-shine 1300ms var(--ease) 1250ms both; }

/* ---- Section headlines: words rise one after another; they replay after you scroll back up past them ---- */
.motion .tr:not(h1) .w { opacity: 0; transform: translateY(.45em);
  transition: opacity 350ms var(--ease), transform 350ms var(--ease); transition-delay: calc(var(--r, 0) * 25ms); }
.motion .tr.in:not(h1) .w { opacity: 1; transform: none; transition-duration: var(--t-word);
  transition-delay: calc(var(--d, 0ms) + var(--i) * var(--gap-word)); }

/* ---- Scroll reveals (roles cast by app.js) ---- */
.motion [data-rv] { opacity: 0; }
.motion [data-rv].rv-in { opacity: 1; animation: from-below var(--t-reveal) var(--ease) var(--d, 0ms) backwards; }
.motion [data-rv="text"] { --from: 16px; }
.motion [data-rv="item"] { --from: 28px; }
.motion [data-rv="label"].rv-in { animation-name: fade-in; animation-duration: 900ms; }
.motion [data-rv="media-left"].rv-in  { --from: -40px; animation-name: from-left; animation-duration: 1400ms; }
.motion [data-rv="media-right"].rv-in { --from: 40px;  animation-name: from-left; animation-duration: 1400ms; }
.rv-clip { overflow-x: clip; } /* sideways media never causes horizontal scroll on phones */

/* Golden glass medal: blur-to-sharp is the lead; the glow and the light sweep land as it settles */
.motion .glass-medal[data-rv] { opacity: 0; transform: scale(.86) rotate(-6deg); filter: blur(10px); }
.motion .glass-medal[data-rv].rv-in { opacity: 1; transform: none; filter: none; animation: none;
  transition: opacity 900ms var(--ease) var(--d, 0ms), transform 1400ms var(--ease) var(--d, 0ms), filter 1100ms var(--ease) var(--d, 0ms); }
.glass-medal.rv-seen .glass-shine { animation: glass-sweep 1500ms var(--ease) calc(var(--d, 0ms) + 750ms) both; }
.glass-medal.rv-seen::before { animation: glass-glow 1900ms var(--ease) calc(var(--d, 0ms) + 550ms) both; }

/* Bento accents, synced to their tile: the pins drop onto the map as the tile settles, then breathe slowly;
   the handout sheet settles into place just after its tile */
.tile-pins i { --p: 0; } .tile-pins i:nth-child(2) { --p: 1; } .tile-pins i:nth-child(3) { --p: 2; }
.motion .t-find .tile-pins i { opacity: 0; }
.motion .t-find.rv-seen .tile-pins i { opacity: 1; animation: pin-drop 900ms var(--ease) backwards, pin-bob 5.5s ease-in-out infinite;
  animation-delay: calc(var(--d, 0ms) + 500ms + var(--p) * 120ms), calc(var(--d, 0ms) + 1700ms + var(--p) * 900ms); }
@keyframes pin-drop { from { opacity: 0; translate: 0 -24px; } }
@keyframes pin-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.motion .t-handout .tile-sheet { opacity: 0; }
.motion .t-handout.rv-seen .tile-sheet { opacity: 1; animation: sheet-in 1100ms var(--ease) calc(var(--d, 0ms) + 350ms) backwards; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px) rotate(12deg); } }

/* Numbers keep their width while they count up */
.stat b { font-variant-numeric: tabular-nums; }

/* ---- Story: the outgoing picture sinks away while the next one rises in (one crossfade) ---- */
.story-ring { transition: transform 1100ms var(--ease); }
.story-art { transition: opacity 400ms var(--ease), transform 500ms var(--ease); }
.story-art.is-active { transition: opacity var(--t-state) var(--ease) 90ms, transform 1000ms var(--ease) 90ms; }
.story-dots span { transition: background-color var(--t-ui) var(--ease), transform 450ms var(--ease); }
.story-step { transition: opacity var(--t-state) var(--ease); }

/* ---- Interface: hover, press, menus, tabs, answers (quick, same curve) ---- */
.btn { transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease),
  box-shadow var(--t-ui) var(--ease), transform var(--t-ui) var(--ease); }
.btn:active { transform: scale(.97); transition-duration: 80ms; }
.card, .tile, .province, .leader, .dr-card { transition: transform 450ms var(--ease), box-shadow 450ms var(--ease), border-color var(--t-ui) var(--ease); }
.card:hover, .tile:hover, .province:hover, .leader:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(2,34,75,.45); }
.tile-sheet { transition: transform 450ms var(--ease); }
.dr-card.is-nearest { transition-delay: 0ms, 0ms, 350ms; } /* the highlight lands as the nearest card arrives at the top */
.motion .panel:not([hidden]) { animation: drop-in 280ms var(--ease) backwards; }
.motion .tabpanel:not([hidden]) { animation: fade-in 280ms var(--ease) backwards; }
.motion .faq details[open] > :not(summary) { --from: 8px; animation: from-below 500ms var(--ease) backwards; }
.motion .sq-result:not([hidden]) { --from: 16px; animation: from-below 700ms var(--ease) backwards; }

/* ---- Reduced motion: collapse the choreography; everything simply appears ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: 1ms !important; transition-delay: 0s !important; }
}

/* Homepage: the doctor finder is the first thing under the hero */
#find-near-you { scroll-margin-top: 140px; }
.home-finder .finder-box { padding: 28px 28px 8px; }
.home-finder .doc-list { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.home-finder .dr-card { grid-template-columns: 72px 1fr; align-content: start; }
.home-finder .dr-card img { width: 72px; height: 72px; }
.home-finder .dr-card h3 { font-size: 20px; }
.home-finder .dr-card p { margin: 0 0 6px; font-size: 14.5px; color: var(--muted); }
.home-finder .dr-card .doc-area { color: var(--ink); }
.home-finder .doc-actions { margin-top: 10px; }
.home-finder .provinces { margin-top: 24px; }
@media (max-width: 1100px) { .home-finder .doc-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .home-finder .doc-list { grid-template-columns: 1fr; } .home-finder .finder-box { padding: 20px 18px 4px; } }

/* POPIA consent on forms */
.form label.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; color: var(--muted); }
.form label.consent input { margin-top: 4px; accent-color: var(--primary); flex: none; }
.form-done .link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.footer-bottom a { text-decoration: underline; }

/* Health Library lists: every item is a link to its guide */
.item-grid li { padding: 0; }
.item-grid li a { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; color: var(--ink); text-decoration: none !important;
  border-radius: 6px; transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease); }
.item-grid li a:hover { background: var(--primary-soft); color: var(--primary); }
.item-grid li a small { color: var(--accent); }

/* Research: the evidence behind the website + numbered sources */
.evidences { display: grid; gap: 14px; margin-top: 16px; }
.evidence { border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; padding: 18px 22px; background: #fff; }
.prose .evidence h3 { margin: 0 0 8px; font-size: 21px; }
.prose .evidence p { margin-bottom: 8px; }
.prose .evidence .evidence-so { margin: 0; color: var(--ink); }
.prose sup a { text-decoration: none; font-weight: 700; color: var(--gold-deep); padding: 0 1px; }
.sources { margin: 12px 0 18px 22px; }
.sources li { margin-bottom: 12px; scroll-margin-top: 150px; }
.sources li span { display: block; font-size: 14px; color: var(--muted); }
.sources li:target { background: var(--primary-soft); border-radius: 4px; }

/* Homepage audience gateway: four clear ways in */
.aud-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.aud { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold);
  color: var(--ink); text-decoration: none; transition: transform 450ms var(--ease), box-shadow 450ms var(--ease); }
.aud:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(2,34,75,.45); }
.aud h3 { font-size: 23px; line-height: 1.25; }
.aud .link { margin-top: auto; }
.section.audiences { padding-bottom: 24px; }
@media (max-width: 1000px) { .aud-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .aud-grid { grid-template-columns: 1fr; } }

/* Header: "Find an SFP" is the main action */
.header-actions > a.hdr-cta { background: var(--primary); color: #fff; padding: 10px 20px; border-radius: 999px; text-decoration: none;
  transition: background-color var(--t-ui) var(--ease), transform var(--t-ui) var(--ease); }
.header-actions > a.hdr-cta:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.header-actions > a.hdr-cta:active { transform: scale(.97); }

/* Chairperson badge, bio links, six leaders, social icons */
.member-badge.badge-chair { background: var(--primary); color: #fff; margin-right: 4px; }
.bio-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.contact-list li a + a { margin-left: 12px; }
.dr-card .doc-actions .link { overflow-wrap: anywhere; }
.leader-row { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) { .leader-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .leader-row { grid-template-columns: repeat(2, 1fr); } }
.socials { display: flex; gap: 12px; margin: 0 0 18px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff;
  transition: background-color var(--t-ui) var(--ease), transform var(--t-ui) var(--ease); }
.socials a:hover { background: var(--gold); color: var(--ink); transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; }
