/* Editors Haven — общая тёмная тема, та же, что в мини-приложениях EH : Stats Tracker и EH : Events Hub.
   Токены и компоненты отсюда переносятся в бота и обратно без правок; раскладка страниц — в site.css. */
:root {
  --bg: #000;
  --surface: #0b0b0b;
  --surface-2: #0d0d0d;
  --tile: #141414;

  --line: #1a1a1a;
  --line-row: #1c1c1c;
  --line-strip: #1f1f1f;
  --line-btn: #262626;
  --line-chip: #2a2a2a;
  --line-strong: #333;

  --text: #fff;
  --text-2: #bfbfbf;
  --muted: #8f8f8f;
  --faint: #8a8a8a;
  --index: #5a5a5a;

  --green: #4ade80;
  --green-text: #6ff59c;
  --green-glow: 0 0 10px rgba(74, 222, 128, .6);
  --red: #ff3b30;
  --red-text: #ff5a50;

  --f-display: "Unbounded", system-ui, sans-serif;
  --f-body: "Golos Text", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --pad: 16px;
  --gap: 20px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--text); }
html { scroll-behavior: smooth; }
body {
  font: 400 15px/1.4 var(--f-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; background: none; border: 0; outline: 0; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--f-mono); font-weight: 500; }

.ic {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.ic--muted { color: var(--muted); }
.ic--chevron { width: 18px; height: 18px; color: var(--index); }

/* ---------- бренд ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; background: #fff; color: #000;
}
.brand__mark .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.brand__name { font: 600 16px var(--f-display); letter-spacing: -.01em; white-space: nowrap; }
.brand__name i { font-style: normal; color: var(--index); }

.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  border: 1px solid var(--line-btn);
  display: grid; place-items: center;
}
.icon-btn:active { background: var(--surface); border-color: var(--line-strong); }

/* ---------- подписи ---------- */
.kicker { font: 500 12px var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.section-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 24px; font: 500 15px var(--f-display);
}
.section-title > span:first-child { white-space: nowrap; }
.mono-count { font: 500 12px var(--f-mono); color: var(--muted); white-space: nowrap; }
.mono-meta {
  font: 500 11px/1.5 var(--f-mono); color: var(--faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hint { font: 500 11px var(--f-mono); color: #7a7a7a; padding: 0 4px; letter-spacing: .02em; }
.sub { font: 500 11px/1.5 var(--f-mono); color: var(--faint); }
.big { font: 500 24px/1.2 var(--f-mono); letter-spacing: -.02em; }
.glow { color: var(--green-text); text-shadow: var(--green-glow); }

/* ---------- строки ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 12px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line-row);
  text-align: left; width: 100%;
  transition: background .15s, border-color .15s;
}
.row:hover { border-color: var(--line-btn); }
.row:active { background: var(--surface-2); border-color: var(--line-strong); }
.row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font: 500 15px/1.3 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-note { font-size: 12px; line-height: 1.45; color: var(--faint); margin-top: 2px; }
.thumb {
  width: 44px; height: 56px; flex: none; border-radius: 10px;
  background: linear-gradient(160deg, #1a1a1a, #0f0f0f); border: 1px solid var(--line-strip);
  display: grid; place-items: center; color: var(--index);
}
.thumb--icon { width: 44px; height: 44px; color: #fff; }
.thumb--icon .ic { width: 20px; height: 20px; }

/* ---------- метки ---------- */
.pill {
  height: 26px; padding: 0 10px; flex: none; display: inline-flex; align-items: center;
  border-radius: 999px; font: 500 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
}
.pill--muted { border: 1px solid var(--line-strong); color: var(--muted); }
.pill--solid { background: #fff; color: #000; font-weight: 600; }
.chip-mono {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-chip);
  font: 500 11px var(--f-mono); color: var(--text-2);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: var(--green-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
.live-dot.is-off { background: #5a5a5a; box-shadow: none; animation: none; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- панели и кнопки ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line-row); border-radius: 16px;
  padding: 16px; display: flex; flex-direction: column; gap: 14px;
}
.btn-primary {
  height: 56px; padding: 0 24px; border-radius: 16px; background: #fff; color: #000;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px var(--f-body); transition: transform .12s, opacity .15s, box-shadow .2s;
}
.btn-primary:hover { box-shadow: 0 0 24px rgba(255, 255, 255, .2); }
.btn-primary .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.btn-primary:active { transform: scale(.98); }
.btn-ghost {
  height: 56px; padding: 0 22px; border-radius: 16px; border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px var(--f-body); transition: transform .12s, background .15s;
}
.btn-ghost .ic { width: 18px; height: 18px; }
.btn-ghost:hover { background: var(--surface); }
.btn-ghost:active { transform: scale(.98); background: var(--surface-2); }

.empty {
  padding: 32px 16px; text-align: center; color: var(--faint);
  border: 1px dashed var(--line-btn); border-radius: 16px; font-size: 14px;
}

/* ---------- капсула-переключатель с «жидкой» белой каплей (liquidMove в js/main.js) ---------- */
.capsule {
  position: relative; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr));
  padding: 4px; border-radius: 999px;
  background: rgba(11, 11, 11, .82); border: 1px solid var(--line-chip);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.capsule > a, .capsule > button {
  position: relative; z-index: 1; min-width: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font: 500 12px var(--f-mono); letter-spacing: .04em; color: var(--muted);
  transition: color .25s .1s;
}
.capsule > a:hover { color: var(--text); }
.capsule > [aria-current="true"] { color: #000; font-weight: 600; }
.capsule > [aria-current="true"]:hover { color: #000; }
.capsule__pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n, 3));
  border-radius: 999px; overflow: hidden; pointer-events: none;
  background: #fff; box-shadow: 0 0 18px rgba(255, 255, 255, .22);
}
/* Блик, пробегающий по капле во время перехода */
.capsule__pill::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 20%, rgba(0, 0, 0, .12) 50%, transparent 80%);
}
.capsule__pill.is-moving::after { animation: pill-shine .6s ease-out; }
@keyframes pill-shine { to { transform: translateX(120%); } }

/* ---------- тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px); max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 12px; background: #fff; color: #000; font: 500 13px var(--f-body);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 40;
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
