:root { --accent: #214f8b; --paper: #f0f5fb; }
@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 750;
  font-display: swap;
}

:root {
  font-family: "DM Sans", system-ui, sans-serif;
  color: #1c2422;
  background: #fbfaf7;
  font-synthesis: none;
  line-height: 1.6;
  --ink: #1c2422;
  --muted: #434d47;
  --line: #d9ddd5;
  --radius: 1rem;
}

* { box-sizing: border-box; }
body, p, figure, h1, h2, h3 { margin: 0; }
img { display: block; max-inline-size: 100%; }
a { color: var(--accent); text-underline-offset: .19em; }
button, input { font: inherit; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; }
section[id] { scroll-margin-top: 1.5rem; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.wrap {
  max-width: 77rem;
  width: calc(100% - 5rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  z-index: 2;
  inset: 1rem auto auto 1rem;
  transform: translateY(-180%);
  padding: .5rem .9rem;
  background: white;
}

.skip:focus { transform: none; }

.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: 5rem;
}

.masthead nav, .footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.masthead nav a, .footer nav a { color: var(--ink); font-size: .95rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .67rem;
  color: var(--ink);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  font-weight: 750;
  line-height: 1.28;
  text-decoration: none;
}

.brand-mark {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.65rem;
  border: .41rem solid var(--accent);
  border-radius: .52rem;
}

.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.workspace {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(2.2rem, 5vw, 4.5rem);
  padding-block: clamp(2.75rem, 6vw, 5.25rem);
}

.workspace > * { min-width: 0; }
.eyebrow { color: var(--accent); font-weight: 750; margin-bottom: .85rem; }

h1 {
  font-size: clamp(2.5rem, 5.2vw, 4.65rem);
  line-height: .99;
  font-weight: 750;
  letter-spacing: -.058em;
  overflow-wrap: break-word;
}

.lead {
  max-width: 32rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  margin-top: 1.3rem;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .9rem 1.35rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem 1rem;
  min-height: 2.85rem;
  background: var(--accent);
  border: 0;
  border-radius: .42rem;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { filter: brightness(.87); }
.jump { font-weight: 700; }

.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}

.hero-figure figcaption { margin-top: .37rem; color: var(--muted); font-size: .76rem; }
.editorial { padding-block: clamp(2.5rem, 6vw, 4.6rem); }

h2 {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  font-weight: 750;
  letter-spacing: -.04em;
}

h3 { font-size: 1.23rem; font-weight: 750; letter-spacing: -.02em; }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 2rem;
  margin-top: 1.4rem;
}

.guide {
  padding: 1.05rem .3rem .1rem 0;
  border-top: 2px solid var(--accent);
}

.guide p, .step p { margin-top: .55rem; color: var(--muted); }

.practice {
  margin-block: clamp(2.5rem, 5.5vw, 4.25rem) 2.5rem;
  border-radius: var(--radius);
  background: var(--paper);
  padding: clamp(1.25rem, 4.3vw, 2.75rem);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  margin: 1.25rem 0 0;
  gap: 1.35rem 2.6rem;
  list-style: none;
  counter-reset: step;
}

.step { counter-increment: step; position: relative; padding-left: 2.2rem; }
.step::before {
  content: counter(step);
  position: absolute;
  inset: 0 auto auto 0;
  width: 1.6rem;
  line-height: 1.6rem;
  background: white;
  border-radius: .3rem;
  text-align: center;
  color: var(--accent);
  font-weight: 750;
}

.sources h2 { font-size: 1.2rem; letter-spacing: -.02em; }
.sources ul { margin-block: .6rem 0; padding-inline-start: 1.35rem; }
.sources li + li { margin-top: .25rem; }

.calculator { max-width: 54rem; margin-top: .75rem; }
.calculator > p { max-width: 44rem; color: var(--muted); }
.calculator form { margin-block: 1.15rem .6rem; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.field label { display: flex; justify-content: space-between; gap: .4rem; font-size: .94rem; font-weight: 700; }
.unit { color: var(--muted); font-weight: 400; }
.field input {
  margin-top: .3rem;
  padding: .6rem .7rem;
  width: 100%;
  border: 1px solid #909e97;
  border-radius: .38rem;
  background: white;
  color: var(--ink);
}

.feedback { margin-top: .8rem; }
.feedback:empty { display: none; }
.error { color: #a02625; font-weight: 700; }
.result { font-size: 1.15rem; font-weight: 750; }
.footnote { font-size: .89rem; }
.footer { border-top: 1px solid var(--line); padding-block: 1rem; }
.footer-brand { font-size: 1rem; }
.footer-brand .brand-mark { width: 1.1rem; height: 1.1rem; border-width: .29rem; border-radius: .32rem; }

.legal {
  max-width: 45rem;
  padding-block: clamp(2.5rem, 6vw, 4.6rem);
  overflow-wrap: anywhere;
}

.legal h1 { font-size: clamp(2.45rem, 7vw, 4rem); margin-bottom: 1.4rem; }
.legal h2 { font-size: 1.35rem; margin: 1.45rem 0 .55rem; }
.legal p + p { margin-top: .65rem; }
.legal address { font-style: normal; }

.article-list { margin-bottom: 2.5rem; }
.article-list ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem 2rem;
  padding: 0;
  list-style: none;
}

.article-list li { border-top: 1px solid var(--line); padding-top: .65rem; }
.article-list a { font-weight: 750; }
.article-list p { font-size: .95rem; color: var(--muted); margin-top: .3rem; }
.article { max-width: 48rem; padding-block: clamp(2.25rem, 6vw, 5rem); }
.article h1 { font-size: clamp(2.4rem, 7vw, 4.25rem); text-wrap: wrap; }
.article .lead { max-width: 100%; }
.article section { margin-top: 2.1rem; }
.article h2 { font-size: clamp(1.3rem, 3.3vw, 1.8rem); }
.article section p { margin-top: .65rem; }
.article section li + li { margin-top: .4rem; }
.article .sources { border-top: 1px solid var(--line); padding-top: 1.6rem; }

@media (max-width: 52rem) {
  .wrap { width: calc(100% - 3rem); }
  .workspace { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { gap: 1.15rem; }
}

@media (max-width: 40rem) {
  .wrap { width: calc(100% - 2rem); }
  .masthead-inner, .footer { justify-content: flex-start; flex-wrap: wrap; column-gap: 1.05rem; }
  .masthead-inner { min-height: 0; padding-block: .85rem; row-gap: .7rem; }
  .masthead nav { gap: .75rem; }
  .workspace { grid-template-columns: 1fr; gap: 1.65rem; padding-block: 2rem 1.5rem; }
  .hero-figure img { aspect-ratio: 16 / 10; }
  .guide-grid, .steps { grid-template-columns: 1fr; }
}

@media (max-width: 24rem) {
  .form-grid { grid-template-columns: 1fr; }
}
