/*
 * Darja Rihla: The Continuity Project, CH-001
 * Local candidate only. Scope: .dr-ch001.
 * Requires page-specific enqueue after approval. No global selector is used.
 */

.dr-ch001 {
  --ch-ink: #07131c;
  --ch-ink-raised: #0b202d;
  --ch-paper: #f3f8f8;
  --ch-paper-soft: #c9d8dc;
  --ch-muted: #9bb1b8;
  --ch-line: rgba(186, 221, 227, 0.22);
  --ch-line-strong: rgba(102, 211, 233, 0.58);
  --ch-cyan: #75def1;
  --ch-blue: #76a9ff;
  --ch-warm: #e4b965;
  --ch-danger: #f0c380;
  --ch-content: 1160px;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: clip;
  color: var(--ch-paper);
  background:
    radial-gradient(circle at 84% 1%, rgba(79, 182, 229, 0.18), transparent 23rem),
    linear-gradient(155deg, #0a1a27 0%, var(--ch-ink) 48rem, #061017 100%);
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

.dr-ch001 *,
.dr-ch001 *::before,
.dr-ch001 *::after { box-sizing: border-box; }

.dr-ch001 :where(h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote) { margin-block-start: 0; }

.dr-ch001 :where(h1, h2, h3) {
  color: var(--ch-paper);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

.dr-ch001 a {
  color: var(--ch-cyan);
  text-decoration-color: rgba(117, 222, 241, 0.68);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.dr-ch001 a:hover { color: #fff; }

.dr-ch001 :focus-visible {
  outline: 3px solid var(--ch-warm);
  outline-offset: 4px;
}

.dr-ch001 code {
  overflow-wrap: anywhere;
  color: var(--ch-cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.dr-ch001__header {
  width: min(100% - 3rem, var(--ch-content));
  margin-inline: auto;
  padding: clamp(4.5rem, 10vw, 8.5rem) 0 clamp(3.5rem, 8vw, 6.5rem);
  border-bottom: 1px solid var(--ch-line);
}

.dr-ch001__eyebrow,
.dr-ch001__status,
.dr-ch001__section-no,
.dr-ch001__label {
  margin-bottom: 0.85rem;
  color: var(--ch-cyan);
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.dr-ch001__status {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  margin-bottom: 1.6rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid rgba(117, 222, 241, 0.48);
  border-radius: 999px;
  color: #dff9ff;
  letter-spacing: 0.11em;
}

.dr-ch001__header h1 {
  max-width: 14ch;
  margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
  font-size: clamp(3rem, 7.1vw, 6.85rem);
}

.dr-ch001__deck {
  max-width: 49rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.2rem);
  color: var(--ch-paper-soft);
  font-size: clamp(1.15rem, 2vw, 1.46rem);
  line-height: 1.55;
}

.dr-ch001__metadata {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 980px;
  margin: 0;
}

.dr-ch001__metadata div {
  min-width: 0;
  padding: 1rem 1.05rem 1.1rem;
  border-top: 2px solid var(--ch-line-strong);
  background: rgba(7, 19, 28, 0.38);
}

.dr-ch001__metadata dt,
.dr-ch001__systems-note dt {
  margin-bottom: 0.35rem;
  color: var(--ch-muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.dr-ch001__metadata dd,
.dr-ch001__systems-note dd { margin: 0; }

.dr-ch001__metadata dd { font-weight: 650; line-height: 1.35; }

.dr-ch001__assessment {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 7vw, 7rem);
  width: min(100% - 3rem, var(--ch-content));
  margin: clamp(2.5rem, 5vw, 5rem) auto;
  padding: clamp(1.7rem, 3.5vw, 3.2rem);
  border: 1px solid var(--ch-line-strong);
  background: linear-gradient(110deg, rgba(20, 75, 93, 0.52), rgba(7, 19, 28, 0.54));
}

.dr-ch001__assessment h2 {
  max-width: 18ch;
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

.dr-ch001__assessment ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ch-line);
  list-style: none;
}

.dr-ch001__assessment li {
  min-width: 0;
  padding: 0.9rem 0.25rem 0.9rem 0;
  border-bottom: 1px solid var(--ch-line);
}

.dr-ch001__assessment li:nth-child(odd) { padding-right: 1rem; }
.dr-ch001__assessment li:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--ch-line); }

.dr-ch001__assessment strong,
.dr-ch001__assessment span { display: block; }
.dr-ch001__assessment strong { font-size: 0.9rem; line-height: 1.3; }
.dr-ch001__assessment span { margin-top: 0.2rem; color: var(--ch-cyan); font-size: 0.78rem; font-weight: 700; }

.dr-ch001__body {
  width: min(100% - 3rem, 760px);
  margin-inline: auto;
  padding: clamp(1.2rem, 4vw, 3rem) 0 clamp(3rem, 8vw, 7rem);
}

.dr-ch001__body section { padding-block: clamp(2rem, 5vw, 4.5rem); }

.dr-ch001__body section + section { border-top: 1px solid var(--ch-line); }

.dr-ch001__body h2 {
  max-width: 19ch;
  margin-bottom: clamp(1.1rem, 2.4vw, 1.7rem);
  font-size: clamp(2rem, 4.4vw, 3.65rem);
}

.dr-ch001__body h3 {
  margin-bottom: 1rem;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
}

.dr-ch001__body p {
  max-width: 46rem;
  margin-bottom: 1.25rem;
  color: var(--ch-paper-soft);
  font-size: clamp(1.06rem, 1.65vw, 1.19rem);
}

.dr-ch001__body p:last-child { margin-bottom: 0; }

.dr-ch001 blockquote {
  margin: clamp(1.8rem, 4vw, 3rem) 0;
  padding: 1.35rem 0 1.35rem 1.3rem;
  border-left: 3px solid var(--ch-warm);
}

.dr-ch001 blockquote p {
  max-width: 37rem;
  margin: 0;
  color: #fff;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  font-weight: 600;
  line-height: 1.35;
}

.dr-ch001__systems-note {
  margin-top: clamp(1.8rem, 4vw, 3rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border-left: 2px solid var(--ch-blue);
  background: rgba(118, 169, 255, 0.08);
}

.dr-ch001__systems-note dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; margin: 0; }
.dr-ch001__systems-note dd { color: var(--ch-paper-soft); line-height: 1.5; }

.dr-ch001__graph {
  width: min(100vw - 3rem, 1000px);
  margin: clamp(1.8rem, 5vw, 3.5rem) 50% clamp(1rem, 3vw, 2rem);
  transform: translateX(-50%);
}

.dr-ch001__graph-flow {
  padding: clamp(1rem, 3vw, 2.2rem);
  border: 1px solid var(--ch-line);
  background:
    linear-gradient(rgba(117, 222, 241, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 222, 241, 0.06) 1px, transparent 1px),
    var(--ch-ink-raised);
  background-size: 24px 24px, 24px 24px, auto;
}

.dr-ch001__node {
  position: relative;
  width: min(100%, 25rem);
  margin-inline: auto;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(117, 222, 241, 0.7);
  background: #0b2633;
}

.dr-ch001__node span,
.dr-ch001__node small,
.dr-ch001__node strong { display: block; }
.dr-ch001__node span { color: var(--ch-cyan); font-size: 0.65rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.dr-ch001__node strong { margin: 0.2rem 0; color: #fff; font-size: 1.2rem; }
.dr-ch001__node small { color: var(--ch-paper-soft); font-size: 0.83rem; line-height: 1.35; }
.dr-ch001__node--archive { margin-top: 1.5rem; border-color: rgba(228, 185, 101, 0.72); background: rgba(83, 63, 30, 0.43); }
.dr-ch001__node--archive span { color: var(--ch-warm); }

.dr-ch001__branch-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 6vw, 7rem); width: min(100%, 47rem); margin: 0.8rem auto 0; }
.dr-ch001__branch-row--nodes { margin-top: 0; }

.dr-ch001__edge { min-width: 0; text-align: center; }
.dr-ch001__edge span { display: block; color: var(--ch-warm); font-size: 0.58rem; font-weight: 750; letter-spacing: 0.08em; line-height: 1.25; }
.dr-ch001__edge i { display: block; width: 1px; height: 2rem; margin: 0.35rem auto 0; background: repeating-linear-gradient(to bottom, var(--ch-warm) 0 4px, transparent 4px 8px); }

.dr-ch001__relation { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.7rem; align-items: center; width: min(100%, 39rem); margin: 1.15rem auto 0; }
.dr-ch001__relation::before,
.dr-ch001__relation i { height: 1px; border-top: 1px dashed var(--ch-warm); content: ""; }
.dr-ch001__relation span,
.dr-ch001__relation b { grid-column: 2; text-align: center; }
.dr-ch001__relation span { grid-row: 1; color: var(--ch-muted); font-size: 0.6rem; font-weight: 750; letter-spacing: 0.1em; }
.dr-ch001__relation b { grid-row: 2; color: var(--ch-warm); font-size: 0.72rem; letter-spacing: 0.07em; }
.dr-ch001__relation::before { grid-column: 1; grid-row: 1 / 3; }
.dr-ch001__relation i { grid-column: 3; grid-row: 1 / 3; }

.dr-ch001__graph figcaption { margin-top: 0.8rem; color: var(--ch-muted); font-size: 0.82rem; line-height: 1.45; }

.dr-ch001__archive {
  margin-top: 2rem;
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid rgba(228, 185, 101, 0.56);
  background: linear-gradient(120deg, rgba(78, 57, 22, 0.6), rgba(11, 32, 45, 0.72));
}
.dr-ch001__archive > p:not(.dr-ch001__label) { color: #fff; line-height: 1.55; }
.dr-ch001__archive span { color: var(--ch-paper-soft); }
.dr-ch001__archive-status { margin-bottom: 0; color: var(--ch-warm) !important; font-size: 0.85rem !important; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.dr-ch001__hypotheses { margin: 1.8rem 0; padding: 0; border-top: 1px solid var(--ch-line); list-style: none; }
.dr-ch001__hypotheses li { display: grid; grid-template-columns: 3.8rem minmax(0, 1fr) max-content; gap: 1rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--ch-line); }
.dr-ch001__hypotheses strong { color: var(--ch-cyan); font-size: 0.75rem; letter-spacing: 0.08em; }
.dr-ch001__hypotheses span { color: var(--ch-paper); line-height: 1.45; }
.dr-ch001__hypotheses em { color: var(--ch-warm); font-size: 0.78rem; font-style: normal; font-weight: 700; text-align: right; }

.dr-ch001__evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 2rem 0; border: 1px solid var(--ch-line); background: var(--ch-line); }
.dr-ch001__evidence-grid > div { min-width: 0; padding: 1.15rem; background: var(--ch-ink-raised); }
.dr-ch001__evidence-grid .dr-ch001__label { margin-bottom: 0.55rem; color: var(--ch-cyan); }
.dr-ch001__evidence-grid p:last-child { margin: 0; color: var(--ch-paper-soft); font-size: 0.97rem; line-height: 1.5; }

.dr-ch001__footer {
  width: min(100% - 3rem, var(--ch-content));
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0;
  border-top: 1px solid var(--ch-line);
}
.dr-ch001__footer > p:not(.dr-ch001__label) { max-width: 50rem; color: var(--ch-paper); font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.5; }
.dr-ch001__footer .dr-ch001__source-note { margin-top: 1.4rem; color: var(--ch-muted); font-size: 0.9rem; }

html[data-theme="light"] .dr-ch001,
body.is-light .dr-ch001 {
  --ch-ink: #f4f8f7;
  --ch-ink-raised: #e8f0f0;
  --ch-paper: #10232c;
  --ch-paper-soft: #354f58;
  --ch-muted: #55707a;
  --ch-line: rgba(21, 71, 86, 0.2);
  --ch-line-strong: rgba(0, 115, 143, 0.6);
  --ch-cyan: #006d87;
  --ch-blue: #285bad;
  --ch-warm: #8a5906;
  --ch-danger: #8a5906;
  background:
    radial-gradient(circle at 84% 1%, rgba(83, 187, 215, 0.2), transparent 23rem),
    linear-gradient(155deg, #fff 0%, var(--ch-ink) 48rem, #e8f0f0 100%);
}

html[data-theme="light"] .dr-ch001 .dr-ch001__metadata div,
body.is-light .dr-ch001 .dr-ch001__metadata div { background: rgba(255, 255, 255, 0.72); }
html[data-theme="light"] .dr-ch001 .dr-ch001__assessment,
body.is-light .dr-ch001 .dr-ch001__assessment { background: linear-gradient(110deg, rgba(187, 229, 237, 0.74), rgba(255, 255, 255, 0.8)); }
html[data-theme="light"] .dr-ch001 .dr-ch001__node,
body.is-light .dr-ch001 .dr-ch001__node { background: #fff; }
html[data-theme="light"] .dr-ch001 .dr-ch001__node strong,
html[data-theme="light"] .dr-ch001 blockquote p,
html[data-theme="light"] .dr-ch001__archive > p:not(.dr-ch001__label),
body.is-light .dr-ch001 .dr-ch001__node strong,
body.is-light .dr-ch001 blockquote p,
body.is-light .dr-ch001 .dr-ch001__archive > p:not(.dr-ch001__label) { color: var(--ch-paper); }
html[data-theme="light"] .dr-ch001 .dr-ch001__graph-flow,
body.is-light .dr-ch001 .dr-ch001__graph-flow { background-color: #dce9eb; }
html[data-theme="light"] .dr-ch001 .dr-ch001__archive,
body.is-light .dr-ch001 .dr-ch001__archive { background: linear-gradient(120deg, #fff5d9, #f8faf9); }

@media (max-width: 760px) {
  .dr-ch001__header,
  .dr-ch001__assessment,
  .dr-ch001__body,
  .dr-ch001__footer { width: min(100% - 2rem, var(--ch-content)); }
  .dr-ch001__metadata,
  .dr-ch001__assessment { grid-template-columns: 1fr; }
  .dr-ch001__assessment { gap: 1.5rem; }
  .dr-ch001__metadata { gap: 0.65rem; }
  .dr-ch001__assessment ul { grid-template-columns: 1fr; }
  .dr-ch001__assessment li:nth-child(odd),
  .dr-ch001__assessment li:nth-child(even) { padding-right: 0; padding-left: 0; border-left: 0; }
  .dr-ch001__systems-note dl { grid-template-columns: 1fr; gap: 1rem; }
  .dr-ch001__graph { width: min(100vw - 2rem, 1000px); }
  .dr-ch001__branch-row { gap: 0.65rem; }
  .dr-ch001__node { padding: 0.85rem; }
  .dr-ch001__node small { font-size: 0.76rem; }
  .dr-ch001__hypotheses li { grid-template-columns: 3.1rem minmax(0, 1fr); gap: 0.6rem; }
  .dr-ch001__hypotheses em { grid-column: 2; text-align: left; }
}

@media (max-width: 430px) {
  .dr-ch001__header { padding-top: 3.75rem; }
  .dr-ch001__header h1 { font-size: clamp(2.6rem, 13vw, 3.45rem); }
  .dr-ch001__body h2 { font-size: clamp(1.85rem, 9vw, 2.4rem); }
  .dr-ch001__graph-flow { padding: 0.8rem; background-size: 18px 18px, 18px 18px, auto; }
  .dr-ch001__branch-row { grid-template-columns: 1fr; }
  .dr-ch001__branch-row .dr-ch001__edge + .dr-ch001__edge { display: none; }
  .dr-ch001__branch-row--nodes { gap: 0.8rem; }
  .dr-ch001__relation { grid-template-columns: 1fr; margin: 1rem auto; }
  .dr-ch001__relation::before,
  .dr-ch001__relation i { display: none; }
  .dr-ch001__relation span,
  .dr-ch001__relation b { grid-column: 1; }
  .dr-ch001__relation span { grid-row: 1; }
  .dr-ch001__relation b { grid-row: 2; }
  .dr-ch001__node--archive { margin-top: 1rem; }
  .dr-ch001__evidence-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .dr-ch001 *, .dr-ch001 *::before, .dr-ch001 *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .dr-ch001 { color: #111; background: #fff; }
  .dr-ch001 :where(h1, h2, h3), .dr-ch001__body p, .dr-ch001__footer > p:not(.dr-ch001__label) { color: #111; }
  .dr-ch001__assessment, .dr-ch001__graph-flow, .dr-ch001__archive, .dr-ch001__systems-note { background: #fff; }
}

/* Pass 01 visual integration. Local scope only: no global theme selectors. */
.dr-ch001 {
  --ch-canvas: #071821;
  --ch-surface: #0b202b;
  --ch-elevated: #102b37;
  --ch-feature: #153846;
  --ch-text: #eef4f5;
  --ch-secondary: #bed0d5;
  --ch-steel: #91aab2;
  --ch-cyan: #5cc7e6;
  --ch-blue: #6fadeb;
  --ch-parchment: #ead8ad;
  --ch-sand: #c6a973;
  --ch-gold: #d5a84b;
  --ch-bronze: #a97942;
  --ch-teal: #398a89;
  --ch-petrol: #0b3540;
  --ch-rust: #9e654e;
  --ch-content: 1220px;
  --ch-canvas-width: 1440px;
  --ch-reading: 920px;
  --ch-ink: var(--ch-canvas);
  --ch-ink-raised: var(--ch-elevated);
  --ch-paper: var(--ch-text);
  --ch-paper-soft: var(--ch-secondary);
  --ch-muted: var(--ch-steel);
  --ch-line: rgba(190, 208, 213, 0.18);
  --ch-line-strong: rgba(92, 199, 230, 0.65);
  --ch-warm: var(--ch-gold);
  width: min(100%, var(--ch-canvas-width));
  margin-inline: auto;
  background: var(--ch-canvas);
  font-family: "Source Sans 3", system-ui, sans-serif;
}

/*
 * CH-001 integration bridge. The current single-post shell limits generic
 * content to its normal reading and wrapper widths. This asset is loaded only
 * for CH-001; these selectors release those limits only when this article is
 * actually present, without changing the shared single-post system.
 */
body.single .dr-single-content-wrap:has(.dr-ch001) {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}

body.single .dr-single-content-wrap:has(.dr-ch001) > .wp-block-post-content {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

body.single .dr-single-content-wrap:has(.dr-ch001) .wp-block-post-content > .dr-ch001,
body.single .dr-single-content-wrap:has(.dr-ch001) .wp-block-post-content > :has(.dr-ch001) {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.dr-ch001 :where(h1, h2, h3) { font-family: inherit; }
.dr-ch001__header,
.dr-ch001__assessment,
.dr-ch001__footer { width: min(100% - 3rem, var(--ch-content)); }

.dr-ch001__header {
  padding-top: clamp(4rem, 8vw, 7rem);
  background: linear-gradient(135deg, var(--ch-canvas), var(--ch-petrol));
}
.dr-ch001__header h1 {
  max-width: 1120px;
  font-size: clamp(2.75rem, 5.9vw, 5.7rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.dr-ch001__deck { max-width: 980px; color: var(--ch-secondary); }
.dr-ch001__metadata div { background: rgba(16, 43, 55, 0.78); }

.dr-ch001__assessment {
  max-width: var(--ch-content);
  background: linear-gradient(120deg, var(--ch-elevated), var(--ch-feature));
}
.dr-ch001__assessment span { color: var(--ch-cyan); }

.dr-ch001__body {
  width: 100%;
  max-width: var(--ch-canvas-width);
  padding: 0 0 clamp(3rem, 8vw, 7rem);
}
.dr-ch001__body section {
  padding-block: clamp(2.8rem, 6vw, 5.8rem);
  padding-inline: max(1.5rem, calc((100% - var(--ch-reading)) / 2));
  border-top: 1px solid var(--ch-line);
}
.dr-ch001__body h2,
.dr-ch001__body p { max-width: var(--ch-reading); }
.dr-ch001__body h2 { font-size: clamp(2rem, 3.8vw, 3.35rem); font-weight: 650; }
.dr-ch001__body p { font-size: clamp(1.1rem, 1.3vw, 1.2rem); line-height: 1.72; }

.dr-ch001__section--opening,
.dr-ch001__section--primary { background: var(--ch-surface); }
.dr-ch001__section--unknown { background: linear-gradient(120deg, #102c35, #16323b); }
.dr-ch001__section--graph { background: var(--ch-feature); }
.dr-ch001__section--archive { background: linear-gradient(120deg, #382f1e, #192c32); }
.dr-ch001__section--teal,
.dr-ch001__section--transmission { background: linear-gradient(120deg, #0e3138, #153f45); }
.dr-ch001__section--rival { background: #112934; }
.dr-ch001__section--material { background: linear-gradient(120deg, #283232, #19262d); }
.dr-ch001__section--assessment { background: #102b37; }
.dr-ch001__section--phase { background: #153846; }

.dr-ch001__visual,
.dr-ch001__graph {
  width: min(calc(100vw - 3rem), var(--ch-content));
  margin: clamp(2rem, 5vw, 3.75rem) 50% clamp(1rem, 3vw, 2rem);
  transform: translateX(-50%);
}
.dr-ch001__visual {
  overflow: hidden;
  border: 1px solid var(--ch-line-strong);
  background: var(--ch-elevated);
}
.dr-ch001__visual img {
  display: block;
  width: 100%;
  max-height: min(65vw, 620px);
  object-fit: cover;
}
.dr-ch001__visual figcaption,
.dr-ch001__graph figcaption {
  max-width: none;
  margin: 0;
  padding: 0.85rem 1rem 0.95rem;
  color: var(--ch-secondary);
  font-size: 0.88rem;
  line-height: 1.45;
  background: rgba(7, 24, 33, 0.82);
}
.dr-ch001__visual--unknown { border-color: var(--ch-sand); }
.dr-ch001__visual--graph { border-color: var(--ch-gold); }
.dr-ch001__visual--rival { border-color: var(--ch-blue); }
.dr-ch001__visual--material { border-color: var(--ch-bronze); }
.dr-ch001__visual--transmission { border-color: var(--ch-teal); }

.dr-ch001__graph { max-width: var(--ch-content); }
.dr-ch001__graph-flow { background-color: var(--ch-elevated); }
.dr-ch001__archive { border-color: rgba(213, 168, 75, 0.8); }
.dr-ch001__hypotheses em { color: var(--ch-gold); }
.dr-ch001__evidence-grid > div { background: var(--ch-surface); }

html[data-theme="light"] .dr-ch001,
body.theme-light .dr-ch001,
body.is-light .dr-ch001 {
  --ch-canvas: #edf4f4;
  --ch-surface: #ffffff;
  --ch-elevated: #e1edef;
  --ch-feature: #d5e7e8;
  --ch-text: #102b35;
  --ch-secondary: #294854;
  --ch-steel: #526d76;
  --ch-cyan: #006f8e;
  --ch-blue: #2166ae;
  --ch-parchment: #73510e;
  --ch-sand: #785e2a;
  --ch-gold: #805b0c;
  --ch-bronze: #734d29;
  --ch-teal: #116c6c;
  --ch-petrol: #d4e7e9;
  --ch-ink: var(--ch-canvas);
  --ch-ink-raised: var(--ch-elevated);
  --ch-paper: var(--ch-text);
  --ch-paper-soft: var(--ch-secondary);
  --ch-muted: var(--ch-steel);
  --ch-line: rgba(16, 43, 53, 0.18);
  --ch-line-strong: rgba(0, 111, 142, 0.62);
  --ch-warm: var(--ch-gold);
  color: var(--ch-text);
  background: var(--ch-canvas);
}
html[data-theme="light"] .dr-ch001__header,
body.theme-light .dr-ch001__header,
body.is-light .dr-ch001__header { background: linear-gradient(135deg, #f8fbfb, var(--ch-petrol)); }
html[data-theme="light"] .dr-ch001__metadata div,
body.theme-light .dr-ch001__metadata div,
body.is-light .dr-ch001__metadata div { background: rgba(255, 255, 255, 0.92); }
html[data-theme="light"] .dr-ch001__assessment,
body.theme-light .dr-ch001__assessment,
body.is-light .dr-ch001__assessment { background: linear-gradient(120deg, #e4f2f3, #d5e7e8); }
html[data-theme="light"] .dr-ch001 blockquote p,
body.theme-light .dr-ch001 blockquote p,
body.is-light .dr-ch001 blockquote p { color: var(--ch-text); }
html[data-theme="light"] .dr-ch001__archive,
body.theme-light .dr-ch001__archive,
body.is-light .dr-ch001__archive { background: linear-gradient(120deg, #fff7e2, #f8fbfb); }
html[data-theme="light"] .dr-ch001__archive > p:not(.dr-ch001__label),
body.theme-light .dr-ch001__archive > p:not(.dr-ch001__label),
body.is-light .dr-ch001__archive > p:not(.dr-ch001__label) { color: var(--ch-text); }
html[data-theme="light"] .dr-ch001__section--unknown,
body.theme-light .dr-ch001__section--unknown,
body.is-light .dr-ch001__section--unknown { background: #f3ecdc; }
html[data-theme="light"] .dr-ch001__section--graph,
body.theme-light .dr-ch001__section--graph,
body.is-light .dr-ch001__section--graph { background: #dcecef; }
html[data-theme="light"] .dr-ch001__section--archive,
body.theme-light .dr-ch001__section--archive,
body.is-light .dr-ch001__section--archive { background: #f5ead0; }
html[data-theme="light"] .dr-ch001__section--teal,
html[data-theme="light"] .dr-ch001__section--transmission,
body.theme-light .dr-ch001__section--teal,
body.theme-light .dr-ch001__section--transmission,
body.is-light .dr-ch001__section--teal,
body.is-light .dr-ch001__section--transmission { background: #e0efee; }
html[data-theme="light"] .dr-ch001__section--rival,
body.theme-light .dr-ch001__section--rival,
body.is-light .dr-ch001__section--rival { background: #e7eef1; }
html[data-theme="light"] .dr-ch001__section--material,
body.theme-light .dr-ch001__section--material,
body.is-light .dr-ch001__section--material { background: #f0ece2; }
html[data-theme="light"] .dr-ch001__section--assessment,
body.theme-light .dr-ch001__section--assessment,
body.is-light .dr-ch001__section--assessment { background: #e7f2f3; }
html[data-theme="light"] .dr-ch001__section--phase,
body.theme-light .dr-ch001__section--phase,
body.is-light .dr-ch001__section--phase { background: #d3e8e8; }
html[data-theme="light"] .dr-ch001__visual figcaption,
html[data-theme="light"] .dr-ch001__graph figcaption,
body.theme-light .dr-ch001__visual figcaption,
body.theme-light .dr-ch001__graph figcaption,
body.is-light .dr-ch001__visual figcaption,
body.is-light .dr-ch001__graph figcaption { background: #f8fbfb; color: var(--ch-secondary); }

@media (max-width: 768px) {
  .dr-ch001__header,
  .dr-ch001__assessment,
  .dr-ch001__footer { width: min(100% - 2rem, var(--ch-content)); }
  .dr-ch001__body section { padding-inline: 1rem; }
  .dr-ch001__visual,
  .dr-ch001__graph { width: calc(100vw - 2rem); }
  .dr-ch001__visual img { max-height: 56vw; }
}

@media (max-width: 390px) {
  .dr-ch001__header h1 { font-size: clamp(2.35rem, 12.5vw, 3.15rem); }
  .dr-ch001__body p { font-size: 1.08rem; line-height: 1.68; }
  .dr-ch001__visual img { max-height: 68vw; }
}
