:root {
  --bg: #07111f;
  --bg-soft: #0d1830;
  --text: #eef4ff;
  --muted: #9cabc6;
  --accent: #6bd3ff;
  --accent-strong: #39b6f1;
  --warm: #ffd06a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(125, 164, 255, 0.22);
  --shadow: 0 28px 60px rgba(2, 8, 20, 0.42);
  --container: 1200px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(6, 12, 24, 0.98), rgba(7, 17, 31, 1)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 48px);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
}

a {
  color: inherit;
}

.page-shell {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
  position: relative;
}

.ambient {
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.24;
}

.ambient-one {
  width: 260px;
  height: 260px;
  top: 160px;
  right: 2%;
  background: rgba(107, 211, 255, 0.28);
}

.ambient-two {
  width: 300px;
  height: 300px;
  bottom: 80px;
  left: 4%;
  background: rgba(255, 208, 106, 0.16);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 0;
  background: rgba(6, 11, 21, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(128, 146, 184, 0.12);
}

.header-shell {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

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

.brand-mark {
  display: none;
}

.brand-copy strong {
  font-family: "Syne", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7f95ff;
}

.brand-copy span {
  display: none;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 4px;
}

.top-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #bac6de;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: "DM Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  transition: 180ms ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: #edf3ff;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.top-nav a.is-active {
  color: #ffffff;
  background: rgba(72, 104, 239, 0.18);
  border-color: rgba(101, 132, 255, 0.45);
}

main {
  padding: 4.6rem 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: 2.2rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--warm);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: clamp(2.8rem, 4.8vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  max-width: 11ch;
}

.lede,
.results-line,
.site-footer p,
.topic-copy,
.hero-metric .metric-label {
  color: var(--muted);
}

.lede {
  max-width: 64ch;
  margin: 1.4rem 0 0;
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-note {
  margin: 1rem 0 0;
  color: #c9d5ea;
  font-size: 0.96rem;
  line-height: 1.7;
}

.hero-panel {
  display: grid;
  gap: 1rem;
}

.hero-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hero-metric,
.topic-item,
.toolbar-shell {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 25, 46, 0.76), rgba(7, 17, 31, 0.9));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-metric {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
}

.hero-metric .metric-label {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-metric strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.08rem;
}

.toolbar-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 580px;
  padding: 0.95rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.search-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: flex-end;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: 180ms ease;
}

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

.button-secondary {
  background: rgba(7, 17, 31, 0.46);
  border-color: var(--border-strong);
  color: var(--text);
}

.results-line {
  margin: 1rem 0 1.2rem;
  font-size: 0.96rem;
}

.topic-list {
  display: grid;
  gap: 1rem;
}

.topic-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.topic-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.2rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  font-weight: 700;
  line-height: 1.25;
}

.topic-item summary::-webkit-details-marker {
  display: none;
}

.topic-item summary::after {
  content: "+";
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.4rem;
  flex: 0 0 auto;
}

.topic-item[open] summary::after {
  content: "-";
}

.topic-heading-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.topic-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3rem;
  padding: 0.38rem 0.5rem;
  border-radius: 999px;
  background: rgba(107, 211, 255, 0.08);
  border: 1px solid rgba(107, 211, 255, 0.16);
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  line-height: 1;
}

.topic-title {
  display: block;
}

.topic-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topic-copy {
  margin: 0;
  padding: 0 1.45rem 1.35rem 3.8rem;
  line-height: 1.8;
}

.topic-copy li + li {
  margin-top: 0.75rem;
}

.topic-copy li {
  color: #dbe8ff;
}

.topic-copy strong {
  color: #f5f8ff;
  font-weight: 700;
}

.topic-copy code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.94em;
  background: rgba(6, 11, 21, 0.9);
  border: 1px solid rgba(107, 211, 255, 0.16);
  color: #7be0ff;
  padding: 0.08rem 0.42rem;
  border-radius: 0.42rem;
  white-space: normal;
  word-break: break-word;
}

.empty-state {
  margin: 1rem 0 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0 2.6rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.92rem;
}

.footer-links {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.footer-link {
  text-decoration: none;
  color: #c9d5ea;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 1380px) {
  .header-shell {
    gap: 12px;
  }

  .top-nav a {
    padding: 8px 10px;
    font-size: 0.88rem;
  }
}

@media (max-width: 1180px) {
  .header-shell {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 0;
  }

  .top-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .toolbar-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions {
    justify-content: stretch;
  }

  .hero-metric-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-actions .button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 1.2rem), var(--container));
  }

  main {
    padding-top: 3.6rem;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.8rem);
  }

  .topic-item summary {
    align-items: flex-start;
  }

  .topic-heading-wrap {
    gap: 0.7rem;
  }

  .topic-meta {
    display: none;
  }

  .topic-copy {
    padding: 0 1rem 1.2rem 2.9rem;
  }

  .button {
    width: 100%;
  }
}
