/* =============================================================================
   BluPrint Longevity — Premium enhancement layer
   Loaded ON TOP of style.css on every page except Home.
   Adds richer, interactive section components while reusing all base tokens.
   ============================================================================= */

/* ---------------------------------------------------------------------------
   Reading progress bar (long pages)
   --------------------------------------------------------------------------- */
.readbar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  z-index: 300;
  background: linear-gradient(90deg, var(--russet), var(--chestnut));
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Specimen plate — branded image placeholder (looks intentional, not a grey box)
   Swap the inner .plate__glyph for a real <img> later; keep the frame.
   --------------------------------------------------------------------------- */
.plate {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(196,168,130,0.28) 0%, rgba(196,168,130,0) 55%),
    linear-gradient(155deg, var(--linen) 0%, var(--oat) 100%);
  border: 1px solid rgba(140, 92, 53, 0.16);
  box-shadow:
    0 1px 2px rgba(35,21,8,0.04),
    0 24px 60px rgba(35,21,8,0.10);
  display: grid;
  place-items: center;
  isolation: isolate;
}
.plate--4x5 { aspect-ratio: 4 / 5; }
.plate--1x1 { aspect-ratio: 1 / 1; }
.plate--3x2 { aspect-ratio: 3 / 2; }
.plate--16x9 { aspect-ratio: 16 / 9; }
.plate--tall { aspect-ratio: 3 / 4; }

/* If a real image is dropped in, it covers the frame */
.plate > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

/* Register / measurement ticks in the corners — precision-instrument motif */
.plate__frame {
  position: absolute;
  inset: 14px;
  z-index: 1;
  pointer-events: none;
}
.plate__frame::before,
.plate__frame::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border: 1.5px solid rgba(140, 92, 53, 0.4);
}
.plate__frame::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.plate__frame::after  { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.plate__glyph {
  position: relative;
  z-index: 1;
  width: clamp(56px, 12vw, 96px);
  opacity: 0.5;
  filter: saturate(0.9);
}
.plate__glyph svg,
.plate__glyph img { width: 100%; height: auto; display: block; }

.plate__caption {
  position: absolute;
  left: 20px; bottom: 18px;
  z-index: 1;
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--russet);
  opacity: 0.8;
}

/* Soft ambient drift for parallax plates (JS sets --py) */
.plate[data-parallax] .plate__glyph {
  transform: translateY(var(--py, 0));
  transition: transform 0.1s linear;
}

/* ---------------------------------------------------------------------------
   Specimen plate — photographic variant.
   The base .plate lays a real <img> at z-index 2, which buries the frame ticks
   and the caption underneath it. .plate--photo re-stacks the layer order so a
   photograph can carry the same furniture the placeholder did:

     0  the photograph
     1  scrim (bottom-weighted, keeps the caption readable on any image)
     2  register ticks, re-tinted to ivory for the darker ground
     3  caption

   The brand glyph is deliberately absent from this variant — a real image is
   the subject, and stamping a logo over it reads as a watermark.
   --------------------------------------------------------------------------- */
.plate--photo > img {
  z-index: 0;
  /* Slight overscale gives the parallax drift somewhere to travel without
     exposing an edge. */
  transform: scale(1.08) translateY(var(--py, 0));
  transition: transform 0.1s linear;
}

/* The first two stops are in px, not %, on purpose. A purely percentage-based
   ramp leaves the caption sitting higher up the gradient on short plates
   (3:2) than on tall ones (4:5), which measured 4.3:1 against a light image —
   under the 4.5:1 AA floor. A fixed 68px base guarantees the same footing
   under the caption whatever the plate's height. */
.plate--photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top,
              rgba(35, 21, 8, 0.84) 0px,
              rgba(35, 21, 8, 0.74) 68px,
              rgba(35, 21, 8, 0.30) 42%,
              rgba(35, 21, 8, 0) 70%);
}

.plate--photo .plate__frame {
  z-index: 2;
}

.plate--photo .plate__frame::before,
.plate--photo .plate__frame::after {
  border-color: rgba(245, 239, 227, 0.55);
}

.plate--photo .plate__caption {
  z-index: 3;
  color: var(--ivory);
  opacity: 0.95;
}

/* If the photograph fails to load, JS strips --photo and the branded
   placeholder ground shows through instead of a broken-image icon. */
.plate--photo > img[hidden] {
  display: none;
}

/* ---------------------------------------------------------------------------
   Premium sub-hero — split display + media plate
   --------------------------------------------------------------------------- */
.phero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(3rem, 7vh, 5.5rem));
  padding-bottom: var(--space-lg);
  background-color: var(--ivory);
  background-image: linear-gradient(180deg, var(--linen) 0%, var(--ivory) clamp(220px, 40vh, 460px));
  overflow: hidden;
}
.phero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.phero__eyebrow { margin-bottom: var(--space-sm); }
.phero__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  line-height: 1.08;
  color: var(--coffee);
  margin-bottom: var(--space-sm);
}
.phero__lede {
  font-size: var(--text-md);
  line-height: 1.85;
  color: var(--coffee);
  opacity: 0.82;
  max-width: 52ch;
  margin-bottom: var(--space-sm);
}
.phero__note {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--russet);
  opacity: 0.9;
  max-width: 52ch;
}
.phero__media { position: relative; }
.phero__media .plate { width: 100%; }

/* Centered variant (no media) — for pages that read better centered */
.phero--center { text-align: center; }
.phero--center .phero__grid { grid-template-columns: 1fr; max-width: 66ch; margin-inline: auto; }
.phero--center .phero__inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); }
.phero--center .phero__lede,
.phero--center .phero__note { margin-inline: auto; }

@media (max-width: 900px) {
  .phero__grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .phero__media { order: -1; max-width: 460px; }
}

/* ---------------------------------------------------------------------------
   Stat band — animated count-up figures
   --------------------------------------------------------------------------- */
.statband {
  background-color: var(--coffee);
  background-image:
    radial-gradient(90% 120% at 100% 0%, rgba(140,92,53,0.42) 0%, rgba(140,92,53,0) 55%),
    linear-gradient(160deg, #2A1A0C 0%, var(--coffee) 100%);
  padding-block: var(--space-lg);
}
.statband__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
.stat { text-align: center; position: relative; }
.stat + .stat::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-md) / 2);
  top: 12%; bottom: 12%;
  width: 1px;
  background: rgba(245,239,227,0.16);
}
.stat__num {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  line-height: 1;
  color: var(--ivory);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.15em;
}
.stat__suffix { font-size: 0.5em; color: var(--chestnut); }
.stat__label {
  margin-top: 0.65rem;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  color: var(--ivory);
  opacity: 0.72;
}
@media (max-width: 700px) {
  .statband__grid { grid-template-columns: 1fr; gap: var(--space-sm); }
  .stat + .stat::before { display: none; }
  .stat + .stat { padding-top: var(--space-sm); border-top: 1px solid rgba(245,239,227,0.14); }
}

/* ---------------------------------------------------------------------------
   Alternating feature rows (media + text) — Concierge model, etc.
   --------------------------------------------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.feature + .feature { margin-top: var(--space-xl); }
.feature__media .plate { width: 100%; }
.feature__index {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--chestnut);
  line-height: 1;
  margin-bottom: var(--space-sm);
}
.feature__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  line-height: 1.2;
  color: var(--coffee);
  margin-bottom: var(--space-sm);
}
.feature__body {
  font-size: var(--text-md);
  line-height: 1.85;
  opacity: 0.82;
}
/* Even rows flip the media to the right */
.feature:nth-child(even) .feature__media { order: 2; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: var(--space-md); }
  .feature__media { order: -1 !important; max-width: 520px; }
}

/* ---------------------------------------------------------------------------
   Vertical numbered timeline — process / first-consultation
   --------------------------------------------------------------------------- */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 22px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--chestnut), rgba(196,168,130,0.15));
}
.tl-step {
  position: relative;
  padding-left: 68px;
  padding-block: var(--space-sm);
}
.tl-step__dot {
  position: absolute;
  left: 0; top: var(--space-sm);
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--linen), var(--oat));
  border: 1px solid rgba(140,92,53,0.25);
  font-family: var(--font-heading);
  font-size: var(--text-md);
  color: var(--russet);
  box-shadow: 0 6px 16px rgba(35,21,8,0.10);
  z-index: 1;
}
.tl-step__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--coffee);
  margin-bottom: 0.35rem;
}
.tl-step__body {
  font-size: var(--text-base);
  line-height: 1.8;
  opacity: 0.82;
  max-width: 60ch;
}

/* ---------------------------------------------------------------------------
   Interactive process stepper (Consultation → Care)
   Clickable steps, filling progress line, cross-fading detail panels.
   --------------------------------------------------------------------------- */
.process {
  max-width: 900px;
  margin-inline: auto;
}

.process__rail {
  position: relative;
  display: flex;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  justify-content: space-between;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* Base track + filling progress, threaded behind the dots */
.process__track {
  position: absolute;
  top: 23px;
  left: 6%;
  right: 6%;
  height: 2px;
  background: rgba(140, 92, 53, 0.18);
  z-index: 0;
}

.process__progress {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--russet), var(--chestnut));
  transition: width 0.55s var(--ease-inout);
}

.process__step {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  color: var(--coffee);
}

.process__dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ivory);
  border: 1px solid rgba(140, 92, 53, 0.28);
  font-family: var(--font-heading);
  font-size: var(--text-md);
  color: var(--russet);
  box-shadow: 0 6px 16px rgba(35, 21, 8, 0.08);
  transition: transform 0.4s var(--ease-out),
              background 0.4s var(--ease-out),
              color 0.4s var(--ease-out),
              border-color 0.4s var(--ease-out),
              box-shadow 0.4s var(--ease-out);
}

.process__name {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.55;
  transition: opacity 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

.process__step:hover .process__dot {
  border-color: var(--chestnut);
  transform: translateY(-2px);
}
.process__step:hover .process__name { opacity: 0.85; }

/* Active + already-completed states */
.process__step.is-active .process__dot,
.process__step.is-done .process__dot {
  background: linear-gradient(150deg, var(--russet), #5A3A22);
  border-color: transparent;
  color: var(--ivory);
}
.process__step.is-active .process__dot {
  transform: scale(1.08);
  box-shadow: 0 10px 26px rgba(140, 92, 53, 0.35);
}
.process__step.is-active .process__name {
  opacity: 1;
  color: var(--russet);
}

.process__step:focus-visible .process__dot {
  outline: 2px solid var(--russet);
  outline-offset: 3px;
}

/* Panels share one grid cell so the stage sizes to the tallest — no layout jump */
.process__stage {
  display: grid;
  background: linear-gradient(180deg, rgba(245, 239, 227, 0.6), rgba(232, 221, 208, 0.35));
  border: 1px solid rgba(140, 92, 53, 0.14);
  border-radius: 18px;
  padding: clamp(1.75rem, 3.5vw, 3rem);
  box-shadow: 0 20px 50px rgba(35, 21, 8, 0.08);
}

.process__panel {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease-out),
              transform 0.45s var(--ease-out),
              visibility 0.45s;
}

.process__panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.process__panel[hidden] { display: block; } /* JS toggles is-active; keep in grid cell */

.process__index {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--chestnut);
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.process__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--coffee);
  margin-bottom: 0.6rem;
}

.process__body {
  font-size: var(--text-md);
  line-height: 1.8;
  color: var(--coffee);
  opacity: 0.82;
  max-width: 62ch;
}

@media (max-width: 560px) {
  .process__name { display: none; }
  .process__track { top: 23px; }
  .process__rail { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .process__progress,
  .process__panel,
  .process__dot { transition: none; }
}

/* ---------------------------------------------------------------------------
   Long service pages — sticky scroll-spy rail + rich topic articles
   --------------------------------------------------------------------------- */
.svc-body {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

/* Sticky left rail (desktop) */
.rail {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  align-self: start;
}
.rail__label {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--russet);
  opacity: 0.7;
  margin-bottom: var(--space-sm);
}
.rail__list { position: relative; display: flex; flex-direction: column; }
.rail__link {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.15rem;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--coffee);
  opacity: 0.55;
  border-left: 2px solid var(--oat);
  transition: opacity 0.3s var(--ease-out), color 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.rail__link:hover { opacity: 0.85; }
.rail__link.is-active {
  opacity: 1;
  color: var(--russet);
  font-weight: 600;
  border-color: var(--russet);
  transform: translateX(2px);
}

/* Mobile pill strip (sticky) — shown instead of the rail below 960px */
.pillnav {
  display: none;
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  background: rgba(245,239,227,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--oat);
  padding-block: 0.75rem;
}
.pillnav__inner {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pillnav__inner::-webkit-scrollbar { display: none; }
.pillnav__link {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  padding: 0.5em 1.05em;
  border-radius: 999px;
  border: 1px solid var(--oat);
  color: var(--coffee);
  opacity: 0.72;
  transition: all 0.25s var(--ease-out);
}
.pillnav__link.is-active {
  background: var(--russet);
  border-color: var(--russet);
  color: var(--ivory);
  opacity: 1;
}

/* Rich topic article */
.rtopic {
  padding-block: var(--space-lg);
  scroll-margin-top: calc(var(--nav-h) + 6rem);
}
.rtopic + .rtopic { border-top: 1px solid var(--oat); }
.rtopic__index {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--chestnut);
  line-height: 1;
}
.rtopic__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  line-height: 1.14;
  color: var(--coffee);
  margin: 0.5rem 0 0.75rem;
}
.rtopic__tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--russet);
  line-height: 1.45;
  margin-bottom: var(--space-md);
  padding-left: 1.1rem;
  border-left: 2px solid var(--chestnut);
}
.rtopic__media { margin: var(--space-md) 0; }
.rtopic__media .plate { width: 100%; }

.rtopic__block { margin-top: var(--space-md); }
.rtopic__kicker {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--russet);
  margin-bottom: 0.85rem;
}
.rtopic__block > p {
  font-size: var(--text-base);
  line-height: 1.85;
  opacity: 0.85;
  margin-bottom: 1rem;
}
.rtopic__block > p:last-child { margin-bottom: 0; }
.rtopic__subhead {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  color: var(--coffee);
  margin: 1.1rem 0 0.5rem;
}

.rtopic__cta { margin-top: var(--space-md); }

@media (max-width: 960px) {
  .svc-body { grid-template-columns: 1fr; gap: 0; }
  .rail { display: none; }
  .pillnav { display: block; }
  .rtopic { scroll-margin-top: calc(var(--nav-h) + 4.5rem); }
}

/* ---------------------------------------------------------------------------
   Interactive care-area explorer — the rail becomes a tab list and each
   topic becomes a panel that swaps in. Progressive: without JS (.is-tabs is
   added by script) every panel stays visible and the links jump as anchors.
   --------------------------------------------------------------------------- */

/* Content blocks become a feature-card grid */
.rtopic__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: var(--space-md);
  align-items: start;
}
.rtopic__grid .rtopic__block {
  margin-top: 0;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--ivory) 100%);
  border: 1px solid var(--oat);
  border-radius: 16px;
  padding: clamp(1.25rem, 2vw, 1.6rem);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out),
              border-color 0.4s var(--ease-out);
}
.rtopic__grid .rtopic__block:hover {
  transform: translateY(-3px);
  border-color: rgba(196,168,130,0.7);
  box-shadow: 0 16px 36px rgba(35,21,8,0.09);
}
/* flatten the checklist inside a card so we don't nest cards */
.rtopic__grid .checklist li {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0.35rem 0 0.35rem 2.15rem;
}
.rtopic__grid .checklist li::before { left: 0; }
.rtopic__grid .checklist li::after  { left: 0.42rem; }
.rtopic__grid .checklist li:hover { transform: none; }

@media (max-width: 760px) {
  .rtopic__grid { grid-template-columns: 1fr; }
}

/* Lead each panel with content: no big index numeral, no empty media plate */
.svc-body.is-tabs .rtopic__index { display: none; }
.svc-body.is-tabs .rtopic__media { display: none; }
.svc-body.is-tabs .rtopic__title { margin-top: 0; }
.svc-body.is-tabs .rtopic__tagline { margin-bottom: var(--space-md); }

/* Feature-card icons — a rounded tile before each block's kicker */
.rtopic__grid .rtopic__kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.rtopic__grid .rtopic__kicker::before {
  content: '';
  flex: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--ivory) center / 20px 20px no-repeat;
  border: 1px solid rgba(140, 92, 53, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
/* Order is consistent: What it is · Who it's for · How it works · What to expect */
.rtopic__grid .rtopic__block:nth-child(1) .rtopic__kicker::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C5C35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4a2 2 0 0 1 2-2h7l5 5v13a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M9 13h6M9 17h5'/%3E%3C/svg%3E");
}
.rtopic__grid .rtopic__block:nth-child(2) .rtopic__kicker::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C5C35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3.5 20a5.5 5.5 0 0 1 11 0'/%3E%3Cpath d='M16 5.2a3 3 0 0 1 0 5.6'/%3E%3Cpath d='M17.5 14.2a5.5 5.5 0 0 1 3 5.8'/%3E%3C/svg%3E");
}
.rtopic__grid .rtopic__block:nth-child(3) .rtopic__kicker::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C5C35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3Cpath d='M12 2v3.2M12 18.8V22M2 12h3.2M18.8 12H22M4.9 4.9l2.3 2.3M16.8 16.8l2.3 2.3M19.1 4.9l-2.3 2.3M7.2 16.8l-2.3 2.3'/%3E%3C/svg%3E");
}
.rtopic__grid .rtopic__block:nth-child(4) .rtopic__kicker::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C5C35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.rtopic__grid .rtopic__kicker { margin-bottom: 0.9rem; }

/* Tab mode (added by JS): one panel at a time */
.svc-body.is-tabs .rtopic { display: none; padding-block: 0; border-top: 0; }
.svc-body.is-tabs .rtopic.is-active {
  display: block;
  animation: rtopicIn 0.5s var(--ease-out) both;
}
@keyframes rtopicIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
/* Panels must not depend on scroll-reveal once they're swapped in */
.svc-body.is-tabs .rtopic .reveal { opacity: 1 !important; transform: none !important; }
.rail__link[role="tab"], .pillnav__link[role="tab"] { cursor: pointer; }
.rail__link:focus-visible, .pillnav__link:focus-visible {
  outline: 2px solid var(--russet);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .svc-body.is-tabs .rtopic.is-active { animation: none; }
}

/* ---------------------------------------------------------------------------
   Chip list — "who it's for" and focus areas as tactile chips/cards
   --------------------------------------------------------------------------- */
.checklist { display: flex; flex-direction: column; gap: 0.7rem; }
.checklist li {
  position: relative;
  padding: 0.9rem 1rem 0.9rem 3rem;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--ivory) 100%);
  border: 1px solid var(--oat);
  border-radius: 12px;
  font-size: var(--text-base);
  line-height: 1.6;
  opacity: 0.92;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out);
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 1rem; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  border-radius: 50%;
  background:
    linear-gradient(150deg, var(--russet), #5A3A22);
}
.checklist li::after {
  content: '';
  position: absolute;
  left: 1.42rem; top: 50%;
  width: 5px; height: 9px;
  border: solid var(--ivory);
  border-width: 0 2px 2px 0;
  transform: translateY(-62%) rotate(45deg);
}
.checklist li:hover {
  transform: translateX(4px);
  border-color: rgba(196,168,130,0.7);
  box-shadow: 0 10px 26px rgba(35,21,8,0.08);
}

/* Focus-area tags (compact pills) */
.tagset { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tag {
  font-size: var(--text-sm);
  padding: 0.5em 1em;
  border-radius: 999px;
  background: var(--linen);
  border: 1px solid var(--oat);
  color: var(--coffee);
  opacity: 0.9;
  transition: transform 0.3s var(--ease-out), background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.tag:hover {
  transform: translateY(-2px);
  background: var(--russet);
  color: var(--ivory);
}

/* ---------------------------------------------------------------------------
   Diagnostics spec cards — categorised test panels
   --------------------------------------------------------------------------- */
.specset {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}
.speccard {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--ivory) 100%);
  border: 1px solid var(--oat);
  border-radius: 16px;
  padding: clamp(1.35rem, 2.5vw, 1.9rem);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.speccard:hover {
  transform: translateY(-4px);
  border-color: rgba(196,168,130,0.7);
  box-shadow: 0 18px 40px rgba(35,21,8,0.10);
}
.speccard__title {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  color: var(--coffee);
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--oat);
}
.speccard ul { display: flex; flex-direction: column; gap: 0.5rem; }
.speccard li {
  position: relative;
  padding-left: 1rem;
  font-size: var(--text-sm);
  line-height: 1.55;
  opacity: 0.8;
}
.speccard li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.6em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--chestnut);
}
@media (max-width: 700px) { .specset { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   Closing CTA band (dark) — reused across pages
   --------------------------------------------------------------------------- */
.ctaband {
  background-color: var(--coffee);
  background-image:
    radial-gradient(120% 90% at 0% 100%, rgba(140,92,53,0.45) 0%, rgba(140,92,53,0) 55%),
    linear-gradient(160deg, #2A1A0C 0%, var(--coffee) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ctaband__mark {
  position: absolute;
  right: -40px; top: 50%;
  transform: translateY(-50%);
  width: clamp(180px, 30vw, 360px);
  opacity: 0.06;
  pointer-events: none;
}
.ctaband__inner { max-width: 54ch; margin-inline: auto; position: relative; z-index: 1; }
.ctaband__eyebrow { color: var(--chestnut); justify-content: center; margin-bottom: var(--space-sm); }
.ctaband__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  line-height: 1.2;
  color: var(--ivory);
  margin-bottom: var(--space-sm);
}
.ctaband__body {
  font-size: var(--text-md);
  line-height: 1.8;
  color: var(--ivory);
  opacity: 0.8;
  margin-bottom: var(--space-md);
}

/* ---------------------------------------------------------------------------
   Section header helper (centered)
   --------------------------------------------------------------------------- */
.xhead { text-align: center; max-width: 64ch; margin: 0 auto var(--space-lg); }
.xhead__title { font-family: var(--font-heading); font-size: var(--text-2xl); line-height: 1.14; color: var(--coffee); margin-top: 0.75rem; }
.xhead__intro { font-size: var(--text-md); line-height: 1.85; opacity: 0.8; margin-top: 1rem; }

/* Alternating section backgrounds */
.bg-linen { background-color: var(--linen); }
.bg-ivory { background-color: var(--ivory); }

/* ---------------------------------------------------------------------------
   Premium enquiry form framing (Book page)
   --------------------------------------------------------------------------- */
.bookgrid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.booknext { position: sticky; top: calc(var(--nav-h) + 2rem); }
@media (max-width: 900px) {
  .bookgrid { grid-template-columns: 1fr; }
  .booknext { position: static; }
}

/* ---------------------------------------------------------------------------
   Reduced motion
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .readbar { transition: none; }
  .plate[data-parallax] .plate__glyph { transform: none !important; }
  .plate--photo[data-parallax] > img { transform: scale(1.02) !important; }
}

/* ---------------------------------------------------------------------------
   Care dossier — consultations explorer
   Scoped to .svc-body--dossier so programmes / advanced-therapies /
   diagnostics keep the original stacked layout untouched.

   Hierarchy, deliberately:
     READ column  — editorial prose, no cards, quiet.
     ACT column   — the interactive "is this you?" matcher + one dark tile.
     FOOT         — contextual (secondary) ask + pager. The page's single
                    primary ask stays in the .ctaband at the bottom.
   --------------------------------------------------------------------------- */
.svc-body--dossier { grid-template-columns: 268px 1fr; }

/* --- Indexed rail with a sliding marker ----------------------------------- */
.rail--indexed .rail__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--oat);
}
.rail--indexed .rail__label {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--russet);
  opacity: 0.75;
  margin: 0;
}
.rail--indexed .rail__count {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--chestnut);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.rail--indexed .rail__count b { color: var(--russet); font-weight: 400; }

.rail--indexed .rail__list { padding-left: 1.05rem; }
.rail--indexed .rail__list::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--oat);
  border-radius: 2px;
}
.rail__marker {
  position: absolute;
  left: -1px;
  top: 0;
  width: 4px;
  height: 0;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--chestnut), var(--russet));
  transition: transform 0.5s var(--ease-out), height 0.5s var(--ease-out);
  will-change: transform, height;
}
.rail--indexed .rail__link {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  border-left: 0;
  padding: 0.62rem 0;
  transform: none;
}
.rail--indexed .rail__link:hover { transform: translateX(2px); }
.rail--indexed .rail__link.is-active { transform: translateX(2px); }
.rail__num {
  flex: none;
  width: 1.6em;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--chestnut);
  letter-spacing: 0.04em;
  transition: color 0.3s var(--ease-out);
}
.rail--indexed .rail__link.is-active .rail__num { color: var(--russet); }
.rail__text { flex: 1; }

/* --- Numbered pills (mobile) ---------------------------------------------- */
.pillnav__num {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--chestnut);
  margin-right: 0.45em;
  transition: color 0.25s var(--ease-out);
}
.pillnav__link.is-active .pillnav__num { color: rgba(245,239,227,0.75); }

/* --- Panel head ------------------------------------------------------------ */
.dtopic__head { margin-bottom: var(--space-md); }
.dtopic__meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}
.dtopic__count {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  color: var(--chestnut);
  white-space: nowrap;
}
.dtopic__count b { font-weight: 400; color: var(--russet); font-size: var(--text-md); }
.dtopic__count i { font-style: normal; opacity: 0.45; margin: 0 0.4em; }
.dtopic__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--oat), rgba(232,221,208,0));
}
.dtopic__area {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--russet);
  opacity: 0.55;
  white-space: nowrap;
}
.dtopic__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  line-height: 1.12;
  color: var(--coffee);
  margin: 0 0 0.85rem;
  max-width: 20ch;
}
.dtopic__tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--russet);
  max-width: 54ch;
  padding-left: 1.1rem;
  border-left: 2px solid var(--chestnut);
}

/* --- Two columns: read | act ---------------------------------------------- */
.dtopic__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(1.75rem, 3.5vw, 3.25rem);
  align-items: start;
}

/* Read column — prose, no cards */
.dblock + .dblock {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--oat);
}
.dblock__label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--russet);
  margin-bottom: 1rem;
}
.dblock__ico {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--ivory) center / 18px 18px no-repeat;
  border: 1px solid rgba(140, 92, 53, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.dblock__ico--what {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C5C35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4a2 2 0 0 1 2-2h7l5 5v13a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M9 13h6M9 17h5'/%3E%3C/svg%3E");
}
.dblock__ico--how {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C5C35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3Cpath d='M12 2v3.2M12 18.8V22M2 12h3.2M18.8 12H22M4.9 4.9l2.3 2.3M16.8 16.8l2.3 2.3M19.1 4.9l-2.3 2.3M7.2 16.8l-2.3 2.3'/%3E%3C/svg%3E");
}
.dblock__ico--who {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C5C35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3.5 20a5.5 5.5 0 0 1 11 0'/%3E%3Cpath d='M16 5.2a3 3 0 0 1 0 5.6'/%3E%3Cpath d='M17.5 14.2a5.5 5.5 0 0 1 3 5.8'/%3E%3C/svg%3E");
}
.dblock__prose > p {
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--coffee);
  opacity: 0.82;
  max-width: 64ch;
}
.dblock__prose > p + p { margin-top: 1rem; }
/* Lead paragraph of the panel carries a touch more weight */
.dtopic__read > .dblock:first-child .dblock__prose > p:first-child {
  font-size: var(--text-md);
  line-height: 1.75;
  opacity: 0.92;
}

/* --- Act column: the "is this you?" matcher -------------------------------- */
.match {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--ivory) 100%);
  border: 1px solid var(--oat);
  border-radius: 16px;
  padding: clamp(1.25rem, 2vw, 1.6rem);
  transition: border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.match.is-matched {
  border-color: rgba(196, 168, 130, 0.85);
  box-shadow: 0 16px 40px rgba(35, 21, 8, 0.08);
}
.match .dblock__label { margin-bottom: 0.35rem; }
.match__hint {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--coffee);
  opacity: 0.5;
  margin-bottom: 0.9rem;
}
.match__list { display: flex; flex-direction: column; gap: 0.1rem; }
.match__row { list-style: none; }
.match__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--coffee);
  background: none;
  border: 0;
  border-radius: 10px;
  padding: 0.65rem 0.6rem;
  cursor: pointer;
  transition: background-color 0.3s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.match__item:hover { background: rgba(196, 168, 130, 0.16); }
.match__item:focus-visible {
  outline: 2px solid var(--russet);
  outline-offset: 2px;
}
.match__box {
  flex: none;
  position: relative;
  width: 20px; height: 20px;
  margin-top: 0.22rem;
  border-radius: 50%;
  border: 1.5px solid var(--chestnut);
  background: transparent;
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out),
              transform 0.3s var(--ease-out);
}
.match__box::after {
  content: '';
  position: absolute;
  left: 6px; top: 2.5px;
  width: 5px; height: 9px;
  border: solid var(--ivory);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 0.25s var(--ease-out);
}
.match__item:hover .match__box { border-color: var(--russet); }
.match__item[aria-pressed="true"] .match__box {
  background: linear-gradient(150deg, var(--russet), #5A3A22);
  border-color: transparent;
  transform: scale(1.06);
}
.match__item[aria-pressed="true"] .match__box::after { transform: rotate(45deg) scale(1); }
.match__text {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.78;
  transition: opacity 0.3s var(--ease-out);
}
.match__item[aria-pressed="true"] .match__text { opacity: 1; font-weight: 600; }

.match__meter {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--oat);
}
.match__bar {
  height: 3px;
  border-radius: 99px;
  background: var(--oat);
  overflow: hidden;
}
.match__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--chestnut), var(--russet));
  transition: width 0.55s var(--ease-out);
}
.match__read {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--coffee);
  opacity: 0.5;
  margin-top: 0.65rem;
  transition: opacity 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.match.is-matched .match__read { color: var(--russet); opacity: 1; font-weight: 600; }

/* --- Act column: the dark "what to expect" tile ---------------------------- */
.expect {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  border-radius: 16px;
  padding: clamp(1.3rem, 2vw, 1.65rem);
  background: linear-gradient(155deg, #33200E 0%, var(--coffee) 100%);
  color: var(--ivory);
}
.expect__mark {
  position: absolute;
  right: -22px; bottom: -26px;
  width: 128px;
  opacity: 0.06;
  pointer-events: none;
}
.expect__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chestnut);
  margin-bottom: 0.7rem;
}
.expect__body {
  position: relative;
  font-size: var(--text-base);
  line-height: 1.75;
  opacity: 0.86;
}
.expect__body + .expect__body { margin-top: 0.8rem; }

/* --- Panel foot: contextual ask (secondary) + pager ------------------------ */
.dtopic__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--oat);
}
.dask {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem 1.15rem;
}
.dask__copy {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--coffee);
  opacity: 0.6;
  max-width: 40ch;
  transition: opacity 0.35s var(--ease-out), color 0.35s var(--ease-out);
}
.dask.is-lit .dask__copy { opacity: 1; color: var(--russet); font-weight: 600; }

/* Quiet button — deliberately NOT the primary. The page's one loud ask
   lives in the .ctaband at the bottom; this is the in-context alternative. */
.btn--quiet {
  background: transparent;
  color: var(--russet);
  border: 1px solid var(--chestnut);
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: var(--text-sm);
  padding: 0.72em 1.4em;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.btn--quiet svg { transition: transform 0.35s var(--ease-out); }
.btn--quiet:hover {
  background: var(--russet);
  border-color: var(--russet);
  color: var(--ivory);
}
.btn--quiet:hover svg { transform: translateX(3px); }
.dask.is-lit .btn--quiet {
  border-color: var(--russet);
  background: rgba(140, 92, 53, 0.08);
  box-shadow: 0 8px 24px rgba(140, 92, 53, 0.16);
}
.dask.is-lit .btn--quiet:hover { background: var(--russet); }

.dpager { display: flex; align-items: center; gap: 0.35rem; }
.dpager__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: inherit;
  color: var(--coffee);
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s var(--ease-out), color 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.dpager__btn:hover {
  opacity: 1;
  color: var(--russet);
  border-color: var(--oat);
  background: rgba(255,255,255,0.5);
}
.dpager__btn:focus-visible { outline: 2px solid var(--russet); outline-offset: 2px; opacity: 1; }
.dpager__btn svg { flex: none; }
.dpager__label { display: flex; flex-direction: column; line-height: 1.25; }
.dpager__btn--next .dpager__label { text-align: right; }
.dpager__label i {
  font-style: normal;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
}
.dpager__label b {
  font-size: var(--text-sm);
  font-weight: 600;
  max-width: 17ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 1180px) {
  .svc-body--dossier { grid-template-columns: 232px 1fr; }
  .dtopic__cols { grid-template-columns: 1fr; gap: var(--space-md); }
  .dtopic__act { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
  .expect { margin-top: 0; }
}
@media (max-width: 960px) {
  .svc-body--dossier { grid-template-columns: 1fr; }
  .dtopic__title { max-width: none; }
}
@media (max-width: 760px) {
  .dtopic__act { grid-template-columns: 1fr; }
  .expect { margin-top: 0; }
  .dtopic__foot { flex-direction: column; align-items: stretch; }
  .dask { flex-direction: column; align-items: flex-start; }
  .dask__btn { width: 100%; justify-content: center; }
  .dpager { justify-content: space-between; }
  .dpager__label b { max-width: 11ch; }
  .dtopic__area { display: none; }
}
@media (max-width: 420px) {
  .dpager__label b { display: none; }
}

/* Swipe affordance on touch */
.svc-topics[data-swipe] { touch-action: pan-y; }

@media (prefers-reduced-motion: reduce) {
  .rail__marker,
  .match__fill,
  .match__box,
  .match__box::after,
  .btn--quiet svg { transition: none; }
}

/* ---------------------------------------------------------------------------
   Care dossier — per-page variants
   advanced-therapies / programmes / diagnostics reuse the same shell; only
   the matcher style and the full-width band differ.
   --------------------------------------------------------------------------- */

/* Extra block icons */
.dblock__ico--focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C5C35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='4.5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E");
}
.dblock__ico--test {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C5C35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 2v7L4.5 17a2.5 2.5 0 0 0 2.2 3.7h10.6A2.5 2.5 0 0 0 19.5 17L15 9V2'/%3E%3Cpath d='M8 2h8'/%3E%3Cpath d='M7 14h10'/%3E%3C/svg%3E");
}

/* --- Tag matcher (programmes "Focus areas") -------------------------------- */
.match--tags .match__list {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.match--tags .match__row { display: contents; }
.match--tags .match__item {
  width: auto;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--oat);
  border-radius: 999px;
  background: var(--linen);
}
.match--tags .match__item:hover {
  background: rgba(196, 168, 130, 0.32);
  border-color: var(--chestnut);
}
.match--tags .match__box {
  width: 14px; height: 14px;
  margin-top: 0.22rem;
  border-width: 1.5px;
}
.match--tags .match__box::after {
  left: 4px; top: 1px;
  width: 3.5px; height: 7px;
  border-width: 0 1.5px 1.5px 0;
}
.match--tags .match__text {
  font-size: var(--text-sm);
  line-height: 1.35;
}
.match--tags .match__item[aria-pressed="true"] {
  background: rgba(140, 92, 53, 0.1);
  border-color: var(--russet);
}

/* --- Full-width band (diagnostics "What we test at the clinic") ------------ */
.dspec {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--oat);
}
.dspec .specset { margin-top: 0; }

/* Programmes: subheads sit inside the read column prose */
.dblock__prose .rtopic__subhead:first-child { margin-top: 0; }

/* =============================================================================
   Consultations page — the two-step pathway
   Numbered because the order is real: Consultation 2 cannot happen until the
   results requested in Consultation 1 are back.
   ============================================================================= */
.pathway__head {
  max-width: 60ch;
  margin-bottom: var(--space-md);
}
.pathway__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  line-height: 1.15;
  color: var(--coffee);
  margin-top: 0.75rem;
}

.pathway {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: none;
}

.pathway__step {
  display: grid;
  grid-template-columns: clamp(56px, 7vw, 96px) 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  border-top: 1px solid var(--oat);
}
.pathway__step:last-child { border-bottom: 1px solid var(--oat); }

.pathway__marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
.pathway__num {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1;
  color: var(--chestnut);
  letter-spacing: 0.02em;
}
.pathway__line {
  flex: 1;
  width: 1px;
  min-height: 40px;
  background: linear-gradient(180deg, var(--chestnut), rgba(196, 168, 130, 0));
}
.pathway__step:last-child .pathway__line { display: none; }

.pathway__meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.pathway__kicker {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--russet);
}
.pathway__dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--chestnut);
}
.pathway__time {
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--coffee);
  opacity: 0.55;
}

.pathway__name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.2;
  color: var(--coffee);
  margin-bottom: 1rem;
}

.pathway__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem clamp(1rem, 3vw, 2.5rem);
}
.pathway__list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--coffee);
  opacity: 0.85;
}
.pathway__list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.65em;
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--chestnut);
}

.pathway__after {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  max-width: 78ch;
}
.pathway__closing {
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--coffee);
  opacity: 0.9;
}
.pathway__inline-link {
  color: var(--russet);
  font-weight: 600;
  border-bottom: 1px solid rgba(140, 92, 53, 0.35);
  transition: border-color 0.3s var(--ease-out);
}
.pathway__inline-link:hover { border-bottom-color: var(--russet); }

/* =============================================================================
   Consultations page — "What your assessment draws on" flip cards
   ============================================================================= */
.draws { background-color: var(--linen); }

.draws__head {
  max-width: 68ch;
  margin-bottom: var(--space-md);
}
.draws__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  line-height: 1.15;
  color: var(--coffee);
  margin-top: 0.75rem;
}
.draws__lede {
  margin-top: 1rem;
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--coffee);
  opacity: 0.85;
}
.draws__hint {
  margin-top: 0.85rem;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--russet);
  opacity: 0.7;
}

.flipgrid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 1.8vw, 1.5rem);
}
.flipgrid__cell { list-style: none; }

.flipcard {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(230px, 26vw, 280px);
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  perspective: 1400px;
  -webkit-tap-highlight-color: transparent;
}

.flipcard__inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease-inout);
}

/* Turn on hover only where a real pointer exists, and on focus/expanded
   everywhere — so keyboard and touch reach the same state. */
@media (hover: hover) and (pointer: fine) {
  .flipcard:hover .flipcard__inner { transform: rotateY(180deg); }
}
.flipcard:focus-visible .flipcard__inner,
.flipcard[aria-expanded="true"] .flipcard__inner { transform: rotateY(180deg); }

.flipcard:focus-visible {
  outline: 2px solid var(--russet);
  outline-offset: 3px;
  border-radius: 16px;
}

.flipcard__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  padding: clamp(1.25rem, 2vw, 1.65rem);
  text-align: left;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  overflow: hidden;
}

.flipcard__face--front {
  justify-content: space-between;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--ivory) 100%);
  border: 1px solid var(--oat);
  transition: border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.flipcard:hover .flipcard__face--front,
.flipcard:focus-visible .flipcard__face--front {
  border-color: rgba(196, 168, 130, 0.85);
  box-shadow: 0 16px 40px rgba(35, 21, 8, 0.08);
}

.flipcard__num {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  line-height: 1;
  color: var(--chestnut);
  letter-spacing: 0.05em;
}
.flipcard__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.2;
  color: var(--coffee);
  margin-top: auto;
  padding-top: 1rem;
}
.flipcard__cue {
  margin-top: 0.9rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--russet);
  opacity: 0.65;
  transition: opacity 0.35s var(--ease-out);
}
.flipcard__cue::after { content: ' \2192'; }
.flipcard:hover .flipcard__cue { opacity: 1; }

.flipcard__face--back {
  transform: rotateY(180deg);
  justify-content: center;
  background: linear-gradient(155deg, #33200E 0%, var(--coffee) 100%);
  color: var(--ivory);
}
.flipcard__body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ivory);
  opacity: 0.92;
}

.draws__foot {
  margin-top: var(--space-lg);
  display: flex;
  justify-content: center;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1024px) {
  .flipgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .flipgrid { grid-template-columns: 1fr; }
  .flipcard { min-height: 210px; }
  .pathway__list { grid-template-columns: 1fr; }
  .pathway__step {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
  .pathway__marker { flex-direction: row; align-items: center; gap: 0.75rem; }
  .pathway__line { width: auto; height: 1px; min-height: 0; flex: 1;
    background: linear-gradient(90deg, var(--chestnut), rgba(196, 168, 130, 0)); }
  .pathway__step:last-child .pathway__line { display: block; }
}

/* --- Reduced motion: cross-fade instead of a 3D turn ----------------------- */
@media (prefers-reduced-motion: reduce) {
  .flipcard__inner { transition: none !important; }
  .flipcard:hover .flipcard__inner,
  .flipcard:focus-visible .flipcard__inner,
  .flipcard[aria-expanded="true"] .flipcard__inner { transform: none; }

  .flipcard__face {
    -webkit-backface-visibility: visible;
    backface-visibility: visible;
    transition: opacity 0.25s linear;
  }
  .flipcard__face--back { transform: none; opacity: 0; }
  .flipcard:hover .flipcard__face--back,
  .flipcard:focus-visible .flipcard__face--back,
  .flipcard[aria-expanded="true"] .flipcard__face--back { opacity: 1; }
  .flipcard:hover .flipcard__face--front,
  .flipcard:focus-visible .flipcard__face--front,
  .flipcard[aria-expanded="true"] .flipcard__face--front { opacity: 0; }
}
