/* SurveyStream typography v1.0.0
 * Scale: 1.200 minor third, 16px base. Leading snapped to a 4px grid.
 * Tracking is systematic: 0.096398 − 0.033684·ln(px), clamped by the table below.
 * Fallback size-adjust values are measured, not estimated — see TYPOGRAPHY.md §5.
 */

@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400..700&family=Inter:opsz,wght@14..32,400..700&family=JetBrains+Mono:wght@400..600&display=swap");

:root {
  --ss-font-display: "Archivo", "Archivo Fallback", "Helvetica Neue", "Arial Nova", Helvetica, Arial, system-ui, sans-serif;
  --ss-font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ss-font-mono: "JetBrains Mono", "JBM Fallback", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---- metric-matched fallbacks: kill the swap reflow ----
   size-adjust = webfont x-height / fallback x-height, both measured from the
   binaries. Without these the page reflows when the webfont lands. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Helvetica Neue"), local("Helvetica"), local("Arial");
  size-adjust: 105.6%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Archivo Fallback";
  src: local("Helvetica Neue"), local("Helvetica"), local("Arial");
  size-adjust: 101.7%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "JBM Fallback";
  src: local("Menlo"), local("SF Mono"), local("Consolas");
  size-adjust: 100.6%;
  ascent-override: 102%;
  descent-override: 30%;
  line-gap-override: 0%;
}

/* ---- the scale ---- */
.ss-caption {
  font-family: var(--ss-font-body);
  font-size: 0.8125rem;          /* 13px */
  line-height: 20px;          /* 1.538 */
  font-weight: 500;
  letter-spacing: 0.0100em;
}

.ss-body {
  font-family: var(--ss-font-body);
  font-size: 1rem;          /* 16px */
  line-height: 24px;          /* 1.5 */
  font-weight: 400;
  letter-spacing: 0.0030em;
}

.ss-body-lg {
  font-family: var(--ss-font-body);
  font-size: 1.1875rem;          /* 19px */
  line-height: 28px;          /* 1.474 */
  font-weight: 400;
  letter-spacing: -0.0028em;
}

.ss-title {
  font-family: var(--ss-font-body);
  font-size: 1.4375rem;          /* 23px */
  line-height: 32px;          /* 1.391 */
  font-weight: 600;
  letter-spacing: -0.0092em;
}

.ss-h3 {
  font-family: var(--ss-font-display);
  font-size: 1.75rem;          /* 28px */
  line-height: 36px;          /* 1.286 */
  font-weight: 600;
  letter-spacing: -0.0158em;
}

.ss-h2 {
  font-family: var(--ss-font-display);
  font-size: 2.0625rem;          /* 33px */
  line-height: 40px;          /* 1.212 */
  font-weight: 600;
  letter-spacing: -0.0214em;
}

.ss-h1 {
  font-family: var(--ss-font-display);
  font-size: 2.5rem;          /* 40px */
  line-height: 44px;          /* 1.1 */
  font-weight: 700;
  letter-spacing: -0.0279em;
}

.ss-display {
  font-family: var(--ss-font-display);
  font-size: 3rem;          /* 48px */
  line-height: 52px;          /* 1.083 */
  font-weight: 700;
  letter-spacing: -0.0340em;
}

/* ---- off-scale exceptions. Use deliberately, not by default. ---- */
.ss-body-dense {
  font-family: var(--ss-font-body);
  font-size: 0.875rem;          /* 14px */
  line-height: 20px;          /* 1.429 */
  font-weight: 400;
  letter-spacing: 0.0058em;
}

.ss-display-xl {
  font-family: var(--ss-font-display);
  font-size: 4rem;          /* 64px */
  line-height: 68px;          /* 1.063 */
  font-weight: 700;
  letter-spacing: -0.0392em;
}

/* ---- numerals ---- */
/* Money. Slashed zero is OFF: a slash inside $1,024.00 reads as a correction mark. */
.ss-currency {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1, "zero" 0;
}

/* Completion and quota. Reserve the width of "100%" so a filling bar never reflows. */
.ss-percent {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  min-width: 4ch;
  text-align: right;
  display: inline-block;
}

/* Telemetry: IDs, hashes, ISO-8601. Slashed zero ON, contextual alternates OFF. */
.ss-telemetry {
  font-family: var(--ss-font-mono);
  font-variant-numeric: slashed-zero;
  font-feature-settings: "zero" 1, "calt" 0;
  letter-spacing: 0;
}

/* ---- the wordmark ---- */
/* Medial capital is structural. Never uppercase it, never let it break. */
.ss-wordmark {
  font-family: var(--ss-font-display);
  font-weight: 700;
  letter-spacing: -0.04em;   /* tighter than the scale: the medial S opens an optical gap */
  font-variation-settings: "wdth" 112;
  text-transform: none !important;
  hyphens: none;
  white-space: nowrap;
}
.ss-wordmark > .lede { color: var(--ss-text-primary); }
.ss-wordmark > .flow { color: var(--ss-interactive); }

/* The brand name inside running copy or an uppercase context stays sentence case. */
.ss-brand {
  text-transform: none !important;
  hyphens: none;
  white-space: nowrap;
}

/* ---- tables ---- */
.ss-table td.ss-num,
.ss-table th.ss-num { text-align: right; font-variant-numeric: tabular-nums; }

@media print {
  /* Static instances only — some RIPs mishandle variable axes. */
  :root {
    --ss-font-body: "Inter Text", "Inter", Georgia, serif;
  }
  .ss-caption { font-size: 8pt; }
  .ss-body { font-size: 10pt; line-height: 14pt; }
}
