/* Aligned with https://wg21.org/ — C++ Alliance PaperLint landing design tokens & chrome */

:root {
  --navy: #0c1220;
  --slate: #1a2035;
  --maroon: #3346fa;
  --maroon-light: #4d5eff;
  --maroon-glow: #6070ff;
  --maroon-dim: #2233c4;
  --copper: #e5a33d;
  --copper-light: #f0b85a;
  --copper-dim: #b87f2a;
  --text: #e2e8f0;
  --text-primary: #e2e8f0;
  --muted: #94a3b8;
  --white: #ffffff;
  --input-bg: #141c2e;
  --input-border: #2a3550;
  --wg21-max-content-width: 80vw;
}

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

html {
  overflow-x: hidden;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 1.0625rem;
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Mailing / paper eval: single horizontal gutter on body (matches site header clamp); main uses width only */
body:has(main .eval-index),
body:has(main .eval-paper) {
  padding-inline: clamp(1rem, 4vw, 3rem);
}

body:has(main .eval-index) main.wg21-landing,
body:has(main .eval-paper) main.wg21-landing {
  padding-left: 0;
  padding-right: 0;
}

body:has(main .eval-index) .wg21-mailing-nav-up,
body:has(main .eval-paper) .wg21-mailing-nav-up {
  padding-left: 0;
  padding-right: 0;
}

body:has(main .eval-index) .wg21-app-hero {
  padding-left: 0;
  padding-right: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(51, 70, 250, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 70, 250, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--slate);
  color: var(--white);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(51, 70, 250, 0.15);
}

.site-header-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
}

/* Header brand sizes aligned with https://wg21.org/ (inline: img height 80px, committee 1.5rem) */
.site-header-brand-wg21 {
  height: 80px;
  width: auto;
  max-width: min(280px, 55vw);
  object-fit: contain;
}

.site-header-brand-committee {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--muted);
}

@media (max-width: 640px) {
  .site-header {
    padding: 1rem 1.5rem;
  }

  .site-header-brand-wg21 {
    height: 56px;
    max-width: min(220px, 70vw);
  }

  .site-header-brand-committee {
    font-size: 1.2rem;
  }
}

.site-header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 1.05rem;
}

.site-header-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-header-nav a:hover {
  color: var(--maroon-light);
}

.site-content {
  position: relative;
  z-index: 5;
  min-height: calc(100vh - 200px);
}

.site-footer {
  position: relative;
  z-index: 10;
  max-width: var(--wg21-max-content-width);
  margin: 0 auto;
  padding: 2rem 16px 2.5rem;
  border-top: 1px solid rgba(51, 70, 250, 0.15);
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer-muted {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.85;
}

.site-footer a {
  color: var(--maroon-light);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Generic prose inside content (mailing, app home) */
.wg21-prose a {
  color: var(--maroon-light);
  text-decoration: none;
}

.wg21-prose a:hover {
  text-decoration: underline;
}

/* Mailing index cards: no underline (prose hover would otherwise win) */
.wg21-prose a.mailing-card:hover,
.wg21-prose a.mailing-card:active,
.wg21-prose a.mailing-card:focus,
.wg21-prose a.mailing-card:focus-visible,
.wg21-prose a.mailing-card:visited {
  text-decoration: none;
}

/* Public landing (wg21.org-style sections) */
.wg21-landing {
  max-width: var(--wg21-max-content-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.wg21-landing-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.wg21-landing-section {
  position: relative;
  z-index: 10;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(51, 70, 250, 0.12);
}

.wg21-landing-h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.wg21-landing-copy,
.wg21-landing-resources {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}

.wg21-landing-em {
  font-size: 1rem;
  color: var(--text);
  margin: 1rem 0 1.5rem;
}

.wg21-landing-resources {
  list-style: none;
  padding: 0;
}

.wg21-landing-resources li {
  margin-bottom: 0.65rem;
  padding-left: 0;
}

.wg21-landing-resources li::before {
  content: "→ ";
  color: var(--maroon-light);
}

/* 404 page (templates/404.html) */
.wg21-error {
  position: relative;
  z-index: 10;
  max-width: 520px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
}

.wg21-error-code {
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  color: rgba(51, 70, 250, 0.22);
  margin-bottom: 0.5rem;
  user-select: none;
}

.wg21-error-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.wg21-error-copy {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.wg21-error-actions {
  margin: 0;
}

.wg21-error-link {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(51, 70, 250, 0.35);
  background: rgba(51, 70, 250, 0.1);
  color: var(--maroon-light);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.wg21-error-link:hover {
  border-color: rgba(51, 70, 250, 0.55);
  background: rgba(51, 70, 250, 0.16);
}
