:root {
  --primary-blue: #0b1830;
  --secondary-blue: #829bd2;
  --accent-gold: #d9bd70;
  --accent-gold-bright: #f0d78d;
  --light-bg: #eef1f3;
  --dark-blue: #07101b;
  --signal-black: #03070c;
  --signal-ink: #07101a;
  --signal-text: #f2f1ec;
  --signal-muted: #94a3b8;
  --signal-line: rgba(155, 180, 207, 0.16);
  --signal-line-strong: rgba(155, 180, 207, 0.28);
  --paper: #f7f8f7;
  --paper-deep: #e8ecef;
  --paper-ink: #172033;
  --paper-muted: #5f6d7e;
  --font-display: "Space Grotesk", "Noto Sans", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  min-width: 320px;
  background: var(--signal-black);
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body.report-experience {
  min-width: 320px;
  margin: 0;
  color: var(--paper-ink);
  background: var(--light-bg);
  font-family: var(--font-display);
  overflow-x: clip;
}

body.report-experience::after {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  content: "";
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.72'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body.report-experience #site-content {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  background: var(--light-bg);
}

body.report-experience ::selection {
  color: var(--signal-ink);
  background: var(--accent-gold-bright);
}

body.report-experience a,
body.report-experience button,
body.report-experience input,
body.report-experience select {
  -webkit-tap-highlight-color: transparent;
}

body.report-experience a:focus-visible,
body.report-experience button:focus-visible,
body.report-experience input:focus-visible,
body.report-experience select:focus-visible {
  outline: 2px solid var(--accent-gold) !important;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: var(--signal-black);
  background: var(--accent-gold-bright);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Shared navigation */

.future-header {
  position: sticky;
  top: 0;
  z-index: 70;
  width: 100%;
  color: var(--signal-text);
  background: rgba(3, 7, 12, 0.91) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--signal-line) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px) saturate(125%);
}

.future-header nav > div:first-child {
  height: 76px !important;
}

.future-logo img {
  width: auto;
  height: 2.05rem;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.future-header .desktop-nav {
  gap: 1.45rem;
}

.future-header .desktop-nav > a:not(.client-login) {
  position: relative;
  padding: 1.75rem 0;
  color: #8f9bac !important;
  font-family: var(--font-mono);
  font-size: 0.62rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 200ms ease;
}

.future-header .desktop-nav > a:not(.client-login)::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--accent-gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 260ms var(--ease-out-expo);
}

.future-header .desktop-nav > a:hover,
.future-header .desktop-nav > a[aria-current="page"] {
  color: #eef1f5 !important;
}

.future-header .desktop-nav > a:hover::after,
.future-header .desktop-nav > a[aria-current="page"]::after {
  transform: scaleX(1);
}

.client-login {
  min-height: 2.55rem;
  padding: 0.7rem 1rem !important;
  color: #07101b !important;
  background: var(--accent-gold) !important;
  border: 1px solid var(--accent-gold) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: var(--font-mono);
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease !important;
}

.client-login:hover {
  background: var(--accent-gold-bright) !important;
  border-color: var(--accent-gold-bright) !important;
  transform: translateY(-1px);
}

.client-login:active {
  transform: translateY(0) scale(0.99);
}

#mobile-menu-button {
  color: #b5c0ce !important;
  background: transparent !important;
  border: 1px solid var(--signal-line) !important;
  border-radius: 0 !important;
}

#mobile-menu {
  padding: 0.6rem 0 1rem !important;
  background: transparent !important;
  border-top: 1px solid var(--signal-line);
}

#mobile-menu a {
  color: #9aa8b9 !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-family: var(--font-mono);
  font-size: 0.67rem !important;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

#mobile-menu a:hover,
#mobile-menu a[aria-current="page"] {
  color: #f0f2f5 !important;
}

#mobile-menu .client-login,
#mobile-menu .client-login:hover {
  width: 100%;
  margin-top: 0.55rem;
  color: var(--signal-ink) !important;
  background: var(--accent-gold) !important;
  text-align: center;
}

/* Research masthead */

.report-hero {
  position: relative;
  min-height: clamp(28rem, 52vh, 36rem);
  display: flex;
  align-items: center;
  color: var(--signal-text);
  background-color: var(--signal-black) !important;
  background-image:
    linear-gradient(92deg, rgba(3, 7, 12, 0.98) 0%, rgba(4, 10, 17, 0.91) 52%, rgba(5, 13, 22, 0.62) 100%),
    url("../images/signal-field.webp") !important;
  background-position: center !important;
  background-size: cover !important;
  isolation: isolate;
}

.report-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(151, 173, 198, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 173, 198, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 76% 38%, rgba(217, 189, 112, 0.11), transparent 24%);
  background-size: 58px 58px, 58px 58px, auto;
  mask-image: linear-gradient(to bottom, black, transparent 96%);
}

.report-hero::after {
  position: absolute;
  right: clamp(1rem, 4vw, 4rem);
  bottom: 2.25rem;
  width: clamp(8rem, 18vw, 17rem);
  height: 1px;
  pointer-events: none;
  content: "";
  color: #6f7f92;
  border-top: 1px solid var(--signal-line-strong);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.13em;
  line-height: 2.4rem;
  text-align: right;
}

.report-hero > .absolute.inset-0 {
  opacity: 0.18 !important;
}

.report-hero .container {
  padding-top: clamp(4rem, 7vw, 6rem) !important;
  padding-bottom: clamp(4.5rem, 8vw, 6.5rem) !important;
}

.report-back {
  color: #9cabbc !important;
  font-family: var(--font-mono);
  font-size: 0.62rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.report-back:hover {
  color: var(--signal-text) !important;
}

.report-hero .section-kicker {
  color: var(--accent-gold) !important;
}

.report-hero h1 {
  max-width: 15ch;
  color: var(--signal-text) !important;
  font-size: clamp(2.8rem, 5.8vw, 6rem) !important;
  font-weight: 500 !important;
  letter-spacing: -0.045em !important;
  line-height: 1.05 !important;
  text-wrap: balance;
}

.report-hero time {
  color: #7f8fa2 !important;
  font-family: var(--font-mono);
  font-size: 0.61rem !important;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.report-hero p {
  max-width: 68ch;
  color: #aeb9c7 !important;
  font-weight: 400 !important;
  line-height: 1.62 !important;
  text-wrap: pretty;
}

.report-hero h1 + p {
  max-width: 48ch;
  color: #d4dbe3 !important;
  font-weight: 500 !important;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #315a91 !important;
  font-family: var(--font-mono);
  font-size: 0.64rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  line-height: 1;
  text-transform: uppercase;
}

.section-kicker::before {
  width: 1.35rem;
  height: 1px;
  content: "";
  background: currentColor;
  opacity: 0.72;
}

/* Light report system */

.report-summary,
.report-body {
  position: relative;
  background-color: var(--light-bg) !important;
  background-image:
    linear-gradient(rgba(35, 55, 78, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 55, 78, 0.035) 1px, transparent 1px) !important;
  background-size: 52px 52px !important;
}

.report-summary {
  padding-top: clamp(4rem, 6vw, 5.5rem) !important;
  padding-bottom: clamp(4rem, 6vw, 5.5rem) !important;
  border-bottom: 1px solid rgba(33, 53, 76, 0.12);
}

.report-summary .container,
.report-body .container {
  position: relative;
  z-index: 1;
}

.institutional-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: rgba(249, 250, 249, 0.94) !important;
  border: 1px solid rgba(33, 53, 76, 0.14) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.institutional-card::after {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 2.6rem;
  height: 2.6rem;
  pointer-events: none;
  content: "";
  border-top: 1px solid rgba(180, 143, 53, 0.68);
  border-right: 1px solid rgba(180, 143, 53, 0.68);
  clip-path: polygon(52% 0, 100% 0, 100% 48%);
  background: rgba(217, 189, 112, 0.09);
}

.institutional-card h2,
.institutional-card h3,
.institutional-card h4 {
  color: var(--paper-ink) !important;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.report-summary .institutional-card > div:first-child,
.report-summary .institutional-card > .text-xs {
  color: #45658e !important;
  font-family: var(--font-mono);
  font-size: 0.58rem !important;
  letter-spacing: 0.12em !important;
}

.report-summary .institutional-card p,
.report-body p,
.report-body li {
  text-wrap: pretty;
}

.report-body > .container > .max-w-3xl h2 {
  color: var(--paper-ink) !important;
  font-weight: 500 !important;
  letter-spacing: -0.035em;
}

#research-dashboard-root > div {
  border-radius: 0 !important;
  box-shadow: none !important;
}

#options-wall-research-root .study-card,
#options-wall-research-root .study-card-quiet {
  border-color: rgba(33, 53, 76, 0.14) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#options-wall-research-root .study-kicker {
  color: #45658e !important;
  font-family: var(--font-mono);
}

#options-wall-research-root .study-stat {
  border-left-color: var(--accent-gold) !important;
}

.report-copy {
  color: var(--paper-muted) !important;
}

.report-copy > p,
.report-copy > ol,
.report-copy > ul,
.report-copy > h2,
.report-copy > h3,
.report-copy > .abstract-box,
.report-copy > .report-callout,
.report-copy > .report-formula,
.report-copy > pre,
.report-copy > .report-part {
  max-width: 72ch;
}

.report-copy code,
.report-copy pre,
.report-table,
.study-table,
.study-stat,
.report-summary .text-3xl {
  font-variant-numeric: tabular-nums;
}

.report-summary .text-3xl {
  font-family: var(--font-mono);
  letter-spacing: -0.04em;
}

.report-copy .chart-shell,
.report-copy .table-scroll {
  scrollbar-color: rgba(103, 122, 144, 0.7) rgba(226, 232, 236, 0.9);
  scrollbar-width: thin;
}

.toc-link {
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  transition: color 180ms ease, border-color 180ms ease, padding-left 180ms ease;
}

.toc-link:hover,
.toc-link:focus-visible {
  padding-left: 0.95rem;
}

/* Footer */

.future-footer {
  color: #68778b;
  background: var(--signal-black) !important;
  border-color: var(--signal-line) !important;
}

.future-footer img {
  filter: brightness(0) invert(1);
  opacity: 0.78;
}

.future-footer p,
.future-footer a {
  color: #68778b !important;
  font-family: var(--font-mono);
  font-size: 0.6rem !important;
  letter-spacing: 0.04em;
}

.future-footer a {
  transition: color 180ms ease;
}

.future-footer a:hover,
.future-footer a[aria-current="page"] {
  color: #dce2e8 !important;
}

@media (max-width: 960px) {
  .future-header .desktop-nav {
    display: none !important;
  }

  .future-header .mobile-menu-trigger {
    display: flex !important;
  }

  #mobile-menu:not(.hidden) {
    display: block !important;
  }

  .report-summary > .container > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 961px) {
  .future-header .desktop-nav {
    display: flex !important;
  }

  .future-header .mobile-menu-trigger,
  #mobile-menu {
    display: none !important;
  }
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 70px;
  }

  body.report-experience::after {
    display: none;
  }

  .future-header nav > div:first-child {
    height: 70px !important;
  }

  .future-logo img {
    height: 1.75rem;
  }

  .report-hero {
    min-height: 32rem;
  }

  .report-hero h1 {
    font-size: clamp(2.8rem, 13.5vw, 4.4rem) !important;
    line-height: 1.06 !important;
  }

  .report-hero::after {
    right: 1rem;
    bottom: 1.4rem;
    width: 10rem;
  }

  .report-summary .institutional-card,
  .report-body .institutional-card {
    padding: 1.5rem !important;
  }

  .report-summary > .container > .grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .future-footer > div > div {
    gap: 1.25rem;
  }

  .future-footer nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
