/* RED CO — guide pages. Builds on home.css (buttons, contact) and study.css (crumbs). */

.guide h2 { max-width: 760px; }
.guide-head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: 48px; }
.guide-head p { color: var(--muted); font-size: 18px; line-height: 1.65; }

/* ---------------------------------------------------------------- Hero */
.guide-hero { background: var(--navy-deep); color: var(--on-navy); overflow: hidden; }
.guide-hero__grid {
  display: grid; align-items: center; gap: 56px;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  padding-block: 40px 104px;
}
.guide-hero__copy { display: flex; flex-direction: column; gap: 24px; }
.guide-hero .crumbs, .guide-hero .crumbs a { color: var(--on-navy-muted); }
.guide-hero .crumbs a:hover { color: #fff; }
.guide-hero h1 { margin-top: 24px; color: #fff; font-size: clamp(34px, 4.2vw, 50px); }
.guide-hero__lead { font-size: 18px; line-height: 1.65; max-width: 560px; }

.btn--light { border-color: rgba(255, 255, 255, .55); color: #fff; background: transparent; }
.btn--light:hover { background: #fff; border-color: #fff; color: var(--navy); }

/* Four sources converge on one number. */
.flow {
  margin: 0; margin-top: 56px; display: grid; align-items: stretch;
  grid-template-columns: minmax(0, 1.15fr) 64px minmax(0, 1fr);
}
.flow__sources { margin: 0; padding: 0; list-style: none; display: grid; grid-auto-rows: 1fr; gap: 12px; }
.flow__sources li {
  display: flex; align-items: center; padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .04); color: #fff; font-size: 15px; font-weight: 600; line-height: 1.3;
}
.flow__lines { width: 100%; height: 100%; overflow: visible; }
.flow__lines path {
  fill: none; stroke: var(--red-on-navy); stroke-width: 1.5; vector-effect: non-scaling-stroke;
  stroke-dasharray: 220; animation: flow-draw 1.1s ease-out .2s backwards;
}
.flow__out {
  align-self: center; display: flex; flex-direction: column; gap: 6px;
  padding: 28px 24px; border-radius: var(--radius-md); background: #fff; color: var(--navy);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
  animation: flow-land .5s ease-out 1.1s backwards;
}
.flow__rules { font-size: 14px; font-weight: 600; color: var(--red); }
.flow__value {
  font-size: clamp(44px, 4.4vw, 58px); line-height: 1; font-weight: 300; white-space: nowrap; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.flow__label { font-size: 14px; color: var(--muted); }

@keyframes flow-draw { from { stroke-dashoffset: 220; } to { stroke-dashoffset: 0; } }
@keyframes flow-land { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .guide-hero__grid { grid-template-columns: 1fr; gap: 8px; padding-block: 24px 72px; }
  .flow { grid-template-columns: 1fr; gap: 0; margin-top: 32px; }
  .flow__sources { grid-template-columns: 1fr 1fr; }
  .flow__lines { display: none; }
  .flow__out { position: relative; margin-top: 40px; align-self: stretch; }
  .flow__out::before {
    content: ""; position: absolute; left: 50%; top: -40px; width: 1.5px; height: 40px; background: var(--red-on-navy);
  }
}

/* --------------------------------------------------------- Split intro */
.guide-split { display: grid; gap: 32px 72px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.guide-split__body { display: flex; flex-direction: column; gap: 18px; font-size: 18px; line-height: 1.7; max-width: 680px; }

.tally { margin: 24px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.tally div { padding-top: 16px; border-top: 2px solid var(--navy); }
.tally dt { font-size: 44px; line-height: 1; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.tally dd { margin: 10px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }

@media (max-width: 860px) {
  .guide-split { grid-template-columns: 1fr; }
  .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------ Sources */
.ledger { margin: 0; border-top: 1px solid #D5DADF; }
.ledger__row {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 12px 48px;
  padding-block: 26px; border-bottom: 1px solid #D5DADF;
}
.ledger dt { font-size: 20px; font-weight: 700; color: var(--navy); line-height: 1.35; }
.ledger dd { margin: 0; font-size: 17px; line-height: 1.65; max-width: 640px; }

@media (max-width: 720px) {
  .ledger__row { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------- Pipeline */
.pipeline {
  position: relative; margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px;
}
.pipeline li { position: relative; display: flex; flex-direction: column; gap: 12px; }
.pipeline li:not(:last-child)::after {
  content: ""; position: absolute; top: 23px; left: 48px; right: -28px; height: 2px; background: var(--line);
}
.pipeline__num {
  position: relative; z-index: 1;
  width: 48px; height: 48px; border-radius: 999px; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px;
  box-shadow: 0 0 0 8px var(--bg);
}
.pipeline li:last-child .pipeline__num { background: var(--red); }
.pipeline h3 { margin-top: 8px; font-size: 18px; }
.pipeline p { color: var(--muted); font-size: 15px; line-height: 1.6; }

@media (max-width: 960px) {
  .pipeline { grid-template-columns: 1fr; gap: 32px; }
  .pipeline li:not(:last-child)::after { top: 48px; bottom: -32px; left: 23px; right: auto; width: 2px; height: auto; }
  .pipeline li { display: grid; grid-template-columns: 48px 1fr; column-gap: 20px; }
  .pipeline__num { grid-row: span 2; }
  .pipeline h3 { margin-top: 12px; }
}

/* ------------------------------------------------------- Neutral rate */
.fraction {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 16px 28px;
  padding: 40px; border-radius: var(--radius-lg); background: var(--navy); color: #fff;
}
.fraction__lhs { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; }
.fraction__eq { font-size: 40px; font-weight: 300; color: var(--red-on-navy); }
.fraction__body { display: flex; flex-direction: column; text-align: center; font-size: 18px; line-height: 1.45; }
.fraction__num { padding: 0 8px 14px; border-bottom: 2px solid #fff; }
.fraction__den { padding: 14px 8px 0; color: var(--on-navy); }

.rounding { margin-top: 56px; }
.rounding h3 { font-size: 22px; margin-bottom: 20px; }
.rounding__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rounding__row > div { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius-md); }
.rounding__row strong { font-size: 40px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.rounding__row span { font-size: 15px; }
.rounding__exact { background: var(--bg); color: var(--navy); }
.rounding__exact span { order: -1; color: var(--muted); }
.rounding__option--no { border: 1.5px dashed #C5CCD3; color: var(--muted); }
.rounding__option--no strong { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 3px; }
.rounding__option--yes { background: var(--bg); border: 2px solid var(--navy); color: var(--navy); }
.rounding__option--yes span { font-weight: 600; }

.guide-rules { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 56px; }
.guide-rules div { display: flex; flex-direction: column; gap: 10px; padding-left: 20px; border-left: 2px solid var(--red); }
.guide-rules h3 { font-size: 19px; }
.guide-rules p { font-size: 16px; line-height: 1.65; color: var(--muted); }

@media (max-width: 760px) {
  .fraction { grid-template-columns: 1fr; padding: 28px 22px; text-align: center; }
  .rounding__row, .guide-rules { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------- Scenarios */
.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; min-width: 560px; border-collapse: collapse; table-layout: fixed; }
.matrix th, .matrix td { padding: 18px 20px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.matrix thead th { font-size: 18px; color: var(--navy); vertical-align: bottom; border-bottom: 2px solid var(--navy); }
.matrix thead th span { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--red); }
.matrix tbody th { width: 28%; font-size: 15px; font-weight: 600; color: var(--muted); }
.matrix__cell { font-weight: 600; font-size: 16px; }
.matrix__cell--registry { color: var(--navy); }
.matrix__cell--deddie { color: #fff; background: var(--navy-2); box-shadow: inset 0 0 0 3px var(--bg); }

/* -------------------------------------------------------------- Owner */
.owner { background: var(--red-soft); }
.owner__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 72px; align-items: center;
  padding-block: 96px;
}
.owner__date {
  font-size: clamp(64px, 9vw, 128px); line-height: .9; font-weight: 700; letter-spacing: -.04em; color: var(--red);
  font-variant-numeric: tabular-nums;
}
.owner__body { display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 1.7; }
.owner__body h2 { font-size: clamp(26px, 3vw, 34px); }
.owner__ref { font-size: 14px; color: var(--muted); }

@media (max-width: 860px) {
  .owner__grid { grid-template-columns: 1fr; padding-block: 64px; }
}

/* ----------------------------------------------------------- Pitfalls */
.pitfalls { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.pitfalls li {
  position: relative; padding: 20px 0 20px 44px; border-bottom: 1px solid #D5DADF; font-size: 17px; line-height: 1.6;
}
.pitfalls li::before, .pitfalls li::after {
  content: ""; position: absolute; left: 6px; top: 33px; width: 18px; height: 2.5px; border-radius: 2px; background: var(--red);
  transform: rotate(45deg);
}
.pitfalls li::after { transform: rotate(-45deg); }
.guide-closing {
  margin-top: 48px; max-width: 820px; font-size: 19px; line-height: 1.7; color: var(--navy); font-weight: 500;
}

@media (max-width: 760px) {
  .pitfalls { grid-template-columns: 1fr; }
}
