[hidden] { display: none !important; }
:root {
  --void: #000;
  --ink: #fff;
  --ash: #9a9a9a;
  --mist: #bdbdbd;
  --dim: #5e5e5e;
  --hair: rgba(255, 255, 255, 0.08);
  --fill: rgba(255, 255, 255, 0.055);
  --fill-2: rgba(255, 255, 255, 0.09);
  --card: #0b0b0d;
  --iris: #8052ff;
  --spark: #ffb829;
  --teal: #2fd3b0;
  --bad: #ff5d6c;
  --r: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--void) radial-gradient(1200px 600px at 85% -10%, rgba(128, 82, 255, 0.16), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 15px/1.5 Inter, ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 48px);
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.brand span { font-size: 20px; letter-spacing: -0.04em; }
.brand em { font-style: normal; color: var(--ash); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 3px; }

.tabs { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.tabs a {
  height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ash);
  font: 600 13px/1 Inter, sans-serif;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--fill); }

.who { display: flex; align-items: center; gap: 10px; }
.who img, .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--fill-2); object-fit: cover; flex: none; }
.who span { color: var(--mist); font-size: 14px; }

.app { max-width: 1280px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 48px) 80px; }

.eyebrow { margin: 0 0 14px; color: var(--spark); font-size: 13px; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; }
h1 { margin: 0 0 24px; font-size: clamp(36px, 5.4vw, 64px); line-height: 1.02; font-weight: 400; letter-spacing: -0.04em; }
h2 { margin: 0 0 16px; font-size: 22px; font-weight: 400; letter-spacing: -0.02em; }
h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: var(--ash); }
.lead { margin: 0 0 32px; max-width: 520px; color: var(--mist); font-size: 18px; font-weight: 200; }
.muted { color: var(--ash); }
.small { font-size: 13px; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; }

.hero { padding: clamp(48px, 14vh, 160px) 0 40px; max-width: 640px; }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 18px 0 26px; }
.head h1 { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, opacity 0.15s;
}
.btn:hover { background: var(--fill-2); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.primary { background: var(--iris); font-weight: 600; letter-spacing: 0.02em; }
.btn.primary:hover { background: #8f66ff; }
.btn.danger { color: var(--bad); }
.btn.big { height: 48px; padding: 0 26px; font-size: 15px; }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn.discord { display: inline-flex; align-items: center; gap: 10px; background: #5865f2; font-weight: 600; }
.btn.discord:hover { background: #6b77f5; }
.btn.discord svg { width: 22px; height: 22px; }

.grid { display: grid; gap: 14px; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 26px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.two { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }

.card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r); padding: 22px; min-width: 0; }
.card.link { cursor: pointer; transition: border-color 0.15s, background 0.15s; text-decoration: none; display: block; }
.card.link:hover { border-color: rgba(128, 82, 255, 0.45); background: #0e0d12; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.card-top h2 { margin: 0; font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tile { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r); padding: 20px 22px; }
.tile b { display: block; font-size: 40px; font-weight: 200; letter-spacing: -0.04em; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.tile b small { font-size: 18px; color: var(--ash); letter-spacing: 0; }
.tile p { margin: 4px 0 0; color: var(--ash); font-size: 13px; }

.dot { display: inline-flex; align-items: center; gap: 8px; color: var(--mist); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.dot.ok::before { background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.dot.warn::before { background: var(--spark); box-shadow: 0 0 10px var(--spark); }
.dot.bad::before { background: var(--bad); box-shadow: 0 0 10px var(--bad); }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 14px; }
.kv div span { display: block; color: var(--ash); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.kv div b { font-weight: 400; font-size: 17px; font-variant-numeric: tabular-nums; }

.bar { height: 6px; border-radius: 99px; background: var(--fill-2); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--iris); }
.bar i.warn { background: var(--spark); }
.bar i.bad { background: var(--bad); }

.section { margin-top: 34px; }
.section > .head { margin: 0 0 14px; align-items: center; }
.section > .head h2 { margin: 0; }

.code {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #050506;
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 12px 12px 12px 16px;
  overflow: hidden;
}
.code pre { margin: 0; flex: 1; min-width: 0; overflow-x: auto; font: 400 13px/1.6 "JetBrains Mono", ui-monospace, monospace; color: var(--mist); }
.code + .code { margin-top: 10px; }

table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--ash); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; padding: 0 12px 10px; white-space: nowrap; }
td { padding: 12px; border-top: 1px solid var(--hair); vertical-align: middle; }
tr.click { cursor: pointer; }
tr.click:hover td { background: rgba(255, 255, 255, 0.025); }
.table { overflow-x: auto; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.search { height: 40px; width: min(320px, 100%); padding: 0 16px; border-radius: 999px; border: 1px solid var(--hair); background: var(--fill); outline: none; }
.search:focus { border-color: rgba(128, 82, 255, 0.6); }

.empty { padding: 40px 22px; text-align: center; color: var(--ash); border: 1px dashed var(--hair); border-radius: var(--r); }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.72); }
.modal[hidden] { display: none; }
.sheet { width: min(660px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #0c0c0f; border: 1px solid var(--hair); border-radius: 26px; padding: 26px; }
.sheet h2 { margin-bottom: 20px; }
.sheet .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; flex-wrap: wrap; }

label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; color: var(--ash); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 6px; }
label.f input, label.f select, label.f textarea {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--hair);
  background: var(--fill);
  outline: none;
}
label.f textarea { height: 80px; padding: 10px 14px; resize: vertical; }
label.f select option { background: #111; }
label.f input:focus, label.f select:focus, label.f textarea:focus { border-color: rgba(128, 82, 255, 0.6); }
label.f small { display: block; margin-top: 5px; color: var(--dim); font-size: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.checks { display: grid; gap: 8px; margin-bottom: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--fill); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--iris); }
.check b { display: block; font-weight: 600; font-size: 14px; }
.check small { color: var(--ash); font-size: 12px; }

.pills { display: flex; gap: 4px; }
.pills button { height: 30px; padding: 0 12px; border-radius: 999px; border: 0; background: none; color: var(--ash); font-size: 12px; font-weight: 600; cursor: pointer; }
.pills button[aria-pressed="true"] { background: var(--fill-2); color: var(--ink); }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 150px; overflow: visible; }
.chart .grid-l { stroke: var(--hair); stroke-width: 1; }
.chart .ax { fill: var(--dim); font-size: 11px; font-family: Inter, sans-serif; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ar { opacity: 0.14; }
.chart .x { stroke: var(--mist); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .yl { position: absolute; right: 0; color: var(--dim); font-size: 11px; transform: translateY(-120%); pointer-events: none; }
.av { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(128, 82, 255, 0.25); color: #d5c7ff; font-size: 13px; font-weight: 600; flex: none; }
.chart .tip {
  position: absolute;
  top: 0;
  pointer-events: none;
  background: #16161b;
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  white-space: nowrap;
  transform: translateX(-50%);
  z-index: 2;
}
.chart .tip span { color: var(--ash); display: block; }
.chart .tip i { display: inline-block; width: 8px; height: 2px; vertical-align: middle; margin-right: 6px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.chart-head b { font-weight: 400; font-size: 20px; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; color: var(--ash); font-size: 12px; }
.legend i { display: inline-block; width: 12px; height: 2px; vertical-align: middle; margin-right: 6px; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--fill-2); color: var(--mist); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.tag.iris { background: rgba(128, 82, 255, 0.18); color: #c6b3ff; }
.tag.bad { background: rgba(255, 93, 108, 0.14); color: var(--bad); }
.tag.warn { background: rgba(255, 184, 41, 0.14); color: var(--spark); }

.note { padding: 14px 16px; border-radius: 14px; background: rgba(255, 184, 41, 0.08); color: #ffd98a; font-size: 14px; margin-bottom: 16px; }
.note.iris { background: rgba(128, 82, 255, 0.1); color: #d5c7ff; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60; background: #16161b; border: 1px solid var(--hair); border-radius: 999px; padding: 11px 20px; font-size: 14px; transition: opacity 0.2s, transform 0.2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { color: var(--bad); }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ash); text-decoration: none; font-size: 14px; margin-top: 8px; }
.back:hover { color: var(--ink); }

body[data-view="loading"] .app { opacity: 0; }
body[data-view="login"] .tabs, body[data-view="login"] .who { visibility: hidden; }

@media (max-width: 760px) {
  .top { grid-template-columns: 1fr auto; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .who span { display: none; }
  .two, .cards { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .tile b { font-size: 30px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile { padding: 16px; }
}

.shop { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.shop-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.shop-num { display: block; font-size: clamp(64px, 9vw, 112px); font-weight: 200; letter-spacing: -0.05em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.shop-top p { margin: 8px 0 0; }
.shop-price span { font-size: 38px; font-weight: 400; letter-spacing: -0.03em; }
.shop-price small { color: var(--ash); font-size: 15px; }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; outline: none; background: linear-gradient(90deg, var(--iris) var(--p, 25%), var(--fill-2) var(--p, 25%)); margin: 6px 0 14px; cursor: pointer; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(128, 82, 255, 0.35); cursor: grab; }
.slider::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(128, 82, 255, 0.35); cursor: grab; }
.marks { display: flex; justify-content: space-between; margin-bottom: 22px; }
.marks button { border: 0; background: none; color: var(--ash); font: 600 13px Inter, sans-serif; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.marks button[aria-pressed="true"] { color: #fff; background: var(--fill); }
.feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.feats li { position: relative; padding-left: 26px; color: var(--mist); }
.feats li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.shop-acts { flex-direction: column; align-items: stretch; margin-top: 18px; }
.shop-acts .btn { width: 100%; }
@media (max-width: 860px) { .shop { grid-template-columns: 1fr; } }
