/* ============================================================================
   KEYNETIQ PUBLIC FOUNDATION CSS
   Design system for the KeyNetIQ public site

   Philosophy: the specification sheet. Warm drafting-paper surfaces, slate
   bands taken from the brand base, one blue from the KeyNetIQ mark used for
   linework, emphasis and interaction. Wide, heavy headlines echo the
   wordmark; a monospaced face labels things the way a technical drawing
   does. Built for people who fit locks for a living: plain, sturdy, legible
   on a phone in daylight. Distinct from trak-public (dark, glowing) on
   purpose.
   ============================================================================ */

/* ============================================================================
   0. FONTS (self-hosted, latin subsets; see static/fonts/README.md)
   ============================================================================ */

/* One variable family for display and reading: width carries the brand
   (expanded for headlines, normal for text), weight carries hierarchy */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/static/fonts/archivo-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
}

/* ============================================================================
   1. DESIGN TOKENS
   ============================================================================ */

:root {
  /* --- Slate: the brand base, for bands, text and structure --- */
  --slate-950: #111b23;
  --slate-900: #18262f;
  --slate-800: #213340;   /* brand base */
  --slate-700: #2b4252;
  --slate-600: #3a5366;
  --slate-500: #4a5d6e;
  --slate-400: #6b7c8a;
  --slate-300: #a9bccb;
  --slate-200: #c8d3dc;
  --slate-100: #e3e9ee;

  /* --- Blue: the KeyNetIQ mark --- */
  --blue-800: #1d4f80;
  --blue-700: #245a8f;
  --blue-600: #2d6aa3;    /* text, links and buttons on light (AA) */
  --blue-500: #3e84c5;    /* brand primary: linework, large type, marks */
  --blue-400: #6aa3d8;
  --blue-300: #9cc3e8;    /* text and links on slate (AA) */
  --blue-100: #dce9f6;
  --blue-50: #eef4fb;

  /* --- Paper: the drafting sheet --- */
  --paper-50: #fbfaf7;
  --paper-100: #f5f3ee;   /* page */
  --paper-200: #ece8e0;
  --paper-300: #dcd6ca;   /* rules on paper */
  --white: #ffffff;

  /* --- Signal: used sparingly, never for text on paper --- */
  --signal-500: #e8a33a;
  --signal-100: #fbefd9;

  /* --- Status --- */
  --status-success-500: #2f7d4f;
  --status-success-bg: #e5f2ea;
  --status-danger-500: #b3361f;
  --status-danger-bg: #f8e6e1;
  --status-info-500: var(--blue-600);
  --status-info-bg: var(--blue-50);

  /* --- Semantic: text on light --- */
  --text-strong: var(--slate-900);
  --text: var(--slate-800);
  --text-muted: var(--slate-500);
  --text-subtle: var(--slate-400);   /* large text and decoration only */
  --text-inverse: var(--white);

  /* --- Semantic: text on slate --- */
  --on-dark-strong: var(--white);
  --on-dark: var(--slate-100);
  --on-dark-muted: var(--slate-300);
  --on-dark-accent: var(--blue-300);

  /* --- Semantic: surfaces --- */
  --bg-page: var(--paper-100);
  --bg-sheet: var(--white);
  --bg-sunk: var(--paper-200);
  --bg-band: var(--slate-800);
  --bg-band-deep: var(--slate-900);

  /* --- Semantic: accent --- */
  --accent: var(--blue-500);
  --accent-strong: var(--blue-600);
  --accent-deep: var(--blue-700);
  --accent-tint: var(--blue-50);

  /* --- Semantic: rules --- */
  --rule: var(--paper-300);
  --rule-strong: var(--slate-200);
  --rule-ink: var(--slate-800);
  --rule-on-dark: rgba(255, 255, 255, 0.14);
  --rule-on-dark-strong: rgba(255, 255, 255, 0.28);

  /* --- Semantic: interactive --- */
  --link: var(--blue-600);
  --link-hover: var(--blue-800);
  --field-bg: var(--white);
  --field-border: var(--slate-200);
  --field-border-hover: var(--slate-400);
  --field-border-focus: var(--blue-500);
  --focus-ring: 0 0 0 3px rgba(62, 132, 197, 0.45);

  /* --- Typography --- */
  --font-sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Width axis: the wordmark is wide, so headlines are too */
  --stretch-text: 100%;
  --stretch-heading: 108%;
  --stretch-display: 118%;

  --text-xs: 0.75rem;       /* 12px */
  --text-sm: 0.875rem;      /* 14px */
  --text-base: 1rem;        /* 16px */
  --text-md: 1.0625rem;     /* 17px */
  --text-lg: 1.1875rem;     /* 19px */
  --text-xl: 1.375rem;      /* 22px */
  --text-2xl: 1.75rem;      /* 28px */
  --text-3xl: 2.25rem;      /* 36px */
  --text-display-sm: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --text-display: clamp(2.125rem, 1.3rem + 3.6vw, 4.25rem);
  --text-display-xl: clamp(2.375rem, 1.2rem + 5vw, 5.25rem);
  --text-stat: clamp(2rem, 1.2rem + 3.4vw, 4rem);

  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-heavy: 800;

  --leading-tight: 1.04;
  --leading-snug: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* --- Spacing (4px base) --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --section-y: clamp(64px, 8vw, 120px);
  --gutter: clamp(20px, 4vw, 40px);
  --nav-height: 68px;
  --grid-cell: 24px;        /* the drafting grid; 5 cells to a major line */

  /* --- Shape: engineered, not soft --- */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-full: 9999px;
  --rule-width: 1px;
  --rule-width-strong: 1.5px;
  --tick: 12px;             /* registration mark arm length */

  /* --- Shadows: paper on paper, never glow --- */
  --shadow-sm: 0 1px 0 rgba(17, 27, 35, 0.06);
  --shadow-md: 0 1px 0 rgba(17, 27, 35, 0.04), 0 12px 24px -12px rgba(17, 27, 35, 0.18);
  --shadow-lg: 0 24px 48px -16px rgba(17, 27, 35, 0.35);

  /* --- Motion --- */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --duration-slow: 320ms;
  --duration-reveal: 600ms;
}

/* ============================================================================
   2. RESET AND BASE
   ============================================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-height) + var(--space-4));
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-stretch: var(--stretch-text);
  line-height: var(--leading-normal);
  color: var(--text);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.drawer-lock {
  overflow: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 3px;
}

::selection {
  background: var(--blue-100);
  color: var(--slate-900);
}

.site-main {
  flex: 1 0 auto;
  outline: none;
}

/* ============================================================================
   3. TYPOGRAPHY
   ============================================================================ */

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text-strong);
  font-weight: var(--font-heavy);
  font-stretch: var(--stretch-heading);
  line-height: var(--leading-snug);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h3,
h4 {
  font-weight: var(--font-bold);
  letter-spacing: -0.005em;
}

p {
  margin: 0;
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
  max-width: 60ch;
}

.text-muted {
  color: var(--text-muted);
}

/* Highlight one phrase in a headline: the brand blue, nothing else.
   Display sizes only, where #3e84c5 passes the large-text threshold. */
.text-accent {
  color: var(--accent);
}

/* Eyebrow: the sheet label above every section and page title.
   `<p class="eyebrow"><span class="eyebrow__index">02</span>Products</p>` */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}

/* With a sheet number the rule moves between number and label:
   "02 ── PRODUCTS" */
.eyebrow:has(.eyebrow__index)::before {
  display: none;
}

.eyebrow__index {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--accent-strong);
}

.eyebrow__index::after {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}

/* Mono label for specs, part references and figure captions */
.mono {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================================
   4. LAYOUT
   ============================================================================ */

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow {
  max-width: 800px;
}

.container--wide {
  max-width: 1440px;
}

.section {
  position: relative;
  padding: var(--section-y) 0;
}

.section--flush {
  padding-top: 0;
}

.section--sheet {
  background: var(--bg-sheet);
  border-top: var(--rule-width) solid var(--rule);
  border-bottom: var(--rule-width) solid var(--rule);
}

/* A slate band: the drafting grid shows faintly through it */
.section--band {
  background-color: var(--bg-band);
  background-image:
    linear-gradient(rgba(62, 132, 197, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 132, 197, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(62, 132, 197, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 132, 197, 0.045) 1px, transparent 1px);
  background-size:
    calc(var(--grid-cell) * 5) calc(var(--grid-cell) * 5),
    calc(var(--grid-cell) * 5) calc(var(--grid-cell) * 5),
    var(--grid-cell) var(--grid-cell),
    var(--grid-cell) var(--grid-cell);
  background-position: center top;
  color: var(--on-dark);
}

.section--band h1,
.section--band h2,
.section--band h3,
.section--band h4 {
  color: var(--on-dark-strong);
}

.section--band .eyebrow {
  color: var(--on-dark-muted);
}

.section--band .eyebrow__index,
.section--band .text-accent {
  color: var(--on-dark-accent);
}

.section--band .lead,
.section--band .text-muted {
  color: var(--on-dark-muted);
}

.section--band a:not(.btn) {
  color: var(--on-dark-accent);
}

.section--band a:not(.btn):hover {
  color: var(--white);
}

.section__header {
  display: grid;
  gap: var(--space-5);
  margin-bottom: clamp(32px, 5vw, 64px);
  max-width: 760px;
}

.section__header--row {
  max-width: none;
  align-items: end;
}

.section__title {
  font-size: var(--text-display-sm);
  line-height: 1.08;
  font-stretch: var(--stretch-display);
}

.section__lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
  max-width: 62ch;
}

@media (min-width: 900px) {
  .section__header--row {
    grid-template-columns: 1fr auto;
  }
}

/* ============================================================================
   5. COMPONENTS
   ============================================================================ */

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border: var(--rule-width-strong) solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  font-stretch: 104%;
  line-height: 1.1;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--duration-base) var(--ease),
    border-color var(--duration-base) var(--ease),
    color var(--duration-base) var(--ease),
    transform var(--duration-fast) var(--ease);
}

/* Long labels ("View mechanical locks and keys") may wrap on the
   narrowest phones rather than push the page sideways */
@media (max-width: 479px) {
  .btn {
    white-space: normal;
    text-align: center;
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }
}

.btn:active {
  transform: translateY(1px);
}

.btn__icon {
  flex: none;
  transition: transform var(--duration-base) var(--ease);
}

.btn:hover .btn__icon {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: inset 0 -2px 0 var(--blue-800);
}

.btn--primary:hover {
  background: var(--blue-700);
  color: var(--white);
}

.btn--secondary {
  background: transparent;
  border-color: var(--rule-ink);
  color: var(--slate-900);
}

.btn--secondary:hover {
  background: var(--slate-800);
  border-color: var(--slate-800);
  color: var(--white);
}

.btn--ghost {
  min-height: 44px;
  padding: 0 var(--space-2);
  background: transparent;
  color: var(--link);
}

.btn--ghost:hover {
  color: var(--link-hover);
}

/* On slate bands the secondary button turns light */
.section--band .btn--secondary,
.btn--on-dark {
  border-color: var(--rule-on-dark-strong);
  color: var(--white);
}

.section--band .btn--secondary:hover,
.btn--on-dark:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--slate-900);
}

.section--band .btn--ghost {
  color: var(--on-dark-accent);
}

.section--band .btn--ghost:hover {
  color: var(--white);
}

.btn--sm {
  min-height: 44px;
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
}

.btn--lg {
  min-height: 56px;
  padding: 0 var(--space-8);
  font-size: var(--text-md);
}

.btn--block {
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Tags --- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px var(--space-2);
  border: var(--rule-width) solid var(--rule-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: var(--font-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--white);
}

.tag--accent {
  border-color: var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-700);
}

/* --- Registration ticks: the drawing-sheet corner marks.
   Add `.ticks` to any positioned box; the marks sit just outside it. --- */

.ticks {
  position: relative;
}

.ticks::before,
.ticks::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  --tick-color: var(--accent);
  background:
    linear-gradient(var(--tick-color), var(--tick-color)) left top / var(--tick) 2px no-repeat,
    linear-gradient(var(--tick-color), var(--tick-color)) left top / 2px var(--tick) no-repeat,
    linear-gradient(var(--tick-color), var(--tick-color)) right bottom / var(--tick) 2px no-repeat,
    linear-gradient(var(--tick-color), var(--tick-color)) right bottom / 2px var(--tick) no-repeat;
}

.ticks::after {
  background:
    linear-gradient(var(--tick-color), var(--tick-color)) right top / var(--tick) 2px no-repeat,
    linear-gradient(var(--tick-color), var(--tick-color)) right top / 2px var(--tick) no-repeat,
    linear-gradient(var(--tick-color), var(--tick-color)) left bottom / var(--tick) 2px no-repeat,
    linear-gradient(var(--tick-color), var(--tick-color)) left bottom / 2px var(--tick) no-repeat;
}

/* --- Cards --- */

.card {
  background: var(--bg-sheet);
  border: var(--rule-width) solid var(--rule);
  border-radius: var(--radius-md);
  padding: clamp(20px, 3vw, 32px);
}

/* --- Specification list: label / value rows with a dotted leader --- */

.spec {
  margin: 0;
  display: grid;
}

.spec__row {
  display: grid;
  grid-template-columns: minmax(96px, 40%) 1fr;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: var(--rule-width) dashed var(--rule-strong);
}

.spec__row:first-child {
  border-top: var(--rule-width-strong) solid var(--rule-ink);
}

.spec__row:last-child {
  border-bottom: var(--rule-width-strong) solid var(--rule-ink);
}

.spec__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 2px;
}

.spec__value {
  margin: 0;
  font-weight: var(--font-semibold);
  color: var(--text-strong);
}

/* --- Alerts --- */

.alert {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  border: var(--rule-width) solid;
  border-left-width: 4px;
  border-radius: var(--radius-sm);
}

.alert__message {
  margin: 0;
  font-weight: var(--font-medium);
}

.alert--danger {
  background: var(--status-danger-bg);
  border-color: var(--status-danger-500);
  color: var(--status-danger-500);
}

.alert--success {
  background: var(--status-success-bg);
  border-color: var(--status-success-500);
  color: var(--status-success-500);
}

.alert--info {
  background: var(--status-info-bg);
  border-color: var(--status-info-500);
  color: var(--status-info-500);
}

/* --- Forms --- */

.form-grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .field--full {
    grid-column: 1 / -1;
  }
}

.field {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.label {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--text-strong);
}

.label--required::after {
  content: " *";
  color: var(--accent-strong);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
  border: var(--rule-width-strong) solid var(--field-border);
  border-radius: var(--radius-md);
  background: var(--field-bg);
  color: var(--text-strong);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  transition: border-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--field-border-hover);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--field-border-focus);
  box-shadow: var(--focus-ring);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--status-danger-500);
}

.textarea {
  min-height: 160px;
  resize: vertical;
}

.select {
  appearance: none;
  padding-right: var(--space-10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23213340' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
}

.help-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.field__error {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--status-danger-500);
}

.form-actions {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: var(--rule-width) dashed var(--rule-strong);
  align-items: center;
}

.form-actions__note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 44ch;
}

@media (min-width: 640px) {
  .form-actions {
    grid-template-columns: 1fr auto;
  }
}

/* Honeypot: off-screen, never display:none (some bots skip hidden fields) */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Breadcrumbs --- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin-bottom: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crumbs__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
}

.crumbs__link:hover {
  color: var(--link);
  text-decoration: underline;
}

.crumbs__sep {
  color: var(--text-subtle);
}

.crumbs__current {
  color: var(--text-strong);
}

/* --- Empty state --- */

.empty {
  padding: clamp(32px, 6vw, 64px);
  border: var(--rule-width-strong) dashed var(--rule-strong);
  border-radius: var(--radius-md);
  background: var(--paper-50);
  text-align: center;
}

.empty__title {
  font-size: var(--text-xl);
  font-weight: var(--font-heavy);
  font-stretch: var(--stretch-heading);
  color: var(--text-strong);
  margin-bottom: var(--space-2);
}

.empty__body {
  color: var(--text-muted);
}

/* --- Prose (long-form content, markdown articles) --- */

.prose {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text);
  /* Article authors paste long URLs and ids; never let one widen the page */
  overflow-wrap: anywhere;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2em;
  font-size: var(--text-2xl);
  font-stretch: var(--stretch-heading);
}

.prose h3 {
  margin-top: 1.8em;
  font-size: var(--text-xl);
}

.prose h4,
.prose h5,
.prose h6 {
  margin-top: 1.6em;
  font-size: var(--text-lg);
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose ul > li::marker {
  color: var(--accent);
}

.prose ol > li::marker {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent-strong);
}

.prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: var(--space-2) 0 var(--space-2) var(--space-5);
  border-left: 3px solid var(--accent);
  font-size: var(--text-lg);
  color: var(--text-strong);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  background: var(--paper-200);
}

.prose pre {
  overflow-x: auto;
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--slate-900);
  color: var(--slate-100);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  overflow-wrap: normal;
}

.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.prose img {
  border: var(--rule-width) solid var(--rule);
  border-radius: var(--radius-md);
}

.prose hr {
  border: 0;
  border-top: var(--rule-width) dashed var(--rule-strong);
  margin: 2.5em 0;
}

.prose table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: var(--text-sm);
  overflow-wrap: normal;
}

.prose th,
.prose td {
  padding: var(--space-2) var(--space-4);
  border-bottom: var(--rule-width) solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: var(--rule-width-strong) solid var(--rule-ink);
}

.prose .footnote-definition {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ============================================================================
   6. UTILITIES
   ============================================================================ */

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 200;
  padding: var(--space-3) var(--space-5);
  background: var(--white);
  color: var(--slate-900);
  font-weight: var(--font-bold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.skip-link:focus {
  top: var(--space-3);
}

/* Grid children refuse to shrink below one unbreakable line unless told to;
   every card that sits in a grid is listed here (the 320px gate) */
.card,
.sheet-figure,
.family-row,
.family-row__body,
.plate__legend,
.legend__item,
.catalogue__body,
.pano,
.gallery__item,
.benefit,
.feature,
.variant,
.sector,
.step,
.article-card,
.category-card,
.field,
.spec-card,
.faq__item,
.title-block__cell,
.contact-aside__block {
  min-width: 0;
}

/* ============================================================================
   7. MOTION
   ============================================================================ */

/* Reveal: content is only hidden once reveal.js has confirmed it will show it
   again (the js-reveal class), so a script failure never blanks the page */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--duration-reveal) var(--ease-out),
    transform var(--duration-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
