@media (max-width: 1200px) {
  .header-inner {
    padding: 12px 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    margin-left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.55);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    z-index: 150;
  }

  body.mobile-nav-open .header-menu {
    display: flex;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .main-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.55);
    color: var(--color-text-invert);
  }

  .auth-status {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    color: var(--color-text-invert);
  }

  .auth-status span {
    margin-bottom: 4px;
    font-size: 0.95rem;
  }

  .auth-status .button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .stack.inline {
    grid-template-columns: 1fr;
  }

  .stack.inline button {
    width: 100%;
    justify-self: stretch;
  }

  .section {
    padding: 44px 0;
  }

  .auth-card-panel {
    padding: 24px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px;
    margin-left: 0;
  }

  .card,
  .surface-card,
  .results,
  .tokens-list,
  .suffix-viz__card,
  .docs-table {
    max-width: 100%;
    min-width: 0;
  }

  .docs-table table {
    table-layout: fixed;
  }

  .docs-table th,
  .docs-table td {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .token-field__value {
    flex: 1 1 auto;
    min-width: 0;
  }

}
