/*
 * marcela-learning-page.css
 * Components for HTML Learning Pages.
 * Used inside seg-panels: Learn, Visual, Recall, Apply, Reference, Source.
 */

/* =============================================
   SHARED SEGMENT PADDING
   ============================================= */
.lp-body {
  padding: 22px 28px 28px;
  max-width: 860px;
}

/* =============================================
   LEARN SEGMENT — Orientation, Key Concepts,
   What to Remember, Common Confusions
   ============================================= */

/* Orientation */
.lp-orientation {
  margin-bottom: 22px;
}

.lp-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .095em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 5px;
}

.lp-page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.08;
}

.lp-page-subtitle {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 680px;
}

/* Why This Matters */
.lp-why {
  background: var(--focus-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 13px 18px;
  margin-bottom: 24px;
}

.lp-why .why-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 5px;
}

.lp-why p {
  font-size: 13px;
  line-height: 1.54;
  color: var(--ink);
}

/* Section sub-heading */
.lp-section-head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 11px;
  margin-top: 24px;
}

/* Key Concepts grid */
.concept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 6px;
}

.concept-card {
  background: var(--paper);
  border: 1.2px solid var(--rule);
  border-radius: 6px;
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
}

.concept-card.accent {
  border-color: var(--accent);
  background: var(--focus-bg);
}

.concept-card h4 {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 5px;
  line-height: 1.28;
}

.concept-card.accent h4 { color: var(--accent-deep); }

.concept-card p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* What to Remember list */
.remember-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
}

.remember-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  background: var(--paper);
  border: 1.2px solid var(--rule);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.remember-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remember-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}

.remember-text strong { color: var(--accent-deep); }

/* Common Confusions */
.confusion-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 6px;
}

.confusion-card {
  background: var(--paper);
  border: 1.2px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cc-wrong {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-light);
}

.cc-correct {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 15px;
  background: var(--status-clear-bg);
  border-left: 3px solid var(--status-clear);
}

.cc-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}

.cc-wrong .cc-icon  {
  background: transparent;
  border: 1px solid var(--status-blocked);
  color: var(--status-blocked);
}

.cc-correct .cc-icon {
  background: var(--status-clear);
  color: var(--bg);
}

.cc-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 3px;
}

.cc-wrong .cc-label   { color: var(--status-blocked); }
.cc-correct .cc-label { color: var(--status-clear); }

.cc-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.cc-wrong .cc-text {
  color: var(--ink-soft);
  font-style: italic;
}

.cc-correct .cc-text {
  color: var(--ink);
  font-weight: 500;
}

/* Older confusion cards use .cc-text for the trap and .cc-fix for the repair. */
.confusion-card > .cc-text:first-child {
  padding: 10px 16px;
  color: var(--ink-soft);
  font-style: italic;
  border-bottom: 1px solid var(--rule-light);
}

.cc-fix {
  padding: 14px 16px 15px;
  background: var(--status-clear-bg);
  border-left: 3px solid var(--status-clear);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.48;
  font-weight: 500;
}

.cc-fix strong {
  color: var(--status-clear);
}

/* =============================================
   VISUAL SEGMENT — Diagram scaling container
   ============================================= */
.visual-system {
  display: grid;
  gap: 18px;
}

/*
 * Visual segment primitives
 * Use these for Visual tabs instead of page-local
 * inline palettes. They inherit entirely from the
 * Marcela token system so light, dark, and print modes
 * share the same component contract.
 */
.m-flow {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--paper);
  border: 1.2px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.m-flow-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  position: relative;
}

.m-flow-step + .m-flow-step {
  padding-top: 14px;
}

.m-flow-step + .m-flow-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  width: 2px;
  height: 10px;
  background: var(--accent-light);
  border-radius: 999px;
}

.m-flow-card {
  border: 1.2px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 11px 13px;
  background: var(--focus-bg);
}

.m-flow-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 6px;
}

.m-flow-list {
  margin: 0;
  padding-left: 16px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.m-keynum {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border: 1.5px solid var(--accent);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow-sm);
}

.m-flow-step[data-status="complete"] .m-keynum,
.m-node[data-status="complete"] .m-keynum,
.m-relationship[data-status="complete"] .m-keynum {
  background: var(--status-clear);
  border-color: var(--status-clear);
}

.m-flow-step[data-status="active"] .m-keynum,
.m-node[data-status="active"] .m-keynum,
.m-relationship[data-status="active"] .m-keynum,
.m-flow-step[data-status="caution"] .m-keynum,
.m-node[data-status="caution"] .m-keynum,
.m-relationship[data-status="caution"] .m-keynum {
  background: var(--status-caution);
  border-color: var(--status-caution);
}

.m-flow-step[data-status="blocked"] .m-keynum,
.m-node[data-status="blocked"] .m-keynum,
.m-relationship[data-status="blocked"] .m-keynum {
  background: var(--status-blocked);
  border-color: var(--status-blocked);
}

.m-flow-step[data-status="inactive"] .m-keynum,
.m-node[data-status="inactive"] .m-keynum,
.m-relationship[data-status="inactive"] .m-keynum {
  background: var(--rule);
  border-color: var(--rule);
}

.m-node-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.m-node,
.m-relationship {
  background: var(--paper);
  border: 1.2px solid var(--rule);
  border-radius: 8px;
  padding: 15px;
  box-shadow: var(--shadow-sm);
}

.m-node {
  display: grid;
  gap: 8px;
}

.m-node .m-section-label {
  margin-bottom: 0;
}

.m-node p,
.m-relationship p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.m-relationship {
  border-left: 3px solid var(--accent);
  background: var(--focus-bg);
}

.m-relationship[data-status="complete"] { border-left-color: var(--status-clear); }
.m-relationship[data-status="active"],
.m-relationship[data-status="caution"]  { border-left-color: var(--status-caution); }
.m-relationship[data-status="blocked"]  { border-left-color: var(--status-blocked); }
.m-relationship[data-status="inactive"] { border-left-color: var(--rule); }

.dgm-scale-outer {
  overflow: hidden;
  flex-shrink: 0;
}

.dgm-scale-inner {
  transform-origin: top left;
}

/*
 * Legacy visual containment
 * Keeps fixed-coordinate imported diagrams readable on tablet widths
 * by panning the canvas instead of shrinking dense text.
 */
.legacy-visual-pan {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.legacy-visual-canvas {
  width: max-content;
  min-width: 100%;
  display: flex;
  justify-content: center;
}

.legacy-visual-canvas > * {
  flex: 0 0 auto;
}

.legacy-visual-scale-frame {
  width: var(--legacy-visual-scaled-width, var(--legacy-visual-width, 1056px));
  height: var(--legacy-visual-scaled-height, var(--legacy-visual-height, 816px));
  flex: 0 0 auto;
  position: relative;
}

.legacy-visual-scale-frame > * {
  transform: scale(var(--legacy-visual-scale, 1));
  transform-origin: top left;
}

/* Diagram internals (adapted from T1-01 design language) */
.dgm-page {
  position: relative;
  background: var(--paper);
  padding: 30px 34px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.dgm-hdr {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 11px;
  border-bottom: 1.5px solid var(--ink);
}

.dgm-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 5px;
}

.dgm-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.06;
  color: var(--ink);
}

.dgm-title .sub {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 3px;
}

.dgm-question {
  flex: 0 0 322px;
  text-align: right;
  font-size: 12px;
  font-style: italic;
  line-height: 1.32;
  color: var(--ink);
}

.dgm-question b { font-style: normal; font-weight: 600; }

.dgm-chart-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dgm-chart {
  position: relative;
  width: 988px;
  height: 626px;
}

.dgm-chart svg.wires {
  position: absolute;
  inset: 0;
  width: 988px;
  height: 626px;
  overflow: visible;
  pointer-events: none;
}

/* Nodes */
.node {
  position: absolute;
  background: var(--paper);
  border: 1.4px solid var(--rule);
  border-radius: 3px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7px 12px;
}

.node .nt { font-weight: 600; font-size: 13px; line-height: 1.12; letter-spacing: -.005em; color: var(--ink); white-space: nowrap; }
.node .nd { font-size: 10.5px; line-height: 1.28; color: var(--ink-soft); margin-top: 4px; max-width: 100%; }

.node.apex { border: 2.4px solid var(--ink); background: var(--ink); box-shadow: 0 3px 8px rgba(20,24,32,.22); }
.node.apex .nt { color: #fff; font-size: 15.5px; font-weight: 700; letter-spacing: .005em; }

.node.tier2 { border: 1.8px solid var(--ink); }
.node.tier2 .nt { font-size: 13.5px; }

.node.advisor { border: 1.5px dashed var(--ink-soft); background: var(--peer-bg); }
.node.advisor .nt { font-size: 12.5px; }

.role-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1px 5px;
  margin-bottom: 5px;
}

.node.peer { border: 1.3px solid var(--rule); background: var(--peer-bg); }
.node.peer .nt { font-size: 12.5px; font-weight: 600; }
.node.peer .peerlbl { display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin-top: 3px; font-weight: 600; }

.node.focus { border: 2px solid var(--accent); background: var(--focus-bg); box-shadow: 0 2px 6px rgba(63,93,134,.14); }
.node.focus.afms { background: var(--focus-bg-strong); }
.node.focus .nt { color: var(--accent-deep); }

.node.wing { border: 1.6px dashed var(--ink); background: #f4f5f7; }

.ribbon {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: repeating-linear-gradient(135deg,#f6f7fa,#f6f7fa 6px,#eef1f6 6px,#eef1f6 12px);
  border: 1px solid var(--accent);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
}

.ribbon .rl { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-deep); font-weight: 600; white-space: nowrap; }
.ribbon .rq { font-size: 11px; font-style: italic; line-height: 1.25; color: var(--ink); }

.bus-label {
  position: absolute;
  transform: translate(-50%, -50%);
  background: var(--paper);
  padding: 1px 9px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  white-space: nowrap;
}

.op-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .035em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.lvl-badge {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(47,72,107,.35);
}

.lvl-caption {
  position: absolute;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  white-space: nowrap;
}

.dgm-legend {
  position: absolute;
  width: 264px;
  border: 1.2px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  padding: 11px 13px 12px;
}

.dgm-legend h4 { font-size: 10px; font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 9px; font-weight: 500; }
.dgm-legend .row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.dgm-legend .row:last-child { margin-bottom: 0; }
.dgm-legend .key { flex: 0 0 34px; height: 14px; margin-top: 1px; }
.dgm-legend .key svg { display: block; }
.dgm-legend .txt { font-size: 10.5px; line-height: 1.3; color: var(--ink); }
.dgm-legend .txt b { font-weight: 600; }
.dgm-legend .txt span { color: var(--ink-soft); }

.dgm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  padding-top: 8px;
  margin-top: 2px;
}

.dgm-footer .src { font-family: var(--font-mono); font-size: 10px; letter-spacing: .03em; color: var(--ink-soft); }
.dgm-footer .meta { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .055em; text-transform: uppercase; color: var(--ink-soft); }

/* =============================================
   RECALL SEGMENT
   ============================================= */
.recall-body {
  padding: 20px 28px 28px;
}

.recall-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.rp-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.rp-track {
  flex: 1;
  height: 4px;
  background: var(--rule-light);
  border-radius: 2px;
  overflow: hidden;
}

.rp-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .35s ease;
  width: 0%;
}

.rp-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-soft);
  min-width: 36px;
  text-align: right;
}

.recall-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.recall-grid .recall-card:nth-child(5) { grid-column: 1 / -1; }

.recall-card {
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s;
}

.recall-card:hover         { border-color: var(--accent-light); }
.recall-card.revealed      { border-color: var(--accent); }
.recall-card.done          { border-color: #a3c9a8; background: #f7fdf8; }

.rc-question {
  padding: 14px 15px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rc-q-num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-faint);
  padding-top: 1px;
}

.rc-q-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.42;
}

.rc-hint {
  padding: 8px 15px 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rc-answer {
  display: none;
  padding: 11px 15px 13px;
  border-top: 1px solid var(--rule-light);
  background: #f5f7fc;
}

.rc-answer-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .075em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 5px;
}

.rc-answer-text {
  font-size: 12.5px;
  line-height: 1.52;
  color: var(--ink);
}

.rc-done-btn {
  display: none;
  margin: 0 15px 12px;
  min-height: 44px;
  padding: 0 14px;
  background: #e8f5ee;
  border: 1px solid #a3c9a8;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #1e6b3e;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-sans);
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.recall-card.revealed .rc-answer   { display: block; }
.recall-card.revealed .rc-hint     { display: none; }
.recall-card.revealed .rc-done-btn { display: inline-flex; }
.recall-card.done .rc-done-btn     { opacity: .5; pointer-events: none; }

.recall-reset-btn {
  display: block;
  margin: 12px 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 11px;
  color: var(--ink-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-sans);
}

/* =============================================
   APPLY SEGMENT
   ============================================= */
.apply-body {
  padding: 22px 28px;
}

.scenario-card {
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  max-width: 720px;
}

.sc-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 10px;
}

.sc-prompt {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.58;
  color: var(--ink);
  margin-bottom: 18px;
}

.sc-reveal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-sans);
  transition: background .12s;
}

.sc-reveal-btn:hover { background: var(--accent-deep); }

.sc-answer {
  display: none;
  margin-top: 16px;
  padding: 14px 17px;
  background: var(--focus-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 5px 5px 0;
}

.sc-answer.visible { display: block; }

.sc-answer-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  margin-bottom: 7px;
}

.sc-answer p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 8px;
}

.sc-answer p:last-child { margin-bottom: 0; }

/* =============================================
   REFERENCE SEGMENT
   ============================================= */
.reference-body {
  padding: 22px 28px;
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--paper);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  max-width: 760px;
}

.ref-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--ink);
  color: rgba(255,255,255,.75);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
}

.ref-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--rule-light);
  line-height: 1.42;
  color: var(--ink);
  vertical-align: top;
}

.ref-table tr:last-child td { border-bottom: none; }

.ref-table td:first-child {
  font-weight: 600;
  color: var(--ink);
  width: 38%;
  white-space: nowrap;
}

.ref-table td strong { color: var(--accent-deep); }

.ref-table tr:hover td { background: var(--focus-bg); }

.ref-table .ref-accent td:first-child { color: var(--accent-deep); }
.ref-table .ref-accent td { background: var(--focus-bg); }

/* =============================================
   SOURCE SEGMENT
   ============================================= */
.source-body {
  padding: 22px 28px;
}

.source-status-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 18px;
  background: var(--status-clear-bg);
  border: 1.5px solid #a3c9a8;
  border-radius: 8px;
  margin-bottom: 18px;
  max-width: 700px;
}

.ssb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--status-clear);
  flex-shrink: 0;
  margin-top: 3px;
}

.ssb-body .ssb-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--status-clear);
  font-weight: 500;
  margin-bottom: 4px;
}

.ssb-body .ssb-desc {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.source-meta {
  background: var(--paper);
  border: 1.2px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  max-width: 700px;
}

.source-meta table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.source-meta tr { border-bottom: 1px solid var(--rule-light); }
.source-meta tr:last-child { border-bottom: none; }

.source-meta td:first-child {
  padding: 9px 16px 9px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .045em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  width: 34%;
  vertical-align: top;
}

.source-meta td:last-child {
  padding: 9px 16px;
  color: var(--ink);
  line-height: 1.45;
}

/* =============================================
   PHASE 1 COMPONENT PRIMITIVES
   Reusable across all segments and pages.
   Tokens are drawn entirely from :root in
   marcela-shell.css — no new tokens required.
   ============================================= */

/* ---- Section label with auto-rule ---- */
/*
 * Use .m-section-label in place of ad-hoc section
 * headings. The ::after pseudo-element extends a
 * hairline rule to fill the remaining row width,
 * creating consistent visual separation.
 */
.m-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 14px;
  margin-top: 24px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.m-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule-light);
}
.m-section-label.no-top { margin-top: 0; }

/* ---- Callout variants ---- */
/*
 * Four semantic variants: note (blue), tip (green),
 * caution (amber), critical (red). All share the
 * left-border + tinted background pattern established
 * by .lp-why. Use .m-callout-label for the eyebrow
 * and .m-callout-body for the prose content.
 */
.m-callout {
  border-left: 3px solid;
  border-radius: 0 6px 6px 0;
  padding: 13px 16px;
  margin-bottom: 16px;
}

.m-callout-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .085em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 5px;
}

.m-callout-body {
  font-size: 13px;
  line-height: 1.54;
  color: var(--ink);
}

.m-callout-body p { margin-bottom: 4px; }
.m-callout-body p:last-child { margin-bottom: 0; }

/* note — slate blue */
.m-callout--note                        { background: var(--focus-bg);          border-left-color: var(--accent); }
.m-callout--note .m-callout-label       { color: var(--accent-deep); }

/* tip — green */
.m-callout--tip                         { background: var(--status-clear-bg);   border-left-color: var(--status-clear); }
.m-callout--tip .m-callout-label        { color: var(--status-clear); }

/* caution — amber */
.m-callout--caution                     { background: var(--status-caution-bg); border-left-color: var(--status-caution); }
.m-callout--caution .m-callout-label    { color: var(--status-caution); }

/* critical — red */
.m-callout--critical                    { background: var(--status-blocked-bg); border-left-color: var(--status-blocked); }
.m-callout--critical .m-callout-label   { color: var(--status-blocked); }

/* ---- Chip / tag ---- */
/*
 * Use .m-chip-group as the flex wrapper and
 * .m-chip for each pill tag. Suitable for
 * acronyms, vocabulary terms, source refs,
 * and quick-reference labels.
 */
.m-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.m-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: var(--focus-bg);
  border: 1px solid var(--accent-light);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--accent-deep);
  letter-spacing: .02em;
  white-space: nowrap;
  line-height: 1.5;
}

/* ---- Status dot ---- */
/*
 * Inline color-coded indicator for process steps,
 * Apply scenarios, and flow diagrams.
 * Drive state via data-status: complete | active |
 * caution | blocked | inactive (default gray).
 */
.m-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--rule);
  vertical-align: middle;
}

.m-status-dot[data-status="complete"]  { background: var(--status-clear); }
.m-status-dot[data-status="active"]    { background: var(--status-caution); }
.m-status-dot[data-status="caution"]   { background: var(--status-caution); }
.m-status-dot[data-status="blocked"]   { background: var(--status-blocked); }
.m-status-dot[data-status="inactive"]  { background: var(--rule); }

.source-status-banner .m-status-dot { margin-top: 3px; }
