/* ==================================================================
   Atlantica NX — стиль сайта (редизайн 2026-10-22).
   Тёмная тема по умолчанию, светлая — html[data-theme="light"].
   Шрифты: PT Sans / PT Serif (ParaType, OFL 1.1) — латиница, кириллица, испанский.
   ================================================================== */

@font-face { font-family: 'PT Sans'; src: url(/fonts/ptsans-400.woff) format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'PT Sans'; src: url(/fonts/ptsans-700.woff) format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'PT Serif'; src: url(/fonts/ptserif-700.woff) format('woff'); font-weight: 700; font-display: swap; }

:root {
  --bg: #0a0c11;
  --bg-2: #0f121a;
  --surface: #141823;
  --surface-2: #1b2030;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #ece8df;
  --muted: #a4a9b6;
  --faint: #8a90a0;
  --gold: #e3b866;
  --gold-2: #f3d796;
  --gold-3: #b9842f;
  --on-gold: #1a1408;
  --teal: #5fd0c5;
  --ok: #57d18a;
  --err: #ff7a6b;
  --warn: #f1b44c;
  --shadow: 0 20px 50px rgba(0, 0, 0, .45);
  --radius: 14px;
  --radius-sm: 9px;
  --serif: 'PT Serif', Georgia, 'Times New Roman', serif;
  --sans: 'PT Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --wrap: 1200px;
  --header-h: 68px;
  --plate: rgba(10, 12, 17, .74);
  --plate-line: rgba(255, 255, 255, .13);
  --plate-shadow: 0 12px 34px rgba(0, 0, 0, .35);
  --hero-text: #fbf7ee;
  --hero-muted: rgba(243, 239, 230, .88);
  --hero-title-1: #fbe7b4;
  --hero-title-2: #e6bb6a;
  color-scheme: dark;
}
html[data-theme="light"] {
  /* пергамент / крем; все пары текста проверены на контраст >= 4.5:1 (work/site1022/contrast.py) */
  --bg: #f2e9d6;
  --bg-2: #e9ddc3;
  --surface: #fbf6ea;
  --surface-2: #f2e8d4;
  --line: rgba(72, 50, 22, .16);
  --line-2: rgba(72, 50, 22, .30);
  --text: #2b2116;
  --muted: #574734;
  --faint: #6b5a43;
  --gold: #7c500f;
  --gold-2: #e6bf6e;
  --gold-3: #b07c2c;
  --on-gold: #2a1c06;
  --btn-hi: #f2d38f;
  --btn-mid: #e0b263;
  --btn-lo: #c1913f;
  --teal: #0d6b63;
  --ok: #1d6e3f;
  --err: #a3301d;
  --warn: #7f5200;
  --shadow: 0 14px 34px rgba(72, 50, 22, .14);
  --plate: rgba(251, 246, 234, .86);
  --plate-line: rgba(72, 50, 22, .20);
  --plate-shadow: 0 10px 30px rgba(72, 50, 22, .18);
  --hero-text: #2b2116;
  --hero-muted: #4f4030;
  --hero-title-1: #80510e;
  --hero-title-2: #6f430b;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- подложка под текст поверх арта/фона (обе темы) ---------------- */
.plate {
  background: var(--plate); border: 1px solid var(--plate-line); border-radius: 18px; box-shadow: var(--plate-shadow);
  backdrop-filter: blur(12px) saturate(1.15); -webkit-backdrop-filter: blur(12px) saturate(1.15);
}
.plate-pad { padding: 26px 30px; }

/* ---------------- кнопки ---------------- */
.btn {
  --b: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .72em 1.35em; border-radius: 999px; border: 1px solid transparent;
  background: linear-gradient(180deg, var(--btn-hi, #f3d796), var(--btn-mid, #e3b866) 55%, var(--btn-lo, #b9842f));
  color: var(--on-gold); font: 700 .98rem/1.1 var(--sans); letter-spacing: .02em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(227, 184, 102, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { color: var(--on-gold); transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 10px 26px rgba(227, 184, 102, .32), inset 0 1px 0 rgba(255,255,255,.35); }
.btn:active { transform: none; }
.btn[disabled], .btn.disabled { opacity: .78; cursor: not-allowed; transform: none; filter: grayscale(.4); }
.btn.ghost { background: rgba(255, 255, 255, .04); color: var(--text); border-color: var(--line-2); box-shadow: none; }
html[data-theme="light"] .btn.ghost { background: rgba(251, 246, 234, .9); border-color: var(--line-2); color: var(--text); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold-2); }
html[data-theme="light"] .btn.ghost:hover { color: var(--gold); border-color: var(--gold); }
.btn-lg { padding: .9em 1.7em; font-size: 1.05rem; }
/* 2026-10-25: кнопка SD-карточки в цвет её полоски (.dl-card.sd::before) */
.btn.teal { background: linear-gradient(90deg, #3d8f89, var(--teal), #3d8f89); color: #0b1a19; border-color: transparent; box-shadow: none; }
html[data-theme="light"] .btn.teal { color: #fff; }
.btn.teal[disabled] { filter: none; opacity: .9; }
.btn-sm { padding: .5em 1em; font-size: .9rem; }
.btn.full { width: 100%; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.link:hover { color: var(--text); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------------- шапка ---------------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: linear-gradient(180deg, rgba(8, 10, 14, .82), rgba(8, 10, 14, .55));
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
html[data-theme="light"] .top { background: rgba(251, 246, 234, .93); border-bottom-color: var(--line-2); }
body { padding-top: var(--header-h); }
body.has-hero { padding-top: 0; }
.top-inner { display: flex; align-items: center; gap: 22px; height: 100%; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-text { font: 700 1.35rem/1 var(--serif); letter-spacing: .01em; }
.logo-text em { font-style: normal; color: var(--gold); margin-left: .18em; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3)); color: var(--on-gold);
  font: 700 .85rem/1 var(--sans); letter-spacing: .04em;
}
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  color: var(--muted); padding: 8px 13px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
html[data-theme="light"] .nav a:hover { background: rgba(72, 50, 22, .08); }
html[data-theme="light"] .nav a.active { background: rgba(176, 124, 44, .18); }
.nav a.active { color: var(--text); background: rgba(227, 184, 102, .14); }
.sess { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sess .user { color: var(--text); font-weight: 700; font-size: .95rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 999px;
  background: transparent; border: 1px solid var(--line-2); color: var(--muted); cursor: pointer; padding: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--gold); }
.icon-btn svg { width: 18px; height: 18px; }
.nav a.nav-discord { display: none; }
@media (max-width: 420px) {
  .discord-btn { display: none; }
  .nav a.nav-discord { display: block; }
}
.discord-btn:hover { color: #fff; background: #5865F2; border-color: #5865F2; }
.theme-btn .i-sun { display: none; }
html[data-theme="light"] .theme-btn .i-sun { display: block; }
html[data-theme="light"] .theme-btn .i-moon { display: none; }

.langs { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text);
  font: 700 .85rem/1 var(--sans); cursor: pointer; letter-spacing: .04em;
}
.lang-btn:hover { border-color: var(--gold); }
.lang-btn svg { width: 16px; height: 16px; color: var(--muted); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
  display: none;
}
.langs.open .lang-menu { display: block; }
.lang-menu a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.lang-menu a:hover { background: var(--surface-2); color: var(--text); }
.lang-menu a.active { color: var(--gold); }
.lang-code { font: 700 .75rem/1 var(--sans); color: var(--faint); width: 22px; }
.burger { display: none; }

/* ---------------- слои артов (параллакс в effects.js) ---------------- */
.art-layer, .hero-bg, .glow-layer {
  position: absolute; inset: -60px; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center; will-change: transform;
}
.glow-layer {
  background:
    radial-gradient(40% 50% at 15% 10%, rgba(227, 184, 102, .14), transparent 70%),
    radial-gradient(35% 45% at 85% 20%, rgba(95, 208, 197, .10), transparent 70%),
    radial-gradient(50% 60% at 50% 110%, rgba(120, 90, 200, .10), transparent 70%);
}
html[data-theme="light"] .glow-layer {
  background:
    radial-gradient(40% 50% at 15% 10%, rgba(197, 141, 45, .16), transparent 70%),
    radial-gradient(35% 45% at 85% 20%, rgba(18, 130, 122, .10), transparent 70%);
}

/* ---------------- альфа-полоса ---------------- */
.alpha {
  position: relative; z-index: 3; background: linear-gradient(90deg, rgba(227, 184, 102, .14), rgba(227, 184, 102, .05));
  border-bottom: 1px solid rgba(227, 184, 102, .25); font-size: .95rem;
}
.has-hero .alpha { position: absolute; top: var(--header-h); left: 0; right: 0; backdrop-filter: blur(8px); background: rgba(10, 12, 17, .55); }
html[data-theme="light"].has-hero .alpha, html[data-theme="light"] .has-hero .alpha { background: rgba(251, 246, 234, .9); border-bottom-color: var(--line-2); }
.alpha-inner { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.alpha-inner p { margin: 0; color: var(--text); }
.alpha-badge, .tag, .badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font: 700 .72rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  background: rgba(227, 184, 102, .16); color: var(--gold); border: 1px solid rgba(227, 184, 102, .3);
}
html[data-theme="light"] .alpha-badge, html[data-theme="light"] .tag, html[data-theme="light"] .badge { background: rgba(176, 124, 44, .14); color: #6f430b; border-color: rgba(138, 90, 18, .35); }
.alpha-dl { margin-top: 18px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid rgba(227, 184, 102, .3); background: rgba(227, 184, 102, .07); }

/* ---------------- hero (главная) ---------------- */
.hero { position: relative; min-height: min(100vh, 980px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero-bg { inset: -80px; background-position: center 35%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 12, 17, .55) 0%, rgba(10, 12, 17, .05) 28%, rgba(10, 12, 17, .25) 60%, rgba(10, 12, 17, .7) 88%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10, 12, 17, .6) 0%, rgba(10, 12, 17, .2) 50%, rgba(10, 12, 17, 0) 75%);
}
html[data-theme="light"] .hero::before {
  background:
    linear-gradient(180deg, rgba(242, 233, 214, .35) 0%, rgba(242, 233, 214, 0) 30%, rgba(242, 233, 214, .15) 65%, rgba(242, 233, 214, .75) 90%, var(--bg) 100%),
    linear-gradient(90deg, rgba(242, 233, 214, .45) 0%, rgba(242, 233, 214, .1) 55%, rgba(242, 233, 214, 0) 75%);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 40px; align-items: end; padding-top: calc(var(--header-h) + 100px); padding-bottom: 110px; }
.hero-text { color: var(--hero-text); padding: 30px 34px 28px; max-width: 700px; }
.hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.5rem); color: var(--hero-text); margin: 16px 0 16px; }
.hero h1 .accent {
  display: block; font-size: 1.22em; letter-spacing: .01em;
  background: linear-gradient(180deg, var(--hero-title-1) 10%, var(--hero-title-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: var(--hero-muted); max-width: 620px; margin-bottom: 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--plate-line); }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font: 700 1.45rem/1.1 var(--serif); color: var(--hero-text); }
.hero-stats span { font-size: .88rem; color: var(--hero-muted); }

/* карточка сервера — та же подложка */
.server-card { position: relative; padding: 22px 22px 18px; color: var(--hero-text); }
.server-card::before { content: ""; position: absolute; inset: 0 18px auto 18px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); }
.sc-label { font: 700 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--hero-muted); }
.sc-name { display: block; font: 700 1.55rem/1.2 var(--serif); margin: 8px 0 12px; color: var(--hero-text); }
.sc-state { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.sc-state .ok { color: #8be8b0; }
.sc-state .err { color: #ffaba1; }
html[data-theme="light"] .sc-state .ok { color: var(--ok); }
html[data-theme="light"] .sc-state .err { color: var(--err); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #8a8f9c; box-shadow: 0 0 0 4px rgba(138, 143, 156, .18); }
.status-dot.on { background: #57d18a; box-shadow: 0 0 0 4px rgba(87, 209, 138, .2), 0 0 14px rgba(87, 209, 138, .7); animation: pulse 2.4s ease-in-out infinite; }
.status-dot.off { background: #ff7a6b; box-shadow: 0 0 0 4px rgba(255, 122, 107, .18); }
html[data-theme="light"] .status-dot.on { background: #23874d; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(87, 209, 138, .08), 0 0 18px rgba(87, 209, 138, .9); } }
.sc-online { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--plate-line); }
.sc-online b { font: 700 2.8rem/1 var(--serif); color: var(--hero-text); font-variant-numeric: lining-nums tabular-nums; }
.sc-online span { color: var(--hero-muted); }
.sc-updated { font-size: .85rem; color: var(--hero-muted); }
.sc-actions { display: flex; gap: 8px; margin-top: 16px; }
.sc-actions .btn { flex: 1; }

/* ---------------- заголовки разделов ---------------- */
.page-head { position: relative; overflow: hidden; padding: 84px 0 56px; border-bottom: 1px solid var(--line); isolation: isolate; }
.page-head::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10,12,17,.35), var(--bg) 100%), linear-gradient(90deg, rgba(10,12,17,.75), rgba(10,12,17,.15)); pointer-events: none; }
html[data-theme="light"] .page-head::after { background: linear-gradient(180deg, rgba(242,233,214,.25), var(--bg) 100%), linear-gradient(90deg, rgba(242,233,214,.55), rgba(242,233,214,.1)); }
.page-head.plain::after { background: none; }
.page-head .kicker { display: inline-block; margin-bottom: 14px; }
.page-head .plate { display: inline-block; max-width: 720px; padding: 22px 28px 24px; }
.page-head.plain .plate { background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding-left: 0; }
.page-head h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); margin-bottom: .3em; }
.page-head p { font-size: 1.1rem; max-width: 640px; margin: 0; color: var(--muted); }

.band { position: relative; padding: 64px 0 88px; overflow: hidden; isolation: isolate; }
.band-head { margin-bottom: 28px; }
.band-head.left { text-align: left; }

/* ---------------- карточки / панели ---------------- */
.card, .panel {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 30px; }
.card { padding: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

/* новости */
.news { display: grid; gap: 18px; max-width: 860px; }
.news-card { padding: 26px 28px; display: grid; gap: 4px; transition: border-color .2s, transform .2s; }
.news-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.news-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.news-card h3 { font-size: 1.4rem; margin: 0 0 6px; }
.news-card p { color: var(--muted); margin: 0; }
.news-card p + ul { margin-top: 10px; }
.news-card ul { color: var(--muted); margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
/* 2026-10-25: последние новости на главной (home_news в build_site.py) */
.home-news { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.hn-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.hn-head b { font: 700 1.15rem/1.2 var(--serif); }
.hn-head a { font-size: .92rem; color: var(--gold-2); }
html[data-theme="light"] .hn-head a { color: var(--gold); }
.hn-item { display: block; padding: 10px 12px; margin: 0 -12px; border-radius: 12px; color: inherit; text-decoration: none; transition: background .2s; }
.hn-item:hover { background: rgba(227, 184, 102, .08); color: inherit; }
.hn-item .news-meta { margin-bottom: 4px; }
.hn-title { display: block; font: 600 1.05rem/1.35 var(--serif); }
.date { color: var(--faint); font-size: .85rem; font-variant-numeric: tabular-nums; }

/* скачать */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.dl-card { padding: 26px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.dl-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--gold-3), var(--gold-2), var(--gold-3)); opacity: .8; }
.dl-card.sd::before { background: linear-gradient(90deg, #3d8f89, var(--teal), #3d8f89); }
.dl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dl-ver { font: 700 .82rem/1 var(--sans); color: var(--faint); letter-spacing: .06em; }
.dl-card h3 { font-size: 1.6rem; margin: 0; }
.dl-card p { color: var(--muted); margin: 0; flex-grow: 1; } /* описание растягивается — характеристики и кнопки карточек на одном уровне */
.dl-kv { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; }
.kv span { color: var(--muted); }
.kv b { text-align: right; }
.soon { display: inline-flex; align-items: center; gap: 8px; }
.soon-pill { padding: 4px 10px; border-radius: 999px; font: 700 .72rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--warn); border: 1px solid currentColor; }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.steps-list li::before { content: counter(s); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 1.05rem/1 var(--serif); color: var(--gold); border: 1px solid rgba(227,184,102,.4); background: rgba(227,184,102,.08); }
.steps-list b { display: block; }
.steps-list span { color: var(--muted); font-size: .95rem; }
.check { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.check li { position: relative; padding-left: 30px; }
.check li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: rgba(87,209,138,.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2357d18a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.check.tight { gap: 6px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.ok { color: var(--ok); }
.err { color: var(--err); }

/* рейты (страница без ссылок) */
.rates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rate { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.rate b { font-size: .9rem; color: var(--muted); font-weight: 400; }
.rate span { font: 700 1.4rem/1.1 var(--serif); color: var(--gold); }
.steps { padding-left: 1.2em; display: grid; gap: 10px; }
.steps li b { display: block; }
.steps li span { color: var(--muted); }

/* ---------------- формы ---------------- */
.auth-wrap { position: relative; overflow: hidden; isolation: isolate; padding: 72px 0 96px; min-height: calc(100vh - var(--header-h) - 140px); display: flex; align-items: center; }
.auth-wrap::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(60% 70% at 70% 40%, rgba(10,12,17,.2), rgba(10,12,17,.85)), linear-gradient(180deg, rgba(10,12,17,.3), var(--bg)); }
html[data-theme="light"] .auth-wrap::after { background: radial-gradient(60% 70% at 70% 40%, rgba(242,233,214,.15), rgba(242,233,214,.8)), linear-gradient(180deg, rgba(242,233,214,.2), var(--bg)); }
.panel.auth { max-width: 460px; margin: 0 auto; background: color-mix(in srgb, var(--surface) 92%, transparent); border-color: var(--plate-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.panel.auth h2 { margin-bottom: .25em; }
.panel.auth h3 { margin-top: 22px; font-size: 1.1rem; }
.panel.wide { max-width: 760px; }
form { display: grid; gap: 16px; margin-top: 18px; }
label { display: grid; gap: 7px; font-weight: 700; font-size: .95rem; }
.hint { font-weight: 400; color: var(--faint); font-size: .85rem; }
input, select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 170px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a4a9b6' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
html[data-theme="light"] input, html[data-theme="light"] select, html[data-theme="light"] textarea { background: #fffdf7; border-color: rgba(72, 50, 22, .32); }
html[data-theme="light"] input::placeholder, html[data-theme="light"] textarea::placeholder { color: #75644c; }
input::placeholder, textarea::placeholder { color: #8d93a1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(227, 184, 102, .18); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.msg { min-height: 1.4em; font-weight: 700; font-size: .95rem; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }
.msg.big { font-size: 1.1rem; }
.counter { justify-self: end; font-size: .8rem; color: var(--faint); font-weight: 400; font-variant-numeric: tabular-nums; }

/* категории — плитки-радио */
.cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; border: 0; padding: 0; margin: 0; }
.cats legend { font-weight: 700; font-size: .95rem; margin-bottom: 8px; padding: 0; }
.cat { position: relative; }
.cat input { position: absolute; opacity: 0; pointer-events: none; }
.cat span {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 6px; height: 100%;
  border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--muted);
  background: var(--bg-2); transition: border-color .15s, color .15s, background .15s;
}
.cat span svg { width: 22px; height: 22px; }
html[data-theme="light"] .cat span, html[data-theme="light"] .drop { background: #fffdf7; color: var(--muted); }
html[data-theme="light"] .cat input:checked + span { background: rgba(176, 124, 44, .16); color: var(--text); border-color: var(--gold); }
.cat input:checked + span { border-color: var(--gold); color: var(--text); background: rgba(227, 184, 102, .1); }
.cat input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* загрузка картинок */
.drop {
  display: grid; place-items: center; gap: 6px; text-align: center; padding: 22px; border: 1.5px dashed var(--line-2);
  border-radius: 12px; color: var(--muted); cursor: pointer; background: var(--bg-2); font-weight: 400; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--gold); background: rgba(227, 184, 102, .06); }
.drop svg { width: 28px; height: 28px; color: var(--gold); }
.drop b { color: var(--text); }
.thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.thumbs:empty { display: none; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; font-size: 15px; line-height: 1; }
.thumb small { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; font-size: .7rem; background: rgba(0,0,0,.6); color: #fff; }

/* вкладки */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 22px; }
.tabs button { border: 0; background: transparent; color: var(--muted); font: 700 .95rem/1 var(--sans); padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.tabs button.active { background: rgba(227, 184, 102, .16); color: var(--text); }
.tabs .count { display: inline-block; min-width: 20px; padding: 2px 6px; margin-left: 6px; border-radius: 999px; background: var(--surface-2); font-size: .75rem; }

/* список сообщений */
.reports { display: grid; gap: 14px; }
.report { padding: 20px 22px; }
.report-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.report-id { font: 700 1rem/1 var(--serif); }
.report-text { white-space: pre-wrap; word-break: break-word; margin: 8px 0 10px; }
.report-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.report-imgs a { width: 96px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); }
.report-imgs img { width: 100%; height: 100%; object-fit: cover; }
.reply { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: rgba(95, 208, 197, .08); border: 1px solid rgba(95, 208, 197, .25); }
.reply b { color: var(--teal); font-size: .85rem; display: block; margin-bottom: 2px; }
.reply p { margin: 0; white-space: pre-wrap; }
.st { padding: 3px 10px; border-radius: 999px; font: 700 .75rem/1.3 var(--sans); border: 1px solid currentColor; }
.st-new { color: var(--gold); }
.st-seen { color: #8fb3ff; }
html[data-theme="light"] .st-new { color: #7a4d0c; }
html[data-theme="light"] .st-seen { color: #2c4f9e; }
.st-in_work { color: var(--teal); }
.st-done { color: var(--ok); }
.st-declined { color: var(--faint); }
.cat-chip { font-size: .85rem; color: var(--muted); }
.empty { padding: 34px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.admin-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.admin-edit { display: grid; grid-template-columns: 200px 1fr auto; gap: 10px; align-items: start; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-edit textarea { min-height: 60px; }
.login-gate { text-align: center; }
.login-gate h2 { font-size: 1.6rem; }
#report-area { margin: 0 auto; }
.login-gate .row { justify-content: center; margin-top: 16px; }

/* ---------------- подвал ---------------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 40px 0 28px; position: relative; z-index: 2; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: start; }
.footer .logo { margin-bottom: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-copy { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: .85rem; }

/* лайтбокс */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: var(--shadow); }
.lb-close { position: absolute; top: 14px; right: 22px; color: #fff; font-size: 34px; cursor: pointer; }

.nav a, .sess .link { white-space: nowrap; }
html.nav-compact .burger { display: inline-grid; }
html.nav-compact .nav {
  position: fixed; top: var(--header-h); left: 0; right: 0; margin: 0; flex-direction: column; gap: 2px; padding: 10px 16px 18px;
  background: var(--surface); border-bottom: 1px solid var(--line-2); box-shadow: var(--shadow);
  transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
html.nav-compact .nav.open { opacity: 1; transform: none; pointer-events: auto; }
html.nav-compact .nav a { padding: 12px 14px; font-size: 1.05rem; }

/* ---------------- адаптив ---------------- */
@media (max-width: 1020px) {
  .hero::before { background: linear-gradient(180deg, rgba(10,12,17,.35) 0%, rgba(10,12,17,.2) 40%, rgba(10,12,17,.6) 85%, var(--bg) 100%); }
  html[data-theme="light"] .hero::before { background: linear-gradient(180deg, rgba(242,233,214,.25) 0%, rgba(242,233,214,.1) 40%, rgba(242,233,214,.6) 85%, var(--bg) 100%); }
  .hero-inner { grid-template-columns: 1fr; gap: 30px; padding-top: calc(var(--header-h) + 90px); }
  .server-card { max-width: 440px; }
  .rates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .burger { display: inline-grid; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; margin: 0; flex-direction: column; gap: 2px; padding: 10px 16px 18px;
    background: var(--surface); border-bottom: 1px solid var(--line-2); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
}
@media (max-width: 860px) {
  .two-col, .dl-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-edit { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .top-inner { gap: 10px; }
  .logo-text { font-size: 1.15rem; }
  #nav-register, .sess .user { display: none; }
  .lang-btn { padding: 0 9px; }
  .lang-btn .lb-text { display: none; }
  .hero { min-height: auto; }
  .hero-inner { padding-top: calc(var(--header-h) + 76px); padding-bottom: 44px; }
  .hero-text { padding: 22px 20px; }
  .hero-stats { gap: 18px; }
  .panel { padding: 22px 18px; }
  .page-head { padding: 56px 0 36px; }
  .band { padding: 40px 0 64px; }
  .form-row { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rates { grid-template-columns: 1fr 1fr; }
  .tabs { display: flex; }
  .tabs button { flex: 1; padding: 10px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==================================================================
   Выделение активного / выбранного (2026-10-22, просьба пользователя «слабо видно выделение»).
   Активное = сплошная золотая заливка с тёмным текстом (светлая тема — тёмное золото со светлым текстом);
   hover = лёгкий фон + рамка, заметно отличается от active; фокус с клавиатуры — золотое кольцо.
   Контраст: заливка/рамка к фону >= 3:1, текст >= 4.5:1 (work/site1022/contrast.py, раздел «выделение»).
   ================================================================== */
:root { --sel-bg: linear-gradient(180deg, #f2d38f, #e0b263); --sel-text: #1a1408; --sel-ring: #f3d796; --sel-border: #e3b866; --sel-tint: rgba(227, 184, 102, .18); --hover-bg: rgba(255, 255, 255, .08); --hover-line: rgba(255, 255, 255, .28); }
html[data-theme="light"] { --sel-bg: linear-gradient(180deg, #8a5a14, #6f470b); --sel-text: #fffaf0; --sel-ring: #7c500f; --sel-border: #7c500f; --sel-tint: #efe1c2; --hover-bg: rgba(72, 50, 22, .08); --hover-line: rgba(72, 50, 22, .38); }

/* меню в шапке */
.nav a { border: 1px solid transparent; }
.nav a:hover, html[data-theme="light"] .nav a:hover { background: var(--hover-bg); border-color: var(--hover-line); color: var(--text); }
.nav a.active, html[data-theme="light"] .nav a.active, .nav a.active:hover {
  background: var(--sel-bg); color: var(--sel-text); border-color: transparent; box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}

/* вкладки (Новое сообщение / Мои сообщения, фильтры) */
.tabs button { border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.tabs button:hover { background: var(--hover-bg); border-color: var(--hover-line); color: var(--text); }
.tabs button.active, .tabs button.active:hover { background: var(--sel-bg); color: var(--sel-text); border-color: transparent; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.tabs button.active .count { background: rgba(0, 0, 0, .18); color: inherit; }

/* плитки категорий */
.cat span { transition: background .15s, color .15s, border-color .15s, box-shadow .15s; }
.cat span:hover, html[data-theme="light"] .cat span:hover { border-color: var(--hover-line); background: var(--hover-bg); color: var(--text); }
.cat input:checked + span, html[data-theme="light"] .cat input:checked + span, .cat input:checked + span:hover {
  border-color: var(--sel-border); box-shadow: inset 0 0 0 1px var(--sel-border); background: var(--sel-tint); color: var(--text);
}
.cat input:checked + span svg { color: var(--sel-border); }
html:not([data-theme="light"]) .cat input:checked + span { color: #f3d796; }

/* сегменты/языки */
.lang-menu a.active { background: var(--sel-tint); color: var(--text); box-shadow: inset 3px 0 0 var(--sel-border); }

/* фокус с клавиатуры — заметное кольцо везде */
:focus-visible { outline: 3px solid var(--sel-ring); outline-offset: 3px; }
.cat input:focus-visible + span { outline: 3px solid var(--sel-ring); outline-offset: 3px; }
.btn:focus-visible, .tabs button:focus-visible, .nav a:focus-visible { outline: 3px solid var(--sel-ring); outline-offset: 3px; }

/* --- 2026-11-13: раздел «Гайды» */
.guide-card { text-decoration: none; color: inherit; }
.guide-card h3 { color: var(--text, inherit); }
.guide-back { display: inline-block; margin-bottom: 10px; font-size: .95rem; color: var(--muted); text-decoration: none; }
.guide-back:hover { color: var(--gold, inherit); }
.guide { max-width: 760px; display: grid; gap: 12px; }
.guide h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin: 26px 0 2px; }
.guide p { margin: 0; line-height: 1.65; }
.guide ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; line-height: 1.6; }
.guide strong { color: var(--text, inherit); }
.guide h3 { font-size: 1.1rem; margin: 14px 0 0; }
.guide h3 strong { color: var(--gold, inherit); }

/* 2026-11-13: с пунктом «Гайды» шапка у вошедшего админа не помещалась — чуть плотнее */
@media (min-width: 1001px) {
  .top-inner { gap: 14px; }
  .nav { gap: 2px; margin-left: 4px; }
  .nav a { padding: 8px 10px; font-size: .9rem; }
}

/* 2026-11-14: «Скачать» — общий установщик */
.dl-main { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; padding: 30px; align-items: center; position: relative; overflow: hidden; }
.dl-main::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--gold-3), var(--gold-2), var(--gold-3)); opacity: .8; }
.dl-main h3 { font-size: 1.9rem; margin: 8px 0 8px; }
.dl-main p { color: var(--muted); margin: 0; }
.dl-main-act { display: grid; gap: 12px; }
.dl-main-act .small { font-size: .85rem; line-height: 1.5; }
.dl-h { margin: 40px 0 16px; }
.dl-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.dl-info h3 { margin: 0 0 12px; }
.dl-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; color: var(--muted); line-height: 1.55; }
@media (max-width: 900px) { .dl-main, .dl-info { grid-template-columns: minmax(0, 1fr); } .dl-main { padding: 22px 18px; } }
.dl-main > *, .dl-info > * { min-width: 0; }

.dl-info { grid-template-columns: minmax(0, 1fr); }

.dl-main-act .btn.torrent {
  color: #ffffff;
  background: linear-gradient(110deg, #145331, #217447, #145331);
  border-color: #277c4d;
  box-shadow: 0 5px 16px rgba(49, 114, 65, .24);
}
.dl-main-act .btn.torrent:hover {
  color: #ffffff;
  box-shadow: 0 9px 22px rgba(49, 114, 65, .33);
}
