:root {
  --bg: #f5f5f5;
  --fg: #333333;
  --border: #dddddd;
  --surface: #ffffff;
  --hover: #eeeeee;
  --tile-fg: #ffffff;
  --text-primary: var(--fg);
  --link: #1a56db;
  --muted: #555555;
  --accent: #333333;
  --accent-contrast: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --fg: #e0e0e0;
    --border: #444444;
    --surface: #242424;
    --hover: #2a2a2a;
    --text-primary: var(--fg);
    --link: #8ab4f8;
    --muted: #aaaaaa;
  }
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}

h1 {
  margin: 0 0 24px;
  font-size: 1.5rem;
}

.page {
  max-width: 60rem;
  margin: 0 auto;
  padding: 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.tile {
  --tile-accent: #666666;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 12px;
  background: var(--tile-accent);
  border: 1px solid var(--tile-accent);
  border-radius: 8px;
  color: var(--tile-fg);
  text-decoration: none;
}

.tile__title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
}

.tile__description {
  max-width: 100%;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.25;
  opacity: 0.9;
}

.tile--apostazja {
  --tile-accent: #40b36e;
}

.tile--pyrsseusz {
  --tile-accent: #e65c00;
}

.tile--zagrozenia {
  --tile-accent: #0b5d3b;
}

.tile--budzet {
  --tile-accent: #0969da;
}

.tile--gtfs {
  --tile-accent: #5b3f99;
}

.tile:hover {
  background: color-mix(in srgb, var(--tile-accent) 88%, black);
  border-color: color-mix(in srgb, var(--tile-accent) 88%, black);
}

.tile:focus-visible {
  outline: 3px solid var(--tile-accent);
  outline-offset: 3px;
}

.ghost {
  pointer-events: none;
  background: var(--surface);
  border-color: var(--border);
}

.ghost-1 {
  opacity: 0.75;
}

.ghost-2 {
  opacity: 0.5;
}

