/*
Theme Name: Miles Chemical Standard
Theme URI: https://www.mileschemical.com
Author: Miles Chemical Company
Author URI: https://www.mileschemical.com
Description: Editorial, credibility-led WordPress theme for Miles Chemical Company — navy, paper, and seal bronze, with Source Serif 4 display over Inter. Built around audit-readiness: certifications, registrations, and document access are first-class, alongside capabilities, the product line, industries, and contact.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: Proprietary
Text Domain: miles-standard
Tags: business, industrial, light, editorial, custom-menu, custom-logo, translation-ready
*/

/* ─── Design Tokens ────────────────────────────────── */
:root {
  /* Documented palette */
  --navy:   #15202E;
  --paper:  #FBFAF7;
  --seal:   #8A6B2E;

  /* Derived */
  --navy-2:     #1D2A3A;
  --navy-3:     #2A3A4D;
  --ink:        #15202E;
  --ink-2:      #45535F;
  --ink-3:      #77828D;
  --ink-4:      #9AA3AC;
  --white:      #FFFFFF;
  --paper-2:    #F5F3EE;
  --paper-3:    #EFECE5;

  /* Hairlines — warm, because the paper is warm */
  --line:       #E3DFD6;
  --line-2:     #CFC9BC;
  --line-navy:  #2C3A4C;

  /* Interactive */
  --link:       #3F6089;
  --link-dark:  #2C4666;
  --seal-2:     #A8853F;
  --seal-tint:  #F6F1E5;

  /* Status */
  --good:       #2F6B4A;
  --warn:       #9A6316;
  --bad:        #96342A;

  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --max-w:  1120px;
  --pad:    88px;
  --pad-sm: 52px;
}

/* ─── Reset ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'kern' 1;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

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

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 999;
  width: auto; height: auto;
  clip: auto;
  padding: 12px 22px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}

/* ─── Layout ───────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

/* Every band is separated by a full-bleed hairline. That rule is the
   structural signature of this design — sections are divided by a line,
   not by a colour change. */
.band {
  border-top: 1px solid var(--line);
  padding: var(--pad) 0;
}
.band--sm    { padding: var(--pad-sm) 0; }
.band--flush { padding: 0; }
.band--open  { border-top: none; }
.band--tint  { background: var(--paper-2); }
.band--navy  { background: var(--navy); color: var(--paper); border-top-color: var(--line-navy); }

/* ─── Typography ────────────────────────────────────── */
.display,
h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.018em;
  line-height: 1.16;
}

.display {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.14;
  letter-spacing: -0.022em;
}

h1 { font-size: clamp(32px, 4.2vw, 46px); }
h2 { font-size: clamp(25px, 3vw, 34px); }

h3, h4 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.008em;
  line-height: 1.35;
}
h3 { font-size: 17.5px; }
h4 { font-size: 15px; }

p { max-width: 68ch; }

.lede {
  font-size: 19px;
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 46ch;
}

/* Small letterspaced label. Tabular figures keep the numeric labels
   ("CERT. CURRENT", "EST. 1996") aligned without a second font family. */
.label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--seal);
}

.serif  { font-family: var(--font-display); }
.text-ink   { color: var(--ink); }
.text-mid   { color: var(--ink-2); }
.text-dim   { color: var(--ink-3); }
.text-seal  { color: var(--seal); }

a.link {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: rgba(63, 96, 137, 0.34);
  transition: text-decoration-color 0.15s, color 0.15s;
}
a.link:hover { color: var(--link-dark); text-decoration-color: currentColor; }

/* ─── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  padding: 12px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.3;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
  white-space: nowrap;
}

.btn-navy    { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-3); border-color: var(--navy-3); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--navy); }

.btn-seal    { background: var(--seal); color: var(--white); border-color: var(--seal); }
.btn-seal:hover { background: var(--seal-2); border-color: var(--seal-2); }

.btn-onnavy  { background: transparent; color: var(--paper); border-color: rgba(255,255,255,0.28); }
.btn-onnavy:hover { background: rgba(255,255,255,0.08); border-color: var(--paper); }

.btn-sm    { padding: 9px 17px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* Quiet text link with an arrow — used all over this design */
.go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--link);
  transition: gap 0.15s, color 0.15s;
}
.go:hover { gap: 11px; color: var(--link-dark); }
.go::after { content: '\2192'; }

/* ─── Header ────────────────────────────────────────── */
#site-header {
  background: var(--navy);
  color: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 34px;
  min-height: 66px;
}

.brand {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.015em;
  color: var(--white);
  white-space: nowrap;
}
.brand img { max-height: 38px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav > li { position: relative; }

.main-nav > li > a {
  display: inline-block;
  font-size: 14.5px;
  font-weight: 400;
  color: #A6BAD4;
  padding: 22px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.main-nav > li > a:hover { color: var(--white); }
.main-nav > li.current-menu-item > a,
.main-nav > li.current-menu-ancestor > a,
.main-nav > li.current-page-ancestor > a {
  color: var(--white);
  border-bottom-color: var(--seal);
}

.main-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 258px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(21, 32, 46, 0.16);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
}
.main-nav > li:hover > .sub-menu,
.main-nav > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.main-nav .sub-menu a {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--ink-2);
  transition: background 0.12s, color 0.12s;
}
.main-nav .sub-menu a:hover { background: var(--paper-2); color: var(--ink); }

.header-spacer { flex: 1; }

.header-est {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: #7A8798;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.24);
  cursor: pointer;
  padding: 9px 10px;
  color: var(--paper);
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  margin: 4px 0;
  transition: transform 0.2s, opacity 0.2s;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ─── Page opening ──────────────────────────────────── */
.opening {
  padding: 74px 0 66px;
}
.opening .eyebrow { margin-bottom: 22px; }
.opening h1, .opening .display { margin-bottom: 26px; max-width: 17ch; }
.opening .lede { max-width: 52ch; }

.opening--wide h1, .opening--wide .display { max-width: 22ch; }

.breadcrumb {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--link); }
.breadcrumb .sep { color: var(--line-2); margin: 0 8px; }

/* ─── Credential cards ──────────────────────────────── */
/* Four across, divided by vertical hairlines, sitting between two
   full-bleed horizontal rules. No outer border — the rules do the work. */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cred {
  display: flex;
  flex-direction: column;
  padding: 34px 30px 26px;
  border-left: 1px solid var(--line);
}
.cred:first-child { border-left: none; }

.seal-badge {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid var(--seal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--seal);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.seal-badge--filled { background: var(--seal-tint); }

.cred h3 { margin-bottom: 8px; }

.cred p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 22px;
}

.cred-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.cred-foot .status { color: var(--ink-3); }
.cred-foot a.doc {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--seal);
  transition: color 0.15s;
}
.cred-foot a.doc:hover { color: var(--navy); }

/* ─── Stat row ──────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 40px 30px 42px;
}
.stat + .stat { border-left: 1px solid transparent; }

.stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.45;
}

/* ─── Pull quote ────────────────────────────────────── */
.quote {
  padding: 52px 0 56px;
}
.quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.5;
  color: var(--ink);
  max-width: 34ch;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.quote cite {
  display: block;
  font-style: normal;
  font-size: 14px;
  color: var(--ink-3);
}
.quote cite .named { color: var(--ink-4); }

/* ─── Editorial rows (list of links with rules) ─────── */
.rows { border-top: 1px solid var(--line); }

.row-item {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) auto;
  gap: 32px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.14s;
}
a.row-item:hover { background: var(--paper-2); }
a.row-item:hover .row-title { color: var(--link); }

.row-item .row-kicker { color: var(--ink-3); padding-top: 4px; }
.row-title { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.row-desc  { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; max-width: 62ch; }
.row-item .row-action { color: var(--link); font-size: 13.5px; white-space: nowrap; }

/* Compact variant for document lists */
.row-item--tight {
  grid-template-columns: minmax(0, 1fr) 170px auto;
  gap: 24px;
  padding: 18px 0;
  align-items: center;
}
.row-item--tight .row-title { font-size: 16px; margin-bottom: 2px; }
.row-item--tight .row-meta { font-variant-numeric: tabular-nums; }

/* ─── Cards ─────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }

/* The 1px gap over a line-coloured background draws the hairline grid. */
.grid-2 > *, .grid-3 > *, .grid-4 > * { background: var(--paper); }
.band--tint .grid-2 > *, .band--tint .grid-3 > *, .band--tint .grid-4 > * { background: var(--paper-2); }

.tile {
  display: flex;
  flex-direction: column;
  padding: 30px 28px 32px;
  transition: background 0.14s;
}
a.tile:hover { background: var(--white); }
a.tile:hover .tile-title { color: var(--link); }

.tile .eyebrow { margin-bottom: 16px; }
.tile-title { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 9px; }
.tile p { font-size: 14.5px; line-height: 1.62; color: var(--ink-2); }
.tile-foot {
  margin-top: auto;
  padding-top: 20px;
  color: var(--ink-3);
}

/* Loose card without the hairline grid */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 28px;
}
.panel h3 { margin-bottom: 10px; }
.panel p  { font-size: 14.5px; color: var(--ink-2); line-height: 1.62; }

.panel--seal { background: var(--seal-tint); border-color: #E5DAC2; }
.panel--navy { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.panel--navy h3, .panel--navy h4 { color: var(--white); }
.panel--navy p { color: #B9C4D2; }

/* ─── Section heads ─────────────────────────────────── */
.sec-head { margin-bottom: 40px; max-width: 60ch; }
.sec-head .eyebrow { margin-bottom: 16px; }
.sec-head h2 { margin-bottom: 14px; }
.sec-head p { font-size: 17px; color: var(--ink-2); }

.head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.head-row .sec-head { margin-bottom: 0; }

/* Two-column editorial split: sticky label left, content right */
.split {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.split-label { position: sticky; top: 92px; }
.split-label .eyebrow { margin-bottom: 12px; }
.split-label p { font-size: 13.5px; color: var(--ink-3); line-height: 1.6; }

.split-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 56px;
  align-items: start;
}
.aside { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 18px; }

/* ─── Prose ─────────────────────────────────────────── */
.prose { font-size: 17px; line-height: 1.76; color: var(--ink-2); max-width: 66ch; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin: 44px 0 16px; font-size: clamp(23px, 2.6vw, 29px); }
.prose h3 { margin: 32px 0 10px; font-size: 17.5px; }
.prose p  { margin-bottom: 19px; }
.prose a  { color: var(--link); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(63,96,137,0.34); }
.prose a:hover { color: var(--link-dark); text-decoration-color: currentColor; }
.prose strong { color: var(--ink); font-weight: 600; }

.prose ul { margin: 0 0 22px; }
.prose ul li { position: relative; padding: 6px 0 6px 24px; font-size: 16.5px; }
.prose ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 17px;
  width: 6px;
  height: 1px;
  background: var(--seal);
}

.prose ol { margin: 0 0 22px; padding-left: 22px; }
.prose ol li { margin-bottom: 9px; font-size: 16.5px; }

.prose blockquote {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
  border-left: 2px solid var(--seal);
  padding-left: 24px;
  margin: 30px 0;
}

.prose table { width: 100%; border-collapse: collapse; margin-bottom: 26px; font-size: 15.5px; }
.prose th, .prose td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); }
.prose thead th {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}

/* ─── Data table ────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.dtable { width: 100%; border-collapse: collapse; font-size: 15px; }

.dtable thead th {
  text-align: left;
  padding: 0 20px 12px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.dtable tbody td {
  padding: 17px 20px 17px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
  color: var(--ink-2);
}
.dtable tbody tr:hover { background: var(--paper-2); }
.dtable td:last-child, .dtable th:last-child { padding-right: 0; text-align: right; }

.d-name { font-weight: 600; color: var(--ink); font-size: 15.5px; }
a.d-name:hover { color: var(--link); }
.d-sub  { display: block; font-size: 13px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.d-num  { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
.d-packs { font-size: 14px; line-height: 1.5; }
.d-packs .sep { color: var(--line-2); margin: 0 3px; }

.doc-link {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--seal);
  white-space: nowrap;
}
.doc-link:hover { color: var(--navy); }

.empty {
  padding: 56px 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 16px;
}
.empty strong { display: block; color: var(--ink); font-size: 19px; margin-bottom: 8px; font-family: var(--font-display); font-weight: 600; }

/* ─── Spec list ─────────────────────────────────────── */
.spec { border-top: 1px solid var(--line); }
.spec-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}
.spec-row dt { color: var(--ink-3); }
.spec-row dd { color: var(--ink); }
.spec-row dd.num { font-variant-numeric: tabular-nums; }

/* ─── Filter tabs ───────────────────────────────────── */
.tabs {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.tab {
  padding: 0 0 14px;
  font-size: 14.5px;
  color: var(--ink-3);
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--seal); font-weight: 500; }

/* ─── Forms ─────────────────────────────────────────── */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 9px 0;
  transition: border-color 0.15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--seal);
}
.field textarea { resize: vertical; min-height: 120px; }
.field .hint { font-size: 13px; color: var(--ink-3); margin-top: 7px; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 26px;
}
.consent input { width: auto; margin-top: 4px; flex-shrink: 0; accent-color: var(--seal); }

.notice {
  padding: 16px 20px;
  margin-bottom: 26px;
  font-size: 15px;
  border-left: 2px solid;
}
.notice--ok  { background: #EEF4F0; border-color: var(--good); color: var(--good); }
.notice--err { background: #F8EDEB; border-color: var(--bad);  color: var(--bad); }

/* Checkbox group for document requests */
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; margin-bottom: 8px; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--ink-2);
  padding: 7px 0;
}
.check input { width: auto; margin-top: 4px; flex-shrink: 0; accent-color: var(--seal); }

/* ─── Footer ────────────────────────────────────────── */
#site-footer {
  background: var(--navy);
  color: #93A1B2;
  padding: 64px 0 30px;
  font-size: 14.5px;
}

.foot-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 36px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-navy);
}

.foot-brand .brand { color: var(--white); font-size: 20px; margin-bottom: 16px; display: inline-block; }
.foot-brand p { font-size: 14px; line-height: 1.68; color: #8494A6; max-width: 32ch; margin-bottom: 20px; }
.foot-seals { display: flex; gap: 10px; }
.foot-seals .seal-badge { border-color: #4A5C70; color: #8494A6; margin-bottom: 0; width: 34px; height: 34px; }

.foot-col h4 {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #67788C;
  margin-bottom: 16px;
}
.foot-col ul li { margin-bottom: 10px; }
.foot-col ul li a { font-size: 14px; color: #93A1B2; transition: color 0.14s; }
.foot-col ul li a:hover { color: var(--white); }

.foot-mid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line-navy);
}
.foot-loc h4 {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: #67788C; margin-bottom: 12px;
}
.foot-loc p, .foot-loc a { font-size: 14px; line-height: 1.68; color: #93A1B2; display: block; }
.foot-loc a:hover { color: var(--white); }
.foot-loc .emph { color: var(--seal-2); }

.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 26px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #67788C;
}
.foot-bottom a { color: #67788C; }
.foot-bottom a:hover { color: var(--white); }
.foot-legal { display: flex; gap: 22px; flex-wrap: wrap; }

/* ─── Pagination ────────────────────────────────────── */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 40px; }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, color 0.15s;
}
.pagination .page-numbers:hover { border-color: var(--navy); color: var(--ink); }
.pagination .page-numbers.current { background: var(--navy); border-color: var(--navy); color: var(--paper); }

/* ─── Search ────────────────────────────────────────── */
.searchbar { display: flex; max-width: 520px; border-bottom: 1px solid var(--line-2); }
.searchbar input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
}
.searchbar input:focus { outline: none; }
.searchbar input::placeholder { color: var(--ink-4); }
.searchbar button {
  border: none;
  background: transparent;
  color: var(--seal);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0 0 0 18px;
  cursor: pointer;
}
.searchbar:focus-within { border-bottom-color: var(--seal); }

/* ─── Utility ───────────────────────────────────────── */
.rule { border: none; border-top: 1px solid var(--line); margin: 0; }
.mt-sm { margin-top: 14px; }
.mt    { margin-top: 28px; }
.mt-lg { margin-top: 48px; }
.mb-sm { margin-bottom: 14px; }
.mb    { margin-bottom: 28px; }
.mb-lg { margin-bottom: 48px; }
.flow > * + * { margin-top: 16px; }

.inline-list { display: flex; gap: 10px 22px; flex-wrap: wrap; }

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 1080px) {
  .split-side { grid-template-columns: 1fr; gap: 44px; }
  .aside { position: static; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split-label { position: static; }
  .cred-grid { grid-template-columns: 1fr 1fr; }
  .cred:nth-child(3) { border-left: none; }
  .cred:nth-child(3), .cred:nth-child(4) { border-top: 1px solid var(--line); }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .row-item { grid-template-columns: 170px minmax(0, 1fr); }
  .row-item .row-action { grid-column: 2; }
}

@media (max-width: 880px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .header-est { display: none; }
  .header-inner { min-height: 58px; gap: 16px; }

  /* Anchored to the sticky header, not the viewport, so it tracks on scroll. */
  body.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 58px);
    overflow-y: auto;
    background: var(--navy);
    border-top: 1px solid var(--line-navy);
    padding: 8px 40px 30px;
  }
  body.nav-open .main-nav > li > a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line-navy);
    font-size: 16px;
  }
  body.nav-open .main-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 4px 0 10px 14px;
    min-width: 0;
  }
  body.nav-open .main-nav .sub-menu a { color: #93A1B2; padding: 7px 0; }
  body.nav-open .main-nav .sub-menu a:hover { background: transparent; color: var(--white); }
}

@media (max-width: 720px) {
  :root { --pad: 56px; --pad-sm: 40px; }
  .container { padding: 0 20px; }
  body.nav-open .main-nav { padding: 8px 20px 30px; }

  body { font-size: 16px; }
  .opening { padding: 46px 0 42px; }
  .opening h1, .opening .display { max-width: none; }
  .lede { font-size: 17.5px; max-width: none; }

  .cred-grid { grid-template-columns: 1fr; }
  .cred { border-left: none; border-top: 1px solid var(--line); }
  .cred:first-child { border-top: none; }

  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat { padding: 28px 0; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .field-pair { grid-template-columns: 1fr; gap: 0; }
  .check-grid { grid-template-columns: 1fr; }

  .row-item, .row-item--tight { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .row-item .row-action { grid-column: 1; margin-top: 4px; }
  .row-item .row-kicker { padding-top: 0; }

  .spec-row { grid-template-columns: 1fr; gap: 3px; }

  .foot-top, .foot-mid { grid-template-columns: 1fr; gap: 28px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }

  /* Data tables collapse to stacked records rather than scrolling sideways. */
  .dtable, .dtable tbody, .dtable tr, .dtable td { display: block; width: 100%; }
  .dtable thead { display: none; }
  .dtable tbody tr { border-bottom: 1px solid var(--line); padding: 18px 0; }
  .dtable tbody td { border: none; padding: 3px 0; }
  .dtable tbody td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-bottom: 2px;
  }
  .dtable td:last-child { text-align: left; padding-top: 10px; }
}

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

/* ─── Print ─────────────────────────────────────────── */
@media print {
  #site-header, #site-footer, .nav-toggle, .searchbar { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .band { border-color: #999; padding: 18pt 0; }
  .container { max-width: 100%; padding: 0; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
}
