:root {
  color-scheme: light dark;
  --bg: #0f1419;
  --card: #1a2332;
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --accent: #7c5cff;
  --border: rgba(255, 255, 255, 0.08);
  font-family: "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f0f4fa;
    --card: #fff;
    --text: #1a2332;
    --muted: #5c6b80;
    --border: rgba(0, 0, 0, 0.08);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  line-height: 1.5;
}

.bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 92, 255, 0.22), transparent),
    var(--bg);
  z-index: -1;
}

.top {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1rem;
}

.tag {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(124, 92, 255, 0.12);
  border-radius: 6px;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 600;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.lead strong {
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.75rem;
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.15s, transform 0.15s;
  position: relative;
}

.tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tile.primary {
  border-color: rgba(124, 92, 255, 0.35);
  grid-column: span 2;
}

@media (max-width: 400px) {
  .tile.primary {
    grid-column: span 1;
  }
}

.tile-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.tile strong {
  font-size: 1.05rem;
}

.tile-desc {
  font-size: 0.82rem;
  color: var(--muted);
}

.tile.external::after {
  content: "↗";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.foot {
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

code {
  font-size: 0.88em;
}
