:root {
  color-scheme: light;
  --paper: #fafaf8;
  --ink: #182a44;
  --stripe-light: #d9e0e7;
  --stripe-dark: #bac8d3;
  --base: #253c55;
  --base-text: #c5d0dc;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); }
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* The original 1440 × 900 design uses three straight colour transitions. */
.home {
  position: relative;
  min-height: max(14rem, 100vh);
  min-height: max(14rem, 100dvh);
  display: grid;
  background-color: var(--paper);
  background-image: linear-gradient(
    to bottom,
    var(--paper) 0%,
    var(--paper) 76.333333%,
    var(--stripe-light) 76.333333%,
    var(--stripe-light) 77.555556%,
    var(--stripe-dark) 77.555556%,
    var(--stripe-dark) 80.555556%,
    var(--base) 80.555556%,
    var(--base) 100%
  );
}

.home-main { display: grid; place-items: center; }
.wordmark {
  width: min(70rem, max(42.2453vw, min(72vw, 24rem)));
  margin: 0;
  line-height: 0;
}
.wordmark img { display: block; width: 100%; height: auto; }

.home-footer {
  position: absolute;
  inset-inline-end: max(3.05%, 1rem, env(safe-area-inset-right));
  bottom: max(2.6%, env(safe-area-inset-bottom));
  color: var(--base-text);
}
.home-footer nav, .doc-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: clamp(1rem, 2.15vw, 1.9375rem);
}
.home-footer a, .doc-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-size: clamp(.8125rem, 1.04vw, .9375rem);
  letter-spacing: .007em;
}
.home-footer a:hover, .doc-footer a:hover,
.doc-footer a[aria-current="page"] { text-decoration: underline; }

/* Document pages share the same surfaces and a single readable text measure. */
.document {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.doc-header {
  background: var(--paper);
  border-bottom: 1px solid var(--stripe-light);
  padding: 1.25rem max(1.25rem, calc((100% - 48rem) / 2));
}
.doc-header a {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
}
.doc-header a:hover { text-decoration: underline; }
.doc-main {
  width: min(48rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding-block: clamp(1.5rem, 5vw, 4rem) clamp(3.5rem, 7vw, 6rem);
  flex: 1 0 auto;
}
.doc-main .back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .9375rem;
}
.doc-main h1, .doc-main h2, .doc-main h3 { text-wrap: pretty; }
.doc-main h1 {
  margin: .6rem 0 1.75rem;
  font-size: clamp(1.95rem, 4.6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -.035em;
  hyphens: auto;
}
.doc-main h2 {
  margin: 2rem 0 .6rem;
  font-size: clamp(1.25rem, 2.3vw, 1.5rem);
  line-height: 1.28;
  letter-spacing: -.016em;
}
.doc-main h3 { font-size: 1.1rem; line-height: 1.45; margin: 1.5rem 0 .4rem; }
.doc-main p, .doc-main address, .doc-main ul { margin: 0 0 .9rem; }
.doc-main ul { padding-inline-start: 1.35rem; }
.doc-main address { font-style: normal; }
.doc-main strong { font-weight: 700; }
.doc-main a { text-decoration-thickness: 1px; }
.doc-main a:hover { text-decoration-thickness: 2px; }
.contact-note {
  padding-inline-start: .9rem;
  border-inline-start: .2rem solid var(--stripe-dark);
}
.doc-footer {
  color: var(--base-text);
  background: var(--base);
  border-top: .4rem solid var(--stripe-dark);
  padding: 1.2rem max(1.25rem, calc((100% - 48rem) / 2));
}

@media (max-height: 24rem) {
  .home-footer { bottom: env(safe-area-inset-bottom, 0px); }
}
@media (forced-colors: active) {
  .wordmark img { forced-color-adjust: none; background: #fafaf8; }
  .doc-header { border-bottom-color: CanvasText; }
}
@media print {
  .doc-header, .doc-footer, .back { display: none !important; }
  .document, .doc-main { display: block; min-height: 0; }
  .doc-main { width: 100%; padding: 0; }
  .doc-main h2, .doc-main h3 { break-after: avoid; }
}
