/* Lyx — site styles. Dark first, no framework, no external fonts. */

:root {
  --bg: #0b0b0f;
  --bg-raised: #101017;
  --surface: #14141c;
  --surface-2: #1a1a24;
  --line: #262632;
  --line-soft: #1d1d27;
  --text: #ececf1;
  --muted: #9a9aaf;
  --faint: #6c6c80;
  --accent: #8b5cf6;
  --accent-bright: #a78bfa;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 14px;
  --radius-sm: 9px;
  --font-sans: "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --max: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 82% -8%, rgba(139, 92, 246, 0.16), transparent 70%),
    radial-gradient(700px 420px at 4% 12%, rgba(59, 130, 246, 0.07), transparent 65%),
    linear-gradient(rgba(255, 255, 255, 0.017) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.017) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 1em;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-weight: 620;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}

h3 {
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.faint {
  color: var(--faint);
}

/* ------------------------------------------------------------------ nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11, 11, 15, 0.76);
  backdrop-filter: blur(14px);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

.brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.brand-word {
  font-size: 1.32rem;
  font-weight: 680;
  letter-spacing: -0.06em;
}

.brand-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.18s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.24s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  right: 0;
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.92rem;
  font-weight: 560;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease), color 0.18s var(--ease);
  font-family: inherit;
}

.btn-sm {
  padding: 8px 15px;
  font-size: 0.84rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(139, 92, 246, 0.8);
}

.btn-primary:hover {
  background: #9b70f8;
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -14px rgba(139, 92, 246, 0.9);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: #3a3a4c;
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.2);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow {
  transition: transform 0.2s var(--ease);
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ------------------------------------------------------------------ hero */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  padding: 86px 0 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 62px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0 0 20px;
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.6);
  animation: pulse 2.6s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.5);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(139, 92, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
  }
}

.hero h1 {
  font-size: clamp(2.7rem, 5.6vw, 4.7rem);
  line-height: 0.97;
  letter-spacing: -0.055em;
  margin-bottom: 26px;
}

.accent-word {
  position: relative;
  color: var(--accent-bright);
  white-space: nowrap;
}

.accent-word::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 0;
  bottom: 0.06em;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--faint);
  font-size: 0.64rem;
}

.dot-sep {
  color: var(--line);
}

/* -------------------------------------------------------------- terminal */

.terminal {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #111118, #0d0d13);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.015) inset;
  overflow: hidden;
  position: relative;
}

.terminal::before {
  content: "";
  position: absolute;
  inset: -40% 40% 55% -20%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.22), transparent);
  pointer-events: none;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.018);
}

.term-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2c2c3a;
}

.terminal-title {
  margin-left: 8px;
  color: var(--faint);
  font-size: 0.62rem;
}

.terminal-body {
  padding: 20px 18px 22px;
  display: grid;
  gap: 12px;
}

.msg {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.87rem;
}

.msg-user {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  text-transform: uppercase;
  flex: none;
}

.msg-text {
  color: #d6d6e2;
  line-height: 1.5;
}

.slash {
  color: var(--accent-bright);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.discord-embed {
  position: relative;
  margin-left: 42px;
  background: #16161f;
  border: 1px solid #22222e;
  border-radius: 8px;
  padding: 13px 16px 12px 20px;
  overflow: hidden;
}

.embed-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}

.embed-title {
  margin: 0 0 5px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

.embed-line {
  margin: 0 0 8px;
  color: #c9c9d6;
  font-size: 0.85rem;
}

.embed-foot {
  margin: 0;
  color: var(--faint);
  font-size: 0.62rem;
}

.xp-bar {
  height: 6px;
  border-radius: 99px;
  background: #24242f;
  overflow: hidden;
  margin: 10px 0 8px;
}

.xp-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6d3ff0, var(--accent-bright));
}

/* ---------------------------------------------------------------- ticker */

.ticker {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.012);
}

.ticker-track {
  display: flex;
  gap: 26px;
  width: max-content;
  padding: 13px 0;
  animation: ticker 42s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

.ticker-track .star {
  color: var(--accent);
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* --------------------------------------------------------------- section */

.section {
  padding: 84px 0;
  border-bottom: 1px solid var(--line-soft);
}

.section-head {
  max-width: 620px;
  margin-bottom: 44px;
}

.section-lead {
  color: var(--muted);
  max-width: 56ch;
  font-size: 0.98rem;
}

.section-split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 64px;
  align-items: center;
}

/* --------------------------------------------------------------- modules */

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.module-card {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.006));
  padding: 26px 24px 22px;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease), background 0.22s var(--ease);
  overflow: hidden;
}

.module-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-3px);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.07), rgba(255, 255, 255, 0.008));
}

.module-index {
  position: absolute;
  top: 18px;
  right: 20px;
  color: #3a3a4a;
  font-size: 0.62rem;
}

.module-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 18px;
}

.module-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.62;
  margin-bottom: 16px;
}

.module-tag {
  color: #55556a;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  margin: 0;
}

.module-card-wide {
  grid-column: span 2;
}

.module-aside {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  background: rgba(139, 92, 246, 0.035);
}

.plain-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 9px;
}

.plain-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

.plain-list li::before {
  content: "×";
  position: absolute;
  left: 0;
  color: var(--bad);
  font-size: 0.95rem;
  line-height: 1.35;
}

.aside-note {
  color: var(--faint);
  font-size: 0.8rem;
  margin: 0;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

/* ----------------------------------------------------------- dash preview */

.dash-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d0d13;
  overflow: hidden;
  box-shadow: 0 40px 100px -50px #000;
}

.preview-note {
  margin: 10px 2px 0;
  color: #4a4a5e;
  font-size: 0.54rem;
  letter-spacing: 0.1em;
}

.dash-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02);
}

.dash-url {
  margin-left: 10px;
  color: var(--faint);
  font-size: 0.6rem;
  text-transform: none;
  letter-spacing: 0.06em;
}

.dash-body {
  display: grid;
  grid-template-columns: 172px 1fr;
  min-height: 330px;
}

.dash-side {
  border-right: 1px solid var(--line-soft);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.012);
}

.dash-guild {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 8px;
}

.dash-guild-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-weight: 700;
  font-size: 0.8rem;
  flex: none;
}

.dash-guild strong {
  display: block;
  font-size: 0.78rem;
  line-height: 1.2;
}

.dash-guild .mono {
  font-size: 0.55rem;
  color: var(--faint);
  text-transform: none;
  letter-spacing: 0.03em;
}

.dash-item {
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 0.76rem;
  color: var(--faint);
}

.dash-item.active {
  background: var(--accent-soft);
  color: #d8ccff;
}

.dash-main {
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.dash-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.dash-stat {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.018);
}

.dash-stat .mono {
  display: block;
  color: var(--faint);
  font-size: 0.52rem;
  margin-bottom: 4px;
}

.dash-stat strong {
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.dash-panel {
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.014);
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.dash-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 3px 0;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge-on {
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.08);
}

.badge-off {
  color: var(--faint);
}

/* ----------------------------------------------------------------- steps */

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: grid;
  gap: 10px;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}

.steps li {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.step-num {
  color: var(--accent);
  font-size: 0.66rem;
  display: block;
  margin-bottom: 14px;
}

.steps h3 {
  font-size: 1.06rem;
}

.steps p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ------------------------------------------------------------------- cta */

.cta {
  position: relative;
  text-align: center;
  padding: 96px 0 104px;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 620px;
  height: 300px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.24), transparent);
  pointer-events: none;
}

.cta h2 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  position: relative;
}

.cta .section-lead {
  margin: 0 auto 26px;
  position: relative;
}

.cta .hero-actions {
  justify-content: center;
  position: relative;
}

/* ---------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.25);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 52px 24px 34px;
  display: grid;
  grid-template-columns: 1.2fr 1.4fr;
  gap: 40px;
}

.footer-note {
  color: var(--faint);
  font-size: 0.84rem;
  max-width: 32ch;
  margin-top: 14px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-cols h4 {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
  font-weight: 500;
}

.footer-cols a {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  padding: 3px 0;
  transition: color 0.16s var(--ease);
}

.footer-cols a:hover {
  color: var(--text);
}

.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px 28px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--faint);
  font-size: 0.74rem;
}

.footer-bottom .mono {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

/* ------------------------------------------------------------ page heads */

.page-head {
  padding: 64px 0 38px;
  border-bottom: 1px solid var(--line-soft);
}

.page-head h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.3rem);
  margin-bottom: 14px;
}

.page-head p {
  color: var(--muted);
  max-width: 60ch;
  margin: 0;
}

/* --------------------------------------------------------------- commands */

.commands-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 26px 0 6px;
}

.search-input {
  flex: 1 1 260px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 11px 18px;
  outline: none;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.search-input::placeholder {
  color: var(--faint);
}

.search-input:focus {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 13px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.16s var(--ease);
}

.chip:hover {
  color: var(--text);
  border-color: #3a3a4c;
}

.chip.active {
  background: var(--accent-soft);
  border-color: rgba(139, 92, 246, 0.45);
  color: #d8ccff;
}

.command-group {
  padding: 34px 0 8px;
}

.command-group h2 {
  font-size: 1.4rem;
  text-transform: capitalize;
  margin-bottom: 18px;
}

.command-list {
  display: grid;
  gap: 8px;
}

.command {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.014);
  padding: 14px 18px;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.command:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.028);
}

.command-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.command-name {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--accent-bright);
}

.command-desc {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 4px 0 0;
}

.command-options {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.option-pill {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--faint);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 2px 6px;
}

.option-pill strong {
  color: var(--muted);
  font-weight: 500;
}

.empty-state {
  color: var(--faint);
  padding: 40px 0;
  font-size: 0.9rem;
}

/* ----------------------------------------------------------------- status */

.status-grid {
  display: grid;
  gap: 10px;
  padding: 40px 0 20px;
  max-width: 720px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.014);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.status-dot.ok {
  background: var(--ok);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.6);
}

.status-dot.bad {
  background: var(--bad);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.5);
}

.status-name {
  font-size: 0.92rem;
}

.status-detail {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-note {
  color: var(--faint);
  font-size: 0.8rem;
  max-width: 60ch;
  padding-bottom: 40px;
}

/* ------------------------------------------------------------------ legal */

.prose {
  max-width: 720px;
  padding: 48px 0 72px;
}

.prose h2 {
  font-size: 1.3rem;
  margin-top: 34px;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 0.94rem;
}

.prose ul {
  padding-left: 20px;
}

.prose a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose .updated {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ------------------------------------------------------------------ login */

.login-wrap {
  min-height: 62vh;
  display: grid;
  place-items: center;
  padding: 70px 0;
}

.login-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #14141c, #0f0f15);
  padding: 34px;
  text-align: center;
  box-shadow: 0 40px 90px -50px #000;
}

.login-card img {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
}

.login-card h1 {
  font-size: 1.55rem;
}

.login-card p {
  color: var(--muted);
  font-size: 0.88rem;
}

.login-card .btn {
  width: 100%;
  margin-top: 8px;
}

.form-error {
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 0.82rem;
  margin-bottom: 16px;
  text-align: left;
}

.legal-fine {
  color: var(--faint);
  font-size: 0.72rem;
  margin-top: 18px;
}

/* -------------------------------------------------------------- dashboard */

.dash-shell {
  padding: 34px 0 80px;
}

.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.dash-top h1 {
  font-size: 1.7rem;
  margin: 0;
}

.dash-top p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 4px 0 0;
}

.dash-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 12px;
}

.server-card {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.006));
  padding: 18px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.server-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.server-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  object-fit: cover;
  background: var(--surface-2);
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent-bright);
}

.server-name {
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}

.server-meta {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.empty-panel {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 44px 30px;
  text-align: center;
  background: rgba(139, 92, 246, 0.03);
}

.empty-panel h2 {
  font-size: 1.3rem;
}

.empty-panel p {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 20px;
  font-size: 0.9rem;
}

/* ------------------------------------------------------------ guild admin */

.admin-shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: 26px;
  padding: 28px 0 90px;
  align-items: start;
}

.admin-side {
  position: sticky;
  top: 84px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.014);
  padding: 14px 12px;
}

.admin-guild {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 10px;
}

.admin-guild .server-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.8rem;
}

.admin-guild strong {
  display: block;
  font-size: 0.84rem;
  line-height: 1.25;
}

.admin-guild span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-tab {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.83rem;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.admin-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.admin-tab.active {
  background: var(--accent-soft);
  color: #ddd2ff;
}

.admin-side-foot {
  border-top: 1px solid var(--line-soft);
  margin-top: 10px;
  padding: 10px 8px 0;
}

.admin-side-foot a {
  color: var(--faint);
  font-size: 0.76rem;
}

.admin-side-foot a:hover {
  color: var(--text);
}

.admin-main {
  min-width: 0;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin-head h1 {
  font-size: 1.55rem;
  margin: 0;
}

.admin-head p {
  margin: 3px 0 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.stat-chip {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.016);
  padding: 10px 14px;
  min-width: 110px;
}

.stat-chip span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}

.stat-chip strong {
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.006));
  padding: 22px;
  margin-bottom: 14px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-head h2 {
  font-size: 1.05rem;
  margin: 0 0 3px;
  letter-spacing: -0.02em;
}

.panel-head p {
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}

.field .hint {
  color: var(--faint);
  font-size: 0.72rem;
  margin: 0;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: #0f0f16;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.switch-row:last-of-type {
  border-bottom: 0;
}

.switch-row strong {
  display: block;
  font-size: 0.87rem;
  font-weight: 550;
}

.switch-row small {
  color: var(--faint);
  font-size: 0.74rem;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: #2a2a38;
  border: 1px solid #343444;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #9a9aaf;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}

.switch input:checked + span {
  background: rgba(139, 92, 246, 0.35);
  border-color: rgba(139, 92, 246, 0.6);
}

.switch input:checked + span::after {
  transform: translateX(18px);
  background: var(--accent-bright);
}

.switch input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.save-note {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
}

.save-note.ok {
  color: var(--ok);
}

.save-note.bad {
  color: var(--bad);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  padding: 0 10px 9px;
  border-bottom: 1px solid var(--line-soft);
}

.table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
}

.table tr:last-child td {
  border-bottom: 0;
}

.table .mono {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.tag {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 1px 8px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #16161f;
  color: var(--text);
  padding: 12px 16px;
  font-size: 0.84rem;
  box-shadow: 0 20px 50px -20px #000;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast.bad {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

.preview-box {
  margin-top: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.04);
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: pre-wrap;
  line-height: 1.6;
}

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

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 0.84rem;
  color: var(--muted);
  cursor: pointer;
}

.check-row:hover {
  border-color: var(--line);
  color: var(--text);
}

.check-row input {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  margin: 0;
}

.reward-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.reward-row input,
.reward-row select {
  margin: 0;
}

select[multiple] {
  padding: 6px;
  min-height: 120px;
}

select[multiple] option {
  padding: 4px 6px;
  border-radius: 4px;
}

input[type="color"] {
  padding: 4px;
  height: 38px;
  cursor: pointer;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 980px) {
  .hero-grid,
  .section-split {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .module-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .module-card-wide {
    grid-column: span 2;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: static;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 56px 0 46px;
  }

  .section {
    padding: 60px 0;
  }

  .module-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .module-card-wide {
    grid-column: span 1;
  }

  .dash-body {
    grid-template-columns: 1fr;
  }

  .dash-side {
    display: none;
  }

  .discord-embed {
    margin-left: 0;
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .stat-chip {
    flex: 1 1 120px;
  }
}

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