/* SPDX-License-Identifier: AGPL-3.0-only */
:root {
  color-scheme: dark;
  --background: #0d171c;
  --panel: #17262c;
  --text: #f1f8f4;
  --muted: #adbfbd;
  --accent: #b8f4b6;
  --border: rgba(193, 226, 214, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(ellipse at 80% 0%, #254b47 0, transparent 32%), var(--background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

button,
select {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}

button,
select {
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 20;
  background: var(--accent);
  color: #13251b;
  padding: 10px;
}

.skip-link:focus {
  top: 16px;
}

.site-header,
main,
footer {
  width: min(1220px, calc(100% - 64px));
  margin: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -0.7px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.35px;
}

nav {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 14px;
}

nav > a:not(.button) {
  color: var(--muted);
}

nav > a:hover {
  color: var(--accent);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  border-radius: 13px;
  padding: 15px 24px;
  background: var(--accent);
  color: #10271f;
  font-weight: 650;
  white-space: nowrap;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-3px);
  background: #d3ffd0;
}

.button.compact {
  padding: 10px 17px;
  border-radius: 10px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 2.4px;
  color: var(--accent);
}

.accent-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 9px;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 36px;
  align-items: center;
  padding: 70px 0 64px;
}

h1 {
  font-size: clamp(48px, 5.7vw, 78px);
  line-height: 1.07;
  font-weight: 650;
  letter-spacing: -4px;
  margin: 24px 0;
}

h1 span {
  color: var(--accent);
}

.hero-description {
  max-width: 520px;
  font-size: 18px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 26px;
  margin: 30px 0;
}

.text-link {
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}

.text-link:hover {
  color: var(--accent);
}

.hero-details {
  display: flex;
  flex-wrap: wrap;
  gap: 19px;
  font-size: 11px;
  color: var(--muted);
}

.hero-art {
  min-height: 440px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 32px;
  background: linear-gradient(140deg, #25534766, #1b293a99);
}

.leaf-illustration {
  width: 82%;
  height: 370px;
  position: relative;
  animation: float 7s ease-in-out infinite;
}

.orbit {
  position: absolute;
  border: 1px solid #b8f4b622;
  border-radius: 50%;
  width: 430px;
  height: 430px;
}

.orbit-one {
  transform: translate(65px, -40px);
}

.orbit-two {
  width: 330px;
  height: 330px;
  transform: translate(-120px, 90px);
}

.art-caption {
  position: absolute;
  top: 23px;
  left: 26px;
  font-size: 10px;
  letter-spacing: 1.8px;
}

.art-note {
  position: absolute;
  bottom: 20px;
  color: #b7cebd;
  font-size: 11px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.stat-card {
  padding: 23px;
  border-radius: 20px;
  background: linear-gradient(145deg, #1b3331, #17252c);
  border: 1px solid var(--border);
}

.stat-card > span {
  font-size: 12px;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  font-size: 43px;
  line-height: 1.5;
  letter-spacing: -1.8px;
  font-weight: 600;
}

.stat-card small {
  font-size: 15px;
  letter-spacing: 0;
  margin-left: 5px;
  color: var(--accent);
}

.stat-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

.live-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  margin-top: 24px;
  padding: 32px;
  border-radius: 22px;
  background: linear-gradient(110deg, #263d49, #233b35);
  border: 1px solid var(--border);
}

h2 {
  font-size: clamp(26px, 3vw, 35px);
  letter-spacing: -1px;
  line-height: 1.25;
  font-weight: 600;
  margin: 10px 0 15px;
}

.live-card p {
  font-size: 14px;
  margin: 7px 0;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.live-card .muted {
  max-width: 650px;
  font-size: 12px;
}

.section {
  padding-top: 76px;
}

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

.section-heading > p {
  max-width: 300px;
  font-size: 13px;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.controls {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px;
  align-items: center;
}

.segmented {
  display: flex;
  padding: 4px;
  gap: 3px;
  background: #0d1c22;
  border-radius: 11px;
}

.segmented button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 17px;
  border-radius: 8px;
  font-size: 12px;
}

.segmented button[aria-pressed="true"] {
  background: #d3eedb;
  color: #172f23;
  font-weight: 650;
}

.select-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

label {
  font-size: 10px;
  color: var(--muted);
  display: block;
}

select {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 8px 32px 8px 10px;
  color: var(--text);
  border: 1px solid #3a545a;
  border-radius: 8px;
  background: #102229;
  font-size: 12px;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 18px;
}

.chart-panel {
  padding: 24px;
  min-width: 0;
}

h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.chart-panel p {
  margin: 6px 0 22px;
}

.performance-row {
  margin: 19px 0;
}

.row-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  margin-bottom: 7px;
}

.row-title strong {
  color: var(--text);
  font-weight: 600;
}

.bar-track {
  background: #273a40;
  border-radius: 5px;
  height: 10px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 450ms ease;
}

#scatter-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 10px;
  font-size: 10px;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.table-panel {
  overflow-x: auto;
  margin-top: 20px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 880px;
  font-size: 12px;
}

caption {
  text-align: left;
  padding: 19px 23px;
  font-size: 12px;
  color: var(--muted);
}

th,
td {
  text-align: right;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

th {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}

th:first-child,
td:first-child {
  text-align: left;
}

td:first-child small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

tr.proposed {
  background: #b8f4b60a;
}

tr.proposed td:first-child {
  color: var(--accent);
}

.class-select {
  min-width: 190px;
}

.class-panel {
  padding: 24px;
}

.class-panel .legend {
  margin: 0 0 24px;
}

.class-row {
  display: grid;
  grid-template-columns: 255px 1fr;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding: 19px 0;
}

.class-name {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.class-name small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}

.class-bars {
  display: grid;
  gap: 6px;
}

.class-bar-line {
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  gap: 12px;
}

.class-bar-line .bar-track {
  height: 8px;
}

.class-bar-line strong {
  font-size: 10px;
  text-align: right;
  font-weight: 500;
}

.scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin: 0 60px 12px 275px;
}

.method-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 65px;
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(120deg, #283644, #204539);
}

.method-card p {
  color: #c0d0ce;
  font-size: 14px;
  max-width: 580px;
}

.method-flow {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 12px;
}

.method-flow span:nth-child(odd) {
  border: 1px solid #8dbdaf55;
  border-radius: 9px;
  padding: 8px 18px;
  width: 230px;
  text-align: center;
  background: #152c2f;
  color: var(--text);
}

.research-note {
  color: var(--muted);
  font-size: 11px;
  margin: 28px 4px 50px;
}

footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}

.brand-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.noscript {
  padding: 20px;
  text-align: center;
}

@keyframes float {
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@media (max-width: 1000px) {
  .site-header,
  main,
  footer {
    width: calc(100% - 40px);
  }
  h1 {
    letter-spacing: -2.7px;
  }
  .hero {
    gap: 24px;
  }
  .hero-art {
    min-height: 360px;
  }
  .leaf-illustration {
    height: 300px;
  }
  .stat-card {
    padding: 18px;
  }
  .stat-card strong {
    font-size: 35px;
  }
  .stat-card small {
    font-size: 12px;
  }
  .chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header,
  main,
  footer {
    width: calc(100% - 32px);
  }
  .site-header {
    min-height: 82px;
  }
  nav {
    gap: 12px;
  }
  nav > a:not(.button) {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 45px 0 30px;
  }
  h1 {
    font-size: 52px;
  }
  .hero-description {
    font-size: 16px;
  }
  .hero-art {
    min-height: 300px;
  }
  .leaf-illustration {
    height: 280px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-card strong {
    font-size: 33px;
  }
  .stat-card > span {
    font-size: 10px;
  }
  .live-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    padding: 24px;
  }
  .section {
    padding-top: 48px;
  }
  .section-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }
  .section-heading > p {
    margin: 0;
  }
  .select-controls {
    width: 100%;
    gap: 12px;
  }
  .select-controls label {
    flex: 1;
    min-width: 180px;
  }
  .segmented {
    width: 100%;
  }
  .segmented button {
    flex: 1;
    padding: 9px;
  }
  .chart-panel,
  .class-panel {
    padding: 18px;
  }
  .class-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .scale {
    margin-left: 0;
  }
  .method-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
