:root {
  --bg: #100d0c;
  --bg-soft: #171210;
  --surface: rgba(24, 18, 16, 0.9);
  --surface-strong: rgba(34, 26, 22, 0.96);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --text: #f5efe8;
  --text-strong: #ffffff;
  --muted: #c7b7a7;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #ff8b3d;
  --accent-2: #ffb15a;
  --accent-3: #ff6a3d;
  --discord: #5865f2;
  --good: #59d191;
  --warn: #f0b356;
  --danger: #ff8c79;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 106, 61, 0.22), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(255, 177, 90, 0.18), transparent 20%),
    radial-gradient(circle at 50% 100%, rgba(88, 101, 242, 0.12), transparent 26%),
    linear-gradient(180deg, #0e0b0a 0%, #140f0d 36%, #1b1411 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent);
  opacity: 0.35;
}

a {
  color: inherit;
}

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

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
}

.site-shell {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar,
.panel,
.feature-card,
.metric-card,
.guild-card,
.auth-card,
.flash,
.stat-card,
.empty-card,
.faq-item,
.sidebar-note,
.data-row,
.toggle-card,
.module-card {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 28px;
  margin-bottom: 22px;
}

.topbar-right,
.topnav,
.topbar-user,
.hero-actions,
.header-actions,
.tag-row,
.status-line,
.footer-actions,
.auth-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-mark,
.guild-avatar,
.topbar-user-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  box-shadow: 0 14px 36px rgba(255, 106, 61, 0.24);
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: white;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong,
h1,
h2,
h3,
.metric-card strong,
.stat-card strong,
.summary-list strong,
.feed-item strong,
.topbar-user-copy strong {
  font-family: "Space Grotesk", sans-serif;
}

.brand-copy small,
.lede,
.hero-points,
.feature-card p,
.status-panel p,
.faq-item p,
.preview-link,
.metric-card span,
.muted,
.guild-card-meta,
.data-row p,
.data-row span,
.status-note p,
.connection-box p,
.auth-note,
.site-footer p,
.feed-label {
  color: var(--muted);
}

.topnav a,
.footer-actions a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.topnav a:hover,
.footer-actions a:hover {
  color: var(--text-strong);
}

.topbar-user {
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
}

.topbar-user-avatar img,
.guild-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-user-copy {
  display: grid;
  gap: 2px;
}

.topbar-user-copy small {
  color: var(--muted);
}

.page-stack,
.card-grid,
.metric-grid,
.split-layout,
.faq-list,
.hero-grid,
.preview-layout,
.stats-grid,
.guild-grid,
.control-layout,
.section-nav,
.module-grid,
.summary-list,
.data-list,
.inline-grid,
.toggle-grid,
.stack-form,
.auth-grid,
.preview-feed,
.auth-hero,
.hero-panel,
.showcase-card,
.showcase-card-premium {
  display: grid;
  gap: 18px;
}

.page-stack {
  margin-top: 18px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: stretch;
  gap: 22px;
}

.hero-grid-premium {
  position: relative;
}

.hero-grid-premium::after {
  content: "";
  position: absolute;
  inset: 26px 24px auto auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 139, 61, 0.2), transparent 70%);
  filter: blur(16px);
  pointer-events: none;
}

.hero-copy,
.hero-panel > div,
.auth-pane,
.preview-main {
  display: grid;
  gap: 16px;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text-strong);
}

h1 {
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.5rem, 2.2vw, 2.25rem);
}

.lede {
  margin: 0;
  max-width: 62ch;
  line-height: 1.75;
  font-size: 1.05rem;
}

.lede.small {
  font-size: 1rem;
}

.hero-points {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.hero-points li {
  position: relative;
  padding-left: 18px;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.small {
  padding: 11px 16px;
}

.button.primary {
  color: white;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  box-shadow: 0 20px 44px rgba(255, 106, 61, 0.26);
}

.button.secondary {
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.button.ghost {
  color: var(--text-strong);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.discord-button {
  color: white;
  background: linear-gradient(135deg, #5865f2, #7289da);
  box-shadow: 0 18px 40px rgba(88, 101, 242, 0.3);
}

.panel,
.feature-card,
.metric-card,
.guild-card,
.auth-card,
.empty-card,
.stat-card,
.faq-item,
.toggle-card,
.module-card {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.showcase-card,
.showcase-card-premium {
  border-radius: 30px;
  padding: 24px;
}

.showcase-card-premium {
  position: relative;
  overflow: hidden;
}

.showcase-card-premium::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 140px;
  background: linear-gradient(180deg, rgba(255, 139, 61, 0.12), transparent);
  pointer-events: none;
}

.showcase-head,
.section-heading,
.preview-toolbar,
.preview-sidebar,
.guild-card-top,
.guild-card-meta,
.connection-box,
.guild-hero,
.module-head,
.section-title-row,
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.showcase-head,
.preview-toolbar,
.guild-card-meta,
.connection-box,
.section-title-row,
.site-footer {
  align-items: center;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 139, 61, 0.14);
  color: #ffd5b3;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(255, 177, 90, 0.14);
}

.pill.good {
  background: rgba(89, 209, 145, 0.12);
  color: #c8ffe2;
  border-color: rgba(89, 209, 145, 0.22);
}

.pill.warn {
  background: rgba(240, 179, 86, 0.14);
  color: #ffdfad;
  border-color: rgba(240, 179, 86, 0.2);
}

.metric-grid,
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.metric-card,
.stat-card {
  background: var(--surface-strong);
}

.metric-card strong,
.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.65rem;
}

.status-panel {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-feed {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feed-item {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feed-item strong {
  display: block;
  margin-top: 8px;
}

.card-grid.three,
.faq-list,
.guild-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.two,
.split-layout,
.module-grid,
.auth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card,
.module-card,
.command-card {
  height: 100%;
}

.feature-card,
.faq-item,
.sidebar-note,
.data-row,
.toggle-card,
.preview-link,
.section-link {
  border-radius: 22px;
}

.feature-card,
.faq-item,
.sidebar-note,
.data-row,
.toggle-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-card p,
.faq-item p {
  line-height: 1.7;
}

.accent-panel,
.status-card {
  background: linear-gradient(180deg, rgba(255, 139, 61, 0.12), rgba(255, 255, 255, 0.03));
}

.preview-window {
  overflow: hidden;
}

.preview-toolbar {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.window-dot.red {
  background: #ff6b6b;
}

.window-dot.amber {
  background: #ffd166;
}

.window-dot.green {
  background: #5cd67b;
}

.preview-layout {
  grid-template-columns: 220px 1fr;
  min-height: 420px;
  padding-top: 18px;
}

.preview-sidebar,
.section-nav {
  flex-direction: column;
  align-content: start;
}

.preview-link,
.section-link {
  display: block;
  padding: 13px 14px;
  text-decoration: none;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  font-weight: 700;
}

.preview-link.active,
.section-link.active {
  color: white;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  border-color: rgba(255, 255, 255, 0.1);
}

.auth-layout {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 210px);
}

.auth-card {
  width: min(960px, 100%);
}

.auth-card-wide {
  padding: 28px;
}

.auth-pane {
  border-radius: 26px;
  padding: 24px;
}

.auth-pane-primary {
  background: linear-gradient(180deg, rgba(88, 101, 242, 0.14), rgba(255, 255, 255, 0.03));
}

.auth-note {
  margin: 0;
}

.flash {
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.flash.success {
  color: #d4ffea;
  background: rgba(53, 142, 96, 0.2);
}

.flash.error {
  color: #ffd0c8;
  background: rgba(185, 61, 48, 0.24);
}

.guild-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: white;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.guild-avatar.large {
  width: 76px;
  height: 76px;
  border-radius: 24px;
}

.guild-card-top {
  align-items: center;
}

.guild-card-meta {
  font-size: 0.95rem;
}

.guild-hero {
  align-items: center;
}

.guild-hero-main,
.hero-status,
.status-stack,
.control-content,
.dashboard-section {
  display: grid;
  gap: 16px;
}

.hero-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.control-layout {
  grid-template-columns: 260px 1fr;
  align-items: start;
}

.control-sidebar {
  position: sticky;
  top: 18px;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-weight: 700;
  color: var(--text-strong);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.05);
}

input::placeholder,
textarea::placeholder {
  color: rgba(245, 239, 232, 0.45);
}

textarea {
  resize: vertical;
  min-height: 108px;
}

.inline-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input,
.toggle-card input {
  width: auto;
}

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

.setup-warning {
  padding: 18px;
  border-radius: 20px;
  background: rgba(240, 179, 86, 0.12);
  border: 1px solid rgba(240, 179, 86, 0.18);
}

.error-card {
  background: rgba(185, 61, 48, 0.22);
  border-color: rgba(255, 140, 121, 0.22);
}

.empty-card {
  min-height: 220px;
  display: grid;
  align-content: center;
}

.section-block {
  display: grid;
  gap: 18px;
}

.site-footer {
  margin-top: 28px;
  padding: 20px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer p {
  margin: 6px 0 0;
}

@media (max-width: 1100px) {
  .hero-grid,
  .card-grid.three,
  .card-grid.two,
  .split-layout,
  .faq-list,
  .preview-layout,
  .metric-grid,
  .stats-grid,
  .guild-grid,
  .control-layout,
  .module-grid,
  .inline-grid,
  .toggle-grid,
  .auth-grid,
  .preview-feed,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .control-sidebar {
    position: static;
  }
}

@media (max-width: 780px) {
  .site-shell {
    width: min(100% - 18px, 1240px);
  }

  .topbar,
  .topbar-right,
  .showcase-head,
  .guild-hero,
  .section-title-row,
  .module-head,
  .connection-box,
  .section-heading,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    font-size: clamp(2.2rem, 13vw, 3.8rem);
  }

  .topbar-user {
    width: 100%;
  }
}
