:root {
  color-scheme: light dark;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #142033;
  --muted: #526172;
  --border: #dbe3ed;
  --blue: #004b87;
  --gold: #b7791f;
  --danger: #9f1d20;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #121b2b;
    --text: #edf3fb;
    --muted: #aebccd;
    --border: #263449;
    --blue: #62a8e5;
    --gold: #f2c14e;
    --danger: #ff8585;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.62;
}

a {
  color: var(--blue);
  font-weight: 700;
}

.shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--surface);
}

.hero,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

.hero {
  margin-bottom: 18px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.08;
}

h2 {
  margin: 28px 0 8px;
  font-size: 21px;
}

p,
li {
  color: var(--muted);
}

.lead {
  max-width: 760px;
  font-size: 17px;
}

.warning {
  border-left: 4px solid var(--danger);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.tile {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.tile strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 18px;
}

.meta,
footer {
  color: var(--muted);
  font-size: 13px;
}

footer {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

code {
  background: color-mix(in srgb, var(--border) 45%, transparent);
  border-radius: 6px;
  padding: 2px 5px;
}

@media (max-width: 640px) {
  .top {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .card {
    padding: 18px;
  }
}
