/* ================= TOKENS (те же, что и на основном сайте) ================= */
:root{
  --black:#0A0A0B;
  --surface:#141315;
  --surface-2:#1C1B1E;
  --border:#2B2830;
  --border-soft:#221F24;
  --red:#E8342A;
  --red-hi:#FF5A45;
  --red-dim:#7A1A14;
  --red-glow:rgba(232,52,42,.35);
  --white:#F4F2ED;
  --grey:#93909A;
  --grey-dim:#5B5760;

  --font-display:'Unbounded', sans-serif;
  --font-body:'Inter', sans-serif;
  --font-mono:'JetBrains Mono', monospace;

  --container:1200px;
  --forum-container:1440px;
  --r-sm:3px;
  --r-md:14px;
  --r-lg:22px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background-color:var(--black);
  color:var(--white);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
.bg-orbs{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
  background:
    radial-gradient(560px circle at 12% 8%,  rgba(232,52,42,.20), transparent 65%),
    radial-gradient(480px circle at 88% 24%, rgba(232,52,42,.15), transparent 60%),
    radial-gradient(640px circle at 50% 96%, rgba(232,52,42,.13), transparent 65%),
    radial-gradient(420px circle at 22% 62%, rgba(232,52,42,.09), transparent 60%),
    radial-gradient(380px circle at 78% 78%, rgba(232,52,42,.10), transparent 60%);
}
.nav-wrap, main, .footer-mini{ position:relative; z-index:1; }
img,svg{ display:block; max-width:100%; }

/* Атрибут hidden должен побеждать любые display-правила ниже.
   Без этого .file-card{display:flex} и .btn{display:inline-flex}
   игнорируют hidden, и скрытые блоки/кнопки всё равно видны. */
[hidden]{ display:none !important; }
a{ color:inherit; text-decoration:none; }
ul,ol{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4,p{ margin:0; }
button{ font:inherit; color:inherit; background:none; border:0; cursor:pointer; }

::selection{ background:var(--red); color:var(--white); }
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background:var(--black); }
::-webkit-scrollbar-thumb{ background:var(--border); }
::-webkit-scrollbar-thumb:hover{ background:var(--red-dim); }

:focus-visible{ outline:2px solid var(--red); outline-offset:3px; }

.container{ width:100%; max-width:var(--container); margin:0 auto; padding:0 28px; }

/* generic icon sizing (matches main site's .icon convention) */
.icon{ stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }

/* ================= BUTTONS ================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-family:var(--font-body);
  font-weight:600;
  font-size:.95rem;
  padding:.85rem 1.5rem;
  border-radius:var(--r-sm);
  border:1px solid transparent;
  transition:transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space:nowrap;
}
.btn-primary{ background:var(--red); color:#120503; }
.btn-primary:hover{ background:var(--red-hi); transform:translateY(-1px); box-shadow:0 8px 24px -8px var(--red-glow); }
.btn-ghost{ background:transparent; color:var(--white); border-color:var(--border); }
.btn-ghost:hover{ border-color:var(--red); color:var(--red-hi); }
.btn-lg{ padding:1rem 1.8rem; font-size:1rem; }
.btn-round{ border-radius:999px; }
.btn-sm{ padding:.6rem 1.1rem; font-size:.85rem; }
.btn:disabled{ opacity:.5; cursor:not-allowed; transform:none !important; }

.avatar-square{
  width:38px; height:38px;
  display:grid; place-items:center;
  background:var(--red);
  color:var(--black);
  font-family:var(--font-display);
  font-weight:800;
  font-size:1rem;
  border-radius:10px;
  flex-shrink:0;
}

/* ================= REVEAL ================= */
.reveal{ opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s ease; }
.reveal.in-view{ opacity:1; transform:translateY(0); }

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
}

/* ================= NAV (floating capsule — как на основном сайте) ================= */
.nav-wrap{ position:sticky; top:0; z-index:100; padding:18px 20px 0; }
.nav{
  max-width:1120px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  gap:18px;
  background:rgba(17,16,18,.72);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border:1px solid var(--border);
  border-radius:999px;
  padding:8px 8px 8px 18px;
  box-shadow:0 18px 44px -22px rgba(0,0,0,.75);
}
.logo{ display:flex; align-items:center; gap:9px; flex-shrink:0; }
.logo-mark{
  width:30px; height:30px;
  background:var(--red);
  color:var(--black);
  display:grid; place-items:center;
  font-family:var(--font-display);
  font-weight:800;
  font-size:.92rem;
  border-radius:8px;
  flex-shrink:0;
}
.logo-word{
  font-family:var(--font-display);
  font-weight:800;
  font-size:1rem;
  letter-spacing:.02em;
  color:var(--white);
}
.beta-badge{
  font-family:var(--font-mono);
  font-size:.62rem;
  color:var(--grey);
  border:1px solid var(--border);
  padding:2px 7px 3px;
  border-radius:999px;
  letter-spacing:.03em;
  margin-left:2px;
}

.nav-links{ display:flex; align-items:center; gap:2px; }
.nav-links a{
  font-size:.87rem;
  color:var(--grey);
  padding:9px 15px;
  border-radius:999px;
  transition:background-color .15s ease, color .15s ease;
}
.nav-links a:hover, .nav-links a.active{ color:var(--white); background:rgba(255,255,255,.05); }

.nav-actions{ display:flex; align-items:center; gap:4px; flex-shrink:0; }
.nav-login{ font-size:.87rem; color:var(--grey); padding:9px 14px; border-radius:999px; }
.nav-login:hover{ color:var(--white); }
.btn-pill{ border-radius:999px; padding:.65rem 1.3rem; font-size:.87rem; }

.nav-toggle{
  display:none;
  width:38px; height:38px;
  border:1px solid var(--border);
  border-radius:50%;
  align-items:center; justify-content:center;
  flex-direction:column; gap:4px;
  flex-shrink:0;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after{
  content:""; display:block; width:15px; height:1.5px; background:var(--white);
  transition:transform .2s ease, opacity .2s ease;
}
body.nav-open .nav-toggle::before{ transform:translateY(5.5px) rotate(45deg); }
body.nav-open .nav-toggle span{ opacity:0; }
body.nav-open .nav-toggle::after{ transform:translateY(-5.5px) rotate(-45deg); }

.nav-dropdown{
  display:none;
  flex-direction:column;
  gap:2px;
  max-width:1120px; margin:10px auto 0;
  background:rgba(17,16,18,.96);
  backdrop-filter:blur(18px);
  border:1px solid var(--border);
  border-radius:22px;
  padding:12px;
}
.nav-dropdown a{ padding:13px 14px; border-radius:14px; color:var(--grey); font-size:.95rem; }
.nav-dropdown a:hover, .nav-dropdown a.active{ background:rgba(255,255,255,.05); color:var(--white); }
.nav-dropdown-actions{ display:flex; justify-content:center; gap:10px; margin-top:8px; padding-top:12px; border-top:1px solid var(--border-soft); }
.nav-dropdown-actions .btn{ flex:1; justify-content:center; }
body.nav-open .nav-dropdown{ display:flex; }

@media (max-width: 880px){
  .nav-links{ display:none; }
  .nav-login{ display:none; }
  .nav-toggle{ display:flex; }
  .nav{ padding:8px 8px 8px 16px; }
}

/* ================= FORUM LAYOUT ================= */
/* сайдбар специально левее, чем в профиле: контейнер шире и без лишнего
   центрирования сайдбара — он прижат к левому краю широкой колонки */
.forum-main{ padding:130px 0 100px; }
.forum-wrap{ max-width:var(--forum-container); margin:0 auto; padding:0 24px; }
.forum-layout{
  display:grid;
  grid-template-columns:236px 1fr;
  gap:28px;
  align-items:start;
}

.forum-sidebar-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  padding:16px;
  position:sticky;
  top:110px;
}
.forum-actions{ display:flex; flex-direction:column; gap:7px; margin-bottom:10px; }
.forum-actions .btn{
  width:100%;
  justify-content:flex-start;
  gap:8px;
  padding:.5rem .85rem;
  font-size:.8rem;
  font-weight:600;
}
.forum-actions .btn svg{ width:15px; height:15px; flex-shrink:0; }

.forum-nav-label{
  font-family:var(--font-mono);
  font-size:.64rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--grey-dim);
  padding:16px 10px 6px;
}
.forum-nav-group:first-of-type .forum-nav-label{ padding-top:12px; }
.forum-nav-item{
  display:flex; align-items:center; gap:10px;
  padding:8px 10px;
  border-radius:10px;
  color:var(--grey);
  font-size:.86rem;
}
.forum-nav-item svg{ width:16px; height:16px; flex-shrink:0; }
.forum-nav-item:hover{ background:rgba(255,255,255,.05); color:var(--white); }
.forum-nav-item.active{ background:var(--red); color:#120503; }
.forum-nav-item.active:hover{ background:var(--red-hi); }

.forum-content{ min-width:0; }

/* ---- section header (иконка + название + описание, + CTA справа) ---- */
.section-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:20px; flex-wrap:wrap;
  padding-bottom:24px; margin-bottom:26px;
  border-bottom:1px solid var(--border-soft);
}
.section-header-main{ display:flex; align-items:flex-start; gap:16px; min-width:0; }
.section-icon{
  width:52px; height:52px; flex-shrink:0;
  border-radius:14px;
  background:var(--surface);
  border:1px solid var(--border);
  display:grid; place-items:center;
  color:var(--red);
}
.section-icon svg{ width:24px; height:24px; }
.section-title{
  font-family:var(--font-display); font-weight:800; text-transform:uppercase;
  font-size:1.4rem; letter-spacing:-.01em; margin-bottom:6px;
}
.section-desc{ color:var(--grey); font-size:.92rem; max-width:640px; }

/* ---- post list ---- */
.post-list{
  display:flex; flex-direction:column; gap:1px;
  background:var(--border-soft);
  border:1px solid var(--border-soft);
  border-radius:var(--r-lg);
  overflow:hidden;
}
.post-card{
  display:flex; align-items:center; gap:16px;
  padding:18px 22px;
  background:var(--black);
  transition:background-color .15s ease;
}
.post-card:hover{ background:var(--surface); }
.post-card-body{ flex:1; min-width:0; }
.post-title{ font-weight:600; font-size:.96rem; color:var(--white); margin-bottom:6px; }
.post-meta{ display:flex; gap:10px; align-items:center; font-size:.8rem; color:var(--grey-dim); font-family:var(--font-mono); flex-wrap:wrap; }
.post-tag{ font-size:.7rem; padding:3px 9px; border-radius:999px; border:1px solid var(--border); color:var(--grey); font-family:var(--font-mono); }
.post-arrow{ color:var(--grey-dim); flex-shrink:0; width:16px; height:16px; transition:color .15s ease, transform .15s ease; }
.post-card:hover .post-arrow{ color:var(--red-hi); transform:translateX(2px); }

/* ---- post grid (статьи — карточками по три в ряд) ---- */
.post-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:20px;
}
.post-tile{
  display:flex; flex-direction:column;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  overflow:hidden;
  transition:border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.post-tile:hover{
  border-color:var(--red-dim);
  transform:translateY(-3px);
  box-shadow:0 18px 40px -22px rgba(0,0,0,.85);
}
.post-cover{
  aspect-ratio:16/9;
  display:grid; place-items:center;
  background:
    radial-gradient(120% 120% at 30% 15%, rgba(232,52,42,.28), transparent 60%),
    linear-gradient(150deg, var(--surface-2), #101013);
  border-bottom:1px solid var(--border-soft);
  position:relative;
  overflow:hidden;
}
.post-cover::after{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(to top, rgba(10,10,11,.55), transparent 55%);
}
.post-cover-icon{
  width:40px; height:40px;
  color:var(--red);
  opacity:.55;
  position:relative; z-index:1;
}
.post-tile:hover .post-cover-icon{ opacity:.8; }

.post-tile-body{ padding:16px 18px 18px; display:flex; flex-direction:column; flex:1; }
.post-cat{
  display:inline-flex; align-items:center; gap:6px;
  font-family:var(--font-mono); font-size:.72rem; color:var(--red-hi);
  margin-bottom:10px;
}
.post-cat-icon{ width:13px; height:13px; flex-shrink:0; }
.post-tile-title{
  font-size:.98rem; font-weight:700; color:var(--white); line-height:1.35;
  margin-bottom:8px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.post-excerpt{
  font-size:.86rem; color:var(--grey); line-height:1.5;
  margin-bottom:16px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.post-tile-meta{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-top:auto;
  padding-top:12px;
  border-top:1px solid var(--border-soft);
  font-size:.78rem; color:var(--grey-dim);
}
.post-views{ display:inline-flex; align-items:center; gap:6px; }
.post-eye{ width:14px; height:14px; flex-shrink:0; }

@media (max-width: 1180px){
  .post-grid{ grid-template-columns:repeat(2, 1fr); }
}

/* ---- tool "coming soon" placeholder ---- */
.tool-placeholder{
  display:flex; align-items:center; gap:16px;
  background:var(--surface);
  border:1px dashed var(--border);
  border-radius:var(--r-lg);
  padding:24px 26px;
  margin-bottom:26px;
}
.tool-placeholder svg{ width:26px; height:26px; color:var(--red-hi); flex-shrink:0; }
.tool-placeholder strong{
  display:block; font-family:var(--font-display); font-weight:700; text-transform:uppercase;
  font-size:.86rem; letter-spacing:.01em; color:var(--white); margin-bottom:4px;
}
.tool-placeholder span{ color:var(--grey); font-size:.87rem; }

/* ---- ask-a-question composer (help.html) ---- */
.ask-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  padding:24px 26px;
  margin-bottom:26px;
}
.ask-card h2{
  font-family:var(--font-display); font-weight:700; text-transform:uppercase;
  font-size:.95rem; letter-spacing:.01em; margin-bottom:16px;
}
.ask-status{ font-family:var(--font-mono); font-size:.82rem; color:var(--red-hi); margin-top:12px; min-height:18px; }

/* ---- chat mock (chat.html) ---- */
.chat-window{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  padding:22px;
  display:flex; flex-direction:column; gap:16px;
  margin-bottom:20px;
}
.chat-message{ display:flex; gap:12px; align-items:flex-start; }
.chat-avatar{
  width:34px; height:34px; border-radius:9px; flex-shrink:0;
  background:var(--surface-2); border:1px solid var(--border);
  display:grid; place-items:center;
  font-family:var(--font-display); font-weight:700; font-size:.8rem; color:var(--grey);
}
.chat-bubble-wrap{ min-width:0; }
.chat-author{ font-family:var(--font-mono); font-size:.72rem; color:var(--grey-dim); margin-bottom:5px; }
.chat-bubble{
  background:var(--surface-2); border:1px solid var(--border); border-radius:14px;
  padding:10px 14px; font-size:.88rem; color:var(--white); max-width:520px; display:inline-block;
}
.chat-input-bar{
  display:flex; gap:10px; align-items:center;
  padding:12px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg);
}
.chat-input-bar input{
  flex:1; background:var(--black); border:1px solid var(--border); border-radius:var(--r-md);
  padding:.75rem 1rem; color:var(--white); font-family:var(--font-body); font-size:.9rem;
}
.chat-note{ text-align:center; color:var(--grey-dim); font-size:.82rem; margin-top:10px; }

/* ---- generic form fields (used on new.html) ---- */
.field{ display:flex; flex-direction:column; gap:8px; margin-bottom:20px; }
.field label{ font-family:var(--font-mono); font-size:.78rem; color:var(--grey-dim); letter-spacing:.02em; }
.field input[type=text],
.field input[type=number],
.field input[type=email],
.field input[type=password],
.field input[type=url],
.field input[type=search],
.field select,
.field textarea{
  width:100%;
  background:var(--black);
  border:1px solid var(--border);
  border-radius:var(--r-md);
  padding:.85rem 1rem;
  color:var(--white);
  font-family:var(--font-body);
  font-size:.95rem;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus{ outline:none; border-color:var(--red); box-shadow:0 0 0 3px rgba(232,52,42,.15); }
.field textarea{ min-height:220px; resize:vertical; line-height:1.6; font-family:var(--font-body); }
.field select{
  appearance:none; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393909A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:16px;
  padding-right:40px;
}
.field-hint{ font-size:.8rem; color:var(--grey-dim); }
.field-divider{ border:0; border-top:1px solid var(--border-soft); margin:30px 0; }

.compose-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  padding:32px;
  max-width:760px;
}

.dropzone{
  border:1.5px dashed var(--border);
  border-radius:var(--r-lg);
  padding:28px;
  text-align:center;
  cursor:pointer;
  transition:border-color .15s ease, background-color .15s ease;
}
.dropzone:hover, .dropzone.drag{ border-color:var(--red); background:rgba(232,52,42,.05); }
.dropzone svg{ width:26px; height:26px; color:var(--grey-dim); margin:0 auto 10px; }
.dropzone-text{ color:var(--grey); font-size:.86rem; }
.dropzone-text b{ color:var(--red-hi); font-weight:600; }
.dropzone-sub{ color:var(--grey-dim); font-size:.78rem; margin-top:4px; }
.dropzone input[type=file]{ display:none; }

.thumb-grid{ display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.thumb{ position:relative; width:84px; height:84px; border-radius:10px; overflow:hidden; border:1px solid var(--border); flex-shrink:0; }
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.thumb-remove{
  position:absolute; top:4px; right:4px; width:20px; height:20px; border-radius:50%;
  background:rgba(10,10,11,.85); color:var(--white); display:grid; place-items:center;
}
.thumb-remove svg{ width:11px; height:11px; }

.cover-preview{ margin-top:14px; border-radius:var(--r-md); overflow:hidden; border:1px solid var(--border); aspect-ratio:16/6; position:relative; }
.cover-preview img{ width:100%; height:100%; object-fit:cover; display:block; }
.cover-preview .thumb-remove{ top:10px; right:10px; }

.file-dropzone{
  border:1.5px solid var(--red-dim);
  background:rgba(232,52,42,.06);
  border-radius:var(--r-lg);
  padding:26px;
  text-align:center;
}
.file-dropzone.drag{ border-color:var(--red); background:rgba(232,52,42,.12); }
.file-dropzone svg{ width:26px; height:26px; color:var(--red-hi); margin:0 auto 10px; }
.file-name{ margin-top:10px; font-family:var(--font-mono); font-size:.82rem; color:var(--white); }

.download-block{ display:none; margin-bottom:20px; }
.download-block.show{ display:block; }
.download-block-label{ font-family:var(--font-mono); font-size:.78rem; color:var(--red-hi); letter-spacing:.02em; margin-bottom:8px; display:block; }

.form-note{ font-size:.82rem; color:var(--grey-dim); margin:6px 0 22px; max-width:560px; }
.form-status{ font-family:var(--font-mono); font-size:.85rem; color:var(--red-hi); margin-top:14px; min-height:18px; }

@media (max-width: 960px){
  .forum-layout{ grid-template-columns:1fr; }
  .forum-sidebar-card{ position:static; }
}
@media (max-width: 640px){
  .section-header{ flex-direction:column; align-items:flex-start; }
  .compose-card{ padding:22px; }
  .post-grid{ grid-template-columns:1fr; }
}

/* ================= FOOTER (одинаковый на всех страницах) ================= */
.footer{ border-top:1px solid var(--border-soft); padding:72px 0 0; margin-top:60px; position:relative; z-index:1; }
.footer-grid{
  display:grid; grid-template-columns:1.4fr repeat(3, 1fr);
  gap:40px; padding-bottom:56px;
}
.footer-brand .logo{ display:flex; align-items:center; gap:9px; }
.footer-brand p{ color:var(--grey); font-size:.9rem; max-width:280px; margin-top:16px; }
.footer-col h4{
  font-family:var(--font-mono); font-size:.76rem; color:var(--grey-dim);
  letter-spacing:.03em; margin-bottom:18px; text-transform:lowercase;
}
.footer-col ul{ display:flex; flex-direction:column; gap:12px; list-style:none; margin:0; padding:0; }
.footer-col a{ font-size:.92rem; color:var(--grey); transition:color .15s ease; }
.footer-col a:hover{ color:var(--red-hi); }
.footer-bottom{
  border-top:1px solid var(--border-soft); padding:22px 0;
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:12px;
}
.footer-bottom p{ font-size:.82rem; color:var(--grey-dim); }
.footer-status{ display:flex; align-items:center; gap:8px; font-family:var(--font-mono); font-size:.78rem; color:var(--grey-dim); }
.footer-status .term-dot{ width:6px; height:6px; border-radius:50%; background:var(--red); box-shadow:0 0 8px 1px var(--red-glow); }
@media (max-width: 900px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width: 560px){ .footer-grid{ grid-template-columns:1fr; } }

/* ================= BREADCRUMBS ================= */
.crumbs{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  font-family:var(--font-mono); font-size:.78rem; color:var(--grey-dim);
  margin-bottom:18px;
}
.crumbs a{ color:var(--grey); transition:color .15s ease; }
.crumbs a:hover{ color:var(--red-hi); }
.crumb-sep{ color:var(--grey-dim); }
.crumb-current{ color:var(--white); }

/* ================= STATES ================= */
.grid-state{
  grid-column:1 / -1;
  padding:32px 22px;
  text-align:center;
  color:var(--grey);
  font-size:.9rem;
  background:var(--surface);
  border:1px dashed var(--border);
  border-radius:var(--r-lg);
}

/* обложка-картинка в плитке */
.post-cover img{ width:100%; height:100%; object-fit:cover; display:block; position:relative; z-index:1; }

/* ================= ASK FORM (вопросы) ================= */
.ask-card .field textarea{ min-height:130px; }
.ask-toolbar{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.ask-toolbar .btn-primary{ margin-left:auto; }
.ask-file-name{ font-family:var(--font-mono); font-size:.78rem; color:var(--grey-dim); }
.ask-thumb{ margin-top:14px; }
.ask-thumb img{
  max-width:220px; border-radius:var(--r-md); border:1px solid var(--border);
}
.ask-status a{ color:var(--red-hi); font-weight:600; }

/* ================= POST PAGE ================= */
.post-banner{
  background:rgba(232,52,42,.1);
  border:1px solid var(--red-dim);
  border-radius:var(--r-md);
  padding:12px 16px;
  font-size:.87rem;
  color:var(--red-hi);
  margin-bottom:20px;
}

.post-page-title{
  font-family:var(--font-display); font-weight:800;
  font-size:clamp(1.4rem, 2.6vw, 1.9rem);
  line-height:1.22; letter-spacing:-.01em;
  color:var(--white);
  margin-bottom:14px;
  max-width:840px;
}
.post-page-meta{
  display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  font-size:.84rem; color:var(--grey-dim);
  padding-bottom:22px; margin-bottom:24px;
  border-bottom:1px solid var(--border-soft);
}
.post-author{ color:var(--grey); }
.post-page-meta .post-views{ margin-left:auto; }

.post-page-cover{
  width:100%;
  border-radius:var(--r-lg);
  border:1px solid var(--border);
  margin-bottom:26px;
  display:block;
}

/* ---- файл для разделов «Скачать» ---- */
.file-card{
  display:flex; align-items:center; gap:18px; flex-wrap:wrap;
  background:
    linear-gradient(150deg, rgba(232,52,42,.16), rgba(122,26,20,.04) 65%),
    var(--surface-2);
  border:1px solid var(--red-dim);
  border-radius:var(--r-lg);
  padding:20px 24px;
  margin-bottom:28px;
}
.file-card-shield{
  display:flex; align-items:center; gap:8px;
  font-family:var(--font-mono); font-size:.76rem; color:var(--red-hi);
  border:1px solid var(--red-dim);
  border-radius:999px;
  padding:6px 12px;
  flex-shrink:0;
}
.file-card-shield svg{ width:15px; height:15px; }
.file-card-main{ min-width:0; flex:1; }
.file-card-name{ font-weight:600; color:var(--white); font-size:.95rem; word-break:break-all; }
.file-card-sub{ font-size:.8rem; color:var(--grey-dim); margin-top:2px; }
.file-card .btn svg{ width:16px; height:16px; }

/* ---- тело статьи ---- */
.post-body{ color:var(--white); font-size:1rem; line-height:1.75; }
.post-body p{ margin-bottom:18px; color:#DAD7D2; }
.post-body h2{
  font-family:var(--font-display); font-weight:700; font-size:1.25rem;
  color:var(--white); margin:34px 0 14px; letter-spacing:-.01em;
}
.post-body h3{ font-family:var(--font-display); font-weight:700; font-size:1.08rem; color:var(--white); margin:28px 0 12px; }
.post-body h4, .post-body h5{ font-weight:700; font-size:.98rem; color:var(--white); margin:22px 0 10px; }
.post-body ul{ list-style:none; margin:0 0 18px; padding:0; }
.post-body li{ position:relative; padding-left:18px; margin-bottom:8px; color:#DAD7D2; }
.post-body li::before{
  content:""; position:absolute; left:0; top:.62em;
  width:6px; height:6px; background:var(--red);
}
.post-body a{ color:var(--red-hi); text-decoration:underline; text-underline-offset:2px; }
.post-body a:hover{ color:var(--red); }
.post-body strong{ color:var(--white); font-weight:700; }
.post-body code{
  font-family:var(--font-mono); font-size:.86em;
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:6px; padding:2px 6px; color:var(--red-hi);
}
.post-body pre{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-md); padding:18px 20px;
  overflow-x:auto; margin:0 0 20px;
}
.post-body pre code{
  background:none; border:0; padding:0; color:var(--white);
  font-size:.86rem; line-height:1.6;
}
.post-body del{ color:var(--grey-dim); }

.post-gallery{ display:flex; flex-direction:column; gap:14px; margin-top:8px; }
.post-gallery img{ width:100%; border-radius:var(--r-md); border:1px solid var(--border); }

.post-divider{ border:0; border-top:1px solid var(--border-soft); margin:34px 0 22px; }

.post-actions{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.post-actions .btn svg{ width:16px; height:16px; }
#like-btn.liked{ border-color:var(--red); color:var(--red-hi); background:rgba(232,52,42,.1); }
#like-btn.liked svg{ fill:var(--red); stroke:var(--red); }
.action-status{ font-family:var(--font-mono); font-size:.8rem; color:var(--red-hi); }

/* ---- ответы ---- */
.answers{ margin-top:44px; }
.answers-title{
  font-family:var(--font-display); font-weight:700; text-transform:uppercase;
  font-size:1rem; letter-spacing:.01em; color:var(--white); margin-bottom:20px;
}
.answer{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  padding:18px 20px;
  margin-bottom:14px;
}
.answer-head{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.answer-author{ font-size:.88rem; font-weight:600; color:var(--white); }
.answer-age{ font-family:var(--font-mono); font-size:.75rem; color:var(--grey-dim); margin-left:auto; }
.answer-body{ color:#DAD7D2; font-size:.93rem; line-height:1.65; }
.answer-body p{ margin-bottom:10px; }
.answer-body p:last-child{ margin-bottom:0; }
.answer-body code{
  font-family:var(--font-mono); font-size:.86em;
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:6px; padding:2px 6px; color:var(--red-hi);
}
.answer-body pre{
  background:var(--black); border:1px solid var(--border);
  border-radius:var(--r-md); padding:14px 16px; overflow-x:auto; margin:0 0 12px;
}
.answer-body pre code{ background:none; border:0; padding:0; color:var(--white); }

.answer-form{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  padding:22px 24px;
  margin-top:22px;
}
.answer-form .field{ margin-bottom:14px; }
.answer-form textarea{ min-height:110px; }

/* ---- прогресс загрузки файла ---- */
.upload-progress{
  margin-top:14px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-md);
  padding:14px 16px;
}
.upload-progress-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  font-family:var(--font-mono); font-size:.8rem; color:var(--white);
  margin-bottom:10px;
}
.upload-progress-head span:first-child{
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.upload-bar{
  height:6px; border-radius:999px;
  background:var(--black);
  border:1px solid var(--border);
  overflow:hidden;
}
.upload-bar-fill{
  height:100%; width:0%;
  background:var(--red);
  border-radius:999px;
  transition:width .2s ease;
}
.upload-progress-note{ font-size:.8rem; color:var(--grey); margin-top:9px; }
.upload-progress.done .upload-bar-fill{ background:#3FBF6A; }
.upload-progress.done .upload-progress-note{ color:#3FBF6A; }
.upload-progress.failed .upload-bar-fill{ background:var(--red-dim); }
.upload-progress.failed .upload-progress-note{ color:var(--red-hi); }

/* ================= PROFILE MENU В ШАПКЕ ================= */
.profile-menu-wrap{ position:relative; }
.profile-menu{
  position:absolute; top:calc(100% + 12px); right:0;
  width:284px;
  background:rgba(17,16,18,.98);
  backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  border:1px solid var(--border); border-radius:18px; padding:8px;
  box-shadow:0 24px 60px -20px rgba(0,0,0,.8);
  opacity:0; visibility:hidden; transform:translateY(-8px);
  transition:opacity .18s ease, transform .18s ease, visibility .18s;
  z-index:200;
}
.profile-menu.open{ opacity:1; visibility:visible; transform:translateY(0); }
.menu-head{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:12px; }
.menu-head:hover{ background:rgba(255,255,255,.05); }
.menu-head .logo-mark{ width:36px; height:36px; font-size:1rem; border-radius:9px; }
.menu-head-text{ display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.menu-nick{ font-size:.92rem; font-weight:600; color:var(--white); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.menu-handle{ font-family:var(--font-mono); font-size:.72rem; color:var(--grey-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.menu-chevron{ width:16px; height:16px; stroke:var(--grey-dim); fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.menu-wallet{ display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:12px; color:var(--white); font-size:.9rem; font-weight:500; }
.menu-wallet:hover{ background:rgba(255,255,255,.05); }
.menu-wallet svg{ width:18px; height:18px; stroke:var(--grey); fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.menu-value{ margin-left:auto; color:var(--grey); font-size:.83rem; font-family:var(--font-mono); }
.menu-label{ font-family:var(--font-mono); font-size:.64rem; letter-spacing:.06em; text-transform:uppercase; color:var(--grey-dim); padding:12px 12px 4px; }
.menu-item{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:12px; color:var(--grey); font-size:.87rem; }
.menu-item:hover{ background:rgba(255,255,255,.05); color:var(--white); }
.menu-item svg{ width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.menu-divider{ height:1px; background:var(--border-soft); margin:6px 4px; }
.menu-logout{ color:var(--red-hi); }
.menu-logout:hover{ background:rgba(232,52,42,.12); color:var(--red-hi); }

/* аватар: сдвигаем чуть левее от края капсулы и поддерживаем картинку */
.nav-actions{ margin-right:7px; }
.avatar-square{ overflow:hidden; padding:0; border:0; }
.avatar-square img{ width:100%; height:100%; object-fit:cover; display:block; }

/* логотип: тот же знак, что и на вкладке браузера */
.logo-mark{ background:transparent !important; padding:0; overflow:hidden; }
.logo-mark svg{ width:100%; height:100%; display:block; }


/* числовые поля: убираем стрелки-крутилки, из-за них поле выглядело «дефолтным» */
input[type=number]{ -moz-appearance:textfield; appearance:textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }

/* аватар пользователя в шапке выпадающего меню */
.menu-avatar{
  width:36px; height:36px; border-radius:9px; flex-shrink:0; overflow:hidden;
  background:var(--red); color:var(--black);
  display:grid; place-items:center;
  font-family:var(--font-display); font-weight:800; font-size:1rem;
}
.menu-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }

/* аватар автора рядом с ником на странице поста */
.post-author-box{ display:inline-flex; align-items:center; gap:9px; }
.post-author-avatar{
  width:26px; height:26px; border-radius:8px; flex-shrink:0; overflow:hidden;
  background:var(--red); color:var(--black);
  display:grid; place-items:center;
  font-family:var(--font-display); font-weight:800; font-size:.72rem;
}
.post-author-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.answer-head .post-author-avatar{ width:30px; height:30px; font-size:.8rem; }

/* ================= МОДАЛЬНОЕ ОКНО ================= */
/* Раньше стили жили только в market.css, и на странице поста окно
   отрисовывалось прямо в потоке страницы — теперь они есть и здесь. */
.modal-back{
  position:fixed; inset:0; z-index:400;
  background:rgba(5,5,6,.82);
  backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px);
  display:grid; place-items:center; padding:24px;
}
.modal-box{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); padding:30px; width:100%; max-width:460px;
  box-shadow:0 30px 80px -30px rgba(0,0,0,.85);
}
.modal-box h2{
  font-family:var(--font-display); font-weight:800; font-size:1.15rem;
  color:var(--white); line-height:1.3; margin-bottom:12px;
}
.modal-box p{ color:var(--grey); font-size:.9rem; line-height:1.65; margin-bottom:16px; }
.modal-actions{ display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; margin-top:20px; }

/* ---- плашка PLUS ---- */
.plus-badge{
  display:inline-block; vertical-align:middle;
  font-family:var(--font-display); font-weight:800; font-size:.6rem; letter-spacing:.06em;
  padding:3px 9px; border-radius:999px; color:#0A0A0B;
  background:linear-gradient(100deg,#F5C542,#FF9E2C);
  box-shadow:0 0 16px -4px rgba(245,197,66,.6);
}
.plus-badge-lg{ font-size:.72rem; padding:5px 13px; margin-bottom:16px; }

.plus-modal{
  background:linear-gradient(160deg, rgba(245,197,66,.13), rgba(232,52,42,.05) 55%), var(--surface);
  border-color:rgba(245,197,66,.35);
}
.plus-modal-perks{ list-style:none; margin:0 0 18px; padding:0; display:flex; flex-direction:column; gap:9px; }
.plus-modal-perks li{
  position:relative; padding-left:20px; font-size:.87rem; color:var(--grey); line-height:1.5;
}
.plus-modal-perks li::before{
  content:""; position:absolute; left:0; top:.5em; width:7px; height:7px; border-radius:2px;
  background:linear-gradient(100deg,#F5C542,#FF9E2C);
}
.plus-modal-price{
  font-size:.85rem; color:var(--grey-dim);
  padding-top:14px; border-top:1px solid var(--border-soft);
}
.plus-modal-price b{ font-family:var(--font-display); font-weight:800; font-size:1.25rem; color:var(--white); }

/* ---- партнёрский блок в статье ---- */
.post-promo{
  position:relative; margin:26px 0; border-radius:var(--r-lg); overflow:hidden;
  border:1px solid var(--border); background:var(--surface-2); line-height:0;
}
.post-promo img{ width:100%; height:auto; display:block; }
.post-promo a{ display:block; }
.promo-tag{
  position:absolute; top:10px; right:10px; z-index:1;
  font-family:var(--font-mono); font-size:.62rem; letter-spacing:.06em; text-transform:uppercase;
  color:var(--grey); background:rgba(10,10,11,.82); backdrop-filter:blur(4px);
  border:1px solid var(--border); border-radius:999px; padding:3px 9px; line-height:1.4;
}

/* подсказка автору, если блок вставить не удалось */
.promo-note{
  margin:22px 0; padding:14px 18px;
  background:rgba(232,52,42,.08); border:1px dashed var(--red-dim);
  border-radius:var(--r-md); color:var(--red-hi); font-size:.85rem;
}

/* ---- картинка внутри статьи ---- */
.post-figure{ margin:24px 0; }
.post-figure img{
  width:100%; height:auto; display:block;
  border-radius:var(--r-lg); border:1px solid var(--border);
}
.post-figure figcaption{
  margin-top:9px; font-size:.8rem; color:var(--grey-dim); text-align:center; line-height:1.5;
}

/* ---- кнопка внутри статьи ---- */
.post-btn-wrap{ margin:22px 0; }
/* Селектор с .post-body: иначе общее правило «.post-body a» (оно
   специфичнее, чем просто .post-btn) красит текст кнопки в красный
   и добавляет подчёркивание. */
.post-body a.post-btn,
.post-btn{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--red); color:#120503; font-weight:700; font-size:.92rem;
  padding:.75rem 1.6rem; border-radius:999px;
  text-decoration:none; border:0;
  transition:background-color .15s ease, transform .15s ease;
}
.post-body a.post-btn:hover,
.post-btn:hover{
  background:var(--red-hi); color:#120503;
  text-decoration:none; transform:translateY(-1px);
}

/* если картинка не загрузилась (например, её срезал блокировщик),
   прячем блок целиком — иначе в воздухе висит одна подпись */
.post-promo.broken{ display:none; }

/* ================= ГАЛЕРЕЯ ПОСТА ================= */
.post-gallery{ margin-top:26px; }
.gal-stage{
  position:relative; background:var(--surface-2);
  border:1px solid var(--border); border-radius:var(--r-lg); overflow:hidden;
}
.gal-stage img{
  width:100%; max-height:520px; object-fit:contain; display:block;
  background:#0b0b0c; cursor:zoom-in;
}
.gal-arrow{
  position:absolute; top:50%; transform:translateY(-50%);
  width:40px; height:40px; border-radius:50%;
  background:rgba(10,10,11,.72); border:1px solid var(--border);
  color:var(--white); font-size:1.5rem; line-height:1;
  display:grid; place-items:center; backdrop-filter:blur(4px);
  transition:background-color .15s ease, border-color .15s ease;
}
.gal-arrow:hover{ background:var(--red); border-color:var(--red); color:#120503; }
.gal-arrow.prev{ left:12px; }
.gal-arrow.next{ right:12px; }
.gal-counter{
  position:absolute; right:12px; bottom:12px;
  font-family:var(--font-mono); font-size:.72rem; color:var(--grey);
  background:rgba(10,10,11,.72); border:1px solid var(--border);
  border-radius:999px; padding:3px 10px;
}
.gal-thumbs{
  display:flex; gap:8px; margin-top:10px; overflow-x:auto; padding-bottom:4px;
}
.gal-thumb{
  width:96px; height:64px; flex-shrink:0; padding:0; overflow:hidden;
  border:1px solid var(--border); border-radius:10px; background:var(--surface-2);
  opacity:.6; transition:opacity .15s ease, border-color .15s ease;
}
.gal-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.gal-thumb:hover{ opacity:1; }
.gal-thumb.active{ opacity:1; border-color:var(--red); }

/* картинки в тексте статьи тоже кликабельны */
.zoomable{ cursor:zoom-in; }

/* ================= ЛАЙТБОКС ================= */
.lightbox{
  position:fixed; inset:0; z-index:500;
  background:rgba(4,4,5,.94);
  display:grid; place-items:center; padding:40px 60px;
}
.lightbox img{
  max-width:100%; max-height:88vh; object-fit:contain; display:block;
  border-radius:8px; box-shadow:0 30px 80px -20px rgba(0,0,0,.9);
}
.lb-close{
  position:absolute; top:18px; right:22px; width:42px; height:42px; border-radius:50%;
  background:rgba(255,255,255,.06); border:1px solid var(--border);
  color:var(--white); font-size:1.6rem; line-height:1; display:grid; place-items:center;
}
.lb-close:hover{ background:var(--red); border-color:var(--red); color:#120503; }
.lb-arrow{
  position:absolute; top:50%; transform:translateY(-50%);
  width:52px; height:52px; border-radius:50%;
  background:rgba(255,255,255,.06); border:1px solid var(--border);
  color:var(--white); font-size:2rem; line-height:1; display:grid; place-items:center;
}
.lb-arrow:hover{ background:var(--red); border-color:var(--red); color:#120503; }
.lb-arrow.prev{ left:20px; }
.lb-arrow.next{ right:20px; }
.lb-counter{
  position:absolute; bottom:22px; left:50%; transform:translateX(-50%);
  font-family:var(--font-mono); font-size:.78rem; color:var(--grey);
}
@media (max-width: 640px){
  .lightbox{ padding:20px 12px; }
  .lb-arrow{ width:40px; height:40px; font-size:1.5rem; }
  .lb-arrow.prev{ left:6px; }
  .lb-arrow.next{ right:6px; }
  .gal-thumb{ width:74px; height:50px; }
}

/* ================= МОБИЛЬНАЯ АДАПТАЦИЯ ================= */
@media (max-width: 900px){
  /* сайдбар форума уходит наверх и становится горизонтальным */
  .forum-layout{ grid-template-columns:1fr; }
  .forum-layout aside{ position:static; }
  .forum-sidebar-card{ position:static; padding:16px; }
  .forum-nav-group{ margin-bottom:14px; }
  .forum-actions{ flex-direction:row; flex-wrap:wrap; }
  .forum-actions .btn{ flex:1; min-width:150px; }
}

@media (max-width: 720px){
  .forum-main{ padding:96px 0 30px; }
  .forum-wrap{ padding:0 16px; }
  .post-grid{ grid-template-columns:1fr; }
  .section-header{ flex-direction:column; align-items:flex-start; gap:14px; }
  .section-header .btn{ width:100%; justify-content:center; }

  /* меню разделов сворачиваем в прокручиваемую ленту */
  .forum-nav-group{ margin-bottom:10px; }
  .forum-sidebar-card .forum-nav-label{ margin-bottom:6px; }

  .post-page-title{ font-size:1.25rem; }
  .post-page-meta{ gap:10px; font-size:.8rem; }
  .post-page-meta .post-views{ margin-left:0; }
  .post-body{ font-size:.95rem; }
  .post-body pre{ padding:14px; font-size:.8rem; }

  .file-card{ flex-direction:column; align-items:flex-start; gap:12px; }
  .file-card .btn{ width:100%; justify-content:center; }

  .answers-title{ font-size:.9rem; }
  .answer{ padding:14px 16px; }

  .crumbs{ font-size:.72rem; }
  .ask-toolbar{ flex-direction:column; align-items:stretch; }
  .ask-toolbar .btn-primary{ margin-left:0; }

  /* формы и инструменты */
  .tool-grid{ grid-template-columns:1fr; }
  .tool-main, .tool-side{ padding:18px 16px; }
  .dm-chest{ gap:2px; padding:5px; }
  .swatch{ width:26px; height:26px; }
  .grad-preview{ font-size:1.1rem; padding:18px 12px; }
  .code-out{ flex-direction:column; align-items:stretch; gap:8px; }
  .code-out .btn{ width:100%; justify-content:center; }
  .mc-server-row{ flex-wrap:wrap; }
  .mc-players{ width:100%; text-align:left; align-items:flex-start; }

  .footer-grid{ grid-template-columns:1fr 1fr; gap:24px; }
  .footer{ padding:44px 0 0; }
}

@media (max-width: 480px){
  .footer-grid{ grid-template-columns:1fr; }
  .post-tile-title{ font-size:.9rem; }
  .verdict{ padding:16px; }
  .finding{ padding:12px 14px; }
  .gal-arrow{ width:32px; height:32px; font-size:1.2rem; }
}

/* на телефоне тап не наводится — убираем эффекты hover-подъёма */
@media (hover: none){
  .post-tile:hover, .market-card:hover, .srv-row:hover, .sell-card:hover{ transform:none; }
}

/* ---- материалы только для PLUS ---- */
.plus-badge{
  display:inline-block; vertical-align:middle;
  font-family:var(--font-display); font-weight:800; font-size:.6rem; letter-spacing:.06em;
  padding:3px 9px; border-radius:999px; color:#0A0A0B;
  background:linear-gradient(100deg,#F5C542,#FF9E2C);
  box-shadow:0 0 16px -4px rgba(245,197,66,.6);
}
.tile-plus{ font-size:.55rem; padding:2px 7px; margin-right:4px; }
.post-page-title .plus-badge{ margin-right:8px; }

.file-card.plus-file{
  border-color:rgba(245,197,66,.45);
  background:linear-gradient(150deg, rgba(245,197,66,.12), rgba(122,26,20,.03) 65%), var(--surface-2);
}
.file-card.plus-file .file-card-shield{ border-color:rgba(245,197,66,.5); color:#F5C542; }
.btn.plus-locked{
  border-color:rgba(245,197,66,.5); color:#F5C542;
}
.btn.plus-locked:hover{ background:rgba(245,197,66,.12); border-color:#F5C542; }

/* галочка доступа в форме публикации */
.plus-access{
  background:var(--surface); border:1px solid rgba(245,197,66,.35);
  border-left:2px solid #F5C542; border-radius:var(--r-lg);
  padding:18px 22px; margin-bottom:18px;
}
.plus-access b{ color:var(--white); }

/* ---- поиск и фильтры ленты ---- */
.feed-tools{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:22px; }
.feed-search{ position:relative; flex:1; min-width:220px; }
.feed-search input{
  width:100%; background:var(--surface); border:1px solid var(--border);
  border-radius:999px; padding:.7rem 1.1rem .7rem 2.7rem;
  color:var(--white); font-family:var(--font-body); font-size:.9rem;
}
.feed-search input:focus{ outline:none; border-color:var(--red); box-shadow:0 0 0 3px rgba(232,52,42,.15); }
.feed-search .icon{
  position:absolute; left:14px; top:50%; transform:translateY(-50%);
  width:16px; height:16px; color:var(--grey-dim);
}
.feed-filters{ display:flex; gap:7px; flex-wrap:wrap; }
.chip{
  padding:.45rem 1rem; border-radius:999px; border:1px solid var(--border);
  color:var(--grey); font-size:.83rem; background:transparent;
  transition:background-color .15s, border-color .15s, color .15s;
}
.chip:hover{ color:var(--white); border-color:var(--grey-dim); }
.chip.active{ background:var(--red); border-color:var(--red); color:#120503; }
.access-chip[data-access="plus"].active{
  background:linear-gradient(100deg,#F5C542,#FF9E2C); border-color:#F5C542; color:#0A0A0B;
}
.feed-more{ display:flex; justify-content:center; margin-top:22px; }

/* ---- видео в статье ---- */
.post-video{
  position:relative; margin:26px 0; border-radius:var(--r-lg); overflow:hidden;
  border:1px solid var(--border); background:#000; aspect-ratio:16/9;
}
.post-video iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }

@media (max-width: 720px){
  .feed-tools{ flex-direction:column; align-items:stretch; }
  .feed-filters{ overflow-x:auto; flex-wrap:nowrap; padding-bottom:4px; }
  .feed-filters .chip{ flex-shrink:0; }
}

/* удаление своего комментария */
.answer{ position:relative; }
.answer-del{
  position:absolute; top:10px; right:10px; width:24px; height:24px; border-radius:50%;
  background:var(--surface-2); border:1px solid var(--border); color:var(--grey-dim);
  font-size:.9rem; line-height:1; display:grid; place-items:center;
}
.answer-del:hover{ border-color:var(--red); color:var(--red-hi); }

/* варианты файла с версиями */
.file-variants{ display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.variant-row{
  display:flex; align-items:flex-start; gap:12px;
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:var(--r-md); padding:12px 14px;
}
.variant-file{ min-width:150px; flex-shrink:0; }
.variant-file b{ display:block; font-size:.86rem; color:var(--white); word-break:break-all; }
.variant-file span{ font-family:var(--font-mono); font-size:.72rem; color:var(--grey-dim); }
.variant-fields{ display:flex; gap:8px; flex:1; flex-wrap:wrap; }
.variant-fields label{
  display:flex; flex-direction:column; gap:4px; flex:1; min-width:92px;
  font-family:var(--font-mono); font-size:.68rem; color:var(--grey-dim);
}
.variant-fields input{
  background:var(--black); border:1px solid var(--border); border-radius:8px;
  padding:.45rem .6rem; color:var(--white); font-size:.84rem; width:100%;
}
.variant-fields input:focus{ outline:none; border-color:var(--red); }
.variant-del{
  width:26px; height:26px; flex-shrink:0; border-radius:50%;
  background:transparent; border:1px solid var(--border); color:var(--grey-dim);
  font-size:.9rem; line-height:1; display:grid; place-items:center;
}
.variant-del:hover{ border-color:var(--red); color:var(--red-hi); }
.variants-note{ font-size:.8rem; color:#E0B341; margin-top:8px; line-height:1.5; }

/* список файлов на странице публикации */
.file-list{ display:flex; flex-direction:column; gap:10px; margin:18px 0; }
.file-variant{
  display:flex; align-items:center; gap:14px;
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:var(--r-md); padding:13px 16px;
}
.file-variant-main{ flex:1; min-width:0; }
.file-variant-main b{ display:block; font-size:.9rem; color:var(--white); word-break:break-all; }
.file-variant-meta{ font-family:var(--font-mono); font-size:.72rem; color:var(--grey-dim); margin-top:3px; }
.file-variant .btn{ flex-shrink:0; }
@media (max-width: 620px){
  .variant-row{ flex-direction:column; }
  .file-variant{ flex-direction:column; align-items:stretch; }
  .file-variant .btn{ width:100%; justify-content:center; }
}

/* черновики */
.draft-row{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:14px 0; }
.draft-note{ font-family:var(--font-mono); font-size:.76rem; color:var(--grey-dim); }
.draft-pill{
  font-family:var(--font-mono); font-size:.66rem; padding:2px 8px;
  border-radius:999px; border:1px solid var(--border); color:var(--grey-dim);
}

/* ответы на комментарии */
.answer.is-reply{
  margin-left:34px; border-left:2px solid var(--red-dim);
  background:linear-gradient(90deg, rgba(232,52,42,.05), transparent 40%), var(--surface);
}
.answer-to{
  display:inline-block; font-family:var(--font-mono); font-size:.66rem;
  color:var(--grey-dim); background:var(--black); border:1px solid var(--border);
  border-radius:999px; padding:2px 8px; margin-right:8px;
}
.answer-reply-btn{
  position:absolute; top:12px; right:42px;
  background:none; border:0; cursor:pointer; padding:2px 4px;
  font-family:var(--font-mono); font-size:.68rem; color:var(--grey-dim);
}
.answer-reply-btn:hover{ color:var(--red-hi); }

.reply-bar{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--surface-2); border:1px solid var(--red-dim);
  border-radius:var(--r-md); padding:9px 14px; margin-bottom:10px;
}
.reply-bar span{ font-size:.83rem; color:var(--white); }
.reply-bar button{
  background:none; border:0; cursor:pointer;
  font-family:var(--font-mono); font-size:.72rem; color:var(--red-hi);
}
/* подсветка комментария, на который пришли по ссылке из уведомления */
.answer:target{ box-shadow:0 0 0 2px var(--red); }

@media (max-width: 620px){
  .answer.is-reply{ margin-left:16px; }
  .answer-reply-btn{ right:38px; font-size:.64rem; }
}

/* ---- панель форматирования ---- */
.editor-bar{
  display:flex; align-items:center; gap:4px; flex-wrap:wrap;
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:var(--r-md) var(--r-md) 0 0; border-bottom:0;
  padding:7px 9px;
}
.ed-btn{
  min-width:30px; height:30px; padding:0 8px; border-radius:7px;
  border:1px solid transparent; background:transparent; color:var(--grey);
  font-size:.85rem; cursor:pointer; display:grid; place-items:center;
}
.ed-btn:hover{ background:var(--black); border-color:var(--border); color:var(--white); }
.ed-sep{ width:1px; height:18px; background:var(--border); margin:0 4px; }
.ed-spacer{ flex:1; }
.ed-preview{
  padding:.35rem .9rem; border-radius:999px; cursor:pointer;
  border:1px solid var(--border); background:transparent;
  color:var(--grey); font-size:.8rem;
}
.ed-preview:hover{ color:var(--white); border-color:var(--grey-dim); }
.ed-preview.on{ background:var(--red); border-color:var(--red); color:#120503; font-weight:600; }

/* поле под панелью — общая рамка */
#post-text{ border-radius:0 0 var(--r-md) var(--r-md); }

.preview-box{
  background:var(--surface); border:1px solid var(--border);
  border-radius:0 0 var(--r-md) var(--r-md); padding:20px 22px;
  min-height:220px;
}
.preview-head{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding-bottom:12px; margin-bottom:16px; border-bottom:1px solid var(--border-soft);
}
.preview-head span{ font-family:var(--font-mono); font-size:.74rem; color:var(--grey-dim); }

@media (max-width: 620px){
  .ed-spacer{ display:none; }
  .ed-preview{ width:100%; margin-top:6px; }
}
