/* ═══════════════════════════════════════════════════════════════════
   ROGUE — page styles
   Everything specific to a single page, on top of app.css.
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════ Mobile navigation ═══════════ */

/* Three bars, drawn from the button's own spans. They had no styling, so
   the control rendered as an empty pill beside the dashboard button. */
.rogue-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.rogue-menu-btn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.rogue-menu-btn span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 1px;
  background: var(--text-2);
  transition: transform 0.2s, opacity 0.2s;
}
/* Open state folds the bars into a cross. */
.rogue-menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.rogue-menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.rogue-menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.mobile-nav-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 960;
  display: flex;
  flex-direction: column;
  width: min(300px, 84vw);
  height: 100vh;
  padding: 1.1rem;
  border-left: 1px solid var(--line);
  background: var(--bg-soft);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-nav-drawer.open { transform: none; }
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.mobile-nav-header img { height: 30px; width: auto; }
.mobile-nav-close {
  padding: 0.35rem 0.5rem;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}
.mobile-nav-links { display: flex; flex-direction: column; gap: 0.15rem; }
.mobile-nav-link {
  padding: 0.7rem 0.75rem;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-weight: 500;
}
.mobile-nav-link:hover { background: var(--surface-2); color: var(--text); }
.mobile-nav-cta { margin-top: auto; }

@media (max-width: 860px) {
  .rogue-menu-btn { display: flex; }
}

/* ═══════════ Server list ═══════════ */

.db-shell {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

/* ── Hero ── */

.db-hero {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
  padding: 2.75rem 0 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}
.db-hero-glow { display: none; }
.db-avatar-ring { position: relative; flex-shrink: 0; }
.db-hero-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
}
.db-avatar-ph {
  display: grid;
  place-items: center;
  color: var(--text-2);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
}
.db-avatar-status {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--success);
}
.db-hero-text { flex: 1; min-width: 12rem; }
.db-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.db-hero-title {
  margin: 0.35rem 0 0.3rem;
  font-family: var(--display);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.db-hi { color: var(--accent); }
.db-hero-sub { color: var(--text-muted); font-size: 0.88rem; }
.db-hero-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.db-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
}
.db-badge-pill--dim { opacity: 0.75; }
.db-badge-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.db-badge-lbl { color: var(--text-muted); }

/* ── Controls ── */

.db-controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.db-search-wrap { position: relative; flex: 1; min-width: 14rem; }
.db-search-ico {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 0.8rem;
  pointer-events: none;
}
/* The icon sits inside the field, so the text has to start clear of it.
   Stated on the id as well because a generic input rule in app.css sets
   padding too, and this must win wherever the sheets end up ordered. */
.db-search-input,
input#db-search.db-search-input {
  padding-left: 2.35rem;
  padding-right: 2.35rem;
}
.db-search-input::-webkit-search-cancel-button { display: none; }
.db-search-clr {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border: none;
  border-radius: var(--r-sm);
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
.db-search-clr.visible { opacity: 1; }
.db-search-clr:hover { color: var(--text); }

.db-clear-link { color: var(--text-muted); font-size: 0.82rem; }
.db-clear-link:hover { color: var(--text); }

.db-view-group {
  display: flex;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.db-view-btn {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: none;
  border-radius: 4px;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.db-view-btn:hover { color: var(--text); }
.db-view-btn.is-active { background: var(--surface-3); color: var(--text); }

/* ── Server cards ── */

.db-servers { display: grid; gap: 0.7rem; }
.db-view-grid { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.db-view-list { grid-template-columns: 1fr; }

.dsc {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-1);
  overflow: hidden;
  transition: border-color 0.16s, background 0.16s;
}
.dsc:hover { border-color: var(--line-strong); background: var(--surface-2); }
.dsc.is-hidden { display: none; }
.dsc-shimmer { display: none; }

.dsc-icon-wrap { flex-shrink: 0; }
.dsc-icon {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-3);
}
.dsc-icon-ph {
  display: grid;
  place-items: center;
  color: var(--text-2);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
}

.dsc-body { display: block; flex: 1; min-width: 0; }
.dsc-name {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dsc-manage {
  display: block;
  margin-top: 0.1rem;
  color: var(--text-faint);
  font-size: 0.78rem;
}
.dsc-arrow {
  flex-shrink: 0;
  color: var(--text-faint);
  font-size: 0.8rem;
  transition: transform 0.16s, color 0.16s;
}
.dsc:hover .dsc-arrow { transform: translateX(3px); color: var(--accent); }

/* ── Empty states ── */

.db-empty-state,
.db-empty-search {
  padding: 3.5rem 1.5rem;
  text-align: center;
}
.db-empty-icon,
.db-empty-orb {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.1rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-faint);
  font-size: 1.15rem;
}
.db-empty-orbit { display: none; }
.db-empty-title {
  margin-bottom: 0.4rem;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
}
.db-empty-desc { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.db-empty-search i { display: block; margin-bottom: 0.75rem; color: var(--text-faint); font-size: 1.3rem; }

/* ═══════════ Commands reference ═══════════
   Generated from the live command tree, so the page has to stay readable
   at ~700 cards. Cards are bounded surfaces on a grid; each one is a
   command with its arguments, permissions and aliases stacked under it.
   ─────────────────────────────────────────── */

.cmdx {
  max-width: 88rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── Header ── */

.cmdx-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}
.cmdx-title { display: flex; align-items: center; gap: 0.85rem; }
.cmdx-title h1 {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cmdx-icon {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--accent);
  font-size: 0.95rem;
}

.cmdx-searchwrap { flex: 1; min-width: 16rem; max-width: 26rem; }
.cmdx-searchlabel {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-faint);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
/* The button sits inside the field rather than beside it, so the control
   reads as one object. */
.cmdx-searchbox { position: relative; display: block; }
.cmdx-searchbox input {
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  color: var(--text);
  font-size: 0.875rem;
}
.cmdx-searchbox input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.cmdx-searchbox input::-webkit-search-cancel-button { filter: invert(0.5); }
.cmdx-searchbox button {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: none;
  border-radius: var(--r-sm);
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  transition: color 0.16s, background 0.16s;
}
.cmdx-searchbox button:hover { background: var(--surface-2); color: var(--text); }

/* ── Category tabs ── */

.cmdx-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.cmdx-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-1);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}
.cmdx-tab:hover { border-color: var(--line-strong); color: var(--text); }
.cmdx-tab.is-active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
}
.cmdx-tabicon { font-size: 0.8rem; opacity: 0.75; }
.cmdx-tab.is-active .cmdx-tabicon { color: var(--accent); opacity: 1; }
.cmdx-tabcount {
  padding: 0.05rem 0.4rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-faint);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}
.cmdx-tab.is-active .cmdx-tabcount { background: rgba(255, 255, 255, 0.1); color: var(--text-2); }

.cmdx-status {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  min-height: 1.2em;
}

/* ── Cards ── */

.cmdx-panel.is-hidden { display: none; }
.cmdx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 0.85rem;
}

.cmdx-card {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-1);
  transition: border-color 0.16s, background 0.16s;
}
.cmdx-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.cmdx-card.is-hidden { display: none; }

.cmdx-cardtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.cmdx-name {
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}
.cmdx-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.cmdx-subcount {
  padding: 0.05rem 0.4rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-faint);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}
.cmdx-copy {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: none;
  color: var(--text-faint);
  font-size: 0.78rem;
  cursor: pointer;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.cmdx-copy:hover { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.cmdx-copy.is-copied { border-color: transparent; background: var(--success-soft); color: var(--success); }

.cmdx-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* ── Arguments, permissions, aliases ──
   Reference detail, not headline: it sits below a rule, in a quiet
   monospace, so scanning the grid means reading command names and
   descriptions rather than a wall of chips. Aliases wrap inline instead
   of stacking, which is what made cards run to wildly different heights.
   ── */

.cmdx-meta {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  gap: 0.35rem 0.7rem;
  align-items: baseline;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
/* The macro wraps each label/value pair in a div; unwrap it onto the
   parent grid so labels line up down the card. */
.cmdx-metarow { display: contents; }
.cmdx-metalabel {
  color: var(--text-faint);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.6;
}
.cmdx-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.3rem;
  min-width: 0;
}
.cmdx-pill {
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.71rem;
  line-height: 1.5;
}
/* Optional arguments read lighter than required ones. */
.cmdx-pill.is-optional { background: rgba(255, 255, 255, 0.03); color: var(--text-muted); }
/* Permissions are a constraint worth noticing, but a tinted word carries
   that without a filled chip shouting from every card. */
.cmdx-perm {
  color: var(--warning);
  font-size: 0.71rem;
  font-weight: 600;
  line-height: 1.5;
}
.cmdx-perm + .cmdx-perm::before {
  content: "·";
  margin: 0 0.35rem;
  color: var(--text-faint);
  font-weight: 400;
}
.cmdx-none { color: var(--text-faint); font-size: 0.73rem; line-height: 1.6; }

/* ── Subcommands ── */

.cmdx-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.9rem;
  padding: 0.45rem 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.16s;
}
.cmdx-toggle:hover { color: var(--text); }
.cmdx-toggle i { font-size: 0.7rem; transition: transform 0.2s; }
.cmdx-card.is-open .cmdx-toggle i { transform: rotate(180deg); }

/* [hidden] must win over display, or the toggle cannot collapse this. */
.cmdx-subs[hidden] { display: none; }
.cmdx-subs {
  display: flex;
  flex-direction: column;
  margin-top: 0.35rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--line);
}
.cmdx-sub { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.cmdx-sub:last-child { border-bottom: none; }
.cmdx-sub.is-hidden { display: none; }
.cmdx-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.cmdx-subname {
  padding: 0;
  background: none;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.82rem;
}
.cmdx-copysub { width: 1.5rem; height: 1.5rem; font-size: 0.72rem; }
.cmdx-subdesc {
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: 0.79rem;
  line-height: 1.5;
}
.cmdx-subpills { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.35rem; }
.cmdx-subpills .cmdx-pill { font-size: 0.69rem; }
.is-alias { opacity: 0.72; }

/* ── Empty states ── */

.cmdx-empty {
  grid-column: 1 / -1;
  padding: 3.5rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 720px) {
  .cmdx { padding: 2rem 1rem 4rem; }
  .cmdx-title h1 { font-size: 1.9rem; }
  .cmdx-top { align-items: stretch; gap: 1.25rem; }
  .cmdx-searchwrap { max-width: none; }
  .cmdx-grid { grid-template-columns: 1fr; }
  .cmdx-metarow { grid-template-columns: 4.5rem minmax(0, 1fr); }
}

/* ═══════════ Cooldowns ═══════════ */

.rogue-controls { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.rogue-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 0.76rem;
}
.cd-table { width: 100%; }
.cd-command { font-family: var(--mono); font-size: 0.85rem; }
.cd-input-wrap { display: flex; align-items: center; gap: 0.4rem; }
.cd-input { width: 5.5rem; }
.cd-unit { color: var(--text-faint); font-size: 0.78rem; }
.cd-btn-group { display: flex; gap: 0.35rem; }
/* Save is the primary action in a cooldown row; reset is quiet. */
.cd-save-btn { border-color: var(--accent); background: var(--accent); color: #fff; }
.cd-reset-btn { background: transparent; color: var(--text-muted); }
.cd-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1100;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg-raised);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.cd-toast.show { opacity: 1; transform: none; }

/* ═══════════ Analytics ═══════════ */

.usage-row {
  display: grid;
  grid-template-columns: 15rem 1fr 5rem;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.4rem;
}
.usage-name {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.usage-track { height: 1.05rem; border-radius: 3px; background: rgba(255, 255, 255, 0.05); }
.usage-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 3px;
  background: var(--accent);
}
.usage-count { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: 0.84rem; }

@media (max-width: 700px) {
  .usage-row { grid-template-columns: 9rem 1fr 3.5rem; }
}

/* ═══════════ Docs ═══════════ */

.rogue-two-col {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.rogue-side-nav {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.rogue-side-nav a {
  padding: 0.45rem 0.7rem;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.rogue-side-nav a:hover { background: var(--surface-2); color: var(--text); }
.rogue-side-nav a.active { background: var(--accent-soft); color: var(--text); }

@media (max-width: 860px) {
  .rogue-two-col { grid-template-columns: 1fr; gap: 1.5rem; }
  .rogue-side-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}

/* ═══════════ Support / premium ═══════════ */

/* Same shape as the economy and overview cards: icon beside the heading,
   body text under both. */
/* Support and premium cards. The markup is an icon followed by a div
   holding the heading, body and a button, so the card is a two-column
   grid and everything after the icon lives in the second column --
   an earlier rule pushed that div onto its own row, which put the icon
   back above the text. */
.rogue-action-card {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: 0.85rem;
  align-items: start;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-1);
  transition: border-color 0.16s, background 0.16s;
}
.rogue-action-card:hover { border-color: var(--line-strong); background: var(--surface-2); }

.rogue-action-card > i {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9rem;
}

/* Everything that is not the icon sits in the right-hand column. */
.rogue-action-card > :not(i) { grid-column: 2; margin: 0; }

.rogue-action-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  line-height: 1.35;
}
.rogue-action-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}
/* The button paragraph carries an inline margin-top; this spaces it
   consistently whether or not that is present. */
.rogue-action-card p + p { margin-top: 0.85rem !important; }
.rogue-action-card .btn,
.rogue-action-card .rogue-btn { margin-top: 0; }

/* ═══════════ Transcripts ═══════════ */

.transcript-page { max-width: 82rem; margin: 0 auto; padding: 2rem 1.5rem 5rem; }
.transcript-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-bottom: 1.35rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.transcript-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.transcript-search { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.transcript-search .input { flex: 1; min-width: 14rem; }
.transcript-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; color: var(--text-muted); font-size: 0.82rem; }
.transcript-frame-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: #1a1c1f;
}
.transcript-frame { display: block; width: 100%; min-height: 70vh; border: 0; }

.transcript-pager { display: flex; align-items: center; gap: 0.6rem; justify-content: center; margin-top: 1.25rem; }
.transcript-page-label { color: var(--text-muted); font-size: 0.82rem; }
.is-disabled { opacity: 0.4; pointer-events: none; }

.tx-pick { width: 2.5rem; text-align: center; }
.tx-bulk {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.95rem;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(237, 66, 69, 0.35);
  border-radius: var(--r-sm);
  background: var(--danger-soft);
  font-size: 0.85rem;
}

/* ═══════════ Error and maintenance ═══════════ */

.error-page,
.maintenance-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--nav-h));
  padding: 2rem 1.5rem;
}
.error-card,
.maintenance-card {
  max-width: 30rem;
  padding: 2.5rem 2rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-1);
  text-align: center;
}
.error-code {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--text-faint);
  font-family: var(--display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
}
.error-message { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }
.error-actions { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.maintenance-card .brand { font-family: var(--display); font-size: 1.6rem; margin-bottom: 0.75rem; }
.pulse { animation: pulseFade 2s ease-in-out infinite; }
@keyframes pulseFade { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ═══════════ Embed builder ═══════════ */

.eb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.eb-code {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.3);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-2);
}
.badge-info { border-color: transparent; background: var(--accent-soft); color: var(--accent); }

.ae-section-label,
.eb-section-label {
  margin: 1.25rem 0 0.6rem;
  color: var(--text-faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.ae-code-box { font-family: var(--mono); font-size: 0.78rem; }
.ae-button-preview,
.eb-button-preview { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.ae-fields-preview { display: grid; gap: 0.5rem; }

@media (max-width: 980px) {
  .eb-layout { grid-template-columns: 1fr; }
}

/* ═══════════ Bot appearance extras ═══════════ */

/* The rest of the bot-appearance card lives in guild.css. */
.ba-ts-now { color: var(--text-faint); font-size: 0.76rem; }

/* ═══════════ Shell aliases ═══════════ */

.main-content { width: 100%; }
.rogue-theme { color-scheme: dark; }
.guild-content { width: 100%; }
.span-2 { grid-column: span 2; }
.is-active { display: block; }
.text-muted-id { color: var(--text-faint); font-family: var(--mono); font-size: 0.76rem; }
.feedback-msg { margin-top: 0.5rem; font-size: 0.82rem; }
.var-tag {
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-2);
  cursor: pointer;
}
.var-tag:hover { border-color: var(--accent); color: var(--text); }

/* Guild shell aliases */
.gs-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.gs-topbar-left,
.gs-topbar-right { display: flex; align-items: center; gap: 0.5rem; }
.gs-nav-top { padding-top: 0.35rem; }
.gs-bc-icon { opacity: 0.6; }
.gs-ext-ico { font-size: 0.65rem; opacity: 0.5; }
.gs-srv-icon-ph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text-2);
  font-family: var(--display);
  font-weight: 700;
}
.sidebar-link { cursor: pointer; }

.toggle { position: relative; display: inline-block; width: 38px; height: 21px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.13);
  cursor: pointer;
  transition: background 0.18s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(17px); }
.module-toggle-wrapper { flex-shrink: 0; }

/* ═══════════ Embed builder ═══════════ */

.eb-shell { max-width: 88rem; margin: 0 auto; padding: 2rem 1.5rem 5rem; }
.eb-preview-card {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-1);
}
.eb-preview-message { margin-top: 0.75rem; }
.eb-stack { display: flex; flex-direction: column; gap: 0.75rem; }
.eb-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem; }
.eb-section-title {
  margin: 1.5rem 0 0.7rem;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.eb-row-actions { display: flex; gap: 0.35rem; align-items: center; }
.eb-inline-toggle { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; color: var(--text-muted); }
.eb-field-name-input,
.eb-field-value-input,
.eb-field-inline-input,
.eb-button-label-input,
.eb-button-url-input,
.eb-button-state-input { width: 100%; }
.eb-field-name { font-weight: 600; font-size: 0.82rem; color: #f2f3f5; }
.eb-field-value { color: #dbdee1; font-size: 0.82rem; }
.eb-vars-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-1); }
.eb-vars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.eb-var-group { min-width: 0; }
.eb-var-title {
  margin-bottom: 0.45rem;
  color: var(--text-faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.eb-var-list { display: flex; flex-direction: column; gap: 0.2rem; }
.eb-var-row { display: flex; align-items: baseline; gap: 0.5rem; }
.eb-var-btn {
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: none;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.74rem;
  cursor: pointer;
}
.eb-var-btn:hover { border-color: var(--accent); color: var(--text); }
.eb-var-desc { color: var(--text-faint); font-size: 0.76rem; }
.eb-var-note { margin-top: 0.75rem; color: var(--text-faint); font-size: 0.76rem; line-height: 1.5; }
.eb-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1100;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg-raised);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.eb-toast.show { opacity: 1; transform: none; }

/* ═══════════ Ticket builder extras ═══════════ */

/* The ticket builder lives in guild.css. */

/* ═══════════ Transcript rows ═══════════ */

.tx-row { accent-color: var(--accent); }
.eb-fields-preview { display: grid; gap: 0.5rem; margin-top: 0.5rem; }

/* ═══════════ Remaining structure and state ═══════════ */

.cmdx-panels { margin-top: 0.25rem; }
.cmdx-tabname { font-weight: 500; }
.cmdx-togglelabel { font-weight: 500; }
/* Marks a card that has subcommands; the toggle below it does the work. */
.has-subs { position: relative; }

/* Sticky nav gets a solid ground once the page scrolls under it. */
.rogue-nav.scrolled { background: rgba(8, 9, 11, 0.95); }

/* Server list search results */
.db-card.visible,
.dsc.visible { display: flex; }

/* ── Cooldowns state ── */

/* An edited-but-unsaved row is flagged so it is obvious what still needs
   saving; an overridden one is flagged so defaults are distinguishable. */
.cd-dirty { border-color: var(--accent-line) !important; }
.cd-dirty .cd-input { border-color: var(--accent); }
.cd-overridden .cd-command::after {
  content: "overridden";
  margin-left: 0.5rem;
  padding: 0.05rem 0.4rem;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.cd-toast-show { opacity: 1 !important; transform: none !important; }

/* ── Embed builder rows ── */

.eb-row-card,
.eb-field-box {
  padding: 0.85rem;
  margin-bottom: 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-1);
}
.eb-field-row,
.eb-button-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: start;
}
.eb-button-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  background: #5865f2;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ── Guild command toggles ── */

.cmd-cat-tab {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-1);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}
.cmd-cat-tab:hover { border-color: var(--line-strong); color: var(--text); }
.cmd-cat-tab.active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
}

/* ── Classes guild.js toggles at runtime ── */

.emoji-picker-open { display: block !important; }
.process-success { border-color: rgba(59, 165, 93, 0.4) !important; color: var(--success); }
.process-failed { border-color: rgba(237, 66, 69, 0.4) !important; color: var(--danger); }
.toast-hiding { opacity: 0 !important; transform: translateY(8px) !important; }
.var-copied { border-color: var(--success) !important; color: var(--success) !important; }

/* ═══════════ Leaderboard ═══════════ */

.lb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-1);
  overflow: hidden;
}
.lb-row {
  display: grid;
  grid-template-columns: 2.5rem 2.25rem minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
}
.lb-row:last-child { border-bottom: 0; }
.lb-row:hover { background: rgba(255, 255, 255, 0.02); }

.lb-rank {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
/* The top three are worth marking, but with weight rather than colour --
   colour on this page means aura, not position. */
.lb-row-top .lb-rank { color: var(--text); font-weight: 700; }

.lb-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
}
.lb-avatar-ph {
  display: grid;
  place-items: center;
  color: var(--text-2);
  font-family: var(--display);
  font-weight: 700;
}

.lb-name {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The id is a fallback identity when the member is not cached, so it sits
   under the name rather than replacing it. */
.lb-id {
  display: block;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
}
.lb-aura {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
  .lb-row { grid-template-columns: 1.75rem 2rem minmax(0, 1fr) auto; gap: 0.6rem; padding: 0.65rem 0.8rem; }
  .lb-avatar { width: 2rem; height: 2rem; }
  .lb-name { font-size: 0.85rem; }
}

.lb-scope { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 1rem; }
.lb-scope-link {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.lb-scope-link:hover { border-color: var(--line-strong); color: var(--text); }
.lb-scope-link.is-active {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--text);
}

/* ═══════════ Economy page ═══════════ */

.eco-block { margin-bottom: 2.75rem; }
.eco-h {
  margin-bottom: 1.1rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
}
.eco-sub {
  margin-bottom: 0.5rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eco-text { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.eco-text-wide { max-width: 46rem; margin-bottom: 1.1rem; }
.eco-note { margin-top: 0.85rem; color: var(--text-faint); font-size: 0.8rem; line-height: 1.55; }

.eco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.85rem;
}
/* Icon beside the heading rather than above it, so each card is about a
   third shorter -- the six of them stack into one column on a phone. */
.eco-card {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: 0.75rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-1);
}
.eco-card > i {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
}
.eco-card h3 {
  align-self: center;
  margin: 0;
  font-size: 0.95rem;
}
/* Everything after the heading spans the full width, under both. */
.eco-card > :not(i):not(h3) { grid-column: 1 / -1; }
.eco-card .eco-num { margin-top: 0.7rem; }
/* The figure is the point of each card, so it leads. */
.eco-num {
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.eco-num span { color: var(--text-muted); font-size: 0.78rem; font-weight: 500; }
.eco-card p:last-child { color: var(--text-muted); font-size: 0.84rem; line-height: 1.55; }

.eco-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.85rem;
  align-items: start;
}

.eco-items,
.eco-facts { list-style: none; margin: 0.85rem 0 0; padding: 0; }
.eco-items li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.85rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.eco-items li:last-child { border-bottom: 0; }
.eco-item-name { font-size: 0.88rem; font-weight: 600; }
.eco-item-price { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.eco-item-resale { color: var(--text-faint); font-size: 0.76rem; }

.eco-facts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}
.eco-facts li:last-child { border-bottom: 0; }
.eco-facts li > span:first-child { color: var(--text-muted); }
.eco-facts li > span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }

.eco-titles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.5rem;
}
.eco-titles li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-1);
}
.eco-title-name { font-size: 0.88rem; font-weight: 600; }
.eco-title-req {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.74rem;
  white-space: nowrap;
}

.eco-cmds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.4rem 1.25rem;
}
.eco-cmds > div {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.eco-cmds code { flex-shrink: 0; }
.eco-cmds span { color: var(--text-muted); font-size: 0.82rem; }

@media (max-width: 640px) {
  .eco-h { font-size: 1.2rem; }
  .eco-two { gap: 1.5rem; }
  .eco-items li { grid-template-columns: minmax(0, 1fr) auto; }
  .eco-item-resale { grid-column: 1 / -1; }
}

.lb-name-gone { color: var(--text-faint); font-weight: 500; font-style: italic; }
.lb-avatar-ph i { font-size: 0.8rem; color: var(--text-faint); }

/* ═══════════ Docs ═══════════ */

.docs-body { min-width: 0; }
.docs-sec { padding-bottom: 2.25rem; margin-bottom: 2.25rem; border-bottom: 1px solid var(--line); }
.docs-sec:last-child { border-bottom: 0; margin-bottom: 0; }
/* Anchored sections must clear the sticky nav when jumped to. */
.docs-sec { scroll-margin-top: calc(var(--nav-h) + 1.5rem); }
.docs-sec h2 {
  margin-bottom: 0.85rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
}
.docs-sec p { margin-bottom: 0.85rem; color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }
.docs-sec p:last-child { margin-bottom: 0; }
.docs-sec strong { color: var(--text); font-weight: 650; }
.docs-note {
  padding: 0.75rem 0.9rem;
  border-left: 2px solid var(--accent-line);
  background: var(--surface-1);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 0.85rem !important;
}

/* Numbered setup steps. */
.docs-steps { margin: 0 0 0.85rem; padding-left: 1.15rem; }
.docs-steps li {
  margin-bottom: 0.65rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.docs-steps li::marker { color: var(--accent); font-weight: 700; }

/* Command reference: the command column stays narrow so descriptions
   line up down the page rather than each row finding its own width. */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.85rem;
  font-size: 0.86rem;
}
.docs-table td {
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  line-height: 1.55;
  vertical-align: top;
}
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table td:first-child { width: 15rem; padding-right: 1.25rem; color: var(--text-2); }
.docs-table code { white-space: nowrap; }

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.docs-grid > div {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-1);
}
.docs-grid strong { display: block; font-size: 0.86rem; }
.docs-grid span { display: block; margin-top: 0.1rem; color: var(--text-faint); font-size: 0.78rem; line-height: 1.45; }

.docs-faq { margin: 0; }
.docs-faq dt {
  margin-top: 1.1rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
}
.docs-faq dt:first-child { margin-top: 0; }
.docs-faq dd {
  margin: 0.3rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}
.docs-faq a { color: var(--accent); }
.docs-faq a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .docs-sec { padding-bottom: 1.75rem; margin-bottom: 1.75rem; }
  .docs-sec h2 { font-size: 1.2rem; }
  /* The command column stops being a column on a phone. */
  .docs-table td,
  .docs-table td:first-child { display: block; width: auto; padding: 0; }
  .docs-table td:first-child { padding-top: 0.7rem; }
  .docs-table td:last-child { padding-bottom: 0.7rem; }
  .docs-table tr { display: block; border-bottom: 1px solid var(--line); }
  .docs-table tr:last-child { border-bottom: 0; }
  .docs-table td { border-bottom: 0; }
  .docs-table code { white-space: normal; }
}

/* ═══════════ Status ═══════════ */

.st-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-1);
}
.st-banner strong { display: block; font-size: 0.98rem; }
.st-banner span:not(.st-banner-dot):not(.st-updated) {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.st-banner-dot {
  width: 0.7rem;
  height: 0.7rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--text-faint);
}
/* The dot pulses only while something is wrong, so a healthy page is
   still rather than blinking at you. */
.st-banner[data-state="up"]   { border-color: rgba(59, 165, 93, 0.3); }
.st-banner[data-state="up"] .st-banner-dot { background: var(--success); }
.st-banner[data-state="warn"] { border-color: rgba(250, 166, 26, 0.35); background: var(--warning-soft); }
.st-banner[data-state="warn"] .st-banner-dot { background: var(--warning); animation: stPulse 1.8s ease-in-out infinite; }
.st-banner[data-state="down"] { border-color: rgba(237, 66, 69, 0.35); background: var(--danger-soft); }
.st-banner[data-state="down"] .st-banner-dot { background: var(--danger); animation: stPulse 1.4s ease-in-out infinite; }
@keyframes stPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.st-updated { margin-left: auto; color: var(--text-faint); font-size: 0.75rem; white-space: nowrap; }

.st-section { margin-bottom: 2.25rem; }
.st-h {
  margin-bottom: 0.85rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Services ── */

.st-services { display: grid; gap: 0.5rem; }
.st-service {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-1);
}
.st-service-dot {
  width: 0.55rem;
  height: 0.55rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--text-faint);
}
.st-service[data-state="up"] .st-service-dot { background: var(--success); }
.st-service[data-state="warn"] .st-service-dot { background: var(--warning); }
.st-service[data-state="down"] .st-service-dot { background: var(--danger); }
.st-service-body { flex: 1; min-width: 0; }
.st-service-body strong { display: block; font-size: 0.88rem; }
.st-service-body span { color: var(--text-muted); font-size: 0.79rem; }
.st-service-value {
  flex-shrink: 0;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

/* ── Chart ── */

.st-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.st-chart-head .st-h { margin-bottom: 0; }
.st-legend { color: var(--text-muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.st-legend b { color: var(--text-2); font-weight: 600; }
.st-legend-sep { opacity: 0.35; margin: 0 0.35rem; }
#st-lat-now { color: var(--accent); font-weight: 700; }

.st-chart {
  position: relative;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-1);
}
.st-chart svg { display: block; width: 100%; height: 8.75rem; }
.st-chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-size: 0.82rem;
  text-align: center;
  padding: 1rem;
}

/* ── Stats ── */

.st-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.5rem;
}
.st-stat {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  text-align: center;
}
.st-stat-v {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.st-stat-k {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .st-banner { flex-wrap: wrap; }
  .st-updated { margin-left: 0; width: 100%; }
  .st-chart svg { height: 7rem; }
  .st-stats { grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); }
}

/* ═══════════ Legal pages ═══════════ */

.legal-body { max-width: 46rem; }
.legal-h3 {
  margin: 1.35rem 0 0.5rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-2);
}
.legal-list { margin: 0 0 0.85rem; padding-left: 1.15rem; }
.legal-list li {
  margin-bottom: 0.45rem;
  color: var(--text-muted);
  font-size: 0.89rem;
  line-height: 1.6;
}
.legal-list li::marker { color: var(--text-faint); }
.legal-body a { color: var(--accent); }
.legal-body a:hover { text-decoration: underline; }

/* ═══════════ Footer links ═══════════ */

.rogue-footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.rogue-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.rogue-footer-brand img { width: 26px; height: 26px; object-fit: contain; }
.rogue-footer-tag {
  max-width: 30rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.55;
}

.rogue-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  justify-content: center;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.rogue-footer-links a { color: var(--text-muted); font-size: 0.8rem; transition: color 0.15s; }
.rogue-footer-links a:hover { color: var(--text); }

/* Two notes on one line where there is room, stacked when there is not. */
.rogue-footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.76rem;
}


/* ── Whitelist request + review ──────────────────────────────
   Form controls, inline notes and tab strip. Named generically
   because nothing here is whitelist-specific. */
.rogue-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 44rem;
  margin: 0 auto;
}

.rogue-label {
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 600;
}

.rogue-optional {
  color: var(--text-faint);
  font-weight: 400;
}

.rogue-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
}

.rogue-input:focus {
  border-color: var(--accent-line);
  background: var(--surface-2);
  outline: none;
}

textarea.rogue-input {
  resize: vertical;
  min-height: 5rem;
}

.rogue-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.rogue-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  max-width: 44rem;
  margin: 0 auto 1.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  color: var(--text-2);
  font-size: 0.85rem;
  line-height: 1.5;
}

.rogue-note i {
  flex: 0 0 auto;
  margin-top: 0.15rem;
  color: var(--text-muted);
}

/* The note's prose must be one flex item, not one per text node: a bare
   <strong> in the sentence would otherwise become its own column with the
   container's gap on either side, breaking the line apart. */
.rogue-note > span {
  flex: 1 1 auto;
  min-width: 0;
}

.rogue-note-ok {
  border-color: rgba(59, 165, 93, 0.35);
  background: var(--success-soft);
}

.rogue-note-ok i {
  color: var(--success);
}

.rogue-note-warn {
  border-color: rgba(250, 166, 26, 0.35);
  background: var(--warning-soft);
}

.rogue-note-warn i {
  color: var(--warning);
}

.rogue-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.rogue-tab {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.rogue-tab:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.rogue-tab.is-active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
}

.rogue-btn-ghost {
  background: transparent;
}

.rogue-btn-ghost:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* Review cards carry no leading icon, so collapse the card's icon column
   and let the details and controls stack in a single full-width column. */
.wl-request {
  grid-template-columns: minmax(0, 1fr);
  row-gap: 0.75rem;
}

.wl-request > :not(i) {
  grid-column: 1;
}

.wl-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.wl-actions .rogue-input {
  flex: 1 1 10rem;
  width: auto;
}

/* Decided in this session: dim it but leave it readable. */
.wl-request.is-decided {
  opacity: 0.55;
}


/* ── Non-whitelisted servers on the dashboard list ───────────── */
.dsc-warn {
  color: var(--warning);
}

/* Still clickable -- the guild page explains the state -- but visibly
   set apart from servers that actually work. */
.dsc-blocked {
  border-color: rgba(250, 166, 26, 0.3);
}

.dsc-blocked .dsc-icon,
.dsc-blocked .dsc-icon-ph {
  filter: grayscale(0.8);
  opacity: 0.75;
}

.db-wl-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(250, 166, 26, 0.35);
  border-radius: var(--r-sm);
  background: var(--warning-soft);
  color: var(--text-2);
  font-size: 0.85rem;
}

.db-wl-banner i {
  color: var(--warning);
}

.db-wl-banner span {
  flex: 1 1 16rem;
}


/* ── Whitelist request: sent confirmation ────────────────────
   Replaces the form outright, so the state reads as finished
   rather than as a form that happens to have a note under it. */
.wl-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.25rem 1.5rem;
  border: 1px solid rgba(59, 165, 93, 0.35);
  border-radius: var(--r);
  background: var(--success-soft);
  text-align: center;
}

.wl-done > i {
  font-size: 2.5rem;
  color: var(--success);
}

.wl-done h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.wl-done p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.88rem;
}

.wl-done .rogue-btn {
  margin-top: 0.75rem;
}
