/* ==========================================================================
   SJW — "Signal Grid" design system
   Palette, type, and layout tokens are built around the bot's mark: a stark
   black-and-white geometric hexagon. Warm gold/parchment is replaced with a
   cool monochrome base plus a single electric accent, so the site reads as
   the same crest, not a generic bolt-on marketing page.
   ========================================================================== */

:root {
  --ink: #06080c;
  --ink-2: #0e1218;
  --ink-3: #161c25;
  --hairline: #262e3a;

  --gold: #46d6ff;
  --gold-soft: #93e8ff;
  --gold-dim: #1c5b73;

  --parchment: #eef3f7;
  --seal: #c23b52;
  --seal-soft: #e2687c;
  --success: #35c584;

  --ivory: #eef1f6;
  --steel: #94a1b3;
  --steel-dim: #58616f;

  --display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, monospace;

  --radius: 10px;
  --radius-lg: 16px;
  --max-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

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

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

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--ivory);
}

p {
  margin: 0 0 1em;
  color: var(--steel);
}

:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

/* ---------- Background texture ---------- */
.page-texture {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 800px 500px at 15% -10%, rgba(70, 214, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 700px 500px at 110% 10%, rgba(194, 59, 82, 0.07), transparent 60%),
    var(--ink);
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 8, 12, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--ivory);
}

.seal-mark {
  border-radius: 22%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--hairline);
}

.brand .seal-mark {
  width: 34px;
  height: 34px;
}

.hero-seal .seal-mark {
  width: 96px;
  height: 96px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--steel);
  transition: color 0.2s ease;
  position: relative;
}

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

.nav-links a.active {
  color: var(--gold);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-links-mobile-only {
  display: none;
}

/* ---------- User avatar dropdown ---------- */
.nav-user {
  position: relative;
}

.nav-user-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 8px 3px 3px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.nav-user-trigger:hover,
.nav-user-trigger[aria-expanded="true"] {
  border-color: var(--hairline);
  background: var(--ink-3);
}

.nav-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--hairline);
  display: block;
}

.nav-user-chevron {
  color: var(--steel-dim);
  font-size: 0.85rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.nav-user-trigger[aria-expanded="true"] .nav-user-chevron {
  transform: rotate(180deg);
}

.nav-user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: var(--ink-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 8px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 200;
}

.nav-user.open .nav-user-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-user-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--hairline);
}

.nav-user-menu-header .nav-user-avatar {
  width: 36px;
  height: 36px;
}

.nav-user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ivory);
}

.nav-user-sub {
  font-size: 0.75rem;
  color: var(--steel-dim);
}

.nav-user-menu-item {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--ivory);
  transition: background 0.15s ease;
}

.nav-user-menu-item:hover {
  background: var(--ink-3);
  color: var(--gold-soft);
}

.nav-user-menu-item-danger:hover {
  color: var(--seal-soft);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--ivory);
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--ink-2);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--hairline);
  }
  .nav-links-mobile-only {
    display: block;
  }
  .nav-toggle {
    display: block;
  }
  /* These live inside the mobile dropdown instead (as .nav-links-mobile-only),
     so they'd otherwise be shown twice — hide the top-bar copies but never
     hide the avatar menu, which has no mobile-menu equivalent of its own. */
  .nav-invite-btn,
  .nav-signin-btn {
    display: none;
  }
}

@media (max-width: 420px) {
  .nav-invite-btn {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #071019;
  box-shadow: 0 8px 24px rgba(70, 214, 255, 0.22);
}

.btn-gold:hover {
  box-shadow: 0 10px 30px rgba(70, 214, 255, 0.34);
  filter: brightness(1.04);
}

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border-color: var(--hairline);
}

.btn-ghost:hover {
  border-color: var(--gold-dim);
  color: var(--gold-soft);
}

.btn-danger {
  background: rgba(194, 59, 82, 0.15);
  color: #f0b8b8;
  border-color: rgba(194, 59, 82, 0.5);
}

.btn-danger:hover {
  background: rgba(194, 59, 82, 0.28);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 64px;
  text-align: center;
}

.hero-seal {
  width: 96px;
  height: 96px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: seal-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes seal-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.08;
  max-width: 820px;
  margin: 0 auto 24px;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: var(--mono);
  font-size: 1.8rem;
  color: var(--gold-soft);
  display: block;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--steel-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- Section scaffolding ---------- */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--hairline);
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
}

.section-head .eyebrow {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 14px;
}

/* ---------- Seal divider ---------- */
.seal-divider {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--gold-dim);
  margin: 0 0 40px;
}

.seal-divider::before,
.seal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

/* ---------- Clause cards (features) ---------- */
.clause-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .clause-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .clause-grid {
    grid-template-columns: 1fr;
  }
}

.clause {
  background: var(--ink-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px 28px 30px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.clause:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
}

.clause-numeral {
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 14px;
}

.clause h3 {
  font-size: 1.15rem;
  margin: 0 0 10px;
  flex: 1;
}

.clause-toggle h3 {
  margin: 0;
}

.clause p {
  font-size: 0.94rem;
  margin: 0;
}

/* ---------- Interactive clause cards (features page) ---------- */
.clause-interactive.active {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 1px rgba(70, 214, 255, 0.12), 0 12px 30px rgba(70, 214, 255, 0.08);
}

.clause-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 12px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: inherit;
}

.clause-toggle .clause-numeral {
  font-size: 1.3rem;
  min-width: 28px;
  margin-bottom: 0;
}

.clause-chevron {
  color: var(--steel-dim);
  font-size: 1.1rem;
  transition: transform 0.25s ease, color 0.2s ease;
  line-height: 1;
}

.clause-interactive.active .clause-chevron {
  transform: rotate(180deg);
  color: var(--gold);
}

.clause-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.clause-interactive.active .clause-detail {
  grid-template-rows: 1fr;
}

.clause-detail-inner {
  overflow: hidden;
}

.clause-long {
  font-size: 0.9rem;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  margin-top: 14px;
}

.clause-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  padding-bottom: 2px;
}

.clause-chip {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--gold-soft);
  background: rgba(70, 214, 255, 0.08);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  padding: 4px 11px;
  cursor: default;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  position: relative;
  padding-left: 52px;
}

.step-mark {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  color: var(--gold-soft);
  font-size: 0.85rem;
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.92rem;
}

/* ---------- Commands page ---------- */
.command-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
}

.command-tab {
  border: 1px solid var(--hairline);
  background: var(--ink-2);
  color: var(--steel);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.command-tab:hover {
  border-color: var(--gold-dim);
  color: var(--ivory);
}

.command-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #071019;
}

.command-category {
  display: none;
}

.command-category.active {
  display: block;
  animation: fade-in 250ms ease both;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.command-category-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.command-category-icon {
  font-size: 1.6rem;
  color: var(--gold);
}

.command-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 700px) {
  .command-list {
    grid-template-columns: 1fr;
  }
}

.command-row {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  background: var(--ink-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.command-name {
  font-family: var(--mono);
  color: var(--gold-soft);
  font-size: 0.9rem;
  white-space: nowrap;
}

.command-row p {
  font-size: 0.88rem;
  margin: 0;
}

/* ---------- Multi-select chip picker ---------- */
.multiselect {
  position: relative;
  width: 100%;
}

.multiselect-trigger {
  width: 100%;
  min-height: 42px;
  background: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font: inherit;
  color: var(--ivory);
  transition: border-color 0.15s ease;
}

.multiselect.open .multiselect-trigger,
.multiselect-trigger:hover {
  border-color: var(--gold-dim);
}

.multiselect-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  text-align: left;
}

.multiselect-placeholder {
  color: var(--steel-dim);
  font-size: 0.88rem;
}

.multiselect-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(70, 214, 255, 0.1);
  border: 1px solid var(--gold-dim);
  color: var(--gold-soft);
  border-radius: 999px;
  padding: 3px 8px 3px 10px;
  font-size: 0.82rem;
}

.multiselect-chip-x {
  cursor: pointer;
  color: var(--steel);
  font-size: 0.7rem;
}

.multiselect-chip-x:hover {
  color: var(--seal-soft);
}

.multiselect-chevron {
  color: var(--steel-dim);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.multiselect.open .multiselect-chevron {
  transform: rotate(180deg);
}

.multiselect-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--ink-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 150;
  display: none;
}

.multiselect.open .multiselect-panel {
  display: block;
}

.multiselect-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  cursor: pointer;
}

.multiselect-option:hover {
  background: var(--ink-3);
}

.multiselect-option input {
  accent-color: var(--gold);
}

.multiselect-empty {
  padding: 10px;
  font-size: 0.85rem;
  color: var(--steel-dim);
}

/* ---------- Advanced Rules list ---------- */
.rules-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.rule-row {
  background: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 14px 16px;
}

.rule-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.rule-number {
  font-family: var(--mono);
  color: var(--gold-soft);
  font-size: 0.85rem;
}

.rule-name {
  font-weight: 600;
  color: var(--ivory);
  flex: 1;
}

.rule-punishment {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  color: var(--steel);
}

.rule-punishment-WARN {
  color: var(--gold-soft);
  border-color: var(--gold-dim);
}

.rule-punishment-TIMEOUT {
  color: #e0b34d;
  border-color: rgba(224, 179, 77, 0.4);
}

.rule-punishment-KICK,
.rule-punishment-BAN {
  color: var(--seal-soft);
  border-color: rgba(194, 59, 82, 0.4);
}

.rule-row-meta {
  font-size: 0.82rem;
  color: var(--steel-dim);
  margin-bottom: 10px;
}

.rule-row-actions {
  display: flex;
  gap: 8px;
}

.rule-row-actions form {
  display: contents;
}

.rule-form-title {
  font-size: 1.05rem;
  margin: 28px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  color: var(--gold-soft);
}

.rule-delete-btn:hover {
  color: var(--seal-soft);
  border-color: rgba(194, 59, 82, 0.5);
}
.embed-builder-shell {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 960px) {
  .embed-builder-shell {
    grid-template-columns: 1fr;
  }
}

.embed-builder-form .settings-panel {
  padding: 24px;
}

.embed-builder-form .field-row {
  grid-template-columns: 140px 1fr;
}

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

.embed-color-row input[type="color"] {
  width: 42px;
  height: 38px;
  padding: 2px;
  background: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  cursor: pointer;
}

.embed-field-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.embed-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px;
  align-items: center;
}

@media (max-width: 620px) {
  .embed-field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.embed-field-row input[type="text"] {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--hairline);
  color: var(--ivory);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.86rem;
}

.embed-inline-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--steel);
  white-space: nowrap;
}

.embed-inline-toggle input {
  accent-color: var(--gold);
}

.embed-field-remove {
  background: none;
  border: 1px solid var(--hairline);
  color: var(--steel-dim);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.embed-field-remove:hover {
  color: var(--seal-soft);
  border-color: rgba(194, 59, 82, 0.5);
}

.embed-builder-preview {
  position: sticky;
  top: 96px;
}

.embed-preview-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-dim);
  margin-bottom: 12px;
}

/* Mimics Discord's own embed card so what you see here is what actually
   gets posted — same layout rules, just re-skinned in the site's palette. */
.discord-embed {
  position: relative;
  background: #2b2d31;
  border-left: 4px solid #46d6ff;
  border-radius: 6px;
  padding: 14px 16px;
  color: #dbdee1;
  font-family: var(--body);
  font-size: 0.88rem;
  line-height: 1.4;
}

.discord-embed-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 6px;
  min-height: 1em;
}

.discord-embed-author-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.discord-embed-title {
  font-weight: 700;
  color: #fff;
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.discord-embed-description {
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 8px;
}

.discord-embed-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 12px;
  margin-bottom: 8px;
}

.discord-embed-field {
  grid-column: 1 / -1;
}

.discord-embed-field.inline {
  grid-column: span 1;
}

.discord-embed-field-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.discord-embed-field-value {
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.discord-embed-image {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 8px;
  max-height: 260px;
  object-fit: cover;
}

.discord-embed-footer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #b5bac1;
  min-height: 1em;
}

.discord-embed-footer-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.discord-embed-thumbnail {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
}

/* ---------- What's New pill (homepage) ---------- */
.whats-new-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink-2);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  padding: 6px 16px 6px 6px;
  font-size: 0.82rem;
  color: var(--ivory);
  margin-bottom: 20px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.whats-new-pill:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.whats-new-badge {
  background: var(--gold);
  color: #071019;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 10px;
}

.whats-new-arrow {
  color: var(--gold-soft);
}

/* ---------- Updates / changelog page ---------- */
.updates-timeline {
  max-width: 760px;
  margin: 0 auto;
}

.update-entry {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 24px;
}

.update-entry-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.update-entry-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(70, 214, 255, 0.15);
  flex-shrink: 0;
  margin-top: 6px;
}

.update-entry-line {
  flex: 1;
  width: 2px;
  background: var(--hairline);
  margin: 6px 0;
}

.update-entry-body {
  padding-bottom: 40px;
}

.update-entry-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.update-entry-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  padding: 3px 10px;
}

.update-entry-version {
  font-family: var(--mono);
  color: var(--steel);
  font-size: 0.85rem;
}

.update-entry-date {
  font-size: 0.8rem;
  color: var(--steel-dim);
}

.update-entry-body h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.update-entry-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 18px;
}

.update-entry-list li {
  font-size: 0.9rem;
  color: var(--steel);
  line-height: 1.5;
}

/* ---------- Feedback page ---------- */
.feedback-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 800px) {
  .feedback-grid {
    grid-template-columns: 1fr;
  }
}

.feedback-grid textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--hairline);
  color: var(--ivory);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--body);
  font-size: 0.9rem;
  resize: vertical;
}

.feedback-grid input[type="text"] {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--hairline);
  color: var(--ivory);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.docs-shell {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}

.docs-toc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 96px;
}

.docs-toc a {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--steel);
  border-left: 2px solid transparent;
}

.docs-toc a:hover {
  color: var(--ivory);
  background: var(--ink-2);
  border-left-color: var(--gold-dim);
}

.docs-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
}

.docs-content .clause {
  scroll-margin-top: 96px;
}

.docs-content .clause a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-decoration-color: var(--gold-dim);
  text-underline-offset: 2px;
}

@media (max-width: 760px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }
  .docs-toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ---------- Auth / login ---------- */
.auth-shell {
  min-height: calc(100vh - 72px - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
}

.auth-card {
  background: var(--ink-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.auth-card .seal-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
}

.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.auth-error {
  background: rgba(194, 59, 82, 0.15);
  border: 1px solid rgba(194, 59, 82, 0.4);
  color: #f0b8b8;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

/* ---------- Dashboard: server list ---------- */
.dash-shell {
  padding: 56px 0 100px;
  min-height: 60vh;
}

.dash-head {
  margin-bottom: 40px;
}

.dash-head .eyebrow {
  margin-bottom: 16px;
}

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

.server-card {
  background: var(--ink-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.server-card.manageable {
  cursor: pointer;
}

.server-card.manageable:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.server-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.server-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  color: var(--gold);
  font-size: 1.1rem;
  overflow: hidden;
  flex-shrink: 0;
}

.server-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.server-name {
  font-weight: 600;
  font-size: 0.98rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-card-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--steel-dim);
  border: 1px dashed var(--hairline);
  border-radius: var(--radius-lg);
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-dim);
  margin-bottom: 20px;
  display: block;
}

/* ---------- Dashboard: guild settings ---------- */
.settings-shell {
  padding: 48px 0 100px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
}

@media (max-width: 860px) {
  .settings-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .settings-header {
    flex-wrap: wrap;
  }
  .dash-embed-btn {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 96px;
  align-self: start;
}

.settings-nav a {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--steel);
  border-left: 2px solid transparent;
}

.settings-nav a:hover {
  color: var(--ivory);
  background: var(--ink-2);
}

.settings-nav a.active {
  color: var(--gold-soft);
  border-left-color: var(--gold);
  background: var(--ink-2);
}

.dash-breadcrumb {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--steel);
  margin-bottom: 20px;
  transition: color 0.15s ease;
}

.dash-breadcrumb:hover {
  color: var(--gold-soft);
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}

.settings-header .server-icon {
  width: 56px;
  height: 56px;
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 4px var(--gold-dim);
}

.dash-embed-btn {
  margin-left: auto;
}

.settings-nav-icon {
  display: inline-block;
  width: 20px;
  color: var(--gold);
  margin-right: 2px;
}

.settings-panel {
  background: var(--ink-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  scroll-margin-top: 96px;
}

.settings-panel h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.settings-panel > p {
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.field-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid var(--hairline);
}

.field-row:first-of-type {
  border-top: none;
}

@media (max-width: 620px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.field-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ivory);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--steel-dim);
  margin-top: 4px;
}

.field-control input[type="text"],
.field-control textarea,
.field-control select,
.field-control input[type="number"] {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--hairline);
  color: var(--ivory);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--body);
  font-size: 0.9rem;
  transition: border-color 0.15s ease;
}

.field-control textarea {
  resize: vertical;
  min-height: 72px;
}

.field-control input:focus,
.field-control select:focus,
.field-control textarea:focus {
  outline: none;
  border-color: var(--gold-dim);
}

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--ink-3);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.toggle-track::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--steel);
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease;
}

.toggle input:checked + .toggle-track {
  background: rgba(70, 214, 255, 0.18);
  border-color: var(--gold-dim);
}

.toggle input:checked + .toggle-track::before {
  transform: translateX(20px);
  background: var(--gold);
}

.panel-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.save-flash {
  font-size: 0.85rem;
  color: var(--success);
  font-family: var(--mono);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 56px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ivory);
  font-family: var(--display);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.footer-brand .seal-mark {
  width: 28px;
  height: 28px;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--steel-dim);
  margin-bottom: 24px;
}

.footer-heading {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 16px;
}

.footer-touch-heading {
  margin-bottom: 12px;
}

.footer-touch-icons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.footer-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink-2);
  border: 1px solid var(--hairline);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.footer-icon-btn:hover {
  border-color: var(--gold-dim);
  color: var(--gold-soft);
  transform: translateY(-2px);
}

.footer-copyright {
  font-size: 0.78rem;
  color: var(--steel-dim);
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-col a {
  font-size: 0.88rem;
  color: var(--steel);
}

.footer-links-col a:hover {
  color: var(--gold-soft);
}

/* ---------- Error page ---------- */
.error-shell {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
}

.error-shell h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.error-shell p {
  max-width: 420px;
  margin-bottom: 32px;
}
