/* ==========================================================================
   Condition pages (single-condition.php, template-parts/condition/)
   --------------------------------------------------------------------------
   Hero, "at a glance" cards and the closing band come from the service-page
   sections and their own stylesheets. This file lays out what sits between
   them: a main column of short blocks and the side column of cards.

   The aim, from the client meeting, is less text density: each block is one
   idea with its own shape, so a reader can scan headings and shapes and stop
   where they recognise themselves.

   Layer 3 tokens only. No raw hex anywhere in this file.
   ========================================================================== */

/* --- Shell: main column + side column ----------------------------------- */

.cond-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;   /* rail width as the blog */
  gap: var(--sp-7);
  align-items: start;
  padding-block: var(--sp-6) var(--section-y);
}
.cond-main { min-width: 0; }

@media (max-width: 62rem) {
  .cond-shell { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
}

/* --- Block: one framework part ------------------------------------------ */

.cblock { scroll-margin-top: calc(var(--header-h) + var(--sp-5)); }
.cblock + .cblock {
  margin-top: var(--sp-7);
  padding-top: var(--sp-7);
  border-top: 1px solid var(--color-divider);
}

.cblock__title {
  color: var(--color-heading);
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
  margin: 0 0 var(--sp-3);
  text-wrap: balance;
}

.cblock__intro {
  margin: 0 0 var(--sp-5);
  max-width: 46rem;
  color: var(--color-text);
  text-wrap: pretty;
}

.cblock__prose > :first-child { margin-top: 0; }
.cblock__prose p { margin: 0 0 var(--sp-4); }
.cblock__prose p:last-child { margin-bottom: 0; }
.cblock__prose ul, .cblock__prose ol { margin: 0 0 var(--sp-4); padding-inline-start: 1.25em; }
.cblock__prose li + li { margin-top: var(--sp-1); }
.cblock__prose li::marker { color: var(--color-accent-gold); }

.cblock__more { margin: var(--sp-4) 0 0; }
.cblock__more a,
.cblock__aside a {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  color: var(--color-link-accent);
  font-weight: var(--fw-semi);
  font-size: var(--fs-sm);
  text-decoration: none;
}
.cblock__more a:hover { color: var(--color-link-accent-hover); text-decoration: underline; }
.cblock__aside { margin: var(--sp-4) 0 0; font-size: var(--fs-sm); color: var(--color-text); }
.cblock__aside a { font-size: inherit; color: var(--color-link); white-space: nowrap; }

/* Lists: gold dot by default, a teal tick in the causes cards. */
.clist { list-style: none; margin: 0; padding: 0; }
.clist li { position: relative; padding-inline-start: 1.15em; line-height: var(--lh-snug); }
.clist li + li { margin-top: var(--sp-2); }
.clist li::before {
  content: "";
  position: absolute; left: 0; top: 0.5em;
  width: 0.4em; height: 0.4em; border-radius: 50%;
  background: var(--color-accent-gold);
}
.clist--tick li { padding-inline-start: 1.5em; }
.clist--tick li::before {
  top: 0.32em; width: 0.7em; height: 0.38em;
  border-radius: 0; background: none;
  border-left: 2px solid var(--color-heading);
  border-bottom: 2px solid var(--color-heading);
  transform: rotate(-45deg);
}
@media (min-width: 40rem) {
  .clist--two { columns: 2; column-gap: var(--sp-6); }
  .clist--two li { break-inside: avoid; }
}

/* A one-line aside with an icon: white card, gold edge (the pcard edge). */
.cnote {
  display: flex; gap: var(--sp-3); align-items: center;
  margin: var(--sp-5) 0 0;
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-left: 4px solid var(--color-edge-gold);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--color-text);
}
.cnote__icon { flex: none; color: var(--color-link-accent); stroke-width: 1.5; }

/* --- 2  Symptoms: up to three groups side by side ------------------------ */

.csymptoms { display: grid; gap: var(--sp-5); }
@media (min-width: 40rem) {
  .csymptoms[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .csymptoms[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  /* Hairlines between the three groups, as in the mock-up. */
  .csymptoms[data-count="3"] .csymptoms__group { padding-inline: var(--sp-5); }
  .csymptoms[data-count="3"] .csymptoms__group:first-child { padding-inline-start: 0; }
  .csymptoms[data-count="3"] .csymptoms__group:last-child { padding-inline-end: 0; }
  .csymptoms[data-count="3"] .csymptoms__group + .csymptoms__group { border-left: 1px solid var(--color-divider); }
}
.csymptoms__title {
  display: flex; align-items: center; gap: var(--sp-2);
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-h6);
  font-weight: var(--fw-semi);
  color: var(--color-heading);
}
.csymptoms__icon { flex: none; color: var(--color-link-accent); stroke-width: 1.5; }
.csymptoms .clist { font-size: var(--fs-sm); color: var(--color-text); }

/* --- 3  When to seek care ------------------------------------------------
   Set apart, but not alarming: white card with a dark teal edge and a warning
   icon. No red; the brand has none and a red box reads as an error message. */

.csafety {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-heading);
  border-radius: var(--radius-lg);
}
.csafety__icon { color: var(--color-heading); line-height: 0; padding-top: 2px; }
.csafety__icon svg { stroke-width: 1.5; }
.csafety__title { margin: 0 0 var(--sp-2); font-size: var(--fs-h5); color: var(--color-heading); line-height: var(--lh-snug); }
.csafety__intro { margin: 0 0 var(--sp-4); font-size: var(--fs-sm); color: var(--color-text); }
.csafety .clist { font-size: var(--fs-sm); color: var(--color-text-strong); }
.csafety .clist li::before { background: var(--color-heading); }
/* The editor box: sentences, bullets and bold in whatever order was typed. */
.csafety__text { font-size: var(--fs-sm); color: var(--color-text); }
.csafety__text > :first-child { margin-top: 0; }
.csafety__text > :last-child { margin-bottom: 0; }
.csafety__text p { margin: 0 0 var(--sp-4); }
.csafety__text strong, .csafety__text b { font-weight: var(--fw-semi); color: var(--color-text-strong); }
.csafety__text ul, .csafety__text ol { margin: 0 0 var(--sp-4); color: var(--color-text-strong); }
.csafety__text ul { list-style: none; padding: 0; }
.csafety__text ol { padding-inline-start: 1.25em; }
.csafety__text li { line-height: var(--lh-snug); }
.csafety__text li + li { margin-top: var(--sp-2); }
.csafety__text ul > li { position: relative; padding-inline-start: 1.15em; }
.csafety__text ul > li::before {
  content: "";
  position: absolute; left: 0; top: 0.5em;
  width: 0.4em; height: 0.4em; border-radius: 50%;
  background: var(--color-heading);
}
@media (min-width: 40rem) {
  .csafety__text > ul, .csafety__text > ol { columns: 2; column-gap: var(--sp-6); }
  .csafety__text li { break-inside: avoid; }
}
.csafety__close {
  margin: var(--sp-4) 0 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--color-text-strong);
}
@media (max-width: 39.99rem) {
  .csafety { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); padding: var(--sp-4); }
}

/* --- 4  What is it: text, optional picture, "Read more" ------------------- */

.cabout--media { display: grid; gap: var(--sp-6); align-items: start; }
@media (min-width: 48rem) {
  .cabout--media { grid-template-columns: minmax(0, 1fr) 15rem; }
}
.cabout__media { margin: 0; }
.cabout__media img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }

.cmore { margin-top: var(--sp-4); }
.cmore__toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--color-btn-secondary-border);
  border-radius: var(--radius-md);
  color: var(--color-link);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
}
.cmore__toggle::-webkit-details-marker { display: none; }
.cmore__toggle::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--transition);
}
.cmore[open] .cmore__toggle::after { transform: translateY(2px) rotate(225deg); }
.cmore__toggle:hover { background: var(--color-btn-primary-bg); border-color: var(--color-btn-primary-bg); color: var(--color-btn-primary-fg); }
.cmore__toggle:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.cmore__close, .cmore[open] .cmore__open { display: none; }
.cmore[open] .cmore__close { display: inline; }
.cmore[open] .cmore__toggle { order: 2; }
.cmore[open] { display: flex; flex-direction: column; align-items: flex-start; }
.cmore__body { margin-bottom: var(--sp-4); }
.cmore__body > :first-child { margin-top: 0; }

/* --- 5  Causes and risk: two tinted cards --------------------------------
   Same diluted tints as the at-a-glance cards, so the page has one family of
   soft cards rather than two. */

.cpair { display: grid; gap: var(--sp-4); }
@media (min-width: 40rem) {
  .cpair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Titles share one row, so the two lists start level even when one
     card title runs to two lines (editable since 5 Nov 2026). */
  .cpair__card { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
}
.cpair__card {
  --cpair-tint: var(--color-tile-gold);
  background: color-mix(in srgb, var(--cpair-tint) 45%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--cpair-tint) 80%, var(--color-divider));
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}
.cpair__card--teal { --cpair-tint: var(--color-tile-teal); }
.cpair__title { margin: 0 0 var(--sp-3); font-size: var(--fs-h6); font-weight: var(--fw-semi); color: var(--color-heading); }
.cpair .clist { font-size: var(--fs-sm); color: var(--color-text-on-tint); }

/* --- 6  Treatment grid ---------------------------------------------------- */

.ctreat {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  gap: var(--sp-5) var(--sp-6);
  grid-template-columns: minmax(0, 1fr);
}
/* Two to a row: in a ~53rem column three made short, wrapped headings and an
   uneven last row with eight items. Two gives even rows for six or eight. */
@media (min-width: 40rem) { .ctreat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ctreat__item { display: flex; gap: var(--sp-3); align-items: flex-start; }
.ctreat__icon {
  flex: none;
  display: grid; place-items: center;
  inline-size: 2.75rem; block-size: 2.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-warm);
  color: var(--color-heading);
}
.ctreat__icon svg { stroke-width: 1.5; }
.ctreat__title { margin: 0 0 var(--sp-1); font-size: var(--fs-base); font-weight: var(--fw-semi); color: var(--color-heading); line-height: var(--lh-snug); }
.ctreat__title a { color: inherit; text-decoration: underline; text-decoration-color: var(--color-accent-gold); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.ctreat__title a:hover { color: var(--color-link-hover); text-decoration-color: currentColor; }
.ctreat__text { margin: 0; font-size: var(--fs-sm); line-height: var(--lh-snug); color: var(--color-text); }

/* --- 7  First appointment: the numbered steps are in sections/first-visit.css,
   shared with the First appointment section on service pages (loaded by
   inc/conditions.php). */

/* --- 10  Billing --------------------------------------------------------- */

.cbilling {
  padding: var(--sp-5) var(--sp-5) var(--sp-5);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-left: 4px solid var(--color-edge-gold);
  border-radius: var(--radius-lg);
}
.cbilling .cblock__intro { margin-bottom: var(--sp-4); }
.cbilling__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); }
@media (min-width: 40rem) {
  .cbilling__list[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cbilling__list[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.cbilling__item { display: flex; gap: var(--sp-3); align-items: flex-start; }
.cbilling__icon { flex: none; color: var(--color-heading); stroke-width: 1.5; }
.cbilling__title { margin: 0 0 var(--sp-1); font-size: var(--fs-base); font-weight: var(--fw-semi); color: var(--color-heading); line-height: var(--lh-snug); }
.cbilling__text { margin: 0; font-size: var(--fs-sm); line-height: var(--lh-snug); color: var(--color-text); }
.cbilling__note { margin: var(--sp-4) 0 0; font-size: var(--fs-xs); color: var(--color-text-muted); }

/* --- 11  FAQs ----------------------------------------------------------- */

.cfaq { margin: 0; }

/* --- 14  Reviewed by ----------------------------------------------------- */

.creview { font-size: var(--fs-sm); color: var(--color-text); }
.creview__by { display: flex; gap: var(--sp-3); align-items: center; }
.creview__photo { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; flex: none; }
.creview__text { display: flex; gap: var(--sp-2); align-items: flex-start; margin: 0; line-height: var(--lh-snug); }
.creview__icon { flex: none; color: var(--color-heading); stroke-width: 1.75; margin-top: 1px; }
.creview__text a { color: var(--color-link); font-weight: var(--fw-semi); }
.creview__date { color: var(--color-text-muted); }
.creview__refs { margin-top: var(--sp-4); }
.creview__refs summary { cursor: pointer; color: var(--color-link); font-weight: var(--fw-semi); }
.creview__refs ol { margin: var(--sp-3) 0 0; padding-inline-start: 1.4em; }
.creview__refs li + li { margin-top: var(--sp-2); }
.creview__refs a { color: var(--color-link); }

/* --- Extra sections ------------------------------------------------------ */

.cextra--media { display: grid; gap: var(--sp-6); align-items: start; }
@media (min-width: 48rem) { .cextra--media { grid-template-columns: minmax(0, 1fr) 15rem; } }
.cextra__media { margin: 0; }
.cextra__media img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.cextra__video { margin-top: var(--sp-5); }
.cextra__video iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-lg); }

/* --- Side column ---------------------------------------------------------
   The column itself scrolls with the page; only the booking card, which comes
   last, sticks below the header, so "Book" stays in view down the whole main
   column. (The blog rail sticks as a whole, but this one is taller than a
   laptop screen and would need its own scrollbar.) */

@media (min-width: 62.01rem) {
  .cond-rail { align-self: stretch; }
  .cond-rail__book { position: sticky; top: calc(var(--header-h) + var(--sp-5)); }
}

.cond-rail__buttons { display: grid; gap: var(--sp-2); }
.cond-rail__buttons .btn { justify-content: center; }
.cond-rail__plain { display: block; padding: var(--sp-3) 0; font-weight: var(--fw-medium); line-height: var(--lh-snug); }

/* Resources: icon, title, and the type ("Video") on the right. */
.cres a { justify-content: flex-start; align-items: flex-start; }
.pcard__list .cres__icon { color: var(--color-heading); stroke-width: 1.5; margin-top: 1px; }
.cres__title { flex: 1; }
.cres__type {
  flex: none;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  color: var(--color-eyebrow);
}

.cteam { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.cteam__item { display: flex; gap: var(--sp-3); align-items: center; }
.cteam__photo { width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; flex: none; }
.cteam__photo--initial { display: grid; place-items: center; background: var(--color-surface-cool); color: var(--color-heading); font-weight: var(--fw-bold); }
.cteam__name { display: block; color: var(--color-text-strong); font-weight: var(--fw-semi); font-size: var(--fs-sm); text-decoration: none; line-height: var(--lh-snug); }
.cteam__name:hover { color: var(--color-link); text-decoration: underline; }
.cteam__role { display: block; font-size: var(--fs-xs); color: var(--color-text-muted); line-height: var(--lh-snug); }

/* Phones: blocks a little closer together. */
@media (max-width: 39.99rem) {
  .cblock + .cblock { margin-top: var(--sp-6); padding-top: var(--sp-6); }
  .cbilling { padding: var(--sp-4); }
}

/* Editors-only note for an empty part (hpw_condition_hint). */
.chint {
  margin: var(--sp-6) 0 0;
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* Phones: the symptom groups and the first-visit steps become sideways swipe
   rows (components.css), like the at-a-glance cards, which took about 600px
   off the page at 390px. In a row the symptom groups need a card edge. */
@media (max-width: 39.99rem) {
  .csymptoms__group {
    background: var(--color-surface);
    border: 1px solid var(--color-divider);
    border-left: 4px solid var(--color-edge-gold);
    border-radius: var(--radius-lg);
    padding: var(--sp-4);
  }
}
