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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: var(--focus); outline-offset: 2px; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; }
h1 { font-size: var(--t-34); letter-spacing: -0.02em; }
h2 { font-size: var(--t-18); letter-spacing: -0.01em; }
h3 { font-size: var(--t-15); }
p { margin: 0; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-3); }
.num { font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }

/* Technical API key: always in mono, below or next to the label. */
.key {
  font-family: var(--font-mono);
  font-size: var(--t-key);
  font-weight: 400;
  color: var(--text-key);
  letter-spacing: 0;
}

/* Screen readers only. */
.hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Skip to content: invisible until it gets focus. */
.skip {
  position: absolute;
  left: -9999px;
  top: var(--e-4);
  z-index: 30;
  background: var(--white);
  color: var(--ink);
  padding: var(--e-2) var(--e-3);
  border: 2px solid var(--accent);
  font-weight: 600;
}
.skip:focus { left: var(--e-4); }

/* Minimal bar (pages without navigation: home, 404). */
.bar {
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 0 var(--e-6);
  border-bottom: 1px solid var(--line);
}
.bar__brand { display: inline-flex; padding: var(--e-2) 0; flex: none; }
.bar__brand img { display: block; height: 18px; width: auto; }

main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--e-7) var(--e-6);
}
main:focus { outline: none; }

.eyebrow {
  margin: 0 0 var(--e-3);
  font-size: var(--t-12);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.cover { max-width: 760px; }
.cover h1 {
  font-size: clamp(2rem, 1.4rem + 2.5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.cover__text {
  margin: var(--e-5) 0 0;
  font-size: var(--t-18);
  color: var(--text-2);
}

/* Page header: title, context and tools, with an ink rule. */
.head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--e-4);
  padding-bottom: var(--e-5);
  border-bottom: 1px solid var(--ink);
}
.head__context { font-size: var(--t-14); color: var(--text-3); }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--e-2) var(--e-4);
  padding: var(--e-4) var(--e-6);
  border-top: 1px solid var(--line);
  font-size: var(--t-13);
  color: var(--text-3);
}

@media (max-width: 600px) {
  .bar, .footer { padding-left: var(--e-4); padding-right: var(--e-4); }
  main { padding: var(--e-6) var(--e-4); }
}

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