:root {
  color-scheme: dark;
  --bg: #000;
  --bg-2: #0a0a0a;
  --surface: #111;
  --surface-2: #1a1a1a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #ededed;
  --text-2: #a1a1a1;
  --text-3: #7d7d7d;
  --accent: #fff;
  --card: linear-gradient(rgba(255, 255, 255, 0.04), transparent 70%), var(--bg-2);
  --sheen: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  --danger: #ff6166;
  --danger-bg: #2a0a0c;
  --focus: #47a8ff;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --ease: 150ms ease;
  --ease-out: cubic-bezier(0.22, 0.8, 0.28, 1);
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #2a2a2a transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: 1.125rem; line-height: 1.4; }
h3 { font-size: 1rem; }
h1, h2 { text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: rgba(255, 255, 255, 0.25); color: #fff; }
a { color: inherit; }
code, .mono { font-family: var(--mono); }
.muted { color: var(--text-2); }
.small { font-size: 0.875rem; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-sm); }
@media (forced-colors: active) { :focus-visible { outline: 1px solid Highlight; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--border); border-radius: var(--r);
  background: rgba(255, 255, 255, 0.025); color: var(--text);
  font: 600 0.875rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease), transform 200ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--text); color: #000; border-color: var(--text); }
.btn--discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: none; }
.btn--ghost { color: var(--text-2); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--border-strong); }
  .btn--primary:hover { background: #fff; border-color: #fff; }
  .btn--discord:hover { background: #4752c4; border-color: #4752c4; }
  .btn--danger:hover { background: var(--danger-bg); }
  .btn--ghost:hover { color: var(--text); }
}
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 0.8125rem; font-weight: 500; }
@media (pointer: coarse) { .btn, .btn--sm { min-height: 44px; } }

.panel { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); color: var(--text); font-size: 0.75rem; font-weight: 500;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--amber { color: #ffb224; background: #1a1300; border-color: #3d2c00; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; }
.logo img { width: 22px; height: 22px; }

.toast {
  inset: auto 16px 88px auto; margin: 0;
  padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: var(--r);
  background: var(--surface-2); color: var(--text); font-size: 0.875rem;
  opacity: 0; translate: 0 8px;
  transition: opacity var(--ease), translate var(--ease), display var(--ease) allow-discrete, overlay var(--ease) allow-discrete;
}
.toast:popover-open { opacity: 1; translate: 0 0; }
@starting-style { .toast:popover-open { opacity: 0; translate: 0 8px; } }
@media (min-width: 900px) { .toast { bottom: 24px; right: 24px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; scroll-behavior: auto !important; }
}

.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}
.site-nav__inner { display: flex; align-items: center; gap: 24px; height: 56px; }
.site-nav__links { display: none; gap: 4px; }
.site-nav__links a {
  padding: 6px 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 0.875rem; text-decoration: none;
  transition: color var(--ease), background var(--ease);
}
.site-nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.site-nav__actions { margin-left: auto; display: flex; gap: 8px; }
@media (min-width: 760px) { .site-nav__links { display: flex; } }

.footer { border-top: 1px solid var(--border); padding: 32px 0 48px; color: var(--text-3); font-size: 0.875rem; }
.footer__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px 32px; }
.footer__inner .logo { color: var(--text); justify-self: start; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.footer__links a { color: var(--text-2); text-decoration: none; transition: color var(--ease); }
.footer__links a:hover { color: var(--text); }
.footer__inner > p { justify-self: end; text-align: right; }
@media (max-width: 720px) {
  .footer__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer__inner .logo, .footer__inner > p { justify-self: center; text-align: center; }
}
@media (pointer: coarse) {
  .footer__links a, .logo { min-height: 44px; display: inline-flex; align-items: center; }
}
