.reader {
  --ink: #261837;
  --muted: #594e65;
  --purple: #5424b5;
  color: var(--ink);
  font-size: 1.05rem;
}
.reader-wrap { width: min(75rem, calc(100% - clamp(2rem, 8vw, 7rem))); margin-inline: auto; }
.reader a { color: var(--purple); text-underline-offset: .2em; }
.reader :is(a,button,select,input):focus-visible { outline: 3px solid #985de7; outline-offset: 3px; }
.reader :is(article,section,h3) { scroll-margin-top: 1rem; }
.reader-hero { background: #341a70; color: white; }
.hero-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding-block: clamp(2rem, 4vw, 3.75rem); }
.reader-hero h1 { font-size: clamp(2.75rem, 5.6vw, 4.85rem); line-height: 1; margin: 1rem 0; }
.reader-hero h1 em { color: #f3bcff; font-style: normal; display: block; }
.reader-hero p { max-width: 52ch; margin-bottom: 1.2rem; }
.trail { font-size: .95rem; }
.trail a { color: #f7dfff; }
.reader .reader-button { display: inline-block; padding: .72rem 1.2rem; border: 0; border-radius: 1.6rem; font: inherit; font-weight: 700; color: white; background: var(--purple); text-decoration: none; cursor: pointer; }
.reader-hero .reader-button { color: #442483; background: white; }
.hero-report { margin: 0; padding: clamp(1.1rem, 3vw, 2rem); border-radius: 1.2rem; background: #fff; color: var(--ink); }
.hero-report figcaption, .source-tag { font-size: .89rem; font-weight: 700; color: #653193; }
.hero-report h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); line-height: 1.15; margin: .75rem 0; }
.hero-report table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; text-align: right; font-size: 1rem; }
.hero-report :is(td,th) { padding: .7rem .2rem; border-bottom: 1px solid #dfd7ed; }
.hero-report th:first-child { text-align: left; }
.hero-report thead th { font-size: .875rem; color: var(--muted); }
.hero-report tbody tr:last-child { background: #f4edff; }
.hero-report p { margin: 1rem 0 .75rem; }
.reading-layout { display: grid; grid-template-columns: minmax(12rem, 15rem) minmax(0, 49rem); gap: clamp(2rem, 6vw, 6rem); justify-content: center; padding-block: 3rem 4.5rem; }
.reader-nav { align-self: start; position: sticky; top: 1rem; border-inline-start: 3px solid #d9c6f5; padding-inline-start: 1rem; }
.reader-nav h2 { font-size: 1.1rem; margin-bottom: .6rem; }
.reader-nav a { display: block; padding-block: .44rem; font-size: .96rem; }
.reader-nav a:last-child { font-weight: bold; }
.reading-section + .reading-section { margin-top: 3.5rem; }
.reading-section > h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.case-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid #ded5ea; padding-block: .8rem; gap: .1rem 1.5rem; }
.case-index a { font-size: 1rem; padding-block: .5rem; }
.case { padding-top: 1.7rem; margin-top: 1.7rem; border-top: 1px solid #e3dce9; }
.case-index + .case { border: none; margin-top: 0; }
.source-tag { margin-bottom: .4rem; }
.source-tag.ga { color: #0e645a; }
.case h3, #terms h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.case .readout { background: #f5f1fb; border-inline-start: 3px solid #9867db; padding: .9rem 1.1rem; border-radius: 0 .5rem .5rem 0; margin: .95rem 0; }
.case ol { margin-bottom: 0; padding-left: 1.65rem; }
.case li { padding-inline-start: .2rem; line-height: 1.58; margin-bottom: .8rem; }
.case li::marker { font-weight: 700; color: #6330a2; }
.bench-list dt { margin: 1.2rem 0 .3rem; font-weight: 750; }
.bench-list dd, .terms dd { margin: 0; line-height: 1.6; }
.calc { padding: clamp(1rem, 3vw, 1.8rem); background: #edf7f2; border-radius: 1rem; }
.calc label, .calc legend { display: block; font-size: .94rem; font-weight: 650; }
.calc :is(input,select) { width: 100%; padding: .72rem; border: 1px solid #8eaaa0; border-radius: .45rem; font: inherit; background-color: #fff; color: #203c31; margin: .3rem 0 .8rem; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: .65rem 0 1rem; }
.calc fieldset { min-width: 0; margin: 0; padding: .75rem 1rem .2rem; border: 1px solid #b3cfc3; border-radius: .65rem; }
.calc legend { padding-inline: .2rem; }
.calc output { display: block; margin-top: 1rem; line-height: 1.55; font-weight: 650; }
#terms h3 { margin: 1.6rem 0 .6rem; }
.terms { display: grid; grid-template-columns: minmax(9rem, .7fr) minmax(0, 2fr); margin: 0; }
.terms dt, .terms dd { border-top: 1px solid #e7dfec; padding: .7rem 0; }
.terms dt { padding-right: 1rem; font-weight: 700; line-height: 1.4; }
.source-link { font-size: .93rem; margin-top: .75rem; }
.finish { padding-top: 1.7rem; border-top: 2px solid #d9c6f5; }
@media (max-width: 48rem) {
  .hero-layout, .reading-layout { grid-template-columns: minmax(0, 1fr); }
  .reading-layout { padding-block: 1.8rem 3rem; gap: 2rem; }
  .reader-nav { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1.15rem; }
  .reader-nav h2 { width: 100%; margin: 0; }
}
@media (max-width: 33rem) {
  .case-index, .calc-grid, .terms { grid-template-columns: minmax(0, 1fr); }
  .terms dd { border: 0; padding-top: 0; }
  .terms dt { padding-bottom: .25rem; }
  .hero-report :is(td,th) { padding-inline: .1rem; }
}
