*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/*
 * Browsers don't inherit typography into form controls by default —
 * Chrome's own UA stylesheet sets `button { font: 400 13.3333px Arial; }`
 * outright, ignoring the page's font entirely. .btn overrides font-size
 * and font-weight but never font-family/line-height, so a <button
 * class="btn"> (e.g. a "Delete" submit button) rendered in the browser's
 * default UI font at a different line-height than an <a class="btn">
 * (e.g. an "Edit" link) styled identically otherwise — same padding,
 * visibly different box height. This is *the* reason two buttons sitting
 * side by side (one a link, one a form submit button) misalign instead
 * of matching, anywhere in the app.
 */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* Previously undefined — every h1-h6 fell back to the browser's own
   default sizing, so a <h1> on one page could render at a different size
   than a differently-styled <h1> on another, purely by accident of which
   component CSS happened to touch it. This is the one deliberate scale,
   used everywhere. */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-3);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.375rem;
}

h3 {
  font-size: 1.125rem;
}

h4 {
  font-size: 1rem;
}

h5, h6 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: normal;
}

p {
  margin: 0 0 var(--space-3);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  margin: 0;
  padding-left: var(--space-5);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-center {
  text-align: center;
}

.brand-logo {
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/*
 * requirement/26-Staging-Environment.md — a persistent, unmissable
 * reminder on every non-production environment (loaded by all three
 * user-facing layouts via base.css, unlike layout.css's app-shell-only
 * styles). Deliberately a different color from .impersonation-banner's
 * amber (layout.css) — a security-sensitive, temporary state — so the
 * two are never confused if both happen to show at once.
 */
.staging-banner {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}
