/* Local chapter layout refinements; loaded after the prototype styles. */
.chapter-track .intro-rediscovery {
  grid-template-rows: auto auto;
}

.chapter-track .intro-scholarship {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  grid-template-rows: auto auto auto;
  gap: clamp(12px, 1.7vh, 20px) clamp(30px, 5vw, 80px);
  align-content: center;
}
.chapter-track .intro-scholarship > .intro-section-heading {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: center;
  width: 100%;
  max-width: none;
  min-width: 0;
}
@media (min-width: 761px) {
  .chapter-track .intro-scholarship #scholarship-title {
    white-space: nowrap;
  }
}
.chapter-track .intro-scholarship > .scholarship-lead {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  max-width: 640px;
  margin: 0 0 4px;
  font-size: clamp(.78rem, 1vw, .94rem);
  line-height: 1.5;
}
.chapter-track .intro-scholarship > .intro-chart-figure {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  margin: 0;
}
.chapter-track .intro-scholarship .intro-chart-heading {
  margin-bottom: 8px;
}
.chapter-track .intro-scholarship .intro-chart-heading span {
  margin-top: 0;
}
.chapter-track .intro-scholarship #intro-chart {
  width: 100%;
  overflow: visible;
}
.compact-chart {
  width: 100%;
  height: auto;
  max-height: none;
}
.compact-chart-desktop { display: block; }
.compact-chart-mobile { display: none; }
.chapter-track .intro-scholarship .intro-chart-figure figcaption {
  margin-top: 6px;
}
.chapter-track .intro-scholarship > .scholarship-more {
  grid-column: 1 / -1;
  grid-row: 3;
  margin: 0;
}
.chapter-track .intro-scholarship .scholarship-totals {
  padding: 12px 0 0;
  margin: 0;
  gap: clamp(12px, 3vw, 48px);
}
.chapter-track .intro-scholarship .scholarship-totals > div {
  gap: 4px;
}
.chapter-track .intro-scholarship .scholarship-totals dd {
  font-size: clamp(29px, 3.1vw, 46px);
}
.chapter-track .intro-scholarship .scholarship-totals dt {
  font-size: clamp(.6rem, .75vw, .72rem);
}

@media (max-width: 760px) {
  .chapter-track .intro-scholarship {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    gap: clamp(8px, 1.6vh, 14px);
  }
  .chapter-track .intro-scholarship > .intro-section-heading {
    grid-column: 1;
    grid-row: 1;
  }
  .chapter-track .intro-scholarship > .scholarship-lead {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    margin: 0;
    font-size: .75rem;
    line-height: 1.45;
  }
  .chapter-track .intro-scholarship > .intro-chart-figure {
    grid-column: 1;
    grid-row: 3;
  }
  .chapter-track .intro-scholarship .intro-chart-heading {
    display: flex;
    gap: 3px 12px;
    margin-bottom: 4px;
    font-size: .64rem;
  }
  .chapter-track .intro-scholarship .intro-chart-heading span {
    font-size: .57rem;
  }
  .compact-chart-desktop { display: none; }
  .compact-chart-mobile { display: block; }
  .chapter-track .intro-scholarship .intro-chart-figure figcaption {
    margin-top: 2px;
    font-size: .58rem;
  }
  .chapter-track .intro-scholarship > .scholarship-more {
    grid-column: 1;
    grid-row: 4;
  }
  .chapter-track .intro-scholarship .scholarship-totals {
    gap: 8px;
    padding-top: 8px;
  }
  .chapter-track .intro-scholarship .scholarship-totals > div {
    gap: 3px;
  }
  .chapter-track .intro-scholarship .scholarship-totals dd {
    font-size: clamp(25px, 7vw, 31px);
  }
  .chapter-track .intro-scholarship .scholarship-totals dt {
    font-size: .57rem;
    line-height: 1.25;
  }
}

@media (max-width: 760px) and (max-height: 740px) {
  .chapter-track .intro-scholarship { gap: 7px; }
  .chapter-track .intro-scholarship .scholarship-totals dd { font-size: 25px; }
  .chapter-track .intro-scholarship .scholarship-totals dt { font-size: .54rem; }
}

/* The field uses a wider 70-column phone layout, never a centered letterbox. */
@media(max-width:760px){
 .bowlam-pinned-root.is-pinned #intro-circle-field{width:100%;height:auto;max-height:none;margin:0}
 .bowlam-pinned-root.is-pinned .intro-coverage-steps{align-self:start}
}
.bowlam-pinned-root.is-pinned .intro-coverage-step,
.bowlam-pinned-root.is-pinned .intro-coverage-step:first-child{top:0;transform:none}
/* Keep both color and opacity on the same continuous weight. The public
   controller's midpoint class change must not pop the icon color. */
.bowlam-pinned-root.is-pinned .intro-circle,
.bowlam-pinned-root.is-pinned .intro-circle.is-softened{
 fill:color-mix(in srgb,var(--intro-clay) calc(var(--coverage-weight,1)*100%),#665d53);
 stroke:color-mix(in srgb,#8d4e2a calc(var(--coverage-weight,1)*100%),transparent);
 opacity:calc(.3 + var(--coverage-weight,1)*.7);
 transition:none;
}

/* A single quiet selector keeps the four coverage views together without
   giving each option its own box. Size tracks to their labels so long words
   keep the same breathing room as short ones. */
.chapter-track .intro-controls {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 2px;
  width: min(100%, 470px);
  margin: 12px 0 14px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--intro-line) 76%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--intro-paper) 72%, var(--intro-line));
}
.chapter-track .intro-controls button {
  min-width: 0;
  min-height: 40px;
  padding: 7px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--intro-muted);
  font-size: clamp(.75rem, .85vw, .85rem);
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}
.chapter-track .intro-controls button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--intro-clay) 18%, var(--intro-paper));
  border-color: transparent;
  color: var(--intro-ink);
}
.chapter-track .intro-controls button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--intro-clay);
  outline-offset: 1px;
}
@media (max-width: 760px) {
  .chapter-track .intro-controls {
    width: 100%;
    margin: 10px 0 12px;
    gap: 1px;
  }
  .chapter-track .intro-controls button {
    min-height: 40px;
    padding: 6px 4px;
    font-size: clamp(.7rem, 2.8vw, .76rem);
  }
}

@media(min-width:761px){.bowlam-pinned-root.is-pinned .intro-controls{width:min(100%,51.35svh)}}
