/* Shared public UI responsiveness and layout helpers */
:root {
  --public-shell-border: rgba(148, 163, 184, 0.16);
  --public-shell-panel: rgba(15, 23, 42, 0.72);
  --public-shell-panel-strong: rgba(15, 23, 42, 0.84);
  --public-shell-text-muted: #cbd5e1;
}

.site-shell-header {
  gap: 1rem;
  align-items: center;
}

.site-shell-brand {
  min-width: 0;
}

.site-shell-brand > div:last-child,
.site-shell-brand-copy {
  min-width: 0;
}

.site-shell-brand-copy > div:first-child,
.site-shell-brand-copy .font-bold,
.site-shell-brand-copy .text-xl,
.site-shell-brand-copy .text-2xl {
  overflow-wrap: anywhere;
}

.site-shell-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  width: auto;
}

.site-shell-nav > a {
  white-space: nowrap;
}

.site-shell-nav > a[href="/login.html"],
.site-shell-nav > a[href="/auth/google"] {
  flex-shrink: 0;
}

.site-shell-footer {
  margin-top: 2.5rem;
}

.site-shell-footer-inner {
  gap: 1rem;
}

.site-shell-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  justify-content: flex-end;
}

.site-shell-footer-links > a {
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .topbar,
  .footer-card,
  .cta-card {
    border-radius: 28px;
  }

  .topbar,
  .site-shell-header {
    align-items: stretch !important;
  }

  .nav,
  .primary-nav,
  .site-shell-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .footer-card,
  .cta-card {
    grid-template-columns: 1fr;
  }

  .footer-links,
  .footer-meta,
  .site-shell-footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 24px), var(--max, 1180px));
  }

  .hero-card,
  .section-card,
  .content-card,
  .cta-card,
  .workspace-card,
  .hero-area .container,
  .glass-card {
    border-radius: 24px;
  }

  .topbar,
  .footer-card,
  .cta-card {
    padding-inline: 14px;
  }

  .nav,
  .primary-nav,
  .site-shell-nav,
  .footer-links,
  .footer-meta,
  .site-shell-footer-links {
    gap: 0.75rem;
  }

  .nav > a,
  .primary-nav > a,
  .site-shell-nav > a {
    flex: 1 1 calc(50% - 0.5rem);
    justify-content: center;
    text-align: center;
  }

  .nav-button,
  .nav-cta,
  .site-shell-nav > a[href="/login.html"],
  .site-shell-nav > a[href="/auth/google"] {
    flex-basis: 100%;
  }

  .brand,
  .site-shell-brand {
    width: 100%;
  }

  .site-shell-footer-inner {
    align-items: flex-start !important;
  }
}

@media (max-width: 520px) {
  .hero-actions,
  .inline-list,
  .hero-area .hero-actions,
  .site-shell-footer-links {
    flex-direction: column;
    align-items: stretch;
  }

  .button-primary,
  .button-secondary,
  .button-ghost,
  .hero-actions > a,
  .inline-list > a {
    justify-content: center;
    width: 100%;
  }

  .nav > a,
  .primary-nav > a,
  .site-shell-nav > a,
  .footer-links > a,
  .site-shell-footer-links > a {
    flex-basis: 100%;
  }

  .related-grid,
  .comparison,
  .metric-grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}
