:root {
  --topbar-h: 72px;
  --radius: 14px;
  --content-w: 1100px;
  --sidebar-w: 320px;
  --bg: #0a0a0b;
  --bg-elev: #0f1013;
  --bg-elev-2: #14161b;
  --bg-soft: #181b21;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f5f7;
  --muted: #98a2b3;
  --muted-2: #6f7785;
  --cyan: #00ccff;
  --cyan-soft: rgba(0, 204, 255, 0.1);
  --cyan-soft-2: rgba(0, 204, 255, 0.16);
  --green: #15d49c;
  --amber: #ffb020;
  --red: #ff637d;
  --blue: #7ab7ff;
  --shadow-focus: 0 0 0 4px rgba(0, 204, 255, 0.12);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.18);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-display: Montserrat, Inter, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

html[data-theme="light"] {
  --bg: #eeece7;
  --bg-elev: #f6f4ef;
  --bg-elev-2: #ffffff;
  --bg-soft: #ece9e2;
  --line: rgba(23, 25, 28, 0.08);
  --line-strong: rgba(23, 25, 28, 0.14);
  --text: #17191c;
  --muted: #586170;
  --muted-2: #7f8896;
  --cyan: #009fc7;
  --cyan-soft: rgba(0, 159, 199, 0.1);
  --cyan-soft-2: rgba(0, 159, 199, 0.14);
  --shadow-focus: 0 0 0 4px rgba(0, 159, 199, 0.12);
  --shadow-card: 0 8px 24px rgba(12, 18, 28, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(0, 204, 255, 0.08), transparent 32%),
    radial-gradient(circle at top right, rgba(122, 183, 255, 0.08), transparent 24%),
    var(--bg);
}

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

button,
input,
select {
  font: inherit;
}

svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.layout {
  width: min(var(--content-w), calc(100vw - 32px));
  margin: 0 auto;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  width: min(var(--content-w), calc(100vw - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
}

.topbar-brand,
.topbar-actions,
.topbar-nav {
  display: flex;
  align-items: center;
}

.topbar-brand {
  position: relative;
  flex: 0 0 auto;
  width: 104px;
  height: 40px;
}

.topbar-actions {
  gap: 10px;
}

.topbar-logo-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.topbar-logo-light {
  display: none;
}

html[data-theme="light"] .topbar-logo-dark {
  display: none;
}

html[data-theme="light"] .topbar-logo-light {
  display: block;
}

.topbar-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-link {
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-link.active,
.nav-link:hover {
  color: var(--cyan);
  border-color: rgba(0, 204, 255, 0.18);
  background: var(--cyan-soft);
}

.theme-toggle {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev-2);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  background: var(--bg-soft);
}

.theme-toggle-track {
  width: 46px;
  height: 28px;
  padding: 3px;
  display: flex;
  align-items: center;
}

.theme-toggle-thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  transform: translateX(0);
  transition: transform 0.18s ease;
}

html[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(18px);
}

.hero-band {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at top left, rgba(0, 204, 255, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(0, 204, 255, 0.04) 0%, transparent 100%);
}

html[data-theme="light"] .hero-band {
  background:
    radial-gradient(circle at top left, rgba(0, 159, 199, 0.09), transparent 28%),
    linear-gradient(180deg, rgba(0, 159, 199, 0.04) 0%, transparent 100%);
}

.hero-band .layout {
  padding: 48px 28px 36px;
}

.hero-copy {
  max-width: 820px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 7px 12px;
  border: 1px solid rgba(0, 204, 255, 0.22);
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-kicker {
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.hero-kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  animation: pulse 2s infinite;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-subtitle {
  margin: 14px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.hero-search {
  margin-top: 28px;
  max-width: 720px;
}

.search-field {
  position: relative;
  display: block;
}

.search-icon {
  position: absolute;
  top: 14px;
  left: 14px;
  color: var(--muted);
}

.search-field input,
.controls select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev-2);
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.18s ease;
}

.search-field input {
  min-height: 48px;
  padding: 0 16px 0 42px;
}

.search-field input:focus,
.controls select:focus {
  outline: none;
  border-color: rgba(0, 204, 255, 0.32);
  box-shadow: var(--shadow-focus);
}

.content-shell {
  padding: 36px 28px 60px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(280px, var(--sidebar-w)) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.sidebar-shell {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  display: grid;
  gap: 18px;
}

.info-box,
.filters-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 204, 255, 0.35);
  border-radius: 18px;
  background: var(--bg-elev);
  box-shadow:
    0 0 0 1px rgba(0, 204, 255, 0.08) inset,
    0 4px 24px rgba(0, 204, 255, 0.06);
}

.info-box::before,
.filters-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 204, 255, 0.08), transparent 45%);
  pointer-events: none;
}

.info-box {
  padding: 20px 24px;
}

.info-head,
.section-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.info-head h2,
.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 2.3vw, 28px);
  letter-spacing: -0.02em;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(0, 204, 255, 0.2);
  border-radius: 12px;
  background: var(--cyan-soft);
  color: var(--cyan);
}

.info-body {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  max-width: 72ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.filters-panel {
  padding: 20px 24px 24px;
}

.meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.controls {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.controls label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.controls select {
  padding: 0 14px;
}

.faq-groups {
  margin-top: 0;
  display: grid;
  gap: 12px;
}

.module-group {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-elev);
  transition: border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease,
    background 0.18s ease;
  animation: fadeUp 0.35s ease both;
}

.module-group::before,
.faq-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(0, 204, 255, 0.08), transparent 40%);
  transition: opacity 0.18s ease;
}

.module-group:hover,
.faq-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.module-group:hover::before,
.faq-card:hover::before {
  opacity: 1;
}

.module-summary {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

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

.module-summary-main,
.module-summary-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.module-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(0, 204, 255, 0.18);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.module-title {
  font-size: 13px;
  font-weight: 700;
}

.module-count {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.module-chevron {
  color: var(--muted);
  transition: transform 0.18s ease;
}

.module-group[open] .module-chevron {
  transform: rotate(180deg);
}

.module-faqs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 0 18px 18px;
}

.faq-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-elev-2);
  transition: border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease,
    background 0.18s ease;
  animation: fadeUp 0.35s ease both;
}

.faq-card header {
  position: relative;
  z-index: 1;
}

.entity {
  margin: 0 0 8px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.faq-card h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.answer {
  position: relative;
  z-index: 1;
  margin: 12px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.tags {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.empty,
.error {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-elev);
  color: var(--muted);
}

.error {
  border-color: rgba(255, 99, 125, 0.28);
  color: var(--red);
}

.footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px 28px;
  color: var(--muted-2);
  font-size: 12px;
}

.footer-inner a {
  color: var(--cyan);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .topbar-inner,
  .hero-band .layout,
  .content-shell,
  .footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

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

  .sidebar-shell {
    position: static;
  }

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

@media (max-width: 680px) {
  .topbar-inner,
  .topbar-brand,
  .topbar-actions,
  .section-head,
  .info-head,
  .footer-inner {
    flex-wrap: wrap;
  }

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

  .module-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-summary-side {
    width: 100%;
    justify-content: space-between;
  }

  .module-faqs {
    grid-template-columns: 1fr;
  }
}
