/*
 * CH-001 Evidence Note 001
 * Candidate-only, post-specific styling for WordPress post ID 3004.
 * Version 2 corrects the reading measure and running-text font cascade.
 *
 * This file is not deployed and is not enqueued. It retains the existing
 * single-post template, shared TOC runtime, theme toggle and navigation.
 */

/* The post ID is verified in the public live body class: postid-3004. */
body.postid-3004 .dr-single-masthead {
  margin-bottom: clamp(1.5rem, 3vw, 2.75rem);
}

body.postid-3004 .dr-single-content-wrap > .wp-block-post-content > .dr-evidence-note {
  --ch001-ink: #14222e;
  --ch001-muted: #566671;
  --ch001-surface: #ffffff;
  --ch001-surface-soft: #f8f5ed;
  --ch001-line: rgba(125, 88, 20, 0.2);
  --ch001-accent: #8a651b;
  --ch001-accent-soft: rgba(214, 168, 74, 0.14);
  --ch001-focus: #1f6f88;
  --ch001-body-font: var(--dr-font-body, var(--dr-font-ui, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif));

  box-sizing: border-box;
  inline-size: min(calc(100% - 2rem), 48rem);
  max-inline-size: 48rem;
  margin-inline: auto;
  padding-block: clamp(0.5rem, 1.5vw, 1.25rem) clamp(2.5rem, 6vw, 5rem);
  color: var(--ch001-ink);
}

body.postid-3004 .dr-evidence-note > .dr-eyebrow {
  margin: 0 0 0.8rem;
  color: var(--ch001-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.68rem, 1.5vw, 0.76rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-transform: uppercase;
}

body.postid-3004 .dr-evidence-note > .dr-intro {
  max-width: 40rem;
  margin: 0 0 1.4rem;
  color: var(--ch001-muted);
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  line-height: 1.65;
}

body.postid-3004 .dr-evidence-note > .wp-block-quote {
  margin: clamp(1.75rem, 4vw, 2.75rem) 0;
  padding: clamp(1.15rem, 2.5vw, 1.7rem);
  border: 1px solid var(--ch001-line);
  border-inline-start: 3px solid var(--ch001-accent);
  border-radius: 0 var(--dr-radius, 16px) var(--dr-radius, 16px) 0;
  background: linear-gradient(135deg, var(--ch001-accent-soft), transparent 72%);
  box-shadow: none;
}

body.postid-3004 .dr-evidence-note > .wp-block-quote p {
  max-width: 39rem;
  margin: 0;
  color: var(--ch001-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2.3vw, 1.42rem);
  font-style: normal;
  line-height: 1.55;
}

body.postid-3004 .dr-evidence-note .dr-section {
  border-inline-start-color: var(--ch001-line);
}

body.postid-3004 .dr-evidence-note .dr-section::before {
  background: linear-gradient(180deg, var(--ch001-accent), transparent);
}

body.postid-3004 .dr-evidence-note .dr-section.is-active {
  background: linear-gradient(90deg, var(--ch001-accent-soft), transparent 42%);
}

body.postid-3004 .dr-evidence-note .dr-section > h2 {
  margin: 0;
  color: var(--ch001-ink);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.18;
  scroll-margin-top: 8rem;
}

body.postid-3004 .dr-evidence-note :is(p, li) {
  color: var(--ch001-ink);
}

/*
 * The globally loaded legacy typography sheet assigns Playfair Display to
 * generic paragraphs and lists. Restrict the established Darja Rihla body
 * family to ordinary evidence prose and lists without changing headings,
 * the eyebrow, opening quote, introduction or source-note scale.
 */
body.postid-3004 .dr-evidence-note > .wp-block-paragraph:not(.dr-eyebrow, .dr-intro),
body.postid-3004 .dr-evidence-note .dr-section:not(:has(> #ch001-notes-sources)) > p,
body.postid-3004 .dr-evidence-note .dr-section:not(:has(> #ch001-notes-sources)) > :is(ul, ol),
body.postid-3004 .dr-evidence-note .dr-section:not(:has(> #ch001-notes-sources)) > :is(ul, ol) > li {
  font-family: var(--ch001-body-font);
  font-size: clamp(1.03rem, 1.2vw, 1.125rem);
  font-weight: 400;
  line-height: 1.75;
}

body.postid-3004 .dr-evidence-note a {
  color: var(--ch001-accent);
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

body.postid-3004 .dr-evidence-note a:hover {
  color: var(--ch001-focus);
  text-decoration-thickness: 2px;
}

body.postid-3004 .dr-evidence-note a:focus-visible {
  outline: 2px solid var(--ch001-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

body.postid-3004 .dr-evidence-note sup a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  min-height: 1.25rem;
  padding-inline: 0.15rem;
  border: 1px solid var(--ch001-line);
  border-radius: 999px;
  background: var(--ch001-surface-soft);
  color: var(--ch001-accent);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

body.postid-3004 .dr-evidence-note .dr-section:has(> #ch001-five-hypotheses) .wp-block-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.postid-3004 .dr-evidence-note .dr-section:has(> #ch001-five-hypotheses) .wp-block-list li {
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--ch001-line);
  border-radius: var(--dr-radius-sm, 10px);
  background: linear-gradient(135deg, var(--ch001-accent-soft), transparent 78%);
}

body.postid-3004 .dr-evidence-note .dr-section:has(> #ch001-notes-sources) .wp-block-list {
  margin: 0;
  padding-inline-start: 1.35rem;
  font-family: var(--ch001-body-font);
}

body.postid-3004 .dr-evidence-note .dr-section:has(> #ch001-notes-sources) .wp-block-list li {
  margin-bottom: 0.9rem;
  color: var(--ch001-muted);
  font-family: var(--ch001-body-font);
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.65;
}

html[data-theme="dark"] body.postid-3004 .dr-evidence-note,
body.theme-dark.postid-3004 .dr-evidence-note {
  --ch001-ink: #eaf1f5;
  --ch001-muted: #b4c2ca;
  --ch001-surface: #16202b;
  --ch001-surface-soft: #1d2a35;
  --ch001-line: rgba(239, 208, 131, 0.28);
  --ch001-accent: #efd083;
  --ch001-accent-soft: rgba(239, 208, 131, 0.12);
  --ch001-focus: #8de1f2;
}

@media (max-width: 600px) {
  body.postid-3004 .dr-single-content-wrap > .wp-block-post-content > .dr-evidence-note {
    inline-size: 100%;
  }

  body.postid-3004 .dr-evidence-note .dr-section {
    padding-inline-start: 0.9rem;
  }

  body.postid-3004 .dr-evidence-note sup a {
    min-width: 1.5rem;
    min-height: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.postid-3004 .dr-evidence-note *,
  body.postid-3004 .dr-evidence-note *::before,
  body.postid-3004 .dr-evidence-note *::after {
    scroll-behavior: auto;
  }
}

/*
 * CH-001 | PASS 10 | Dark-mode contrast correction
 * Post 3004 only.
 * Light mode is intentionally unchanged.
 * No layout, typography or TOC changes.
 */

:is(html[data-theme="dark"], html.theme-dark)
body.postid-3004 .dr-evidence-note,
body.postid-3004:is([data-theme="dark"], .theme-dark)
.dr-evidence-note {
  --ch001-ink: #f5f7fa;
  --ch001-muted: #e1e5eb;
  color: #f5f7fa;
}

:is(html[data-theme="dark"], html.theme-dark)
body.postid-3004 .dr-evidence-note
:is(p:not(.dr-eyebrow), li, h2, h3, h4, blockquote, strong, em),
body.postid-3004:is([data-theme="dark"], .theme-dark)
.dr-evidence-note
:is(p:not(.dr-eyebrow), li, h2, h3, h4, blockquote, strong, em) {
  color: #f5f7fa;
}

:is(html[data-theme="dark"], html.theme-dark)
body.postid-3004 .dr-evidence-note > .dr-intro,
body.postid-3004:is([data-theme="dark"], .theme-dark)
.dr-evidence-note > .dr-intro {
  color: #e1e5eb;
}

:is(html[data-theme="dark"], html.theme-dark)
body.postid-3004 .dr-evidence-note a,
body.postid-3004:is([data-theme="dark"], .theme-dark)
.dr-evidence-note a {
  color: #f0c778;
}

