:root {
  --bg: #f7f8f3;
  --paper: #fffef9;
  --surface: rgba(255, 254, 249, 0.82);
  --surface-strong: #ffffff;
  --ink: #1d2420;
  --muted: #5d665f;
  --soft: #eef2eb;
  --line: rgba(29, 36, 32, 0.12);
  --grid: rgba(29, 36, 32, 0.055);
  --accent: #2d776f;
  --accent-2: #d98245;
  --accent-dark: #154d47;
  --accent-soft: #dfeee9;
  --sage: #6d9868;
  --navy: #203a45;
  --shadow: 0 22px 70px rgba(34, 46, 40, 0.09);
  --shadow-soft: 0 12px 36px rgba(34, 46, 40, 0.07);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 6%, rgba(45, 119, 111, 0.12), transparent 26%),
    radial-gradient(circle at 22% 16%, rgba(217, 130, 69, 0.10), transparent 25%),
    linear-gradient(180deg, #fbfcf8 0%, var(--bg) 100%);
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.65;
}

@media (min-width: 1180px) {
  body {
    padding-left: 188px;
  }
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent 76%);
  content: "";
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.side-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 188px;
  padding: 34px 20px;
  border-right: 1px solid var(--line);
  background: rgba(247, 248, 243, 0.82);
  backdrop-filter: blur(18px);
}

.side-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  color: var(--ink);
  font-weight: 800;
}

.side-nav__brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ink);
  color: #fffef9;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.side-nav > a:not(.side-nav__brand) {
  display: block;
  margin: 6px 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(29, 36, 32, 0.62);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.86rem;
  transition: color 160ms ease, background 160ms ease;
}

.side-nav > a:not(.side-nav__brand):hover {
  background: var(--soft);
  color: var(--ink);
}

.hero {
  padding: 82px 24px 28px;
}

.hero__inner,
.container {
  width: min(1280px, calc(100vw - 40px));
  margin: 0 auto;
}

.container--narrow {
  width: min(920px, calc(100vw - 48px));
}

.container--abstract {
  width: min(1100px, calc(100vw - 48px));
}

.hero__inner {
  position: relative;
  text-align: center;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.hero__tags span {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 249, 0.62);
  color: rgba(29, 36, 32, 0.62);
  font-size: 0.78rem;
}

.hero__eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1040px;
  margin: 0 auto 22px;
  font-size: clamp(3rem, 6.6vw, 5.35rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero__tagline {
  max-width: 890px;
  margin: 0 auto;
  color: rgba(29, 36, 32, 0.72);
  font-size: clamp(1.05rem, 1.55vw, 1.25rem);
  line-height: 1.72;
}

.hero__authors {
  max-width: 960px;
  margin: 24px auto 0;
  color: rgba(29, 36, 32, 0.82);
  font-size: 0.98rem;
  line-height: 1.65;
}

.hero__affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-top: 10px;
  line-height: 1.7;
  color: rgba(29, 36, 32, 0.58);
}

.hero__affiliations span {
  white-space: nowrap;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 254, 249, 0.78);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(34, 46, 40, 0.04);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 36, 32, 0.24);
  background: #ffffff;
}

.button--primary {
  background: var(--ink);
  border-color: transparent;
  color: #fffef9;
  box-shadow: 0 14px 30px rgba(29, 36, 32, 0.18);
}

.button--primary:hover {
  background: var(--accent-dark);
}

.button--disabled {
  cursor: default;
  color: rgba(29, 36, 32, 0.42);
}

.button--disabled:hover {
  transform: none;
  background: rgba(255, 254, 249, 0.78);
}

.section {
  padding: 54px 0;
}

.section--tint {
  background: rgba(255, 254, 249, 0.42);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section--figure {
  padding: 20px 0 46px;
}

.section--shift {
  padding: 16px 0 52px;
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0 0 18px;
  font-family: "Source Serif 4", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.06;
}

.teaser-statement {
  max-width: 940px;
  margin: 28px auto 0;
  color: rgba(29, 36, 32, 0.72);
  font-size: clamp(1.04rem, 1.45vw, 1.24rem);
  line-height: 1.78;
  text-align: center;
}

.supersense-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: 22px;
  align-items: stretch;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 18%, rgba(45, 119, 111, 0.10), transparent 30%),
    linear-gradient(135deg, rgba(255, 254, 249, 0.92), rgba(241, 246, 238, 0.78));
  box-shadow: var(--shadow-soft);
}

.supersense-panel__copy h2 {
  max-width: 570px;
}

.supersense-panel__copy p {
  margin: 0;
  color: var(--muted);
}

.supersense-flow {
  display: grid;
  grid-template-columns: 1fr auto 1.12fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}

.flow-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 254, 249, 0.80);
}

.flow-card::after {
  position: absolute;
  right: -34px;
  bottom: -42px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(139, 189, 123, 0.16);
  content: "";
}

.flow-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.flow-card strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.18;
}

.flow-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.flow-card--muted {
  opacity: 0.82;
}

.flow-card--active {
  border-color: rgba(45, 119, 111, 0.30);
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 119, 111, 0.14), transparent 42%),
    linear-gradient(135deg, rgba(223, 238, 233, 0.92), rgba(255, 254, 249, 0.90));
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(45, 119, 111, 0.12);
}

.flow-card--active span,
.flow-card--active p {
  color: var(--accent-dark);
}

.flow-arrow {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 1.65rem;
  font-weight: 800;
}

.lead {
  font-size: inherit;
  color: inherit;
}

.abstract-copy p {
  color: var(--ink);
  font-size: clamp(1.03rem, 1.35vw, 1.16rem);
  line-height: 1.72;
  text-align: justify;
  text-wrap: pretty;
}

.abstract-copy h2 {
  text-align: center;
}

.abstract-copy {
  padding: 8px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading p {
  max-width: 980px;
  margin: 0;
  color: var(--muted);
}

.figure-card,
.card,
.table-card,
.result-card,
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.figure-card {
  overflow: hidden;
}

.figure-card--hero {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(34, 46, 40, 0.10);
}

.figure-card img {
  width: 100%;
}

.figure-card figcaption {
  padding: 14px 18px 16px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.58;
}

.equation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.equation-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 254, 249, 0.78);
  box-shadow: var(--shadow-soft);
}

.equation-card__label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.equation {
  overflow-x: auto;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.04rem;
  line-height: 1.35;
  white-space: nowrap;
}

.equation-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.48;
}

.grid--cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 26px;
}

.card::after {
  position: absolute;
  right: -48px;
  top: -48px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(45, 119, 111, 0.08);
  content: "";
}

.card__index {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.10em;
}

.card h3,
.table-card h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
}

.card p,
.table-card p {
  margin: 0;
  color: var(--muted);
}

.stats-grid,
.results-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat,
.result-card {
  padding: 22px;
}

.results-grid--wide {
  margin-bottom: 26px;
}

.stat__value,
.result-card__value {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.stat__label,
.result-card__label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.result-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.table-card {
  padding: 22px;
  overflow-x: auto;
}

.task-result + .task-result,
.result-tables {
  margin-top: 18px;
}

.task-result__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.task-result__heading p {
  margin: 0;
  color: var(--muted);
}

.task-result__badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(22, 50, 71, 0.08);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

th,
td {
  padding: 12px 10px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  border-top: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-row--highlight td {
  background: rgba(45, 119, 111, 0.10);
  font-weight: 700;
}

.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.demo-block {
  margin: 18px 0 10px;
}

.demo-block:first-of-type {
  margin-top: 0;
}

.demo-block__heading {
  max-width: 980px;
}

.demo-block__heading h3 {
  margin: 0 0 8px;
  font-size: 1.24rem;
}

.demo-block__heading p {
  margin: 0;
  color: var(--muted);
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.visual-grid--showcase {
  grid-template-columns: 1fr;
}

.visual-grid--trio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-grid--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.visual-stack {
  display: grid;
  gap: 12px;
}

.visual-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.visual-grid--showcase .visual-card img,
.visual-grid--trio .visual-card img,
.visual-grid--duo .visual-card img {
  aspect-ratio: auto;
  object-fit: contain;
}

.visual-card video {
  display: block;
  width: 100%;
  height: auto;
  background: #111820;
}

.citation {
  overflow-x: auto;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #171d24;
  color: #f7f2ea;
  box-shadow: var(--shadow);
}

.footnote {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 1100px) {
  .hero__inner,
  .supersense-panel {
    grid-template-columns: 1fr;
  }

  .hero__inner {
    min-height: auto;
  }

  .supersense-flow {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }
}

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

@media (max-width: 960px) {
  .grid--cards,
  .stats-grid,
  .results-grid,
  .equation-grid,
  .two-up,
  .visual-grid,
  .visual-grid--trio,
  .visual-grid--duo {
    grid-template-columns: 1fr;
  }

  .task-result__heading {
    display: block;
  }

  .task-result__badge {
    display: inline-flex;
    margin-top: 12px;
  }

  .hero__inner {
    padding: 32px 24px;
  }

}

@media (max-width: 640px) {
  .hero {
    padding: 24px 0 24px;
  }

  .hero__inner,
  .container,
  .container--narrow,
  .container--abstract {
    width: min(100vw - 24px, 1120px);
  }

  .hero__inner {
    padding: 0;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 14vw, 4.2rem);
  }

  .supersense-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .section {
    padding: 20px 0 56px;
  }

  .button {
    width: 100%;
  }

  th,
  td {
    padding: 10px 8px;
  }
}
