.overview {
  display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  gap: clamp(40px, 6.4vw, 90px); align-items: start;
  padding-block: clamp(42px, 7vw, 96px) 48px;
}
.intro { padding-top: clamp(8px, 2.2vw, 30px); }
.intro h1 {
  margin: 0 0 23px; font-size: clamp(2.45rem, 4.4vw, 3.85rem);
  line-height: 1.02; letter-spacing: -.044em; text-wrap: balance;
}
.intro h1 em { font-weight: inherit; }
.intro p { max-width: 35ch; color: var(--secondary); margin: 0 0 15px; }
.intro p:first-of-type { color: var(--ink); font-size: clamp(1.15rem, 1.55vw, 1.34rem); line-height: 1.45; }
.intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; margin-top: 20px; }
.intro-actions > a { display: inline-flex; align-items: center; min-height: 44px; }
.start {
  padding: 9px 15px;
  color: white; background: #175f55; border: 1px solid #175f55; border-radius: 4px;
  text-decoration: none; font-weight: 600;
}
.start:hover { background: #0e5048; }
.intro .design-note { max-width: 40ch; margin: 28px 0 0; padding-left: 12px; border-left: 2px solid var(--rule); font-size: .9rem; }
.map { min-width: 0; }
.map h2 { margin: 0 0 16px; font-size: clamp(1.65rem, 2.85vw, 2.4rem); }
.branches {
  margin: 0; padding: 0; border: 0; min-width: 0; position: relative;
  display: grid; grid-template-columns: minmax(0,36%) minmax(0,1fr); gap: 8px;
}
.map-drawing { position: absolute; inset: 0 auto 0 0; width: 36%; display: grid; grid-template-columns: 59% 41%; align-items: center; }
.map-records, .branch-lines { display: block; width: 100%; }
.map-records { height: auto; overflow: visible; }
.map-column-names { font: 650 12px var(--sans); }
.branch-lines { height: 100%; }
.branch-options { grid-column: 2; display: grid; grid-template-rows: repeat(4, 1fr); }
.branch { display: flex; position: relative; cursor: pointer; }
.branch input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.branch-label {
  width: 100%; display: flex; flex-direction: column; justify-content: center;
  min-height: 65px; padding: 7px 10px 7px 13px; border-inline-start: 2px solid transparent; border-radius: 2px;
}
.branch-label strong { font-size: 1.04rem; font-weight: 620; line-height: 1.32; }
.branch-label > span { font-size: .94rem; color: var(--secondary); line-height: 1.4; }
.branch input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: -2px; }
.branch input:checked + span { border-inline-start-color: var(--teal); background: var(--teal-light); }
.branch input:checked + span strong, .branch:hover strong { color: var(--teal); }
.branch-ink { stroke: #a28cab; stroke-width: 1.7; }
.map:has([value="risk"]:checked) .ink-risk,
.map:has([value="effect"]:checked) .ink-effect,
.map:has([value="weight"]:checked) .ink-weight,
.map:has([value="both"]:checked) .ink-both { stroke: #65367e; stroke-width: 2.7; }
.map-explanation {
  margin-top: 20px; padding-top: 13px; border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; align-items: flex-start;
}
/* Occupy the tallest caption's height. A branch change never moves the controls. */
.branch-notes { display: grid; width: 100%; }
.branch-notes > p { grid-area: 1 / 1; visibility: hidden; margin: 0; color: var(--ink); }
.map:has([value="risk"]:checked) #note-risk,
.map:has([value="effect"]:checked) #note-effect,
.map:has([value="weight"]:checked) #note-weight,
.map:has([value="both"]:checked) #note-both { visibility: visible; }
.walk {
  padding: 8px 0; min-height: 44px; border: 0; color: var(--teal); background: transparent;
  text-decoration: underline; text-underline-offset: .2em; font-size: .94rem; font-weight: 600;
}
@media (max-width: 850px) {
  .overview { gap: 30px; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .branches { gap: 4px; }
  .branch-label { padding-left: 8px; }
}
@media (max-width: 700px) {
  .overview { grid-template-columns: 1fr; gap: 35px; padding-block: 34px; }
  .intro { padding-top: 0; }
  .intro h1 { margin-bottom: 16px; font-size: clamp(2.35rem, 8.25vw, 3.45rem); }
  .intro p { max-width: 56ch; margin-bottom: 7px; }
  .intro-actions { margin-top: 15px; }
  .intro .design-note { max-width: 58ch; margin-top: 17px; }
  .map { border-top: 1px solid var(--rule); padding-top: 24px; }
  .map h2 { margin-bottom: 12px; }
  .map-drawing { grid-template-columns: 65% 35%; }
  .branch-label { min-height: 59px; }
  .map-explanation { margin-top: 12px; }
}
@media (max-width: 600px) {
  .map { --records-width: clamp(124px, 30vw, 136px); }
  /* Give the source records their own space beside the map heading. */
  .map h2 {
    display: grid; align-content: center; box-sizing: border-box;
    min-height: calc(var(--records-width) * 1.44); margin: 0 0 12px;
    padding-inline-start: calc(var(--records-width) + 12px);
  }
  .branches { grid-template-columns: 32px minmax(0, 1fr); gap: 4px; }
  .map-drawing { display: block; width: 32px; pointer-events: none; }
  .map-records { position: absolute; bottom: calc(100% + 12px); left: 0; width: var(--records-width); }
  .map-drawing::before {
    content: ""; position: absolute; left: 0; top: -6px; height: calc(50% + 6px);
    width: calc(var(--records-width) / 2); border-top: 1.5px solid #694382;
    border-left: 1.5px solid #694382; border-top-left-radius: 6px;
  }
  .branch-label { min-height: 54px; padding: 4px 2px 4px 6px; }
  .branch-label strong { line-height: 1.25; }
  .branch-label > span { line-height: 1.3; }
  .map-explanation { margin-top: 8px; padding-top: 0; }
  /* The walk control stays beside the choices as the reserved note area changes. */
  .walk { order: -1; padding-block: 6px; }
}
@media (max-width: 360px) {
  .branch-label strong { font-size: .96rem; }
  .branch-label > span { font-size: .87rem; }
}
@media (forced-colors: active) {
  .branch input:checked + span { border: 2px solid Highlight; }
  .branch-ink { stroke: CanvasText; }
}
