/* Means+Measures — semantic typography, release 2.0.0 (base: Identity Standard v1.5).
   Standalone entry point. Assign a role to the text's function, not its tag.
   Every role carries a fluid default size and line height (overridable); display,
   institutional and action carry weight 600, body 500. No tracking, casing, heading
   ladder or layout is imposed. */
@import url("./means-measures.fonts.css");

:root {
  --mm-font-display: "Spectral", "Montserrat", serif;
  --mm-font-institutional: "Spectral SC", "Montserrat", serif;
  --mm-font-body: "Spectral", "Source Serif 4", "Montserrat", serif;
  --mm-font-editorial: "Spectral SC", "Montserrat", serif;
  --mm-font-ui: "Metrophobic", "Montserrat", sans-serif;
  --mm-font-data: "Iosevka", monospace;
  --mm-font-action: "Pompiere", "Metrophobic", "Montserrat", sans-serif;
  --mm-font-detail: var(--mm-font-action);
  --mm-font-specialty: "Montserrat", sans-serif;
  /* Source Serif 4 is an optional locally supplied alternate, not a ninth core face. */
  --mm-font-longform-alternate: "Source Serif 4", "Spectral", serif;

  /* Fluid sizes: linear from a 650px to a 1280px viewport, clamped at both ends.
     rem terms keep browser text size and zoom effective. */
  --mm-size-display: clamp(2.5rem, 0.566rem + 4.762vw, 4.375rem); /* 40px → 70px */
  --mm-size-institutional: clamp(1.125rem, 0.867rem + 0.635vw, 1.375rem); /* 18px → 22px */
  --mm-size-body: clamp(1.062rem, 0.869rem + 0.476vw, 1.25rem); /* 17px → 20px */
  --mm-size-editorial: clamp(1.125rem, 0.867rem + 0.635vw, 1.375rem); /* 18px → 22px */
  --mm-size-ui: clamp(0.938rem, 0.873rem + 0.159vw, 1rem); /* 15px → 16px */
  --mm-size-data: clamp(1.062rem, 0.869rem + 0.476vw, 1.25rem); /* 17px → 20px */
  --mm-size-action: clamp(1.25rem, 0.992rem + 0.635vw, 1.5rem); /* 20px → 24px */
  --mm-size-specialty: clamp(1.062rem, 0.869rem + 0.476vw, 1.25rem); /* 17px → 20px */
  --mm-size-detail: clamp(1.062rem, 0.869rem + 0.476vw, 1.25rem); /* 17px → 20px */
  --mm-size-longform-alternate: var(--mm-size-body);
}

:where([data-mm-type], .mm-type-display, .mm-type-institutional,
  .mm-type-body, .mm-type-editorial, .mm-type-ui, .mm-type-data,
  .mm-type-action, .mm-type-detail, .mm-type-specialty, .mm-type-longform-alternate) {
  font-synthesis: none;
  font-optical-sizing: auto;
}

/* Spectral SemiBold declares. Spectral SC SemiBold supplies compact institutional hierarchy.
   These two roles carry weight 600. Zero-specificity :where() keeps
   every role's size and weight overridable by the consuming layout. */
:where(.mm-type-display, [data-mm-type="display"]) { font-family: var(--mm-font-display); font-weight: 600; font-size: var(--mm-size-display); line-height: 1.07; }
:where(.mm-type-institutional, [data-mm-type="institutional"]) { font-family: var(--mm-font-institutional); font-weight: 600; font-size: var(--mm-size-institutional); line-height: 1.4; }

/* Spectral explains. Its SC face organizes editorial text. */
:where(.mm-type-body, [data-mm-type="body"]) { font-family: var(--mm-font-body); font-weight: 500; font-size: var(--mm-size-body); line-height: 1.3; }
:where(.mm-type-editorial, [data-mm-type="editorial"]) { font-family: var(--mm-font-editorial); font-size: var(--mm-size-editorial); line-height: 1.4; }
:where(.mm-type-longform-alternate, [data-mm-type="longform-alternate"]) { font-family: var(--mm-font-longform-alternate); font-weight: 500; font-size: var(--mm-size-longform-alternate); line-height: 1.3; }

/* Metrophobic operates. Interface prose may still be Spectral. */
:where(.mm-type-ui, [data-mm-type="ui"]) { font-family: var(--mm-font-ui); font-size: var(--mm-size-ui); line-height: 1.4; }

/* Iosevka measures: short exact values, identifiers, code and technical notation. */
:where(.mm-type-data, [data-mm-type="data"]) { font-family: var(--mm-font-data); font-size: var(--mm-size-data); line-height: 1.4; }

/* Pompiere acts and annotates: short actions and human/contextual details.
   Pompiere ships regular only; action's 600 is a browser-synthesized bold, so weight
   synthesis is re-enabled for this role alone. */
:where(.mm-type-action, [data-mm-type="action"]) { font-family: var(--mm-font-action); font-weight: 600; font-synthesis: weight; font-size: var(--mm-size-action); line-height: 1.4; }
:where(.mm-type-detail, [data-mm-type="detail"]) { font-family: var(--mm-font-detail); font-size: var(--mm-size-detail); line-height: 1.4; }

/* Montserrat catches exceptions, including unsupported glyphs in other roles. */
:where(.mm-type-specialty, [data-mm-type="specialty"]) { font-family: var(--mm-font-specialty); font-size: var(--mm-size-specialty); line-height: 1.4; }
