@font-face {
  font-family: "Inter";
  src: url("/companion/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/companion/fonts/inter-tight.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@property --glow-x { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --glow-y { syntax: "<percentage>"; inherits: false; initial-value: 76%; }
@property --glow-w { syntax: "<percentage>"; inherits: false; initial-value: 112%; }
@property --glow-h { syntax: "<percentage>"; inherits: false; initial-value: 78%; }

:root {
  --bg: #121215;
  --bg-alt: #17171c;
  --surface: #1a1a1f;
  --surface-elevated: #212128;
  --surface-hover: #24242b;
  --surface-border: #2c2c36;
  --surface-border-strong: #3f3f4c;
  --text-main: #f4f4f6;
  --text-muted: #a1a1aa;
  --text-subtle: #71717a;
  --action-primary-bg: #f4f4f6;
  --action-primary-text: #121215;
  --action-primary-hover: #ffffff;
  --action-secondary-bg: #1a1a1f;
  --action-secondary-border: #3f3f4c;
  --action-secondary-text: #f4f4f6;
  --action-secondary-hover: #24242b;
  --glow-peak: rgb(244 244 246 / 0.11);
  --glow-mid: rgb(161 161 170 / 0.045);
  --glow-edge: rgb(18 18 21 / 0);
  --speck-opacity: 0.06;
  --font-display: "Inter Tight", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container-max: 1200px;
  --gutter: 24px;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-hover: #f4f4f5;
  --surface-border: #e2e8f0;
  --surface-border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --action-primary-bg: #18181b;
  --action-primary-text: #ffffff;
  --action-primary-hover: #27272a;
  --action-secondary-bg: #ffffff;
  --action-secondary-border: #cbd5e1;
  --action-secondary-text: #0f172a;
  --action-secondary-hover: #f1f5f9;
  --glow-peak: rgb(15 23 42 / 0.08);
  --glow-mid: rgb(100 116 139 / 0.035);
  --glow-edge: rgb(248 250 252 / 0);
  --speck-opacity: 0.04;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
}

html {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-main);
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-color: var(--surface-border-strong) var(--bg);
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  background-color: var(--bg);
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

::selection {
  background-color: var(--text-main);
  color: var(--bg);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--text-main); outline-offset: 2px; }

.skip-link {
  position: absolute;
  top: -999px;
  left: 16px;
  background: var(--text-main);
  color: var(--bg);
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 999;
}
.skip-link:focus { top: 16px; }

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

/* ---------------- Speckled Graphite Atmosphere + Studio Radial Glow ---------------- */
@keyframes glowDrift {
  0%   { --glow-x: 47%; --glow-y: 78%; --glow-w: 112%; --glow-h: 76%; }
  50%  { --glow-x: 53%; --glow-y: 72%; --glow-w: 122%; --glow-h: 82%; }
  100% { --glow-x: 48%; --glow-y: 80%; --glow-w: 108%; --glow-h: 74%; }
}

@keyframes glowDriftDown {
  0%   { --glow-x: 50%; --glow-y: -8%;  --glow-w: 116%; --glow-h: 74%; }
  100% { --glow-x: 52%; --glow-y: 2%;   --glow-w: 124%; --glow-h: 80%; }
}

.atmo-canvas {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background-color: var(--bg);
  background-image: radial-gradient(
    var(--glow-w) var(--glow-h) at var(--glow-x) var(--glow-y),
    var(--glow-peak) 0%,
    var(--glow-mid) 44%,
    var(--glow-edge) 76%
  );
  animation: glowDrift 20s ease-in-out infinite alternate;
}

.atmo-canvas--down {
  background-color: var(--surface);
  background-image: radial-gradient(
    var(--glow-w) var(--glow-h) at var(--glow-x) var(--glow-y),
    var(--glow-peak) 0%,
    var(--glow-mid) 46%,
    var(--glow-edge) 78%
  );
  animation: glowDriftDown 18s ease-in-out infinite alternate;
}

.atmo-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--speck-opacity);
  background-size: 180px 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 9 -4.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

[data-theme="light"] .atmo-canvas::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 9 -4.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.atmo-canvas > * {
  position: relative;
  z-index: 1;
}

/* ---------------- 3-Part Editorial Header ---------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border);
}

.nav-grid {
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
}

.brand-logo {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
}

.nav-center {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--surface-border-strong);
  background-color: var(--surface);
  padding: 3px;
  gap: 2px;
}

.nav-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 12px;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.nav-link:hover {
  background-color: var(--surface-hover);
  color: var(--text-main);
}
.nav-link.active {
  background-color: var(--action-primary-bg);
  color: var(--action-primary-text);
}

.nav-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface);
  border: 1px solid var(--surface-border-strong);
  color: var(--text-main);
  transition: background-color 0.16s ease, border-color 0.16s ease, filter 0.18s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.btn-icon:hover {
  background-color: var(--surface-hover);
  border-color: var(--text-main);
  transform: translate(-1.5px, -1.5px);
  box-shadow: 2px 2px 0 var(--text-subtle);
}
.btn-icon:active { transform: translate(0, 0); box-shadow: none; }
.btn-icon svg { width: 15px; height: 15px; transition: filter 0.2s ease; }

.btn-nav-primary {
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background-color: var(--action-primary-bg);
  color: var(--action-primary-text);
  border: 1px solid var(--action-primary-bg);
  transition: background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}
.btn-nav-primary:hover {
  background-color: var(--action-primary-hover);
  transform: translate(-1.5px, -1.5px);
  box-shadow: 2px 2px 0 var(--text-subtle);
}
.btn-nav-primary:active { transform: translate(0, 0); box-shadow: none; }

/* ---------------- Tactile Swiss Buttons ---------------- */
.btn-swiss-primary,
.btn-swiss-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.btn-swiss-primary {
  background-color: var(--action-primary-bg);
  color: var(--action-primary-text);
  border: 1px solid var(--action-primary-bg);
}
.btn-swiss-primary:hover {
  background-color: var(--action-primary-hover);
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--text-subtle);
}
.btn-swiss-primary:active { transform: translate(0, 0); box-shadow: none; }

.btn-swiss-secondary {
  background-color: var(--action-secondary-bg);
  color: var(--action-secondary-text);
  border: 1px solid var(--action-secondary-border);
}
.btn-swiss-secondary:hover {
  background-color: var(--action-secondary-hover);
  border-color: var(--text-main);
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--text-subtle);
}
.btn-swiss-secondary:active { transform: translate(0, 0); box-shadow: none; }

.btn-arrow {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-swiss-primary:hover .btn-arrow,
.btn-swiss-secondary:hover .btn-arrow { transform: translateX(3px); }

/* ---------------- Subpage Hero ---------------- */
.sub-hero {
  padding: clamp(44px, 6vw, 76px) 0 clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--surface-border);
}

.crumb {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 18px;
}
.crumb a {
  position: relative;
  display: inline-block;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border-strong);
  padding-bottom: 1px;
  transition: color 0.18s ease;
}
.crumb a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  background-color: var(--text-main);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.crumb a:hover,
.crumb a:focus-visible {
  color: var(--text-main);
}
.crumb a:hover::after,
.crumb a:focus-visible::after {
  transform: scaleX(1);
}
.crumb-current { color: var(--text-main); }

.sub-eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.sub-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background-color: var(--surface);
  border: 1px solid var(--surface-border-strong);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-main);
}

.sub-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-main);
  flex-shrink: 0;
}

.sub-display {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.8vw, 3.65rem);
  font-weight: 700;
  letter-spacing: -0.042em;
  line-height: 0.98;
  color: var(--text-main);
  max-width: 19ch;
  text-wrap: balance;
  margin-bottom: 16px;
}

.sub-lede {
  font-size: clamp(0.98rem, 1.25vw, 1.1rem);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 64ch;
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.cta-row .btn-swiss-primary,
.cta-row .btn-swiss-secondary {
  min-height: 48px;
  padding: 0 24px;
  font-size: 0.85rem;
}

.hero-meta-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-subtle);
  line-height: 1.65;
  max-width: 66ch;
}
.hero-meta-note a,
.footer-credit a {
  position: relative;
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--surface-border-strong);
  padding-bottom: 1px;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.hero-meta-note a::after,
.footer-credit a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  background-color: var(--text-main);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.hero-meta-note a:hover,
.hero-meta-note a:focus-visible,
.footer-credit a:hover,
.footer-credit a:focus-visible {
  color: var(--text-main);
}
.hero-meta-note a:hover::after,
.hero-meta-note a:focus-visible::after,
.footer-credit a:hover::after,
.footer-credit a:focus-visible::after {
  transform: scaleX(1);
}

/* ---------------- Telemetry Spec Strip ---------------- */
.spec-strip-wrap {
  margin-top: 34px;
}

.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background-color: var(--surface-border);
  border: 1px solid var(--surface-border-strong);
}

.spec-cell {
  background-color: var(--surface);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.spec-val {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.spec-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------------- Editorial Sections ---------------- */
.section-wrap {
  padding: clamp(64px, 7.5vw, 104px) 0;
  border-bottom: 1px solid var(--surface-border);
}

.section-head-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px 48px;
  align-items: end;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.section-display {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--text-main);
  max-width: 18ch;
  text-wrap: balance;
}

.section-lede {
  font-size: clamp(0.94rem, 1.2vw, 1.04rem);
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 46ch;
  text-wrap: pretty;
}

/* ---------------- Swiss Hairline Grids & Architectural Cards ---------------- */
.uni-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background-color: var(--surface-border);
  border: 1px solid var(--surface-border-strong);
}

.uni-cell {
  background-color: var(--surface);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  transition: background-color 0.16s ease;
}
.uni-cell:hover {
  background-color: var(--surface-hover);
}

.pillar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pillar-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
}

.pillar-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 2px 7px;
  background-color: var(--bg);
  border: 1px solid var(--surface-border-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.uni-cell-title {
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-main);
  line-height: 1.15;
}

.uni-cell-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.56;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cap-chip {
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  background-color: var(--bg);
  border: 1px solid var(--surface-border-strong);
  color: var(--text-muted);
}

.cap-chip.is-strong {
  color: var(--text-main);
  border-color: var(--text-subtle);
}

.step-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-main);
  border-bottom: 1.5px solid var(--surface-border-strong);
  padding: 3px 0;
  width: fit-content;
  transition: color 0.18s ease;
}
.step-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.5px;
  height: 2px;
  background-color: var(--text-main);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.step-link-arrow {
  display: inline-block;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.uni-cell:hover .step-link::after,
.step-link:hover::after,
.step-link:focus-visible::after { transform: scaleX(1); }
.uni-cell:hover .step-link-arrow,
.step-link:hover .step-link-arrow,
.step-link:focus-visible .step-link-arrow { transform: translateX(4px); }

/* ---------------- Asymmetric Workbench (7fr + 5fr) & 3-Col Pillars ---------------- */
.sub-workbench {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 1px;
  background-color: var(--surface-border);
  border: 1px solid var(--surface-border-strong);
}

.wb-panel {
  background-color: var(--surface);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.wb-panel h2,
.wb-panel h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.wb-panel p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.62;
}

.wb-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wb-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.58;
}

.wb-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background-color: var(--text-main);
}

.wb-list li strong { color: var(--text-main); }

.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setup-step {
  background-color: var(--bg);
  border: 1px solid var(--surface-border-strong);
  padding: 13px 15px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.setup-step-idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 6px;
  background-color: var(--action-primary-bg);
  color: var(--action-primary-text);
}

.setup-step strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.94rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.setup-step span {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background-color: var(--surface-border);
  border: 1px solid var(--surface-border-strong);
}

.pillar-card {
  background-color: var(--surface);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: background-color 0.16s ease;
}
.pillar-card:hover { background-color: var(--surface-hover); }

.pillar-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 8px 0 6px;
}

.pillar-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.58;
}

.inline-link {
  position: relative;
  display: inline-block;
  color: var(--text-main);
  border-bottom: 1px solid var(--surface-border-strong);
  padding-bottom: 1px;
}
.inline-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  background-color: var(--text-main);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.inline-link:hover::after,
.inline-link:focus-visible::after {
  transform: scaleX(1);
}

.inline-code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  padding: 2px 6px;
  background-color: var(--bg);
  border: 1px solid var(--surface-border-strong);
  color: var(--text-main);
}

/* ---------------- Grading Scale & Comparison Tables ---------------- */
.scale-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--surface-border-strong);
  background-color: var(--surface);
}

.scale-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.scale-table th,
.scale-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-border);
}

.scale-table tbody tr:last-child td { border-bottom: none; }

.scale-table thead th {
  background-color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
  border-bottom: 1px solid var(--surface-border-strong);
}

.scale-table tbody tr:hover td {
  background-color: var(--surface-hover);
}

.scale-letter {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.scale-bar-cell {
  min-width: 150px;
}

.scale-bar-track {
  width: 100%;
  max-width: 180px;
  height: 6px;
  background-color: var(--bg);
  border: 1px solid var(--surface-border-strong);
}

.scale-bar-fill {
  height: 100%;
  background-color: var(--action-primary-bg);
}

/* ---------------- Campus Switcher Pills ---------------- */
.campus-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.campus-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background-color: var(--surface);
  border: 1px solid var(--surface-border-strong);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.campus-pill:hover {
  background-color: var(--surface-hover);
  border-color: var(--text-main);
  transform: translate(-1.5px, -1.5px);
  box-shadow: 2px 2px 0 var(--text-subtle);
}
.campus-pill-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 5px;
  background-color: var(--bg);
  border: 1px solid var(--surface-border-strong);
  color: var(--text-muted);
}

/* ---------------- Closing Atmospheric Panel ---------------- */
.closing-wrap {
  padding: 48px var(--gutter) 56px;
}

.closing-panel {
  max-width: var(--container-max);
  margin: 0 auto;
  border: 1px solid var(--surface-border-strong);
  padding: clamp(64px, 8vw, 100px) var(--gutter);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.closing-display {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.96;
  max-width: 16ch;
  margin: 0 auto;
  text-wrap: balance;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.closing-actions .btn-swiss-primary,
.closing-actions .btn-swiss-secondary {
  min-height: 48px;
  padding: 0 24px;
  font-size: 0.85rem;
}

/* ---------------- Footer ---------------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--surface-border);
  padding: 40px var(--gutter) 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 6px 0;
}

.footer-links a {
  position: relative;
  display: inline-block;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--surface-border-strong);
  padding-bottom: 2px;
}
.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  background-color: var(--text-main);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.footer-links a:hover::after,
.footer-links a:focus-visible::after {
  transform: scaleX(1);
}
.footer-credit { font-size: 0.78rem; color: var(--text-subtle); }

/* ---------------- Scroll Reveal System ---------------- */
html.bb-anim-ready .bb-reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 0.56s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
    transform 0.56s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
html.bb-anim-ready .bb-reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

@media (max-width: 1040px) {
  .nav-grid {
    grid-template-columns: 1fr auto;
    height: auto;
    padding-top: 9px;
    padding-bottom: 9px;
    row-gap: 8px;
  }
  .nav-center {
    grid-column: 1 / -1;
    justify-self: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav-center::-webkit-scrollbar { display: none; }
  .nav-link { padding: 5px 10px; font-size: 0.74rem; }
}

@media (max-width: 960px) {
  .spec-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head-split,
  .sub-workbench,
  .uni-matrix,
  .pillars-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .brand { font-size: 1.05rem; gap: 8px; }
  .brand-logo { width: 22px; height: 22px; }
  .nav-actions { gap: 6px; }
  .btn-icon { width: 34px; height: 34px; }
  .btn-nav-primary { height: 34px; padding: 0 11px; font-size: 0.72rem; }

  .sub-hero { padding: 36px 0 32px; }
  .section-wrap { padding: 48px 0; }
  .wb-panel, .uni-cell, .pillar-card { padding: 20px 16px; }
  .spec-strip { grid-template-columns: minmax(0, 1fr); }
  .cta-row,
  .closing-actions {
    flex-direction: column;
    width: 100%;
    max-width: 340px;
  }
  .cta-row a,
  .closing-actions a { width: 100%; }
  .scale-bar-cell { display: none; }
  .scale-table th, .scale-table td { padding: 10px; font-size: 0.82rem; }
  .campus-pill { flex: 1 1 auto; justify-content: space-between; }
  .closing-wrap { padding: 28px var(--gutter) 40px; }
  .closing-panel { padding: 44px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .atmo-canvas,
  .atmo-canvas--down { animation: none !important; }
  html.bb-anim-ready .bb-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
