@font-face {
  font-family: "DM Sans";
  src: url("./dm-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("./bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}

:root {
  --petrol: #15363d;
  --teal: #126458;
  --mint: #b7dcca;
  --chalk: #f6f3ea;
  --surface: #edf5ef;
  --border: #dce3dd;
  color: var(--petrol);
  background: var(--chalk);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.6;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--teal); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .15em; }
a:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; border-radius: 3px; }
h1, h2, h3 {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: anywhere;
}
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(1.65rem, 4vw, 2.45rem); line-height: 1.12; letter-spacing: -.04em; }
h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -.015em; }
p + p { margin-top: .75rem; }
li + li { margin-top: .38rem; }
ul, ol { margin: .65rem 0 0; padding-left: 1.35rem; }
h2 + p, h3 + p { margin-top: .65rem; }
:target { scroll-margin-top: 1.25rem; }

.skip-link {
  position: fixed;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  transform: translateY(-160%);
  background: white;
  padding: .6rem .85rem;
}
.skip-link:focus { transform: none; }

.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }
.site-header { background: white; border-bottom: 1px solid var(--border); }
.site-header .wrap, .site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.25rem;
  padding-block: .65rem;
}
.wordmark {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: .6rem;
  color: var(--petrol);
  text-decoration: none;
  font: 700 1.25rem/1 "Bricolage Grotesque", system-ui, sans-serif;
  letter-spacing: -.04em;
}
.wordmark span span { color: var(--teal); }
.site-links { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.site-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-weight: 600;
  text-decoration: none;
}
.site-links a[aria-current], .site-links a:hover { text-decoration: underline; }

.hero { background: var(--petrol); color: var(--chalk); padding-block: clamp(2.4rem, 7vw, 5.2rem); }
.hero h1 {
  font-size: clamp(2rem, 9vw, 5.4rem);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.06em;
}
.hero p { max-width: 62ch; margin-top: 1rem; font-size: clamp(1rem, 2vw, 1.2rem); }
.hero a { color: var(--mint); }
.hero a:focus-visible { outline-color: var(--mint); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 2.5rem);
  align-items: start;
  padding-block: 1.5rem 3.5rem;
}
.contents, .chapter, .note { background: white; border: 1px solid var(--border); border-radius: 1rem; }
.contents { padding: .8rem 1rem; }
.contents h2 { padding: .4rem 0; font-size: 1.1rem; }
.contents ul { padding: 0; margin: 0; list-style: none; }
.contents li + li { margin-top: 0; }
.contents a { display: block; min-height: 44px; padding: .52rem 0; }
.chapters { display: grid; gap: 1rem; min-width: 0; }
.chapter { padding: clamp(1rem, 4vw, 2rem); }
.chapter article { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.chapter article:first-of-type { margin-top: .9rem; }
.chapter a { overflow-wrap: anywhere; }
.note { padding: 1rem 1.2rem; background: var(--surface); }

.feature-list { margin: .8rem 0 0; }
.feature-list > div { padding: .65rem 0; border-top: 1px solid var(--border); }
.feature-list dt { font-weight: 750; }
.feature-list dd { margin: .15rem 0 0; }
.role-grid { display: grid; gap: .7rem; margin-top: 1rem; }
.role-grid div { padding: .85rem; border-radius: .7rem; background: var(--surface); }
.role-grid p { margin-top: .25rem; }
.role-grid + p { margin-top: .85rem; }
.site-footer { background: white; border-top: 1px solid var(--border); }

@media (min-width: 49rem) {
  .wrap { width: min(72rem, 100% - 3rem); }
  .layout { grid-template-columns: 13.5rem minmax(0, 1fr); }
  .contents { position: sticky; top: 1.25rem; max-height: calc(100vh - 2.5rem); overflow: auto; }
  .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-list > div { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(0, 2fr); gap: 1rem; }
  .feature-list dd { margin: 0; }
}

@media print {
  :root, .hero, .chapter, .note { color: black; background: white; }
  .site-header, .site-footer, .contents { display: none; }
  .wrap { width: 100%; }
  .hero, .layout, .chapter { display: block; padding: .5rem 0; }
  .chapter, .note { border: 0; }
  h2, h3 { break-after: avoid; }
}
