:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #edf1f8;
  --ink: #111827;
  --muted: #526077;
  --faint: #d8dfeb;
  --primary: #005e97;
  --primary-soft: #dff6ff;
  --green: #2d6a4f;
  --amber: #b45309;
  --red: #ba1a1a;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 24px 80px rgba(22, 34, 51, 0.12);
  --sidebar-width: 310px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(0, 94, 151, 0.16), transparent 32rem),
    linear-gradient(135deg, #f8fbff 0%, var(--bg) 55%, #eef4f8 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.86);
  border-right: 1px solid rgba(181, 190, 212, 0.6);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 22px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: white;
  font-weight: 850;
  font-size: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #2d6a4f);
  box-shadow: 0 12px 30px rgba(0, 94, 151, 0.24);
}

.brand-title,
.brand-subtitle,
.eyebrow,
.nav-section p,
.meta-label,
.step-kicker {
  margin: 0;
}

.brand-title {
  font-size: 16px;
  font-weight: 850;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.search-box {
  display: block;
  margin: 0 8px 22px;
}

.search-box span {
  display: block;
  margin: 0 0 8px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--panel-soft);
  border: 1px solid transparent;
  border-radius: 14px;
  outline: none;
}

.search-box input:focus {
  border-color: rgba(0, 94, 151, 0.45);
  background: white;
  box-shadow: 0 0 0 4px rgba(0, 94, 151, 0.08);
}

.nav {
  display: grid;
  gap: 18px;
}

.nav-section p {
  padding: 0 12px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  margin: 2px 0;
  padding: 10px 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 13px;
  transition: 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.main-wrap {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 96px;
  padding: 22px clamp(20px, 4vw, 56px);
  background: rgba(244, 247, 251, 0.78);
  border-bottom: 1px solid rgba(181, 190, 212, 0.38);
  backdrop-filter: blur(18px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px;
  background: white;
  border: 1px solid var(--faint);
  border-radius: 14px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  border-radius: 999px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.04;
}

.content {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 80px;
}

.hero,
.doc-card,
.callout,
.step-card,
.fields-card,
.faq-card,
.flow-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(181, 190, 212, 0.48);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  padding: clamp(28px, 5vw, 54px);
  border-radius: var(--radius-xl);
}

.hero h2,
.section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.02;
}

.hero p,
.section-intro,
.step-card p,
.faq-card p,
.callout,
.placeholder,
td {
  color: var(--muted);
  line-height: 1.65;
}

.hero p {
  max-width: 62ch;
  font-size: 17px;
}

.hero-actions,
.quick-grid,
.module-grid,
.meta-grid,
.steps-grid,
.faq-grid {
  display: grid;
  gap: 14px;
}

.hero-actions {
  grid-template-columns: repeat(2, minmax(0, max-content));
  margin-top: 26px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  color: white;
  font-weight: 800;
  text-decoration: none;
  background: var(--primary);
  border-radius: 999px;
}

.button-link.secondary {
  color: var(--primary);
  background: var(--primary-soft);
}

.quick-grid {
  grid-template-columns: 1fr;
}

.quick-stat {
  padding: 18px;
  background: var(--panel-soft);
  border-radius: 18px;
}

.quick-stat strong {
  display: block;
  margin-bottom: 4px;
  font-size: 26px;
}

.section {
  margin-top: 34px;
}

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

.section-intro {
  max-width: 64ch;
  margin: 10px 0 0;
}

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

.doc-card {
  display: block;
  min-height: 180px;
  padding: 22px;
  color: inherit;
  text-decoration: none;
  border-radius: 24px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.doc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 94, 151, 0.45);
  box-shadow: 0 28px 88px rgba(22, 34, 51, 0.16);
}

.doc-card .tag,
.doc-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  background: var(--primary-soft);
  border-radius: 999px;
}

.doc-card h3 {
  margin: 18px 0 8px;
  font-size: 24px;
}

.doc-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.doc-layout {
  display: grid;
  gap: 28px;
}

.doc-hero {
  padding: clamp(26px, 5vw, 52px);
  color: white;
  background:
    linear-gradient(135deg, rgba(0, 94, 151, 0.96), rgba(45, 106, 79, 0.92)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.26), transparent 24rem);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.doc-hero .doc-tag {
  color: white;
  background: rgba(255, 255, 255, 0.16);
}

.doc-hero h2 {
  max-width: 780px;
  margin: 18px 0 14px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.95;
}

.doc-hero p {
  max-width: 76ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 17px;
  line-height: 1.7;
}

.meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 26px;
}

.meta-item {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
}

.meta-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-value {
  margin: 4px 0 0;
  font-weight: 850;
}

.flow-card,
.fields-card,
.faq-card,
.step-card,
.callout {
  border-radius: 22px;
}

.flow-card,
.fields-card,
.callout {
  padding: 22px;
}

.flow-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.flow-node {
  padding: 10px 12px;
  color: var(--primary);
  font-weight: 800;
  background: var(--primary-soft);
  border-radius: 999px;
}

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

.steps-grid {
  grid-template-columns: 1fr;
}

.step-card {
  overflow: hidden;
}

.step-body {
  padding: 22px;
}

.step-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.step-card h3 {
  margin: 6px 0 10px;
  font-size: 24px;
}

.screenshot-frame {
  margin: 0;
  background: var(--panel-soft);
  border-top: 1px solid rgba(181, 190, 212, 0.48);
}

.screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
  background:
    linear-gradient(135deg, rgba(0, 94, 151, 0.08), rgba(45, 106, 79, 0.08)),
    repeating-linear-gradient(45deg, rgba(82, 96, 119, 0.08) 0 1px, transparent 1px 14px);
}

.screenshot-frame figcaption {
  padding: 12px 18px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.callout {
  color: var(--amber);
  background: #fff7ed;
  border-color: rgba(180, 83, 9, 0.22);
  box-shadow: none;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid var(--faint);
  border-radius: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--faint);
}

th {
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
  background: var(--panel-soft);
}

tr:last-child td {
  border-bottom: 0;
}

.required {
  color: var(--green);
  font-weight: 900;
}

.optional {
  color: var(--muted);
  font-weight: 900;
}

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

.faq-card {
  padding: 22px;
  box-shadow: none;
}

.faq-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.faq-card p {
  margin: 0;
}

.empty-state {
  padding: 36px;
  text-align: center;
  background: white;
  border: 1px dashed var(--faint);
  border-radius: 24px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(86vw, var(--sidebar-width));
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 24px 0 80px rgba(17, 24, 39, 0.22);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-button {
    display: block;
    flex: 0 0 auto;
  }

  .topbar {
    min-height: 82px;
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .content {
    width: min(100% - 28px, 1120px);
    padding-top: 28px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .button-link {
    width: 100%;
  }

  .section-header {
    display: block;
  }
}
