/* ========================================================================
   SHARED INSIDE-PAGE COMPONENTS (workflow 00c)
   Markup: src/_includes/components/*.njk. Loaded only on pages whose front
   matter names a `family` (layouts/base-simple.njk), before client.css.

   Shared file: identical on every site, so a fix back-ports as a drop-in.
   It holds structure, behavior states and a plain default skin, all driven
   by the --ds-* tokens below. A client never edits this file: it sets the
   tokens and adds its signatures in its own client.css.

   Contents: 1 tokens, 2 sections and type, 3 opener, 4 media, 5 actions,
   6 split rows and text, 7 entries, 8 steps and checklist, 9 comparison,
   10 FAQ, 11 portraits, 12 quotes, 13 action panels and offers, 14 link rows,
   15 responsive, 16 states, 17 full-width components, 18 readout, 19 alert,
   20 band, 21 inset, 22 rule, 23 closing panel, 24 opener variants teach and
   urgent, 25 more actions, 26 self-hosted video, 27 step conditions.
   ======================================================================== */


/* 1. TOKENS: defaults from the template's own variables, so an unstyled
   client still gets a coherent page. */
:root {
  --ds-ground: var(--bg-light, #ffffff);
  --ds-raised: var(--surface-color, #ffffff);
  --ds-mat-bg: var(--bg-secondary, #f2f2f2);
  --ds-text: var(--text-primary, #222222);
  --ds-muted: var(--text-secondary, #555555);
  --ds-rule: var(--border-color, #d9d9d9);
  --ds-rule-strong: var(--text-primary, #222222);
  --ds-frame: var(--text-primary, #222222);
  --ds-btn-bg: var(--button-color, #222222);
  --ds-btn-text: #ffffff;
  --ds-btn-hover: var(--button-hover-color, #000000);
  --ds-focus: var(--text-primary, #222222);
  --ds-radius: var(--border-radius, 0);
  --ds-font-display: var(--font-family-headings, Georgia, serif);
  --ds-font-body: var(--font-family-base, system-ui, sans-serif);
  --ds-weight-display: var(--heading-font-weight, 600);

  --ds-size-h1: clamp(2.375rem, 1.9rem + 1.9vw, 3.75rem);
  --ds-size-h2: clamp(1.75rem, 1.5rem + 0.9vw, 2.5rem);
  --ds-size-h3: clamp(1.5rem, 1.35rem + 0.4vw, 1.75rem);
  --ds-size-body: 1.125rem;
  --ds-size-lead: clamp(1.1875rem, 1.15rem + 0.1vw, 1.25rem);
  --ds-size-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --ds-size-quote: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --ds-leading: 1.7;

  --ds-gutter: clamp(1rem, 4vw, 4rem);
  --ds-max: 76rem;
  --ds-measure: 33rem;               /* side columns: split prose, people text */
  --ds-measure-wide: min(75%, 54rem); /* the single wide reading column (prose leaves) */
  --ds-wide: 100%;                   /* tables, entries, FAQ rows */
  --ds-chapter-space: clamp(2.25rem, 1.5rem + 3.2vw, 5rem);
  --ds-opener-space: clamp(1.5rem, 1rem + 2vw, 3rem);
  --ds-inner-space: clamp(1.25rem, 1rem + 1vw, 2rem);
  --ds-mat: clamp(0.625rem, 0.5rem + 0.5vw, 1rem);
  --ds-media-col: minmax(0, 1fr);
  --ds-panel-pad: var(--ds-inner-space);  /* a framed panel's inner padding (not part of the rhythm) */
}


/* 2. SECTIONS AND TYPE */
.ds-section {
  padding-block: var(--ds-chapter-space) 0;
  background-color: var(--ds-ground);
  color: var(--ds-text);
  font-family: var(--ds-font-body);
  font-size: var(--ds-size-body);
  line-height: var(--ds-leading);
  scroll-margin-top: 6rem;
}

.ds-section[hidden],
.ds-section [hidden] {
  display: none !important;
}

.ds-section:last-of-type {
  padding-block-end: var(--ds-chapter-space);
}

.ds-wrap {
  max-width: var(--ds-max);
  margin-inline: auto;
  padding-inline: var(--ds-gutter);
}

.ds-section h1,
.ds-section h2,
.ds-section h3 {
  color: var(--ds-text);
  text-wrap: balance;
}

.ds-section h1 {
  margin: 0 0 1rem;
  font-family: var(--ds-font-display);
  font-size: var(--ds-size-h1);
  font-weight: var(--ds-weight-display);
  line-height: 1.05;
}

.ds-section h2 {
  margin: 0 0 var(--ds-inner-space);
  font-family: var(--ds-font-display);
  font-size: var(--ds-size-h2);
  font-weight: var(--ds-weight-display);
  line-height: 1.1;
}

.ds-section h3 {
  margin: var(--ds-inner-space) 0 0.5rem;
  font-family: var(--ds-font-display);
  font-size: var(--ds-size-h3);
  font-weight: var(--ds-weight-display);
  line-height: 1.2;
}

.ds-section h2 + h3,
.ds-section h2 + p + h3 {
  margin-block-start: 1rem;
}

.ds-section p {
  margin: 0 0 1rem;
  font-size: var(--ds-size-body);
  line-height: var(--ds-leading);
}

.ds-section p:last-child {
  margin-block-end: 0;
}

.ds-section a:not(.ds-btn) {
  color: var(--ds-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.ds-section .ds-lead {
  font-size: var(--ds-size-lead);
  line-height: 1.6;
}

.ds-section .ds-small,
.ds-section .ds-handoff,
.ds-section .ds-col p.ds-handoff {
  max-width: 32em;
  font-size: var(--ds-size-small);
  color: var(--ds-muted);
}

/* Content column (Dan, 2026-10-10): a single wide column is the norm, and
   every reduced-width block is centered on the page axis. Reading chapters
   set their whole content column (.ds-col: heading, prose, lists, tables,
   stage grids, figure pairs, statement rows, link rows) at the reading width
   (--ds-measure-wide, a share of the content width with a cap), centered, so
   heading and text share one left edge inside it. The wide components run
   the full content width: openers, portrait registers of several people,
   reviews, the offer frame and the full-width closing (action variant
   "close-full", for pages whose body is full width, such as the team page),
   and the readouts, evidence bands, insets and compact closings (section
   17). A client may add comparison or split rows in its own stylesheet.
   The reviews heading still sits on the reading column's axis, so a
   reading page keeps one heading edge. Below 62em every column is the full
   width. */
@media (min-width: 62em) {
  .ds-section:not(.ds-opener):not(.ds-portraits--doctors):not(.ds-portraits--row):not(.ds-quotes):not(.ds-action--offer):not(.ds-action--close-full):not(.ds-readout):not(.ds-band):not(.ds-inset):not(.ds-action--compact):not(.ds-action--phone-lead):not(.ds-split--wide):not(.ds-comparison--wide) > .ds-wrap > .ds-col,
  .ds-quotes > .ds-wrap > .ds-col > h2 {
    width: 100%;
    max-width: var(--ds-measure-wide);
    margin-inline: auto;
  }
}

/* Units: subsections that can sit side by side (text variant "parallel"). */
.ds-unit > :first-child {
  margin-block-start: 0;
}

.ds-unit + .ds-unit {
  margin-block-start: var(--ds-inner-space);
}

@media (min-width: 62em) {
  .ds-text--parallel .ds-units {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
  }

  .ds-text--parallel .ds-unit + .ds-unit {
    margin-block-start: 0;
  }

  .ds-text--parallel .ds-unit > * {
    max-width: none;
  }
}


/* 3. OPENER: a raised panel beside its media; the jump row spans below. */
.ds-opener {
  padding-block-start: var(--ds-opener-space);
}

.ds-opener .ds-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.ds-opener .ds-links {
  grid-column: 1 / -1;
}

.ds-panel {
  padding: clamp(1.5rem, 1rem + 2vw, 3rem);
  background-color: var(--ds-raised);
  border: 1px solid var(--ds-rule);
  border-radius: var(--ds-radius);
}

.ds-panel > :last-child {
  margin-block-end: 0;
}

.ds-panel p {
  max-width: var(--ds-measure);
}

.ds-section .ds-person-text .ds-note {
  max-width: 32em;
}

.ds-opener--people .ds-col {
  grid-template-columns: minmax(0, 1fr);
}

.ds-opener--people .ds-panel {
  padding: 0;
  background: none;
  border: 0;
}


/* 4. MEDIA: figures, mats and captions outside the image. */
.ds-media {
  margin: 0;
}

.ds-mat {
  padding: var(--ds-mat);
  background-color: var(--ds-mat-bg);
  border-radius: var(--ds-radius);
}

.ds-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--ds-radius);
}

.ds-media .muvi-container {
  border-radius: var(--ds-radius);
  box-shadow: none;
}

.ds-media .muvi-container video {
  display: block;
  width: 100%;
}

.ds-media figcaption {
  margin-block-start: 0.75rem;
  font-size: var(--ds-size-small);
  line-height: 1.5;
  color: var(--ds-muted);
}

.ds-media + .ds-media {
  margin-block-start: var(--ds-inner-space);
}

/* A labeled pair: two complete diagrams side by side, never cropped. */
.ds-media--pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ds-inner-space);
  align-items: start;
}

.ds-media--pair > .ds-media + .ds-media {
  margin-block-start: 0;
}

.ds-media--model img {
  object-fit: contain;
  background-color: #ffffff;   /* the diagrams are drawn on white; keeps their edges whole */
}

.ds-media--pair {
  max-width: var(--ds-wide);
}


/* 5. ACTIONS: one primary request button, a quieter phone link. */
.ds-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-block: 1.5rem 0;
}

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  max-width: 100%;
  padding: 0.857em 1.714em;
  border: 1px solid var(--ds-btn-bg);
  border-radius: var(--ds-radius);
  background-color: var(--ds-btn-bg);
  color: var(--ds-btn-text);
  font-family: var(--ds-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  text-wrap: balance;
  white-space: normal;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.ds-btn:hover,
.ds-btn:focus-visible {
  background-color: var(--ds-btn-hover);
  border-color: var(--ds-btn-hover);
  color: var(--ds-btn-text);
}

.ds-section .ds-phone,
.ds-section .ds-link {
  display: inline-block;
  padding-block: 0.625rem;
  font-weight: 600;
  white-space: nowrap;
}

.ds-section .ds-link {
  white-space: normal;
}

/* Listed hours beside a phone link (hours()): quiet text, filled by
   office-hours.js from the one schedule; hidden until filled. */
.ds-section .ds-hours {
  font-size: var(--ds-size-small);
  color: var(--ds-muted);
  white-space: nowrap;
}

.ds-section .ds-hours[hidden] {
  display: none;
}

/* A compact review summary (rating()): decorative stars, then the rating and
   count as text. */
.ds-section .ds-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.625rem;
  margin-block: 1rem 0;
  font-size: var(--ds-size-small);
  font-weight: 600;
}

.ds-stars {
  display: inline-flex;
  gap: 0.125rem;
  color: var(--ds-star, currentColor);
}

.ds-stars svg {
  display: block;
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.ds-rating + .ds-handoff {
  margin-block-start: 0.75rem;
}

/* A standalone onward link in its own paragraph gets a comfortable target. */
.ds-section .ds-more a {
  display: inline-block;
  padding-block: 0.625rem;
  font-weight: 600;
}

.ds-actions + .ds-handoff {
  margin-block-start: 0.75rem;
}


/* 6. SPLIT ROWS AND TEXT: one stable reading column with the slot's own
   figures (direct children only, so a nested pair lays out inside its own
   figure). The composition's `media` setting places them:
     end    beside the reading column, trailing (default)
     start  beside the reading column, leading
     below  after the text, side by side at one width, mats the same shape
   Beside (end or start) starts at 72em: below that the reading column is too
   narrow for prose and a figure to end together (the landing's practice
   chapter ends 160 to 245px apart from 992 to 1104px wide, measured
   2026-10-10), so it stacks: text, then media. Below starts at 48em. Both
   items sit in grid row 1 explicitly, so source order never changes the
   rows. */
.ds-split .ds-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--ds-inner-space);
  align-items: start;
}

.ds-split .ds-col > .ds-media + .ds-media {
  margin-block-start: 0;
}

@media (min-width: 72em) {
  .ds-split:not(.ds-media-below) .ds-col {
    grid-template-columns: minmax(0, 1fr) var(--ds-media-col);
    column-gap: clamp(2rem, 4vw, 3rem);
  }

  /* One figure makes one content row; group several figures in one
     media("pair") rather than letting them stack beside the prose. */
  .ds-split:not(.ds-media-below) .ds-col > .ds-prose {
    grid-column: 1;
    grid-row: 1;
  }

  .ds-split:not(.ds-media-below) .ds-col > .ds-prose > * {
    max-width: none;
  }

  .ds-split:not(.ds-media-below) .ds-col > .ds-media {
    grid-column: 2;
    grid-row: 1;
  }

  .ds-split.ds-media-start .ds-col {
    grid-template-columns: var(--ds-media-col) minmax(0, 1fr);
  }

  .ds-split.ds-media-start .ds-col > .ds-prose {
    grid-column: 2;
    grid-row: 1;
  }

  .ds-split.ds-media-start .ds-col > .ds-media {
    grid-column: 1;
    grid-row: 1;
  }

  /* Anything after the paired row (a person aside, an onward link) spans
     the column below it. */
  .ds-split:not(.ds-media-below) .ds-col > :not(.ds-prose):not(.ds-media) {
    grid-column: 1 / -1;
  }
}

/* A compact person beside the sentence about them (.ds-aside-person): a
   small portrait, never a full-height one, at every width. */
.ds-aside-person {
  display: grid;
  grid-template-columns: clamp(4.5rem, 3.5rem + 4vw, 7rem) minmax(0, 1fr);
  column-gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: center;
}

.ds-aside-person > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
  background-color: var(--ds-mat-bg);
  border-radius: var(--ds-radius);
}

.ds-section .ds-aside-person > p {
  max-width: none;
  margin: 0;
}

@media (min-width: 48em) {
  .ds-split.ds-media-below .ds-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--ds-inner-space);
  }

  .ds-split.ds-media-below .ds-col > .ds-prose {
    grid-column: 1 / -1;
  }
}

.ds-split.ds-media-below .ds-media--model .ds-mat img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

/* The composition's `frame` setting: mat (media on an inset linen ground,
   the default) or none (media on the page ground). */
.ds-frame-none .ds-mat {
  padding: 0;
  background: none;
}


/* 7. NAMED ENTRIES: options as open named entries on fine separators. */
.ds-entry-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  max-width: var(--ds-wide);
  margin-block-start: var(--ds-inner-space);
  border-block-start: 1px solid var(--ds-rule-strong);
}

.ds-entry {
  padding-block: 1.25rem;
  border-block-end: 1px solid var(--ds-rule);
}

/* The last row of entries ends on its text: no padding or rule below it,
   so the next chapter starts one rhythm after the words. */
.ds-entry:last-child {
  padding-block-end: 0;
  border-block-end: 0;
}

@media (min-width: 48em) {
  .ds-entry:nth-last-child(2):nth-child(odd) {
    padding-block-end: 0;
    border-block-end: 0;
  }
}

.ds-section .ds-entry h3 {
  margin-block: 0 0.35rem;
}


/* 8. STEPS AND CHECKLIST */
.ds-stage-list {
  margin: var(--ds-inner-space) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: ds-step;
  border-block-start: 1px solid var(--ds-rule-strong);
}

.ds-step {
  display: grid;
  align-content: start;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  padding-block: 1.125rem;
  border-block-end: 1px solid var(--ds-rule);
  counter-increment: ds-step;
}

.ds-step::before {
  content: counter(ds-step);
  content: counter(ds-step) / "";
  grid-row: 1 / span 2;
  padding-block-start: 0.15rem;
  font-size: var(--ds-size-small);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ds-text);
}

.ds-step > * {
  grid-column: 2;
}

/* Steps variant "two-up": one ordered list laid out in rows of two (1-2,
   3-4, ...), an odd last stage across the row. Row-major, so the reading
   and tab order is the list order. */
@media (min-width: 62em) {
  .ds-steps--two-up .ds-stage-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 4vw, 4rem);
  }

  .ds-steps--two-up .ds-step:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* The list ends on its last stage's text: no padding or rule below it, so
   the next chapter starts one rhythm after the words. */
.ds-step:last-child {
  padding-block-end: 0;
  border-block-end: 0;
}

.ds-section .ds-step h3 {
  margin: 0 0 0.25rem;
  font-family: var(--ds-font-body);
  font-size: var(--ds-size-body);
  font-weight: 600;
  line-height: 1.4;
}

.ds-stage-list + p,
.ds-entry-list + p,
.ds-checklist + p {
  margin-block-start: 1rem;
}

.ds-checklist {
  margin: 1rem 0 0;
  padding-inline-start: 1.25rem;
  list-style: disc;
}

.ds-checklist li {
  margin-block-end: 0.5rem;
  padding-inline-start: 0.25rem;
}

.ds-checklist li:last-child {
  margin-block-end: 0;
}

.ds-checklist li::marker {
  color: var(--ds-text);
}


/* 9. COMPARISON: criterion-by-option table. */
.ds-table {
  max-width: var(--ds-wide);
  margin-block: var(--ds-inner-space) 0;
  overflow-x: auto;
}

.ds-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--ds-size-body);
  line-height: 1.5;
}

.ds-table caption {
  caption-side: top;
  padding: 0 0 0.75rem;
  text-align: start;
  font-size: var(--ds-size-small);
  color: var(--ds-muted);
}

.ds-table th,
.ds-table td {
  padding: 0.875rem 1.25rem 0.875rem 0;
  text-align: start;
  vertical-align: top;
  border-block-end: 1px solid var(--ds-rule);
}

.ds-table thead th {
  font-size: var(--ds-size-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-block-end: 1px solid var(--ds-rule-strong);
}

.ds-table tbody th {
  font-weight: 600;
  width: 28%;
}

.ds-table td::before {
  display: none;
}

.ds-table + .ds-media {
  margin-block-start: var(--ds-inner-space);
}

.ds-table + p {
  margin-block-start: 1rem;
}

.ds-table + .ds-media + p {
  margin-block-start: var(--ds-inner-space);
}


/* 10. FAQ: ruled question rows, native disclosure, several may stay open. */
.ds-faq-list {
  max-width: var(--ds-wide);
  border-block-start: 1px solid var(--ds-rule-strong);
}

.ds-faq-item {
  border-block-end: 1px solid var(--ds-rule);
}

.ds-faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3rem;
  padding-block: 1rem;
  cursor: pointer;
  list-style: none;
}

.ds-faq-item > summary::-webkit-details-marker {
  display: none;
}

/* The plus/minus glyph is drawn, not text, so nothing extra is announced. */
.ds-faq-item > summary::after {
  content: "";
  flex: 0 0 1rem;
  width: 1rem;
  height: 1rem;
  background:
    linear-gradient(var(--ds-text), var(--ds-text)) center / 100% 2px no-repeat,
    linear-gradient(var(--ds-text), var(--ds-text)) center / 2px 100% no-repeat;
}

.ds-faq-item[open] > summary::after {
  background: linear-gradient(var(--ds-text), var(--ds-text)) center / 100% 2px no-repeat;
}

.ds-section .ds-faq-q {
  margin: 0;
  font-family: var(--ds-font-body);
  font-size: var(--ds-size-body);
  font-weight: 600;
  line-height: 1.45;
}

.ds-section .ds-faq-item > summary:focus-visible {
  outline-offset: 6px;
}

.ds-faq-a {
  padding-block-end: 1.25rem;
}

/* The list ends on its last question or answer: no trailing rule or
   padding, so the next chapter starts one rhythm after the words. */
.ds-faq-item:last-child {
  border-block-end: 0;
}

.ds-faq-item:last-child .ds-faq-a {
  padding-block-end: 0;
}


/* 11. PORTRAITS: portrait first, then name, role, biography, link. */
.ds-person {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.ds-person > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background-color: var(--ds-mat-bg);
  border-radius: var(--ds-radius);
}

.ds-person-text > * {
  max-width: var(--ds-measure);
}

/* A single entry (variant "single") spans the content width: its text column
   takes the rest of the row. */
.ds-portraits--single .ds-person-text > * {
  max-width: none;
}

.ds-person-text > :first-child {
  margin-block-start: 0;
}

.ds-section .ds-person-text h3 {
  margin-block: 0 0.35rem;
}

.ds-section .ds-role {
  font-size: var(--ds-size-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ds-muted);
}

.ds-person-text .ds-role {
  margin-block-end: 1rem;
}

.ds-person--compact {
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
}

.ds-people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ds-inner-space) clamp(1.5rem, 3vw, 3rem);
}

.ds-person--small {
  grid-template-columns: minmax(0, 1fr);
}

.ds-person--small > img {
  margin-block-end: 1rem;
}


/* 12. QUOTES: brief static quotations on fine separators. */
.ds-quote-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block-start: 1px solid var(--ds-rule-strong);
}

.ds-quote {
  margin: 0;
  padding: 1.5rem clamp(1rem, 2vw, 2rem) 0 0;
}

.ds-quote + .ds-quote {
  padding-inline-start: clamp(1rem, 2vw, 2rem);
  border-inline-start: 1px solid var(--ds-rule);
}

.ds-quote blockquote {
  margin: 0;
}

.ds-section .ds-quote blockquote p {
  font-family: var(--ds-font-display);
  font-size: var(--ds-size-quote);
  font-style: italic;
  line-height: 1.35;
}

.ds-quote figcaption {
  margin-block-start: 1rem;
  font-size: var(--ds-size-small);
  color: var(--ds-muted);
}


/* 13. ACTION PANELS AND OFFERS
   Statement rows: the statement beside its actions (closing, offer, the
   people opener), the heading across the row, any handoff line under the
   actions and the related links attached below. Source order is heading,
   statement, actions, handoff, links, so the tab order matches. */
/* Statement rows (statementRow(): statement(), actions, optional handoff).
   The row's own box is the container: the closing's content column, the
   offer panel and the people opener's panel. When the row holds a 22rem
   statement, a 3rem gap and a 15rem action column, it becomes two columns
   with the actions flush with the row's right edge; otherwise the actions
   stack under the statement. Long button labels wrap. */
.ds-action--close .ds-col,
.ds-action--close-full .ds-col,
.ds-action--offer .ds-panel,
.ds-opener--people .ds-panel {
  container: ds-row / inline-size;
}

.ds-statement > p {
  margin-block-end: 1rem;
}

.ds-statement > p:last-child {
  margin-block-end: 0;
}

.ds-statement-row {
  margin-block-start: 0;
}

.ds-statement-row > .ds-handoff {
  margin-block-start: 0.75rem;
}

/* Under the actions the handoff line runs the row's width, so a short line
   never sits as a narrower block off the column's axis. */
.ds-section .ds-statement-row > p.ds-handoff {
  max-width: none;
}

@container ds-row (min-width: 40rem) {
  .ds-statement-row {
    display: grid;
    grid-template-columns: minmax(22rem, 1fr) minmax(15rem, max-content);
    column-gap: 3rem;
    align-items: start;
  }

  /* The statement holds both rows (its box reaches the handoff line), with
     its text at the top. */
  .ds-statement-row > .ds-statement {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: stretch;
  }

  /* The actions stack flush right (button, then phone), so their column is
     only as wide as the widest action and the statement keeps the rest. */
  .ds-statement-row > .ds-actions {
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    align-items: flex-end;
    margin-block-start: 0;
  }

  .ds-section .ds-statement-row > p.ds-handoff {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    max-width: 22em;
  }
}

/* The offer (action variant "offer", frame "panel"): a full-width framed
   panel. Its terms come in explicit groups, side by side on wide screens,
   with the end line beneath; they are always expanded. */
.ds-frame-panel .ds-panel {
  border-color: var(--ds-frame);
  padding: var(--ds-panel-pad);
}

@media (min-width: 62em) {
  .ds-terms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 4vw, 4rem);
  }

  .ds-terms > .ds-terms-group + .ds-terms-group {
    margin-block-start: 0;
  }

  .ds-terms > .ds-ends {
    grid-column: 1 / -1;
  }
}

.ds-terms-group + .ds-terms-group,
.ds-terms > .ds-ends {
  margin-block-start: 0.75rem;
}

.ds-terms-group > p {
  margin-block-end: 0.75rem;
}

.ds-terms-group > p:last-child {
  margin-block-end: 0;
}

/* A framed panel is measured from its outer edge (border, or a client's mat
   ring): the section's own spacing puts one rhythm between the content
   before it and that edge, and one between the edge and the next chapter.
   Its inner padding is separate and never counts toward the rhythm. */

.ds-section .ds-action--offer h2,
.ds-action--offer .ds-panel h2 {
  margin-block-end: 0.75rem;
}

.ds-terms {
  margin-block-start: 1.5rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--ds-rule);
}

.ds-section .ds-terms p {
  max-width: 34em;
  margin-block-end: 0.75rem;
  font-size: var(--ds-size-small);
  line-height: 1.6;
}

.ds-section .ds-terms p:last-child {
  margin-block-end: 0;
}

.ds-section .ds-terms > .ds-ends {
  max-width: none;
}

.ds-section .ds-ends {
  font-weight: 600;
  color: var(--ds-text);
}


/* Request bands (action variant "band"; landing pages only, at most two):
   one centered statement line and the actions, centered at the reading
   width, with a full rhythm above and below like any chapter. */
.ds-action--band .ds-col {
  text-align: center;
}

.ds-section .ds-band-statement {
  max-width: none;
  margin-block: 0 1.25rem;
  font-family: var(--ds-font-display);
  font-size: var(--ds-size-h3);
  line-height: 1.3;
  text-wrap: balance;
}

.ds-action--band .ds-actions {
  justify-content: center;
  margin-block-start: 0;
}

/* Case examples (component "cases") hosted in a chapter: one case uses the
   whole reading column, its pair side by side when the column allows. */
.ds-cases .smile-cases--grid .smile-cases__list {
  grid-template-columns: minmax(0, 1fr);
}


/* 14. LINK ROWS: wrapping underlined links, never chips. */
.ds-links {
  margin-block-start: var(--ds-inner-space);
}

.ds-section .ds-linkrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ds-section .ds-linkrow li {
  margin: 0;
}

.ds-section .ds-linkrow a {
  display: inline-block;
  padding-block: 0.5rem;
  font-size: var(--ds-size-small);
  font-weight: 600;
}

.ds-links--related {
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--ds-rule);
}


/* The opener's jump row sits on the reading column's axis, left-aligned to
   the chapters below it. */
@media (min-width: 62em) {
  .ds-opener .ds-col > .ds-links {
    width: 100%;
    max-width: var(--ds-measure-wide);
    margin-inline: auto;
  }
}


/* 15. RESPONSIVE */
@media (max-width: 61.99em) {
  .ds-opener .ds-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .ds-opener .ds-media {
    margin-block-start: var(--ds-inner-space);
  }


  .ds-quote-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .ds-quote,
  .ds-quote + .ds-quote {
    padding-inline: 0;
    padding-block-end: 1.5rem;
    border-inline-start: 0;
    border-block-end: 1px solid var(--ds-rule);
  }

  .ds-quote:last-child {
    padding-block-end: 0;
    border-block-end: 0;
  }

  .ds-people {
    grid-template-columns: minmax(0, 1fr);
  }

  .ds-people {
    row-gap: clamp(2rem, 6vw, 2.75rem);
  }
}

@media (max-width: 47.99em) {
  .ds-person,
  .ds-person--compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .ds-person > img {
    max-width: 26rem;
    margin-block-end: 1.25rem;
  }

  .ds-entry-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Phones: comparison rows stack; each value keeps its option label. The
   generated label has empty alternative text: screen readers hear the real
   column header, kept through the explicit table roles in the markup. */
@media (max-width: 35.99em) {
  .ds-table {
    overflow-x: visible;
  }

  .ds-table table,
  .ds-table tbody,
  .ds-table tr,
  .ds-table th,
  .ds-table td {
    display: block;
  }

  .ds-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .ds-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
    padding-block: 0.875rem;
    border-block-end: 1px solid var(--ds-rule);
  }

  .ds-table tbody tr:first-child {
    border-block-start: 1px solid var(--ds-rule-strong);
  }

  .ds-table tbody th {
    grid-column: 1 / -1;
    width: auto;
    padding: 0 0 0.5rem;
    border: 0;
  }

  .ds-table td {
    padding: 0;
    border: 0;
  }

  .ds-table td::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    display: block;
    margin-block-end: 0.25rem;
    font-size: var(--ds-size-small);
    font-weight: 600;
    color: var(--ds-muted);
  }

  .ds-media--pair {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* 16. STATES: visible focus, no motion.
   The page ring is charcoal on light grounds. Embedded players keep their own
   contrasting focus treatment (muvi-player.css), so the rule skips anything
   inside a player. */
.ds-section :focus-visible:not(.muvi-container, .muvi-container *) {
  outline: 2px solid var(--ds-focus);
  outline-offset: 3px;
}

.ds-table[tabindex]:focus-visible {
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .ds-btn {
    transition: none;
  }
}


/* 17. FULL-WIDTH COMPONENTS: readouts (component "readout"), evidence
   bands ("band"), insets ("inset") and the compact closings (action
   variants "compact" and "phone-lead") run the content width (W), not the
   reading column; the reading-column rule in section 2 excludes them, and
   split rows and comparisons too when their composition picks variant
   "wide". */


/* 18. READOUT: labeled cells on hairlines. */
.ds-readout-box {
  border-block: 1px solid var(--ds-rule);
  border-inline: 1px solid transparent;   /* closes the frame without a visible side */
}

.ds-readout-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  margin: 0;
}

.ds-readout-cell {
  padding-block: 1.25rem;
  padding-inline: 1.25rem;
}

.ds-readout-cell:first-child {
  padding-inline-start: 0;
}

.ds-readout-cell:last-child {
  padding-inline-end: 0;
}

.ds-readout-cell + .ds-readout-cell {
  border-inline-start: 1px solid var(--ds-rule);
}

.ds-readout-list dt {
  margin: 0 0 0.5rem;
  font-size: var(--ds-size-small);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-muted);
}

.ds-readout-list dd {
  margin: 0;
}

.ds-section .ds-readout-list dd p {
  margin: 0;
  line-height: 1.5;
}

.ds-section .ds-readout-list dd p + p {
  margin-block-start: 0.5rem;
}

@media (max-width: 47.99em) {
  .ds-readout-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .ds-readout-cell,
  .ds-readout-cell:first-child,
  .ds-readout-cell:last-child {
    padding-inline: 0;
  }

  .ds-readout-cell + .ds-readout-cell {
    border-inline-start: 0;
    border-block-start: 1px solid var(--ds-rule);
  }
}


/* 19. ALERT: an urgent instruction, ruled, never color alone. */
.ds-alert {
  margin-block: var(--ds-inner-space) 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--ds-rule-strong);
  border-inline-start-width: 0.375rem;
  border-radius: var(--ds-radius);
}

.ds-section .ds-alert .ds-alert-title {
  margin: 0 0 0.35rem;
  font-family: var(--ds-font-body);
  font-size: var(--ds-size-body);
  font-weight: 700;
  line-height: 1.4;
}

.ds-section .ds-alert p {
  margin: 0;
}


/* 20. BAND: the evidence chapter, a framed panel at the content width with
   its media beside the copy. */
.ds-band-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ds-inner-space);
  padding: var(--ds-panel-pad);
  border: 1px solid var(--ds-rule);
  border-radius: var(--ds-radius);
}

.ds-band-copy > :first-child {
  margin-block-start: 0;
}

.ds-index {
  margin: var(--ds-inner-space) 0 0;
  padding: 0;
  list-style: none;
}

.ds-index-item {
  padding-block: 1rem;
  border-block-start: 1px solid var(--ds-rule);
}

.ds-index-item:last-child {
  padding-block-end: 0;
}

.ds-section .ds-index-item h3 {
  margin: 0 0 0.35rem;
}

.ds-section .ds-index-item p {
  margin: 0;
}

@media (min-width: 62em) {
  .ds-band-panel {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
  }

  .ds-band.ds-media-end .ds-band-panel > .ds-media {
    grid-column: 2;
    grid-row: 1;
  }

  .ds-band.ds-media-end .ds-band-panel > .ds-band-copy {
    grid-column: 1;
    grid-row: 1;
  }
}


/* 21. INSET: one tinted row, a statement paired with its action. */
.ds-inset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.5rem;
  padding: var(--ds-panel-pad);
  border: 1px solid var(--ds-rule);
  border-radius: var(--ds-radius);
  background-color: var(--ds-mat-bg);
}

.ds-inset-text {
  flex: 1 1 22rem;
}

.ds-inset-text > :first-child {
  margin-block-start: 0;
}

.ds-inset-row > .ds-actions {
  flex: 0 0 auto;
  margin-block-start: 0;
}


/* 22. RULE: a decorative divider; the client draws it. */
.ds-rule {
  height: 0;
  border-block-end: 1px solid var(--ds-rule);
}


/* 23. CLOSING PANEL (action variants compact and phone-lead): the statement
   row, a rule, then the visit readout, in one framed panel at the content
   width. */
.ds-close-panel {
  padding: var(--ds-panel-pad);
  border: 1px solid var(--ds-rule);
  border-radius: var(--ds-radius);
  background-color: var(--ds-raised);
  container: ds-row / inline-size;
}

.ds-close-panel > .ds-rule {
  margin-block: var(--ds-inner-space);
}

.ds-close-panel > .ds-readout-box {
  border: 0;
}

.ds-section .ds-close-panel h2 {
  margin-block-end: 0.75rem;
}


/* 24. OPENER VARIANTS: teach (text start, teaching media end, about 5 to 7)
   and urgent (a strong top rule; text and actions first). Phones stack in
   source order: title, lead, actions, then media. */
.ds-opener--teach .ds-panel,
.ds-opener--urgent .ds-panel {
  padding: 0;
  background: none;
  border: 0;
}

@media (min-width: 62em) {
  .ds-opener--teach .ds-col,
  .ds-opener--urgent .ds-col {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .ds-opener--urgent .ds-col {
    align-items: start;
  }

  /* The alert follows the text in source (phones read title, lead, actions,
     alert, then the image); on wide screens it spans the row under both. */
  .ds-opener--urgent .ds-col > .ds-panel {
    grid-column: 1;
    grid-row: 1;
  }

  .ds-opener--urgent .ds-col > .ds-media {
    grid-column: 2;
    grid-row: 1;
  }

  .ds-opener--urgent .ds-col > .ds-alert {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.ds-opener--urgent .ds-col {
  padding-block-start: var(--ds-inner-space);
  border-block-start: 2px solid var(--ds-rule-strong);
}

.ds-opener--people .ds-person {
  margin-block-start: var(--ds-inner-space);
}


/* 25. MORE ACTIONS: an outlined second button; the phone as the lead. */
.ds-btn--outline {
  background-color: transparent;
  color: var(--ds-btn-bg);
}

.ds-btn--outline:hover,
.ds-btn--outline:focus-visible {
  color: var(--ds-btn-text);
}

.ds-section .ds-phone--lead {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 2.75rem;
  font-family: var(--ds-font-display);
  font-size: var(--ds-size-h2);
  font-weight: var(--ds-weight-display);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}


/* 26. SELF-HOSTED VIDEO (media kinds clip and film): native controls,
   user-started. Each keeps the frame its width and height attributes give
   (a clip may be cropped from vertical footage to a taller-than-wide frame). */
.ds-media--clip video,
.ds-media--film video {
  display: block;
  width: 100%;
  height: auto;
  background-color: var(--ds-mat-bg);
  border-radius: var(--ds-radius);
}

.ds-media--clip {
  max-width: 22rem;
}

.ds-media--film video {
  aspect-ratio: 16 / 9;
}

/* Native players take focus as one control: a visible ring on the frame. */
.ds-media--clip video:focus,
.ds-media--film video:focus {
  outline: 2px solid var(--ds-focus);
  outline-offset: 3px;
}


/* 27. STEP CONDITIONS: a critical warning inside a step, before its action. */
.ds-section .ds-step .ds-condition {
  margin: 0 0 0.35rem;
  font-weight: 700;
}
