@font-face {
  font-family: "Fraunces";
  src: url("/public/assets/fonts/fraunces-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/public/assets/fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #fffaf0;
  --paper: #faf5e8;
  --ink: #0a0a0a;
  --pink: #ff4d8b;
  --teal: #1a3a3a;
  --lavender: #b8a4ed;
  --peach: #ffb084;
  --ochre: #e8b94a;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; overflow-wrap: break-word; }
[hidden] { display: none !important; }
p, ul, ol, dl { margin: 0 0 1.15rem; }
li + li { margin-top: .5rem; }
ul, ol { padding-left: 1.3rem; }
strong { font-weight: 650; }
small { font-size: 1rem; }

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  letter-spacing: -.035em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.08; margin: 1rem 0 1.25rem; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.18; margin: 0 0 1.25rem; }
h3 { font-size: 1.65rem; line-height: 1.22; margin: 1.6rem 0 .9rem; }

a {
  color: inherit;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: .4rem .2rem;
  gap: .5rem;
  text-underline-offset: .2em;
  text-decoration-thickness: 1px;
  border-radius: 6px;
}
a:hover { background: var(--lavender); color: var(--ink); }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}
header a:focus-visible, header summary:focus-visible, footer a:focus-visible {
  outline-color: var(--ochre);
}
main:focus { outline: none; }

body > header {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.8rem 2rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}
header > a {
  display: grid;
  grid-template-columns: 1.4rem auto;
  gap: 0 .6rem;
  line-height: 1.35;
  font-weight: 650;
  text-decoration: none;
}
header > a > span:first-child { color: var(--teal); grid-row: span 2; font-size: 1.1rem; }
header > a > span:last-child { font-size: 16px; font-weight: 450; grid-column: 2; }

summary {
  cursor: pointer;
  min-height: 48px;
  padding: .7rem .9rem;
  font-weight: 600;
}
details > summary::marker { color: currentColor; }
.menu {
  position: relative;
  flex-shrink: 0;
  font-size: 16px;
  border-radius: 28px;
  background: var(--teal);
  color: var(--canvas);
}
.menu > summary { padding: .75rem 1.2rem; }
.menu > nav {
  position: absolute;
  z-index: 5;
  right: 0;
  top: calc(100% + .5rem);
  width: min(36rem, calc(100vw - 2rem));
  max-height: 75vh;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 24px;
  padding: .8rem;
  background: var(--teal);
  box-shadow: 0 12px 0 rgb(10 10 10 / 10%);
}
.menu nav > details { padding: .25rem; border-bottom: 1px solid var(--canvas); }
.menu nav > details:last-child { border-bottom: 0; }
.menu nav ul { margin: 0; padding: 0 .8rem .8rem; list-style: none; }
.menu nav a { width: 100%; padding: .7rem .5rem; }
.menu [aria-current="page"] { background: var(--peach); color: var(--ink); }

main { max-width: 1320px; padding: 1.5rem 2rem 4rem; margin: 0 auto; }
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  margin-bottom: clamp(3rem, 7vw, 6rem);
}
.intro:not(:has(figure)) { grid-template-columns: minmax(0, 1fr); max-width: 70ch; margin-inline: auto; }
.intro > div > p:first-child {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  padding: .5rem 1rem;
  border-radius: 24px;
  background: var(--peach);
  margin-bottom: 0;
}
.intro > div > p:not(:first-child) { max-width: 45ch; font-size: 1.1rem; }
figure {
  margin: 0;
  min-width: 0;
  border-radius: 36px 36px 80px 36px;
  overflow: hidden;
  background: var(--peach);
  border: 2px solid var(--ink);
}
img { display: block; max-width: 100%; width: 100%; height: auto; object-fit: cover; font-size: 1rem; }
article { max-width: 72ch; margin: 0 auto; }
article > ul:first-child { margin-bottom: 2.5rem; }
article > section { margin-block: 4.5rem; }
article > figure { margin: 4rem 0; }
section > :last-child { margin-bottom: 0; }
.myth {
  padding: clamp(1.3rem, 4vw, 2.8rem);
  border-radius: 44px 44px 12px 44px;
  background: var(--pink);
  border: 2px solid var(--ink);
}
.myth > p:first-child { font-size: 16px; font-weight: 650; margin-bottom: .8rem; }
.myth .fact-label { font-size: 1rem; font-weight: 700; line-height: 1.22; margin: 1.6rem 0 .9rem; }
.urgent { padding: clamp(1.3rem, 4vw, 2.8rem); border: 3px solid var(--ink); border-radius: 28px; background: var(--ochre); }
.urgent > p:nth-of-type(3) { font-weight: 750; font-size: 1.3rem; }
.routes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.routes li { margin: 0; min-width: 0; }
.routes a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .7rem;
  height: 100%;
  min-height: 155px;
  padding: 1.35rem;
  border-radius: 26px;
  background: var(--lavender);
  border: 2px solid var(--ink);
  text-decoration: none;
}
.routes li:nth-child(3n + 2) a { background: var(--ochre); }
.routes li:nth-child(3n) a { background: var(--peach); }
.routes a strong { font-size: 1.15rem; line-height: 1.4; }
.routes a > span { font-size: 1rem; line-height: 1.6; }
.routes a > span[aria-hidden] { font-size: 1.4rem; align-self: flex-end; margin-top: auto; }
.routes a:hover { background: var(--paper); }
.source-drawer { padding: .7rem; border: 2px solid var(--ink); background: var(--paper); border-radius: 24px; margin: 4rem 0 2rem; }
.source-drawer > summary { padding: .6rem; }
.source-drawer > p, .source-drawer > ul { margin: 1rem .8rem; }
.source-drawer a { font-size: 1rem; }
article > nav { margin-top: 2rem; }
article > nav a { width: 100%; padding: 1rem 1.2rem; border-radius: 30px; background: var(--teal); color: var(--canvas); text-decoration: none; }
article > nav a:hover { background: var(--lavender); color: var(--ink); }
article > nav a > span { margin-left: auto; }

fieldset { border: 2px solid var(--teal); border-radius: 18px; margin: 1.5rem 0; padding: 1.25rem; min-width: 0; }
legend { font-size: 1rem; font-weight: 700; padding-inline: .4rem; max-width: 100%; }
label { display: block; font-weight: 600; font-size: 1rem; margin: 1rem 0 .5rem; }
input, textarea, button { font: inherit; color: var(--ink); font-size: 1rem; }
input, textarea { width: 100%; max-width: 100%; min-height: 52px; padding: .8rem; border: 2px solid var(--teal); border-radius: 10px; background: var(--canvas); }
textarea { resize: vertical; }
input[aria-invalid="true"] { border: 3px solid var(--ink); background: var(--peach); }
output { display: block; padding: 1.1rem; font-weight: 700; background: var(--ochre); border-radius: 12px; margin-bottom: 1rem; overflow-wrap: anywhere; }
button { min-height: 48px; padding: .8rem 1.2rem; border: 2px solid var(--ink); border-radius: 28px; background: var(--lavender); font-weight: 650; cursor: pointer; margin: .25rem .25rem .25rem 0; }
button:hover { background: var(--ochre); }
.worksheet { background: var(--paper); padding: clamp(1rem, 3vw, 2rem); border-radius: 28px; border: 2px solid var(--ink); }
.worksheet > p, .worksheet form p { font-size: 1rem; }
.paper-entries { display: none; }

footer {
  border-radius: 42px 42px 0 0;
  background: var(--teal);
  color: var(--canvas);
  padding: 3rem max(1rem, calc((100vw - 1120px) / 2));
  font-size: 1rem;
}
footer p { max-width: 70ch; }
footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
footer a { padding: .6rem .3rem; font-size: 1rem; }
.skip { position: absolute; z-index: 9; left: 1rem; top: .5rem; transform: translateY(-200%); background: var(--ochre); padding: .8rem; color: var(--ink); }
.skip:focus { transform: none; }

@media (max-width: 700px) {
  :root { font-size: 17px; }
  body > header { padding: 1rem; align-items: flex-start; flex-wrap: wrap; gap: .9rem; }
  .menu { margin-left: auto; }
  main { padding: 1.3rem 1rem 3rem; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; margin-bottom: 3rem; }
  .intro > div > p:not(:first-child) { font-size: 1rem; }
  .intro h1 { font-size: clamp(2.4rem, 11vw, 3.25rem); }
  .intro figure { max-width: 100%; }
  article > section { margin-block: 3.25rem; }
  .routes { grid-template-columns: minmax(0, 1fr); }
  .routes a { min-height: 145px; }
  .myth { border-radius: 30px 30px 10px 30px; }
  h3 { font-size: 1.5rem; }
  fieldset { padding: .9rem; }
  footer { padding: 2rem 1.1rem; }
  footer nav { flex-direction: column; align-items: flex-start; gap: .15rem; }
  footer a { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media print {
  :root { font-size: 16px; background: white; color: black; }
  body > header, body > footer, .skip, article > nav, .intro figure, article > figure, .routes, form > div { display: none; }
  main { padding: 0; max-width: none; }
  .intro { display: block; margin-bottom: 1.5rem; }
  .intro h1 { font-size: 32px; }
  article { max-width: none; }
  article > section { margin-block: 1.5rem; }
  .myth, .urgent, .worksheet, .source-drawer { background: white; padding: 1rem; border: 1px solid black; border-radius: 0; }
  h2, h3, legend { break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  fieldset { break-inside: avoid; }
  a { color: black; }
  button { display: none; }
  .paper-entries { display: block; }
  .worksheet:has(.paper-entries) > form { display: none; }
  .paper-entries dl { display: block; }
  .paper-entries dt { font-weight: 700; }
  .paper-entries dd { margin: 0 0 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
}
