:root {
  --ink: #171d34;
  --muted: #505772;
  --blue: #2536b7;
  --blue-dark: #192783;
  --paper: #fcfbf7;
  --accent: #ffdf74;
  --line: #d8dbec;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.6; }
a { color: inherit; }
button, input { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid #d55027; outline-offset: 4px; }
.shell { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.skip { position: absolute; top: .75rem; left: .75rem; padding: .65rem; background: white; z-index: 2; }
.skip:not(:focus) { transform: translateY(-200%); }

.top { background: var(--paper); }
.mast { min-height: 5.0rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  font-size: 1.5rem;
  font-weight: 780;
  letter-spacing: -.055em;
  color: var(--blue-dark);
  text-decoration: none;
}
.mast nav, .foot nav { display: flex; flex-wrap: wrap; gap: .7rem 1.7rem; font-size: .95rem; }
.mast nav a, .foot nav a { text-decoration: none; }
.mast nav a:hover, .foot nav a:hover, nav a[aria-current] {
  text-decoration: underline;
  text-underline-offset: .35em;
}

.feature { background: var(--blue); color: white; padding: 2.45rem 0; }
.feature-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 2.7rem; align-items: center; }
.label { margin: 0 0 .8rem; font-size: .88rem; font-weight: 650; }
.feature .label { color: #e8eaff; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.2rem, 5.1vw, 4.5rem); line-height: 1; letter-spacing: -.06em; margin-bottom: 1.25rem; }
.feature h1 { font-size: clamp(3rem, 6.3vw, 6rem); line-height: .95; letter-spacing: -.067em; }
.feature h1 em { font-family: Georgia, serif; font-weight: 400; color: var(--accent); }
.feature-copy > p:not(.label) { max-width: 23rem; margin-bottom: 1.4rem; font-size: 1.05rem; color: #f0f1ff; }
.hero { width: 100%; height: auto; aspect-ratio: 1.4; object-fit: cover; }
.button {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: .25rem;
  background: var(--accent);
  color: #222545;
  padding: .66rem 1.08rem;
  font-size: .95rem;
  font-weight: 680;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #ffe896; }

.section { padding-block: 3.25rem 3.75rem; }
.section h2, .tool-strip h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); letter-spacing: -.055em; line-height: 1.14; margin-bottom: 1.45rem; }
.lede { color: var(--muted); max-width: 42rem; font-size: 1.1rem; margin-bottom: 1.8rem; }
.articles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.articles img { width: 100%; aspect-ratio: 1.55; object-fit: cover; }
.article-image { display: block; overflow: hidden; background: #e9ebf8; }
.articles .label { color: var(--blue-dark); font-size: .85rem; margin: .9rem 0 .32rem; }
.articles h3 { font-size: 1.38rem; line-height: 1.2; margin: 0 0 .45rem; letter-spacing: -.035em; }
.articles h3 a { text-decoration: none; }
.articles h3 a:hover { text-decoration: underline; text-underline-offset: .19em; }
.articles article > p:last-child { color: var(--muted); margin: 0; }
.tool-strip { background: #e0e6ff; padding-block: 2.7rem; }
.strip-grid { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; }
.tool-strip h2 { margin-bottom: .75rem; }
.tool-strip p:last-child { max-width: 38rem; margin-bottom: 0; }
.tool-strip .button { background: var(--blue); color: white; }
.tool-strip .button:hover { background: var(--blue-dark); }

.story { padding-block: 2rem 3rem; }
.story-head { max-width: 53rem; margin: 0 auto 1rem; }
.back, .text-link { color: var(--blue-dark); text-underline-offset: .2em; }
.story-head .label { color: var(--blue-dark); margin-top: 1.2rem; }
.story-image { width: min(100%, 58rem); aspect-ratio: 2.05; object-fit: cover; margin: 0 auto 2.3rem; }
.reading { display: grid; grid-template-columns: minmax(11rem, .8fr) minmax(0, 2.5fr); gap: 2.2rem; max-width: 58rem; margin: auto; }
.toc { border-top: 2px solid var(--blue); padding-top: .85rem; }
.toc p { font-weight: 700; margin-bottom: .35rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc a { color: var(--blue-dark); }
.article-copy section { scroll-margin-top: 1rem; margin-bottom: 1.7rem; }
.article-copy h2, .notes h2, .about h2 {
  font-size: 1.55rem;
  letter-spacing: -.035em;
  line-height: 1.2;
  margin-bottom: .65rem;
}
.about p, .notes p { max-width: 47rem; }
.calculation { display: grid; grid-template-columns: 1.35fr 1fr; max-width: 60rem; border: 1px solid var(--line); }
#calculator { padding: 1.5rem; background: white; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-weight: 700; margin-bottom: .35rem; padding: 0; }
.radio { display: inline-flex; align-items: center; gap: .32rem; margin-right: .8rem; }
input[type="radio"] { accent-color: var(--blue); }
.fields { display: grid; gap: .9rem; margin-bottom: 1rem; }
.fields label { display: grid; grid-template-columns: 1fr minmax(4.4rem, .4fr); gap: .65rem; align-items: center; }
.fields input { width: 100%; min-width: 0; border: 1px solid #929aba; border-radius: .2rem; color: var(--ink); padding: .42rem; }
.result { background: var(--blue); color: white; padding: 1.5rem; min-height: 10rem; display: grid; align-content: center; }
.result p { margin: 0; }
.result output { display: grid; gap: .6rem; }
.result strong { font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1; letter-spacing: -.055em; color: var(--accent); }
.notes { margin-top: 2rem; }
footer { border-top: 1px solid var(--line); }
.foot { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; padding-block: 1.7rem; gap: 1rem 2rem; }
.foot p { margin: .35rem 0 0; color: var(--muted); }

@media (max-width: 52rem) {
  .feature-grid { gap: 1.4rem; }
  .articles { gap: 1rem; }
}
@media (max-width: 42rem) {
  .shell { width: min(100% - 2rem, 76rem); }
  .mast { display: grid; justify-content: start; padding-block: .8rem; gap: .5rem; }
  .mast nav { column-gap: .85rem; font-size: .9rem; }
  .feature { padding-block: 1.55rem; }
  .feature-grid, .calculation, .reading { grid-template-columns: 1fr; }
  .feature h1 { font-size: clamp(3.15rem, 13vw, 4.7rem); }
  .hero { aspect-ratio: 1.52; }
  .section { padding-block: 2.1rem 2.5rem; }
  .articles { grid-template-columns: 1fr; gap: 1.6rem; }
  .story-image { aspect-ratio: 1.55; }
  .fields label { grid-template-columns: 1fr 5rem; }
}
