/*
 * base.css: self-hosted fonts, reset, typography and shared utilities (mockup look).
 * Load order: theme.css, base.css, components.css, pages.css.
 *
 *   .shell / .container  centred page width (max 1500px, 28px side padding; 16px on a phone)
 *   .mono / .caps        utility classes
 *   .label               small letterspaced mono caps label
 *   .display             heavy serif caps heading
 *   .link-arrow          underlined mono caps link; append " →" in the markup text
 *   .section-label       ruled section heading used on inner pages
 *   .visually-hidden     screen-reader-only text
 * Fonts: Source Serif 4 (300/700/900) and IBM Plex Mono (400/500/600), woff2 in ../fonts,
 * fetched by scripts/fetch-fonts.mjs. Nothing is requested from another origin.
 */

@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 300 400; font-display: swap; src: url('../fonts/source-serif-4-300.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/source-serif-4-700.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 900; font-display: swap; src: url('../fonts/source-serif-4-900.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-mono-600.woff2') format('woff2'); }

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 900; line-height: .98; margin: 0 0 var(--sp-4); text-transform: uppercase; letter-spacing: -.02em; }
h1 { font-size: clamp(40px, 6vw, 76px); letter-spacing: -.035em; }
h2 { font-size: 24px; }
h3 { font-size: 22px; }

p { margin: 0 0 var(--sp-4); line-height: 1.55; }
img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
button, a { cursor: pointer; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--crimson); outline-offset: 3px; }
/* Only text without its own font-family attribute: a CSS rule would override the SVG attribute (gauge value). */
svg text:not([font-family]) { font-family: var(--font-mono); }

/* One page column: content is capped at --col (1360px) and centred; 28px side padding sits outside it. */
.shell, .container { width: 100%; max-width: calc(var(--col) + 56px); margin-left: auto; margin-right: auto; padding-left: 28px; padding-right: 28px; }

.mono { font-family: var(--font-mono); }
.caps { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; }

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
}

.display { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; }

.link-arrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding: 3px 0;
  white-space: nowrap;
}
.link-arrow:hover { background: var(--yellow); }

.section-label {
  display: block;
  font: 900 20px/1 var(--font-display);
  letter-spacing: -.01em;
  text-transform: uppercase;
  border-top: 2px solid var(--ink);
  padding: 16px 0;
  margin: 0;
}

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

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

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .masthead, .tagstrip, .site-footer, .signup { display: none !important; }
  .panel, .gauge-card { background: #fff !important; color: #000 !important; border: 1px solid #000; }
  a { text-decoration: underline; }
}

@media (max-width: 650px) {
  body { font-size: 16px; }
  .shell, .container { padding: 0 16px; }
}
