:root {
  --bg-0: #030712;
  --bg-1: #09142b;
  --bg-2: #132248;
  --panel: rgba(8, 16, 35, 0.82);
  --panel-strong: rgba(8, 16, 35, 0.92);
  --line: rgba(124, 172, 244, 0.24);
  --text: #eef4ff;
  --muted: #adc0df;
  --accent: #58d2ff;
  --accent-gold: #ffc15d;
  --safe: #51dfb0;
  --risky: #ff9d82;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background: linear-gradient(125deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-2) 100%);
}

a {
  color: #9ed4ff;
}

.hidden {
  display: none !important;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% -6%, rgba(74, 210, 255, 0.18), transparent 58%),
    radial-gradient(940px 500px at 88% 2%, rgba(255, 145, 38, 0.18), transparent 56%),
    radial-gradient(760px 460px at 48% 108%, rgba(84, 130, 255, 0.2), transparent 52%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='rgba(157,193,250,0.06)' stroke-width='1'%3E%3Ccircle cx='6' cy='18' r='1'/%3E%3Ccircle cx='120' cy='42' r='1'/%3E%3Ccircle cx='42' cy='128' r='1'/%3E%3Ccircle cx='146' cy='150' r='1'/%3E%3C/g%3E%3C/svg%3E") repeat;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 10, 22, 0.74);
  backdrop-filter: blur(10px);
  -webkit-app-region: drag;
}

.desktop-nav,
.main-nav,
.top-actions,
.brand,
.window-controls {
  -webkit-app-region: no-drag;
}

.desktop-nav {
  display: flex;
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
  font-family: "Cinzel", serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: 8px;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: color 150ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

.top-actions {
  display: flex;
  gap: 8px;
}

.window-controls {
  display: none;
  gap: 6px;
}

.window-controls.visible {
  display: flex;
}

.icon-btn,
button,
.btn-link {
  border: 1px solid rgba(99, 151, 228, 0.42);
  border-radius: 10px;
  color: var(--text);
  background: linear-gradient(180deg, #1e396d, #172f5b);
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn {
  min-width: 34px;
  padding: 8px 10px;
}

.ghost {
  border-color: var(--line);
  background: rgba(11, 21, 43, 0.72);
}

.cta {
  border-color: rgba(109, 222, 255, 0.68);
  background: linear-gradient(145deg, #1a938f, #1cb1c0 55%, #24cfd2);
  color: #f2fcff;
}

.icon-btn.danger {
  border-color: rgba(255, 122, 122, 0.54);
  background: rgba(57, 16, 25, 0.88);
  color: #ffc5c5;
}

button:hover,
.btn-link:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.page-wrap {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 22px 16px 52px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px 6px;
}

html[data-page="overview"] .hero,
html[data-page="example"] .hero {
  grid-template-columns: 1fr 0.96fr;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #97d9ff;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.98;
  font-family: "Cinzel", serif;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  max-width: 640px;
}

.actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions.compact {
  margin-top: 10px;
}

.actions.center {
  justify-content: center;
}

.actions.wrap {
  flex-wrap: wrap;
}

.logo-frame {
  border-radius: 18px;
  border: 1px solid rgba(128, 176, 238, 0.35);
  background: radial-gradient(circle at 20% 8%, rgba(31, 91, 186, 0.45), rgba(3, 9, 21, 0.92));
  box-shadow: 0 22px 44px rgba(4, 7, 18, 0.58);
  padding: 18px;
  max-width: 520px;
  margin-left: auto;
}

.logo-frame img {
  width: 100%;
  display: block;
  border-radius: 16px;
}

.glow-pulse {
  animation: crestGlow 3.6s ease-in-out infinite;
}

@keyframes crestGlow {
  0%,
  100% { box-shadow: 0 0 0 rgba(48, 192, 255, 0.16), 0 22px 44px rgba(4, 7, 18, 0.58); }
  50% { box-shadow: 0 0 30px rgba(48, 192, 255, 0.28), 0 22px 44px rgba(4, 7, 18, 0.58); }
}

.panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 18px;
}

h2,
.page-title {
  margin: 0 0 8px;
  font-family: "Cinzel", serif;
  font-size: clamp(28px, 3vw, 42px);
}

h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.accent {
  color: var(--accent-gold);
}

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

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

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

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.feature-card {
  border: 1px solid rgba(120, 168, 228, 0.24);
  border-radius: 12px;
  background: rgba(6, 12, 27, 0.74);
  padding: 12px;
}

.cta-panel {
  text-align: center;
}

.split {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.1fr 1fr;
}

.mode-switch {
  display: inline-flex;
  border: 1px solid rgba(102, 149, 215, 0.38);
  border-radius: 10px;
  overflow: hidden;
}

.mode-btn {
  border: none;
  border-right: 1px solid rgba(102, 149, 215, 0.38);
  border-radius: 0;
  background: rgba(12, 23, 45, 0.92);
  padding: 8px 14px;
}

.mode-btn:last-child {
  border-right: none;
}

.mode-btn.active {
  background: linear-gradient(150deg, #1f918b, #22becc);
}

.wide {
  width: 100%;
}

.status {
  margin: 12px 0 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(118, 170, 237, 0.34);
  background: rgba(8, 19, 37, 0.7);
}

.label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.value {
  margin: 4px 0 0;
  font-weight: 800;
  word-break: break-word;
}

.tier-pill {
  margin: 12px 0 0;
  display: inline-block;
  border: 1px solid rgba(105, 157, 235, 0.55);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  color: #a8d6ff;
}

.ops-console {
  margin-top: 14px;
  border: 1px solid rgba(123, 171, 236, 0.25);
  border-radius: 12px;
  background: rgba(6, 11, 24, 0.66);
  padding: 0 12px 12px;
}

.ops-console summary {
  cursor: pointer;
  padding: 12px 2px;
  font-weight: 800;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 4px;
  border: 1px solid rgba(109, 152, 214, 0.35);
  border-radius: 10px;
  background: rgba(4, 10, 22, 0.9);
  color: var(--text);
  font: inherit;
  padding: 10px;
}

#output {
  margin: 0;
  min-height: 190px;
  max-height: 420px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(104, 150, 213, 0.3);
  background: #050a17;
  color: #bde0ff;
  font-size: 12px;
  line-height: 1.45;
  padding: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.draft-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.chip {
  border: 1px solid rgba(104, 156, 228, 0.4);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(9, 23, 51, 0.85);
  font-size: 13px;
}

.chip.empty {
  color: #9fb3d4;
  border-style: dashed;
}

.meta-row {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-pill {
  border: 1px solid rgba(117, 167, 232, 0.4);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(9, 21, 44, 0.8);
  font-weight: 700;
  font-size: 13px;
}

.meta-pill.danger {
  border-color: rgba(255, 161, 132, 0.5);
  color: #ffc5b0;
}

.rec-table {
  width: 100%;
  border-collapse: collapse;
}

.rec-table th,
.rec-table td {
  border-bottom: 1px solid rgba(110, 156, 218, 0.24);
  padding: 10px;
  text-align: left;
}

.rec-table th {
  color: #a8cff8;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.safe {
  color: var(--safe);
  font-weight: 800;
}

.risky {
  color: var(--risky);
  font-weight: 800;
}

.explain-block {
  margin-top: 8px;
  border: 1px solid rgba(109, 153, 217, 0.24);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(7, 15, 31, 0.72);
}

.explain-block summary {
  cursor: pointer;
  font-weight: 700;
}

.pricing-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.price-card {
  border: 1px solid rgba(120, 169, 230, 0.3);
  border-radius: 14px;
  background: rgba(7, 14, 30, 0.82);
  padding: 16px;
}

.price-card.featured {
  border-color: rgba(106, 220, 255, 0.55);
  box-shadow: 0 0 24px rgba(61, 182, 255, 0.2);
  background: linear-gradient(165deg, rgba(15, 31, 64, 0.92), rgba(10, 19, 38, 0.92));
}

.price {
  margin: 8px 0;
  font-size: 46px;
  font-weight: 800;
  font-family: "Cinzel", serif;
}

.price span {
  font-size: 16px;
  color: var(--muted);
  margin-left: 6px;
}

.price-card ul {
  padding-left: 20px;
  min-height: 110px;
}

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

.contact-card {
  text-align: center;
}

.contact-form {
  max-width: 760px;
  display: grid;
  gap: 10px;
}

.contact-points {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.contact-points li {
  margin-bottom: 6px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 12px;
}

.legal-nav {
  align-self: start;
  position: sticky;
  top: 90px;
}

.legal-nav a {
  display: block;
  margin-bottom: 8px;
  color: #a9c9ef;
  text-decoration: none;
}

.legal-doc {
  max-width: 860px;
}

.legal-centered {
  margin-left: auto;
  margin-right: auto;
}

.legal-doc section {
  margin-top: 16px;
}

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(6, 11, 25, 0.7);
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px;
}

.footer a {
  color: #9ebfe8;
  text-decoration: none;
  font-size: 14px;
}

.simple-footer {
  gap: 14px;
}

.simple-footer span {
  color: #8ea9cf;
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 460ms ease, transform 460ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1000px) {
  .hero,
  .split,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-nav {
    position: static;
  }

  .logo-frame {
    margin-left: 0;
    max-width: 100%;
  }
}

@media (max-width: 880px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .brand {
    margin-right: 0;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    margin-right: 0;
  }

  .top-actions {
    margin-left: auto;
  }
}
