/* MOTS-c Chemical — Steampunk Vitoriano (Victorian Instrument Cabinet) */
/* Palette: gunmetal iron ground, oxblood chamber panels, aged brass accents */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Core palette */
  --primary:              #C49A3E;
  --primary-50:           #F4ECD6;
  --primary-200:          #E2CD92;
  --primary-400:          #D4AF5C;
  --primary-500:          #C49A3E;
  --primary-700:          #8A6D29;
  --primary-900:          #5A461A;

  --secondary:            #B87333;
  --secondary-dim:        #8A551F;
  --secondary-bright:     #D08C4A;

  --accent:               #3C8C82;
  --accent-bright:        #54AFA3;
  --accent-dim:           #2A6B63;

  --oxblood:              #5C1A1F;
  --oxblood-deep:         #3A0E12;
  --oxblood-bright:       #7A2A30;
  --gaslamp:              #D46A00;
  --gaslamp-dim:          #A85100;

  /* Neutrals */
  --neutral-50:           #ECEEEE;
  --neutral-100:          #C8CDCE;
  --neutral-200:          #3A4144;
  --neutral-300:          #454D50;
  --neutral-500:          #7C8689;
  --neutral-700:          #9BA4A7;
  --neutral-900:          #0F1213;

  /* Surfaces */
  --background:           #1F2426;
  --surface:              #262C2F;
  --surface-elevated:     #2E3539;
  --surface-panel:        #5C1A1F;
  --surface-iron:         #171A1C;

  /* Text */
  --text:                 #E6E9E9;
  --text-strong:          #FAFBFB;
  --text-muted:           #9BA4A7;
  --text-dim:             #7C8689;
  --text-on-brass:        #171A1C;
  --text-on-oxblood:      #F4ECD6;
  --text-on-teal:         #0F1213;

  /* Rule colors */
  --rule:                 #454D50;
  --rule-brass:           #C49A3E;
  --rule-copper:          #B87333;
  --rule-teal:            #3C8C82;
  --brass-lit:            #D4AF5C;
  --brass-shadow:         #8A6D29;

  /* State */
  --success:              #54AFA3;
  --warning:              #D4AF5C;
  --danger:               #D46A00;

  /* Glows (as box-shadow values) */
  --brass-glow:           0 0 22px rgba(196,154,62,0.30);
  --gaslamp-glow:         0 0 26px rgba(212,106,0,0.32);
  --teal-glow:            0 0 18px rgba(60,140,130,0.28);

  /* Typography */
  --font-display:         'Yeseva One', 'Playfair Display', 'Times New Roman', Georgia, serif;
  --font-heading:         'Spectral', 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body:            'Spectral', 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono:            'IBM Plex Mono', 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Type scale */
  --h1:                   clamp(2.1rem, 4.6vw, 3.4rem);
  --h2:                   clamp(1.45rem, 3vw, 2.1rem);
  --h3:                   1.3rem;
  --h4:                   1.0625rem;
  --body:                 1.0625rem;
  --lede:                 1.1875rem;
  --small:                0.875rem;
  --eyebrow:              0.75rem;
  --seal:                 0.6875rem;

  /* Layout */
  --max-width:            73rem;
  --container-px:         clamp(1rem, 3vw, 2.25rem);
  --reading-width:        44rem;

  /* Borders */
  --border-radius-btn:    3px;
  --border-radius-card:   0;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: 1.68;
  min-height: 100vh;
}

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

ul, ol {
  list-style: none;
}

a {
  color: var(--primary-400);
  text-decoration: none;
  transition: color 200ms ease-out;
}

a:hover {
  color: var(--brass-lit);
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, .h1 {
  font-family: var(--font-display);
  font-size: var(--h1);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.005em;
  color: var(--text-strong);
}

h2, .h2 {
  font-family: var(--font-heading);
  font-size: var(--h2);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

h3, .h3 {
  font-family: var(--font-heading);
  font-size: var(--h3);
  font-weight: 600;
  line-height: 1.18;
  color: var(--text-strong);
}

h4, .h4 {
  font-family: var(--font-heading);
  font-size: var(--h4);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-strong);
}

p {
  margin-bottom: 1.125rem;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
  color: var(--text-strong);
}

em {
  font-style: italic;
}

small, .small {
  font-size: var(--small);
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9375em;
  background-color: var(--neutral-200);
  padding: 0.125rem 0.4rem;
  border-bottom: 1px solid rgba(196,154,62,0.6);
}

pre {
  font-family: var(--font-mono);
  background-color: var(--surface-iron);
  border-left: 3px solid var(--primary);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.45;
}

blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 1.5rem 0;
}

/* Eyebrow */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
  display: block;
  margin-bottom: 0.75rem;
}

/* Lede */
.lede {
  font-family: var(--font-body);
  font-size: var(--lede);
  font-style: italic;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* Drop cap */
.drop-cap::first-letter {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 6.5vw, 4.75rem);
  font-weight: 400;
  line-height: 0.82;
  float: left;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  color: var(--primary);
}

/* Seal text */
.seal-text {
  font-family: var(--font-mono);
  font-size: var(--seal);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.reading-column {
  max-width: var(--reading-width);
  margin: 0 auto;
}

.wide-column {
  max-width: 60rem;
  margin: 0 auto;
}

/* ============================================================
   DECORATIVE SVG ELEMENTS (inline as data URIs in CSS)
   ============================================================ */

/* Gear marker via CSS — rendered as background */
.gear-mark {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23C49A3E' d='M8 5.5A2.5 2.5 0 1 0 8 10.5A2.5 2.5 0 0 0 8 5.5ZM6.707 2.146l-.975.562A4.5 4.5 0 0 0 5.065 3.5l-.09.167-1.12-.083a1 1 0 0 0-1 .5l-.5.866a1 1 0 0 0 .134 1.13l.732.73-.037.187A4.5 4.5 0 0 0 3.107 8c0 .135.006.27.017.404l.037.187-.732.73a1 1 0 0 0-.134 1.13l.5.866a1 1 0 0 0 1 .5l1.12-.083.09.167a4.5 4.5 0 0 0 .667.792l.975.562a1 1 0 0 0 1.1 0l.975-.562a4.5 4.5 0 0 0 .667-.792l.09-.167 1.12.083a1 1 0 0 0 1-.5l.5-.866a1 1 0 0 0-.134-1.13l-.732-.73.037-.187A4.5 4.5 0 0 0 12.893 8c0-.135-.006-.27-.017-.404l-.037-.187.732-.73a1 1 0 0 0 .134-1.13l-.5-.866a1 1 0 0 0-1-.5l-1.12.083-.09-.167a4.5 4.5 0 0 0-.667-.792l-.975-.562a1 1 0 0 0-1.1 0z'/%3E%3Ccircle fill='%238A6D29' cx='8' cy='8' r='1.5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
}

/* Section divider */
.section-divider {
  position: relative;
  height: 1px;
  background: rgba(196,154,62,0.6);
  margin: 3rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-divider::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23C49A3E' d='M8 5A3 3 0 1 0 8 11A3 3 0 0 0 8 5ZM6.5 1.5l-.8.46A3.5 3.5 0 0 0 5.2 2.7l-.07.13-.9-.06a.8.8 0 0 0-.8.4l-.4.7a.8.8 0 0 0 .11.9l.58.58-.03.15A3.5 3.5 0 0 0 3.5 8c0 .1 0 .2.01.3l.03.15-.58.58a.8.8 0 0 0-.11.9l.4.7a.8.8 0 0 0 .8.4l.9-.06.07.13a3.5 3.5 0 0 0 .5.72l.8.46a.8.8 0 0 0 .88 0l.8-.46a3.5 3.5 0 0 0 .5-.72l.07-.13.9.06a.8.8 0 0 0 .8-.4l.4-.7a.8.8 0 0 0-.11-.9l-.58-.58.03-.15A3.5 3.5 0 0 0 12.5 8c0-.1 0-.2-.01-.3l-.03-.15.58-.58a.8.8 0 0 0 .11-.9l-.4-.7a.8.8 0 0 0-.8-.4l-.9.06-.07-.13a3.5 3.5 0 0 0-.5-.72l-.8-.46a.8.8 0 0 0-.88 0Z'/%3E%3Ccircle fill='%238A6D29' cx='8' cy='8' r='1.25'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
  background-color: var(--background);
  padding: 0 6px;
}

/* H2 brass underbar */
h2 + .brass-underbar,
.brass-underbar {
  display: block;
  width: 40px;
  height: 3px;
  background: linear-gradient(to bottom, var(--brass-lit), var(--brass-shadow));
  margin-top: 8px;
  margin-bottom: 1.5rem;
  position: relative;
}

.brass-underbar::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--brass-lit), var(--brass-shadow));
  border: 1px solid var(--neutral-900);
}

/* Rivet dot */
.rivet {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--brass-lit), var(--brass-shadow));
  border: 1px solid var(--neutral-900);
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--surface-iron);
  border-bottom: 3px solid;
  border-image: linear-gradient(to bottom, var(--brass-lit), var(--brass-shadow)) 1;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 64px;
  flex-wrap: wrap;
}

/* Wordmark */
.site-brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-strong);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-brand::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23C49A3E' d='M8 5A3 3 0 1 0 8 11A3 3 0 0 0 8 5ZM6.5 1.5l-.8.46A3.5 3.5 0 0 0 5.2 2.7l-.07.13-.9-.06a.8.8 0 0 0-.8.4l-.4.7a.8.8 0 0 0 .11.9l.58.58-.03.15A3.5 3.5 0 0 0 3.5 8c0 .1 0 .2.01.3l.03.15-.58.58a.8.8 0 0 0-.11.9l.4.7a.8.8 0 0 0 .8.4l.9-.06.07.13a3.5 3.5 0 0 0 .5.72l.8.46a.8.8 0 0 0 .88 0l.8-.46a3.5 3.5 0 0 0 .5-.72l.07-.13.9.06a.8.8 0 0 0 .8-.4l.4-.7a.8.8 0 0 0-.11-.9l-.58-.58.03-.15A3.5 3.5 0 0 0 12.5 8c0-.1 0-.2-.01-.3l-.03-.15.58-.58a.8.8 0 0 0 .11-.9l-.4-.7a.8.8 0 0 0-.8-.4l-.9.06-.07-.13a3.5 3.5 0 0 0-.5-.72l-.8-.46a.8.8 0 0 0-.88 0Z'/%3E%3Ccircle fill='%238A6D29' cx='8' cy='8' r='1.25'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.site-brand:hover {
  color: var(--primary-400);
}

/* Primary nav */
.site-nav {
  flex: 1;
  min-width: 0;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  flex-wrap: wrap;
}

.site-nav ul li {
  display: flex;
  align-items: center;
}

/* Gear-dot separator between nav items */
.site-nav ul li + li::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--brass-lit), var(--brass-shadow));
  border: 1px solid var(--neutral-900);
  margin: 0 0.5rem;
  flex-shrink: 0;
  transition: transform 200ms ease-out;
}

.site-nav ul li + li:hover::before {
  transform: rotate(30deg);
}

.site-nav a {
  font-family: var(--font-heading);
  font-size: var(--small);
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0;
  position: relative;
  white-space: nowrap;
  transition: color 200ms ease-out;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to bottom, var(--brass-lit), var(--brass-shadow));
  opacity: 0;
  transition: opacity 200ms ease-out, background 200ms ease-out;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--primary-400);
}

.site-nav a[aria-current="page"]::after,
.site-nav a:hover::after {
  opacity: 1;
}

.site-nav a:hover::after {
  background: var(--accent);
}

/* WADA pill */
.wada-pill {
  font-family: var(--font-mono);
  font-size: var(--seal);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gaslamp);
  border: 2px solid var(--gaslamp);
  border-radius: 9999px;
  padding: 0.25rem 0.625rem;
  background: var(--surface-iron);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--primary);
  border-radius: 3px;
  color: var(--primary);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  transition: background 200ms ease-out;
}

.nav-toggle:hover {
  background: rgba(196,154,62,0.12);
}

/* ============================================================
   INSTRUMENT PANEL (hero container)
   ============================================================ */
.instrument-panel {
  background-color: var(--surface-panel);
  border: 3px solid;
  border-color: var(--brass-lit);
  border-image: none;
  position: relative;
  padding: 3rem;
  overflow: hidden;
}

/* Corner rivet dots via pseudo-elements + children */
.instrument-panel .rivet-tl,
.instrument-panel .rivet-tr,
.instrument-panel .rivet-bl,
.instrument-panel .rivet-br {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--brass-lit), var(--brass-shadow));
  border: 1.5px solid var(--neutral-900);
}

.instrument-panel .rivet-tl { top: 6px; left: 6px; }
.instrument-panel .rivet-tr { top: 6px; right: 6px; }
.instrument-panel .rivet-bl { bottom: 6px; left: 6px; }
.instrument-panel .rivet-br { bottom: 6px; right: 6px; }

/* Engraved steel texture overlay */
.instrument-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

.instrument-panel > * {
  position: relative;
  z-index: 1;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  padding: 2rem 0 3rem;
}

.hero-section > .container > .instrument-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: center;
}

.hero-content {
  max-width: 46rem;
}

.hero-content .eyebrow {
  border-bottom: 2px solid;
  border-image: linear-gradient(to right, var(--brass-lit), transparent) 1;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.hero-image-slot {
  width: 280px;
  flex-shrink: 0;
}

.hero-image-slot img {
  width: 100%;
  height: auto;
  border: 2px solid var(--neutral-300);
}

/* Hero above-panel gear mark */
.hero-pre-mark {
  text-align: center;
  padding: 1.5rem 0 0.75rem;
}

/* Below-panel divider gear mark */
.hero-post-mark {
  display: flex;
  align-items: center;
  margin: 0;
}

.hero-post-mark::before,
.hero-post-mark::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to bottom, var(--brass-lit), var(--brass-shadow));
}

.hero-post-mark-gear {
  margin: 0 0.75rem;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath fill='%23C49A3E' d='M9 6A3 3 0 1 0 9 12A3 3 0 0 0 9 6ZM7 2l-1 .58a5 5 0 0 0-.76.9l-.1.18-1.2-.09a1 1 0 0 0-.96.5l-.5.86a1 1 0 0 0 .12 1.13l.8.8-.04.2A5 5 0 0 0 3.06 9c0 .15.01.3.02.45l.04.2-.8.8a1 1 0 0 0-.12 1.13l.5.86a1 1 0 0 0 .96.5l1.2-.09.1.18a5 5 0 0 0 .76.9L7 14.42a1 1 0 0 0 1.14 0L9.1 14a5 5 0 0 0 .76-.9l.1-.18 1.2.09a1 1 0 0 0 .96-.5l.5-.86a1 1 0 0 0-.12-1.13l-.8-.8.04-.2A5 5 0 0 0 11.94 9c0-.15-.01-.3-.02-.45l-.04-.2.8-.8a1 1 0 0 0 .12-1.13l-.5-.86a1 1 0 0 0-.96-.5l-1.2.09-.1-.18a5 5 0 0 0-.76-.9L9 2a1 1 0 0 0-1.14 0Z'/%3E%3Ccircle fill='%238A6D29' cx='9' cy='9' r='1.5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* ============================================================
   GAUGE STRIP
   ============================================================ */
.gauge-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 1.75rem 0;
  border: 2px solid var(--neutral-300);
  border-top: 3px solid;
  border-top-color: var(--brass-lit);
  position: relative;
}

.gauge-strip::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 4px;
  width: 5px;
  height: 5px;
  margin-top: -1px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--brass-lit), var(--brass-shadow));
  border: 1px solid var(--neutral-900);
}

.gauge-strip::after {
  content: '';
  position: absolute;
  top: -3px;
  right: 4px;
  width: 5px;
  height: 5px;
  margin-top: -1px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--brass-lit), var(--brass-shadow));
  border: 1px solid var(--neutral-900);
}

.gauge-cell {
  padding: 1rem 0.875rem;
  border-right: 1px solid rgba(196,154,62,0.3);
  text-align: center;
}

.gauge-cell:last-child {
  border-right: none;
}

.gauge-label {
  font-family: var(--font-mono);
  font-size: var(--seal);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
  display: block;
  margin-bottom: 0.4rem;
}

.gauge-value {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  color: var(--text-strong);
  display: block;
  line-height: 1.1;
}

.gauge-unit {
  font-family: var(--font-mono);
  font-size: var(--small);
  color: var(--text-muted);
  display: block;
  margin-top: 0.25rem;
}

/* ============================================================
   INTERNAL PAGE HERO PLATE
   ============================================================ */
.page-hero {
  padding: 2rem 0 2.5rem;
}

.page-hero-plate {
  background-color: var(--oxblood-deep);
  border: 3px solid var(--brass-lit);
  position: relative;
  padding: 2.5rem 2.5rem 2rem;
  overflow: hidden;
}

.page-hero-plate .rivet-tl,
.page-hero-plate .rivet-tr,
.page-hero-plate .rivet-bl,
.page-hero-plate .rivet-br {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--brass-lit), var(--brass-shadow));
  border: 1px solid var(--neutral-900);
}

.page-hero-plate .rivet-tl { top: 5px; left: 5px; }
.page-hero-plate .rivet-tr { top: 5px; right: 5px; }
.page-hero-plate .rivet-bl { bottom: 5px; left: 5px; }
.page-hero-plate .rivet-br { bottom: 5px; right: 5px; }

.page-hero-plate::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
}

.page-hero-plate > * {
  position: relative;
  z-index: 1;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background-color: var(--surface);
  border: 2px solid var(--neutral-300);
  position: relative;
  padding: 1.75rem;
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out;
}

.card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to bottom, var(--brass-lit), var(--brass-shadow));
}

/* Rivet dots on card top rule */
.card::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--brass-lit), var(--brass-shadow));
  border: 1px solid var(--neutral-900);
  box-shadow: calc(100% - 24px) 0 0 var(--surface-iron);
}

.card:hover {
  border-color: var(--primary);
  box-shadow: var(--brass-glow);
}

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}

.card-heading {
  font-family: var(--font-heading);
  font-size: var(--h3);
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--neutral-300);
  padding-bottom: 0.625rem;
}

/* Chamber card variant — oxblood panel, brass left rule */
.card--chamber {
  background-color: var(--surface-panel);
  border-left: 4px solid var(--brass-lit);
}

.card--chamber::before {
  display: none;
}

/* Regulatory card */
.card--regulatory {
  background-color: var(--surface-elevated);
  border-left: 3px solid var(--gaslamp);
}

.card--regulatory::before {
  background: linear-gradient(to bottom, var(--gaslamp), var(--gaslamp-dim));
}

/* ============================================================
   CALLOUTS
   ============================================================ */
.callout {
  border-left: 3px solid var(--primary);
  border-top: 1px solid var(--neutral-300);
  border-right: 1px solid var(--neutral-300);
  border-bottom: 1px solid var(--neutral-300);
  background-color: var(--surface);
  padding: 1.5rem;
  margin: 1.75rem 0;
}

.callout-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.callout-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.625rem;
}

.callout--danger {
  border-left-color: var(--gaslamp);
  border-left-width: 4px;
}

.callout--danger .callout-eyebrow {
  color: var(--gaslamp);
}

.callout--info {
  border-left-color: var(--accent);
  border-left-width: 3px;
}

.callout--info .callout-eyebrow {
  color: var(--accent-bright);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.625rem;
  border-radius: var(--border-radius-btn);
  font-family: var(--font-heading);
  font-size: var(--small);
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease-out, border-color 200ms ease-out, box-shadow 200ms ease-out, transform 100ms ease-out;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-on-brass);
  border: 2px solid var(--neutral-900);
  box-shadow: inset 0 1px 0 rgba(212,175,92,0.22), inset 0 -1px 0 rgba(15,18,19,0.45);
}

.btn-primary:hover {
  background-color: var(--brass-lit);
  box-shadow: var(--brass-glow), inset 0 1px 0 rgba(212,175,92,0.22), inset 0 -1px 0 rgba(15,18,19,0.45);
  color: var(--text-on-brass);
}

.btn-secondary {
  background-color: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}

.btn-secondary:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--brass-glow);
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border: 2px solid var(--neutral-300);
  border-top: 3px solid var(--brass-lit);
  margin: 1.75rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--surface);
  font-family: var(--font-body);
  font-size: 0.9375rem;
}

thead tr {
  border-bottom: 1px solid var(--neutral-300);
}

thead th {
  font-family: var(--font-heading);
  font-size: var(--small);
  font-variant: small-caps;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--primary);
  padding: 0.875rem 1rem;
  text-align: left;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--neutral-200);
  transition: background-color 150ms ease-out;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background-color: var(--surface-elevated);
}

tbody td {
  padding: 0.875rem 1rem;
  color: var(--text);
  vertical-align: top;
}

tbody td:first-child {
  font-weight: 500;
  color: var(--text-strong);
}

.td-mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--text-muted);
}

/* ============================================================
   FIGURES
   ============================================================ */
.fig-panel {
  border: 2px solid var(--neutral-300);
  border-top: 2px solid var(--brass-lit);
  margin: 2rem 0;
  position: relative;
}

.fig-panel img {
  width: 100%;
  height: auto;
  display: block;
}

.fig-caption {
  background-color: var(--surface-iron);
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--neutral-300);
}

.fig-caption-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.fig-caption p {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   REGULATORY PILL
   ============================================================ */
.regulatory-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--seal);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 2px solid var(--primary);
  border-radius: 9999px;
  padding: 0.2rem 0.6rem;
  color: var(--primary);
  background: transparent;
  vertical-align: middle;
}

.regulatory-pill--danger {
  border-color: var(--gaslamp);
  color: var(--gaslamp);
}

/* ============================================================
   CITATION CHIPS (inline [N] references)
   ============================================================ */
.cite-link {
  font-family: var(--font-heading);
  font-size: 0.8em;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(196,154,62,0.6);
  vertical-align: super;
  line-height: 0;
  transition: color 200ms ease-out, border-color 200ms ease-out, box-shadow 200ms ease-out;
  cursor: help;
}

.cite-link:hover {
  color: var(--brass-lit);
  border-bottom-color: var(--brass-lit);
  box-shadow: var(--brass-glow);
}

/* ============================================================
   REFERENCES LIST
   ============================================================ */
.references-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  counter-reset: ref-counter;
}

.references-list li {
  counter-increment: ref-counter;
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--neutral-200);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.references-list li:last-child {
  border-bottom: none;
}

.references-list li::before {
  content: counter(ref-counter);
  font-family: var(--font-mono);
  font-size: var(--small);
  font-weight: 700;
  color: var(--primary);
  min-width: 2rem;
  text-align: right;
  flex-shrink: 0;
}

.ref-link {
  color: var(--accent-bright);
  font-size: 0.875rem;
  margin-left: 0.5rem;
  white-space: nowrap;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list {
  margin: 1.5rem 0;
}

.faq-item {
  border-bottom: 1px solid var(--neutral-300);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-strong);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  padding: 1.25rem 1rem 1.25rem 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 200ms ease-out;
}

.faq-question:hover {
  color: var(--primary-400);
}

.faq-indicator {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 200ms ease-out, color 200ms ease-out;
  line-height: 1;
  user-select: none;
}

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 300ms ease-out, padding 200ms ease-out;
  padding: 0 0 0 0;
}

.faq-answer-inner {
  padding: 0 0 1.25rem 0;
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.faq-item.is-open .faq-answer {
  max-height: 800px;
}

.faq-item.is-open .faq-indicator {
  transform: rotate(45deg);
  color: var(--accent-bright);
}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */
.page-body {
  padding: 3rem 0 4rem;
}

.content-section {
  margin-bottom: 3.5rem;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-section h2 {
  margin-bottom: 0.5rem;
}

.section-intro {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-top: 0.25rem;
  margin-bottom: 1.25rem;
}

.content-section ul,
.content-section ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.content-section ol {
  list-style: decimal;
}

.content-section li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

/* ============================================================
   BRASS SEAL COMPONENT
   ============================================================ */
.brass-seal {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: var(--primary);
  color: var(--text-on-brass);
  border: 2px solid var(--neutral-900);
  border-radius: 4px;
  padding: 0.3rem 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--seal);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  vertical-align: middle;
}

.brass-seal--round {
  border-radius: 9999px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background-color: var(--surface-iron);
  border-top: 3px solid;
  border-image: linear-gradient(to bottom, var(--brass-lit), var(--brass-shadow)) 1;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-disclaimer {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--small);
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--neutral-300);
}

.footer-col-heading {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-variant: small-caps;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.375rem;
  border-bottom: 2px solid;
  border-image: linear-gradient(to bottom, var(--brass-lit), var(--brass-shadow)) 1;
  display: block;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 0.4rem;
}

.footer-col ul li a {
  font-family: var(--font-body);
  font-size: var(--small);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color 200ms ease-out;
}

.footer-col ul li a:hover {
  color: var(--primary-400);
}

.footer-colophon {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: 0.06em;
}

.footer-stamp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.footer-stamp-gear {
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath fill='%23C49A3E' d='M9 6A3 3 0 1 0 9 12A3 3 0 0 0 9 6ZM7 2l-1 .58a5 5 0 0 0-.76.9l-.1.18-1.2-.09a1 1 0 0 0-.96.5l-.5.86a1 1 0 0 0 .12 1.13l.8.8-.04.2A5 5 0 0 0 3.06 9c0 .15.01.3.02.45l.04.2-.8.8a1 1 0 0 0-.12 1.13l.5.86a1 1 0 0 0 .96.5l1.2-.09.1.18a5 5 0 0 0 .76.9L7 14.42a1 1 0 0 0 1.14 0L9.1 14a5 5 0 0 0 .76-.9l.1-.18 1.2.09a1 1 0 0 0 .96-.5l.5-.86a1 1 0 0 0-.12-1.13l-.8-.8.04-.2A5 5 0 0 0 11.94 9c0-.15-.01-.3-.02-.45l-.04-.2.8-.8a1 1 0 0 0 .12-1.13l-.5-.86a1 1 0 0 0-.96-.5l-1.2.09-.1-.18a5 5 0 0 0-.76-.9L9 2a1 1 0 0 0-1.14 0Z'/%3E%3Ccircle fill='%238A6D29' cx='9' cy='9' r='1.5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.footer-stamp-text {
  font-family: var(--font-mono);
  font-size: var(--seal);
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-dim);
  text-align: center;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--small);
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 200ms ease-out;
}

.breadcrumb a:hover {
  color: var(--primary-400);
}

.breadcrumb-sep {
  color: var(--neutral-300);
}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--brass-lit), var(--brass-shadow));
  z-index: 200;
  width: 0%;
  transition: width 100ms linear;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  padding: 4rem 2rem;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 7rem);
  color: var(--primary);
  line-height: 1;
  margin-bottom: 1rem;
}

/* ============================================================
   CONTACT FORM (minimal)
   ============================================================ */
.contact-form {
  max-width: 36rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  background-color: var(--surface);
  border: 2px solid var(--neutral-300);
  border-top: 3px solid var(--primary-700);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--body);
  padding: 0.75rem 1rem;
  border-radius: 0;
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-top-color: var(--primary);
  box-shadow: var(--brass-glow);
}

.form-textarea {
  min-height: 8rem;
  resize: vertical;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  .hero-section > .container > .instrument-panel {
    grid-template-columns: 1fr;
  }

  .hero-image-slot {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .gauge-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .gauge-cell:nth-child(2) {
    border-right: none;
  }

  .gauge-cell:nth-child(3) {
    border-top: 1px solid rgba(196,154,62,0.3);
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .instrument-panel {
    padding: 1.75rem 1.5rem;
  }

  .page-hero-plate {
    padding: 2rem 1.5rem 1.75rem;
  }
}

@media (max-width: 720px) {
  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    display: block;
    width: 100%;
    order: 3;
    border-top: 1px solid var(--neutral-300);
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .site-nav.is-open ul {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .site-nav.is-open ul li::before {
    display: none;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .wada-pill {
    display: none;
  }
}

@media (max-width: 480px) {
  .cta-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .gauge-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .site-nav ul li + li:hover::before {
    transform: none;
  }

  .reading-progress {
    display: none;
  }
}
