:root {
  --site-bg: #f7f8fc;
  --site-surface: rgba(255, 255, 255, 0.88);
  --site-surface-strong: #ffffff;
  --site-ink: #172033;
  --site-muted: #5c667a;
  --site-line: rgba(23, 32, 51, 0.12);
  --site-blue: #2563eb;
  --site-cyan: #0891b2;
  --site-rose: #e11d48;
  --site-amber: #d97706;
  --site-green: #059669;
  --site-shadow: 0 22px 55px rgba(23, 32, 51, 0.12);
  --site-shadow-soft: 0 12px 28px rgba(23, 32, 51, 0.08);
  --site-radius: 8px;
  --site-focus: 0 0 0 4px rgba(37, 99, 235, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --site-bg: #0c1220;
    --site-surface: rgba(17, 25, 42, 0.86);
    --site-surface-strong: #11192a;
    --site-ink: #edf3ff;
    --site-muted: #aab6cb;
    --site-line: rgba(237, 243, 255, 0.14);
    --site-blue: #60a5fa;
    --site-cyan: #22d3ee;
    --site-rose: #fb7185;
    --site-amber: #fbbf24;
    --site-green: #34d399;
    --site-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
    --site-shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.22);
  }
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--site-ink);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.14), transparent 34%),
    linear-gradient(315deg, rgba(225, 29, 72, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(8, 145, 178, 0.10), transparent 42%),
    var(--site-bg);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(23, 32, 51, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 51, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

@media (prefers-color-scheme: dark) {
  body::before {
    background-image:
      linear-gradient(rgba(237, 243, 255, 0.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(237, 243, 255, 0.045) 1px, transparent 1px);
  }
}

a {
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--site-focus);
}

body > header.container {
  padding-top: 1rem;
  padding-bottom: 0;
}

body > header nav {
  padding: 0.75rem 1rem;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  background: var(--site-surface);
  box-shadow: var(--site-shadow-soft);
}

body > header nav strong {
  color: var(--site-ink);
}

body > header nav a {
  border-radius: var(--site-radius);
  color: var(--site-muted);
  font-weight: 700;
  text-decoration: none;
}

body > header nav a:hover {
  color: var(--site-blue);
}

main.container {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}

main > section:first-child {
  position: relative;
  padding: 2rem;
  margin-bottom: 2rem;
  overflow: hidden;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), transparent 40%),
    linear-gradient(315deg, rgba(217, 119, 6, 0.16), transparent 36%),
    var(--site-surface);
  box-shadow: var(--site-shadow);
}

main > section:first-child::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 38%;
  height: 0.35rem;
  content: "";
  background: linear-gradient(90deg, var(--site-blue), var(--site-cyan), var(--site-amber), var(--site-rose));
}

hgroup {
  margin-bottom: 1rem;
}

h1,
h2,
h3 {
  color: var(--site-ink);
}

h1 {
  max-width: 13em;
  margin-bottom: 0.75rem;
  font-size: 2.4rem;
  line-height: 1.12;
}

hgroup > p,
main > section:first-child > p {
  max-width: 46rem;
  color: var(--site-muted);
}

h2 {
  margin-top: 3rem;
  padding-top: 0.25rem;
}

h2::before {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  content: "";
  background: linear-gradient(135deg, var(--site-blue), var(--site-cyan));
}

h3 {
  margin-bottom: 0.65rem;
}

.grid {
  gap: 1rem;
}

article {
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  background: var(--site-surface);
  box-shadow: var(--site-shadow-soft);
}

article header {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--site-line);
}

article header strong {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  color: var(--site-ink);
  background: rgba(8, 145, 178, 0.12);
  font-size: 0.85rem;
}

article:nth-of-type(2n) header strong {
  background: rgba(217, 119, 6, 0.14);
}

article:nth-of-type(3n) header strong {
  background: rgba(225, 29, 72, 0.12);
}

article p {
  color: var(--site-muted);
}

article footer {
  padding-top: 0.85rem;
  border-top: 1px solid var(--site-line);
}

a[role="button"] {
  border: 0;
  border-radius: var(--site-radius);
  background: linear-gradient(135deg, var(--site-blue), var(--site-cyan));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
  color: #ffffff;
  font-weight: 800;
}

a[role="button"]:hover {
  filter: saturate(1.12) brightness(1.03);
}

figure {
  overflow: auto;
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  background: var(--site-surface-strong);
  box-shadow: var(--site-shadow-soft);
}

figure table {
  min-width: 680px;
  margin-bottom: 0;
}

thead th {
  color: var(--site-ink);
  background: rgba(37, 99, 235, 0.08);
}

tbody th {
  color: var(--site-blue);
}

tbody tr:hover {
  background: rgba(8, 145, 178, 0.08);
}

aside {
  border: 1px solid rgba(217, 119, 6, 0.28);
  border-radius: var(--site-radius);
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.14), transparent 46%),
    var(--site-surface);
  box-shadow: var(--site-shadow-soft);
}

details {
  border: 1px solid var(--site-line);
  border-radius: var(--site-radius);
  background: var(--site-surface);
  box-shadow: var(--site-shadow-soft);
}

details + details {
  margin-top: 0.75rem;
}

summary {
  color: var(--site-ink);
  font-weight: 800;
}

section ul,
section ol {
  padding-left: 1.25rem;
}

section li::marker {
  color: var(--site-rose);
  font-weight: 800;
}

body > footer.container {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  color: var(--site-muted);
}

@media (max-width: 768px) {
  body > header nav {
    display: block;
  }

  body > header nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.8rem;
    margin-bottom: 0.5rem;
  }

  body > header nav ul:last-child {
    margin-bottom: 0;
  }

  body > header nav li,
  body > header nav a,
  body > header nav strong {
    white-space: nowrap;
  }

  main.container {
    padding-top: 1.25rem;
  }

  main > section:first-child {
    padding: 1.25rem;
  }

  h1 {
    max-width: none;
    font-size: 1.9rem;
  }

  h2 {
    margin-top: 2.25rem;
  }
}
