:root {
  --bg: #07111f;
  --bg-soft: rgba(11, 21, 39, 0.74);
  --panel: rgba(11, 18, 33, 0.78);
  --panel-strong: rgba(14, 24, 46, 0.94);
  --line: rgba(138, 168, 255, 0.16);
  --text: #eaf1ff;
  --muted: #99abd6;
  --accent: #53f2c7;
  --accent-2: #6ea8ff;
  --accent-3: #ffb86b;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(83, 242, 199, 0.12), transparent 25%),
    radial-gradient(circle at 80% 20%, rgba(110, 168, 255, 0.18), transparent 30%),
    linear-gradient(160deg, #04101d 0%, #081223 45%, #02060f 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  pointer-events: none;
}

.page-shell {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.hero,
.section,
.chart-card,
.table-card {
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.hero {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(180deg, rgba(12, 20, 37, 0.92), rgba(6, 11, 23, 0.82));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(83, 242, 199, 0.28), transparent 70%);
  filter: blur(18px);
}

.topbar,
.hero-grid,
.section-head,
.controls,
.metric-grid,
.hero-stats,
.two-up {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
}

.brandmark,
.title-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brandmark-logo {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 12px rgba(83, 242, 199, 0.24));
}

.hero-logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.title-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
}

.eyebrow,
.section-kicker,
.kicker,
.panel-label {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.76rem;
  color: var(--accent);
}

.toplink,
.button {
  text-decoration: none;
}

.toplink {
  color: var(--muted);
}

.hero-grid,
.two-up {
  display: grid;
  gap: 24px;
}

.hero-grid {
  grid-template-columns: 1.4fr 0.9fr;
  align-items: stretch;
}

.hero-copy h1,
.section-head h2,
.chart-copy h3 {
  margin: 0;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 0.95;
  max-width: 10ch;
  margin-top: 10px;
}

.sequence-name {
  margin: 18px 0 4px;
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  line-height: 0.88;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text);
  text-shadow: 0 0 28px rgba(110, 168, 255, 0.22);
}

.sequence-credit {
  margin: 0 0 14px;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lede,
.chart-copy p,
.section-head p,
.table-summary {
  color: var(--muted);
}

.lede {
  max-width: 60ch;
  font-size: 1.05rem;
  margin: 20px 0 0;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 600;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #061118;
  background: linear-gradient(135deg, var(--accent), #91ffe3);
}

.button-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.hero-panel,
.metric-card,
.chart-card,
.table-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-stats,
.metric-grid {
  display: grid;
  gap: 16px;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.glossary-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.glossary-term {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
}

.glossary-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.hint-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  line-height: 1;
  vertical-align: middle;
  cursor: help;
}

.hero-stats {
  margin-top: 18px;
}

.hero-stat,
.metric-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-stat strong,
.metric-value {
  display: block;
  font-size: 2rem;
  margin-top: 8px;
}

.stat-skeleton {
  height: 88px;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.section {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(5, 12, 24, 0.7);
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.metric-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

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

.metric-detail {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.chart-card,
.table-card {
  padding: 22px;
}

.chart-copy {
  max-width: 60ch;
  margin-bottom: 16px;
}

.chart {
  min-height: 320px;
}

.chart-tall {
  min-height: 520px;
}

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

.controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.controls label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.controls input,
.controls select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
}

.toggle-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 14px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.toggle-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.badge-prime {
  color: var(--accent);
  font-size: 0.75em;
  vertical-align: super;
  margin-left: 2px;
  cursor: default;
}

.badge-palindrome {
  color: var(--accent-3);
  font-size: 0.75em;
  vertical-align: super;
  margin-left: 2px;
  cursor: default;
}

.table-summary {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 10px;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

thead {
  background: var(--panel-strong);
}

th,
td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

td,
th,
code,
.mono {
  font-family: "IBM Plex Mono", monospace;
}

tbody tr:hover {
  background: rgba(110, 168, 255, 0.08);
}

svg {
  width: 100%;
  height: auto;
}

.axis text,
.legend text,
.chart-label {
  fill: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.axis path,
.axis line,
.grid line {
  stroke: rgba(255, 255, 255, 0.12);
}

.tooltip {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 7, 16, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  max-width: 260px;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

@media (max-width: 980px) {

  .hero-grid,
  .two-up,
  .metric-grid,
  .controls {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100vw - 20px, 1280px);
  }

  .hero,
  .section {
    padding: 20px;
  }
}
