body {
  background:
    radial-gradient(900px 520px at 10% 4%, var(--glowEmerald), transparent 62%),
    radial-gradient(800px 480px at 92% 10%, var(--glowBlue), transparent 64%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 999px;
  background: #06eca3;
  color: #020617;
  font-weight: 700;
  padding: 0.65rem 1rem;
  transition: transform 160ms ease;
}

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

.whitepaper-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--bg0) 82%, transparent);
  backdrop-filter: blur(18px);
}

.header-inner,
.hero-inner,
.publication-layout,
.site-footer-inner,
.mobile-contents {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.header-inner {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.brand img {
  width: auto;
  height: 2rem;
}

.logo-dark,
html.dark .logo-light {
  display: none;
}

html.dark .logo-dark {
  display: block;
}

.desktop-nav,
.header-actions,
.publication-meta,
.fallback-footer-links {
  display: flex;
  align-items: center;
}

.desktop-nav {
  gap: 0.25rem;
  margin-left: auto;
  justify-content: flex-end;
}

.desktop-nav a,
.mobile-nav a {
  border-radius: 999px;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 650;
  padding: 0.55rem 0.75rem;
}

html.dark .desktop-nav a,
html.dark .mobile-nav a {
  color: rgba(255, 255, 255, 0.82);
}

.desktop-nav a:hover,
.desktop-nav a[aria-current='page'],
.mobile-nav a:hover,
.mobile-nav a[aria-current='page'] {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

html.dark .desktop-nav a:hover,
html.dark .desktop-nav a[aria-current='page'],
html.dark .mobile-nav a:hover,
html.dark .mobile-nav a[aria-current='page'] {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.header-actions {
  gap: 0.5rem;
}

.icon-button,
.menu-button {
  border: 1px solid var(--stroke);
  background: rgba(15, 23, 42, 0.04);
  color: #334155;
  border-radius: 999px;
  min-height: 2.25rem;
  font-weight: 650;
}

html.dark .icon-button,
html.dark .menu-button {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.icon-button {
  width: 2.25rem;
  display: grid;
  place-items: center;
}

.menu-button {
  display: none;
  padding-inline: 0.85rem;
  font-size: 0.875rem;
}

.theme-moon,
html.dark .theme-sun {
  display: none;
}

html.dark .theme-moon {
  display: inline;
}

.mobile-nav {
  border-top: 1px solid var(--stroke);
  padding: 0.75rem 1rem 1rem;
}

.mobile-nav a {
  display: block;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.publication-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--stroke);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(5rem, 12vw, 9rem);
  text-align: center;
}

.hero-orb {
  position: absolute;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
  pointer-events: none;
}

.hero-orb-left {
  left: -18rem;
  top: -14rem;
  background: #06eca3;
}

.hero-orb-right {
  right: -17rem;
  bottom: -18rem;
  background: #2aa9ff;
}

.eyebrow,
.section-kicker,
.contents-label {
  color: #0f9881;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

html.dark .eyebrow,
html.dark .section-kicker,
html.dark .contents-label {
  color: #5eead4;
}

.publication-hero h1 {
  margin-top: 0.8rem;
  font-family: 'Space Grotesk', Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.tagline {
  margin-top: 1.25rem;
  background: linear-gradient(90deg, #0f9881, #168bd2);
  background-clip: text;
  color: transparent;
  font-family: 'Space Grotesk', Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 600;
}

html.dark .tagline {
  background-image: linear-gradient(90deg, #5eead4, #7dd3fc);
}

.publication-meta {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

.publication-meta span {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: color-mix(in srgb, var(--cardA) 86%, transparent);
  color: #475569;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.45rem 0.8rem;
}

html.dark .publication-meta span {
  color: rgba(255, 255, 255, 0.76);
}

.hero-summary {
  max-width: 46rem;
  margin: 2rem auto 0;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.75;
}

html.dark .hero-summary {
  color: rgba(226, 232, 240, 0.78);
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #06eca3, #2aa9ff);
  color: #020617;
  font-size: 0.9rem;
  font-weight: 750;
  padding: 0.75rem 1.15rem;
  box-shadow: 0 16px 50px rgba(42, 169, 255, 0.16);
}

.publication-layout {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  align-items: start;
  gap: 2rem;
  padding-block: 4rem 6rem;
}

.contents-panel {
  position: sticky;
  top: 6rem;
  min-width: 0;
  padding: 0.5rem 0;
}

.contents-nav {
  display: grid;
  gap: 0.15rem;
  margin-top: 1rem;
  border-left: 1px solid var(--stroke);
}

.contents-nav a {
  position: relative;
  display: block;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.35;
  padding: 0.45rem 0.8rem;
}

.contents-nav a:hover,
.contents-nav a.is-active {
  border-left-color: #0f9881;
  color: #0f766e;
}

html.dark .contents-nav a {
  color: rgba(203, 213, 225, 0.62);
}

html.dark .contents-nav a:hover,
html.dark .contents-nav a.is-active {
  border-left-color: #5eead4;
  color: #99f6e4;
}

.contents-version {
  margin-top: 1.25rem;
  color: #94a3b8;
  font-size: 0.72rem;
}

.mobile-contents {
  display: none;
}

.whitepaper-article {
  max-width: 52rem;
  min-width: 0;
  border-radius: 1.75rem;
  padding: clamp(1.5rem, 4vw, 4rem);
}

.paper-section {
  scroll-margin-top: 6rem;
}

.paper-section + .paper-section {
  margin-top: 4.5rem;
  padding-top: 4.5rem;
  border-top: 1px solid var(--stroke);
}

.paper-section h2,
.paper-section h3 {
  scroll-margin-top: 6rem;
  font-family: 'Space Grotesk', Inter, ui-sans-serif, system-ui, sans-serif;
  color: #0f172a;
  font-weight: 700;
  letter-spacing: -0.03em;
}

html.dark .paper-section h2,
html.dark .paper-section h3 {
  color: #f8fafc;
}

.paper-section h2 {
  margin-top: 0.45rem;
  margin-bottom: 1.5rem;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  line-height: 1.15;
}

.paper-section h3 {
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
  color: #0f9881;
  font-size: 1.15rem;
  line-height: 1.3;
}

html.dark .paper-section h3 {
  color: #5eead4;
}

.paper-section p {
  color: #334155;
  font-size: 1rem;
  line-height: 1.8;
}

html.dark .paper-section p {
  color: rgba(226, 232, 240, 0.8);
}

.paper-section p + p {
  margin-top: 1.25rem;
}

.paper-section a,
.article-footer a {
  color: #087f73;
  text-decoration: underline;
  text-decoration-color: rgba(15, 152, 129, 0.35);
  text-underline-offset: 0.2em;
}

html.dark .paper-section a,
html.dark .article-footer a {
  color: #5eead4;
  text-decoration-color: rgba(94, 234, 212, 0.35);
}

.paper-section code {
  border: 1px solid var(--stroke);
  border-radius: 0.4rem;
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.86em;
  padding: 0.12rem 0.35rem;
  overflow-wrap: anywhere;
}

html.dark .paper-section code {
  background: rgba(255, 255, 255, 0.07);
}

.table-scroll {
  margin-block: 1.75rem;
  overflow-x: auto;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  outline: none;
}

.table-scroll:focus-visible {
  box-shadow: 0 0 0 3px rgba(42, 169, 255, 0.35);
}

.paper-section table {
  width: 100%;
  min-width: 39rem;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.5;
}

.paper-section caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.paper-section th,
.paper-section td {
  border-bottom: 1px solid var(--stroke);
  color: #334155;
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
}

html.dark .paper-section th,
html.dark .paper-section td {
  color: rgba(226, 232, 240, 0.8);
}

.paper-section tr:last-child th,
.paper-section tr:last-child td {
  border-bottom: 0;
}

.paper-section th {
  background: rgba(15, 23, 42, 0.045);
  color: #0f172a;
  font-weight: 700;
}

html.dark .paper-section th {
  background: rgba(255, 255, 255, 0.055);
  color: #f8fafc;
}

.paper-section tbody th {
  width: 12rem;
}

.contract-address {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-wrap: anywhere;
}

.conclusion-section {
  position: relative;
}

.closing-line {
  margin-top: 1.75rem !important;
  border-left: 3px solid #0f9881;
  color: #0f172a !important;
  font-family: 'Space Grotesk', Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.08rem !important;
  font-weight: 650;
  padding-left: 1.25rem;
}

html.dark .closing-line {
  border-left-color: #5eead4;
  color: #f8fafc !important;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--stroke);
  color: #64748b;
  font-size: 0.8rem;
}

.article-footer a {
  font-weight: 700;
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--stroke);
}

.site-footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 2rem;
  padding-block: 3rem;
  color: #64748b;
  font-size: 0.82rem;
}

.fallback-footer-links {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

.fallback-footer-links a:hover {
  color: #0f172a;
}

html.dark .fallback-footer-links a:hover {
  color: white;
}

.site-footer-inner > p {
  grid-column: 1 / -1;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(42, 169, 255, 0.5);
  outline-offset: 3px;
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
  }

  .publication-layout {
    display: block;
    padding-top: 1.5rem;
  }

  .contents-panel {
    display: none;
  }

  .mobile-contents {
    display: block;
    margin-top: 1.5rem;
    border-radius: 1rem;
    padding: 0.9rem 1rem;
  }

  .mobile-contents summary {
    color: #0f172a;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
  }

  html.dark .mobile-contents summary {
    color: #f8fafc;
  }

  .mobile-contents nav {
    display: grid;
    gap: 0.2rem;
    margin-top: 0.75rem;
  }

  .mobile-contents a {
    border-radius: 0.65rem;
    color: #64748b;
    font-size: 0.82rem;
    padding: 0.5rem 0.65rem;
  }

  html.dark .mobile-contents a {
    color: rgba(226, 232, 240, 0.72);
  }
}

@media (max-width: 640px) {
  .header-inner,
  .hero-inner,
  .publication-layout,
  .site-footer-inner,
  .mobile-contents {
    width: min(100% - 1.25rem, 72rem);
  }

  .hero-inner {
    padding-block: 4rem 4.5rem;
  }

  .hero-summary {
    font-size: 0.96rem;
    line-height: 1.7;
  }

  .publication-meta {
    gap: 0.4rem;
  }

  .publication-meta span {
    font-size: 0.72rem;
  }

  .whitepaper-article {
    border-radius: 1.2rem;
    padding: 1.25rem;
  }

  .paper-section + .paper-section {
    margin-top: 3.5rem;
    padding-top: 3.5rem;
  }

  .paper-section p {
    font-size: 0.96rem;
    line-height: 1.72;
  }

  .article-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .fallback-footer-links {
    justify-content: flex-start;
  }

  .site-footer-inner > p {
    grid-column: auto;
  }
}

@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;
  }
}

@media print {
  .whitepaper-header,
  .publication-hero .read-link,
  .contents-panel,
  .mobile-contents,
  .site-footer {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .publication-layout {
    display: block;
    width: 100%;
    padding: 0;
  }

  .whitepaper-article {
    max-width: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .paper-section p,
  .paper-section th,
  .paper-section td {
    color: black !important;
  }
}
