/* =========================================================
   РосФинекс · Инвест-клуб — ЕДИНЫЙ стиль БАЗЫ ЗНАНИЙ (статьи)
   Палитра и типографика синхронизированы с лендингом styles.css:
   графит + шампань-золото, Cormorant (serif) × Manrope (гротеск), ферзь ♛.
   Этот файл самодостаточен: ре-темит классы контент-страниц
   (.site-head/.article/.lead-answer/.faq/.shield/...) в брендовый вид.
   ========================================================= */

/* ---------- Fonts (self-host, общие с лендингом) ---------- */
@font-face{
  font-family:'Cormorant';
  src:url('../fonts/Cormorant.ttf') format('truetype');
  font-weight:300 700; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'Cormorant';
  src:url('../fonts/Cormorant-Italic.ttf') format('truetype');
  font-weight:300 700; font-style:italic; font-display:swap;
}
@font-face{
  font-family:'Manrope';
  src:url('../fonts/Manrope.ttf') format('truetype');
  font-weight:400 700; font-display:swap;
}

:root{
  --bg:#0A0A0C; --bg-2:#0C0D10; --bg-3:#111218;
  --panel:#121318; --panel-2:#16171D; --panel-3:#1B1C23;
  --gold:#C9A563; --gold-soft:#E0C886; --gold-deep:#9E7E3E;
  --ivory:#ECE8DF; --text:#CBC7BE; --muted:#938F85; --faint:#67645C;
  --line:rgba(236,232,223,.08); --line-gold:rgba(201,165,99,.18);
  /* смысловые алиасы из контент-разметки → всё в золото/нейтрали */
  --blue:var(--gold); --blue-2:var(--gold-soft); --cyan:var(--gold-soft);
  --green:var(--gold); --red:#C98C63; --gold-2:var(--gold-soft);
  --radius:16px; --maxw:1120px;
  --head:'Cormorant',Georgia,serif; --body:'Manrope',system-ui,sans-serif;
  --shadow-soft:0 18px 50px rgba(0,0,0,.4);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--body); font-size:17px; line-height:1.72;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  overflow-x:hidden; position:relative;
}
/* премиальная зернистость поверх фона — как на лендинге */
body::before{
  content:''; position:fixed; inset:0; z-index:1; pointer-events:none; opacity:.04;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > *{position:relative; z-index:2}

.wrap{max-width:var(--maxw); margin:0 auto; padding:0 28px}

a{color:var(--gold-soft); text-decoration:none; transition:color .2s}
a:hover{color:var(--ivory)}

h1,h2,h3,h4{font-family:var(--head); color:var(--ivory); font-weight:600; line-height:1.12; letter-spacing:.004em}
h1{font-size:clamp(32px,4.6vw,52px); margin:.25em 0 .4em}
h2{font-size:clamp(25px,3vw,34px); margin:1.5em 0 .5em}
h3{font-size:22px; margin:1.3em 0 .45em}
p{margin:.85em 0}
strong,b{color:var(--ivory); font-weight:700}

/* ---------- Header (sticky, брендовый) ---------- */
.site-head{
  position:sticky; top:0; z-index:50;
  background:rgba(10,10,12,.82); backdrop-filter:blur(12px) saturate(120%);
  border-bottom:1px solid var(--line);
}
.site-head .wrap{display:flex; align-items:center; justify-content:space-between; height:70px; gap:18px}
.logo{display:flex; align-items:center; gap:10px; font-family:var(--head); font-weight:600; font-size:1.5rem; color:var(--ivory); letter-spacing:.02em}
.logo:hover{color:var(--ivory)}
.logo .q{color:var(--gold); font-size:1.5rem; line-height:1}
.logo b{color:var(--gold); font-weight:600}
.nav{display:flex; gap:24px; align-items:center}
.nav a{color:var(--muted); font-size:.93rem; font-weight:500; letter-spacing:.01em}
.nav a:hover{color:var(--ivory)}
.nav a.home{color:var(--gold-soft)}
.nav .cta{
  background:linear-gradient(135deg,var(--gold-soft),var(--gold));
  color:#1A1507; padding:10px 18px; border-radius:11px; font-weight:700; font-size:.88rem;
  box-shadow:0 10px 26px rgba(201,165,99,.2);
}
.nav .cta:hover{filter:brightness(1.05); color:#1A1507}
.burger{display:none}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  padding:14px 26px; border-radius:11px; font-family:var(--body); font-weight:600; font-size:15px;
  cursor:pointer; border:1px solid transparent; transition:transform .2s,box-shadow .25s,background .25s,border-color .25s,color .2s;
  line-height:1.2; white-space:nowrap;
}
.btn-primary,.btn-gold{
  background:linear-gradient(135deg,var(--gold-soft),var(--gold)); color:#1A1507;
  box-shadow:0 14px 34px rgba(201,165,99,.22);
}
.btn-primary:hover,.btn-gold:hover{transform:translateY(-2px); box-shadow:0 18px 44px rgba(201,165,99,.3); color:#1A1507}
.btn-ghost{background:transparent; border:1px solid var(--line-gold); color:var(--text)}
.btn-ghost:hover{border-color:var(--gold); color:var(--ivory)}
.btn-row{display:flex; gap:14px; flex-wrap:wrap; margin-top:8px}

/* ---------- Breadcrumbs + back-to-club strip ---------- */
.breadcrumbs{color:var(--muted); font-size:.85rem; padding:22px 0 0; letter-spacing:.01em}
.breadcrumbs a{color:var(--muted)}
.breadcrumbs a:hover{color:var(--ivory)}
.kb-backbar{
  display:flex; flex-wrap:wrap; gap:10px 22px; align-items:center;
  padding:14px 0 2px; font-size:.9rem; color:var(--muted);
}
.kb-backbar a{color:var(--gold-soft); font-weight:600}
.kb-backbar a:hover{color:var(--ivory)}
.kb-backbar .sep{color:var(--faint)}

/* ---------- Article body ---------- */
.article{padding:8px 0 48px}
.article .body{max-width:780px; margin:0 auto}
.article .body > h1{margin-top:.1em}
.article .body p, .article .body li{color:var(--text)}
.article .meta{color:var(--muted); font-size:.92rem; margin-bottom:20px}
.article .meta a{color:var(--gold-soft)}

.lead-answer{
  font-family:var(--body); font-size:1.18rem; line-height:1.62; color:var(--ivory);
  border-left:3px solid var(--gold); background:rgba(201,165,99,.07);
  padding:18px 22px; border-radius:0 12px 12px 0; margin:20px 0 28px;
}
.lead-answer strong{color:var(--ivory)}

.article .body ul, .article .body ol{padding-left:1.25em; margin:.6em 0}
.article .body li{margin:.45em 0}
.article .body ::marker{color:var(--gold)}

/* tables */
.tbl-wrap{overflow-x:auto; margin:24px 0; border-radius:12px; border:1px solid var(--line)}
table{border-collapse:collapse; width:100%; font-size:.95rem; min-width:540px}
th,td{border-bottom:1px solid var(--line); border-right:1px solid var(--line); padding:12px 15px; text-align:left; vertical-align:top}
th:last-child,td:last-child{border-right:0}
thead th{background:var(--panel-2); color:var(--ivory); font-family:var(--head); font-size:1.08rem; font-weight:600}
tbody tr:nth-child(even){background:rgba(236,232,223,.015)}
tbody tr:last-child td{border-bottom:0}

/* callout / quote */
blockquote,.callout{
  border-left:3px solid var(--gold); background:var(--panel-2);
  padding:16px 20px; border-radius:0 12px 12px 0; margin:22px 0; color:var(--text);
}
blockquote strong,.callout strong{color:var(--ivory)}

/* FAQ accordion */
.faq{margin:28px 0}
.faq details{
  border:1px solid var(--line); border-radius:12px; background:var(--panel);
  margin:12px 0; padding:0 20px; transition:border-color .2s;
}
.faq details[open]{border-color:var(--line-gold)}
.faq summary{
  cursor:pointer; font-family:var(--head); font-weight:600; font-size:1.18rem; color:var(--ivory);
  padding:17px 0; list-style:none; position:relative; padding-right:28px;
}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:'+'; position:absolute; right:0; top:14px; color:var(--gold); font-size:1.4rem; transition:transform .2s}
.faq details[open] summary::after{content:'–'}
.faq details[open] summary{border-bottom:1px solid var(--line)}
.faq .ans{padding:12px 0 18px; color:var(--text)}

/* author chip */
.author-chip{
  display:flex; gap:16px; align-items:center;
  background:var(--panel-2); border:1px solid var(--line-gold);
  border-radius:var(--radius); padding:20px 22px; margin:34px 0;
}
.author-chip .ava{
  width:58px; height:58px; border-radius:50%; flex:0 0 58px;
  background:linear-gradient(135deg,var(--gold),var(--gold-deep));
  display:flex; align-items:center; justify-content:center;
  font-family:var(--head); font-weight:600; font-size:1.5rem; color:#1A1507;
  box-shadow:0 8px 22px rgba(201,165,99,.25);
}
.author-chip b{color:var(--ivory); font-family:var(--head); font-size:1.2rem; font-weight:600}
.author-chip .role{color:var(--muted); font-size:.92rem}
.author-chip a{color:var(--gold-soft); font-weight:600}

/* interlink box */
.related{
  border:1px solid var(--line); border-radius:var(--radius);
  padding:22px 26px; margin:34px 0; background:var(--panel);
}
.related h4{margin:0 0 12px; color:var(--ivory); font-size:1.3rem}
.related ul{margin:0; padding-left:1.15em}
.related li{margin:.4em 0}
.related a{color:var(--gold-soft)}
.related a:hover{color:var(--ivory)}

/* CTA block */
.cta-block{
  text-align:center; position:relative; overflow:hidden;
  background:
    radial-gradient(620px 300px at 50% 0%,rgba(201,165,99,.14),transparent 65%),
    var(--panel);
  border:1px solid var(--line-gold); border-radius:20px; padding:46px 26px; margin:42px 0;
}
.cta-block .q{color:var(--gold); font-size:2.1rem; line-height:1}
.cta-block h3{font-size:1.8rem; margin:.25em 0 .4em; color:var(--ivory)}
.cta-block p{color:var(--muted); max-width:54ch; margin:0 auto 24px}

/* disclaimer shield (38-ФЗ) */
.shield{
  border:1px solid var(--line); border-left:3px solid var(--gold); background:var(--bg-3);
  border-radius:0 12px 12px 0; padding:17px 22px; margin:34px 0;
  font-size:.84rem; color:var(--muted); line-height:1.65;
}
.shield b{color:var(--text)}
.shield .tag{color:var(--gold); font-weight:700; font-family:var(--head); font-size:1rem}

/* placeholder marker (index data to fill) */
.ph{
  color:var(--gold-soft); background:rgba(201,165,99,.1);
  border:1px dashed rgba(201,165,99,.5); padding:0 6px; border-radius:5px;
  font-weight:600; white-space:nowrap;
}

/* ---------- Footer (брендовый, общий вид с лендингом) ---------- */
.site-foot{background:var(--bg-2); border-top:1px solid var(--line); padding:52px 0 34px; margin-top:44px; font-size:.9rem}
.site-foot .cols{display:grid; grid-template-columns:1.6fr 1fr 1fr; gap:36px}
.site-foot h5{font-family:var(--body); color:var(--gold); margin:0 0 14px; font-size:11px; font-weight:600; letter-spacing:.16em; text-transform:uppercase}
.site-foot a{color:var(--muted); display:block; margin:7px 0; font-size:.9rem}
.site-foot a:hover{color:var(--ivory)}
.site-foot .logo{font-size:1.4rem; margin-bottom:6px}
.site-foot .brand-line{color:var(--muted); max-width:42ch; margin-top:10px; font-size:.9rem}
.site-foot .req{color:var(--faint); font-size:.78rem; line-height:1.65; margin-top:26px; border-top:1px solid var(--line); padding-top:20px}
.site-foot .req .ph, .shield .ph{font-size:.9em}

/* reveal-on-scroll — деликатное появление блоков статьи.
   Прячем ТОЛЬКО когда есть JS (html.js) — без JS весь контент виден всегда. */
html.js .article .body > h2,
html.js .article .body > .tbl-wrap,
html.js .article .body > .faq,
html.js .article .body > .related,
html.js .article .body > .cta-block,
html.js .article .body > .author-chip,
html.js .article .body > blockquote,
html.js .article .body > .callout{
  opacity:0; transform:translateY(18px); transition:opacity .7s ease, transform .7s ease;
}
html.js .article .body > .in{opacity:1; transform:none}
html.reveal-fallback .article .body > *{opacity:1 !important; transform:none !important}
@media (prefers-reduced-motion: reduce){ html.js .article .body > *{opacity:1; transform:none; transition:none} }

/* ---------- Responsive ---------- */
@media(max-width:860px){
  body{font-size:16px}
  .wrap{padding:0 20px}
  .site-foot .cols{grid-template-columns:1fr; gap:26px}
  .nav{display:none}
  .nav.open{
    display:flex; position:absolute; top:70px; left:0; right:0; flex-direction:column;
    background:var(--bg-2); border-bottom:1px solid var(--line); padding:18px 22px; gap:14px;
  }
  .burger{display:block; background:none; border:0; color:var(--ivory); font-size:1.5rem; cursor:pointer; line-height:1}
}
