/* ==========================================================================
   The Briefing (includes/class-brief.php) — the two-minute summary layer.
   Uses the Integral theme tokens (debate-analyzer-integral.css), so it follows
   the page's light/dark toggle. Mobile first; nothing wider than the viewport.
   ========================================================================== */

.da-theme-integral .dab {
  display: grid;
  gap: 32px;
  margin: 0 0 56px;
  color: var(--text-primary);
  font-family: 'Lora', Georgia, serif;
}

.da-theme-integral .dab *,
.da-theme-integral .dab *::before,
.da-theme-integral .dab *::after {
  box-sizing: border-box;
}

.da-theme-integral .dab p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.6;
}

.da-theme-integral .dab q {
  font-style: italic;
  quotes: '\201C' '\201D';
}

.da-theme-integral .dab-label {
  display: block;
  margin: 0 0 6px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.da-theme-integral .dab-h {
  margin: 0 0 10px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.22;
  color: var(--text-primary);
}

/* ── Masthead ── */
.da-theme-integral .dab-mast {
  padding: 32px 18px 72px;
  border-radius: 12px;
  background: var(--header-bg);
  color: var(--header-text);
}

.da-theme-integral .dab-kicker {
  margin: 0 0 14px !important;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 237, 232, 0.72);
}

.da-theme-integral .dab-headline {
  max-width: 22em;
  margin: 0 0 14px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(28px, 4.6vw, 46px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--header-text);
}

.da-theme-integral .dab-dek {
  max-width: 44em;
  font-size: 18px !important;
  color: rgba(240, 237, 232, 0.86);
}

.da-theme-integral .dab-missing {
  max-width: 44em;
  margin: 18px 0 0 !important;
  padding-top: 16px;
  border-top: 1px solid rgba(240, 237, 232, 0.16);
  color: rgba(240, 237, 232, 0.86);
}

.da-theme-integral .dab-missing .dab-label {
  color: var(--s-amber);
}

.da-theme-integral .dab-missing strong {
  color: var(--header-text);
}

/* ── Face-off ── */
.da-theme-integral .dab-faceoff {
  position: relative;
  z-index: 2; /* above the masthead, so the stage tooltip is never covered */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: -72px 10px 0;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  /* No overflow: hidden here: it would clip the stage tooltip. The cards round their own corners. */
}

.da-theme-integral .dab-speaker {
  min-width: 0;
  padding: 22px 18px;
  border-top: 5px solid var(--a-accent);
  border-radius: 12px 12px 0 0;
}

.da-theme-integral .dab-speaker + .dab-speaker {
  border-radius: 0 0 12px 12px;
}

/* The stage pill sits at the top of its card, under the masthead: open its tooltip downward. */
.da-theme-integral .dab-stage .da-chip-tooltip {
  top: calc(100% + 10px);
  bottom: auto;
  z-index: 20;
}

/* Any stage tooltip that would run under the site's sticky menu opens downward instead (da-brief.js). */
.da-theme-integral .da-tip-below .da-chip-tooltip {
  top: calc(100% + 10px);
  bottom: auto;
}

.da-theme-integral .dab-speaker.is-b {
  border-top-color: var(--b-accent);
  background: var(--b-accent-dim);
}

.da-theme-integral .dab-speaker.is-a {
  background: var(--a-accent-dim);
}

.da-theme-integral .dab-speaker-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 14px;
}

.da-theme-integral .dab-speaker-name {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
}

.da-theme-integral .dab-stage {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  min-height: 28px;
  border: 1px solid var(--chip-label-bdr);
  border-radius: 4px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  cursor: help;
}

.da-theme-integral .dab-stage-num {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 3px 0 0 3px;
  background: #7a5232;
  color: #ffffff;
  font-weight: 500;
}

.da-theme-integral .dab-stage[data-da-stage="2.5"] .dab-stage-num { background: #d9a41f; color: #1a1714; }
.da-theme-integral .dab-stage[data-da-stage="3.5"] .dab-stage-num { background: #d47820; color: #1a1714; }
.da-theme-integral .dab-stage[data-da-stage="4.0"] .dab-stage-num { background: #2e7a4f; color: #ffffff; }
.da-theme-integral .dab-stage[data-da-stage="4.5"] .dab-stage-num { background: #18706f; color: #ffffff; }
.da-theme-integral .dab-stage[data-da-stage="5.0"] .dab-stage-num { background: #0fa8b4; color: #1a1714; }

.da-theme-integral .dab-stage-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  background: var(--chip-label-bg);
  color: var(--chip-label-color);
  border-radius: 0 3px 3px 0;
}

.da-theme-integral .dab-stage-reach {
  color: var(--text-secondary);
}

.da-theme-integral .dab-protecting {
  margin: 0 0 6px !important;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px !important;
  font-weight: 600;
  line-height: 1.28 !important;
  color: var(--a-accent);
}

.da-theme-integral .dab-speaker.is-b .dab-protecting {
  color: var(--b-accent);
}

.da-theme-integral .dab-why {
  color: var(--text-primary);
}

.da-theme-integral .dab-rows {
  margin: 14px 0 0;
  padding: 0;
}

.da-theme-integral .dab-rows > div {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.da-theme-integral .dab-rows dt {
  margin: 0 0 3px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.da-theme-integral .dab-rows dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.da-theme-integral .dab-rows .dab-blind dd {
  font-style: italic;
  color: var(--text-secondary);
}

/* ── Cards ── */
.da-theme-integral .dab-block {
  min-width: 0;
  padding: 22px 18px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.da-theme-integral .dab-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.da-theme-integral .dab-note {
  font-size: 13px !important;
  color: var(--text-secondary);
}

.da-theme-integral .dab-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  color: var(--a-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── The conversation: each speaker's game and currency ── */
.da-theme-integral .dab-voices {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
}

.da-theme-integral .dab-voice {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface2);
  border-left: 3px solid var(--border);
}

.da-theme-integral .dab-voice.is-a { border-left-color: var(--a-accent); }
.da-theme-integral .dab-voice.is-b { border-left-color: var(--b-accent); }

.da-theme-integral .dab-voice dt {
  margin: 0 0 2px;
  font-size: 15px;
}

.da-theme-integral .dab-voice dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ── Polarity ── */
.da-theme-integral .dab-polarity {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 6px;
  border-radius: 10px;
  overflow: hidden;
}

.da-theme-integral .dab-pole {
  min-width: 0;
  padding: 18px;
  background: var(--a-accent-dim);
}

.da-theme-integral .dab-pole.is-b {
  background: var(--b-accent-dim);
}

.da-theme-integral .dab-pole p {
  font-size: 15px;
}

.da-theme-integral .dab-pole-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px !important;
  font-weight: 600;
  line-height: 1.25 !important;
}

.da-theme-integral .dab-overdone {
  color: var(--text-secondary);
}

.da-theme-integral .dab-integration {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  background: var(--header-bg);
  color: var(--header-text);
  text-align: center;
}

.da-theme-integral .dab-integration .dab-label {
  color: var(--s-amber);
}

.da-theme-integral .dab-integration p {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  line-height: 1.38;
  color: var(--header-text);
}

/* ── Claim tally ── */
.da-theme-integral .dab-tally {
  display: grid;
  gap: 8px;
  margin: 12px 0 8px;
}

.da-theme-integral .dab-tally-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
}

.da-theme-integral .dab-tally-name {
  font-size: 14px;
  font-weight: 500;
}

.da-theme-integral .dab-tally-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.da-theme-integral .dab-mark {
  width: 26px;
  height: 16px;
  border-radius: 3px;
}

.da-theme-integral .dab-mark.is-severe { background: #b8473a; }
.da-theme-integral .dab-mark.is-mild { background: #e2c48f; }

.da-theme-integral .dab-tally-count {
  grid-column: 2;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Quotes and timestamps ── */
.da-theme-integral .dab-quote {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding-left: 10px;
  border-left: 3px solid var(--border);
}

.da-theme-integral .dab-quote.is-a { border-left-color: var(--a-accent); }
.da-theme-integral .dab-quote.is-b { border-left-color: var(--b-accent); }

.da-theme-integral .dab-quote-who {
  font-weight: 500;
}

.da-theme-integral .dab-time,
.da-theme-integral .da-cue-time {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 0;
  border-radius: 4px;
  background: var(--text-primary);
  color: var(--surface);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
  vertical-align: baseline;
}

/* The chip stays small; its touch target is 44px tall. */
.da-theme-integral .dab-time::after,
.da-theme-integral .da-cue-time::after {
  content: '';
  position: absolute;
  inset: -12px -4px;
}

.da-theme-integral .dab-time:hover,
.da-theme-integral .da-cue-time:hover {
  opacity: 0.85;
}

.da-theme-integral .dab-time:focus-visible,
.da-theme-integral .da-cue-time:focus-visible {
  outline: 2px solid var(--a-accent);
  outline-offset: 2px;
}

.da-theme-integral .dab-try {
  margin: 8px 0 4px;
  padding: 14px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--surface2);
}

.da-theme-integral .dab-try p {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
  line-height: 1.4;
}

/* ── Moments ── */
.da-theme-integral .dab-timeline {
  position: relative;
  height: 58px;
  margin: 6px 12px 14px;
}

.da-theme-integral .dab-timeline-track {
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--surface3);
}

.da-theme-integral .dab-marker {
  position: absolute;
  top: 4px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--surface);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  line-height: 21px;
  text-align: center;
}

.da-theme-integral .dab-marker.is-low {
  top: 27px;
}

.da-theme-integral .dab-timeline-end {
  position: absolute;
  right: 0;
  bottom: 0;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-secondary);
}

.da-theme-integral .dab-moment-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.da-theme-integral .dab-moment {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  background: var(--bg);
}

.da-theme-integral .dab-moment-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 12px;
  min-height: 44px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.da-theme-integral .dab-moment-head::-webkit-details-marker {
  display: none;
}

.da-theme-integral .dab-moment.is-locked .dab-moment-head {
  cursor: default;
}

.da-theme-integral .dab-moment-num {
  grid-row: span 2;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-secondary);
  padding-top: 4px;
}

.da-theme-integral .dab-moment-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.da-theme-integral details > .dab-moment-head .dab-moment-title::after {
  content: ' +';
  color: var(--text-secondary);
  font-weight: 400;
}

.da-theme-integral details[open] > .dab-moment-head .dab-moment-title::after {
  content: ' –';
}

.da-theme-integral .dab-moment-tagline {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.da-theme-integral .dab-moment-time {
  margin: 0 14px 14px 46px;
}

.da-theme-integral .dab-moment-lock {
  margin: -6px 14px 6px 36px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--a-accent);
}

.da-theme-integral .dab-moment-body {
  padding: 0 16px 14px 14px;
}

.da-theme-integral .dab-broader {
  font-style: italic;
  color: var(--text-secondary);
}

/* ── Bridging question ── */
.da-theme-integral .dab-bridge {
  padding: 28px 20px;
  border-radius: 12px;
  background: var(--header-bg);
  color: var(--header-text);
}

.da-theme-integral .dab-bridge .dab-label {
  color: var(--s-amber);
}

.da-theme-integral .dab-bridge-q {
  margin: 0 !important;
  max-width: 34em;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(21px, 2.8vw, 28px) !important;
  line-height: 1.32 !important;
  color: var(--header-text);
}

/* ── Go deeper ── */
.da-theme-integral .dab-deeper ul {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.da-theme-integral .dab-deeper li {
  margin: 0;
}

.da-theme-integral .dab-deeper a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 44px;
  height: 100%;
  padding: 16px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  color: var(--text-primary);
  text-decoration: none;
}

.da-theme-integral .dab-deeper a:hover,
.da-theme-integral .dab-deeper a:focus-visible {
  box-shadow: 0 0 0 2px var(--a-accent-bdr), var(--card-shadow);
}

.da-theme-integral .dab-deeper-name {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--a-accent);
}

.da-theme-integral .dab-deeper-tag {
  color: var(--text-secondary);
}

.da-theme-integral .dab-deeper-finding {
  font-size: 16px;
  line-height: 1.45;
}

/* ── "In brief" at the top of each tab ── */
.da-theme-integral .dab-inbrief {
  margin: 0 0 20px;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--surface2);
}

.da-theme-integral .dab-inbrief p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-primary);
}

/* A transcript turn the reader just jumped to. */
.da-theme-integral .da-turn.is-cued {
  background: var(--a-accent-dim);
  box-shadow: -8px 0 0 var(--a-accent-dim), 8px 0 0 var(--a-accent-dim);
  transition: background 600ms ease;
}

/* ── Wider screens ── */
@media (min-width: 720px) {
  .da-theme-integral .dab-mast {
    padding: 48px 40px 92px;
  }

  .da-theme-integral .dab-faceoff {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: -92px 24px 0;
  }

  .da-theme-integral .dab-speaker {
    border-radius: 12px 0 0 12px;
  }

  .da-theme-integral .dab-speaker + .dab-speaker {
    border-radius: 0 12px 12px 0;
  }

  .da-theme-integral .dab-speaker,
  .da-theme-integral .dab-block {
    padding: 28px;
  }

  .da-theme-integral .dab-pair,
  .da-theme-integral .dab-moment-list,
  .da-theme-integral .dab-deeper ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .da-theme-integral .dab-bridge {
    padding: 36px 40px;
  }

  /* Room for the time or lock at the top right of each moment. */
  .da-theme-integral .dab-moment-head {
    padding-right: 96px;
  }

  .da-theme-integral .dab-moment.is-locked .dab-moment-head {
    padding-right: 140px;
  }

  .da-theme-integral .dab-moment-time {
    position: absolute;
    top: 16px;
    right: 14px;
    margin: 0;
  }

  .da-theme-integral .dab-moment-lock {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
  }
}

@media (min-width: 900px) {
  .da-theme-integral .dab-polarity {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr) minmax(0, 1fr);
  }

  .da-theme-integral .dab-deeper ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .da-theme-integral .da-turn.is-cued {
    transition: none;
  }
}

/* ==========================================================================
   The long form below the briefing
   ========================================================================== */

/* ── Page zones: the speakers, then the full analysis ── */
.da-theme-integral .da-zone {
  margin: 72px 0 24px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.da-theme-integral .da-speaker-profiles > .da-zone {
  margin-top: 16px;
}

.da-theme-integral .da-zone-title {
  margin: 0 0 6px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
}

.da-theme-integral .da-zone-note {
  max-width: 34em;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ── Speaker cards: section heads and the centre-of-gravity pill ── */
.da-theme-integral .da-sp-section-head {
  padding: 28px 28px 12px;
  border-top: 1px solid var(--border);
}

.da-theme-integral .da-sp-section-title {
  margin: 0 0 4px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--text-primary);
}

.da-theme-integral .da-sp-section-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.da-theme-integral .da-sp-formula-reach {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

.da-theme-integral .da-sp-formula-caption {
  margin-top: 4px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.da-theme-integral .da-speaker-profiles-mobile .da-dev {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.da-theme-integral .da-speaker-profiles-mobile .da-dev .da-sp-section-head {
  border-top: 0;
  padding: 20px 16px 8px;
}

/* ── Developmental profile chart ── */
.da-theme-integral .da-dev-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 4px 28px 14px;
  list-style: none;
  font-size: 14px;
}

.da-theme-integral .da-dev-legend li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
}

.da-theme-integral .da-dev-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--a-accent);
}

.da-theme-integral .da-dev-legend .is-b .da-dev-swatch {
  background: var(--b-accent);
}

.da-theme-integral .da-dev-legend-stage {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

.da-theme-integral .da-dev-chart {
  padding: 0 28px 8px;
}

.da-theme-integral .da-dev-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  border-top: 1px solid var(--border-inner);
}

.da-theme-integral .da-dev-row.is-axis {
  min-height: 46px;
  border-top: 0;
}

.da-theme-integral .da-dev-row.is-overall {
  min-height: 62px;
  background: var(--surface2);
  border-radius: 8px;
  border-top: 0;
  margin-bottom: 4px;
}

.da-theme-integral .da-dev-line {
  padding-left: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.da-theme-integral .da-dev-track {
  position: relative;
  height: 52px;
  margin: 0 20px;
}

.da-theme-integral .da-dev-row.is-axis .da-dev-track {
  height: 46px;
}

.da-theme-integral .da-dev-grid {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.da-theme-integral .da-dev-tick {
  position: absolute;
  bottom: 4px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  white-space: nowrap;
  font-family: 'DM Mono', ui-monospace, monospace;
  color: var(--text-secondary);
}

.da-theme-integral .da-dev-tick.is-first {
  transform: none;
  align-items: flex-start;
}

.da-theme-integral .da-dev-tick.is-last {
  transform: translateX(-100%);
  align-items: flex-end;
}

.da-theme-integral .da-dev-tick b {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.da-theme-integral .da-dev-tick small {
  font-size: 10px;
}

.da-theme-integral .da-dev-dot {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  padding: 0;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--a-accent);
  color: #ffffff;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.da-theme-integral .da-dev-dot.is-b {
  background: var(--b-accent);
}

/* Touch target: 44px. */
.da-theme-integral .da-dev-dot::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
}

.da-theme-integral .da-dev-dot.is-up { margin-top: -27px; }
.da-theme-integral .da-dev-dot.is-down { margin-top: -5px; }

.da-theme-integral .da-dev-dot.is-hollow {
  background: var(--surface);
  color: var(--a-accent);
  border: 2px solid var(--a-accent);
}

.da-theme-integral .da-dev-dot.is-hollow.is-b {
  color: var(--b-accent);
  border-color: var(--b-accent);
}

.da-theme-integral .da-dev-dot:hover,
.da-theme-integral .da-dev-dot.is-why-open {
  transform: scale(1.12);
}

.da-theme-integral .da-dev-dot:focus-visible {
  outline: 3px solid var(--text-primary);
  outline-offset: 2px;
}

.da-theme-integral .da-dev-reach {
  position: absolute;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
  background: var(--a-accent-bdr);
}

.da-theme-integral .da-dev-reach.is-b { background: var(--b-accent-bdr); }
.da-theme-integral .da-dev-reach.is-up { margin-top: -13px; }
.da-theme-integral .da-dev-reach.is-down { margin-top: 9px; }

.da-theme-integral .da-dev-foot {
  margin: 0;
  padding: 6px 28px 22px;
  font-size: 14px;
}

.da-theme-integral .da-dev-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-secondary);
}

@media (max-width: 600px) {
  .da-theme-integral .da-dev-legend,
  .da-theme-integral .da-dev-chart,
  .da-theme-integral .da-dev-foot {
    padding-left: 12px;
    padding-right: 12px;
  }

  .da-theme-integral .da-dev-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .da-theme-integral .da-dev-line {
    padding-left: 4px;
    font-size: 13px;
  }

  .da-theme-integral .da-dev-track {
    margin: 0 16px;
  }

  /* Names don't fit under every tick on a phone; the dots' panels give them. */
  .da-theme-integral .da-dev-tick small {
    display: none;
  }
}

/* ── "Why this stage?" ── */
.da-theme-integral .da-has-why {
  cursor: pointer;
}

.da-theme-integral .da-why-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin: 0 4px 0 2px;
  align-self: center;
  border-radius: 50%;
  background: var(--surface3);
  color: var(--text-secondary);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  line-height: 1;
}

.da-theme-integral .is-why-open .da-chip-tooltip {
  display: none;
}

.da-theme-integral.debate-analysis,
.debate-analysis.da-theme-integral {
  position: relative;
}

.da-theme-integral .da-why-pop {
  position: absolute;
  z-index: 60;
  width: min(420px, calc(100vw - 32px));
  max-height: 70vh;
  overflow: auto;
  padding: 16px 18px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  color: var(--text-primary);
}

.da-theme-integral .da-why-pop[hidden] {
  display: none;
}

/* On phones the panel is a sheet along the bottom of the screen. */
.da-theme-integral .da-why-pop.is-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  max-height: 72vh;
  border-radius: 16px 16px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}

.da-theme-integral .da-why-pop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.da-theme-integral .da-why-pop-kicker {
  margin: 0 0 2px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.da-theme-integral .da-why-pop-title {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.da-theme-integral .da-why-pop-title:focus {
  outline: none;
}

.da-theme-integral .da-why-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: -8px -8px 0 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.da-theme-integral .da-why-close:hover,
.da-theme-integral .da-why-close:focus-visible {
  background: var(--surface2);
  color: var(--text-primary);
}

.da-theme-integral .da-why-pop-desc {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.da-theme-integral .da-why-pop-why {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.da-theme-integral .da-why-pop-text {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.6;
}

.da-theme-integral .da-why-pop-quote {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface2);
  font-size: 15px;
  line-height: 1.55;
}

.da-theme-integral .da-why-pop-quote q {
  font-style: italic;
  quotes: '\201C' '\201D';
}

/* ── The Synthesis in four groups ── */
.da-theme-integral .da-syn-group {
  margin: 0 0 28px;
}

/* A level above the cards' own headings (which are small, centred and in capitals). */
.da-theme-integral .da-markdown .da-syn-group > .da-syn-group-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 12px 0 14px;
  padding: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  color: var(--text-primary);
}

.da-theme-integral .da-markdown .da-syn-group > .da-syn-group-title::before,
.da-theme-integral .da-markdown .da-syn-group > .da-syn-group-title::after {
  content: none;
  display: none;
}

.da-theme-integral .da-syn-group + .da-syn-group {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.da-theme-integral .da-syn-group-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--surface);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 13px;
}

.da-theme-integral .da-syn-group > .da-speaker-card + .da-speaker-card {
  margin-top: 12px;
}

.da-theme-integral .da-syn-dup-heading {
  display: none;
}

/* ── Claim ledger (Integrity Check) ── */
.da-theme-integral .da-ledger {
  margin: 0 0 24px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.da-theme-integral .da-ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.da-theme-integral .da-ledger-table caption {
  padding: 16px 18px 8px;
  text-align: left;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
}

.da-theme-integral .da-ledger-table caption span {
  display: block;
  margin-top: 2px;
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

.da-theme-integral .da-ledger-table th {
  padding: 8px 12px;
  text-align: left;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.da-theme-integral .da-ledger-table td {
  padding: 12px;
  vertical-align: top;
  border-top: 1px solid var(--border-inner);
}

.da-theme-integral .da-ledger-table tr.is-a td:first-child { box-shadow: inset 3px 0 0 var(--a-accent); }
.da-theme-integral .da-ledger-table tr.is-b td:first-child { box-shadow: inset 3px 0 0 var(--b-accent); }

.da-theme-integral .da-ledger-when {
  width: 90px;
  white-space: nowrap;
}

.da-theme-integral .da-ledger-who {
  width: 80px;
  font-weight: 500;
}

.da-theme-integral .da-ledger-claim strong {
  display: block;
  font-weight: 600;
}

.da-theme-integral .da-ledger-claim q {
  display: block;
  margin-top: 3px;
  font-style: italic;
  color: var(--text-secondary);
  quotes: '\201C' '\201D';
}

.da-theme-integral .da-ledger-why {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-secondary);
}

.da-theme-integral .da-ledger-verdict {
  width: 120px;
}

.da-theme-integral .da-verdict {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  white-space: nowrap;
}

.da-theme-integral .da-verdict.is-severe { background: #f6e3df; color: #8e2a1f; }
.da-theme-integral .da-verdict.is-mild { background: #f3ead6; color: #6e4d0c; }
.da-integral-dark .da-verdict.is-severe { background: rgba(184, 71, 58, 0.25); color: #f2b8ae; }
.da-integral-dark .da-verdict.is-mild { background: rgba(226, 196, 143, 0.2); color: #ecd29c; }

/* On phones each claim is a small card. */
@media (max-width: 640px) {
  .da-theme-integral .da-ledger-table caption {
    display: block;
    width: auto;
  }

  .da-theme-integral .da-ledger-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .da-theme-integral .da-ledger-table,
  .da-theme-integral .da-ledger-table tbody,
  .da-theme-integral .da-ledger-table tr,
  .da-theme-integral .da-ledger-table td {
    display: block;
    width: auto;
  }

  .da-theme-integral .da-ledger-table tr {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 6px 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
  }

  .da-theme-integral .da-ledger-table td {
    padding: 0;
    border: 0;
  }

  .da-theme-integral .da-ledger-table tr.is-a,
  .da-theme-integral .da-ledger-table tr.is-b {
    box-shadow: inset 3px 0 0 var(--a-accent);
  }

  .da-theme-integral .da-ledger-table tr.is-b {
    box-shadow: inset 3px 0 0 var(--b-accent);
  }

  .da-theme-integral .da-ledger-table tr td:first-child {
    box-shadow: none !important;
  }

  .da-theme-integral .da-ledger-verdict {
    justify-self: end;
  }

  .da-theme-integral .da-ledger-claim {
    grid-column: 1 / -1;
  }
}
