/* ==========================================================================
   Master timeline (Stars and River) and line drawers: assets/da-moments.js.
   The timeline is a deliberately dark "instrument" band in both page themes;
   the drawers follow the page's Integral theme tokens.
   ========================================================================== */

.da-theme-integral .dmt {
  margin: 0 0 40px;
  padding: 26px 22px 20px;
  border-radius: 16px;
  background: #0b0b10;
  color: #ece6da;
  font-family: 'Lora', Georgia, serif;
}

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

.da-theme-integral .dmt-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px 24px;
  margin: 0 0 14px;
}

.da-theme-integral .dmt-kicker {
  margin: 0 0 6px;
  font: 500 11px 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236, 230, 218, 0.6);
}

.da-theme-integral .dmt-title {
  margin: 0 0 6px;
  font: 600 clamp(24px, 3vw, 32px) 'Fraunces', Georgia, serif;
  color: #ffffff;
}

.da-theme-integral .dmt-note {
  max-width: 50em;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(236, 230, 218, 0.72);
}

.da-theme-integral .dmt-switch,
.da-theme-integral .dmt-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.da-theme-integral .dmt-controls {
  margin: 0 0 14px;
}

.da-theme-integral .dmt-group-label {
  font: 500 10px 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 230, 218, 0.5);
}

.da-theme-integral .dmt-sep {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: rgba(236, 230, 218, 0.2);
}

.da-theme-integral .dmt-chip {
  position: relative;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(236, 230, 218, 0.22);
  border-radius: 999px;
  background: transparent;
  color: #ece6da;
  font: 500 12px 'DM Mono', ui-monospace, monospace;
  cursor: pointer;
}

.da-theme-integral .dmt-chip::after {
  content: '';
  position: absolute;
  inset: -4px;
}

.da-theme-integral .dmt-chip[aria-pressed="true"] {
  border-color: #ece6da;
  background: #ece6da;
  color: #0b0b10;
}

.da-theme-integral .dmt-chip:focus-visible,
.da-theme-integral .dmt-seg:focus-visible,
.da-theme-integral .dmt-star:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* The chart */
.da-theme-integral .dmt-chart {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 50%, #15151d 0%, #0b0b10 75%);
}

.da-theme-integral .dmt-band,
.da-theme-integral .dmt-axis,
.da-theme-integral .dmt-beam,
.da-theme-integral .dmt-halo,
.da-theme-integral .dmt-held,
.da-theme-integral .dmt-bank,
.da-theme-integral .dmt-playhead,
.da-theme-integral .dmt-band-label,
.da-theme-integral .dmt-beam-label,
.da-theme-integral .dmt-tick,
.da-theme-integral .dmt-who,
.da-theme-integral .dmt-svg {
  position: absolute;
  pointer-events: none;
}

.da-theme-integral .dmt-band { height: 1px; background: rgba(236, 230, 218, 0.06); }
.da-theme-integral .dmt-axis { height: 2px; background: rgba(236, 230, 218, 0.28); }
.da-theme-integral .dmt-band-label { left: 12px; font: 400 10px 'DM Mono', ui-monospace, monospace; white-space: nowrap; }
.da-theme-integral .dmt-who { left: 12px; font: 600 15px 'Fraunces', Georgia, serif; color: #ffffff; }
.da-theme-integral .dmt-who.is-a { top: 12px; }
.da-theme-integral .dmt-who.is-b { bottom: 10px; }
.da-theme-integral .dmt-tick { width: 44px; text-align: center; font: 400 10px 'DM Mono', ui-monospace, monospace; color: rgba(236, 230, 218, 0.55); }
.da-theme-integral .dmt-beam { top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.22) 30%, rgba(255, 255, 255, 0.22) 70%, rgba(255, 255, 255, 0) 100%); }
.da-theme-integral .dmt-beam-label { font: italic 400 12px 'Fraunces', Georgia, serif; color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.da-theme-integral .dmt-halo { width: 44px; height: 44px; border-radius: 50%; }
.da-theme-integral .dmt-held { width: 3px; height: 11px; border-radius: 2px; }
.da-theme-integral .dmt-bank { width: 4px; height: 12px; border-radius: 2px; }
.da-theme-integral .dmt-playhead { top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.55); }
.da-theme-integral .dmt-svg { left: 0; top: 0; }
.da-theme-integral .dmt-drift-glow { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.da-theme-integral .dmt-drift { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.da-theme-integral .dmt-star {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--c);
  cursor: pointer;
}

.da-theme-integral .dmt-star.is-reactive {
  border: 1.5px solid var(--c);
  background: transparent;
}

.da-theme-integral .dmt-star.is-selected {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
  z-index: 5 !important;
}

/* 44px touch target */
.da-theme-integral .dmt-star::after {
  content: '';
  position: absolute;
  inset: -9px;
}

/* Flagged claims (triangles) and polarity cues (diamonds), spotlit on the axis: a 44px button, the shape inside */
.da-theme-integral .dmt-mark {
  position: absolute;
  z-index: 4;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  --mc: #f2b632;
  --glow: rgba(242, 182, 50, 0.8);
}

.da-theme-integral .dmt-mark::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 16px;
  width: 12px;
  height: 12px;
  background: var(--mc);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.da-theme-integral .dmt-mark { filter: drop-shadow(0 0 4px var(--glow)); }
.da-theme-integral .dmt-mark.is-b::before { clip-path: polygon(0 0, 100% 0, 50% 100%); }
.da-theme-integral .dmt-mark.is-severe { --mc: #ff5a4e; --glow: rgba(255, 90, 78, 0.8); }
.da-theme-integral .dmt-mark.is-cue { --mc: #4cc38a; --glow: rgba(76, 195, 138, 0.8); }
.da-theme-integral .dmt-mark.is-cue::before { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.da-theme-integral .dmt-mark.is-selected { --mc: #ffffff; }
.da-theme-integral .dmt-mark:focus-visible { outline: 2px solid #ffffff; outline-offset: -8px; border-radius: 8px; }

/* Minimap and zoom */
.da-theme-integral .dmt-zoom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
}

.da-theme-integral .dmt-mini {
  position: relative;
  flex: 1 1 260px;
  height: 40px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(236, 230, 218, 0.05);
}

.da-theme-integral .dmt-mini span {
  position: absolute;
  border-radius: 1px;
  background: rgba(236, 230, 218, 0.45);
}

.da-theme-integral .dmt-mini .dmt-window {
  top: 0;
  bottom: 0;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.da-theme-integral .dmt-segs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.da-theme-integral .dmt-seg {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(236, 230, 218, 0.7);
  font: 500 11px 'DM Mono', ui-monospace, monospace;
  cursor: pointer;
}

.da-theme-integral .dmt-seg[aria-pressed="true"] {
  background: rgba(236, 230, 218, 0.14);
  color: #ffffff;
}

/* The selected passage */
.da-theme-integral .dmt-card {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 26px;
  min-height: 120px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(236, 230, 218, 0.06);
}

.da-theme-integral .dmt-card-empty {
  margin: 0;
  align-self: center;
  font-size: 15px;
  color: rgba(236, 230, 218, 0.7);
}

.da-theme-integral .dmt-card-side {
  display: flex;
  flex: 0 1 250px;
  flex-direction: column;
  gap: 8px;
}

.da-theme-integral .dmt-card-main {
  display: flex;
  flex: 1 1 320px;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.da-theme-integral .dmt-card-kicker {
  margin: 0;
  font: 500 11px 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(236, 230, 218, 0.6);
}

.da-theme-integral .dmt-card-lines,
.da-theme-integral .dmt-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.da-theme-integral .dmt-card-line {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  font: 500 11px 'DM Mono', ui-monospace, monospace;
  color: #0b0b10;
}

.da-theme-integral .dmt-card-line.is-empty {
  background: rgba(236, 230, 218, 0.08);
  color: rgba(236, 230, 218, 0.5);
}

.da-theme-integral .dmt-card-quote {
  margin: 0;
  font-size: 17px;
  font-style: italic;
  line-height: 1.5;
  color: #ffffff;
}

.da-theme-integral .dmt-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(236, 230, 218, 0.3);
  border-radius: 999px;
  font: 500 11px 'DM Mono', ui-monospace, monospace;
  color: #ece6da;
}

.da-theme-integral .dmt-pill.is-plus { color: #7fd1a0; }
.da-theme-integral .dmt-pill.is-minus { color: #ff8a80; }
.da-theme-integral .dmt-pill.is-irony { border-style: dashed; }

.da-theme-integral .dmt .dmt-play {
  align-self: flex-start;
  min-height: 44px;
  background: #ece6da;
  color: #0b0b10;
}

@media (max-width: 640px) {
  .da-theme-integral .dmt {
    padding: 18px 12px 14px;
    border-radius: 12px;
  }

  .da-theme-integral .dmt-note {
    font-size: 14px;
  }
}

/* ==========================================================================
   Line drawers in the Complexity Profile
   ========================================================================== */

.da-theme-integral .da-complexity-line-item {
  flex-wrap: wrap;
}

.da-theme-integral .dmd-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 4px 0 10px;
  border: 0;
  background: transparent;
  font: 500 11px 'DM Mono', ui-monospace, monospace;
  color: var(--text-secondary);
  cursor: pointer;
}

.da-theme-integral .dmd-toggle[aria-expanded="true"] {
  color: var(--text-primary);
}

.da-theme-integral .dmd-toggle:focus-visible,
.da-theme-integral .dmd-close:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

.da-theme-integral .dmd {
  grid-column: 1 / -1;
  margin: 4px 0 18px;
  padding: 20px 22px 22px;
  border-radius: 12px;
  background: var(--surface2);
  color: var(--text-primary);
}

.da-theme-integral .dmd-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
}

.da-theme-integral .dmd-kicker,
.da-theme-integral .dmd-label {
  margin: 0 0 4px;
  font: 500 10px 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.da-theme-integral .dmd-title {
  margin: 0;
  font: 600 20px 'Fraunces', Georgia, serif;
}

.da-theme-integral .dmd-close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: 500 20px 'DM Mono', monospace;
  color: var(--text-secondary);
  cursor: pointer;
}

.da-theme-integral .dmd-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 18px;
}

.da-theme-integral .dmd-name {
  margin: 0 0 2px;
  font: 600 17px 'Fraunces', Georgia, serif;
}

.da-theme-integral .dmd-name span {
  color: var(--text-secondary);
}

.da-theme-integral .dmd-sub {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.da-theme-integral .dmd-pile {
  position: relative;
  max-width: 100%;
  margin: 18px 0 12px;
}

.da-theme-integral .dmd-base,
.da-theme-integral .dmd-base-label,
.da-theme-integral .dmd-dot,
.da-theme-integral .dmd-mark {
  position: absolute;
}

.da-theme-integral .dmd-base { bottom: 20px; height: 3px; border-radius: 2px; }
.da-theme-integral .dmd-base-label { bottom: 0; font: 400 11px 'DM Mono', ui-monospace, monospace; }
.da-theme-integral .dmd-dot { width: 9px; height: 9px; border-radius: 50%; }
.da-theme-integral .dmd-mark { top: -18px; font: 500 11px 'DM Mono', ui-monospace, monospace; color: var(--tell-color, #b5621a); white-space: nowrap; }

.da-theme-integral .dmd-tensions {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.da-theme-integral .dmd-tensions li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 13px;
}

.da-theme-integral .dmd-tensions li > span:not(.dmd-pill):not(.dmd-n) {
  flex: 1;
  min-width: 0;
}

.da-theme-integral .dmd-n {
  font: 400 11px 'DM Mono', ui-monospace, monospace;
  color: var(--text-secondary);
}

.da-theme-integral .dmd-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 22px;
  border-radius: 4px;
  font: 500 11px 'DM Mono', ui-monospace, monospace;
}

.da-theme-integral .dmd-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.da-theme-integral .dmd-strip {
  position: relative;
  height: 140px;
  border-radius: 10px;
  background: var(--surface);
}

.da-theme-integral .dmd-strip-axis {
  position: absolute;
  left: 48px;
  right: 16px;
  top: 70px;
  height: 1px;
  background: var(--text-secondary);
  opacity: 0.4;
}

.da-theme-integral .dmd-strip-who {
  position: absolute;
  left: 10px;
  font: 600 12px 'Fraunces', Georgia, serif;
}

.da-theme-integral .dmd-strip-who.is-a { top: 10px; }
.da-theme-integral .dmd-strip-who.is-b { bottom: 8px; }

.da-theme-integral .dmd-strip-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--c);
}

.da-theme-integral .dmd-strip-dot.is-reactive {
  border: 1.5px solid var(--c);
  background: var(--surface);
}

@media (max-width: 640px) {
  .da-theme-integral .dmd {
    padding: 16px 12px 18px;
  }

  .da-theme-integral .dmd-people {
    grid-template-columns: 1fr;
  }

  .da-theme-integral .dmd-toggle-text {
    display: none;
  }
}

.da-theme-integral .dmt-river-key {
  position: absolute;
  left: 12px;
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateY(-50%);
  font: 400 10px 'DM Mono', ui-monospace, monospace;
  color: rgba(236, 230, 218, 0.75);
  pointer-events: none;
}

.da-theme-integral .dmt-river-key span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.da-theme-integral .dmt-river-key i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* A flagged claim or polarity cue inside the reading card */
.da-theme-integral .dmt-card-mark {
  margin-top: 4px;
  padding: 10px 12px;
  border-left: 3px solid #f2b632;
  border-radius: 0 8px 8px 0;
  background: rgba(236, 230, 218, 0.05);
}

.da-theme-integral .dmt-card-mark.is-severe { border-left-color: #ff5a4e; }
.da-theme-integral .dmt-card-mark.is-cue { border-left-color: #4cc38a; }

.da-theme-integral .dmt-card-mark p { margin: 0; }
.da-theme-integral .dmt-card-mark p + p { margin-top: 4px; }

.da-theme-integral .dmt-card-mark-kicker {
  font: 500 11px 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(236, 230, 218, 0.7);
}

.da-theme-integral .dmt-card-mark-heading { font: 600 15px 'Fraunces', Georgia, serif; color: #ffffff; }
.da-theme-integral .dmt-card-mark-text { font-size: 14px; line-height: 1.5; color: rgba(236, 230, 218, 0.85); }
.da-theme-integral .dmt-card-mark-quote { font-size: 14px; font-style: italic; line-height: 1.5; color: #ffffff; }


.da-theme-integral .dmt-card .da-inline-player { max-width: 560px; margin-top: 0; }
.da-theme-integral .dmt-card .da-inline-caption { color: rgba(236, 230, 218, 0.8); }

/* On phones the river key sits under the chart, in a row */
.da-theme-integral .dmt-river-key.is-row {
  position: static;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 8px 0 0;
  transform: none;
}

/* Moments that mattered: numbered pins on the time axis, each on its beam (44px targets) */
.da-theme-integral .dmt-pin {
  position: absolute;
  z-index: 6;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.da-theme-integral .dmt-pin span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: auto;
  border-radius: 50%;
  background: #ece6da;
  color: #0b0b10;
  font: 600 11px 'DM Mono', ui-monospace, monospace;
}

.da-theme-integral .dmt-pin:hover span,
.da-theme-integral .dmt-pin.is-selected span {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.da-theme-integral .dmt-pin:focus-visible { outline: 2px solid #ffffff; outline-offset: -6px; border-radius: 50%; }

/* A Moment that mattered, in full in the reading card */
.da-theme-integral .dmt-card-hl-title { margin: 0; font: 600 20px/1.25 'Fraunces', Georgia, serif; color: #ffffff; }
.da-theme-integral .dmt-card-hl-para { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(236, 230, 218, 0.9); }
.da-theme-integral .dmt-card-hl-quote { margin: 0; font-size: 15px; font-style: italic; line-height: 1.55; color: #ffffff; }
.da-theme-integral .dmt-card-hl-quote .dab-time { margin-right: 4px; font-style: normal; vertical-align: middle; }
.da-theme-integral .dmt-card-hl-who { font-style: normal; font-weight: 600; color: rgba(236, 230, 218, 0.75); }
.da-theme-integral .dmt-card-hl-broader { margin: 4px 0 0; padding-top: 10px; border-top: 1px solid rgba(236, 230, 218, 0.15); font-size: 14px; line-height: 1.55; color: rgba(236, 230, 218, 0.8); }

/* Complexity Profile rows: the share bar (how the speaker's moments on a line split by stage) */
/* A row with a share bar stays a wrapping row, even where narrow screens stack the other rows. */
.da-theme-integral .da-complexity-line-item.dmt-has-share {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 12px;
  row-gap: 4px;
}
.da-theme-integral .dmt-has-share .da-complexity-line-label { flex: 0 0 88px; }
.da-theme-integral .dmt-share {
  display: flex;
  flex: 1 1 120px;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.da-theme-integral .dmt-share-caption { font-size: 14px; line-height: 1.3; }
.da-theme-integral .dmt-share-bar {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--border-inner, rgba(0, 0, 0, 0.08));
}
.da-theme-integral .dmt-share-bar span { display: block; height: 100%; }
.da-theme-integral .dmt-peak { display: inline-flex; align-items: center; gap: 6px; }
.da-theme-integral .dmt-peak .da-stage-label { display: none; }
.da-theme-integral .dmt-peak-label {
  font: 500 10px 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim, #8a8378);
  white-space: nowrap;
}

/* Arguments as constellations, and the argument in the reading card */
.da-theme-integral .dmt-constellation { fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; stroke-linejoin: round; }
.da-theme-integral .dmt-constellation.is-lit { stroke: rgba(255, 255, 255, 0.85); stroke-width: 1.6; }
.da-theme-integral .dmt-card-arg { margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(236, 230, 218, 0.15); }
.da-theme-integral .dmt-card-arg p { margin: 0; }
.da-theme-integral .dmt-card-arg-name { font: 600 15px 'Fraunces', Georgia, serif; color: #ffffff; }
.da-theme-integral .dmt-card-arg-name span { display: block; font: 500 11px 'DM Mono', ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(236, 230, 218, 0.6); }
.da-theme-integral .dmt-card-arg-steps { margin-top: 4px !important; font: 400 12px 'DM Mono', ui-monospace, monospace; line-height: 1.7; color: rgba(236, 230, 218, 0.75); }
.da-theme-integral .dmt-card-arg-steps strong { color: #ffffff; font-weight: 500; }
