:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --ink: #15202a;
  --muted: #647280;
  --line: #d8e1ea;
  --hero: #10171d;
  --hero-soft: #18232b;
  --teal: #0b8f82;
  --blue: #2b66d9;
  --rose: #b93f66;
  --amber: #b67518;
  --violet: #6957c2;
  --shadow: 0 18px 45px rgba(23, 35, 48, 0.11);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: var(--hero);
  color: #f5f9fc;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  min-height: 74px;
  margin: 0 auto;
}

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

.brand-group {
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(245, 249, 252, 0.78);
  font-size: 0.94rem;
}

.creator-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(139, 227, 218, 0.36);
  border-radius: 999px;
  background: rgba(139, 227, 218, 0.1);
  color: #bff4ee;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.creator-link:hover {
  color: #ffffff;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 120px 0 86px;
}

.kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .kicker {
  color: #8be3da;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: 4.8rem;
  line-height: 0.97;
  letter-spacing: 0;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.hero-copy {
  max-width: 680px;
  margin-bottom: 32px;
  color: rgba(245, 249, 252, 0.78);
  font-size: 1.2rem;
}

.hero-actions,
.footer p,
.panel-heading,
.results-heading,
.legend,
.paper-meta,
.paper-links,
.tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 750;
  text-decoration: none;
}

.button.primary {
  background: #f8fbff;
  color: #10171d;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.28);
  color: #f8fbff;
  background: rgba(255, 255, 255, 0.08);
}

.button.reset {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(1180px, calc(100% - 40px));
  margin: -58px auto 0;
  position: relative;
  z-index: 4;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat {
  min-height: 116px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat-value {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 2.15rem;
  font-weight: 850;
  line-height: 1;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.controls-band,
.landscape-section {
  width: min(1180px, calc(100% - 40px));
  margin: 66px auto 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-heading h2,
.results-heading h2,
.panel-heading h2 {
  margin-bottom: 8px;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.section-copy {
  color: var(--muted);
}

.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) repeat(4, minmax(145px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filters label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 750;
}

.filters input[type="search"],
.filters select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
}

.filters input:focus,
.filters select:focus,
.segmented button:focus,
.category-card:focus,
.chip-button:focus,
.button:focus {
  outline: 3px solid rgba(43, 102, 217, 0.24);
  outline-offset: 2px;
}

.toggle {
  min-height: 42px;
  align-content: center;
  grid-template-columns: auto auto;
  align-items: center;
  color: var(--ink);
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.segmented button,
.chip-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
}

.segmented button.is-active,
.chip-button.is-active {
  border-color: rgba(11, 143, 130, 0.6);
  background: rgba(11, 143, 130, 0.1);
  color: #075d56;
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 26px auto 0;
  align-items: start;
}

.sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 18px;
}

.panel-heading,
.results-heading {
  justify-content: space-between;
}

.panel-heading span,
.result-count {
  color: var(--muted);
  font-weight: 750;
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-card {
  display: grid;
  width: 100%;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.category-card:hover,
.category-card.is-active {
  border-color: rgba(43, 102, 217, 0.46);
  box-shadow: 0 12px 28px rgba(23, 35, 48, 0.08);
}

.category-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.96rem;
  font-weight: 850;
}

.category-desc {
  color: var(--muted);
  font-size: 0.88rem;
}

.mini-counts,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-counts span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #465566;
  font-size: 0.76rem;
  font-weight: 750;
}

.facet-block {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.facet-block h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.results {
  min-width: 0;
}

.result-groups {
  display: grid;
  gap: 22px;
}

.result-group {
  display: grid;
  gap: 12px;
}

.result-group h3 {
  margin: 0;
  color: #324354;
  font-size: 1.02rem;
}

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

.paper-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 188px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.paper-meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.section-badge {
  color: #ffffff;
  border-radius: 999px;
  padding: 3px 8px;
}

.section-badge[data-section="Attack"] {
  background: var(--rose);
}

.section-badge[data-section="Defense"] {
  background: var(--teal);
}

.section-badge[data-section="Benchmark & Measurement"] {
  background: var(--blue);
}

.section-badge[data-section="Other"] {
  background: var(--amber);
}

.paper-card h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.36;
  letter-spacing: 0;
}

.paper-card h4 a {
  color: var(--ink);
  text-decoration-color: rgba(43, 102, 217, 0.35);
  text-underline-offset: 3px;
}

.paper-category {
  color: var(--muted);
  font-size: 0.84rem;
}

.paper-links {
  align-self: end;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 750;
}

.paper-links a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.empty-state {
  padding: 28px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.legend {
  margin-bottom: 16px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 750;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.landscape-chart {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.landscape-row {
  display: grid;
  grid-template-columns: minmax(170px, 250px) minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}

.landscape-label {
  min-width: 0;
  color: #324354;
  font-size: 0.9rem;
  font-weight: 800;
}

.stack-bar {
  display: flex;
  height: 24px;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--radius);
}

.stack-segment {
  min-width: 3px;
}

.stack-segment[data-section="Attack"] {
  background: var(--rose);
}

.stack-segment[data-section="Defense"] {
  background: var(--teal);
}

.stack-segment[data-section="Benchmark & Measurement"] {
  background: var(--blue);
}

.stack-segment[data-section="Other"] {
  background: var(--amber);
}

.stack-total {
  color: var(--muted);
  font-weight: 850;
  text-align: right;
}

.footer {
  width: min(1180px, calc(100% - 40px));
  margin: 70px auto 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer .credit {
  color: var(--ink);
  font-weight: 800;
}

.footer a {
  color: var(--blue);
  font-weight: 750;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.footer code {
  color: #324354;
  font-size: 0.86em;
}

@media (max-width: 1080px) {
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-box {
    grid-column: 1 / -1;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

@media (max-width: 760px) {
  .hero {
    min-height: 560px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .hero-content {
    padding-top: 72px;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .hero-copy {
    font-size: 1.02rem;
  }

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

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .stat:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .filters,
  .category-list,
  .paper-grid {
    grid-template-columns: 1fr;
  }

  .landscape-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .stack-total {
    text-align: left;
  }
}

@media (max-width: 460px) {
  .topbar,
  .hero-content,
  .stats-band,
  .controls-band,
  .layout,
  .landscape-section,
  .footer {
    width: min(1180px, calc(100% - 28px));
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .stats-band {
    grid-template-columns: 1fr;
  }

  .stat,
  .stat:nth-child(odd) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: 0;
  }
}
