:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f9fbff;
  --text: #111827;
  --muted: #65758b;
  --border: #dbe3ef;
  --border-strong: #c9d4e3;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #14b8a6;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  --radius: 8px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.05), transparent 320px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  transform: translateY(-140%);
  border-radius: var(--radius);
  background: var(--text);
  color: #ffffff;
  padding: 10px 14px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.docs-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(219, 227, 239, 0.82);
  background: rgba(255, 255, 255, 0.9);
  padding: 0 28px;
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-size: 15px;
  letter-spacing: 0;
}

.brand-lockup small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  border-radius: var(--radius);
  background: var(--text);
  padding: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.brand-mark span:first-child {
  grid-column: 1 / -1;
}

.brand-mark span {
  border-radius: 3px;
  background: #ffffff;
  opacity: 0.94;
}

.header-action {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.header-action:hover {
  background: var(--primary-dark);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.26);
  transform: translateY(-1px);
}

.docs-layout {
  display: grid;
  width: min(100%, 1240px);
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  margin: 0 auto;
  padding: 28px;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  height: calc(100vh - var(--header-height) - 48px);
}

.sidebar-card {
  height: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.nav-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

nav {
  display: grid;
  gap: 4px;
}

nav a {
  border-radius: 7px;
  color: #334155;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

nav a:hover,
nav a:focus {
  background: #eef4ff;
  color: var(--primary-dark);
  outline: none;
}

.docs-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.hero-section,
.content-card {
  scroll-margin-top: calc(var(--header-height) + 22px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-section {
  padding: clamp(28px, 5vw, 48px);
}

.hero-section h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-section p {
  max-width: 740px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-meta span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-soft);
  color: #334155;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 780;
}

.content-card {
  padding: clamp(22px, 4vw, 32px);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.section-number {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  background: #eef4ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 5px;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0;
}

.section-heading p,
.feature-list p,
.template-grid p,
.export-grid p,
.faq-list p,
.support-line {
  color: var(--muted);
}

.step-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.step-list li {
  padding-left: 4px;
}

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

.template-grid article,
.export-grid article,
.package-card,
.feature-list p,
.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.template-grid article,
.export-grid article {
  padding: 18px;
}

.template-grid article:last-child {
  grid-column: 1 / -1;
}

.template-grid p,
.export-grid p {
  margin-bottom: 0;
  font-size: 14px;
}

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

.feature-list p {
  margin: 0;
  padding: 14px 16px;
}

.package-card {
  margin-top: 12px;
  padding: 18px;
}

.package-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

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

.faq-list details {
  overflow: hidden;
}

.faq-list summary {
  cursor: pointer;
  padding: 15px 16px;
  font-weight: 780;
}

.faq-list details[open] summary {
  border-bottom: 1px solid var(--border);
}

.faq-list p {
  margin: 0;
  padding: 14px 16px 16px;
}

.support-line {
  margin-bottom: 0;
}

.support-line a {
  color: var(--primary);
  font-weight: 760;
}

@media (max-width: 880px) {
  .docs-header {
    padding: 0 18px;
  }

  .docs-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }

  .docs-sidebar {
    position: static;
    height: auto;
  }

  .sidebar-card {
    height: auto;
    max-height: none;
  }

  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .docs-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .header-action {
    width: 100%;
  }

  .docs-layout {
    padding: 14px;
  }

  nav,
  .template-grid,
  .export-grid {
    grid-template-columns: 1fr;
  }

  .template-grid article:last-child {
    grid-column: auto;
  }

  .section-heading {
    flex-direction: column;
  }

  .hero-section,
  .content-card {
    padding: 20px;
  }
}
