:root {
  --bg: #09090b;
  --panel: #111114;
  --panel-2: #17171b;
  --line: #29292f;
  --text: #f5f5f7;
  --muted: #9b9ba5;
  --accent: #9B0F94;
  --accent-soft: rgba(155, 15, 148, .14);
  --accent-line: rgba(155, 15, 148, .45);
  --green: #48c78e;
  --red: #ef6b73;
  --blue: #61a8ff;
  --amber: #e7b44c;
  --violet: #c987ff;
  --sidebar: 250px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
code { color: #dca5ff; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 24px 16px; background: #0d0d10; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 22px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 900; font-size: 20px; background: linear-gradient(145deg, #bf1db7, #6b0866); box-shadow: 0 10px 28px rgba(155, 15, 148, .24); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: .02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.nav { display: grid; gap: 4px; padding: 20px 0; overflow: auto; }
.nav-link { padding: 10px 12px; border-radius: 8px; color: #aaaab2; font-size: 13px; transition: .15s ease; }
.nav-link:hover, .nav-link.active { background: var(--accent-soft); color: white; }
.nav-link.active { box-shadow: inset 2px 0 0 var(--accent); }
.sidebar-foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--line); display: grid; gap: 5px; color: #6f6f78; font-size: 10px; }
.main { margin-left: var(--sidebar); min-width: 0; }
.topbar { height: 68px; position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 16px; padding: 0 34px; background: rgba(9,9,11,.94); border-bottom: 1px solid var(--line); }
.menu-button { display: none; background: transparent; color: white; border: 0; font-size: 22px; }
.search-wrap { width: min(610px, 60vw); display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; background: #121216; border: 1px solid var(--line); border-radius: 9px; color: #72727b; }
.search-wrap:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-wrap input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: white; font-size: 13px; }
kbd { border: 1px solid #33333a; background: #1b1b20; border-radius: 5px; padding: 2px 6px; color: #74747e; font-size: 10px; }
.status-pill { margin-left: auto; display: flex; align-items: center; gap: 7px; color: #9c9ca5; font-size: 11px; }
.status-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(72,199,142,.09); }
.hero { padding: 72px 46px 32px; max-width: 1280px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.eyebrow { margin: 0 0 12px; color: #c45dbe; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
h1 { max-width: 760px; margin: 0; font-size: clamp(40px, 6vw, 72px); line-height: .98; letter-spacing: -.055em; }
h1 em { color: #c436bd; font-style: normal; }
.hero-copy { max-width: 780px; margin: 24px 0 0; color: var(--muted); line-height: 1.7; font-size: 14px; }
.hero-badge { width: 160px; flex: 0 0 160px; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center; border: 1px solid var(--accent-line); background: radial-gradient(circle, rgba(155,15,148,.20), rgba(155,15,148,.02) 65%); }
.hero-badge strong { display: block; font-size: 32px; }
.hero-badge span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.stats { max-width: 1280px; margin: 0 auto; padding: 18px 46px 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat-card { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.stat-card span { color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; margin: 8px 0 4px; font-size: 24px; letter-spacing: -.03em; }
.stat-card small { color: #6f6f78; font-size: 10px; }
.notice { max-width: 1188px; margin: 10px auto 58px; padding: 18px 20px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 10px; }
.notice strong { font-size: 12px; }
.notice p { margin: 8px 0 0; color: #b0b0b8; font-size: 12px; line-height: 1.8; }
.wiki-section { max-width: 1280px; margin: 0 auto; padding: 46px; scroll-margin-top: 66px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.section-heading p:last-child { max-width: 440px; margin: 0; color: var(--muted); font-size: 12px; text-align: right; line-height: 1.5; }
.table-shell { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 12px 15px; background: #151519; color: #7e7e87; text-align: left; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 15px; border-bottom: 1px solid #222228; vertical-align: top; line-height: 1.5; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #151519; }
td:first-child { width: 23%; font-weight: 700; color: #ededf0; }
td:nth-child(2) { width: 22%; color: #f2d3f1; font-weight: 650; }
td:nth-child(3) { width: 14%; }
td:last-child { color: #96969f; }
.badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border: 1px solid transparent; white-space: nowrap; }
.badge-clean { color: #83deb4; border-color: rgba(72,199,142,.25); background: rgba(72,199,142,.08); }
.badge-dirty { color: #ff9298; border-color: rgba(239,107,115,.25); background: rgba(239,107,115,.08); }
.badge-bank { color: #8ac1ff; border-color: rgba(97,168,255,.25); background: rgba(97,168,255,.08); }
.badge-cheque { color: #efca76; border-color: rgba(231,180,76,.25); background: rgba(231,180,76,.08); }
.badge-faction { color: #d5a9ff; border-color: rgba(201,135,255,.25); background: rgba(201,135,255,.08); }
.badge-game { color: #b0b0b8; border-color: #34343b; background: #1d1d22; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-chip { padding: 6px 9px; color: #92929b; background: #111114; border: 1px solid var(--line); border-radius: 7px; font-size: 10px; cursor: pointer; }
.filter-chip.active, .filter-chip:hover { color: white; border-color: var(--accent-line); background: var(--accent-soft); }
.balance-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.balance-card { min-height: 150px; padding: 22px; background: linear-gradient(145deg, #111114, #151519); border: 1px solid var(--line); border-radius: 10px; }
.balance-card .risk { display: inline-block; margin-bottom: 22px; color: #d36acb; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.balance-card h3 { margin: 0 0 8px; font-size: 18px; }
.balance-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.calculator-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.calculator-card { padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.calculator-card h3 { margin: 0 0 22px; }
.calculator-card label { display: grid; gap: 7px; color: #8d8d96; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.calculator-card input { width: 100%; height: 38px; padding: 0 11px; color: white; background: #0d0d10; border: 1px solid var(--line); border-radius: 7px; outline: 0; }
.calculator-card input:focus { border-color: var(--accent-line); }
.split-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.calc-output { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-top: 14px; padding: 13px 0; border-bottom: 1px solid #25252b; }
.calc-output span { color: var(--muted); font-size: 11px; }
.calc-output strong { font-size: 19px; }
.calculator-card small { display: block; margin-top: 15px; color: #6d6d76; line-height: 1.6; }
footer { max-width: 1188px; margin: 0 auto; padding: 22px 0 35px; display: flex; justify-content: space-between; color: #62626b; font-size: 10px; border-top: 1px solid var(--line); }
.search-empty { position: fixed; left: calc(var(--sidebar) + 50%); top: 84px; transform: translateX(-50%); z-index: 40; padding: 12px 16px; color: #d9d9de; background: #1a1a1f; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 50px rgba(0,0,0,.35); font-size: 12px; }
.is-hidden { display: none !important; }
@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-button { display: block; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .search-empty { left: 50%; }
}
@media (max-width: 680px) {
  .topbar { padding: 0 16px; }
  .status-pill, kbd { display: none; }
  .search-wrap { width: 100%; }
  .hero { padding: 50px 22px 24px; align-items: flex-start; }
  .hero-badge { display: none; }
  .stats { padding: 10px 22px; grid-template-columns: 1fr; }
  .notice { margin: 14px 22px 30px; }
  .wiki-section { padding: 38px 22px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading p:last-child { text-align: left; }
  .balance-grid, .calculator-grid { grid-template-columns: 1fr; }
  footer { margin: 0 22px; }
}
