/* ── CHAPTER ACCENT ── */
:root {
  --chapter-accent: var(--accent-terracotta);
  --chapter-accent-fill: var(--accent-terracotta-fill);
}

/* ── PAGE WATERMARKS ── */
header::before {
  content: "Severity";
}

.reminder-box::before {
  content: "Urgency";
}

/* ─────────────────────────────────────────
         MIDNIGHT CALL
      ───────────────────────────────────────── */
.midnight-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-12);
}
.midnight-head {
  background: var(--surface);
  color: var(--primary);
  padding: var(--space-5) var(--space-7);
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.2);
}
.midnight-head .tag-pill {
  display: inline-block;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--text-primary);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
}
.midnight-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  color: var(--primary);
}
.midnight-calls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
}
.call-col {
  padding: var(--space-7);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.call-col .cc-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--border);
  display: block;
  color: var(--primary);
}
.call-col .cc-label {
  color: var(--primary);
}

/* speech bubbles */
.bubble {
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-4);
  font-size: var(--fs-sm);
  line-height: 1.65;
  margin-bottom: var(--space-2);
  position: relative;
}
.bubble.doctor {
  background: var(--background);
  box-shadow: var(--bs-medium);
  margin-right: var(--space-6);
}
.bubble.response {
  color: var(--primary);
  margin-left: var(--space-6);
  font-style: italic;
}
.call-col:last-child .bubble.doctor {
  border-color: var(--text-primary);
}
.bubble .b-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  opacity: 0.6;
  display: block;
  margin-bottom: var(--space-1);
}

.call-outcome {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-align: center;
  letter-spacing: var(--ls-wider);
  box-shadow: var(--bs-medium);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  margin-top: auto;
}

.midnight-note {
  background: var(--background);

  padding: var(--space-4) var(--space-7);
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
  text-align: center;
}
.midnight-note strong {
  color: var(--primary);
}

/* ─────────────────────────────────────────
         CORE PRINCIPLE — FOUR PILLARS
      ───────────────────────────────────────── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-12);
}
.pillar-card {
  padding: var(--space-6) var(--space-5);
  border-left: 1px solid var(--border);

  color: var(--text-on-dark);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}
.pillar-card:hover {
  transform: translateY(-3px);
}
.pillar-card h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.2;
}
.pillar-card p {
  font-size: var(--fs-xs);
  color: var(--text-primary);
  line-height: 1.5;
}

/* ─────────────────────────────────────────
         DIAGNOSIS ≠ SEVERITY EXAMPLES
      ───────────────────────────────────────── */
.dx-examples {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-12);
}
.dx-example {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.dx-head {
  background: var(--surface);
  padding: var(--space-3) var(--space-6);

  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.dx-head .dx-tag {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  background: var(--ink-panel);
  color: var(--text-on-dark);
  padding: var(--space-half) var(--space-2);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.dx-head h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
}
.dx-spectrum {
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
/* Mild → moderate → severe → near-fatal reads as an escalating colour
   ramp (neutral → amber → red → solid red), the same semantic logic as
   the probability-line in Investigations: colour tracks urgency, not
   decoration. Near-fatal fills solid instead of tinting, so the one
   tier that must never be missed reads as visually different in kind,
   not just degree. */
.dx-mild {
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--muted);
  background: color-mix(in srgb, var(--muted) 8%, var(--paper));
}
.dx-moderate {
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--accent-terracotta);
  background: color-mix(in srgb, var(--accent-terracotta) 10%, var(--paper));
}
.dx-severe {
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--accent-crimson);
  background: color-mix(in srgb, var(--accent-crimson) 10%, var(--paper));
}
.dx-near-fatal {
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--accent-crimson);
  background: var(--accent-crimson);
}

.ds-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  font-weight: 500;
  display: block;
  margin-bottom: var(--space-2);
}
.dx-mild .ds-label {
  color: var(--muted);
}
.dx-moderate .ds-label {
  color: var(--accent-terracotta);
}
.dx-severe .ds-label {
  color: var(--accent-crimson);
}
.dx-near-fatal .ds-label {
  color: var(--text-on-dark);
}
.dx-mild p,
.dx-moderate p,
.dx-severe p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.5;
}
.dx-near-fatal p {
  font-size: var(--fs-sm);
  color: var(--text-on-dark);
  line-height: 1.5;
}
.dx-action {
  font-size: var(--fs-xs);
  color: var(--primary);
  margin-top: var(--space-1);
  font-style: italic;
}
.dx-near-fatal .dx-action {
  color: var(--text-on-dark-soft);
}

/* ─────────────────────────────────────────
         SEVERITY TOOLS — FORMAL SCORING
      ───────────────────────────────────────── */
.tools-block {
  background: var(--background);
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-7);
  margin-bottom: var(--space-12);
}
.tools-block .tb-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-2);
}
.tools-block h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  color: var(--primary);
  margin-bottom: var(--space-2);
}
.tools-block p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}
.tools-block p strong {
  color: var(--primary);
}
.tools-examples {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.tool-tag {
  background: var(--background);
  padding: var(--space-2) var(--space-4);
  border-left: 2px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--primary);
  display: flex;
  flex-direction: column;
  gap: var(--space-half);
}
.tool-tag .tt-name {
  font-weight: 500;
}
.tool-tag .tt-for {
  font-size: var(--fs-xs);
  color: var(--primary);
}

/* ─────────────────────────────────────────
         MANAGEMENT PRIORITY
      ───────────────────────────────────────── */
.priority-flow {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-12);
}
.pf-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--paper);
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  transition: box-shadow 0.2s;
}
.pf-item:hover {
  box-shadow: var(--bs-medium);
}
.pf-num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 300;
  flex-shrink: 0;
  background: var(--paper);
  box-shadow: var(--bs-medium);
}

.pf-question {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: 500;
}
.pf-answer {
  font-size: var(--fs-sm);
  color: var(--primary);
  text-align: right;
  letter-spacing: var(--ls-wider);
}
.pf-item:nth-child(1) .pf-answer {
  color: var(--primary);
  font-weight: 500;
}
.pf-item:nth-child(2) .pf-answer {
  color: var(--primary);
  font-weight: 500;
}

@media (max-width: 700px) {
  .midnight-calls {
    grid-template-columns: 1fr;
  }
  .pillars-grid {
    grid-template-columns: 1fr 1fr;
  }
  /* MOBILE SPACING TIGHTEN — trim this page's generous desktop-sized
     block gaps so a long page scrolls less on a phone. */
  .midnight-block,
  .pillars-grid,
  .dx-examples,
  .tools-block,
  .priority-flow {
    margin-bottom: var(--space-7);
  }
}
@media (max-width: 480px) {
  .pillars-grid {
    grid-template-columns: 1fr;
  }
}
