/* SellerBeware — brand #00ae59, dark UI */
:root {
  color-scheme: dark;
  --bg-deep: #050506;
  --bg: #0a0b0c;
  --surface: #101214;
  --elevated: #181a1d;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --text: #f2f3f5;
  --muted: #9aa3ad;
  --muted2: #6b7280;
  --brand: #00ae59;
  --brand-bright: #00d96c;
  --brand-dim: #008a47;
  --brand-glow: rgba(0, 174, 89, 0.35);
  --danger: #e53935;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1120px;
  --nav-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

a {
  color: var(--brand-bright);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.shell {
  width: min(var(--max), 100% - 40px);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Nav links cluster (flex-grow); Discord login sits outside on the far right */
.site-header__mid {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: 0;
}

.site-header__discord-login {
  flex-shrink: 0;
  margin-left: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
  color: var(--text);
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.nav a:hover {
  color: var(--text);
  background: var(--elevated);
  text-decoration: none;
}
.nav a.is-active {
  color: var(--brand-bright);
  background: rgba(0, 174, 89, 0.12);
}

.hidden {
  display: none !important;
}

/* Login with Discord — green outline only (no glow). Header variant spaced from nav. */
a.nav-discord-login {
  forced-color-adjust: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text) !important;
  background: var(--surface);
  border: 1px solid var(--brand) !important;
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: none;
  transition: background 0.15s, border-color 0.15s;
}

a.nav-discord-login:hover {
  text-decoration: none;
  color: var(--text) !important;
  background: var(--elevated);
  border-color: var(--brand-bright) !important;
  box-shadow: none;
}

.dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* Dashboard (logged-in shell) */
.dash-guild-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.dash-guild-tile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  transition: border-color 0.15s, transform 0.15s;
}
.dash-guild-tile:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}
.dash-guild-tile img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--elevated);
}

.dash-form label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted2);
}
.dash-form select,
.dash-form textarea,
.dash-form input[type="text"] {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
}
.dash-form textarea {
  min-height: 120px;
  resize: vertical;
}

.dash-banner {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
}
.dash-banner--error {
  border-color: rgba(229, 57, 53, 0.45);
  background: rgba(229, 57, 53, 0.1);
  color: #ffcdd2;
}
.dash-banner--ok {
  border-color: rgba(0, 174, 89, 0.45);
  background: rgba(0, 174, 89, 0.1);
  color: #b8ffd9;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }
  .site-header__discord-login {
    margin-left: 0.65rem;
  }
  .nav {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  body.nav-open .nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover {
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: linear-gradient(165deg, var(--brand-bright), var(--brand));
  color: #fff;
  box-shadow: 0 4px 20px var(--brand-glow);
}
.btn--primary:hover {
  background: linear-gradient(165deg, #1aff8c, var(--brand-bright));
  color: #fff;
  filter: brightness(1.03);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn--ghost:hover {
  background: var(--elevated);
  color: var(--text);
}

.btn--brand {
  background: var(--brand);
  color: #fff;
}
.btn--brand:hover {
  background: var(--brand-bright);
  color: #fff;
}

.btn--sm {
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
}

/* Hero */
.hero {
  position: relative;
  padding: 4.5rem 0 4rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -25%, rgba(0, 174, 89, 0.28), transparent),
    radial-gradient(ellipse 50% 40% at 100% 10%, rgba(0, 174, 89, 0.1), transparent),
    radial-gradient(ellipse 45% 35% at 0% 30%, rgba(0, 217, 108, 0.08), transparent);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-bright);
  margin-bottom: 0.75rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero__lead {
  margin: 0;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 34rem;
}

.hero__panel {
  background: linear-gradient(145deg, var(--elevated), var(--surface));
  border: 1px solid rgba(0, 174, 89, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 174, 89, 0.06) inset;
}
.hero__panel h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
}
.scan-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.scan-row input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.scan-row input::placeholder {
  color: var(--muted2);
}
.scan-help {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted2);
}

/* Sections */
.section {
  padding: 4rem 0;
}
.section--tight {
  padding-top: 2rem;
}
.section__head {
  margin-bottom: 2rem;
}
.section__head h2 {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section__head p {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
}

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 174, 89, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  color: var(--brand-bright);
}
.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Pipeline */
.pipeline {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .pipeline {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .pipeline {
    grid-template-columns: 1fr;
  }
}
.pipe {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.pipe__step {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-bright);
  margin-bottom: 0.35rem;
}
.pipe h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.pipe p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Command table */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
table.cmds {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table.cmds th,
table.cmds td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.cmds th {
  background: var(--elevated);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
table.cmds tr:last-child td {
  border-bottom: none;
}
table.cmds code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.85rem;
  color: #b8ffd9;
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}
.pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.pill--admin {
  background: rgba(0, 174, 89, 0.18);
  color: #7dffc0;
}
.pill--mod {
  background: rgba(0, 174, 89, 0.12);
  color: var(--brand-bright);
}
.pill--all {
  background: var(--elevated);
  color: var(--muted);
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 1rem;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-weight: 400;
  color: var(--muted);
  font-size: 1.25rem;
}
.faq details[open] summary::after {
  content: "−";
}
.faq .faq__body {
  padding: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.faq .faq__body code {
  background: var(--bg);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* CTA band */
.cta-band {
  margin: 2rem 0 0;
  padding: 3rem 1.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 174, 89, 0.18), rgba(0, 174, 89, 0.06));
  border: 1px solid rgba(0, 174, 89, 0.25);
  text-align: center;
}
.cta-band h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
}
.cta-band p {
  margin: 0 auto 1.25rem;
  color: var(--muted);
  max-width: 32rem;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}
.site-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.4fr 1fr 1fr;
}
@media (max-width: 720px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}
.site-footer h4 {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted2);
}
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer li {
  margin-bottom: 0.45rem;
}
.site-footer a {
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer a:hover {
  color: var(--text);
}
.site-footer__bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted2);
}

/* Docs layout */
.docs-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: 220px 1fr;
  padding-top: 2rem;
  padding-bottom: 4rem;
}
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
}
.docs-nav {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.docs-nav h3 {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted2);
}
.docs-nav a {
  display: block;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}
.docs-nav a:hover {
  background: var(--elevated);
  color: var(--text);
  text-decoration: none;
}
.prose {
  max-width: 52rem;
}
.prose h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}
.prose p,
.prose li {
  color: var(--muted);
  font-size: 0.95rem;
}
.prose ul,
.prose ol {
  padding-left: 1.25rem;
}
.prose .callout {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--brand);
  background: var(--surface);
  font-size: 0.9rem;
  color: var(--muted);
}

/* Database page */
.db-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: center;
}
.db-toolbar input,
.db-toolbar select {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
}
.db-toolbar input {
  min-width: 200px;
  flex: 1;
}
.db-meta {
  font-size: 0.8125rem;
  color: var(--muted2);
  margin-bottom: 1rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
table.data th,
table.data td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data th {
  background: var(--elevated);
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

/* Make username clearly clickable (database table). */
.db-userlink {
  color: var(--brand);
  text-decoration: none;
}
.db-userlink:hover {
  color: var(--brand-bright);
}
.status {
  display: inline-flex;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
}
.status--approved {
  background: rgba(0, 174, 89, 0.25);
  color: #b8ffd9;
}
.status--pending {
  background: rgba(250, 166, 26, 0.2);
  color: #ffd54f;
}
.status--denied {
  background: rgba(218, 55, 60, 0.2);
  color: #ef9a9a;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}
.modal.is-open {
  display: flex;
}
.modal__box {
  width: min(520px, 100%);
  max-height: 85vh;
  overflow: auto;
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}
.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.modal__head h3 {
  margin: 0;
  font-size: 1.1rem;
}
.modal__close {
  border: none;
  background: var(--surface);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
.modal__close:hover {
  color: var(--text);
}

/* Explore cards (home) */
.link-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .link-grid {
    grid-template-columns: 1fr;
  }
}
.link-card {
  display: block;
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.link-card:hover {
  border-color: rgba(0, 174, 89, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 174, 89, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.link-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.link-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.link-card .more {
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brand-bright);
}

.prose h2[id],
.prose h3[id] {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.docs-nav .docs-nav__sub {
  margin: 0.15rem 0 0.35rem;
  padding-left: 0.65rem;
  border-left: 2px solid rgba(0, 174, 89, 0.35);
}
.docs-nav .docs-nav__sub a {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

/* Inner pages — same green top glow as landing `.hero` */
.page-hero {
  position: relative;
  padding: 3rem 0 1.25rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -25%, rgba(0, 174, 89, 0.28), transparent),
    radial-gradient(ellipse 50% 40% at 100% 10%, rgba(0, 174, 89, 0.1), transparent),
    radial-gradient(ellipse 45% 35% at 0% 30%, rgba(0, 217, 108, 0.08), transparent);
  pointer-events: none;
}
.page-hero > .shell {
  position: relative;
  z-index: 1;
}
.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.page-hero p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
}
