@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Libre+Baskerville:wght@400;700&display=swap");

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

:root {
  --bg: #1d2021; /* dark0_hard */
  --surface: #282828; /* dark0 */
  --surface-alt: #32302f; /* dark0_soft */
  --text: #f9f5d7; /* light0_hard */
  --muted: #ebdbb2; /* light1 */
  --accent: #83a598; /* bright_blue */
  --accent-strong: #458588; /* neutral_blue */
  --line: #3c3836; /* dark1 */
  --line-soft: #504945; /* dark2 */
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Libre Baskerville", "Times New Roman", serif;
  line-height: 1.65;
  background: var(--bg);
  padding: 20px 14px 28px;
}

.site {
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 18px 18px 22px;
}

header {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: block;
}

h1 {
  font-family: "Libre Baskerville", "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: 0;
  color: var(--text);
}

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

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

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

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

nav {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

nav a {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  text-decoration: none;
  color: var(--accent);
  font-size: 0.93rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

nav a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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


.card {
  padding: 14px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--line-soft);
  border-radius: 0;
}

.donate-grid {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Bare donate variant: minimal chrome */
.bare-donate .site {
  background: transparent;
  border: none;
  padding: 6px;
}

.bare-donate header {
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: none;
}

.donate-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  align-items: start;
}

.wallet-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.wallet-card h3 {
  margin: 0;
  grid-column: 1 / 2;
}

.coin-icon {
  width: 48px;
  height: 48px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
  grid-column: 1 / 2;
  object-fit: contain;
}

.wallet-card h3 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wallet-address {
  grid-column: 1 / 2;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-soft);
  padding: 6px 8px;
  margin: 2px 0 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.qr-img {
  grid-column: 2 / 3;
  width: 76px;
  height: auto;
  justify-self: end;
  margin: 0;
  background: transparent;
}

.donate-actions {
  grid-column: 1 / 3;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.copy-btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  padding: 4px 8px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line-soft);
  cursor: pointer;
}

.copy-btn:active {
  transform: translateY(1px);
}

.explorer-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  padding: 4px 6px;
}

.explorer-link:hover {
  color: var(--accent);
}

@media (max-width: 520px) {
  .wallet-card {
    grid-template-columns: 1fr;
  }

  .qr-img {
    grid-column: 1 / 2;
    justify-self: center;
    width: 96px;
    margin-top: 8px;
  }
}
.wallet-note {
  margin-top: 8px;
}

.wallet-label {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 0.92rem;
  color: var(--accent);
  margin-bottom: 4px;
}

.wallet-note {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 8px;
}

.major-separator {
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

h2 {
  font-family: "Libre Baskerville", "Times New Roman", serif;
  font-size: 1.25rem;
  margin-bottom: 6px;
  color: var(--text);
}

h3 {
  font-family: "Libre Baskerville", "Times New Roman", serif;
  font-size: 1.02rem;
  margin: 10px 0 6px;
  color: var(--text);
}

p {
  margin-bottom: 10px;
}

ul {
  list-style: disc;
  margin: 6px 0 0 18px;
}

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

/* Links page: loosen vertical rhythm for long lists */
.links-page .card {
  padding-bottom: 18px;
}

.links-controls {
  margin: 12px 0 18px;
  display: grid;
  gap: 12px;
  padding: 12px 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
}

.links-search {
  display: grid;
  gap: 8px;
}

.links-search-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.links-search input {
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  color: var(--text);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 0.95rem;
  width: 100%;
}

.links-search input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.links-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.links-filters button,
.links-meta button {
  border: 1px solid var(--line-soft);
  background: var(--surface-alt);
  color: var(--text);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  padding: 6px 10px;
  cursor: pointer;
  text-align: left;
}

.links-filters button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.links-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.links-page h2 {
  margin-bottom: 10px;
}

.links-page h3 {
  margin: 12px 0 10px;
}

.links-page ul {
  margin-bottom: 20px;
}

.links-page li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.links-page ul + h3 {
  margin-top: 24px;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent-strong);
}

footer {
  margin-top: 16px;
  padding-top: 10px;
  color: var(--muted);
}

.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: 6px;
  margin-top: 8px;
  justify-items: center;
  align-items: center;
}

/* Default for all .button-grid images: natural size */

.button-grid-buttons img {
  display: block;
  image-rendering: pixelated;
  background: transparent;
  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform;
  transition: transform 0.18s cubic-bezier(.22,1,.36,1);
}

/* Fallback if wrapper has not been applied yet */
.button-grid-buttons img:hover,
.button-grid-buttons a:focus img {
  transform: scale(1.22);
}

@media (prefers-reduced-motion: reduce) {
  .button-grid-buttons img {
    transition: none;
  }

  .button-grid-buttons img:hover,
  .button-grid-buttons a:focus img {
    transform: none;
  }
}

/* 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: 720px) {
  body {
    padding: 18px 12px 24px;
  }

  .site {
    padding: 16px 14px 20px;
  }

  nav a {
    font-size: 0.9rem;
    padding: 0;
  }
}

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

  .site {
    max-width: 100%;
    width: 100%;
    padding: 14px 12px 16px;
  }

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

  .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;
}

.pride-banner-global {
  display: block;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.pride-banner-global:hover {
  filter: brightness(1.2);
}

.pride-banner-global img {
  width: 150px;
  height: auto;
}
