/* ===== VARIABLES ===== */
:root {
  --bg: #0c0f14;
  --bg-soft: #121824;
  --ink: #f2f5f8;
  --muted: #9aa6b2;
  --accent: #3af3b0;
  --accent-2: #53a6ff;
  --card: #151c28;
  --card-2: #10161f;
  --stroke: rgba(255, 255, 255, 0.12);
  --radius: 14px;
  --nav-h: 64px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: 'Segoe UI', 'Trebuchet MS', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 12px; }
h3 { font-size: 1.15rem; margin-bottom: 8px; }
h4 { font-size: 0.95rem; margin-bottom: 4px; }
p { color: var(--muted); margin-bottom: 12px; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
ol { list-style: none; }
em { font-style: normal; background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== NOISE OVERLAY ===== */
.noise {
  position: fixed; inset: 0; opacity: 0.12; pointer-events: none; z-index: 9999;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 3px 3px;
}

/* ===== CONTAINER ===== */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  cursor: pointer; text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #071010; box-shadow: 0 8px 24px rgba(58, 243, 176, 0.2);
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(58, 243, 176, 0.3); }
.btn-outline { border-color: var(--stroke); background: transparent; color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); }
.btn-ghost { color: var(--muted); padding-left: 8px; padding-right: 8px; }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.full { width: 100%; text-align: center; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }

/* ===== PILL ===== */
.pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--stroke); color: var(--accent);
  font-weight: 600; text-transform: uppercase; font-size: 0.72rem;
  letter-spacing: 0.05em; margin-bottom: 16px;
}

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h); transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(12, 15, 20, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--stroke);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: 0.06em; }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  padding: calc(var(--nav-h) + 48px) 24px 80px;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(83, 166, 255, 0.2), transparent 60%),
    radial-gradient(900px 700px at 90% 10%, rgba(58, 243, 176, 0.15), transparent 55%);
}
.hero-content {
  max-width: 1140px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: center;
}
.hero-copy { max-width: 600px; }
.sub { font-size: 1.1rem; line-height: 1.6; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.stat-num { font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.stat-label { font-size: 0.8rem; color: var(--muted); }

/* ===== HERO CARD ===== */
.hero-card {
  background: linear-gradient(160deg, rgba(83, 166, 255, 0.12), rgba(21, 28, 40, 0.9));
  border: 1px solid var(--stroke); border-radius: 18px; padding: 28px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
.badge {
  background: rgba(58, 243, 176, 0.15); color: var(--accent);
  width: fit-content; padding: 4px 12px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; margin-bottom: 16px;
}
.score-ring { position: relative; width: 100px; height: 100px; margin: 0 auto 16px; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--stroke); stroke-width: 8; }
.ring-fill {
  fill: none; stroke: url(#ring-grad); stroke-width: 8;
  stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 26.1;
  transition: stroke-dashoffset 1.5s ease;
}
/* Fallback gradient via CSS */
.ring-fill { stroke: var(--accent); }
.score-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.score-num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.score-of { font-size: 0.75rem; color: var(--muted); }
.checklist { margin: 16px 0; }
.checklist li {
  display: flex; gap: 10px; padding: 8px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08); font-size: 0.88rem; color: var(--muted);
}
.check-icon { color: var(--accent); font-weight: 700; flex-shrink: 0; }

/* ===== SECTIONS ===== */
.section { padding: 80px 24px; }
.section-alt { background: var(--bg-soft); }
.section-head { max-width: 600px; margin-bottom: 40px; }

/* ===== FEATURES ===== */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.feature {
  background: var(--card); border: 1px solid var(--stroke);
  border-radius: var(--radius); padding: 24px; transition: border-color 0.3s, transform 0.3s;
}
.feature:hover { border-color: rgba(58, 243, 176, 0.3); transform: translateY(-4px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(58, 243, 176, 0.1); display: flex;
  align-items: center; justify-content: center; margin-bottom: 16px;
}

/* CSS-only icons */
.icon-gauge { width: 20px; height: 20px; border: 3px solid var(--accent); border-radius: 50%; border-bottom-color: transparent; transform: rotate(-45deg); }
.icon-wand { width: 3px; height: 18px; background: var(--accent); border-radius: 2px; transform: rotate(-30deg); position: relative; }
.icon-wand::before { content: ''; position: absolute; top: -4px; left: -3px; width: 9px; height: 4px; background: var(--accent); border-radius: 2px; }
.icon-doc { width: 14px; height: 18px; border: 2px solid var(--accent); border-radius: 2px; position: relative; }
.icon-doc::before { content: ''; position: absolute; top: 4px; left: 2px; width: 6px; height: 2px; background: var(--accent); border-radius: 1px; box-shadow: 0 4px 0 var(--accent); }
.icon-code { font-size: 0; position: relative; width: 18px; height: 14px; }
.icon-code::before, .icon-code::after {
  content: ''; position: absolute; top: 3px; width: 6px; height: 8px;
  border: 2px solid var(--accent); border-radius: 1px;
}
.icon-code::before { left: 0; border-right: none; }
.icon-code::after { right: 0; border-left: none; }
.icon-chart { width: 18px; height: 16px; display: flex; align-items: flex-end; gap: 3px; }
.icon-chart::before { content: ''; width: 4px; height: 8px; background: var(--accent); border-radius: 1px; }
.icon-chart::after { content: ''; width: 4px; height: 14px; background: var(--accent); border-radius: 1px; }
.icon-team { width: 18px; height: 16px; position: relative; }
.icon-team::before { content: ''; position: absolute; left: 2px; top: 0; width: 8px; height: 8px; border: 2px solid var(--accent); border-radius: 50%; }
.icon-team::after { content: ''; position: absolute; bottom: 0; left: 0; width: 14px; height: 6px; border: 2px solid var(--accent); border-radius: 8px 8px 0 0; border-bottom: none; }

/* ===== HOW IT WORKS ===== */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-bottom: 32px; }
.step {
  text-align: center; padding: 28px 20px;
  background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius);
  transition: border-color 0.3s;
}
.step:hover { border-color: rgba(83, 166, 255, 0.3); }
.step-number {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #071010; font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.workflow-panel {
  background: var(--card-2); border: 1px solid var(--stroke);
  border-radius: 16px; padding: 24px; display: grid; gap: 16px;
  max-width: 600px;
}
.panel-row { display: grid; grid-template-columns: 20px 1fr; gap: 14px; align-items: start; }
.dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; }
.dot-blue { background: var(--accent-2); }
.dot-green { background: var(--accent); }
.dot-purple { background: #a78bfa; }
.panel-row p { margin-bottom: 0; font-size: 0.88rem; }

/* ===== DEMO TABS ===== */
.tabs { max-width: 800px; }
.tab-buttons { display: flex; gap: 4px; margin-bottom: 20px; }
.tab-btn {
  padding: 10px 20px; border-radius: 8px; font-size: 0.88rem; font-weight: 600;
  color: var(--muted); background: transparent; border: 1px solid transparent;
  transition: all 0.2s;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { background: var(--card); border-color: var(--stroke); color: var(--ink); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeTab 0.3s ease; }
@keyframes fadeTab { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.demo-card {
  background: var(--card); border: 1px solid var(--stroke); border-radius: 16px; overflow: hidden;
}
.demo-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--stroke);
  background: var(--card-2);
}
.demo-dots { display: flex; gap: 6px; }
.demo-dots span { width: 10px; height: 10px; border-radius: 50%; }
.demo-dots span:nth-child(1) { background: #ff5f57; }
.demo-dots span:nth-child(2) { background: #febc2e; }
.demo-dots span:nth-child(3) { background: #28c840; }
.demo-title { font-size: 0.82rem; color: var(--muted); }
.demo-body { padding: 24px; }
.demo-score-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.demo-mini-score { text-align: center; padding: 16px; background: var(--bg-soft); border-radius: 10px; }
.mini-num { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.mini-num.green { color: var(--accent); }
.mini-num.blue { color: var(--accent-2); }
.mini-label { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }
.demo-bars { display: grid; gap: 12px; }
.demo-bar-item { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; font-size: 0.85rem; color: var(--muted); }
.demo-bar { height: 8px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; }
.demo-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 4px; transition: width 0.8s ease; }
.demo-bar-fill.w-95 { width: 95%; }
.demo-bar-fill.w-88 { width: 88%; }
.demo-bar-fill.w-76 { width: 76%; }
.demo-bar-fill.w-82 { width: 82%; }

/* Social tab */
.social-preview { display: grid; gap: 16px; }
.social-post { background: var(--bg-soft); border-radius: 12px; padding: 20px; }
.social-platform { font-size: 0.75rem; font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.social-text { color: var(--ink); font-size: 0.92rem; line-height: 1.5; }
.social-meta { font-size: 0.75rem; color: var(--muted); margin-top: 8px; }

/* Email tab */
.email-preview { display: grid; gap: 12px; }
.email-field { padding: 12px 16px; background: var(--bg-soft); border-radius: 8px; font-size: 0.88rem; color: var(--muted); }
.email-field strong { color: var(--ink); }
.email-body-preview { padding: 20px; background: var(--bg-soft); border-radius: 12px; font-size: 0.88rem; }
.email-body-preview p { color: var(--muted); font-size: 0.88rem; margin-bottom: 8px; }
.email-body-preview ul { padding-left: 20px; list-style: disc; }
.email-body-preview li { color: var(--muted); font-size: 0.85rem; margin-bottom: 4px; }

/* ===== PRICING ===== */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px;
}
.price-card {
  background: var(--card); border: 1px solid var(--stroke); border-radius: 18px;
  padding: 28px; position: relative; display: flex; flex-direction: column;
}
.price-card h3 { font-size: 1.1rem; }
.price {
  font-size: 2.6rem; font-weight: 800; margin: 8px 0 12px;
}
.price span { font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.price-card ul { margin: 16px 0 24px; display: grid; gap: 8px; flex: 1; }
.price-card li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.88rem; }
.price-card li::before { content: '\2713'; color: var(--accent); font-weight: 700; font-size: 0.8rem; }
.highlight { border-color: rgba(58, 243, 176, 0.5); box-shadow: 0 20px 40px rgba(58, 243, 176, 0.08); }
.tag {
  position: absolute; top: -12px; right: 20px;
  background: var(--accent); color: #05110c;
  padding: 5px 12px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
}

/* ===== TESTIMONIALS ===== */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.testimonial {
  background: var(--card); border: 1px solid var(--stroke);
  border-radius: var(--radius); padding: 24px;
}
.testimonial-stars { color: #f5b731; font-size: 1rem; margin-bottom: 12px; letter-spacing: 2px; }
.testimonial-text { color: var(--ink); font-size: 0.95rem; line-height: 1.6; margin-bottom: 16px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: #071010; flex-shrink: 0;
}
.testimonial-author span { display: block; font-size: 0.8rem; color: var(--muted); }

/* ===== FAQ ===== */
.faq-list { max-width: 700px; display: grid; gap: 8px; }
.faq-item { border: 1px solid var(--stroke); border-radius: 12px; overflow: hidden; background: var(--card); }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; font-size: 0.95rem; font-weight: 600; text-align: left;
  color: var(--ink); background: transparent; gap: 12px;
  transition: background 0.2s;
}
.faq-question:hover { background: rgba(255,255,255,0.02); }
.faq-arrow {
  font-size: 1.2rem; color: var(--accent); flex-shrink: 0;
  transition: transform 0.3s;
}
.faq-item.open .faq-arrow { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 20px;
}
.faq-item.open .faq-answer { max-height: 300px; padding: 0 20px 18px; }
.faq-answer p { font-size: 0.9rem; margin-bottom: 0; }

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(120deg, rgba(58, 243, 176, 0.12), rgba(83, 166, 255, 0.15));
}
.cta-inner {
  background: rgba(12, 15, 20, 0.8); border: 1px solid var(--stroke);
  border-radius: 20px; padding: 48px; max-width: 700px; text-align: center;
}
.cta-inner h2 { margin-bottom: 12px; }
.cta-inner .cta { justify-content: center; }
.download-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
}
.download-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 18px;
}
.download-card h3 { font-size: 0.95rem; margin-bottom: 10px; }
.download-card ul { display: grid; gap: 8px; }
.download-card li {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  position: relative;
  padding-left: 14px;
}
.download-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.download-card code {
  font-family: Consolas, 'Courier New', monospace;
  color: var(--ink);
  font-size: 0.8rem;
}
.download-card ol {
  counter-reset: setup-step;
  display: grid;
  gap: 8px;
}
.download-card ol li {
  counter-increment: setup-step;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  position: relative;
  padding-left: 26px;
}
.download-card ol li::before {
  content: counter(setup-step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(58, 243, 176, 0.18);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
}
.download-links {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.download-links a {
  font-size: 0.82rem;
  color: var(--accent-2);
}
.download-links a:hover { color: var(--ink); }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--stroke); padding: 0 24px; }
.footer-inner { max-width: 1140px; margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  padding: 48px 0 32px;
}
.footer-brand p { max-width: 260px; font-size: 0.85rem; margin-top: 12px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { color: var(--ink); font-size: 0.85rem; margin-bottom: 4px; }
.footer-col a { color: var(--muted); font-size: 0.85rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0; border-top: 1px solid var(--stroke);
  font-size: 0.82rem; color: var(--muted);
}
.made-by strong { color: var(--accent); }

/* ===== FADE-IN ANIMATION ===== */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 32px; }
  .hero-card { max-width: 380px; }
  .download-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none; flex-direction: column; position: fixed;
    top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: rgba(12, 15, 20, 0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 32px 24px; gap: 20px; z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.1rem; }
  .hamburger { display: flex; }
  .hero { padding-top: calc(var(--nav-h) + 24px); padding-bottom: 48px; }
  .hero-copy h1 { font-size: 1.8rem; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-num { font-size: 1.2rem; }
  .section { padding: 56px 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .demo-score-row { grid-template-columns: 1fr; }
  .demo-bar-item { grid-template-columns: 100px 1fr; }
  .tab-buttons { overflow-x: auto; }
  .tab-btn { white-space: nowrap; font-size: 0.82rem; padding: 8px 14px; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .cta-inner { padding: 28px 20px; }
}

/* ========================================================
   INNER PAGES — shared page header
   ======================================================== */
.page-header {
  padding: calc(var(--nav-h) + 40px) 24px 40px;
  background:
    radial-gradient(900px 400px at 30% -10%, rgba(83, 166, 255, 0.15), transparent 60%),
    radial-gradient(600px 400px at 80% 10%, rgba(58, 243, 176, 0.1), transparent 55%);
  text-align: center;
}
.page-header h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 8px; }
.page-header p { max-width: 600px; margin: 0 auto; }

/* ========================================================
   DOCS LAYOUT — sidebar + content
   ======================================================== */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  align-items: start;
}
.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 20px;
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
}
.docs-sidebar h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 12px; }
.docs-sidebar a {
  display: block; padding: 6px 12px; border-radius: 6px;
  font-size: 0.85rem; color: var(--muted); transition: all 0.2s;
  margin-bottom: 2px;
}
.docs-sidebar a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.docs-sidebar a.active { color: var(--accent); background: rgba(58, 243, 176, 0.08); }
.docs-sidebar-toggle {
  display: none;
  position: fixed; bottom: 20px; right: 20px; z-index: 900;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #071010; font-size: 1.2rem; font-weight: 800;
  align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4); border: none; cursor: pointer;
}

.docs-content { min-width: 0; }
.docs-content h2 {
  font-size: 1.5rem; margin-top: 48px; margin-bottom: 16px;
  padding-bottom: 8px; border-bottom: 1px solid var(--stroke);
}
.docs-content h2:first-child { margin-top: 0; }
.docs-content h3 { font-size: 1.1rem; margin-top: 28px; margin-bottom: 8px; color: var(--accent); }
.docs-content p { font-size: 0.92rem; line-height: 1.7; margin-bottom: 14px; }
.docs-content ul, .docs-content ol { padding-left: 20px; margin-bottom: 14px; }
.docs-content ul { list-style: disc; }
.docs-content ol { list-style: decimal; }
.docs-content li { font-size: 0.9rem; color: var(--muted); margin-bottom: 6px; line-height: 1.6; }
.docs-content code {
  font-family: Consolas, 'Courier New', monospace;
  background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px;
  font-size: 0.84rem; color: var(--accent);
}
.docs-content pre {
  background: var(--card-2); border: 1px solid var(--stroke);
  border-radius: 10px; padding: 18px; margin-bottom: 18px;
  overflow-x: auto;
}
.docs-content pre code { background: none; padding: 0; color: var(--ink); font-size: 0.84rem; line-height: 1.6; }
.docs-content table {
  width: 100%; border-collapse: collapse; margin-bottom: 18px;
  font-size: 0.88rem;
}
.docs-content th, .docs-content td {
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--stroke);
}
.docs-content th { color: var(--ink); font-weight: 600; background: var(--card-2); }
.docs-content td { color: var(--muted); }
.docs-callout {
  background: rgba(58, 243, 176, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px; margin-bottom: 18px;
}
.docs-callout p { margin-bottom: 0; }
.docs-callout strong { color: var(--ink); }

/* ========================================================
   CHANGELOG LAYOUT — version cards
   ======================================================== */
.changelog-layout {
  max-width: 800px; margin: 0 auto;
  padding: 40px 24px 80px;
}
.version-card {
  background: var(--card); border: 1px solid var(--stroke);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
}
.version-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.version-badge {
  font-size: 1.1rem; font-weight: 800; color: var(--ink);
}
.date-badge {
  font-size: 0.75rem; padding: 4px 10px; border-radius: 999px;
  background: rgba(83, 166, 255, 0.12); color: var(--accent-2); font-weight: 600;
}
.version-card ul { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.version-card li {
  font-size: 0.88rem; color: var(--muted); line-height: 1.5;
  padding-left: 0; position: relative;
}
.change-tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; margin-right: 8px; vertical-align: middle;
}
.tag-added { background: rgba(58, 243, 176, 0.15); color: var(--accent); }
.tag-changed { background: rgba(83, 166, 255, 0.15); color: var(--accent-2); }
.tag-fixed { background: rgba(247, 184, 49, 0.15); color: #f5b731; }

/* ========================================================
   LEGAL LAYOUT — prose reading width
   ======================================================== */
.legal-layout {
  max-width: 800px; margin: 0 auto;
  padding: 40px 24px 80px;
}
.legal-layout h2 {
  font-size: 1.3rem; margin-top: 36px; margin-bottom: 12px;
  color: var(--ink);
}
.legal-layout h2:first-child { margin-top: 0; }
.legal-layout h3 { font-size: 1.05rem; margin-top: 24px; margin-bottom: 8px; color: var(--accent); }
.legal-layout p {
  font-size: 0.92rem; line-height: 1.7; margin-bottom: 14px; color: var(--muted);
}
.legal-layout ul, .legal-layout ol { padding-left: 20px; margin-bottom: 14px; }
.legal-layout ul { list-style: disc; }
.legal-layout ol { list-style: decimal; }
.legal-layout li { font-size: 0.9rem; color: var(--muted); margin-bottom: 6px; line-height: 1.6; }
.legal-layout a { color: var(--accent-2); }
.legal-layout a:hover { color: var(--ink); }
.legal-layout pre {
  background: var(--card-2); border: 1px solid var(--stroke);
  border-radius: 10px; padding: 18px; margin-bottom: 18px;
  overflow-x: auto; font-family: Consolas, 'Courier New', monospace;
  font-size: 0.82rem; line-height: 1.5; color: var(--muted);
  white-space: pre-wrap;
}
.legal-date { font-size: 0.82rem; color: var(--muted); margin-bottom: 24px; }

/* ===== INNER PAGE RESPONSIVE ===== */
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar {
    position: fixed; left: 0; top: var(--nav-h); bottom: 0; width: 280px;
    z-index: 800; border-radius: 0; transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .docs-sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.4); }
  .docs-sidebar-toggle { display: flex; }
}
@media (max-width: 720px) {
  .page-header { padding: calc(var(--nav-h) + 24px) 16px 28px; }
  .page-header h1 { font-size: 1.4rem; }
  .changelog-layout, .legal-layout { padding: 28px 16px 56px; }
  .version-card { padding: 18px; }
}
