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

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

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

/* ─────────────────────────────────────────
         WHY RULES EXIST — DUAL COLUMN
      ───────────────────────────────────────── */
.why-rules-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-12);
}
.wrb-head {
  background: var(--surface);
  padding: var(--space-5) var(--space-7);
}
.wrb-head .wrh-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-1);
}
.wrb-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
}
.why-rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
}
.wr-col {
  padding: var(--space-6) var(--space-7);
}
.wr-col .wrc-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--border);
  display: block;
}
.wr-col:first-child .wrc-label {
  color: var(--primary);
}
.wr-col:last-child .wrc-label {
  color: var(--primary);
}
.wr-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.wr-item {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.5;
  padding: var(--space-1) 0;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.wr-col:first-child .wr-item::before {
  font-family: bootstrap-icons;
  content: "\F270";
  color: var(--primary);
  flex-shrink: 0;
  font-size: var(--fs-xs);
}
.wr-col:last-child .wr-item::before {
  font-family: bootstrap-icons;
  content: "\F33A";
  color: var(--primary);
  flex-shrink: 0;
  font-size: var(--fs-xs);
}

/* ─────────────────────────────────────────
         HIGH-YIELD RULES
      ───────────────────────────────────────── */
.rules-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-12);
}
.rule-card {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper);
  transition: box-shadow 0.2s;
}
.rule-card:hover {
  box-shadow: var(--bs-heavy);
}
.rule-card-head {
  background: var(--surface);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.rch-num {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  min-width: 1.5rem;
}
.rch-text h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-base);
  color: var(--accent-navy);
  margin: 0;
}

.rch-text .rch-subtitle {
  font-size: var(--fs-xs);
  color: var(--primary);
  letter-spacing: var(--ls-wider);
  margin-top: var(--space-half);
}
.rule-card-body {
  padding: var(--space-6) var(--space-6);
  display: none;
}
.rule-card.active .rule-card-body {
  display: block;
}
.rcb-section {
  margin-bottom: var(--space-4);
}
.rcb-section:last-child {
  margin-bottom: 0;
}
.rcb-section-head {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: var(--space-2);
  display: block;
}

.rcb-section-head::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 12px;
  border-left: 1px solid var(--accent-navy);
  background: var(--ink-panel);
  margin-right: var(--space-2);
  vertical-align: middle;
}

.rcb-section p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.7;
  margin: 0 0 var(--space-2) 0;
}
.rcb-section p strong {
  color: var(--primary);
}
.rcb-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.rcb-section li {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-1) 0;
}
.rcb-section li::before {
  content: "·";
  color: var(--primary);
  flex-shrink: 0;
}
.rcb-insight {
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-4) var(--space-4);
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.6;
  margin-top: var(--space-3);
  font-style: italic;
}
.rcb-insight strong {
  color: var(--primary);
  font-style: normal;
}

/* ─────────────────────────────────────────
   THINKING TOOL
───────────────────────────────────────── */
.thinking-tool-block {
  background: var(--ink-panel);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-8);
  margin-bottom: var(--space-12);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
  box-shadow: var(--bs-medium);
}
.thinking-tool-block::before {
  content: "?";
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: var(--fs-huge);
  font-weight: 600;
  color: rgba(var(--gold-rgb), 0.05);
  pointer-events: none;
  line-height: 1;
}
html[data-theme="dark"] .thinking-tool-block::before {
  color: rgba(var(--gold-rgb), 0.045);
}
.ttb-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--text-on-dark);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}
.thinking-tool-block h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  margin-bottom: var(--space-3);
  line-height: 1.3;
  color: var(--text-on-dark);
}
.ttb-questions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
.ttb-q {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(var(--gold-rgb), 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-2);
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}
.ttb-q-num {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  color: var(--text-on-dark);
  flex-shrink: 0;
  line-height: 1;
}
.ttb-q-text {
  font-size: var(--fs-sm);
  color: var(--text-on-dark-muted);
  line-height: 1.2;
}
.ttb-q-text strong {
  display: inline-block;
  color: var(--text-on-dark) !important;
}
.ttb-note {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-on-dark-muted);
  line-height: 1.5;
}
.ttb-note strong {
  color: var(--text-on-dark) !important;
  font-weight: 400;
}
/* ─────────────────────────────────────────
         PAEDIATRIC EMPHASIS BLOCK
      ───────────────────────────────────────── */
.paeds-emphasis {
  background: var(--background-body);
  border-left: 4px solid var(--text-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-6) var(--space-8);
  margin-bottom: var(--space-12);
}
.paeds-emphasis .pe-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-huge);
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.paeds-emphasis h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-md);
  color: var(--primary);
  margin-bottom: var(--space-3);
}
.paeds-emphasis p {
  font-size: var(--fs-sm);
  color: var(--primary);
  line-height: 1.7;
  margin-bottom: var(--space-2);
}
.paeds-emphasis p strong {
  color: var(--primary);
}
.paeds-emphasis ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.paeds-emphasis li {
  font-size: var(--fs-sm);
  color: var(--primary);
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
}
.paeds-emphasis li::before {
  font-family: bootstrap-icons;
  content: "\F2EA";
  color: var(--text-primary);
  flex-shrink: 0;
  font-size: var(--fs-sm);
}

/* ─────────────────────────────────────────
   TRANSITION BLOCK
───────────────────────────────────────── */
.transition-block {
  box-shadow: var(--bs-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-12);
  background: var(--ink-panel);
}
.tb-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  padding: var(--space-7);
}
.tbf-stage {
  text-align: center;
}
.tbf-stage-num {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 300;
  color: var(--text-on-dark);
  margin-bottom: var(--space-1);
}
.tbf-stage p {
  font-size: var(--fs-sm);
  color: var(--text-on-dark) !important;
  line-height: 1.6;
}

.tbf-stage p strong {
  font-size: var(--fs-sm);
  color: var(--text-on-dark) !important;
  line-height: 1.6;
}
.tbf-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-2);
}
.tbf-arrow span {
  font-size: var(--fs-lg);
  color: var(--text-on-dark);
}

@media (max-width: 700px) {
  .why-rules-grid {
    grid-template-columns: 1fr;
  }
  .tb-flow {
    grid-template-columns: 1fr;
  }
  .tbf-arrow {
    display: none;
  }
  /* MOBILE SPACING TIGHTEN — trim this page's generous desktop-sized
     block gaps so a long page scrolls less on a phone. */
  .why-rules-block,
  .rules-container,
  .thinking-tool-block,
  .paeds-emphasis,
  .transition-block {
    margin-bottom: var(--space-7);
  }
}
