:root {
  --bg: #0f141b;
  --bg-2: #131a24;
  --surface: #1a212c;
  --surface-2: #222c3a;
  --line: #2b3647;
  --text: #eaeef5;
  --muted: #9aa8bc;
  --accent: #2f6fed;
  --accent-2: #5da5ff;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --max-width: 1380px;
  --sidebar-width: 260px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(47, 111, 237, 0.14), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, #101722 55%, #0c1117 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 20, 27, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(43, 54, 71, 0.95);
}

.topbar-inner {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #1b4fb3, var(--accent-2));
  color: white;
  box-shadow: var(--shadow);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topnav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  transition: 0.2s ease;
}

.topnav a.active,
.topnav a:hover {
  background: rgba(47, 111, 237, 0.18);
  color: white;
}

.page {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 24px auto 40px;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 22px;
  align-items: start;
}

.card {
  background: rgba(26, 33, 44, 0.92);
  border: 1px solid rgba(43, 54, 71, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sidebar {
  position: sticky;
  top: 100px;
  padding: 22px;
}

.sidebar h3 {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  transition: 0.2s ease;
}

.sidebar a:hover,
.sidebar a.current {
  background: var(--surface-2);
  color: white;
}

.content {
  padding: 28px;
  min-height: 78vh;
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.14);
  color: #84b9ff;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.04;
}

.lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 62ch;
}

.hero-media,
.big-image {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #1a2432, #24344a);
  border-radius: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-media {
  min-height: 290px;
}

.big-image {
  min-height: 320px;
  margin-top: 18px;
}

.hero-media span,
.big-image span {
  padding: 20px;
  color: #aab7c9;
  font-weight: 700;
  text-align: center;
}

.section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.section-title {
  margin: 0 0 10px;
  font-size: 1.65rem;
}

.section-text {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 76ch;
}

.split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
  align-items: start;
}

.info-box,
.mini-card,
.template-box {
  background: rgba(34, 44, 58, 0.75);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.info-box h4,
.mini-card h4,
.template-box h3 {
  margin: 0 0 10px;
}

.info-box ul,
.template-box ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.mini-card p,
.template-box p,
.template-box li {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.tip {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 206, 107, 0.12);
  border: 1px solid rgba(255, 206, 107, 0.3);
  color: #ffd67d;
  font-weight: 700;
}

.template-box {
  margin-top: 28px;
}

.template-box code {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid #3a4a60;
  background: #111722;
  color: #dbe8ff;
  font-family: Consolas, monospace;
  font-size: 0.92rem;
}

.footer-note {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.75;
}

@media (max-width: 980px) {
  .page {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .hero,
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    justify-content: flex-start;
  }

  .mini-grid {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 20px;
  }
}