@media (max-width: 980px) {
  .docs-shell {
    width: min(100% - 40px, 900px);
    padding-top: 28px;
  }

  .docs-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 52px;
    padding-bottom: 64px;
  }

  .docs-hero-card {
    width: min(100%, 660px);
  }

  .docs-mobile-nav {
    position: sticky;
    top: calc(var(--mobile-header-height) + 10px);
    z-index: 20;
    margin: 0 0 40px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
    padding: 11px 13px;
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--theme-surface-solid) 92%, transparent);
    box-shadow: var(--theme-shadow-soft);
    backdrop-filter: blur(16px);
  }

  .docs-mobile-nav label {
    color: var(--theme-text-soft);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .docs-mobile-nav select {
    min-width: 0;
    height: 36px;
    padding: 0 11px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-control);
    color: var(--theme-text);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
  }

  .docs-layout {
    display: block;
    padding-top: 0;
  }

  .docs-sidebar {
    display: none;
  }
}

@media (max-width: 700px) {
  .docs-shell {
    width: min(100% - 28px, 620px);
    padding: 20px 0 72px;
  }

  .docs-hero h1 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .docs-hero-lead {
    font-size: 15px;
  }

  .docs-hero-card {
    padding: 24px;
    border-radius: 20px;
  }

  .docs-mobile-nav {
    top: calc(var(--mobile-header-height) + 8px);
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .docs-section {
    padding: 52px 0;
  }

  .docs-section-first {
    padding-top: 0;
  }

  .docs-section h2 {
    font-size: 35px;
  }

  .docs-feature-grid,
  .docs-two-column,
  .docs-export-grid,
  .docs-price-row,
  .docs-check-list-wide,
  .docs-state-row,
  .docs-process-strip,
  .docs-language-band {
    grid-template-columns: 1fr;
  }

  .docs-state-row > div,
  .docs-language-band > div {
    border-right: 0;
    border-bottom: 1px solid var(--theme-border);
  }

  .docs-state-row > div:last-child,
  .docs-language-band > div:last-child {
    border-bottom: 0;
  }

  .docs-process-strip > div {
    min-height: 164px;
  }

  .docs-format-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-option-table > div {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 15px;
  }

  .docs-callout {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .docs-footer-cta {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    padding: 34px 26px;
    border-radius: 20px;
  }

  .docs-footer-cta a {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }

  .docs-option-table,
  .docs-format-list {
    scroll-margin-top: calc(var(--mobile-header-height) + 82px);
  }
}

@media (max-width: 420px) {
  .docs-format-list {
    grid-template-columns: 1fr;
  }

  .docs-section h2 {
    font-size: 31px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-page *,
  .docs-page *::before,
  .docs-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
