@font-face {
  font-family: Manrope;
  src: url('assets/manrope.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #faf9f4;
  --ink: #191919;
  --muted: #66645f;
  --line: #d7d5cc;
  --yellow: #ffff00;
  --sans: Manrope, 'Avenir Next', 'Segoe UI', sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 7px; }
h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; }
.page { width: min(100% - 96px, 1120px); margin: 0 auto; }
.masthead { padding: 42px 0 32px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 15px; text-decoration: none; font-size: 27px; font-weight: 650; line-height: 1.14; letter-spacing: -.9px; }
.brand img { width: 64px; height: auto; mix-blend-mode: multiply; }
.brand h1 { font: inherit; letter-spacing: inherit; }
.brand-second { display: block; }
main { padding: 36px 0 62px; }
.calculator-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.calculator { min-width: 0; }
.calculator-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; border-radius: 4px; }
.preview { aspect-ratio: 5 / 3; overflow: hidden; border: 1px solid #e8e4da; border-radius: 4px; transition: border-color .18s ease; }
.preview-rain { background: #f6ebdd; }
.preview-rain img { width: 100%; height: 100%; object-fit: contain; }
.preview-race { background: #faf9f4; }
.preview-race img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.preview-heat { background: #f2e9dc; }
.preview-heat img { width: 100%; height: 100%; object-fit: contain; }
h2 { font: 400 clamp(28px, 2.6vw, 32px)/1.16 var(--serif); letter-spacing: -1.1px; margin-top: 20px; }
.calculator-link:hover .preview { border-color: #b7b1a3; }
.calculator-link:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
footer { border-top: 1px solid var(--line); padding: 22px 0 30px; color: #76736b; font-size: 12px; }
.skip-link { position: absolute; top: -80px; left: 16px; padding: 10px 16px; background: var(--ink); color: var(--paper); z-index: 2; }
.skip-link:focus { top: 12px; }

@media (min-width: 761px) and (max-width: 1100px) {
  .calculator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
}
@media (max-width: 760px) {
  .page { width: min(100% - 48px, 540px); }
  .masthead { padding: 28px 0 25px; }
  .brand { font-size: 25px; gap: 13px; }
  .brand img { width: 58px; }
  main { padding: 30px 0 42px; }
  .calculator-grid { grid-template-columns: 1fr; gap: 36px; }
  .preview { aspect-ratio: 5 / 2.8; }
  h2 { font-size: 31px; margin-top: 16px; max-width: 440px; }
}
@media (max-width: 360px) {
  .page { width: calc(100% - 36px); }
  h2 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
