/* Macro.Digest. Построено по брендбуку MACRO 2B v3.0:
   токены цвета и скруглений из Source/tokens.css, Inter для текста,
   JetBrains Mono для цифр и служебных меток, один градиент 135deg. */

:root{
  /* палитра брендбука, один в один */
  --bg-primary:#0a0a0f;
  --bg-secondary:#12121a;
  --bg-card:#16161f;
  --bg-card-hover:#1a1a25;
  --border-color:#252530;
  --text-primary:#ffffff;
  --text-secondary:#a0a0b0;
  --text-muted:#606070;
  --accent-cyan:#00f5d4;
  --accent-purple:#7b61ff;
  --accent-orange:#ff9f43;
  --accent-red:#ff6b6b;
  --gradient-main:linear-gradient(135deg,#00f5d4 0%,#7b61ff 100%);
  --gradient-card:linear-gradient(180deg,#16161f 0%,#12121a 100%);
  --font-sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --font-mono:'JetBrains Mono','SFMono-Regular',Consolas,monospace;
  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:16px;
  --radius-xl:24px;
  /* шкала брендбука: 38/700/-3%, 28/700/-2%, 20/600, 16/400, 14/500 */
  --maxw:1240px;
  color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box}
body{
  margin:0;
  background:var(--bg-primary);
  color:var(--text-secondary);
  font-family:var(--font-sans);
  font-size:16px;
  font-weight:400;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%}
a{color:var(--accent-cyan)}
:focus-visible{outline:2px solid var(--accent-cyan); outline-offset:3px; border-radius:var(--radius-sm)}

h1,h2,h3,h4,h5{color:var(--text-primary); margin:0; font-family:var(--font-sans); text-wrap:balance}
h1{font-size:38px; font-weight:700; letter-spacing:-.03em; line-height:1.12}
h2{font-size:28px; font-weight:700; letter-spacing:-.02em; line-height:1.18}
h3{font-size:20px; font-weight:600; letter-spacing:-.01em; line-height:1.3}
h4,h5{font-size:16px; font-weight:600}
@media (max-width:640px){h1{font-size:30px} h2{font-size:24px}}

.mono,.num{font-family:var(--font-mono); font-variant-numeric:tabular-nums}
.label{
  font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:.14em;
  text-transform:uppercase; color:var(--text-muted);
}

.wrap{max-width:var(--maxw); margin:0 auto; padding-inline:24px}
@media (max-width:560px){.wrap{padding-inline:16px}}

/* ---------- переключатель продуктов ---------- */
.switcher{background:var(--bg-primary); border-bottom:1px solid var(--border-color)}
.switcher .wrap{display:flex; align-items:center; gap:4px; flex-wrap:wrap; padding-block:9px}
.switcher a{
  display:inline-flex; align-items:center; gap:8px; color:var(--text-muted); text-decoration:none;
  font-size:13px; font-weight:500; padding:5px 12px; border-radius:var(--radius-sm); white-space:nowrap;
}
.switcher a:hover{color:var(--text-secondary); background:var(--bg-secondary)}
.switcher a.on{background:var(--bg-card); color:var(--text-primary)}
.switcher a .dot{width:6px; height:6px; border-radius:50%; background:var(--border-color); flex-shrink:0}
.switcher a.on .dot{background:var(--accent-cyan)}
.switcher .sp{margin-left:auto; display:flex; align-items:center; gap:4px}
.switcher .sp em{font-style:normal; font-family:var(--font-mono); font-size:12px; color:var(--text-muted); padding-right:10px; white-space:nowrap}
@media (max-width:760px){.switcher .sp em{display:none}}

/* ---------- шапка ---------- */
header.site{
  position:sticky; top:env(safe-area-inset-top,0px); z-index:40;
  background:rgba(10,10,15,.88); backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border-color);
}
header.site .wrap{display:flex; align-items:center; gap:28px; padding-block:15px}
.logo{display:block; flex-shrink:0; line-height:0}
.logo img{height:26px; width:auto; display:block}
nav.main{display:flex; gap:4px; align-items:center; margin-inline:auto; flex-wrap:wrap}
nav.main a{
  color:var(--text-secondary); text-decoration:none; font-size:14px; font-weight:500;
  padding:9px 16px; border-radius:var(--radius-sm); white-space:nowrap;
}
nav.main a:hover{color:var(--text-primary); background:var(--bg-secondary)}
nav.main a.on{background:var(--bg-card); color:var(--text-primary); font-weight:600}
.hd-right{display:flex; align-items:center; gap:14px; flex-shrink:0}
@media (max-width:1040px){
  header.site .wrap{flex-wrap:wrap; gap:14px}
  nav.main{order:3; width:100%; margin-inline:0; overflow-x:auto; padding-bottom:2px}
  .hd-right{margin-left:auto}
}

/* ---------- кнопки ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:var(--font-sans); font-weight:600; font-size:14px;
  padding:12px 22px; border-radius:var(--radius-sm); text-decoration:none; cursor:pointer;
  border:1px solid transparent; transition:filter .15s, border-color .15s, color .15s, background .15s;
}
.btn-grad{background:var(--gradient-main); color:#07131f}
.btn-grad:hover{filter:brightness(1.08)}
.btn-ghost{background:var(--bg-card); color:var(--text-primary); border-color:var(--border-color)}
.btn-ghost:hover{border-color:var(--accent-cyan); color:var(--accent-cyan)}
.btn-sm{padding:9px 16px; font-size:13px}

/* ---------- заголовок страницы ---------- */
.crumbs{display:flex; gap:10px; align-items:center; font-size:13px; color:var(--text-muted); padding-block:26px 0}
.crumbs a{color:var(--text-muted); text-decoration:none}
.crumbs a:hover{color:var(--accent-cyan)}
.crumbs .sep{opacity:.45}
.phead{border-bottom:1px solid var(--border-color)}
.phead .wrap{padding-block:16px 48px}
.phead h1{font-size:clamp(30px,4.6vw,46px)}
.phead p{margin:18px 0 0; font-size:17px; color:var(--text-secondary); max-width:78ch; line-height:1.6}
.phead .cta{display:flex; gap:12px; flex-wrap:wrap; margin-top:28px}
.eyebrow{
  font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:.1em;
  text-transform:uppercase; color:#00f5d4; margin:0 0 16px;
}
.section{padding-block:52px}
.section-head{margin-bottom:26px}
.section-head p{margin:8px 0 0; color:var(--text-muted); font-size:15px}

/* ---------- показатели ---------- */
.stats{display:grid; grid-template-columns:repeat(auto-fit,minmax(152px,1fr)); gap:12px}
.stat{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-md); padding:16px 16px 15px; text-align:center}
.stat .ic{
  width:30px; height:30px; border-radius:var(--radius-sm); background:rgba(0,245,212,.09);
  border:1px solid rgba(0,245,212,.2); display:flex; align-items:center; justify-content:center;
  margin:0 auto 11px; color:var(--accent-cyan);
}
.stat .ic svg{width:15px; height:15px}
.stat b{
  display:block; font-family:var(--font-mono); font-weight:600; font-size:19px; letter-spacing:-.02em;
  background:var(--gradient-main); -webkit-background-clip:text; background-clip:text; color:transparent;
  font-variant-numeric:tabular-nums; line-height:1.2;
}
.stat span{display:block; font-size:12px; color:var(--text-muted); margin-top:5px; line-height:1.4}

/* ---------- фильтры ---------- */
.chips{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:30px}
.chip{
  font-family:var(--font-sans); font-weight:500; font-size:14px; padding:10px 20px;
  border:1px solid var(--border-color); border-radius:999px; background:var(--bg-card);
  color:var(--text-secondary); cursor:pointer;
}
.chip:hover{border-color:var(--accent-cyan); color:var(--accent-cyan)}
.chip[aria-pressed="true"]{background:var(--accent-cyan); border-color:var(--accent-cyan); color:#07131f; font-weight:600}

/* ---------- карточки выпусков ---------- */
.cards{display:grid; grid-template-columns:1fr; gap:18px}
.card{
  background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-lg);
  overflow:hidden; display:flex; flex-direction:column; text-decoration:none;
  transition:border-color .18s, transform .18s; position:relative;
}
.card::before{content:""; position:absolute; inset:0 0 auto; height:2px; background:var(--gradient-main); opacity:0; transition:opacity .18s}
.card:hover{border-color:var(--bg-card-hover); transform:translateY(-2px)}
.card:hover::before{opacity:1}
.cover{aspect-ratio:16/7; display:block; width:100%; background:var(--bg-secondary)}
.cards .card{flex-direction:row; align-items:stretch}
.cards .card .cover{width:296px; flex-shrink:0; aspect-ratio:auto; min-height:188px; object-fit:cover}
.cards .card .bdy{flex:1; min-width:0; justify-content:center}
@media (max-width:760px){
  .cards .card{flex-direction:column}
  .cards .card .cover{width:100%; aspect-ratio:16/7; min-height:0}
}
.card .bdy{padding:20px 22px 22px; display:flex; flex-direction:column; gap:12px; flex:1}
.card .tags{display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-size:12px; color:var(--text-muted)}
.badge{
  font-family:var(--font-mono); font-weight:500; font-size:10.5px; letter-spacing:.12em; text-transform:uppercase;
  padding:5px 10px; border-radius:var(--radius-sm); background:rgba(0,245,212,.1); color:var(--accent-cyan);
  border:1px solid rgba(0,245,212,.2);
}
.badge.v{background:rgba(123,97,255,.14); color:#a593ff; border-color:rgba(123,97,255,.3)}
.card h3{font-size:19px; font-weight:600; letter-spacing:-.015em; line-height:1.32; transition:color .15s}
.card:hover h3{color:var(--accent-cyan)}
.card p{margin:0; font-size:14.5px; color:var(--text-secondary); line-height:1.6}
.card .ft{
  margin-top:auto; padding-top:14px; border-top:1px solid var(--border-color);
  display:flex; gap:14px; justify-content:space-between; flex-wrap:wrap;
  font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted);
}
.ico{display:inline-flex; align-items:center; gap:5px; font-family:var(--font-mono); font-size:11.5px}
.ico svg{width:13px; height:13px; opacity:.7}

/* ---------- панели ---------- */
.panel{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-lg); padding:22px}
.panel h4{
  font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:.14em;
  text-transform:uppercase; color:var(--text-muted); margin-bottom:16px;
}
.panel h3{margin-bottom:8px}
.panel p{margin:0; font-size:14.5px; color:var(--text-muted); line-height:1.6}
.panel p{max-width:none}
.panel-cyan{border-color:rgba(0,245,212,.22); background:linear-gradient(160deg,rgba(0,245,212,.07),var(--bg-card) 60%)}
.panel-cyan h4{color:var(--accent-cyan)}
.figs{display:grid}
.figs div{display:flex; justify-content:space-between; align-items:baseline; gap:14px; padding:11px 0; border-bottom:1px solid var(--border-color); font-size:14px}
.figs div:last-child{border:0; padding-bottom:0}
.figs span{color:var(--text-muted)}
.figs b{font-family:var(--font-mono); font-weight:500; color:var(--text-primary); font-variant-numeric:tabular-nums; font-size:14px}
.figs b.num{white-space:nowrap}
.figs i{font-style:normal; font-size:11.5px; margin-left:7px}
.up{color:var(--accent-cyan)} .down{color:var(--accent-red)}

.layout{display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:44px; align-items:start}
@media (max-width:1000px){.layout{grid-template-columns:1fr; gap:34px}}
.aside{display:grid; gap:20px; position:sticky; top:104px}
@media (max-width:1000px){.aside{position:static}}

/* ---------- статья ---------- */
.art{max-width:880px}
.art .meta{display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin-bottom:18px; font-family:var(--font-mono); font-size:12.5px}
.art .meta .d{color:var(--accent-cyan); letter-spacing:.04em}
.art .meta .m{color:var(--text-muted)}
.art h1{font-size:clamp(27px,3.8vw,40px)}
.art .lede{margin:20px 0 0; font-size:17px; color:var(--text-secondary); line-height:1.65}

.audio{
  display:flex; align-items:center; gap:16px; background:var(--gradient-card); border:1px solid var(--border-color);
  border-radius:var(--radius-lg); padding:16px 20px; margin:28px 0 34px; flex-wrap:wrap;
}
.audio .play{
  width:44px; height:44px; border-radius:50%; border:0; cursor:pointer; flex-shrink:0;
  background:var(--gradient-main); color:#07131f; display:flex; align-items:center; justify-content:center;
}
.audio .play svg{width:17px; height:17px; margin-left:2px}
.audio .play.on svg{margin-left:0}
.audio .info{flex:1; min-width:170px}
.audio .ttl{font-weight:600; font-size:14.5px; color:var(--text-primary)}
.audio .sub{font-size:13px; color:var(--text-muted)}
.audio .time{font-family:var(--font-mono); font-size:12.5px; color:var(--text-muted); white-space:nowrap}
.audio .bar{flex-basis:100%; height:4px; border-radius:4px; background:var(--border-color); overflow:hidden}
.audio .bar span{display:block; height:100%; width:0%; background:var(--gradient-main); transition:width .3s linear}

.sentiment{margin:30px 0 34px; max-width:560px}
.sentiment .track{position:relative; height:6px; border-radius:4px; margin-top:10px;
  background:linear-gradient(90deg,var(--accent-red) 0%,var(--text-muted) 50%,var(--accent-cyan) 100%)}
.sentiment .dot{position:absolute; top:50%; width:14px; height:14px; border-radius:50%;
  background:#fff; border:2px solid var(--border-color); transform:translate(-50%,-50%)}
.sentiment .ends{display:flex; justify-content:space-between; font-family:var(--font-mono); font-size:10.5px; color:var(--text-muted); margin-top:9px}

.sb{background:var(--gradient-card); border:1px solid var(--border-color); border-left:2px solid var(--accent-cyan);
  border-radius:var(--radius-md); padding:24px; margin-bottom:40px}
.sb h4{font-size:16px; font-weight:600; color:var(--text-primary); margin-bottom:16px; letter-spacing:-.01em}
.sb ul{list-style:none; margin:0; padding:0}
.sb li{padding:10px 0 10px 20px; border-bottom:1px solid var(--border-color); font-size:15px; position:relative; line-height:1.6}
.sb li:last-child{border:0; padding-bottom:0}
.sb li::before{content:""; position:absolute; left:0; top:18px; width:6px; height:6px; border-radius:50%; background:var(--accent-cyan)}

.art-body h2{margin:46px 0 20px; padding-bottom:14px; border-bottom:1px solid var(--border-color)}
.art-body h3{margin:32px 0 10px}
.art-body p{margin:0 0 12px; font-size:16px; line-height:1.75}
.src{font-family:var(--font-mono); font-size:12.5px; color:var(--text-muted)}
.src a{color:var(--accent-cyan); text-decoration:none}
.src a:hover{text-decoration:underline}
.art-body ul.plain{list-style:none; padding:0; margin:0}
.art-body ul.plain li{padding:12px 0; border-bottom:1px solid var(--border-color); font-size:15px; line-height:1.6}
.art-body ul.plain li em{font-style:normal; font-family:var(--font-mono); color:var(--text-muted); font-size:11.5px; margin-left:6px}
.numbers{display:grid; grid-template-columns:repeat(auto-fit,minmax(215px,1fr)); gap:14px; margin-top:8px}
.numbers div{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-md); padding:18px}
.numbers b{display:block; font-family:var(--font-mono); font-weight:700; font-size:24px; color:var(--text-primary);
  font-variant-numeric:tabular-nums; letter-spacing:-.02em}
.numbers span{font-size:13px; color:var(--text-muted); display:block; margin-top:5px; line-height:1.5}
.disc{margin-top:46px; padding-top:22px; border-top:1px solid var(--border-color)}
.disc p{font-size:12.5px; color:var(--text-muted); margin:0 0 8px; line-height:1.6}

/* ---------- шаги ---------- */
.grid3{display:grid; grid-template-columns:repeat(auto-fit,minmax(270px,1fr)); gap:18px}
.step{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-lg); padding:24px}
.step .n{
  width:34px; height:34px; border-radius:var(--radius-sm); background:rgba(0,245,212,.09); border:1px solid rgba(0,245,212,.22);
  color:var(--accent-cyan); display:flex; align-items:center; justify-content:center;
  font-family:var(--font-mono); font-weight:700; font-size:14px; margin-bottom:16px;
}
.step h3{font-size:18px; margin-bottom:8px}
.step p{margin:0; font-size:14.5px; color:var(--text-muted); line-height:1.65}

/* ---------- тарифы ---------- */
.toggle{display:inline-flex; border:1px solid var(--border-color); border-radius:999px; padding:4px; gap:4px; background:var(--bg-card)}
.toggle button{
  border:0; background:transparent; cursor:pointer; font-family:var(--font-sans); font-weight:500;
  font-size:14px; padding:8px 19px; border-radius:999px; color:var(--text-secondary);
}
.toggle button[aria-pressed="true"]{background:var(--accent-cyan); color:#07131f; font-weight:600}
.tiers{display:grid; grid-template-columns:repeat(auto-fit,minmax(290px,1fr)); gap:20px; align-items:stretch}
.toggle-row{display:flex; align-items:center; justify-content:center; gap:18px; flex-wrap:wrap; margin-bottom:28px}
.section-head.tc{text-align:center}
.toggle button{position:relative; display:inline-flex; align-items:center; gap:8px}
.toggle .off{
  font-family:var(--font-mono); font-size:10px; font-weight:600; letter-spacing:.02em;
  background:var(--gradient-main); color:#07131f; padding:2px 7px; border-radius:999px;
}
.toggle button[aria-pressed="true"] .off{background:#07131f; color:var(--accent-cyan)}
.tier{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-lg);
  padding:28px 26px; display:flex; flex-direction:column; gap:18px; position:relative; overflow:hidden}
.tier.feat{border-color:rgba(0,245,212,.3)}
.tier.feat::before{content:""; position:absolute; inset:0 0 auto; height:2px; background:var(--gradient-main)}
.tier .tag{font-family:var(--font-mono); font-size:10.5px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:var(--accent-cyan)}
.tier h3{font-size:30px; font-weight:700; letter-spacing:-.03em; line-height:1.15}
.tier .price{display:flex; align-items:baseline; gap:8px}
.tier .price b{font-family:var(--font-mono); font-size:32px; font-weight:700; color:var(--text-primary);
  font-variant-numeric:tabular-nums; letter-spacing:-.04em}
.tier .price .per{font-size:13px; color:var(--text-muted)}
.tier .yr{font-family:var(--font-mono); font-size:12px; color:var(--text-muted); margin-top:-12px}
.tier ul{list-style:none; margin:0; padding:0; flex:1}
.tier li{font-size:14.5px; padding:10px 0 10px 24px; border-bottom:1px solid var(--border-color); position:relative; line-height:1.55; color:var(--text-secondary)}
.tier li:last-child{border:0}
.tier li::before{content:"✓"; position:absolute; left:0; top:9px; color:var(--accent-cyan); font-size:13px}
.tier li.off{color:var(--text-muted)}
.tier li.off::before{content:"-"; color:var(--border-color)}
.tier .pay{font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted); margin:0}
.tier .band-cta .btn{flex:1; min-width:140px}
.vat-note{margin:20px 0 0; font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted); line-height:1.6}

.cmp{width:100%; border-collapse:collapse; font-size:14.5px; min-width:660px}
.cmp th,.cmp td{text-align:left; padding:14px 16px; border-bottom:1px solid var(--border-color)}
.cmp thead th{font-weight:600; font-size:14px; color:var(--text-primary); background:var(--bg-card)}
.cmp thead th:first-child{border-top-left-radius:var(--radius-md)}
.cmp thead th:last-child{border-top-right-radius:var(--radius-md)}
.cmp td:not(:first-child),.cmp th:not(:first-child){text-align:center; font-family:var(--font-mono); font-size:13px; font-variant-numeric:tabular-nums}
.cmp tbody th{font-weight:400; color:var(--text-secondary); font-family:var(--font-sans); font-size:14.5px}
.cmp .y{color:var(--accent-cyan)}
.cmp .n{color:var(--text-muted)}
.scroll-x{overflow-x:auto; border-radius:var(--radius-md)}

/* ---------- формы и ключевые слова ---------- */
.kw-box{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-lg); padding:24px}
.kw-row{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px}
.kw-row input{
  flex:1; min-width:180px; border:1px solid var(--border-color); border-radius:var(--radius-sm);
  padding:12px 14px; font-family:var(--font-sans); font-size:15px; background:var(--bg-primary); color:var(--text-primary);
}
.kw-row input::placeholder{color:var(--text-muted)}
.kw-list{display:flex; gap:9px; flex-wrap:wrap; min-height:36px}
.kw{
  display:inline-flex; align-items:center; gap:9px; background:rgba(0,245,212,.09); color:var(--accent-cyan);
  border:1px solid rgba(0,245,212,.22); border-radius:999px; padding:6px 13px; font-size:13.5px; font-weight:500;
}
.kw button{border:0; background:transparent; color:inherit; cursor:pointer; font-size:15px; line-height:1; padding:0; opacity:.6}
.kw button:hover{opacity:1}
.kw-count{font-family:var(--font-mono); font-size:12.5px; color:var(--text-muted); margin-top:12px}
.quota{height:4px; border-radius:4px; background:var(--border-color); overflow:hidden; margin:16px 0 0}
.quota span{display:block; height:100%; background:var(--gradient-main)}
.kw-sug{display:flex; gap:8px; flex-wrap:wrap; margin-top:16px}
.kw-sug button{
  border:1px dashed var(--border-color); background:transparent; border-radius:999px; padding:6px 13px;
  font-size:13px; color:var(--text-secondary); cursor:pointer; font-family:var(--font-sans);
}
.kw-sug button:hover{border-color:var(--accent-cyan); color:var(--accent-cyan); border-style:solid}
.fieldrow{display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px}
.field label{
  display:block; font-family:var(--font-mono); font-size:11px; font-weight:500; color:var(--text-muted);
  text-transform:uppercase; letter-spacing:.14em; margin-bottom:9px;
}
.field select,.field input{
  width:100%; border:1px solid var(--border-color); border-radius:var(--radius-sm); padding:11px 13px;
  font-family:var(--font-sans); font-size:14.5px; background:var(--bg-primary); color:var(--text-primary);
}
.checks{display:flex; gap:10px; flex-wrap:wrap}
.check{display:inline-flex; align-items:center; gap:9px; border:1px solid var(--border-color); border-radius:999px;
  padding:9px 16px; font-size:14px; cursor:pointer; background:var(--bg-primary); color:var(--text-secondary)}
.check input{accent-color:var(--accent-cyan); margin:0}
.check:has(input:checked){border-color:rgba(0,245,212,.4); background:rgba(0,245,212,.07); color:var(--accent-cyan); font-weight:500}
.save{display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin-top:20px}
.saved{font-size:14px; color:var(--accent-cyan); font-weight:500}

/* ---------- письмо ---------- */
.mail{border:1px solid var(--border-color); border-radius:var(--radius-lg); overflow:hidden; background:var(--bg-card)}
.mail .bar{background:var(--bg-secondary); border-bottom:1px solid var(--border-color); padding:12px 18px;
  font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted); display:flex; gap:12px; justify-content:space-between; flex-wrap:wrap}
.mail .bdy{padding:20px}
.mail .bdy h5{font-size:16px; font-weight:600; color:var(--text-primary); margin:0 0 4px}
.mail .hit{font-size:14px; padding:12px 0; border-bottom:1px solid var(--border-color); line-height:1.6}
.mail .hit:last-child{border:0; padding-bottom:0}
.mail mark{background:rgba(0,245,212,.13); color:var(--accent-cyan); font-weight:500; padding:1px 5px; border-radius:4px}

/* ---------- уведомление ---------- */
.alert{
  display:flex; gap:16px; align-items:flex-start; border-radius:var(--radius-lg); padding:20px 22px;
  border:1px solid rgba(255,159,67,.3); background:linear-gradient(120deg,rgba(255,159,67,.08),var(--bg-card) 60%);
}
.alert .ring{width:28px; height:28px; border-radius:50%; border:2px solid var(--accent-orange); color:var(--accent-orange);
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; flex-shrink:0; font-family:var(--font-mono)}
.alert b{display:block; color:var(--text-primary); font-size:15px; margin-bottom:4px}
.alert p{margin:0; font-size:14px; color:var(--text-muted)}

.access{display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:12px}
.access div{display:flex; align-items:center; gap:11px; background:var(--bg-primary); border:1px solid var(--border-color);
  border-radius:var(--radius-md); padding:14px 18px; font-size:14.5px; color:var(--text-primary)}
.access div::before{content:"✓"; color:var(--accent-cyan); font-weight:700}
.access div.no{color:var(--text-muted)}
.access div.no::before{content:"-"; color:var(--border-color)}

.tbl{width:100%; border-collapse:collapse; font-size:14.5px; min-width:560px}
.tbl th{text-align:left; font-family:var(--font-mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--text-muted); font-weight:500; padding:0 0 12px; border-bottom:1px solid var(--border-color)}
.tbl td{padding:16px 0; border-bottom:1px solid var(--border-color); color:var(--text-secondary)}
.tbl td:first-child{color:var(--text-primary); font-family:var(--font-mono); font-size:13px}
.tbl td.num{font-family:var(--font-mono); font-variant-numeric:tabular-nums}
.pill{display:inline-block; padding:4px 11px; border-radius:var(--radius-sm); font-family:var(--font-mono); font-size:11.5px;
  background:rgba(255,159,67,.12); color:var(--accent-orange); border:1px solid rgba(255,159,67,.26)}
.pill.ok{background:rgba(0,245,212,.1); color:var(--accent-cyan); border-color:rgba(0,245,212,.22)}

/* ---------- вопросы ---------- */
.faq details{border-bottom:1px solid var(--border-color)}
.faq summary{cursor:pointer; padding:18px 0; font-weight:600; font-size:16.5px; color:var(--text-primary);
  list-style:none; display:flex; justify-content:space-between; gap:18px; align-items:center}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+"; color:var(--accent-cyan); font-size:22px; font-weight:300; flex-shrink:0}
.faq details[open] summary::after{content:"\2212"}
.faq p{margin:0 0 18px; font-size:15px; color:var(--text-muted); max-width:104ch; line-height:1.7}

/* ---------- модальная заявка ---------- */
.modal{position:fixed; inset:0; z-index:90; display:flex; align-items:center; justify-content:center; padding:20px}
.modal[hidden]{display:none}
.modal .scrim{position:absolute; inset:0; background:rgba(5,5,8,.78); backdrop-filter:blur(4px)}
.modal .sheet{
  position:relative; width:100%; max-width:468px; max-height:calc(100vh - 40px); overflow-y:auto;
  background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:var(--radius-xl);
  padding:30px 30px 28px;
}
.modal .sheet::before{content:""; position:absolute; inset:0 0 auto; height:2px; background:var(--gradient-main); border-radius:var(--radius-xl) var(--radius-xl) 0 0}
.modal .x{
  position:absolute; top:20px; right:20px; width:32px; height:32px; border:0; background:transparent;
  color:var(--text-secondary); font-size:22px; line-height:1; cursor:pointer; border-radius:var(--radius-sm);
}
.modal .x:hover{background:var(--bg-card); color:var(--text-primary)}
.modal h3{font-size:24px; font-weight:700; letter-spacing:-.02em; margin:0 0 10px}
.modal > .sheet > p.sub{margin:0 0 24px; font-size:15px; color:var(--text-secondary); line-height:1.6}
.modal .fields{display:grid; gap:16px}
.modal .divider{margin:22px 0 18px; padding-top:20px; border-top:1px solid var(--border-color)}
.modal .divider b{display:block; font-size:15px; font-weight:600; color:var(--text-primary); margin-bottom:6px}
.modal .divider span{display:block; font-size:13.5px; color:var(--text-muted); line-height:1.55}
.modal .btn{width:100%; margin-top:20px; padding:14px 22px; font-size:15px}
.modal .ok{text-align:center; padding:12px 0 4px}
.modal .ok .tick{width:52px; height:52px; border-radius:50%; background:var(--gradient-main); color:#07131f;
  display:flex; align-items:center; justify-content:center; margin:0 auto 18px; font-size:24px}
.modal .ok p{margin:0 auto; max-width:46ch; font-size:15px; color:var(--text-secondary); line-height:1.6}

/* ---------- оформление для юрлиц ---------- */
.order{display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:40px; align-items:start}
@media (max-width:960px){.order{grid-template-columns:1fr; gap:28px}}
.obox{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-lg); padding:24px; margin-bottom:20px}
.obox > h3{margin-bottom:6px}
.obox > .hint{margin:0 0 20px; font-size:14px; color:var(--text-muted); line-height:1.6}

.seg{display:flex; gap:8px; flex-wrap:wrap}
.seg button{
  position:relative; flex:1; min-width:84px; cursor:pointer; background:var(--bg-primary);
  border:1px solid var(--border-color); border-radius:var(--radius-md); padding:14px 10px;
  color:var(--text-secondary); font-family:var(--font-sans); font-size:14px; font-weight:500; text-align:center;
}
.seg button b{display:block; font-family:var(--font-mono); font-size:17px; font-weight:600; color:var(--text-primary); line-height:1.3}
.seg button span{display:block; font-size:11.5px; color:var(--text-muted); margin-top:2px}
.seg button:hover{border-color:var(--text-muted)}
.seg button[aria-pressed="true"]{border-color:var(--accent-cyan); background:rgba(0,245,212,.07)}
.seg button[aria-pressed="true"] b{color:var(--accent-cyan)}
.seg .off{
  position:absolute; top:-9px; right:8px; font-family:var(--font-mono); font-size:10px; font-weight:600;
  background:var(--gradient-main); color:#07131f; padding:2px 7px; border-radius:999px;
}

.stepper{display:flex; align-items:center; gap:14px; flex-wrap:wrap}
.stepper .ctl{display:flex; align-items:center; gap:0; border:1px solid var(--border-color); border-radius:var(--radius-md); overflow:hidden; background:var(--bg-primary)}
.stepper .ctl button{
  width:42px; height:42px; border:0; background:transparent; color:var(--text-primary);
  font-size:20px; line-height:1; cursor:pointer; font-family:var(--font-mono);
}
.stepper .ctl button:hover{background:var(--bg-card-hover); color:var(--accent-cyan)}
.stepper .ctl button:disabled{color:var(--border-color); cursor:default; background:transparent}
.stepper .ctl output{
  min-width:48px; text-align:center; font-family:var(--font-mono); font-size:17px; font-weight:600;
  color:var(--text-primary); border-inline:1px solid var(--border-color); padding:10px 0;
}
.stepper .note{font-size:13.5px; color:var(--text-muted); line-height:1.5}

.tabs{display:flex; gap:8px; margin-bottom:18px}
.tabs button{
  cursor:pointer; background:var(--bg-primary); border:1px solid var(--border-color); border-radius:var(--radius-sm);
  padding:9px 16px; color:var(--text-secondary); font-family:var(--font-sans); font-size:14px; font-weight:500;
}
.tabs button[aria-pressed="true"]{border-color:var(--accent-cyan); color:var(--accent-cyan); background:rgba(0,245,212,.07)}

.drop{
  border:1px dashed var(--border-color); border-radius:var(--radius-md); padding:30px 20px; text-align:center;
  background:var(--bg-primary); cursor:pointer; display:block;
}
.drop:hover{border-color:var(--accent-cyan)}
.drop b{display:block; text-wrap:balance; color:var(--text-primary); font-size:15px; font-weight:600; margin-bottom:6px}
.drop span{display:block; font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted); letter-spacing:.06em}
.drop input{position:absolute; width:1px; height:1px; opacity:0}
.drop.filled{border-style:solid; border-color:var(--accent-cyan); background:rgba(0,245,212,.06)}

.req{color:var(--accent-cyan)}
.field textarea{
  width:100%; border:1px solid var(--border-color); border-radius:var(--radius-sm); padding:11px 13px;
  font-family:var(--font-sans); font-size:14.5px; background:var(--bg-primary); color:var(--text-primary);
  resize:vertical; min-height:84px;
}
.field input::placeholder,.field textarea::placeholder{color:var(--text-muted)}
.agree{display:flex; gap:11px; align-items:flex-start; margin:22px 0 18px; font-size:13.5px; color:var(--text-muted); line-height:1.6}
.agree input{accent-color:var(--accent-cyan); margin-top:3px; flex-shrink:0}
.agree a{color:var(--accent-cyan)}

.summary{position:sticky; top:104px; background:var(--gradient-card); border:1px solid rgba(0,245,212,.25); border-radius:var(--radius-lg); padding:24px; overflow:hidden}
.summary::before{content:""; position:absolute; inset:0 0 auto; height:2px; background:var(--gradient-main)}
@media (max-width:960px){.summary{position:static}}
.summary h4{margin-bottom:18px}
.summary .rows{display:grid}
.summary .rows div{display:flex; justify-content:space-between; gap:14px; align-items:baseline; padding:10px 0; border-bottom:1px solid var(--border-color); font-size:14px}
.summary .rows span{color:var(--text-muted)}
.summary .rows b{font-family:var(--font-mono); font-weight:500; color:var(--text-primary); font-variant-numeric:tabular-nums}
.summary .total{display:flex; justify-content:space-between; align-items:baseline; gap:14px; padding-top:18px; margin-top:4px}
.summary .total span{font-size:14px; color:var(--text-secondary)}
.summary .total b{font-family:var(--font-mono); font-size:26px; font-weight:700; color:var(--text-primary); letter-spacing:-.03em; font-variant-numeric:tabular-nums}
.summary .per-m{font-family:var(--font-mono); font-size:12.5px; color:var(--accent-cyan); text-align:right; margin:2px 0 0}
.summary .vat{font-size:12.5px; color:var(--text-muted); margin:16px 0 0; line-height:1.55}

.done{text-align:center; padding:48px 24px; background:var(--gradient-card); border:1px solid rgba(0,245,212,.25); border-radius:var(--radius-lg)}
.done .tick{
  width:56px; height:56px; border-radius:50%; background:var(--gradient-main); color:#07131f;
  display:flex; align-items:center; justify-content:center; margin:0 auto 20px; font-size:26px;
}
.done h2{margin-bottom:12px}
.done p{margin:0 auto 10px; max-width:64ch; color:var(--text-secondary); font-size:15.5px; line-height:1.65}
.done .back{display:inline-block; margin-top:20px; font-size:14px; color:var(--accent-cyan); text-decoration:none}
.done .back:hover{text-decoration:underline}

.contacts{display:flex; gap:24px; flex-wrap:wrap; margin-top:22px; font-family:var(--font-mono); font-size:12.5px; color:var(--text-muted)}
.contacts a{color:var(--text-secondary); text-decoration:none}
.contacts a:hover{color:var(--accent-cyan)}

/* ---------- список источников ---------- */
.srcs{display:grid; gap:14px; margin:4px 0 22px}
.src-g{background:var(--bg-primary); border:1px solid var(--border-color); border-radius:var(--radius-md); padding:16px 18px}
.src-g h6{
  display:flex; align-items:baseline; gap:10px; margin:0 0 8px;
  font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:.12em;
  text-transform:uppercase; color:var(--accent-cyan);
}
.src-g h6 em{font-style:normal; color:var(--text-muted); font-size:11px}
.src-g p{margin:0; font-size:13.5px; color:var(--text-secondary); line-height:1.65}

/* ---------- телеграм ---------- */
.panel-tg{
  border-color:rgba(0,245,212,.3);
  background:linear-gradient(150deg,rgba(0,245,212,.12),rgba(123,97,255,.1) 55%,var(--bg-card) 100%);
  position:relative; overflow:hidden;
}
.panel-tg::before{content:""; position:absolute; inset:0 0 auto; height:2px; background:var(--gradient-main)}
.tg-head{display:flex; align-items:center; gap:14px; margin-bottom:14px}
.tg-ic{
  width:42px; height:42px; border-radius:var(--radius-md); background:var(--gradient-main);
  display:flex; align-items:center; justify-content:center; color:#07131f; flex-shrink:0;
}
.tg-ic svg{width:22px; height:22px}
.tg-head b{display:block; color:var(--text-primary); font-size:16px; font-weight:600; line-height:1.3}
.tg-head span{display:block; font-family:var(--font-mono); font-size:11px; color:var(--accent-cyan); letter-spacing:.1em; text-transform:uppercase}
.panel-tg p{color:var(--text-secondary)}

/* ---------- полоса призыва ---------- */
.band{border-top:1px solid var(--border-color); background:var(--bg-secondary)}
.band .wrap{padding-block:52px; display:flex; gap:30px; align-items:center; justify-content:space-between; flex-wrap:wrap}
.band > .wrap > div:first-child{flex:1; min-width:300px}
.band h2{max-width:none; white-space:nowrap}
@media (max-width:900px){.band h2{white-space:normal}}
.band p{margin:12px 0 0; color:var(--text-secondary); font-size:16px; max-width:none}
.band .eyebrow{margin-bottom:12px}
.band-cta{display:flex; gap:12px; flex-wrap:wrap}

/* ---------- подвал ---------- */
footer.site{border-top:1px solid var(--border-color); background:var(--bg-primary)}
footer.site .wrap{padding-block:46px 32px; display:grid; grid-template-columns:1.7fr 1fr 1fr 1fr; gap:36px}
@media (max-width:760px){footer.site .wrap{grid-template-columns:1fr 1fr; gap:28px}}
footer .fcol h5{font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:.14em;
  text-transform:uppercase; color:var(--text-muted); margin:0 0 14px}
footer .fcol a{display:block; color:var(--text-secondary); text-decoration:none; font-size:14px; padding:5px 0}
footer .fcol a:hover{color:var(--accent-cyan)}
footer .about img{height:22px; margin-bottom:16px; display:block}
footer .about p{font-size:14px; color:var(--text-muted); margin:0; max-width:36ch; line-height:1.6}
.legal{border-top:1px solid var(--border-color)}
.legal .wrap{padding-block:18px 26px; display:flex; gap:18px; justify-content:space-between; flex-wrap:wrap;
  font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted)}

/* надстрочная метка: перебивает .phead p и .band p, которые выше по специфичности */
.phead .eyebrow,
.band .eyebrow,
.section-head .eyebrow,
.panel .eyebrow{
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:500;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:#00f5d4;
  margin:0 0 16px;
  max-width:none;
  line-height:1.4;
}

@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ====================================================================
   Macro.Legal: надстройка над общей системой Macro 2B.
   Новых цветов и шрифтов нет, только блоки, которых нет в Digest:
   логотип-лок-ап, поиск по базе, список и карточка НПА, редакции,
   чат ИИ-юриста, уровни экспертизы и калькулятор страниц.
   ==================================================================== */

/* ---------- логотип: знак плюс словесная часть ---------- */
.logo{display:flex; align-items:center; gap:11px; text-decoration:none}
.logo .mark{height:22px; width:auto; display:block}
.logo .word{
  font-family:var(--font-sans); font-weight:700; font-size:15px; letter-spacing:.17em;
  text-transform:uppercase; color:var(--text-primary); white-space:nowrap; line-height:1;
}
.logo .word em{font-style:normal; color:var(--accent-cyan)}
footer .about .logo{margin-bottom:16px}
footer .about .logo .mark{height:19px}
footer .about .logo .word{font-size:13px}

/* ---------- поиск по базе ---------- */
.hsearch{display:flex; gap:10px; flex-wrap:wrap; margin-top:30px; max-width:760px}
.hsearch .fld{flex:1; min-width:240px; position:relative; display:flex; align-items:center}
.hsearch .fld svg{position:absolute; left:16px; width:17px; height:17px; color:var(--text-muted)}
.hsearch input{
  width:100%; border:1px solid var(--border-color); border-radius:var(--radius-md);
  background:var(--bg-card); color:var(--text-primary);
  font-family:var(--font-sans); font-size:16px; padding:15px 16px 15px 44px;
}
.hsearch input::placeholder{color:var(--text-muted)}
.hsearch input:focus{border-color:var(--accent-cyan); outline:none}
.hsearch .btn{padding-inline:28px}
.hints{display:flex; gap:8px; flex-wrap:wrap; margin-top:16px; align-items:center}
.hints span{font-family:var(--font-mono); font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--text-muted); margin-right:4px}
.hints a{
  border:1px dashed var(--border-color); border-radius:999px; padding:6px 13px;
  font-size:13px; color:var(--text-secondary); text-decoration:none;
}
.hints a:hover{border-color:var(--accent-cyan); color:var(--accent-cyan); border-style:solid}

/* ---------- список документов базы ---------- */
.docs{display:grid; gap:12px}
.doc{
  display:block; text-decoration:none; background:var(--gradient-card);
  border:1px solid var(--border-color); border-radius:var(--radius-md);
  padding:18px 20px; transition:border-color .15s, transform .15s; position:relative;
}
.doc:hover{border-color:rgba(0,245,212,.3); transform:translateY(-1px)}
.doc .top{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px}
.doc h3{font-size:17px; font-weight:600; line-height:1.4; margin:0; letter-spacing:-.01em}
.doc:hover h3{color:var(--accent-cyan)}
.doc .mt{
  display:flex; gap:16px; flex-wrap:wrap; margin-top:11px; padding-top:11px;
  border-top:1px solid var(--border-color);
  font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted);
}
.doc .mt b{font-weight:500; color:var(--text-secondary)}
.pill.act{background:rgba(0,245,212,.1); color:var(--accent-cyan); border:1px solid rgba(0,245,212,.22)}
.pill.old{background:var(--bg-secondary); color:var(--text-muted); border:1px solid var(--border-color)}
.pill.draft{background:rgba(123,97,255,.14); color:#a593ff; border:1px solid rgba(123,97,255,.3)}
.pill.soon{background:rgba(255,159,67,.12); color:var(--accent-orange); border:1px solid rgba(255,159,67,.26)}
.found{font-family:var(--font-mono); font-size:12.5px; color:var(--text-muted); margin:0 0 18px}
.found b{color:var(--text-primary); font-weight:500}

/* ---------- фильтры базы ---------- */
.filters{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-lg); padding:20px; margin-bottom:22px}
.filters .row{display:grid; grid-template-columns:repeat(auto-fit,minmax(176px,1fr)); gap:14px}
.filters .foot{display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin-top:18px; padding-top:16px; border-top:1px solid var(--border-color)}
.filters .reset{background:none; border:0; color:var(--text-muted); font-size:13.5px; cursor:pointer; font-family:var(--font-sans); padding:0}
.filters .reset:hover{color:var(--accent-cyan)}

/* ---------- карточка акта ---------- */
.act-head{border-bottom:1px solid var(--border-color); padding-bottom:26px; margin-bottom:26px}
.act-head .top{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:16px}
.act-head h1{font-size:clamp(24px,3.2vw,34px)}
.act-head .req{
  display:flex; gap:22px; flex-wrap:wrap; margin-top:18px;
  font-family:var(--font-mono); font-size:12.5px; color:var(--text-muted);
}
.act-head .req b{color:var(--text-secondary); font-weight:500}
.act-tools{display:flex; gap:10px; flex-wrap:wrap; margin-top:22px}

.revs{display:grid; gap:0; margin:0}
.revs a{
  display:flex; gap:14px; align-items:baseline; justify-content:space-between;
  padding:11px 0; border-bottom:1px solid var(--border-color); text-decoration:none; font-size:14px;
}
.revs a:last-child{border:0; padding-bottom:0}
.revs .dt{font-family:var(--font-mono); font-size:12.5px; color:var(--text-primary)}
.revs .ch{color:var(--text-muted); font-size:13px; text-align:right}
.revs a.now .dt{color:var(--accent-cyan)}
.revs a:hover .ch{color:var(--text-secondary)}

.toc{display:grid}
.toc a{
  display:block; padding:9px 0 9px 14px; border-left:2px solid var(--border-color);
  color:var(--text-secondary); text-decoration:none; font-size:14px; line-height:1.45;
}
.toc a:hover{border-color:var(--accent-cyan); color:var(--accent-cyan)}
.toc a.on{border-color:var(--accent-cyan); color:var(--text-primary); font-weight:500}

.act{max-width:840px}
.act h2{font-size:21px; margin:38px 0 16px; padding-bottom:12px; border-bottom:1px solid var(--border-color)}
.act h3{font-size:17px; margin:26px 0 10px}
.act p{margin:0 0 12px; font-size:15.5px; line-height:1.8}
.act .pnum{
  font-family:var(--font-mono); font-size:12.5px; color:var(--text-muted);
  margin-right:8px; font-variant-numeric:tabular-nums;
}
.act .edited{
  background:rgba(0,245,212,.07); border-left:2px solid var(--accent-cyan);
  padding:12px 16px; border-radius:0 var(--radius-sm) var(--radius-sm) 0; margin:0 0 14px;
}
.act .edited .tag{
  display:block; font-family:var(--font-mono); font-size:10.5px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--accent-cyan); margin-bottom:6px;
}
.act .note{
  font-family:var(--font-mono); font-size:12px; color:var(--text-muted);
  padding:10px 0 0; line-height:1.6;
}

/* ---------- чат ИИ-юриста ---------- */
.chat{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-lg); overflow:hidden}
.chat .bar{
  display:flex; gap:12px; justify-content:space-between; align-items:center; flex-wrap:wrap;
  padding:13px 20px; border-bottom:1px solid var(--border-color); background:var(--bg-secondary);
  font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted);
}
.chat .bar b{color:var(--accent-cyan); font-weight:500}
.chat .body{padding:20px; display:grid; gap:16px; align-content:start; min-height:170px}
.msg{display:flex; gap:12px; max-width:92%}
.msg .av{
  width:30px; height:30px; border-radius:var(--radius-sm); flex-shrink:0; display:flex;
  align-items:center; justify-content:center; font-family:var(--font-mono); font-size:11px; font-weight:700;
}
.msg.me{margin-left:auto; flex-direction:row-reverse}
.msg.me .av{background:var(--bg-card-hover); color:var(--text-secondary); border:1px solid var(--border-color)}
.msg.ai .av{background:var(--gradient-main); color:#07131f}
.msg .txt{
  background:var(--bg-primary); border:1px solid var(--border-color); border-radius:var(--radius-md);
  padding:13px 16px; font-size:14.5px; line-height:1.65; color:var(--text-secondary);
}
.msg.me .txt{background:var(--bg-card-hover); color:var(--text-primary)}
.msg .txt p{margin:0 0 10px}
.msg .txt p:last-child{margin:0}
.cites{display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; padding-top:12px; border-top:1px solid var(--border-color)}
.cites a{
  display:inline-flex; align-items:center; gap:7px; text-decoration:none;
  background:rgba(0,245,212,.08); border:1px solid rgba(0,245,212,.2); border-radius:999px;
  padding:5px 12px; font-family:var(--font-mono); font-size:11.5px; color:var(--accent-cyan);
}
.cites a:hover{background:rgba(0,245,212,.16)}
.chat .ask{display:flex; gap:10px; padding:16px 20px; border-top:1px solid var(--border-color); flex-wrap:wrap}
.chat .ask input{
  flex:1; min-width:200px; border:1px solid var(--border-color); border-radius:var(--radius-sm);
  background:var(--bg-primary); color:var(--text-primary); font-family:var(--font-sans);
  font-size:14.5px; padding:12px 14px;
}
.chat .ask input::placeholder{color:var(--text-muted)}
.typing{display:inline-flex; gap:4px; align-items:center}
.typing i{width:5px; height:5px; border-radius:50%; background:var(--accent-cyan); opacity:.4; animation:blink 1.1s infinite}
.typing i:nth-child(2){animation-delay:.18s}
.typing i:nth-child(3){animation-delay:.36s}
@keyframes blink{0%,100%{opacity:.25}50%{opacity:1}}
@media (prefers-reduced-motion:reduce){.typing i{animation:none; opacity:.6}}

/* ---------- уровни экспертизы ---------- */
.lvl{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-lg); padding:24px; display:flex; flex-direction:column; gap:14px}
.lvl .k{
  display:inline-flex; align-items:center; gap:8px; align-self:flex-start;
  font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:.12em; text-transform:uppercase;
  color:var(--accent-cyan); background:rgba(0,245,212,.09); border:1px solid rgba(0,245,212,.22);
  border-radius:999px; padding:5px 12px;
}
.lvl h3{font-size:20px; margin:0}
.lvl ul{list-style:none; margin:0; padding:0; flex:1}
.lvl li{position:relative; padding:9px 0 9px 20px; border-bottom:1px solid var(--border-color); font-size:14.5px; line-height:1.55}
.lvl li:last-child{border:0}
.lvl li::before{content:""; position:absolute; left:0; top:17px; width:5px; height:5px; border-radius:50%; background:var(--accent-cyan)}

/* ---------- калькулятор объема ---------- */
.calc{display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:24px; align-items:start}
@media (max-width:860px){.calc{grid-template-columns:1fr}}
.calc-out{
  background:var(--gradient-card); border:1px solid rgba(0,245,212,.25); border-radius:var(--radius-lg);
  padding:24px; position:relative; overflow:hidden;
}
.calc-out::before{content:""; position:absolute; inset:0 0 auto; height:2px; background:var(--gradient-main)}
.calc-out .big{
  font-family:var(--font-mono); font-size:34px; font-weight:700; color:var(--text-primary);
  letter-spacing:-.03em; font-variant-numeric:tabular-nums; line-height:1.1;
}
.calc-out .big em{font-style:normal; font-size:15px; color:var(--text-muted); font-weight:400; margin-left:7px}
.calc-out .sub{font-size:13.5px; color:var(--text-muted); margin:8px 0 18px; line-height:1.55}
.meter{height:6px; border-radius:4px; background:var(--border-color); overflow:hidden; margin-bottom:9px}
.meter span{display:block; height:100%; background:var(--gradient-main); transition:width .25s}
.meter-note{font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted)}

/* ---------- процесс в три шага ---------- */
.flow{display:grid; grid-template-columns:repeat(auto-fit,minmax(215px,1fr)); gap:14px; counter-reset:f}
.flow div{
  background:var(--bg-primary); border:1px solid var(--border-color); border-radius:var(--radius-md);
  padding:18px; position:relative;
}
.flow b{display:block; color:var(--text-primary); font-size:15px; font-weight:600; margin-bottom:6px}
.flow p{margin:0; font-size:13.5px; color:var(--text-muted); line-height:1.6}
.flow div::after{
  counter-increment:f; content:counter(f); position:absolute; top:14px; right:16px;
  font-family:var(--font-mono); font-size:12px; color:var(--border-color); font-weight:700;
}

/* ---------- мелочи ---------- */
.two{display:grid; grid-template-columns:repeat(auto-fit,minmax(290px,1fr)); gap:20px}
.muted-note{font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted); line-height:1.6; margin:18px 0 0}
.tier .price b.na{font-size:22px}
.aside .panel h4 + .btn{margin-top:4px}

/* ====================================================================
   База НПА: раскладка рубрикатора в логике ИПС «Әділет»
   ==================================================================== */
.layout-l{display:grid; grid-template-columns:296px minmax(0,1fr); gap:34px; align-items:start}
@media (max-width:1000px){.layout-l{grid-template-columns:1fr; gap:24px}}
.rail{display:grid; gap:14px; position:sticky; top:104px}
@media (max-width:1000px){.rail{position:static}}
.fgroup{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-md); overflow:hidden}
.fgroup > summary{
  cursor:pointer; list-style:none; padding:14px 16px; display:flex; justify-content:space-between; align-items:center; gap:12px;
  font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:.12em; text-transform:uppercase; color:var(--text-muted);
}
.fgroup > summary::-webkit-details-marker{display:none}
.fgroup > summary::after{content:"+"; color:var(--accent-cyan); font-size:17px; line-height:1}
.fgroup[open] > summary::after{content:"\2212"}
.fgroup[open] > summary{color:var(--text-primary); border-bottom:1px solid var(--border-color)}
.fgroup .body{padding:8px 10px 12px}
.fitem{
  display:flex; justify-content:space-between; align-items:baseline; gap:10px; width:100%;
  background:none; border:0; text-align:left; cursor:pointer; padding:7px 8px; border-radius:var(--radius-sm);
  font-family:var(--font-sans); font-size:13.5px; color:var(--text-secondary); line-height:1.4;
}
.fitem:hover{background:var(--bg-card-hover); color:var(--accent-cyan)}
.fitem i{font-style:normal; font-family:var(--font-mono); font-size:11px; color:var(--text-muted); flex-shrink:0}
.fitem[aria-pressed="true"]{background:rgba(0,245,212,.1); color:var(--accent-cyan); font-weight:500}
.fitem[aria-pressed="true"] i{color:var(--accent-cyan)}
.fmore{
  width:100%; margin-top:4px; background:none; border:0; cursor:pointer; padding:8px;
  font-family:var(--font-sans); font-size:13px; color:var(--text-muted); text-align:left;
}
.fmore:hover{color:var(--accent-cyan)}

.searchbox{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-lg); padding:20px}
.searchbox .line{display:flex; gap:10px; flex-wrap:wrap}
.searchbox .line .fld{flex:1; min-width:220px; position:relative; display:flex; align-items:center}
.searchbox .line .fld svg{position:absolute; left:15px; width:16px; height:16px; color:var(--text-muted)}
.searchbox input[type="search"]{
  width:100%; border:1px solid var(--border-color); border-radius:var(--radius-sm); background:var(--bg-primary);
  color:var(--text-primary); font-family:var(--font-sans); font-size:15px; padding:13px 14px 13px 42px;
}
.searchbox input[type="search"]:focus{border-color:var(--accent-cyan); outline:none}
.modes{display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; align-items:center}
.modes .hintline{font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted); margin-left:auto}
.adv{margin-top:16px; padding-top:16px; border-top:1px solid var(--border-color)}
.adv[hidden]{display:none}
.adv .grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:14px}
.adv .foot{display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-top:16px}
.advtoggle{background:none; border:0; cursor:pointer; color:var(--accent-cyan); font-family:var(--font-sans); font-size:13.5px; padding:0}
.advtoggle:hover{text-decoration:underline}

.sortbar{display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin:22px 0 14px}
.sortbar .n{font-family:var(--font-mono); font-size:12.5px; color:var(--text-muted)}
.sortbar .n b{color:var(--text-primary); font-weight:500}
.sortbar .sel{margin-left:auto; display:flex; align-items:center; gap:9px}
.sortbar .sel label{font-family:var(--font-mono); font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--text-muted)}
.sortbar select{
  border:1px solid var(--border-color); border-radius:var(--radius-sm); background:var(--bg-card);
  color:var(--text-primary); font-family:var(--font-sans); font-size:13.5px; padding:8px 11px;
}
.chosen{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:16px}
.chosen .lbl{font-family:var(--font-mono); font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--text-muted)}

.dl{display:grid; gap:0}
.dl .row{display:block; text-decoration:none; padding:18px 0; border-bottom:1px solid var(--border-color)}
.dl .row:first-child{padding-top:4px}
.dl .row h3{font-size:16.5px; font-weight:600; line-height:1.45; margin:0 0 8px; letter-spacing:-.005em}
.dl .row:hover h3{color:var(--accent-cyan)}
.dl .req{font-family:var(--font-mono); font-size:12px; color:var(--text-muted); line-height:1.6; margin:0 0 9px}
.dl .tags{display:flex; gap:9px; flex-wrap:wrap; align-items:center}
.dl .f{font-size:12.5px; color:var(--text-muted)}
.dl .f b{color:var(--text-secondary); font-weight:500}

.pager{display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-top:26px}
.pager a, .pager span{
  min-width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--border-color); border-radius:var(--radius-sm); background:var(--bg-card);
  color:var(--text-secondary); text-decoration:none; font-family:var(--font-mono); font-size:13px; padding-inline:10px;
}
.pager a:hover{border-color:var(--accent-cyan); color:var(--accent-cyan)}
.pager .now{background:var(--accent-cyan); border-color:var(--accent-cyan); color:#07131f; font-weight:600}
.pager .dots{border:0; background:none; color:var(--text-muted)}
.chosen[hidden]{display:none}
.reset{background:none; border:0; padding:0; cursor:pointer; font-family:var(--font-sans); font-size:13.5px; color:var(--text-muted)}
.reset:hover{color:var(--accent-cyan)}

[hidden]{display:none !important}

/* ====================================================================
   Темы: темная по умолчанию, светлая по переключателю в меню
   ==================================================================== */
:root{--header-bg:rgba(10,10,15,.88)}
header.site{background:var(--header-bg)}

:root[data-theme="light"]{
  --bg-primary:#ffffff;
  --bg-secondary:#f4f6fa;
  --bg-card:#ffffff;
  --bg-card-hover:#eef2f7;
  --border-color:#e2e7ef;
  --text-primary:#0f172a;
  --text-secondary:#47536b;
  --text-muted:#78849a;
  --accent-cyan:#0a9b85;
  --accent-purple:#5b43d6;
  --accent-red:#d64545;
  --accent-orange:#b4701a;
  --gradient-card:linear-gradient(180deg,#ffffff 0%,#fbfcfe 100%);
  --header-bg:rgba(255,255,255,.92);
  color-scheme:light;
}
:root[data-theme="light"] .eyebrow,
:root[data-theme="light"] .phead .eyebrow,
:root[data-theme="light"] .band .eyebrow,
:root[data-theme="light"] .section-head .eyebrow,
:root[data-theme="light"] .panel .eyebrow{color:var(--accent-cyan)}
:root[data-theme="light"] .btn-grad{color:#042b25}
:root[data-theme="light"] .chip[aria-pressed="true"],
:root[data-theme="light"] .toggle button[aria-pressed="true"],
:root[data-theme="light"] .pager .now{background:var(--accent-cyan); border-color:var(--accent-cyan); color:#fff}
:root[data-theme="light"] .toggle button[aria-pressed="true"] .off{background:#fff; color:var(--accent-cyan)}
:root[data-theme="light"] .stat b{background:none; color:var(--text-primary); -webkit-text-fill-color:currentColor}
:root[data-theme="light"] .modal .scrim{background:rgba(15,23,42,.45)}
:root[data-theme="light"] .switcher a.on{background:var(--bg-secondary)}
:root[data-theme="light"] .doc:hover,
:root[data-theme="light"] .card:hover{border-color:var(--accent-cyan)}

.themebtn{
  width:36px; height:36px; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--border-color); border-radius:var(--radius-sm); background:var(--bg-card);
  color:var(--text-secondary); cursor:pointer; padding:0;
}
.themebtn:hover{border-color:var(--accent-cyan); color:var(--accent-cyan)}
.themebtn svg{width:16px; height:16px}

/* фильтры справа */
.layout-r{display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:34px; align-items:start}
@media (max-width:1000px){.layout-r{grid-template-columns:1fr; gap:24px}}

/* ====================================================================
   ИИ-юрист: рабочий экран - история диалогов, чат, источники
   ==================================================================== */
.app{display:grid; grid-template-columns:296px minmax(0,1fr); border-top:1px solid var(--border-color); min-height:calc(100vh - 112px)}
@media (max-width:980px){.app{grid-template-columns:1fr}}

.side{border-right:1px solid var(--border-color); padding:20px 18px; display:flex; flex-direction:column; gap:22px; background:var(--bg-secondary)}
@media (max-width:980px){.side{border-right:0; border-bottom:1px solid var(--border-color)}}
.side .newchat{width:100%; padding:13px 18px; font-size:14.5px}
.hist{display:grid; gap:18px; flex:1; min-height:0; overflow-y:auto}
.hist h5{font-family:var(--font-mono); font-size:10.5px; font-weight:500; letter-spacing:.16em; text-transform:uppercase; color:var(--text-muted); margin:0 0 10px}
.hitem{
  display:block; text-decoration:none; padding:12px 14px; border-radius:var(--radius-md);
  border:1px solid transparent; margin-bottom:6px;
}
.hitem:hover{background:var(--bg-card-hover)}
.hitem.on{background:var(--bg-card); border-color:var(--border-color)}
.hitem b{display:block; font-size:14px; font-weight:500; color:var(--text-secondary); line-height:1.4;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.hitem.on b{color:var(--text-primary)}
.hitem span{display:block; font-family:var(--font-mono); font-size:11px; color:var(--text-muted); margin-top:5px}
.quota-box{border-top:1px solid var(--border-color); padding-top:18px}
.quota-box .top{display:flex; justify-content:space-between; align-items:baseline; font-size:13.5px; color:var(--text-secondary)}
.quota-box .top b{font-family:var(--font-mono); color:var(--text-primary); font-weight:500}
.quota-box .bar{height:4px; border-radius:4px; background:var(--border-color); overflow:hidden; margin:10px 0 14px}
.quota-box .bar span{display:block; height:100%; background:var(--gradient-main)}
.quota-box a{font-size:13.5px; color:var(--accent-cyan); text-decoration:none}
.quota-box a:hover{text-decoration:underline}

.chatmain{display:flex; flex-direction:column; min-height:0}
.chatbar{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 28px; flex-wrap:wrap}
.chatbar .mode{font-family:var(--font-mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted)}
.segsmall{display:inline-flex; border:1px solid var(--border-color); border-radius:999px; padding:3px; gap:3px; background:var(--bg-card)}
.segsmall button{border:0; background:transparent; cursor:pointer; font-family:var(--font-sans); font-weight:500; font-size:13px;
  padding:7px 16px; border-radius:999px; color:var(--text-secondary)}
.segsmall button[aria-pressed="true"]{background:var(--bg-card-hover); color:var(--text-primary); border:1px solid var(--accent-purple)}

.stream{flex:1; overflow-y:auto; padding:10px 28px 28px; display:grid; align-content:start; gap:20px}
@media (max-width:620px){.chatbar,.stream{padding-inline:16px}}
.empty{display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; flex:1; padding:40px 20px}
.empty h2{font-size:clamp(28px,3.6vw,38px); letter-spacing:-.03em}
.empty h2 em{font-style:normal; background:var(--gradient-main); -webkit-background-clip:text; background-clip:text; color:transparent}
.empty p{margin:16px auto 0; max-width:62ch; font-size:16px; color:var(--text-secondary); line-height:1.6}
.qcards{display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:14px; margin-top:34px; width:100%; max-width:860px}
.qcard{
  text-align:left; cursor:pointer; background:var(--bg-card); border:1px solid var(--border-color);
  border-radius:var(--radius-md); padding:18px 20px; color:var(--text-secondary);
  font-family:var(--font-sans); font-size:14.5px; line-height:1.5;
}
.qcard:hover{border-color:var(--accent-cyan); color:var(--text-primary)}

.ask-me{margin-left:auto; max-width:76%; background:var(--bg-card-hover); border:1px solid var(--border-color);
  border-radius:var(--radius-md); padding:13px 18px; font-size:15px; color:var(--text-primary)}
.answer{display:grid; gap:16px}
.answer > p{margin:0; font-size:15.5px; line-height:1.7; color:var(--text-secondary)}
.srccard{
  background:var(--gradient-card); border:1px solid var(--border-color); border-left:3px solid var(--accent-purple);
  border-radius:var(--radius-md); padding:20px 22px;
}
.srccard .ttl{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px}
.srccard .ttl b{font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--text-primary)}
.srccard .st{font-family:var(--font-mono); font-size:10.5px; letter-spacing:.1em; padding:3px 9px; border-radius:999px;
  background:rgba(0,245,212,.12); color:var(--accent-cyan); border:1px solid rgba(0,245,212,.25)}
.srccard p{margin:0 0 14px; font-size:15px; line-height:1.7; color:var(--text-secondary)}
.srccard .path{font-size:12.5px; color:var(--text-muted); line-height:1.6; margin:0 0 12px}
.srccard .foot{display:flex; gap:18px; align-items:center; flex-wrap:wrap; font-family:var(--font-mono); font-size:12px; color:var(--text-muted)}
.srccard .foot a{color:var(--accent-cyan); text-decoration:none}
.srccard .foot a:hover{text-decoration:underline}

.srcsline{display:flex; align-items:center; gap:12px; font-family:var(--font-mono); font-size:11.5px;
  letter-spacing:.14em; text-transform:uppercase; color:var(--text-muted); cursor:pointer;
  background:none; border:0; padding:8px 0; width:100%; text-align:left}
.srcsline b{color:var(--text-primary); font-weight:600}
.srcsline:hover{color:var(--accent-cyan)}
.followups{display:flex; gap:10px; flex-wrap:wrap}
.followups button{
  background:var(--bg-card); border:1px solid var(--border-color); border-radius:999px; padding:9px 16px;
  font-family:var(--font-sans); font-size:13.5px; color:var(--text-secondary); cursor:pointer;
}
.followups button:hover{border-color:var(--accent-cyan); color:var(--accent-cyan)}
.answer .note{margin:0; font-size:13px; color:var(--text-muted); line-height:1.6}
.actions{display:flex; align-items:center; gap:14px; padding-top:4px}
.actions button{background:none; border:0; cursor:pointer; color:var(--text-muted); display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-sans); font-size:13.5px; padding:6px 0}
.actions button:hover{color:var(--accent-cyan)}
.actions .right{margin-left:auto; display:flex; gap:10px}
.actions svg{width:16px; height:16px}

.composer{padding:0 28px 22px; display:grid; gap:10px}
@media (max-width:620px){.composer{padding-inline:16px}}
.composer .box{position:relative; display:flex; align-items:center}
.composer input{
  width:100%; border:1px solid var(--border-color); border-radius:var(--radius-lg); background:var(--bg-card);
  color:var(--text-primary); font-family:var(--font-sans); font-size:15.5px; padding:19px 66px 19px 22px;
}
.composer input:focus{border-color:var(--accent-cyan); outline:none}
.composer input::placeholder{color:var(--text-muted)}
.composer .send{
  position:absolute; right:12px; width:40px; height:40px; border-radius:var(--radius-md); border:1px solid var(--border-color);
  background:var(--bg-card-hover); color:var(--text-primary); cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.composer .send:hover{background:var(--gradient-main); color:#07131f; border-color:transparent}
.composer .send svg{width:17px; height:17px}
.composer .left{font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted); text-align:right}
.composer .left b{color:var(--text-secondary); font-weight:500}

/* ====================================================================
   Правовой дайджест: верстка выпуска по рабочему шаблону legal_*.html
   ==================================================================== */
.dmeta{margin:0 0 18px}
.dmeta .kind{color:var(--accent-cyan); font-size:21px; font-weight:800; letter-spacing:-.01em; line-height:1.2}
.dmeta .date{color:var(--accent-cyan); font-size:15px; font-weight:600; margin-top:4px}
.dmeta .read{display:flex; align-items:center; gap:7px; color:var(--text-muted); font-size:13.5px; margin-top:8px}
.dmeta .read svg{width:14px; height:14px}
.dhead h1{font-size:clamp(26px,3.4vw,38px); line-height:1.18; margin-bottom:20px}

.dbadges{display:flex; gap:8px; flex-wrap:wrap; margin:0 0 30px}
.dbadge{font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; padding:6px 14px; border-radius:999px}
.dbadge.sphere{background:rgba(123,97,255,.12); color:#a090d0; border:1px solid rgba(123,97,255,.3)}
.dbadge.high{background:rgba(255,107,107,.08); color:var(--accent-red); border:1px solid var(--accent-red)}
.dbadge.medium{background:rgba(255,159,67,.08); color:var(--accent-orange); border:1px solid var(--accent-orange)}
.dbadge.low{background:rgba(0,245,212,.08); color:var(--accent-cyan); border:1px solid var(--accent-cyan)}
.dbadge.draft{background:rgba(255,159,67,.14); color:var(--accent-orange); border:1px solid rgba(255,159,67,.4)}

.dstats{background:var(--bg-card); border:1px solid var(--border-color); border-radius:var(--radius-lg); padding:20px; margin:0 0 34px}
.dstat-grid{display:flex; gap:12px; flex-wrap:wrap}
.dstat{flex:1 1 120px; text-align:center; background:var(--bg-secondary); border:1px solid var(--border-color);
  border-radius:var(--radius-md); padding:18px 8px}
.dstat b{display:block; font-family:var(--font-mono); font-size:34px; font-weight:700; color:var(--accent-cyan); line-height:1; font-variant-numeric:tabular-nums}
.dstat span{display:block; font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); margin-top:8px}
.dstat-note{margin:16px 0 0; padding-top:14px; border-top:1px solid var(--border-color); font-size:13.5px; color:var(--text-secondary); line-height:1.6}
@media (max-width:600px){
  .dstat-grid{flex-direction:column}
  .dstat{display:flex; align-items:baseline; justify-content:center; gap:10px; padding:14px}
  .dstat b{font-size:26px} .dstat span{margin-top:0}
}

.sec{display:flex; align-items:center; gap:12px; font-size:22px; font-weight:700; color:var(--text-primary); margin:40px 0 20px}
.sec .bar{width:4px; height:22px; border-radius:2px; background:var(--gradient-main); flex-shrink:0}

.kc{background:var(--gradient-card); border:1px solid var(--border-color); border-left:3px solid var(--accent-purple);
  border-radius:var(--radius-lg); padding:22px 24px; margin:0 0 16px}
.kc-head{display:flex; justify-content:space-between; gap:14px; align-items:flex-start; flex-wrap:wrap; margin-bottom:10px}
.kc-title{flex:1 1 300px; font-size:17px; font-weight:700; color:var(--text-primary); line-height:1.4}
.kc-req{font-family:var(--font-mono); font-size:11.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted); margin:0 0 14px}
.kc p{margin:0 0 12px; font-size:15px; color:var(--text-secondary); line-height:1.7}
.kc-impl{font-size:14.5px; color:var(--text-primary); background:rgba(0,245,212,.06); border-left:3px solid var(--accent-cyan);
  border-radius:0 var(--radius-md) var(--radius-md) 0; padding:13px 16px; margin:0 0 12px; line-height:1.65}
.kc-impl b{color:var(--accent-cyan)}
.kc-aff{font-size:13.5px; color:var(--text-secondary); background:var(--bg-secondary); border:1px solid var(--border-color);
  border-radius:var(--radius-md); padding:11px 14px; margin:0 0 12px; line-height:1.6}
.kc-aff b{color:var(--text-primary); font-weight:600}
.dchip{font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; padding:5px 12px; border-radius:999px; white-space:nowrap}
.dchip.adopted{background:rgba(0,245,212,.12); color:var(--accent-cyan); border:1px solid rgba(0,245,212,.3)}
.dchip.project{background:rgba(255,159,67,.12); color:var(--accent-orange); border:1px solid rgba(255,159,67,.3)}
.doc-link{font-size:13.5px; font-weight:600; color:var(--accent-cyan); text-decoration:none}
.doc-link:hover{text-decoration:underline}
@media (max-width:600px){.kc-head{flex-direction:column; align-items:flex-start; gap:8px}}

.di{background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-md); padding:16px 20px; margin:0 0 10px}
.di-head{display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; align-items:baseline}
.di-meta{font-family:var(--font-mono); font-size:11.5px; color:var(--text-muted); white-space:nowrap}
.di-ess{font-size:14px; color:var(--text-secondary); line-height:1.55; margin-top:7px}
.di-aff{font-size:13px; color:var(--text-muted); margin-top:5px}
@media (max-width:600px){.di-head{flex-direction:column; gap:4px}}

.closing{background:var(--bg-secondary); border-left:4px solid var(--accent-cyan); border-radius:0 var(--radius-md) var(--radius-md) 0;
  padding:14px 18px; margin:30px 0 0; color:var(--text-secondary); font-size:14px; line-height:1.65}
.side{min-width:0}
.hist{grid-template-columns:minmax(0,1fr)}
.hitem{min-width:0; overflow:hidden}

/* ====================================================================
   База НПА: подписи рубрикаторов и полей - основным шрифтом,
   моноширинный остается только для чисел и реквизитов акта
   ==================================================================== */
[data-page="base"] .fgroup > summary{
  font-family:var(--font-sans); font-size:15px; font-weight:600; letter-spacing:0;
  text-transform:none; color:var(--text-primary); padding:15px 16px;
}
[data-page="base"] .fgroup > summary::after{font-size:19px}
[data-page="base"] .fitem{font-size:14.5px; padding:8px}
[data-page="base"] .fitem i{font-size:12px}
[data-page="base"] .fmore{font-size:13.5px}
[data-page="base"] .panel h4{
  font-family:var(--font-sans); font-size:15px; font-weight:600; letter-spacing:0;
  text-transform:none; color:var(--text-primary);
}
[data-page="base"] .panel .figs span{font-size:14px}
[data-page="base"] .field label,
[data-page="base"] .sortbar .sel label,
[data-page="base"] .chosen .lbl{
  font-family:var(--font-sans); font-size:13px; font-weight:500; letter-spacing:0;
  text-transform:none; color:var(--text-secondary);
}
[data-page="base"] .sortbar .n{font-family:var(--font-sans); font-size:14px; color:var(--text-secondary)}
[data-page="base"] .hintline{font-family:var(--font-sans); font-size:13px}
[data-page="base"] .dl .req{font-family:var(--font-sans); font-size:13.5px; color:var(--text-secondary)}
[data-page="base"] .dl .f{font-size:13px}
[data-page="base"] .pager a, [data-page="base"] .pager span{font-family:var(--font-sans); font-size:14px}

/* ====================================================================
   Карточка дайджеста в ленте (формат рабочих карточек Macro)
   ==================================================================== */
.dcards{display:grid; gap:22px}
.dcard{
  position:relative; display:block; text-decoration:none; overflow:hidden;
  background:var(--gradient-card); border:1px solid var(--border-color); border-radius:var(--radius-xl);
  transition:border-color .18s, transform .18s;
}
.dcard::before{content:""; position:absolute; inset:0 0 auto; height:3px; background:linear-gradient(90deg,#ff9f43,#ffd166)}
.dcard.high::before{background:linear-gradient(90deg,#ff6b6b,#ff9f43)}
.dcard.low::before{background:var(--gradient-main)}
.dcard:hover{border-color:var(--bg-card-hover); transform:translateY(-2px)}
.dcard-top{display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:22px 24px 0}
.dcount{
  display:inline-flex; align-items:center; gap:7px; font-family:var(--font-mono); font-size:12px; font-weight:600;
  padding:7px 14px; border-radius:999px; background:rgba(123,97,255,.16); color:#a593ff; border:1px solid rgba(123,97,255,.34);
}
.dcount svg{width:13px; height:13px}
.dcard-cover{
  height:170px; margin:-26px 0 0; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(120% 120% at 50% 40%, rgba(123,97,255,.18), transparent 62%);
}
.dcard-cover .ico{
  width:84px; height:84px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:rgba(123,97,255,.14); border:1px solid rgba(123,97,255,.28); color:#a593ff;
}
.dcard-cover .ico svg{width:34px; height:34px}
.dcard-body{padding:0 24px 22px}
.dcard-tags{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:18px}
.dcard-read{display:inline-flex; align-items:center; gap:7px; margin-left:auto; font-size:13px; color:var(--text-muted); white-space:nowrap}
.dcard-read svg{width:14px; height:14px}
.dbadge.week{background:rgba(0,245,212,.12); color:var(--accent-cyan); border:1px solid rgba(0,245,212,.3)}
.dcard h3{font-size:21px; font-weight:700; line-height:1.35; letter-spacing:-.015em; margin:0 0 14px}
.dcard:hover h3{color:var(--accent-cyan)}
.dcard > .dcard-body > p{margin:0 0 18px; font-size:15px; color:var(--text-secondary); line-height:1.7}
.dpoints{list-style:none; margin:0 0 20px; padding:0; display:grid; gap:8px}
.dpoints li{position:relative; padding-left:18px; font-size:14px; color:var(--text-muted); line-height:1.6}
.dpoints li::before{content:""; position:absolute; left:0; top:9px; width:6px; height:6px; border-radius:50%; background:var(--accent-purple)}
.dcard-foot{
  display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
  padding-top:16px; border-top:1px solid var(--border-color);
}
.dcard-foot .date{font-size:13.5px; color:var(--text-muted)}
.dcard-acts{display:flex; gap:10px}
.dcard-acts span{
  width:38px; height:38px; border-radius:var(--radius-md); display:flex; align-items:center; justify-content:center;
  background:var(--bg-secondary); border:1px solid var(--border-color); color:var(--accent-purple);
}
.dcard-acts span:hover{border-color:var(--accent-purple)}
.dcard-acts svg{width:17px; height:17px}
@media (max-width:620px){
  .dcard-cover{height:130px} .dcard-cover .ico{width:64px; height:64px}
  .dcard h3{font-size:18px}
  .dcard-read{margin-left:0}
}

/* ИИ-юрист в меню - отдельной кнопкой */
nav.main a.nav-ai{
  background:var(--gradient-main); color:#07131f; font-weight:600;
  display:inline-flex; align-items:center; gap:8px;
}
nav.main a.nav-ai::before{content:""; width:6px; height:6px; border-radius:50%; background:#07131f; opacity:.55}
nav.main a.nav-ai:hover{background:var(--gradient-main); color:#07131f; filter:brightness(1.08)}
nav.main a.nav-ai.on{box-shadow:0 0 0 2px rgba(0,245,212,.28)}
:root[data-theme="light"] nav.main a.nav-ai{color:#042b25}
:root[data-theme="light"] nav.main a.nav-ai::before{background:#042b25}

/* ====================================================================
   Логотип из брендкита MACRO 2B v3.0: lk-legal, темная и светлая версии
   ==================================================================== */
.logo{display:flex; align-items:center; gap:0; line-height:0; text-decoration:none}
.logo img{height:24px; width:auto; display:block}
.logo .l-light{display:none}
:root[data-theme="light"] .logo .l-dark{display:none}
:root[data-theme="light"] .logo .l-light{display:block}
footer .about .logo img{height:20px}
footer .about .logo{margin-bottom:16px}
@media (max-width:560px){.logo img{height:20px}}

/* градиент по брендбуку живет в знаке, кнопках и тонких полосах, не в тексте */
.empty h2 em{background:none; color:var(--accent-cyan); -webkit-text-fill-color:currentColor}
