/* BMO wiki — self-contained stylesheet (no dependency on the dashboard app,
   so the wiki works at wiki.bmobot.bot and bmobot.bot/wiki alike). */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #08090c;
  --surface: rgba(30, 31, 38, 0.6);
  --surface-solid: #14151a;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --accent: #5865f2;
  --accent-hover: #8b95ff;
  --accent-soft: rgba(88, 101, 242, 0.16);
  --text: #f2f3f5;
  --text-2: #b5bac1;
  --text-3: #878c95;
  --green: #3ba55d;
  --orange: #f0b232;
  --red: #ed4245;
  --radius: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15.5px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 40% at 15% -10%, rgba(88, 101, 242, 0.1), transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 0%, rgba(155, 132, 238, 0.06), transparent 50%);
}

a { color: var(--accent-hover); }

/* ---------- top bar ---------- */
.wk-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.wk-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-size: 1.02rem;
}

.wk-brand-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hover);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
}

.wk-top-links {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.wk-top-links a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.wk-top-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.wk-top-links a.wk-cta {
  color: #fff;
  background: var(--accent);
}

.wk-top-links a.wk-cta:hover { background: #6b76f5; }

/* ---------- layout ---------- */
.wk-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 22px 90px;
}

.wk-side {
  position: sticky;
  top: 76px;
  align-self: start;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding-right: 6px;
}

.wk-side-group {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 20px 0 7px 10px;
}

.wk-side-group:first-child { margin-top: 0; }

.wk-side a {
  display: block;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.wk-side a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }

.wk-side a[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

/* ---------- content ---------- */
.wk-main { min-width: 0; }

.wk-main h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.wk-sub {
  color: var(--text-2);
  font-size: 1.02rem;
  max-width: 680px;
  margin-bottom: 30px;
}

.wk-main h2 {
  font-size: 1.32rem;
  margin: 42px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  letter-spacing: -0.01em;
}

.wk-main h2:first-of-type { border-top: none; padding-top: 0; margin-top: 26px; }

.wk-main h3 {
  font-size: 1.05rem;
  margin: 26px 0 8px;
}

.wk-main p { margin-bottom: 12px; color: var(--text-2); }
.wk-main li { color: var(--text-2); }
.wk-main strong { color: var(--text); }

.wk-main ul, .wk-main ol {
  margin: 0 0 14px 22px;
}

.wk-main li { margin-bottom: 6px; }

code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 7px;
  color: #c7cdff;
  white-space: nowrap;
}

/* ---------- tables ---------- */
.wk-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 14px 0 22px;
}

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

th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ---------- callouts ---------- */
.wk-note, .wk-tip, .wk-warn {
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  padding: 13px 16px 13px 44px;
  margin: 16px 0;
  font-size: 0.92rem;
  color: var(--text-2);
  position: relative;
  background: var(--surface);
}

.wk-note::before, .wk-tip::before, .wk-warn::before {
  position: absolute;
  left: 15px;
  top: 12px;
}

.wk-note { border-color: rgba(88, 101, 242, 0.4); }
.wk-note::before { content: 'ℹ️'; }

.wk-tip { border-color: rgba(59, 165, 93, 0.4); }
.wk-tip::before { content: '💡'; }

.wk-warn { border-color: rgba(240, 178, 50, 0.45); }
.wk-warn::before { content: '⚠️'; }

/* ---------- cards (index page) ---------- */
.wk-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.wk-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s;
}

.wk-card:hover {
  transform: translateY(-3px);
  border-color: rgba(88, 101, 242, 0.45);
}

.wk-card-icon { font-size: 1.5rem; }

.wk-card h3 {
  color: var(--text);
  font-size: 0.98rem;
  margin: 8px 0 4px;
}

.wk-card p {
  color: var(--text-3);
  font-size: 0.84rem;
  line-height: 1.5;
  margin: 0;
}

/* ---------- badges ---------- */
.wk-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: 1px;
  white-space: nowrap;
}

.wk-badge.slash { background: var(--accent-soft); color: var(--accent-hover); }
.wk-badge.prefix { background: rgba(240, 178, 50, 0.15); color: var(--orange); }
.wk-badge.dash { background: rgba(59, 165, 93, 0.15); color: #58c07a; }
.wk-badge.admin { background: rgba(237, 66, 69, 0.14); color: #f07b7d; }

/* ---------- prev/next footer ---------- */
.wk-pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 54px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.wk-pager a {
  text-decoration: none;
  color: var(--text-2);
  font-size: 0.9rem;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, color 0.15s;
}

.wk-pager a:hover { border-color: var(--accent); color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .wk-layout { grid-template-columns: 1fr; gap: 24px; }
  .wk-side {
    position: static;
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--surface);
  }
  .wk-side-group { width: 100%; margin: 8px 0 2px 2px; }
  .wk-side a { padding: 5px 10px; font-size: 0.85rem; }
}
