:root {
  color-scheme: light;
  --bg: #fff7ed;
  --bg-strong: #ffedd5;
  --card: rgba(255, 255, 255, 0.86);
  --text: #25140b;
  --muted: #7c5a43;
  --primary: #e4562f;
  --primary-dark: #b93619;
  --accent: #0f766e;
  --ring: rgba(228, 86, 47, 0.22);
  --border: rgba(124, 90, 67, 0.22);
  --shadow: 0 24px 60px rgba(101, 55, 28, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(244, 114, 52, 0.23), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(15, 118, 110, 0.18), transparent 28rem),
    var(--bg);
  color: var(--text);
}

a { color: inherit; }

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 38px rgba(101, 55, 28, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 300px;
  font-weight: 900;
  text-decoration: none;
}

.brand-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex: 2 1 520px;
}

.site-nav a {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.hero-brand-plate {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 237, 213, 0.68);
}

.hero-brand-plate img {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 14px 28px rgba(101, 55, 28, 0.16);
}

.hero-brand-plate strong,
.hero-brand-plate span {
  display: block;
}

.hero-brand-plate span {
  color: var(--muted);
  font-weight: 700;
}

.trust-note {
  display: grid;
  gap: 6px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(255, 237, 213, 0.78));
  color: var(--muted);
  line-height: 1.55;
}

.trust-note strong {
  color: var(--accent);
}

.compact-note {
  margin: 0 0 18px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(101, 55, 28, 0.08);
  padding: 26px;
  backdrop-filter: blur(18px);
}

.elevated { box-shadow: var(--shadow); }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.section-grid.compact { grid-template-columns: 1.2fr 0.8fr; }

.hero h1,
.page-heading h1,
.thanks h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 5.9rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.page-heading,
.thanks { margin-bottom: 24px; text-align: center; }

.lede,
.page-heading p,
.thanks p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 900;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.cta-row.center { justify-content: center; }

.button,
.link-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
}

.button:hover,
.link-button:hover { transform: translateY(-1px); }

.button.primary {
  background: linear-gradient(135deg, var(--primary), #f97316);
  color: #fff;
  box-shadow: 0 14px 28px var(--ring);
}

.button.ghost { background: transparent; }
.button.full { width: 100%; }

.link-button {
  background: transparent;
  color: var(--primary-dark);
  padding: 0;
}

.iban-card code,
.token code,
.admin-hero code {
  display: block;
  overflow-wrap: anywhere;
  border-radius: 18px;
  background: #2b160d;
  color: #fff7ed;
  padding: 16px;
  font-size: 1rem;
}

.description-box {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: var(--bg-strong);
}

.description-box span,
.stat span,
.muted,
.form-row small {
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.stat { padding: 20px; }
.stat strong { display: block; margin-top: 8px; font-size: 1.35rem; }

.leaderboard-list { display: grid; gap: 10px; }
.leaderboard-row {
  display: grid;
  grid-template-columns: 74px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 237, 213, 0.7);
}

.rank,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 900;
}

.rank { background: #2b160d; color: #fff7ed; }
.badge { background: rgba(15, 118, 110, 0.12); color: var(--accent); }

.form-layout { grid-template-columns: minmax(0, 1fr) 390px; align-items: start; }
.form-card { display: grid; gap: 16px; }
.form-row { display: grid; gap: 8px; }
label { font-weight: 900; }
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
  outline: none;
}
textarea { min-height: 110px; resize: vertical; }
input:focus,
select:focus,
textarea:focus { box-shadow: 0 0 0 4px var(--ring); border-color: var(--primary); }
.check-row { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.check-row input { width: auto; margin-top: 4px; }
.honeypot { position: absolute; left: -10000px; opacity: 0; }
.form-status { min-height: 24px; font-weight: 800; }
.form-status.error { color: #b91c1c; }
.form-status.success { color: var(--accent); }

.thanks { max-width: 820px; margin-inline: auto; }
.muck-stage { display: grid; place-items: center; gap: 8px; margin-bottom: 20px; }
.muck-img { width: min(280px, 80vw); animation: muck-pop 1.4s ease both; }
.emoji-confetti { font-size: 2rem; animation: floaty 1.8s ease-in-out infinite alternate; }

.supporter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.supporter-card blockquote { margin: 16px 0; color: var(--muted); font-size: 1.05rem; }

.github-link {
  display: inline-flex;
  width: fit-content;
  margin: 4px 0 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #2b160d;
  color: #fff7ed;
  text-decoration: none;
  font-weight: 900;
}

.table-card { overflow: hidden; }
.table-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(43, 22, 13, 0.94), rgba(180, 54, 25, 0.9)),
    var(--card);
  color: #fff7ed;
}

.admin-dashboard-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.admin-dashboard-hero p { color: rgba(255, 247, 237, 0.78); }
.admin-dashboard-hero code { color: #fff; background: rgba(255, 255, 255, 0.12); padding: 4px 8px; border-radius: 10px; }

.admin-terminal-card {
  display: grid;
  align-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.admin-terminal-card span,
.admin-terminal-card small { color: rgba(255, 247, 237, 0.72); font-weight: 800; }
.admin-terminal-card strong { overflow-wrap: anywhere; font-size: 1.2rem; }

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 18px 0 24px;
}

.admin-kpi {
  padding: 20px;
  background: rgba(255, 255, 255, 0.74);
}

.admin-kpi span { color: var(--muted); font-weight: 900; }
.admin-kpi strong { display: block; margin-top: 8px; font-size: 1.7rem; }

.admin-mini-log {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(43, 22, 13, 0.06);
  color: var(--muted);
  font-weight: 800;
}

.admin-list { display: grid; gap: 12px; margin-top: 16px; }
.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}
.admin-row dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 10px 0 0; }
.admin-row dt { color: var(--muted); font-size: 0.82rem; font-weight: 800; }
.admin-row dd { margin: 0; overflow-wrap: anywhere; }
.admin-row-actions { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }

.site-footer {
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding: 24px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.footer-grid p { margin: 0 0 10px; }
.footer-grid p:last-child { margin-bottom: 0; }

.footer-kicker {
  color: var(--accent);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.footer-links {
  white-space: nowrap;
  font-weight: 800;
}

@keyframes muck-pop {
  0% { transform: translateY(18px) scale(0.82) rotate(-4deg); opacity: 0; }
  55% { transform: translateY(-8px) scale(1.04) rotate(2deg); opacity: 1; }
  100% { transform: translateY(0) scale(1) rotate(0); opacity: 1; }
}

@keyframes floaty {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

@media (max-width: 860px) {
  .site-header,
  .section-grid,
  .stats-grid,
  .form-layout,
  .admin-dashboard-hero,
  .admin-kpi-grid,
  .leaderboard-row,
  .admin-row {
    grid-template-columns: 1fr;
  }
  .site-header { align-items: stretch; flex-direction: column; border-radius: 24px; }
  .brand { flex-basis: auto; }
  .site-nav { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .site-nav a { text-align: center; }
  .stats-grid { display: grid; }
  .admin-row-actions { flex-direction: row; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { white-space: normal; }
}

@media (max-width: 520px) {
  .site-nav { grid-template-columns: 1fr; }
  .hero-brand-plate { align-items: flex-start; width: 100%; }
}
