/* Shared structural styles for the public website and public legal pages. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body.home-body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial,
    sans-serif;
  line-height: 1.6;
  background: var(--bg, #fff);
  color: var(--text, #111);
}

.container {
  width: min(100% - 32px, var(--container-w, 1100px));
  margin-inline: auto;
}

.public-noscript-notice {
  padding: 12px 16px;
  color: #b00020;
}

.skip-link {
  position: fixed;
  inset: 12px auto auto 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--bg, #fff);
  background: var(--text, #111);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
  transition: transform 160ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

#main-content {
  scroll-margin-top: 96px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg2, #fff);
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  backdrop-filter: saturate(120%) blur(6px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
  gap: 16px;
}

.brand {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 22px);
  letter-spacing: 0.2px;
  color: var(--text, #111);
  font-weight: 700;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.nav a {
  min-height: 44px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text, #111);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease,
    transform 0.04s ease;
}

.nav a:hover {
  background: var(--glass, rgba(0, 0, 0, 0.04));
  border-color: var(--border, rgba(0, 0, 0, 0.08));
}

.nav a:active {
  transform: translateY(1px);
}

.site-footer {
  background: var(--bg2, #f4f6fb);
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding-block: 18px;
  color: var(--muted, #666);
  font-size: 14px;
}

.footer-nav a {
  margin-left: 10px;
  border-bottom: 1px solid transparent;
  color: var(--muted, #666);
  text-decoration: none;
}

.footer-nav a:hover {
  border-bottom-color: currentColor;
}

a {
  outline-offset: 3px;
}

a:focus-visible {
  border-radius: 8px;
  outline: 3px solid hsl(var(--accent-h, 210) 90% 45%);
}

@media (max-width: 760px) {
  .site-header {
    position: static;
  }

  .site-header .container {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .nav a {
    min-height: 44px;
    padding-inline: 6px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .skip-link {
    transition: none;
  }
}
