/* Canonical Stages reference page. Scoped to avoid changing legacy article Stage cards. */
.stages-reference {
  --stages-ink: #14283b;
  --stages-muted: #55616b;
  --stages-paper: #f4f1e9;
  --stages-paper-alt: #fbfaf6;
  --stages-rule: #d8d3c7;
  background: var(--stages-paper);
  color: var(--stages-ink);
  margin: 0.75rem 0 0.5rem;
  overflow: hidden;
}
.stages-reference-page { overflow-x: hidden; }
.stages-reference * { box-sizing: border-box; }
.stages-reference h1,
.stages-reference h2,
.stages-reference h3,
.stages-reference h4,
.stages-reference p,
.stages-reference blockquote { color: inherit; text-align: left; }
.stages-reference h1,
.stages-reference h2,
.stages-reference h3 {
  border: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.035em;
  line-height: 1.08;
  padding: 0;
}
.stages-reference h1 { font-size: clamp(2.1rem, 4vw, 3rem); margin: 0; }
.stages-reference h2 { font-size: clamp(1.65rem, 2.8vw, 2.15rem); margin: 0; }
.stages-reference h3 { font-size: 1.3rem; margin: 0; }
.stages-reference a:focus-visible {
  outline: 3px solid #17657a;
  outline-offset: 4px;
}
.stages-opening {
  padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 5vw, 4rem) 1.75rem;
}
.stages-kicker {
  color: #59636b !important;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 0.7rem;
  text-transform: uppercase;
}
.stages-deck {
  font-size: 1.08rem;
  line-height: 1.6;
  margin: 0.85rem 0 0;
  max-width: 810px;
}
.stages-axis {
  border-left: 3px solid #2f6f73;
  color: var(--stages-muted) !important;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 1.25rem 0 0;
  max-width: 810px;
  padding-left: 1rem;
}
.stages-axis strong { color: var(--stages-ink); }
.stages-overview {
  background: var(--stages-paper-alt);
  border-bottom: 1px solid var(--stages-rule);
  border-top: 1px solid var(--stages-rule);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
}
.stage-overview {
  --stage-accent: #6b7280;
  color: inherit !important;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.5rem 1.2rem 1.65rem;
  text-decoration: none;
}
.stage-overview + .stage-overview { border-left: 1px solid var(--stages-rule); }
.stage-overview:first-child { padding-left: 0; }
.stage-overview:last-child { padding-right: 0; }
.stage-overview--1,
.stage-detail--1,
.stages-orientation__row--1 { --stage-accent: #6b7d3a; }
.stage-overview--2,
.stage-detail--2,
.stages-orientation__row--2 { --stage-accent: #a68a64; }
.stage-overview--3,
.stage-detail--3,
.stages-orientation__row--3 { --stage-accent: #2f6f73; }
.stage-overview--4,
.stage-detail--4,
.stages-orientation__row--4 { --stage-accent: #6b7280; }
.stage-overview__top { align-items: center; display: flex; min-height: 2.35rem; }
.stage-overview__number {
  color: var(--stage-accent);
  font-family: var(--font-sans);
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-size: 2.2rem;
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}
.stage-overview__rule {
  background: var(--stage-accent);
  display: block;
  height: 3px;
  margin-left: 0.8rem;
  min-width: 2rem;
  width: 100%;
}
.stage-overview__title {
  color: var(--stages-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
  margin-top: 0.55rem;
  min-height: 2.65rem;
}
.stage-overview__focus {
  color: var(--stages-muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0.3rem;
  min-height: 1.05rem;
}
.stage-overview__description {
  color: var(--stages-muted);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.45;
  margin-top: 0.85rem;
}
.stage-overview:hover .stage-overview__title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.stages-section,
.stage-detail,
.stages-technical { padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 5vw, 4rem); }
.stages-prose { max-width: 760px; }
.stages-prose p {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}
.stages-prose p + p { margin-top: 1.1rem; }
.stages-prose blockquote {
  background: #ebe7dc;
  border: 0;
  border-left: 4px solid #2f6f73;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-style: normal;
  line-height: 1.55;
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
}
.stages-framework .stages-prose,
.stages-orientation > * { margin-left: auto; margin-right: auto; }
.stages-method {
  border-top: 1px solid var(--stages-rule);
  margin-top: 1.75rem;
  padding-top: 1.25rem;
}
.stages-method h3 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.stages-method p {
  color: var(--stages-muted);
  font-size: 0.87rem;
  line-height: 1.55;
  margin-top: 0.55rem;
}
.stages-orientation {
  background: var(--stages-paper-alt);
  border-bottom: 1px solid var(--stages-rule);
  border-top: 1px solid var(--stages-rule);
}
.stages-section__heading,
.stages-orientation__list { max-width: 860px; }
.stages-section__heading > p {
  color: var(--stages-muted);
  line-height: 1.6;
  margin: 0.6rem 0 0;
}
.stages-orientation__list {
  border-bottom: 1px solid var(--stages-rule);
  margin-top: 1.25rem;
}
.stages-orientation__row {
  --stage-accent: #6b7280;
  align-items: center;
  border-top: 1px solid var(--stages-rule);
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  padding: 0.8rem 0;
}
.stages-orientation__row > span {
  color: var(--stage-accent);
  font-family: var(--font-sans);
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-size: 1.45rem;
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 700;
}
.stages-orientation__row p { line-height: 1.5; margin: 0; }
.stages-orientation__prose { margin-top: 1.75rem; }
.stage-detail {
  border-bottom: 1px solid var(--stages-rule);
  scroll-margin-top: 5rem;
}
.stage-detail--2,
.stage-detail--4 { background: var(--stages-paper-alt); }
.stage-detail__inner { margin: 0 auto; max-width: 920px; }
.stage-section-header {
  border-top: 4px solid var(--stage-accent);
  display: grid;
  gap: 1.35rem;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  max-width: 760px;
  padding-top: 1rem;
}
.stage-section-header__number {
  color: var(--stage-accent);
  font-family: var(--font-sans);
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-size: 2.5rem;
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.stage-section-header__focus {
  color: var(--stages-muted) !important;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0.45rem 0 0;
}
.stage-detail__prose { margin-top: 1.5rem; }
.stage-reading {
  border-top: 1px solid var(--stages-rule);
  margin-top: 2rem;
  padding-top: 1.35rem;
}
.stage-reading > h3 { font-size: 1.35rem; }
.stage-reading__groups {
  align-items: start;
  display: grid;
  gap: 1.25rem 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}
.stage-reading__group {
  align-self: start;
  border-left: 1px solid var(--stages-rule);
  min-width: 0;
  padding: 0 1.25rem;
}
.stage-reading__group:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
.stage-reading__group:nth-child(3n) { padding-right: 0; }
.stage-reading__group:nth-child(n + 4) {
  border-top: 1px solid var(--stages-rule);
  padding-top: 1.25rem;
}
.stage-reading__group h4 {
  color: var(--stage-accent);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  margin: 0 0 0.45rem;
  text-transform: uppercase;
}
.stage-reading__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.stage-reading__group li {
  border-top: 1px solid var(--stages-rule);
  line-height: 1.35;
  padding: 0.5rem 0;
}
.stage-reading__group li:first-child { border-top: 0; padding-top: 0; }
.stage-reading__group a { font-size: 0.9rem; font-weight: 700; }
.stages-technical {
  background: #e9e5db;
  border-top: 3px double #aaa396;
}
.stages-technical__inner { margin: 0 auto; max-width: 760px; }
.stages-technical h2 { max-width: 720px; }
.stages-technical p:not(.stages-kicker) {
  line-height: 1.7;
  margin: 0.85rem 0 0;
}

@media (max-width: 900px) {
  .stages-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-overview:nth-child(3) { border-left: 0; }
  .stage-overview:nth-child(n + 3) { border-top: 1px solid var(--stages-rule); }
  .stage-overview:first-child,
  .stage-overview:nth-child(3) { padding-left: 0; }
  .stage-overview:nth-child(2),
  .stage-overview:last-child { padding-right: 0; }
  .stage-reading__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-reading__group:nth-child(n) {
    border-left: 1px solid var(--stages-rule);
    border-top: 0;
    padding: 0 1.25rem;
  }
  .stage-reading__group:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stage-reading__group:nth-child(even) { padding-right: 0; }
  .stage-reading__group:nth-child(n + 3) {
    border-top: 1px solid var(--stages-rule);
    padding-top: 1.25rem;
  }
}

@media (max-width: 600px) {
  .stages-reference { margin-top: 0.5rem; }
  .stages-opening,
  .stages-section,
  .stage-detail,
  .stages-technical { padding: 2rem 1.25rem; }
  .stages-reference h1 { font-size: 2.25rem; }
  .stages-overview {
    grid-template-columns: 1fr;
    padding: 0 1.25rem;
  }
  .stage-overview:nth-child(n) {
    border-left: 0;
    border-top: 1px solid var(--stages-rule);
    padding: 1.35rem 0 1.5rem;
  }
  .stage-overview:first-child { border-top: 0; }
  .stage-overview__title,
  .stage-overview__focus { min-height: 0; }
  .stages-orientation__row { gap: 0.8rem; grid-template-columns: 2.5rem minmax(0, 1fr); }
  .stage-section-header {
    gap: 0.6rem;
    grid-template-columns: 1fr;
  }
  .stage-section-header__number { font-size: 2.15rem; }
  .stage-reading__groups { grid-template-columns: 1fr; }
  .stage-reading__group:nth-child(n) {
    border-left: 0;
    border-top: 1px solid var(--stages-rule);
    padding: 1rem 0 0;
  }
  .stage-reading__group:first-child { border-top: 0; padding-top: 0; }
}

