:root {
  --bg: #0f1115;
  --bg-elev: #171a21;
  --bg-card: #1c2029;
  --border: #252a35;
  --text: #e7e9ee;
  --text-dim: #9aa3b2;
  --accent: #c89b3c;
  --accent-hover: #e5b656;
  --discord: #5865f2;
  --danger: #e14b4b;
  --radius: 10px;
  --maxw: 960px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

code {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
  font-size: 0.9em;
}

pre {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.9em;
}
pre code { background: transparent; border: none; padding: 0; }

nav.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 17, 21, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
nav.topbar .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
nav.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}
nav.topbar .brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
nav.topbar .links {
  margin-left: auto;
  display: flex;
  gap: 18px;
}
nav.topbar .links a { color: var(--text-dim); font-size: 0.95em; }
nav.topbar .links a:hover { color: var(--text); text-decoration: none; }
nav.topbar .links > a.active {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 14px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elev);
}
.lang-switch a {
  padding: 3px 9px;
  font-size: 0.8em;
  color: var(--text-dim);
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lang-switch a.active {
  background: var(--accent);
  color: #1a1303;
}
.lang-switch a:hover:not(.active) { color: var(--text); text-decoration: none; }

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.hero {
  padding: 60px 0 40px;
  text-align: center;
}
.hero img.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(1.3em, 3vw, 2em);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.hero .tagline {
  color: var(--text-dim);
  font-size: 1.15em;
  max-width: 560px;
  margin: 0 auto 28px;
}
.hero .cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn.primary {
  background: var(--accent);
  color: #1a1303;
}
.btn.primary:hover { background: var(--accent-hover); color: #1a1303; }
.btn.discord {
  background: var(--discord);
  color: white;
}
.btn.discord:hover { background: #4752c4; color: white; }
.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.disabled {
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: not-allowed;
  border-color: var(--border);
}
.btn.disabled:hover { transform: none; }

section {
  margin: 48px 0;
}
section h2 {
  font-size: 1.6em;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 1.1em;
  color: var(--accent);
}
.feature p { margin: 0; color: var(--text-dim); font-size: 0.95em; }

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps li {
  counter-increment: step;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px 18px 60px;
  margin-bottom: 14px;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #1a1303;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9em;
}
.steps li h3 { margin: 0 0 6px; font-size: 1.05em; }
.steps li p { margin: 0 0 8px; color: var(--text-dim); }

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--discord);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.contact-card .handle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
  font-size: 1.05em;
}
.contact-card .handle code {
  flex: 0 0 auto;
  font-size: 1em;
}
.contact-card .copy-btn {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85em;
}
.contact-card .copy-btn:hover { color: var(--text); border-color: var(--accent); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.94em;
}
th {
  background: var(--bg-elev);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
tr:last-child td { border-bottom: none; }

footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 20px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9em;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer .legal {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.85em;
  line-height: 1.5;
}

.note {
  background: rgba(200, 155, 60, 0.08);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 6px;
  margin: 16px 0;
  font-size: 0.94em;
}

/* Owner KPI dashboard (/admin, served by the bot behind this site). */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.kpi-value { font-size: 2em; font-weight: 700; color: var(--accent); line-height: 1.1; }
.kpi-label { font-weight: 600; }
.kpi-hint { color: var(--text-dim); font-size: 0.85em; }
.kpi-bar { width: 100%; min-width: 120px; height: 10px; }
.kpi-bar::-webkit-meter-bar { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 5px; }
.kpi-bar::-webkit-meter-optimum-value { background: var(--accent); border-radius: 5px; }
.kpi-bar::-moz-meter-bar { background: var(--accent); border-radius: 5px; }
.kpi-notes { color: var(--text-dim); font-size: 0.94em; line-height: 1.6; }
form.inline { display: inline; margin: 0; }
/* Signed-in admin pages: nav links next to the logout button. */
nav.topbar .links:has(form.inline) { align-items: center; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
@media (max-width: 700px) {
  nav.topbar .inner:has(form.inline) { flex-wrap: wrap; gap: 8px 12px; }
  nav.topbar .inner:has(form.inline) .brand { white-space: nowrap; }
  nav.topbar .links:has(form.inline) { margin-left: 0; width: 100%; justify-content: space-between; gap: 10px; }
  nav.topbar .links:has(form.inline) .btn { padding: 6px 12px; font-size: 0.85em; }
}
button.btn { font-family: inherit; }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.05em; white-space: normal; }
  nav.topbar .links { gap: 12px; }
  nav.topbar .links a { font-size: 0.9em; }
}
