@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --body: #0a0014;
  --bg: #1b0a2a;
  --bg-2: #12001f;
  --panel: rgba(27, 10, 42, 0.86);
  --panel-2: rgba(18, 0, 31, 0.95);
  --theme: #a259ff;
  --theme-2: #6f38c5;
  --header: #f3e9ff;
  --text: #cbb3ff;
  --text-soft: #bda1f2;
  --stroke: rgba(195, 162, 255, 0.18);
  --stroke-strong: rgba(162, 89, 255, 0.4);
  --success: #8fffa6;
  --warning: #ffd76b;
  --danger: #ff8ea2;
  --select-menu-bg: #f8f4ff;
  --select-menu-text: #281638;
  --select-menu-disabled: #716779;
  --shadow: 0 30px 80px rgba(12, 0, 28, 0.48);
  --radius: 24px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(162, 89, 255, 0.22), transparent 24%),
    radial-gradient(circle at 12% 20%, rgba(111, 56, 197, 0.18), transparent 18%),
    radial-gradient(circle at 86% 24%, rgba(195, 162, 255, 0.08), transparent 16%),
    linear-gradient(180deg, var(--body), var(--bg-2) 34%, var(--bg) 100%);
}

body {
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.18;
  mask-image: radial-gradient(circle at top, black 18%, transparent 82%);
}

.page-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(96px);
  opacity: 0.22;
  pointer-events: none;
}

.page-glow-left {
  top: -140px;
  left: -120px;
  background: rgba(162, 89, 255, 0.9);
}

.page-glow-right {
  top: 140px;
  right: -160px;
  background: rgba(111, 56, 197, 0.75);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow,
.section-kicker,
.stat-label,
.route-label,
.section-head p,
.mini-head p {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.brand-block {
  display: grid;
  gap: 6px;
}

.brand-mark {
  font-family: "Montserrat", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--header);
  text-decoration: none;
}

.header-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-chip {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  color: var(--header);
  font: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-chip.active,
.nav-chip:hover {
  border-color: var(--stroke-strong);
  background: rgba(162, 89, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(162, 89, 255, 0.08) inset;
}

.header-actions {
  display: flex;
  gap: 10px;
  justify-content: end;
  flex-wrap: wrap;
}

.hero-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  padding: 42px 36px;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--stroke);
  background:
    radial-gradient(circle at top, rgba(162, 89, 255, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(27, 10, 42, 0.9), rgba(18, 0, 31, 0.96));
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.hero-copy h1 {
  margin: 12px 0 18px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 0.98;
  color: var(--header);
}

.hero-copy h1::after {
  content: "";
  display: block;
  width: 130px;
  height: 4px;
  margin-top: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--theme), rgba(162, 89, 255, 0.1));
}

.hero-text {
  max-width: 62ch;
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.flow-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.flow-card span {
  color: var(--text-soft);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
}

.flow-card strong {
  color: var(--header);
  font-family: "Montserrat", sans-serif;
}

.flow-card p {
  margin: 0;
  line-height: 1.7;
}

.connect-card,
.status-banner,
.surface-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(27, 10, 42, 0.9), rgba(18, 0, 31, 0.96));
  box-shadow: var(--shadow);
}

.connect-card {
  padding: 24px;
}

.connect-card h2,
.section-head h2,
.mini-head h3 {
  margin: 8px 0 0;
  font-family: "Montserrat", sans-serif;
  color: var(--header);
}

.field,
.form-grid {
  display: grid;
  gap: 14px;
}

.field label {
  color: var(--header);
  font-size: 0.95rem;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 2px;
  color: var(--header);
  cursor: pointer;
}

.toggle-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--theme);
}

.toggle-field span {
  line-height: 1.4;
}

.field input,
.field select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--header);
  font: inherit;
  padding: 14px 15px;
  outline: none;
  transition: all 0.18s ease;
}

.field input::placeholder {
  color: rgba(203, 179, 255, 0.55);
}

.field select option {
  background: var(--select-menu-bg);
  color: var(--select-menu-text);
}

.field select option:disabled {
  color: var(--select-menu-disabled);
}

.field input:focus,
.field select:focus {
  border-color: var(--theme);
  box-shadow: 0 0 0 4px rgba(162, 89, 255, 0.14);
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 0;
  background: var(--theme);
  color: var(--bg-2);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  transform: translateY(-1px);
  background: #b77aff;
}

.theme-btn.border-btn {
  background: transparent;
  color: var(--header);
  border: 1px solid var(--stroke);
}

.theme-btn.border-btn:hover {
  border-color: var(--stroke-strong);
  background: rgba(162, 89, 255, 0.08);
}

.connect-actions,
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.route-meta {
  display: grid;
  gap: 4px;
  margin-top: 18px;
}

.route-meta strong {
  font-family: "Montserrat", sans-serif;
  color: var(--header);
}

.subtle-panel,
.action-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  line-height: 1.7;
}

.status-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: 20px;
}

.status-banner strong {
  display: block;
  margin-top: 6px;
  font-family: "Montserrat", sans-serif;
  font-size: 1.3rem;
  color: var(--header);
}

.status-banner-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.84rem;
}

.status-badge.muted {
  color: var(--header);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.status-badge.success {
  color: #eff0ff;
  background: rgba(162, 89, 255, 0.18);
  border-color: rgba(162, 89, 255, 0.36);
}

.status-badge.warning {
  color: #fff0c4;
  background: rgba(255, 215, 107, 0.14);
  border-color: rgba(255, 215, 107, 0.28);
}

.status-badge.danger {
  color: #ffd4dc;
  background: rgba(255, 142, 162, 0.14);
  border-color: rgba(255, 142, 162, 0.28);
}

.workspace {
  display: grid;
  gap: 20px;
}

.panel-view {
  display: none;
  gap: 18px;
}

.panel-view.active {
  display: grid;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.overview-pillset {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.overview-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(162, 89, 255, 0.24);
  background: rgba(162, 89, 255, 0.1);
  color: var(--header);
  font-size: 0.82rem;
}

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

.stat-card {
  position: relative;
  padding: 26px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(27, 10, 42, 0.9), rgba(18, 0, 31, 0.96));
  box-shadow: var(--shadow);
}

.stat-card::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--theme), rgba(162, 89, 255, 0.15));
}

.stat-card strong {
  display: block;
  margin-top: 18px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2.6rem, 4vw, 4rem);
  color: var(--header);
}

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

.surface-card {
  padding: 22px;
}

.mini-head {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.meta-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.meta-list div {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.meta-list dt {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.meta-list dd {
  margin: 8px 0 0;
  color: var(--header);
  font-family: "Montserrat", sans-serif;
  word-break: break-word;
}

.module-grid {
  display: grid;
  gap: 12px;
}

.module-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
}

.module-card:hover {
  transform: translateY(-1px);
  border-color: var(--stroke-strong);
  background: rgba(162, 89, 255, 0.08);
}

.module-card span {
  color: var(--text-soft);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
}

.module-card strong {
  font-family: "Montserrat", sans-serif;
  color: var(--header);
}

.module-card p {
  margin: 0;
  color: var(--text);
}

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

.note-item,
.result-box {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.65;
}

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

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--text-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.deck-list {
  display: grid;
  gap: 16px;
}

.deck-card {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.deck-card h4 {
  margin: 0 0 10px;
  font-family: "Montserrat", sans-serif;
  color: var(--header);
}

.deck-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.deck-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(162, 89, 255, 0.12);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 36px;
  margin-top: 14px;
  color: var(--text-soft);
}

.pager-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.035);
  color: var(--header);
  font: inherit;
  cursor: pointer;
}

.pager-btn:hover:not(:disabled) {
  border-color: var(--stroke-strong);
  background: rgba(162, 89, 255, 0.1);
}

.pager-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.muted-text {
  color: var(--text-soft);
}

.status-ok {
  color: var(--success);
}

.status-warn {
  color: var(--warning);
}

.status-bad {
  color: var(--danger);
}

@media (max-width: 1080px) {
  .site-header,
  .hero-section,
  .hero-flow,
  .overview-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    justify-items: start;
  }

  .header-nav,
  .header-actions {
    justify-content: start;
  }

  .status-banner {
    grid-template-columns: 1fr;
  }

  .status-banner-side {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100vw - 14px, 1280px);
    padding-top: 16px;
  }

  .hero-section,
  .connect-card,
  .status-banner,
  .surface-card,
  .stat-card {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 12vw, 3.5rem);
  }

  .stats-row,
  .field-row {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
  }

  .overview-pillset {
    justify-content: start;
  }

  .connect-actions,
  .button-row,
  .header-actions {
    width: 100%;
  }

  .connect-actions .theme-btn,
  .button-row .theme-btn,
  .header-actions .theme-btn {
    flex: 1 1 0;
  }
}
