/* Self-hosted Google Fonts (Zero external IP leak) */
/* latin-ext */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/gf-02-jizHRFtNs2ka5fXjeivQ4LroWlx-6zAjgn7MsNo.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/gf-03-jizHRFtNs2ka5fXjeivQ4LroWlx-6zAjjH7M.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/gf-01-jizBRFtNs2ka5fXjeivQ4LroWlx-6zsTjmbI.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/gf-00-jizBRFtNs2ka5fXjeivQ4LroWlx-6zUTjg.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Space Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/gf-08-i7dNIFZifjKcF5UAWdDRYERMSHK_IwU.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Space Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/gf-09-i7dNIFZifjKcF5UAWdDRYERMSXK_IwU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/gf-07-i7dNIFZifjKcF5UAWdDRYERMR3K_.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/gf-10-i7dPIFZifjKcF5UAWdDRYE58RWq7.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/gf-11-i7dPIFZifjKcF5UAWdDRYE98RWq7.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/gf-12-i7dPIFZifjKcF5UAWdDRYEF8RQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/gf-05-i7dMIFZifjKcF5UAWdDRaPpZUFqaHjyV.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/gf-06-i7dMIFZifjKcF5UAWdDRaPpZUFuaHjyV.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/gf-04-i7dMIFZifjKcF5UAWdDRaPpZUFWaHg.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* greek */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/gf-15-8vIH7w4qzmVxm2NL9Hz_.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/gf-13-8vIH7w4qzmVxm25L9Hz_.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/gf-14-8vIH7w4qzmVxm2BL9A.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* greek */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/gf-15-8vIH7w4qzmVxm2NL9Hz_.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/gf-13-8vIH7w4qzmVxm25L9Hz_.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/gf-14-8vIH7w4qzmVxm2BL9A.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* greek */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../assets/fonts/gf-15-8vIH7w4qzmVxm2NL9Hz_.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../assets/fonts/gf-13-8vIH7w4qzmVxm25L9Hz_.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../assets/fonts/gf-14-8vIH7w4qzmVxm2BL9A.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==============================================================
   STARLING QUANTITATIVE // Design System (Tuned to Brand Logo)
   Deep Midnight Navy + Electric Cyan/Teal & Cobalt Accents
   ============================================================== */

:root {
  --bg: #060b14;           /* Deep Midnight Navy Base */
  --ink: #f8fafc;          /* Starlight Crisp White */
  --soft: #cbd5e1;         /* Soft Cloud Slate */
  --muted: #94a3b8;        /* Muted Steel */
  --note: #64748b;         /* Deep Subdued Slate */
  
  --line: #142136;         /* Midnight Hairline Border */
  --line-subtle: #0f1929;  /* Subtle Separator */
  --card: #0a1220;         /* Card Surface */
  --card-hover: #0f1a2e;
  
  /* Brand Accents from Logo */
  --accent-teal: #2ec4b6;   /* Electric Teal / Cyan */
  --accent-blue: #2563eb;   /* Cobalt Arrow Blue */
  --accent-cyan: #00b4d8;   /* Sky Cyan Node */
  --accent-navy: #0f2b59;   /* Deep Brand Navy */
  
  --font-serif: 'Instrument Serif', Georgia, Didot, serif;
  --font-sans: 'Syne', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'Space Mono', "JetBrains Mono", Consolas, monospace;

  --ease-smooth: cubic-bezier(0.2, 0.7, 0.1, 1);
}

/* Reset & Foundation */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background-color: var(--bg);
  color: var(--ink);
  overflow-x: clip;
  position: relative;
}

.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding: 0.25rem 0;
}

/* Selection Color */
::selection {
  background: var(--accent-blue);
  color: var(--ink);
}

/* Typography Hierarchy */
.font-editorial {
  font-family: var(--font-serif);
}

.font-display {
  font-family: var(--font-sans);
}

.font-code,
.font-mono {
  font-family: var(--font-mono);
}

:where(code:not(pre code)) {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background-color: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

section[id],
article[id],
div[id] {
  scroll-margin-top: 96px;
}

/* ==============================================================
   Contextual Site Header, Sub-Navigation & Mobile Drawer
   ============================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background-color: rgba(6, 11, 20, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .site-header-inner {
    padding: 0 1.75rem;
    height: 5rem;
    gap: 1rem;
  }
}

@media (min-width: 1380px) {
  .site-header-inner {
    padding: 0 2rem;
  }
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .site-brand {
    gap: 0.7rem;
  }
}

.site-brand-logo {
  height: 1.75rem;
  width: auto;
  transition: transform 0.25s var(--ease-smooth);
  filter: drop-shadow(0 0 12px rgba(46, 196, 182, 0.3));
}

@media (min-width: 640px) {
  .site-brand-logo {
    height: 2.1rem;
  }
}

.site-brand:hover .site-brand-logo {
  transform: scale(1.05);
}

.site-brand-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .site-brand-title {
    font-size: 0.85rem;
    letter-spacing: 0.03em;
  }
}

@media (min-width: 1380px) {
  .site-brand-title {
    font-size: 0.96rem;
    letter-spacing: 0.04em;
  }
}

.site-brand-sub {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-teal);
  line-height: 1.1;
  margin-top: 2px;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .site-brand-sub {
    font-size: 0.58rem;
    letter-spacing: 0.09em;
  }
}

@media (min-width: 1380px) {
  .site-brand-sub {
    font-size: 0.62rem;
    letter-spacing: 0.11em;
  }
}

.site-nav {
  display: none;
}

@media (min-width: 1140px) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    font-family: var(--font-mono);
    font-size: 0.71rem;
    color: var(--muted);
    white-space: nowrap;
    min-width: 0;
  }
}

@media (min-width: 1380px) {
  .site-nav {
    gap: 1.05rem;
    font-size: 0.72rem;
  }
}

.site-nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0;
  position: relative;
  transition: color 0.2s ease;
}

.site-nav-link:hover {
  color: var(--accent-teal);
}

.site-nav-link.is-active,
.site-nav-link[aria-current="page"] {
  color: var(--accent-teal);
  font-weight: 700;
}

.site-nav-link.is-active::after,
.site-nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  border-radius: 2px;
  background-color: var(--accent-teal);
}

.site-nav-back {
  color: var(--soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav-back:hover {
  color: var(--accent-teal);
}

.site-nav-divider {
  width: 1px;
  height: 14px;
  background-color: #1e293b;
  flex-shrink: 0;
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.site-header .btn-pill {
  display: none;
}

@media (min-width: 520px) {
  .site-header .btn-pill {
    display: inline-flex;
    padding: 0.52rem 1rem;
    font-size: 0.7rem;
    gap: 0.4rem;
  }
}

@media (min-width: 1380px) {
  .site-header .btn-pill {
    padding: 0.6rem 1.2rem;
    font-size: 0.74rem;
    gap: 0.45rem;
  }
}

.site-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background-color: rgba(10, 18, 32, 0.85);
  border: 1px solid var(--line);
  color: var(--soft);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.site-menu-btn:hover,
.site-menu-btn[aria-expanded="true"] {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
}

@media (min-width: 1140px) {
  .site-menu-btn {
    display: none;
  }
}

.site-mobile-drawer {
  display: none;
  background-color: rgba(6, 11, 20, 0.97);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem 1.35rem;
}

.site-mobile-drawer.is-open {
  display: block;
}

@media (min-width: 1140px) {
  .site-mobile-drawer,
  .site-mobile-drawer.is-open {
    display: none;
  }
}

.site-mobile-group-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--note);
  margin: 0.65rem 0 0.35rem;
}

.site-mobile-group-label:first-child {
  margin-top: 0;
}

.site-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.site-mobile-links a {
  color: var(--soft);
  text-decoration: none;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-mobile-links a:hover,
.site-mobile-links a.is-active,
.site-mobile-links a[aria-current="page"] {
  background-color: rgba(46, 196, 182, 0.1);
  color: var(--accent-teal);
}

.paper-index a.is-active {
  color: var(--accent-teal);
  font-weight: 700;
}

/* Headings */
.h-hero {
  font-size: clamp(2.05rem, 7.5vw, 6.5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--ink);
}

.h-hero-house {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.45rem, 1.1vw, 0.85rem);
  margin: 0 auto;
  max-width: 62rem;
}

.h-hero-setup {
  display: block;
  font-size: clamp(1.45rem, 3.05vw, 2.85rem);
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #e2e8f0;
  text-wrap: balance;
}

.h-hero-punch {
  display: block;
  font-size: clamp(2.85rem, 7.1vw, 6.1rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--accent-teal);
  text-shadow: 0 0 42px rgba(46, 196, 182, 0.24);
  text-wrap: balance;
}

.h-xl {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--ink);
}

.h-lg {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--ink);
}

.lead-text {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.8;
  color: var(--soft);
}

/* Section Grid (cream-u style 2-column layout) */
.sec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: clamp(4rem, 9vw, 8.5rem) 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
  .sec-grid {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 4rem;
  }
}

@media (min-width: 1200px) {
  .sec-grid {
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 6rem;
  }
}

/* Sticky Section Labels on Left */
.sec-label-col {
  position: relative;
}

@media (min-width: 900px) {
  .sec-label-col {
    position: sticky;
    top: 6rem;
    align-self: start;
  }
}

.sec-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-teal);
}

.sec-tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--accent-teal);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(46, 196, 182, 0.8);
}

/* Card Surfaces */
.surface-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: all 0.35s var(--ease-smooth);
}

.surface-card:hover {
  background-color: var(--card-hover);
  border-color: rgba(46, 196, 182, 0.35);
  box-shadow: 0 12px 36px -8px rgba(6, 11, 20, 0.8), 0 0 20px rgba(46, 196, 182, 0.08);
  transform: translateY(-2px);
}

/* Scroll-Driven Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease-smooth), transform 0.85s var(--ease-smooth);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Buttons */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.3s var(--ease-smooth);
  text-decoration: none;
  cursor: pointer;
}

@media (max-width: 639px) {
  header .btn-pill {
    padding: 0.48rem 0.82rem;
    font-size: 0.65rem;
    gap: 0.3rem;
  }
  header .font-display {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
  }
  header img {
    height: 1.85rem;
  }
}

.btn-pill-primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #0d9488 100%);
  color: #ffffff;
  border: 1px solid rgba(46, 196, 182, 0.4);
  box-shadow: 0 4px 20px rgba(46, 196, 182, 0.25);
}

.btn-pill-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #14b8a6 100%);
  border-color: var(--accent-teal);
  box-shadow: 0 6px 28px rgba(46, 196, 182, 0.4);
  transform: scale(1.02);
}

.btn-pill-secondary {
  background-color: rgba(10, 18, 32, 0.6);
  color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.btn-pill-secondary:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  background-color: rgba(15, 26, 46, 0.9);
}

/* Background Atmosphere */
.hero-canvas-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.83;
}

.hero-canvas-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 64% 54% at 50% 46%, rgba(6, 11, 20, 0.42) 0%, rgba(6, 11, 20, 0.13) 62%, rgba(6, 11, 20, 0) 100%);
}

.hero-canvas-wrap canvas {
  pointer-events: auto;
}

/* ==============================================================
   Radical Transparency Performance Metrics Boxes
   ============================================================== */
.metric-box {
  background: rgba(10, 18, 32, 0.75);
  border: 1px solid rgba(20, 33, 54, 0.95);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--ease-smooth);
}

.metric-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(46, 196, 182, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.metric-box:hover {
  background: rgba(15, 26, 46, 0.9);
  border-color: rgba(46, 196, 182, 0.45);
  box-shadow: 0 16px 40px -10px rgba(6, 11, 20, 0.95), 0 0 25px rgba(46, 196, 182, 0.12);
  transform: translateY(-3px);
}

.metric-box:hover::before {
  opacity: 1;
}

.metric-number {
  font-size: clamp(1.65rem, 2.25vw, 2.25rem);
  font-weight: 700;
  line-height: 1.05;
  font-family: var(--font-sans);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.metric-number-accent {
  color: var(--accent-teal);
}

.metric-box-accent {
  background: rgba(10, 22, 38, 0.85);
  border-color: rgba(46, 196, 182, 0.35);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes tradeTickFlash {
  0% { color: #2ec4b6; text-shadow: 0 0 14px rgba(46, 196, 182, 0.9); }
  100% { color: inherit; text-shadow: none; }
}

.trade-tick-animate {
  animation: tradeTickFlash 1.2s ease-out;
}

/* ==============================================================
   Editorial Print Ledger (/guides Practitioner Field Notes)
   ============================================================== */
.editorial-ledger {
  border-top: 2px solid #cbd5e1;
  border-bottom: 1px solid #142136;
}

.editorial-ledger-head {
  display: none;
}

.editorial-ledger-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem 0 1.75rem 1rem;
  border-bottom: 1px solid #142136;
  border-left: 2px solid rgba(46, 196, 182, 0.4);
}

.editorial-ledger-row:last-child {
  border-bottom: none;
}

.editorial-ledger-num {
  font-family: var(--font-editorial, Georgia, serif);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1;
  color: #2ec4b6;
}

.editorial-ledger-title h3 {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.32;
  color: #f8fafc;
  margin-bottom: 0.35rem;
}

.editorial-ledger-finding {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #94a3b8;
}

.editorial-ledger-action {
  padding-top: 0.2rem;
}

@media (min-width: 768px) {
  .editorial-ledger-head {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1.25fr) minmax(0, 1.15fr) 7.5rem;
    gap: 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #1e293b;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
  }

  .editorial-ledger-row {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1.25fr) minmax(0, 1.15fr) 7.5rem;
    gap: 1.5rem;
    align-items: start;
    padding: 1.85rem 0;
    border-left: none;
  }

  .editorial-ledger-title h3 {
    font-size: 1.25rem;
  }

  .editorial-ledger-action,
  .editorial-ledger-head > div:last-child {
    text-align: right;
  }
}

/* ==============================================================
   House Rules Editorial Print Ledger (The Crowd vs. The House)
   ============================================================== */
.house-ledger {
  border-top: 2px solid #cbd5e1;
  border-bottom: 1px solid #142136;
}

.house-ledger-head {
  display: none;
}

.house-ledger-row {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.5rem 0 1.5rem 1rem;
  border-bottom: 1px solid #142136;
  border-left: 2px solid rgba(46, 196, 182, 0.45);
}

.house-ledger-row:last-child {
  border-bottom: none;
}

.house-ledger-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.65rem;
  line-height: 1;
  color: var(--accent-teal);
}

.house-ledger-topic {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--ink);
}

.house-ledger-col {
  font-size: 0.875rem;
  line-height: 1.65;
}

.house-ledger-crowd {
  color: #94a3b8;
}

.house-ledger-house {
  color: #e2e8f0;
}

.house-ledger-mobile-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.house-ledger-crowd .house-ledger-mobile-label {
  color: #64748b;
}

.house-ledger-house .house-ledger-mobile-label {
  color: var(--accent-teal);
}

@media (min-width: 768px) {
  .house-ledger-head {
    display: grid;
    grid-template-columns: 2.5rem 10.5rem minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #1e293b;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
  }

  .house-ledger-head-house {
    color: var(--accent-teal);
  }

  .house-ledger-row {
    display: grid;
    grid-template-columns: 2.5rem 10.5rem minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 1.5rem;
    align-items: baseline;
    padding: 1.55rem 0;
    border-left: none;
  }

  .house-ledger-mobile-label {
    display: none;
  }
}

/* ==============================================================
   Hero 3-over-2 Trading Scout Taxonomy Grid
   ============================================================== */
.scout-row-label {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--note);
}

.scout-row-label::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, var(--line) 0%, rgba(20, 33, 54, 0.15) 100%);
}

.scout-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.scout-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 768px) {
  .scout-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .scout-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.scout-card-blackswan {
  border-color: rgba(245, 158, 11, 0.30);
  background-color: rgba(15, 20, 34, 0.92);
}

.scout-card-blackswan:hover {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 12px 36px -8px rgba(6, 11, 20, 0.85), 0 0 22px rgba(245, 158, 11, 0.10);
}

.scout-kicker-amber {
  color: #f59e0b;
}

/* ==============================================================
   Academic Working-Paper Print / PDF Stylesheet (@media print)
   ============================================================== */
@media print {
  @page {
    size: letter;
    margin: 0.78in 0.72in 0.82in 0.72in;
  }

  html,
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 10.5pt !important;
    line-height: 1.55 !important;
  }

  .site-header,
  nav[aria-label="Breadcrumb"],
  aside,
  .no-print,
  .btn-pill,
  footer > div > div {
    display: none !important;
  }

  main {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  main > header {
    max-width: 100% !important;
    padding-bottom: 14pt !important;
    border-bottom: 1.5pt solid #0f172a !important;
  }

  main > div.grid {
    display: block !important;
    padding-top: 12pt !important;
  }

  h1,
  h2,
  h3,
  h4,
  strong,
  .quant-prose h2,
  .quant-prose h3 {
    color: #0f172a !important;
    page-break-after: avoid;
  }

  h1 {
    font-size: 21pt !important;
    line-height: 1.15 !important;
  }

  h1 span {
    color: #0f766e !important;
  }

  .quant-prose h2 {
    font-size: 14pt !important;
    margin-top: 18pt !important;
    margin-bottom: 6pt !important;
  }

  .quant-prose h3 {
    font-size: 11.5pt !important;
    margin-top: 12pt !important;
    margin-bottom: 4pt !important;
  }

  p,
  li,
  td,
  th,
  .lead-text,
  .quant-prose p,
  .quant-prose li {
    color: #1e293b !important;
    font-size: 10.2pt !important;
    line-height: 1.58 !important;
  }

  .sec-tag,
  .quant-prose section > div.font-mono {
    color: #0f766e !important;
  }

  .eq-box,
  .surface-card,
  pre,
  table,
  thead,
  tbody,
  tr {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  thead,
  thead tr,
  th {
    background: #e2e8f0 !important;
    color: #0f172a !important;
  }

  .eq-box {
    border-left: 3pt solid #0f766e !important;
    padding: 10pt 12pt !important;
    margin: 10pt 0 !important;
  }

  .katex,
  .katex * {
    color: #0f172a !important;
  }

  a {
    color: #0f172a !important;
    text-decoration: none !important;
  }
}

