/* zacsouthern.com.au – shared styles (design D · Clean + bold) */

/* Fonts are stored with the site (no Google connection). Both are SIL Open Font Licence. */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/barlow-condensed-800-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-variable-latin.woff2') format('woff2');
}

:root {
  --navy: #0F2A3D;
  --navy-line: #23435A;
  --teal: #0B6E78;
  --teal-dark: #084F57;
  --teal-light: #7FE0D6;
  --body: #3B5366;
  --muted: #5A7184;
  --border: #DDE5EB;
  --pale: #F3F7F9;
  --on-navy: #C9D6E0;
  --white: #FFFFFF;
  --heading: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Motion tokens: three durations, one easing, one reveal distance */
  --dur-1: 150ms;
  --dur-2: 250ms;
  --dur-3: 400ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --reveal-dist: 20px;

  /* Height of the sticky header. site.js measures the real height and updates this. */
  --header-h: 72px;
}

/* Anchor jumps (#book, #region-knee, #ref-3) land below the sticky header */
html { scroll-padding-top: calc(var(--header-h) + 16px); }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--text);
  color: var(--navy);
  background: var(--white);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

a:focus-visible {
  outline: 3px solid var(--teal-light);
  outline-offset: 3px;
  border-radius: 4px;
}
.light-focus a:focus-visible,
main a:focus-visible { outline-color: var(--teal); }
.band-navy a:focus-visible { outline-color: var(--teal-light); }

h1, h2, h3 {
  font-family: var(--heading);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--teal-light);
  color: var(--navy);
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  z-index: 10;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  padding: 13px 20px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  line-height: 1.3;
}
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); color: var(--white); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-accent { background: var(--teal-light); color: var(--navy); }
.btn-accent:hover { background: #A6EBE3; color: var(--navy); }
.btn-outline-light { border-color: var(--white); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--navy); }

.text-link { font-weight: 600; }

/* ---------- Header / nav ---------- */

.band-navy { background: var(--navy); color: var(--white); }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--navy-line);
}

.logo {
  font-family: var(--heading);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}
.logo:hover { color: var(--teal-light); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 26px;
  font-size: 15px;
}
.site-nav a {
  position: relative;
  display: inline-block;
  color: var(--white);
  text-decoration: none;
  padding: 4px 0;
}
/* Underline grows from the left on hover, full width on the current page */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--teal-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease);
}
.site-nav a:hover { color: var(--white); }
.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 72px;
  padding-bottom: 88px;
}
.hero-text { flex: 1 1 540px; }
.hero-titles {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-light);
}
.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(48px, 7vw, 80px);
  line-height: 0.95;
}
.hero-lede {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--on-navy);
  max-width: 580px;
}
.hero-photo {
  flex: 0 1 400px;
  position: relative;
  margin: 0 0 0 16px;
}
.hero-photo::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 16px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--teal-light);
  border-radius: 6px;
}
.hero-photo img {
  position: relative;
  width: 100%;
  height: 460px;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
  background: var(--white);
}

/* ---------- Audience cards ---------- */

.audiences {
  position: relative;
  margin-top: -48px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 6px solid var(--navy);
  border-radius: 8px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(15, 42, 61, 0.08);
}
.card--primary { border-top-color: var(--teal); }
.card .eyebrow { color: var(--body); }
.card--primary .eyebrow { color: var(--teal); }
.card h2 { font-size: 30px; line-height: 1.05; }
.card p:not(.eyebrow) {
  margin: 0;
  line-height: 1.6;
  color: var(--body);
  flex-grow: 1;
}
.card .btn { align-self: flex-start; margin-top: 4px; }

/* ---------- Experience ---------- */

.experience {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  padding-top: 96px;
  padding-bottom: 88px;
}
.experience-intro { flex: 1 1 380px; }
.section-title {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 52px);
  line-height: 1;
}
.section-lede {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--body);
}
.experience-list {
  flex: 1 1 520px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 17px;
  line-height: 1.5;
}
.experience-list li {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.experience-list li:first-child { border-top: 2px solid var(--navy); }
.experience-list li:last-child { border-bottom: 1px solid var(--border); }

/* ---------- Resources ---------- */

.band-pale { background: var(--pale); }
.resources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding-top: 88px;
  padding-bottom: 88px;
}
.resources-text { flex: 1 1 440px; }
.resources-text .eyebrow { margin-bottom: 12px; }
.resources-text .section-title { margin-bottom: 16px; }
.resources-text .section-lede { margin-bottom: 24px; }
.diagram-placeholder {
  flex: 0 1 380px;
  min-height: 300px;
  border-radius: 8px;
  background: var(--white);
  border: 1px dashed #B7C7D3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

/* ---------- Book (coming soon) ---------- */

.book {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 88px;
  padding-bottom: 88px;
}
.book-covers {
  flex: 0 1 420px;
  display: flex;
  gap: 20px;
  padding-bottom: 32px;
}
.book-covers img {
  width: calc(50% - 10px);
  height: auto;
  border-radius: 4px;
  box-shadow: 0 12px 28px rgba(15, 42, 61, 0.22);
}
.book-covers img:last-child { transform: translateY(32px); }
.book-text { flex: 1 1 440px; }
.book-text .eyebrow { margin-bottom: 12px; }
.book-text .section-title { margin-bottom: 16px; }
.book-detail { margin: 0 0 28px; font-size: 16px; line-height: 1.7; color: var(--body); }
.book-note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Contact band ---------- */

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-top: 72px;
  padding-bottom: 72px;
}
.cta h2 {
  flex: 1 1 520px;
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1;
}
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.cta .btn { padding: 15px 24px; }

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 56px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.site-footer p { margin: 0; }

.placeholder {
  background: #FFF4CC;
  color: #5C4700;
  padding: 0 4px;
  border-radius: 3px;
}

/* ---------- Phones ---------- */

@media (max-width: 640px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .site-nav ul { gap: 6px 18px; font-size: 15px; }
  .hero { padding-top: 48px; padding-bottom: 80px; gap: 40px; }
  .hero-lede { font-size: 17px; }
  .hero-photo img { height: 380px; }
  .card { padding: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .experience { padding-top: 64px; padding-bottom: 64px; gap: 32px; }
  .resources { padding-top: 64px; padding-bottom: 64px; gap: 32px; }
  .diagram-placeholder { flex-basis: 100%; min-height: 220px; }
  .book { padding-top: 64px; padding-bottom: 64px; gap: 32px; }
  .cta { padding-top: 56px; padding-bottom: 56px; }
}

/* ==========================================================
   Inner pages
   ========================================================== */

.page-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 72px;
}
.page-hero-text { flex: 1 1 560px; }
.page-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(44px, 6vw, 68px);
  line-height: 0.95;
}
.page-hero .hero-lede { margin-bottom: 0; }
.page-hero .hero-photo { flex: 0 1 340px; }
.page-hero .hero-photo img { height: 400px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.section { padding-top: 80px; padding-bottom: 80px; }
.section + .section { padding-top: 0; }
.band-pale > .section + .section,
.band-pale .section { padding-top: 80px; }

.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head .section-title { margin-bottom: 14px; }
.section-head .section-lede { margin-bottom: 0; }

.prose {
  max-width: 760px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
}
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose h2 {
  margin: 48px 0 14px;
  font-size: 34px;
  line-height: 1.05;
  color: var(--navy);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  margin: 28px 0 8px;
  font-family: var(--text);
  text-transform: none;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0;
  color: var(--navy);
}
.prose strong { color: var(--navy); font-weight: 600; }

/* Grids of simple info cards */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.info-grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 26px;
}
.info-card h3 {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.05;
}
.info-card p { margin: 0 0 10px; line-height: 1.6; color: var(--body); }
.info-card p:last-child { margin-bottom: 0; }
.info-card .meta {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}

/* Numbered steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.steps li {
  counter-increment: step;
  border-top: 2px solid var(--navy);
  padding-top: 18px;
  line-height: 1.6;
  color: var(--body);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--heading);
  font-weight: 800;
  font-size: 36px;
  line-height: 1;
  color: var(--teal);
  margin-bottom: 10px;
}
.steps h3 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--navy);
}
.steps p { margin: 0; }

/* Two-column checklists */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}
.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
}
.ticks li {
  position: relative;
  padding: 12px 0 12px 30px;
  border-top: 1px solid var(--border);
}
.ticks li:last-child { border-bottom: 1px solid var(--border); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 21px;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--teal);
  border-bottom: 2.5px solid var(--teal);
  transform: rotate(-45deg);
}
.split h3, .topic-grid h3 {
  margin: 0 0 14px;
  font-size: 28px;
}

/* Notices */
.notice {
  border-left: 4px solid var(--teal);
  background: var(--pale);
  border-radius: 0 6px 6px 0;
  padding: 18px 22px;
  line-height: 1.6;
  color: var(--body);
  max-width: 760px;
}
.notice p { margin: 0; }
.notice p + p { margin-top: 8px; }
.notice strong { color: var(--navy); }

/* Fee / detail table */
.details {
  margin: 0;
  max-width: 760px;
  border-top: 2px solid var(--navy);
}
.details div {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 2fr;
  gap: 8px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.details dt { font-weight: 600; color: var(--navy); }
.details dd { margin: 0; color: var(--body); line-height: 1.6; }

/* Booking embed slot */
.embed-placeholder {
  min-height: 320px;
  border-radius: 8px;
  background: var(--white);
  border: 1px dashed #B7C7D3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

/* Resources: body regions */
.resources-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
}
.resources-layout .diagram-placeholder { flex: 0 1 360px; min-height: 460px; }
.region-list {
  flex: 1 1 480px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.region-list li {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
}
.region-list a,
.region-list span.region {
  display: block;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--navy);
}
.region-list a:hover { background: var(--pale); }
.region-name {
  display: block;
  font-family: var(--heading);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 22px;
  line-height: 1.1;
}
.region-status {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

/* Resources: clickable body diagram (built by tools/make_diagram.py) */
.bd-layout { align-items: flex-start; }
.bd-figure { flex: 0 0 460px; max-width: 100%; }
/* Sticky only while the map and the guide list sit side by side (460 + 40 + 480 px of content, plus 64 px padding = 1044 px,
   plus 20 px so a desktop scrollbar can't make it sticky while the layout is still stacked) */
@media (min-width: 1064px) {
  .bd-figure { position: sticky; top: calc(var(--header-h) + 24px); }
}
.body-diagram { width: 100%; height: auto; display: block; }
.bd-inactive path { fill: #E9EFF3; }
.bd-outline path { fill: none; stroke: var(--muted); stroke-width: 2; vector-effect: non-scaling-stroke; }
.bd-region path { fill: #A9D7DB; stroke: var(--white); stroke-width: 1; transition: fill .15s ease; }
.bd-region:hover path,
.bd-region:focus-visible path { fill: var(--teal); }
.bd-region:focus-visible { outline: none; }
.bd-region:focus-visible path { stroke: var(--navy); stroke-width: 3; }
.bd-labels text {
  font-family: var(--heading);
  font-weight: 800;
  font-size: 44px;
  letter-spacing: 2px;
  fill: var(--muted);
  text-anchor: middle;
}
.region-groups { flex: 1 1 480px; display: grid; gap: 36px; }
/* Adds to html's scroll-padding-top (header + 16 px), so a group lines up with the top of the sticky body map */
.region-group { scroll-margin-top: 8px; }
.region-group-title {
  font-family: var(--heading);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 26px;
  line-height: 1.1;
  color: var(--navy);
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--border);
}
.region-group:target .region-group-title { border-left-color: var(--teal); color: var(--teal); }
@media (max-width: 640px) {
  .bd-figure { flex-basis: 100%; }
}
.resources-subhead { font-size: 32px; margin: 56px 0 18px; }

/* Related guides at the end of each guide */
.related-guides { margin-top: 48px; }
.related-guides h2 { margin: 0 0 16px; font-size: 30px; line-height: 1.05; color: var(--navy); }

/* Home: small static body map linking to Resources */
.home-map { flex: 0 1 380px; max-width: 100%; }
.home-map .body-diagram { max-width: 380px; margin: 0 auto; }
.home-map-caption { margin: 12px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Contact */
.contact-email {
  display: inline-block;
  font-family: var(--heading);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.1;
  word-break: break-word;
}

@media (max-width: 640px) {
  .page-hero { padding-top: 40px; padding-bottom: 56px; gap: 36px; }
  .page-hero .hero-photo img { height: 340px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .band-pale .section { padding-top: 56px; }
  .details div { grid-template-columns: 1fr; gap: 4px; }
  .resources-layout .diagram-placeholder { min-height: 260px; }
}

/* Booking cards (Telehealth) */
.booking-card { display: flex; flex-direction: column; }
.booking-card p:not(.meta) { flex-grow: 1; }
.booking-card .btn { align-self: flex-start; margin-top: 8px; }

/* Body map "coming soon" visual */
.diagram-placeholder { flex-direction: column; gap: 16px; }
.body-outline { width: 90px; height: auto; fill: none; stroke: #B7C7D3; stroke-width: 2; stroke-linejoin: round; }

/* Guides: citation numbers and reference list */
.prose sup { line-height: 0; font-size: 0.7em; }
.prose sup a { text-decoration: none; font-weight: 600; padding: 0 1px; }
.references { font-size: 14px; line-height: 1.6; color: var(--muted); }
.references h2 { font-size: 26px; }
.references li:target { background: #FFF4CC; }

/* Experience list with years (Home) */
.experience-list--years li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.experience-list--years .year { flex-shrink: 0; font-size: 15px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Experience split into sporting, teaching and clinical groups */
.experience-groups { flex: 1 1 520px; min-width: 0; }
.experience-groups .experience-list + .experience-group-title { margin-top: 40px; }
.experience-group-title {
  margin: 0 0 12px;
  font-family: var(--heading);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
}

/* Clinicians: primary format card and three-column topics */
.info-card--primary { border: 2px solid var(--teal); }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px 40px; }

/* Long URLs (for example in guide reference lists) wrap instead of widening the page on phones */
.prose a, .prose li { overflow-wrap: anywhere; }

/* ==========================================================
   Motion and interaction (design upgrade, phase 1)
   Animate only transform and opacity. Everything here is turned
   off by prefers-reduced-motion at the end of this block.
   ========================================================== */

/* ---------- Sticky header ---------- */

.site-header-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  color: var(--white);
  view-transition-name: site-header;
  transition: box-shadow var(--dur-2) var(--ease);
}
.site-header { transition: border-color var(--dur-2) var(--ease); }
.logo {
  display: inline-block;
  transform-origin: left center;
  transition: transform var(--dur-2) var(--ease), color var(--dur-1) var(--ease);
}
/* After 80 px of scroll (site.js): shadow, and the logo shrinks a little (transform only, so nothing below moves) */
.site-header-bar.is-scrolled { box-shadow: 0 6px 20px rgba(6, 20, 30, 0.35); }
.site-header-bar.is-scrolled .site-header { border-bottom-color: transparent; }
.site-header-bar.is-scrolled .logo { transform: scale(0.88); }

/* ---------- Mobile menu (only when site.js has run; without it the nav wraps as before) ---------- */

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1.5px solid var(--navy-line);
  border-radius: 6px;
  background: transparent;
  color: var(--white);
  font: 600 15px/1 var(--text);
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.menu-toggle:hover { border-color: var(--teal-light); }
.menu-toggle:focus-visible { outline: 3px solid var(--teal-light); outline-offset: 3px; }
.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease);
}
.menu-toggle-icon { position: relative; }
.menu-toggle-icon::before,
.menu-toggle-icon::after { content: ""; position: absolute; left: 0; }
.menu-toggle-icon::before { transform: translateY(-6px); }
.menu-toggle-icon::after { transform: translateY(6px); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before { transform: rotate(45deg); background: var(--white); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::after { transform: rotate(-45deg); background: var(--white); }

@media (max-width: 960px) {
  .has-menu .site-header { flex-wrap: nowrap; }
  .has-menu .menu-toggle { display: inline-flex; }
  .has-menu .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--navy);
    border-top: 1px solid var(--navy-line);
    box-shadow: 0 16px 32px rgba(6, 20, 30, 0.4);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
  }
  .has-menu .menu-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s;
  }
  .has-menu .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 20px 20px;
    font-size: 20px;
  }
  .has-menu .site-nav li {
    border-bottom: 1px solid var(--navy-line);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
  }
  .has-menu .menu-open .site-nav li {
    opacity: 1;
    transform: none;
    transition-delay: calc(var(--i, 0) * 40ms);
  }
  .has-menu .site-nav a { display: block; padding: 14px 0; }
  .has-menu .site-nav a::after { bottom: 8px; right: auto; width: 48px; }
}

/* ---------- Buttons and links ---------- */

.btn {
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.btn:focus-visible,
button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.band-navy .btn:focus-visible { outline-color: var(--teal-light); }

/* Arrows nudge right on hover or keyboard focus */
.arrow,
.btn span[aria-hidden="true"],
.text-link span[aria-hidden="true"] {
  display: inline-block;
  transition: transform var(--dur-2) var(--ease);
}
a:hover .arrow, a:focus-visible .arrow,
.btn:hover span[aria-hidden="true"], .btn:focus-visible span[aria-hidden="true"],
.text-link:hover span[aria-hidden="true"], .text-link:focus-visible span[aria-hidden="true"] { transform: translateX(4px); }

/* Text links: a faint underline at rest, a solid one that grows from the left on hover */
.text-link {
  text-decoration: none;
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(color-mix(in srgb, currentColor 35%, transparent), color-mix(in srgb, currentColor 35%, transparent));
  background-repeat: no-repeat;
  background-position: left bottom, left bottom;
  background-size: 0 2px, 100% 1px;
  padding-bottom: 2px;
  transition: background-size var(--dur-2) var(--ease);
}
.text-link:hover,
.text-link:focus-visible { background-size: 100% 2px, 100% 1px; }

/* ---------- Cards: lift, deeper shadow, teal top bar grows left to right ---------- */

.card,
.region-list li {
  position: relative;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.card::before,
.region-list li::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -6px;
  height: 6px;
  border-radius: 8px 8px 0 0;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-3) var(--ease);
  pointer-events: none;
}
.region-list li::before { top: -1px; height: 4px; }
.card:hover, .card:focus-within,
.region-list li:hover, .region-list li:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(15, 42, 61, 0.14);
}
.card:hover::before, .card:focus-within::before,
.region-list li:hover::before, .region-list li:focus-within::before { transform: scaleX(1); }
.region-list a { transition: background-color var(--dur-1) var(--ease); }
.region-list a:focus-visible { outline-offset: -3px; border-radius: 8px; }

/* ---------- Scroll reveal (site.js adds .reveal only to content below the first screen) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-dist));
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Page-to-page transitions (Chrome, Edge, recent Safari; ignored elsewhere) ---------- */

@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 280ms; animation-timing-function: var(--ease); }
/* A guide's heading. site.js gives the clicked guide card's title the same name, so the title morphs into the heading. */
.guide-title { view-transition-name: guide-title; }

/* ==========================================================
   Guide pages (design upgrade, phase 2)
   Generated parts (section ids, the two "On this page" lists, read time,
   related-card details, print address) come from tools/guide_extras.py.
   ========================================================== */

/* Reading progress bar along the bottom of the sticky header (scroll-driven, no JS) */
.reading-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .reading-progress {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--teal-light);
    transform-origin: left;
    transform: scaleX(0);
    animation: reading-progress linear both;
    animation-duration: auto;
    animation-timeline: scroll(root block);
  }
}
@keyframes reading-progress { to { transform: scaleX(1); } }

/* Two columns at desktop: the guide, and a sticky "On this page" list */
.guide-layout { display: block; }
.guide-main { max-width: 760px; min-width: 0; }
.guide-meta { margin-bottom: 24px; }
.guide-toc { display: none; }
@media (min-width: 1100px) {
  .guide-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px) 250px;
    justify-content: space-between;
    gap: 64px;
  }
  .guide-toc {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 32px);
    align-self: start;
    max-height: calc(100vh - var(--header-h) - 64px);
    overflow-y: auto;
  }
  .toc-mobile { display: none; }
}
.guide-toc-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.guide-toc ol,
.toc-mobile ol { list-style: none; margin: 0; padding: 0; }
.guide-toc ol { position: relative; border-left: 2px solid var(--border); }
.guide-toc a {
  display: block;
  padding: 7px 0 7px 16px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--body);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease);
}
.guide-toc a:hover { color: var(--teal); }
.guide-toc a[aria-current="true"] { color: var(--navy); font-weight: 600; }
.guide-toc a:focus-visible { outline-offset: -2px; }
/* Teal bar that slides to the current section (site.js positions it) */
.toc-indicator {
  position: absolute;
  left: -2px;
  top: 0;
  width: 2px;
  height: 0;
  background: var(--teal);
  transition: transform var(--dur-3) var(--ease), height var(--dur-3) var(--ease);
}

/* Phones and tablets: "Jump to section" under the heading */
.toc-mobile { margin: 0 0 28px; }
.toc-mobile details {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
}
.toc-mobile summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: translateY(-3px) rotate(45deg);
  transition: transform var(--dur-2) var(--ease);
}
.toc-mobile details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.toc-mobile summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 8px; }
.toc-mobile ol { padding: 0 18px 10px; }
.toc-mobile li { border-top: 1px solid var(--border); }
.toc-mobile a { display: block; padding: 11px 0; text-decoration: none; font-weight: 500; }

/* "In a minute" key points */
.key-points {
  margin: 0 0 48px;
  padding: 28px 30px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
}
.key-points h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1;
  color: var(--teal-light);
}
.key-points ul { list-style: none; margin: 0; padding: 0; }
.key-points li {
  position: relative;
  padding: 10px 0 10px 34px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--on-navy);
  border-top: 1px solid var(--navy-line);
}
.key-points li:first-child { border-top: 0; }
.key-points li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  width: 13px;
  height: 7px;
  border-left: 2.5px solid var(--teal-light);
  border-bottom: 2.5px solid var(--teal-light);
  transform: rotate(-45deg);
  animation: tick-in var(--dur-3) var(--ease) both;
}
.key-points li:nth-child(2)::before { animation-delay: 150ms; }
.key-points li:nth-child(3)::before { animation-delay: 300ms; }
.key-points li:nth-child(4)::before { animation-delay: 450ms; }
.key-points li:nth-child(5)::before { animation-delay: 600ms; }
@keyframes tick-in {
  from { opacity: 0; transform: rotate(-45deg) scale(0.4); }
  to { opacity: 1; transform: rotate(-45deg) scale(1); }
}
.key-points .key-points-note { margin: 14px 0 0; font-size: 14px; color: var(--on-navy); }

/* Section headings land clear of the sticky header */
.prose h2[id], .help-box, .references h2 { scroll-margin-top: 8px; }

/* Book and print buttons after the guide */
.guide-actions { margin-top: 32px; }

/* "When to get help" safety box */
.help-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  margin-top: 48px;
  padding: 24px 26px;
  border: 2px solid #E0B44C;
  border-radius: 8px;
  background: #FFF8E6;
  color: var(--body);
  line-height: 1.6;
}
.help-box-icon { grid-row: span 2; width: 32px; height: 32px; color: #8A5A00; }
.help-box h2 { margin: 2px 0 6px; font-size: 26px; line-height: 1.05; color: var(--navy); }
.help-box-body > * { margin: 0 0 10px; }
.help-box-body > :last-child { margin-bottom: 0; }
.help-box ul { padding-left: 20px; }
.help-box li { margin-bottom: 6px; }
.help-box strong { color: var(--navy); }
@media (max-width: 640px) {
  .help-box { grid-template-columns: 1fr; padding: 20px; }
  .help-box-icon { grid-row: auto; }
}

/* Related guides as cards with body area and read time */
.region-meta {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}
.related-guides .region-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.related-guides .region-list li { box-shadow: 0 4px 14px rgba(15, 42, 61, 0.06); }

/* Reference pop-ups (site.js, native popover). Without JS the number jumps to the list as before. */
.ref-pop {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(420px, calc(100vw - 32px));
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--white);
  color: var(--body);
  font-size: 15px;
  line-height: 1.55;
  box-shadow: 0 18px 40px rgba(15, 42, 61, 0.22);
  overflow-wrap: anywhere;
}
.ref-pop:popover-open { animation: ref-pop-in var(--dur-2) var(--ease); }
@keyframes ref-pop-in { from { opacity: 0; transform: translateY(6px); } }
.ref-pop-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}
.ref-pop p { margin: 0 0 10px; }
.ref-pop-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 600; }
.ref-pop:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.print-only { display: none; }

/* ---------- Print / save as PDF: just the guide, references kept ---------- */
@media print {
  @page { margin: 18mm 16mm; }
  body { color: #000; background: #fff; font-size: 11pt; }
  .site-header-bar, .skip-link, .toc-mobile, .guide-toc, .guide-actions, .related-guides,
  .site-footer, .reading-progress { display: none !important; }
  .band-navy { background: #fff !important; color: #000; }
  .page-hero { padding: 0 0 12pt; }
  .page-hero h1 { font-size: 26pt; color: #000; }
  .hero-titles, .hero-titles a, .hero-lede { color: #333 !important; }
  .wrap { padding-left: 0; padding-right: 0; max-width: none; }
  .section { padding-top: 0; padding-bottom: 0; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .key-points { background: #fff; color: #000; border: 1.5pt solid #000; break-inside: avoid; }
  .key-points h2 { color: #000; }
  .key-points li { color: #000; border-color: #ccc; }
  .key-points li::before { border-color: #000; animation: none; }
  .prose, .prose strong, .prose h2, .prose h3 { color: #000; }
  .prose h2 { font-size: 17pt; margin-top: 18pt; break-after: avoid; }
  .prose a { color: #000; text-decoration: none; }
  .help-box { background: #fff; border-color: #000; break-inside: avoid; }
  .references { font-size: 9pt; color: #000; }
  .print-only { display: block; margin-top: 18pt; padding-top: 8pt; border-top: 1px solid #999; font-size: 9pt; color: #333; }
}

/* ==========================================================
   Resources search, body-map filter and richer cards (design upgrade, phase 3)
   ========================================================== */

[hidden] { display: none !important; }

.guide-search { max-width: 760px; margin: 0 0 28px; }
.guide-search label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--navy);
}
.guide-search input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px 12px 46px;
  border: 1.5px solid #B7C7D3;
  border-radius: 8px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%235A7184' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='6'/%3E%3Cpath d='m13 13 5 5'/%3E%3C/svg%3E") no-repeat 16px center;
  font: 400 17px/1.4 var(--text);
  color: var(--navy);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.guide-search input::placeholder { color: var(--muted); }
.guide-search input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11, 110, 120, 0.25); }
.guide-search-hint { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

.guide-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 0 0 24px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--pale);
  border: 1px solid var(--border);
}
.guide-filter-status { margin: 0; font-weight: 600; color: var(--navy); }
.guide-filter-reset { padding: 9px 16px; }
.guide-search-empty { margin: 0 0 32px; }
.guide-search-empty-title { margin: 0 0 14px; font-size: 17px; color: var(--body); }

/* The body-map area that's currently filtered */
.bd-region[aria-current="true"] path { fill: var(--teal); }

/* Richer guide cards: teaser, read time and review date */
.region-teaser {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--body);
}
.region-when {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.region-when + .region-status { margin-top: 10px; }

/* ---------- Home hero: load–capacity motif ---------- */
.hero { position: relative; }
.hero > :not(.hero-motif) { position: relative; z-index: 1; }
/* The lines get their own strip between the intro and the overlapping audience cards */
.hero:has(.hero-motif) { padding-bottom: 168px; }
.hero-motif {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 64px;
  width: calc(100% - 64px);
  height: 84px;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.hero-motif path { fill: none; vector-effect: non-scaling-stroke; }
.hero-motif .motif-capacity { stroke: var(--teal-light); stroke-width: 2.5; stroke-linejoin: round; opacity: .55; }
.hero-motif .motif-load { stroke: var(--white); stroke-width: 1.75; stroke-linecap: round; opacity: .35; }
@media (prefers-reduced-motion: no-preference) {
  .hero-motif path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: motif-draw 1.5s var(--ease) forwards; }
  .hero-motif .motif-load { animation-delay: .35s; }
}
@keyframes motif-draw { to { stroke-dashoffset: 0; } }
@media (max-width: 640px) {
  .hero:has(.hero-motif) { padding-bottom: 136px; }
  .hero-motif { left: 20px; right: 20px; width: calc(100% - 40px); bottom: 60px; height: 60px; }
}

/* Background-removed headshot: sits straight on the navy, in front of the offset teal outline */
.hero-photo--cutout img {
  background: transparent;
  border-radius: 0;
  object-fit: contain;
  object-position: center bottom;
}
.hero-photo--cutout::before { border-radius: 8px; }

/* ==========================================================
   Experience timeline on Home (phase 3, built by tools/experience.py)
   Phones: a vertical list, newest first. Desktop: one bar per role across the years.
   ========================================================== */

.experience-groups.timeline { flex: 1 1 100%; }
.timeline-axis { display: none; }
.timeline-short { display: none; }
.timeline-roles {
  list-style: none;
  margin: 0;
  padding: 0 0 0 18px;
  border-left: 2px solid var(--border);
}
.timeline-role {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0 11px 18px;
  font-size: 16px;
  line-height: 1.45;
  border-bottom: 1px solid var(--border);
}
.timeline-role::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 17px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: var(--cat, var(--teal));
}
.timeline-role .year {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.timeline-role[data-cat="sport"] { --cat: var(--teal); }
.timeline-role[data-cat="performance"] { --cat: #2FA79B; }
.timeline-role[data-cat="teaching"] { --cat: var(--navy); }
.timeline-role[data-cat="clinical"] { --cat: #5A7184; }

/* Bars become buttons (timeline.js) that show the full role underneath */
.timeline-bar {
  all: unset;
  box-sizing: border-box;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  cursor: pointer;
}
.timeline-bar:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; border-radius: 4px; }
.timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}
.timeline-chip {
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font: 600 14px/1.2 var(--text);
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.timeline-chip:hover { border-color: var(--teal); }
.timeline-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.timeline[data-filter]:not([data-filter="all"]) .timeline-role { display: none; }
.timeline[data-filter="sport"] .timeline-role[data-cat="sport"],
.timeline[data-filter="performance"] .timeline-role[data-cat="performance"],
.timeline[data-filter="teaching"] .timeline-role[data-cat="teaching"],
.timeline[data-filter="clinical"] .timeline-role[data-cat="clinical"] { display: flex; }
.timeline.is-collapsed .timeline-role:nth-child(n+6) { display: none; }
.timeline-more { margin-top: 16px; }
.timeline-detail {
  margin: 18px 0 0;
  padding: 14px 18px;
  border-left: 4px solid var(--teal);
  border-radius: 0 6px 6px 0;
  background: var(--pale);
  color: var(--body);
  line-height: 1.55;
}
.timeline-detail strong { color: var(--navy); }

@media (min-width: 900px) {
  .timeline-more { display: none; }
  .timeline.is-collapsed .timeline-role:nth-child(n+6) { display: flex; }
  .timeline-axis {
    display: grid;
    grid-template-columns: repeat(var(--years), 1fr);
    list-style: none;
    margin: 0 0 10px;
    padding: 0 0 8px;
    border-bottom: 2px solid var(--navy);
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }
  .timeline-axis li { padding-left: 6px; }
  .timeline-roles {
    display: grid;
    grid-template-columns: repeat(var(--years), 1fr);
    grid-auto-rows: 38px;
    row-gap: 8px;
    padding: 0;
    border-left: 0;
    background-image: repeating-linear-gradient(to right, var(--border) 0 1px, transparent 1px calc(100% / var(--years)));
  }
  .timeline-role,
  .timeline[data-filter] .timeline-role {
    display: flex;
    align-items: center;
    grid-column: var(--from) / var(--to);
    grid-row: var(--row);
    margin: 0 3px;
    padding: 0 10px;
    min-width: 0;
    border: 0;
    border-radius: 6px;
    background: var(--cat);
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    transform-origin: left center;
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-3) var(--ease), box-shadow var(--dur-1) var(--ease);
  }
  .timeline-role[data-cat="performance"] { color: var(--navy); --cat: var(--teal-light); }
  .timeline-role.is-ongoing { border-radius: 6px 0 0 6px; margin-right: 0; }
  .timeline-role::before { display: none; }
  .timeline-short { display: block; overflow: hidden; text-overflow: ellipsis; }
  .timeline-bar { align-items: center; height: 100%; }
  .timeline-bar:focus-visible { outline: none; }
  .timeline-role .timeline-name,
  .timeline-role .year {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .timeline-role:hover, .timeline-role:focus-within, .timeline-role.is-selected { box-shadow: 0 0 0 3px var(--teal-light), 0 6px 16px rgba(15, 42, 61, 0.2); }
  .timeline-role:focus-within { outline: 2px solid var(--navy); outline-offset: 2px; }
  /* Filter: other roles fade back rather than disappear, so the years stay readable */
  .timeline[data-filter]:not([data-filter="all"]) .timeline-role { opacity: 0.18; }
  .timeline[data-filter="sport"] .timeline-role[data-cat="sport"],
  .timeline[data-filter="performance"] .timeline-role[data-cat="performance"],
  .timeline[data-filter="teaching"] .timeline-role[data-cat="teaching"],
  .timeline[data-filter="clinical"] .timeline-role[data-cat="clinical"] { opacity: 1; }
  /* Bars grow along the years when the timeline scrolls into view (timeline.js) */
  .timeline.is-pending .timeline-role { transform: scaleX(0); }
  .timeline.is-drawn .timeline-role { transition-delay: calc(var(--from) * 45ms); }
}

/* ==========================================================
   Home: "How I work", body-map light-up, phone Book bar, back to top (phase 3)
   Diagrams animate once when they scroll into view (site.js adds .has-revealed).
   ========================================================== */

.how { padding-top: 88px; }
.how .section-title { margin-bottom: 32px; }
.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
}
.how-step { border-top: 2px solid var(--navy); padding-top: 22px; }
.how-icon { display: block; width: 120px; height: 72px; margin-bottom: 18px; overflow: visible; }
.how-icon path, .how-icon line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.how-track { stroke: var(--border); stroke-width: 8; }
.how-accent { stroke: var(--teal); stroke-width: 8; }
.how-icon .how-accent[d^="M6"] { stroke-width: 3.5; }
.how-load { stroke: var(--navy); stroke-width: 2.5; opacity: .55; }
.how-path { stroke: var(--teal); stroke-width: 3; stroke-dasharray: 0.02 0.03; }
.how-needle line { stroke: var(--navy); stroke-width: 4; }
.how-needle circle { fill: var(--navy); }
.how-needle { transform-box: view-box; transform-origin: 60px 64px; transform: rotate(25deg); }
.how-dot { fill: var(--white); stroke: var(--teal); stroke-width: 3; }
.how-dot--end { fill: var(--teal); }
.how-step h3 { margin: 0 0 10px; font-size: 26px; line-height: 1.05; }
.how-step p { margin: 0 0 14px; line-height: 1.6; color: var(--body); }
@media (prefers-reduced-motion: no-preference) {
  .how-step.has-revealed .how-draw:not(.how-path) { stroke-dasharray: 1; animation: motif-draw 1.2s var(--ease) both; }
  .how-step.has-revealed .how-load { animation-delay: .3s; }
  .how-step.has-revealed .how-path { animation: fade-in 1.2s var(--ease) both; }
  .how-step.has-revealed .how-needle { animation: needle-swing 1.4s var(--ease) both; }
  .how-step.has-revealed .how-dot { animation: dot-pop .4s var(--ease) both; }
  .how-step.has-revealed .how-dot:nth-of-type(2) { animation-delay: .4s; }
  .how-step.has-revealed .how-dot:nth-of-type(3) { animation-delay: .8s; }
}
@keyframes needle-swing { 0% { transform: rotate(-80deg); } 60% { transform: rotate(40deg); } 100% { transform: rotate(25deg); } }
@keyframes dot-pop { from { opacity: 0; transform: scale(.4); } }
@keyframes fade-in { from { opacity: 0; } }
.how-dot { transform-box: fill-box; transform-origin: center; }
@media (max-width: 640px) { .how { padding-top: 64px; } .how-steps { gap: 32px; } }

/* Home body map: areas light up one after another the first time it scrolls into view */
@media (prefers-reduced-motion: no-preference) {
  .home-map.has-revealed .bd-region path { animation: region-glow 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 160ms); }
}
@keyframes region-glow { 0%, 100% { fill: #A9D7DB; } 45% { fill: var(--teal); } }

/* Phone "Book a consultation" bar (site.js shows it once the page's own Book button has scrolled away) */
.sticky-book {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 18px rgba(15, 42, 61, 0.1);
  transform: translateY(110%);
  transition: transform var(--dur-2) var(--ease);
}
.sticky-book .btn { display: block; text-align: center; }
.sticky-book.is-shown { transform: none; }
@media (min-width: 641px) { .sticky-book { display: none !important; } }

/* Back to top on long pages (site.js) */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 39;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(15, 42, 61, 0.25);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.to-top::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  width: 12px;
  height: 12px;
  border-left: 2.5px solid currentColor;
  border-top: 2.5px solid currentColor;
  transform: translate(-50%, -30%) rotate(45deg);
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--teal); }
.has-sticky-book .to-top { bottom: 84px; }
@media print { .sticky-book, .to-top { display: none !important; } }

/* ==========================================================
   Phase 4 interactive: pain-monitoring checker (js/pain-check.js)
   ========================================================== */

.prose .pain-check {
  margin: 28px 0 32px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--pale);
}
.prose .pain-check h3 {
  margin: 0 0 8px;
  font-family: var(--heading);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 24px;
  line-height: 1.05;
}
.prose .pain-check p { margin: 0 0 10px; }
.prose .pain-check-rules { margin-bottom: 18px; }
.pain-check-form { display: grid; gap: 18px; }
.pain-check-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.pain-check-field legend, .pain-check-field > label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--navy); }
.pain-check-field output { display: inline-block; min-width: 1.4em; text-align: center; font-variant-numeric: tabular-nums; color: var(--teal); }
.pain-check-field fieldset label, fieldset.pain-check-field label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
}
.pain-check input[type="radio"] { width: 20px; height: 20px; margin: 0; accent-color: var(--teal); }
.pain-check input[type="range"] { width: 100%; margin: 4px 0 0; accent-color: var(--teal); }
.pain-check input:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.pain-check-scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.pain-check-result {
  padding: 16px 18px 16px 52px;
  position: relative;
  border-radius: 8px;
  background: var(--white);
  border: 2px solid #3E8E5A;
  transition: border-color var(--dur-2) var(--ease);
}
.pain-check-result::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 19px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3E8E5A;
  box-shadow: 0 0 0 4px rgba(62, 142, 90, 0.18);
  transition: background-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.pain-check-result[data-state="outside"] { border-color: #C98A12; }
.pain-check-result[data-state="outside"]::before { background: #E0A526; box-shadow: 0 0 0 4px rgba(224, 165, 38, 0.22); }
.prose .pain-check-result p:last-child { margin-bottom: 0; }
.prose .pain-check-result ul { margin: 0 0 10px; }
.prose .pain-check-note { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
@media (max-width: 640px) { .prose .pain-check { padding: 20px 18px; } }
@media print { .pain-check-form { display: none !important; } }

/* Phase 4 interactive: icon arrays (js/icon-array.js). Without JavaScript only the caption shows. */
.prose .icon-array {
  margin: 8px 0 32px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
}
.icon-array-grid { display: none; }
.icon-array.is-ready .icon-array-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  max-width: 300px;
  margin: 0 0 14px;
}
.icon-dot {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #DCE6EC;
  transition: background-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.icon-array.is-filled .icon-dot.is-on {
  background: var(--teal);
  transition-delay: calc(var(--n) * 12ms);
}
.prose .icon-array-key { display: none; margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.icon-array.is-ready .icon-array-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.icon-key-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.icon-key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #DCE6EC; }
.icon-key--on { background: var(--teal); }
.prose .icon-array figcaption { font-size: 17px; line-height: 1.55; color: var(--body); }
@media (max-width: 640px) { .prose .icon-array { padding: 18px; } .icon-array.is-ready .icon-array-grid { max-width: 100%; gap: 5px; } }
@media print { .icon-array .icon-dot.is-on { background: #333 !important; } }

/* ---------- Reduced motion: final states, no movement ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .card:hover, .card:focus-within,
  .region-list li:hover, .region-list li:focus-within,
  .site-header-bar.is-scrolled .logo,
  a:hover .arrow, a:focus-visible .arrow,
  .btn:hover span[aria-hidden="true"], .text-link:hover span[aria-hidden="true"] { transform: none; }
  @view-transition { navigation: none; }
  .reading-progress { animation-duration: auto !important; }
}
