:root {
  /* Raw palette tokens */
  --brand-light: #1e61ae;
  --brand-dark: #7db4f5;
  --bg-light: #f8f9fb;
  --bg-dark: #111418;
  --surface-light: #ffffff;
  --surface-dark: #191e24;
  --text-light: #151922;
  --text-dark: #edf1f7;
  --muted-light: #4e5968;
  --muted-dark: #9aa7b8;
  --border-light: #dde3ec;
  --border-dark: #2a323d;
  --pill-bg-light: #e8f0fb;
  --pill-bg-dark: #1c2c42;

  /* Semantic tokens (light default) */
  --brand: var(--brand-light);
  --bg: var(--bg-light);
  --surface: var(--surface-light);
  --text: var(--text-light);
  --muted: var(--muted-light);
  --border: var(--border-light);
  --pill-bg: var(--pill-bg-light);

  /* Fallback for browsers without light-dark() support */
  @media (prefers-color-scheme: dark) {
    --brand: var(--brand-dark);
    --bg: var(--bg-dark);
    --surface: var(--surface-dark);
    --text: var(--text-dark);
    --muted: var(--muted-dark);
    --border: var(--border-dark);
    --pill-bg: var(--pill-bg-dark);
  }

  /* Progressive enhancement using light-dark() */
  @supports (color: light-dark(white, black)) {
    --brand: light-dark(var(--brand-light), var(--brand-dark));
    --bg: light-dark(var(--bg-light), var(--bg-dark));
    --surface: light-dark(var(--surface-light), var(--surface-dark));
    --text: light-dark(var(--text-light), var(--text-dark));
    --muted: light-dark(var(--muted-light), var(--muted-dark));
    --border: light-dark(var(--border-light), var(--border-dark));
    --pill-bg: light-dark(var(--pill-bg-light), var(--pill-bg-dark));
  }

  color-scheme: light dark;
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand);
  text-underline-offset: 0.2em;
}

:where(a:any-link, button):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background-color: var(--surface);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  min-block-size: 44px;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding-inline: 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--brand);
  text-decoration: underline;
}

/* Main */
main {
  flex: 1;
  padding-block: 40px 56px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}

.hero-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  background-color: var(--pill-bg);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 58ch;
}

.schedule {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.schedule li {
  padding: 6px 12px;
  border-radius: 10px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Legal / Prose */
.prose h1 {
  margin-bottom: 8px;
}

.meta {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

.summary-box {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 28px;
}

.summary-box p {
  margin: 0;
}

.prose h2 {
  margin: 28px 0 10px;
  font-size: 1.2rem;
  line-height: 1.3;
}

.prose p,
.prose ul {
  margin: 0 0 14px;
}

.prose ul {
  padding-left: 20px;
}

.prose li + li {
  margin-top: 6px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
}

@media (pointer: coarse) {
  .site-nav a,
  .footer-links a {
    padding-inline: 8px;
  }
}
