* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.is-nav-open {
  overflow: hidden;
}

body.is-nav-open::before {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(8px);
  content: "";
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid #2563eb33;
  outline-offset: 3px;
}

::selection {
  color: var(--color-on-primary);
  background: var(--color-primary);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-140%);
  border-radius: var(--radius-control);
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: 10px 14px;
  transition: transform var(--motion-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 16px;
  pointer-events: none;
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-page);
  min-height: 56px;
  margin: 0 auto;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px) saturate(1.12);
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 188px;
  gap: var(--space-12);
  padding: 8px 16px;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.brand strong {
  display: block;
  color: var(--color-text-strong);
  font-family: var(--font-heading);
  font-size: 18px;
  line-height: 1.2;
}

.brand small {
  display: block;
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 1.2;
}

.page-shell {
  margin-top: calc(var(--header-height) * -1);
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 56px 32px 28px;
}

.muted {
  color: var(--color-text-muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
