/* BD ZONE Wiki — shell theme. Follows bdzonemc.com: deep navy, emerald accent, red highlight. */
:root {
  --bg: #080d16;
  --bg-soft: #0b1220;
  --panel: #0f1827;
  --panel-2: #131f33;
  --line: #22314a;
  --line-soft: rgba(148, 163, 184, 0.14);
  --text: #e9eef7;
  --muted: #9aa9c0;
  --faint: #6f809a;
  --emerald: #10b981;
  --emerald-bright: #34d399;
  --emerald-soft: rgba(16, 185, 129, 0.12);
  --red: #dc2626;
  --amber: #f5c542;
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1180px;
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--emerald-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--emerald-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--emerald);
  color: #04120c;
  padding: 0.6rem 1rem;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 13, 22, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.95rem;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand em {
  font-style: normal;
  color: var(--emerald-bright);
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  border-left: 1px solid var(--line);
  padding-left: 0.6rem;
  margin-left: 0.1rem;
}

.mainnav { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.mainnav a {
  color: var(--muted);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
}
.mainnav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.mainnav a[aria-current="page"] { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }

.topbar-actions { display: flex; align-items: center; gap: 0.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.58rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--emerald); color: #04130d; }
.btn-primary:hover { background: var(--emerald-bright); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--panel); border-color: #31415f; }
.btn-quiet { background: var(--panel); color: var(--muted); border-color: var(--line-soft); }
.btn-quiet:hover { color: var(--text); }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.8rem; }

.navtoggle {
  display: none;
  margin-left: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .topbar-inner { flex-wrap: wrap; row-gap: 0.5rem; padding-block: 0.6rem; }
  .navtoggle { display: inline-flex; }
  .mainnav {
    order: 3;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding-bottom: 0.4rem;
  }
  .mainnav.is-open { display: flex; }
  .mainnav a { padding: 0.65rem 0.75rem; border-radius: var(--radius-sm); }
  .topbar-actions { margin-left: 0; }
  .topbar-actions .btn-ghost { display: none; }
}

@media (max-width: 480px) {
  .brand em { display: none; }
  .topbar-actions .btn { padding: 0.5rem 0.7rem; font-size: 0.8rem; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(8, 13, 22, 0.55) 0%, rgba(8, 13, 22, 0.92) 62%, var(--bg) 100%),
    radial-gradient(90% 120% at 18% 0%, rgba(16, 185, 129, 0.22), transparent 60%),
    url("/assets/mcbackground.png") center 35% / cover no-repeat;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem);
}
.hero-copy { min-width: 0; }
.hero-art { margin: 0; }
.hero-art img { width: 100%; height: auto; filter: drop-shadow(0 22px 45px rgba(0, 0, 0, 0.55)); }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-art { display: none; }
}
.promo { margin: 0 0 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.promo img { width: 100%; height: auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--emerald-bright);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); margin-bottom: 0.35rem; }
.hero h1 span { color: var(--emerald-bright); }
.hero .lede { font-size: clamp(1rem, 1.6vw, 1.15rem); color: #c4d0e2; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.6rem; }

.ip-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.8rem;
}
.ip-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(15, 24, 39, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem 0.55rem 0.85rem;
  font-size: 0.85rem;
}
.ip-card .label { display: block; color: var(--faint); font-size: 0.66rem; letter-spacing: 0.11em; text-transform: uppercase; }
.ip-card code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88rem; color: var(--text); }
.copy-btn {
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-bright);
  border-radius: 7px;
  padding: 0.35rem 0.55rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.copy-btn:hover { background: rgba(16, 185, 129, 0.2); }
.copy-btn.is-copied { background: var(--emerald); color: #04130d; border-color: var(--emerald); }

/* ---------- generic sections ---------- */

.section { padding-block: clamp(2.6rem, 5vw, 3.8rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.section-head .more { font-size: 0.85rem; color: var(--muted); }
.section-head .more:hover { color: var(--emerald-bright); }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
a.card:hover { text-decoration: none; border-color: rgba(16, 185, 129, 0.5); transform: translateY(-2px); background: linear-gradient(180deg, var(--panel-2), var(--bg-soft)); }
.card h3 { margin: 0; font-size: 1.02rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.card .icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.24);
  color: var(--emerald-bright);
  margin-bottom: 0.15rem;
}
.card .icon svg { width: 20px; height: 20px; }
.card .meta { margin-top: auto; padding-top: 0.5rem; display: flex; align-items: center; gap: 0.45rem; font-size: 0.76rem; color: var(--faint); }

.card.is-soon { opacity: 0.62; cursor: default; }
.card.is-soon:hover { transform: none; border-color: var(--line-soft); background: linear-gradient(180deg, var(--panel), var(--bg-soft)); }
.card.is-soon .icon { background: rgba(148, 163, 184, 0.08); border-color: var(--line); color: var(--faint); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.pill-live { color: var(--emerald-bright); background: var(--emerald-soft); }
.pill-soon { color: var(--faint); background: rgba(148, 163, 184, 0.1); }
.pill-new { color: var(--amber); background: rgba(245, 197, 66, 0.12); }

/* ---------- link lists ---------- */

.linklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.linklist a, .linklist span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.15rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 0.92rem;
}
.linklist a:hover { color: var(--emerald-bright); text-decoration: none; }
.linklist span.is-soon { color: var(--faint); }
.linklist .hint { color: var(--faint); font-size: 0.78rem; }

/* ---------- page shell ---------- */

.page-head {
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.07), transparent 75%), var(--bg-soft);
}
.page-head .inner { padding-block: clamp(1.8rem, 4vw, 2.8rem) clamp(1.6rem, 3.5vw, 2.4rem); }
.page-head h1 { margin-bottom: 0.4rem; }
.page-head .lede { color: var(--muted); max-width: 70ch; margin: 0; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--faint);
  margin-bottom: 0.9rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--emerald-bright); }

.layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(1.8rem, 4vw, 2.8rem) 3rem;
  align-items: start;
}
@media (max-width: 880px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static !important; order: 2; }
}

.sidebar {
  position: sticky;
  top: 84px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 0.9rem 1rem 1.1rem;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.sidebar h2 {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 1.1rem 0 0.35rem;
}
.sidebar h2:first-child { margin-top: 0.2rem; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a, .sidebar li span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  border-radius: 7px;
  font-size: 0.86rem;
  color: #c3cfe0;
}
.sidebar li a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.sidebar li a[aria-current="page"] { background: var(--emerald-soft); color: var(--emerald-bright); font-weight: 600; }
.sidebar li span { color: var(--faint); cursor: default; }
.sidebar .tag { font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.35rem; color: var(--faint); }
.sidebar .tag-live { color: var(--emerald-bright); border-color: rgba(16, 185, 129, 0.35); }

/* ---------- prose ---------- */

.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.2rem; padding-top: 0.4rem; }
.prose h3 { margin-top: 1.6rem; color: #dbe5f3; }
.prose p, .prose li { color: #c9d5e5; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35rem; }
.prose strong { color: var(--text); }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 0.1em 0.35em;
  color: #d8f5e9;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 1.2rem 0; }
.prose th, .prose td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.prose th { color: var(--faint); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }

.notice {
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: var(--emerald-soft);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: #cfe9df;
  margin: 0 0 1.6rem;
}
.notice strong { color: var(--emerald-bright); }
.notice-warn { border-color: rgba(245, 197, 66, 0.3); background: rgba(245, 197, 66, 0.08); color: #f0e4bd; }
.notice-warn strong { color: var(--amber); }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.2rem;
  border: 1px solid rgba(16, 185, 129, 0.32);
  background: linear-gradient(120deg, rgba(16, 185, 129, 0.1), rgba(15, 24, 39, 0.6));
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.8rem;
}
.feature h2 { margin: 0 0 0.3rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.92rem; }
@media (max-width: 620px) { .feature { grid-template-columns: minmax(0, 1fr); } }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; margin: 1.4rem 0 0.6rem; }
.stat { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--bg-soft); padding: 0.8rem 0.9rem; }
.stat b { display: block; font-size: 1.15rem; color: var(--text); }
.stat span { font-size: 0.75rem; color: var(--faint); letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- steps ---------- */

.steps { counter-reset: step; display: grid; gap: 0.8rem; margin: 1.4rem 0 2rem; padding: 0; list-style: none; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0.9rem 1rem 0.9rem 3.1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0.9rem;
  top: 0.85rem;
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald-bright);
  font-size: 0.78rem;
  font-weight: 700;
}
.steps b { display: block; font-size: 0.95rem; }
.steps p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.88rem; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-soft);
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(2, 1fr) 1.2fr;
  gap: 2rem;
  padding-block: 2.6rem 2rem;
}
.footer-grid h3 { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.7rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-grid a { color: var(--muted); font-size: 0.88rem; }
.footer-grid a:hover { color: var(--emerald-bright); text-decoration: none; }
.footer-brand img { width: 44px; height: 44px; margin-bottom: 0.7rem; }
.footer-brand p { color: var(--muted); font-size: 0.85rem; max-width: 32ch; }
.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding-block: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  justify-content: space-between;
  color: var(--faint);
  font-size: 0.78rem;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ---------- search dialog ---------- */

.search-dialog {
  width: min(680px, calc(100vw - 2rem));
  max-height: min(70vh, 620px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  padding: 0;
  box-shadow: var(--shadow);
}
.search-dialog::backdrop { background: rgba(4, 8, 14, 0.72); backdrop-filter: blur(3px); }
.search-dialog form { display: flex; gap: 0.5rem; padding: 0.85rem; border-bottom: 1px solid var(--line-soft); }
.search-dialog input[type="search"] {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem;
}
.search-dialog input[type="search"]:focus { outline: 2px solid rgba(16, 185, 129, 0.6); outline-offset: 1px; }
.search-results { list-style: none; margin: 0; padding: 0.4rem; overflow: auto; max-height: 52vh; }
.search-results li { border-radius: var(--radius-sm); }
.search-results a { display: block; padding: 0.6rem 0.7rem; color: var(--text); border-radius: var(--radius-sm); }
.search-results a:hover, .search-results a:focus-visible { background: var(--panel-2); text-decoration: none; }
.search-results .title { font-weight: 600; font-size: 0.92rem; }
.search-results .excerpt { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.search-results mark { background: rgba(16, 185, 129, 0.28); color: #eafff7; border-radius: 3px; padding: 0 1px; }
.search-status { padding: 0.7rem 1rem 1rem; margin: 0; color: var(--faint); font-size: 0.82rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* tables scroll on narrow screens instead of pushing the page wide */
.table-wrap { overflow-x: auto; margin: 1.2rem 0; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.table-wrap table { margin: 0; min-width: 560px; }
.table-wrap th, .table-wrap td { padding: 0.6rem 0.75rem; }
