/* Base: reset, type, buttons, header, section headers, the page frame and section seams. */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--steel);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--ballpoint); color: var(--copy); }

:focus-visible {
  outline: 2px solid var(--ballpoint);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--copy);
}
.skip-link:focus { top: 12px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Type roles ---------- */

.eyebrow,
.sec-index,
.mono {
  font-family: var(--font-data);
  font-variation-settings: "wdth" 85;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.eyebrow { color: var(--print); }

.display {
  font-family: var(--font-headline);
  font-weight: 800;
  font-variation-settings: "wdth" 72;
  line-height: 0.98;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.text-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--ballpoint); }

/* ---------- Buttons: pressed like a rubber stamp ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 3px;
  font: inherit;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 90ms var(--ease-press), box-shadow 150ms ease;
}
.btn-small { min-height: 40px; padding: 0 14px; font-size: 0.9375rem; }

.btn-solid {
  background: var(--ink);
  color: var(--copy);
  border: 1.5px solid var(--ink);
  box-shadow: 0 3px 0 -1px rgba(27, 28, 30, 0.35);
}
.btn-solid:hover { background: var(--ballpoint); border-color: var(--ballpoint); box-shadow: 0 3px 0 -1px rgba(44, 62, 158, 0.45); }
.btn-solid:active { transform: translateY(2px) scale(0.985); box-shadow: 0 1px 0 -1px rgba(44, 62, 158, 0.45); }

.btn-line { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--copy); }
.btn-line:active { transform: translateY(1px) scale(0.985); }

.btn:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
.btn-line:disabled:hover { background: transparent; color: var(--ink); }
.btn-solid:disabled:hover { background: var(--ink); border-color: var(--ink); }

.btn .arrow { display: inline-block; transition: transform 200ms var(--ease-out); }
.btn:hover .arrow { transform: translateY(2px); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

/* ---------- Header ---------- */

.top { position: relative; z-index: 5; border-bottom: 1px solid var(--steel-line); }

.top-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 20px;
}

.wordmark { flex: none; display: inline-flex; border-radius: 2px; }
.wordmark img { width: auto; height: 22px; }

.status {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.status-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--print);
}

.top-links { display: none; margin-left: auto; gap: 26px; }
.top-links a { color: var(--ink-soft); font-size: 0.9375rem; text-decoration: none; }
.top-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.top-inner > .btn { margin-left: auto; }

@media (max-width: 359px) {
  .wordmark img { height: 20px; }
  .top-inner { gap: 12px; }
  .top-inner > .btn { padding: 0 12px; white-space: nowrap; }
}
@media (min-width: 720px) {
  .wordmark img { height: 26px; }
  .status { display: inline-flex; }
}
@media (min-width: 1024px) {
  .top-links { display: flex; }
  .top-inner > .btn { margin-left: 8px; }
}

/* ---------- Section headers: every section is a numbered field on the same form ---------- */

.sec-head { max-width: 760px; }
.sec-index { color: var(--ink-mute); }
.sec-index span { color: var(--print); font-weight: 600; }
.sec-head .eyebrow { margin-top: 6px; }
.sec-title {
  margin-top: 14px;
  font-family: var(--font-headline);
  font-weight: 800;
  font-variation-settings: "wdth" 74;
  font-size: clamp(2.125rem, 1.25rem + 2.6vw, 3.625rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.sec-intro { margin-top: 18px; max-width: 58ch; font-size: 1.125rem; color: var(--ink-soft); }
.sec-intro + .sec-intro { margin-top: 12px; }
.sec-strong { margin-top: 16px; max-width: 52ch; font-size: 1.1875rem; font-weight: 650; line-height: 1.4; }

/* ---------- Page frame (wide screens): metadata along the left edge, like a printed form ---------- */

.edge { display: none; }

@media (min-width: 1360px) {
  .edge {
    position: fixed;
    z-index: 4;
    top: 50%;
    display: block;
    font-family: var(--font-data);
    font-variation-settings: "wdth" 80;
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-mute);
    white-space: nowrap;
    pointer-events: none;
  }
  .edge-left { left: 14px; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; }
}

/* ---------- Seams between sections ---------- */

/* A torn perforation: the next section is the next sheet */
.seam-tear {
  position: relative;
  height: 28px;
}
.seam-tear::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 13px;
  height: 7px;
  background: radial-gradient(circle 3px at 7px 3.5px, var(--steel-dark) 96%, transparent) 0 0 / 14px 7px repeat-x;
}
.seam-tear span {
  position: absolute;
  top: 0;
  right: var(--gutter);
  padding: 0 8px;
  background: var(--steel);
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

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