* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f1115;
  --text: #e8e8e8;
  --muted: #b7b7b7;
  --accent: #cfd8ff;
  --line: #2a2d35;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  padding: 20px 14px;
}

.site {
  max-width: 760px;
  margin: 0 auto;
  background: transparent;
}

header {
  padding-bottom: 12px;
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

h1 a {
  color: var(--text);
  text-decoration: none;
}

.subtitle {
  color: var(--muted);
  font-size: 1rem;
}

.tiny {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 6px;
}

nav {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

nav a {
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.95rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

main {
  display: grid;
  gap: 18px;
}

.card {
  padding-bottom: 12px;
}

.major-separator {
  margin-bottom: 18px;
  padding-bottom: 12px;
}

h2 {
  font-size: 1.1rem;
  margin-bottom: 7px;
  color: var(--text);
}

h3 {
  font-size: 1rem;
  margin: 10px 0 6px;
  color: var(--text);
}

p {
  margin-bottom: 9px;
}

ul {
  list-style: none;
}

li {
  margin-bottom: 6px;
  color: var(--text);
}

li::before {
  content: "- ";
  color: var(--accent);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

footer {
  margin-top: 16px;
  padding-top: 10px;
}

.badge {
  display: inline-block;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge img {
  display: block;
  image-rendering: pixelated;
}

/* Q&A page */
.qa-item {
  margin-bottom: 14px;
}

.qa-item .question {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 3px;
}

.qa-item .answer {
  color: var(--text);
  margin-bottom: 0;
}

/* Buttons page */

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 4px;
  margin-top: 8px;
  justify-items: center;
  align-items: center;
}

/* Default for all .button-grid images: natural size */
.button-grid img {
  display: block;
  image-rendering: pixelated;
  background: transparent;
}

/* Only force 88x31 for buttons section (first .button-grid) */
.card:nth-of-type(2) .button-grid img {
  width: 88px;
  height: 31px;
  object-fit: contain;
}

/* Stamps section: more space between items */
.card:nth-of-type(3) .button-grid {
  gap: 14px;
}

/* Banners section: revert to original flex layout */
.card:nth-of-type(5) .button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: flex-start;
  justify-content: flex-start;
}

.card:nth-of-type(5) .button-grid img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 480px) {
  body {
    padding: 14px 10px;
  }

  .site {
    max-width: 100%;
    width: 100%;
  }

  .button-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 6px;
  }

  /* Keep 88x31 buttons at their natural size on small screens */
  .card:nth-of-type(2) .button-grid img {
    width: 88px;
    height: 31px;
  }
}

/* Blog */
.blog-entry {
  margin-bottom: 16px;
}

.blog-entry h3 {
  margin-bottom: 4px;
}

.blog-entry .tags {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 4px;
}
