/* Общие стили статей. Импортируется после shared.css */

.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.article-main { min-width: 0; }
.article-aside { position: sticky; top: 90px; }

/* HEAD */
.article-head { margin-bottom: 24px; }
.article-head .eyebrow { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 10px; }
.article-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.8px; line-height: 1.1; }
.article-head .lead { color: var(--muted); margin-top: 12px; max-width: 720px; font-size: 16px; line-height: 1.55; }
.article-head .meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.article-head .meta .dot { width: 3px; height: 3px; background: var(--muted-2); border-radius: 50%; }
.article-head .meta b { color: var(--ink); font-weight: 600; }

/* TL;DR */
.tldr { background: linear-gradient(135deg, var(--hover) 0%, var(--bg) 100%); border: 1px solid var(--line-2); border-radius: 16px; padding: 22px 24px; margin-bottom: 32px; }
.tldr-head { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.tldr-head svg { width: 18px; height: 18px; }
.tldr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tldr li { position: relative; padding-left: 22px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.tldr li::before { content: ''; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--grad-1), var(--grad-2)); }

/* BODY */
.article-body h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.25; margin: 44px 0 14px; scroll-margin-top: 90px; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; letter-spacing: -0.2px; }
.article-body p { font-size: 15px; line-height: 1.65; color: var(--ink-2); margin-bottom: 12px; }
.article-body p + p { margin-top: -4px; }
.article-body strong, .article-body b { color: var(--ink); font-weight: 600; }
.article-body a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(42,31,23,0.3); text-underline-offset: 3px; transition: text-decoration-color .15s; }
.article-body a:hover { text-decoration-color: var(--accent); }
.article-body ul, .article-body ol { margin: 12px 0 16px 22px; }
.article-body li { font-size: 15px; line-height: 1.65; color: var(--ink-2); margin-bottom: 6px; }

/* CALLOUTS */
.callout { border-radius: 14px; padding: 18px 20px 18px 56px; margin: 22px 0; position: relative; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.callout::before { content: ''; position: absolute; left: 18px; top: 18px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; }
.callout.info { background: var(--bg); border: 1px solid var(--line-2); }
.callout.info::before { content: 'i'; background: var(--accent); font-family: Georgia, serif; font-style: italic; }
.callout.warn { background: #fef3c7; border: 1px solid #fde68a; }
.callout.warn::before { content: '!'; background: #d97706; }
.callout.ok { background: var(--hover); border: 1px solid var(--line-2); }
.callout.ok::before { content: '✓'; background: var(--accent); font-size: 13px; }
.callout.hot { background: #fdf3f2; border: 1px solid #f5cdc9; }
.callout.hot::before { content: '!'; background: var(--hot); }
.callout b { color: var(--ink); }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

/* CHECKLIST */
.checklist { background: var(--paper); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 22px 24px; margin: 22px 0; }
.checklist-title { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.checklist ol { list-style: none; padding: 0; margin: 0; counter-reset: chk; display: grid; gap: 10px; }
.checklist li { counter-increment: chk; position: relative; padding-left: 38px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.checklist li::before { content: counter(chk); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--grad-1), var(--grad-2)); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(111,78,55,0.32); }
.checklist li b { color: var(--ink); display: block; margin-bottom: 2px; font-weight: 600; }

/* TOC ASIDE */
.toc { background: var(--paper); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.toc-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: block; padding: 6px 0; padding-left: 22px; font-size: 13px; color: var(--ink-2); line-height: 1.45; position: relative; transition: color .15s; }
.toc a::before { content: counter(t); position: absolute; left: 0; top: 6px; color: var(--muted-2); font-size: 11px; font-weight: 600; }
.toc a:hover { color: var(--accent); }

/* FAQ */
.faq-list { display: grid; gap: 10px; margin-top: 14px; }
.faq-item { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.faq-item[open] { border-color: var(--accent); box-shadow: 0 6px 18px rgba(42,31,23,0.10); }
.faq-item summary { list-style: none; padding: 16px 22px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--accent); transition: transform .2s; flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .a { padding: 0 22px 18px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.faq-item .a p + p { margin-top: 8px; }
.faq-item .a ul, .faq-item .a ol { margin: 8px 0 8px 20px; }

/* CTA CARD */
.cta-card { background: linear-gradient(135deg, var(--ink), var(--ink)); color: #fff; border-radius: 18px; padding: 28px 30px; margin: 36px 0 8px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; box-shadow: 0 16px 40px rgba(42,31,23,0.30); }
.cta-card h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 6px; }
.cta-card p { color: rgba(255,255,255,0.85); font-size: 14px; line-height: 1.55; max-width: 480px; }
.cta-card .btn { background: #fff; color: var(--accent); box-shadow: none; }
.cta-card .btn:hover { background: var(--bg); }

/* RELATED */
.related { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.related-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink); margin-bottom: 14px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-card { background: var(--paper); border-radius: 12px; padding: 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); display: block; transition: transform .15s, box-shadow .15s, border-color .15s; }
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.related-card .cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--accent); margin-bottom: 8px; }
.related-card .ttl { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; }

/* DISCLAIMER */
.disclaimer { margin-top: 28px; font-size: 12px; color: var(--muted); line-height: 1.6; padding: 14px 0 0; border-top: 1px dashed var(--line); }

/* INLINE TABLE */
.t-inline { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 14px 0; background: var(--paper); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.t-inline th, .t-inline td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.t-inline th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); background: var(--bg); }
.t-inline tr:last-child td { border-bottom: none; }
.t-inline tr:hover td { background: var(--hover); }

/* RESPONSIVE */
@media (max-width: 980px) {
  .article-wrap { grid-template-columns: 1fr; gap: 24px; }
  .article-aside { position: static; order: -1; }
  .toc { padding: 14px 16px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .article-body h2 { font-size: 21px; margin-top: 36px; }
  .cta-card { grid-template-columns: 1fr; padding: 22px 22px; text-align: left; }
  .cta-card .btn { justify-self: start; }
  .related-grid { grid-template-columns: 1fr; }
  .callout { padding: 16px 18px 16px 52px; font-size: 14px; }
  .tldr { padding: 18px 20px; }
}

/* ===== HUB SEARCH ===== */
.hub-search { position: relative; margin-bottom: 24px; z-index: 60; }
.hub-search input {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 14px 50px 14px 22px;
  font: inherit; font-size: 15px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.hub-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(111,78,55,0.10);
}
.hub-search input::placeholder { color: var(--muted-2); }
.hub-search .ico {
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.hub-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  max-height: 60vh;
  overflow-y: auto;
  z-index: 100;
}
.hub-search-results:empty { display: none; }
.hub-search-results .hr-item {
  display: block;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: background .12s;
}
.hub-search-results .hr-item:last-child { border-bottom: none; }
.hub-search-results .hr-item:hover,
.hub-search-results .hr-item.is-active { background: var(--hover); }
.hub-search-results .hr-cat {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
  margin-bottom: 4px;
}
.hub-search-results .hr-ttl {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.hub-search-results .hr-ttl mark {
  background: rgba(111,78,55,0.16);
  color: var(--ink);
  padding: 0 2px;
  border-radius: 3px;
}
.hub-search-results .hr-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.hub-search-results .hr-count {
  padding: 8px 18px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

/* ===== HUB (articles/index.html) ===== */
.hub-hero { background: var(--paper); border-radius: 18px; padding: 36px 36px; box-shadow: var(--shadow-md); margin-bottom: 28px; position: relative; overflow: hidden; }
.hub-hero::before { content: ''; position: absolute; top: -40px; right: -40px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(111,78,55,0.10), transparent 70%); pointer-events: none; }
.hub-hero h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 700; letter-spacing: -0.6px; line-height: 1.15; max-width: 720px; }
.hub-hero p { color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 680px; margin-top: 12px; }
.hub-stats { display: flex; gap: 28px; margin-top: 20px; flex-wrap: wrap; }
.hub-stats .s { font-size: 13px; color: var(--muted); }
.hub-stats .s b { font-size: 22px; color: var(--accent); font-weight: 700; display: block; line-height: 1; }

.hub-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.hub-chips a { font-size: 13px; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; transition: border-color .15s, color .15s, background .15s; white-space: nowrap; }
.hub-chips a:hover { border-color: var(--accent); color: var(--accent); background: var(--hover); }

.hub-cat { margin-bottom: 40px; scroll-margin-top: 80px; }
.hub-cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.hub-cat-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.hub-cat-head .count { font-size: 12px; color: var(--muted); font-weight: 500; }

.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hub-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; transition: transform .15s, box-shadow .15s, border-color .15s; min-height: 110px; position: relative; }
.hub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.hub-card.stub { cursor: not-allowed; opacity: 0.72; }
.hub-card.stub:hover { transform: none; box-shadow: none; border-color: var(--line); }
.hub-card .ttl { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.hub-card .meta { display: flex; gap: 10px; align-items: center; font-size: 11.5px; color: var(--muted); margin-top: auto; }
.hub-card .badge-soft { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.hub-card .badge-soft.ready { background: var(--hover); color: var(--accent); }
.hub-card .badge-soft.soon { background: var(--bg); color: var(--muted); }
.hub-card .badge-soft .d { width: 5px; height: 5px; border-radius: 50%; }
.hub-card .badge-soft.ready .d { background: var(--accent); }
.hub-card .badge-soft.soon .d { background: var(--muted-2); }

@media (max-width: 900px) {
  .hub-grid { grid-template-columns: 1fr 1fr; }
  .hub-hero { padding: 28px 24px; }
}
@media (max-width: 540px) {
  .hub-grid { grid-template-columns: 1fr; }
  .hub-stats { gap: 18px; }
}

/* ===== AVARII (специальная компактная) ===== */
.dial-hero { background: linear-gradient(135deg, var(--ink), var(--hot)); color: #fff; border-radius: 20px; padding: 32px 34px; margin-bottom: 28px; box-shadow: 0 16px 40px rgba(192,57,43,0.25); }
.dial-hero h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 700; line-height: 1.1; letter-spacing: -0.5px; }
.dial-hero p { color: rgba(255,255,255,0.88); font-size: 16px; line-height: 1.5; margin-top: 12px; max-width: 620px; }
.dial-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.dial { background: var(--paper); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 4px; transition: transform .15s, box-shadow .15s; border-top: 4px solid var(--hot); }
.dial:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(192,57,43,0.20); }
.dial .num { font-size: 36px; font-weight: 800; letter-spacing: -1px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.dial .lab { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; margin-top: 8px; }
.dial .name { font-size: 14px; font-weight: 600; color: var(--ink); }
.dial .when { font-size: 12px; color: var(--muted); margin-top: 4px; }
.dial.uk { border-top-color: var(--accent); }
.dial.uk .num { font-size: 24px; }
@media (max-width: 720px) { .dial-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .dial-grid { grid-template-columns: 1fr; } }


/* ===== ARTICLE META (автор / дата / голосование / поделиться) ===== */
.article-meta {
  margin: 40px 0 12px;
  padding: 18px 22px;
  background: var(--paper);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px; flex-wrap: wrap;
}
.article-meta__author { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.article-meta__author .art-author { color: var(--ink); font-weight: 700; }
.article-meta__author .art-date { color: var(--muted); }
.article-meta__author .art-date time { color: var(--ink-2); font-weight: 500; }

.article-meta__actions { display: flex; align-items: center; gap: 10px; }
.art-vote {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1px solid var(--line-2);
  color: var(--ink-2);
  padding: 7px 12px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.art-vote:hover { background: var(--hover); border-color: var(--accent); color: var(--accent); }
.art-vote svg { display: block; }
.art-vote.is-active { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.art-vote.is-active.art-vote--down { background: var(--hot); border-color: var(--hot); }
.art-vote__num { font-variant-numeric: tabular-nums; min-width: 16px; text-align: center; }

.art-vote-sep { width: 1px; height: 22px; background: var(--line); }

.art-share {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: var(--paper);
  border: 1px solid var(--accent);
  padding: 7px 14px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.art-share:hover { background: var(--ink); border-color: var(--ink); }

/* Поделиться: фоллбэк-меню если нет Web Share API */
.share-menu {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: rgba(42,31,23,0.45);
  z-index: 999;
}
.share-menu[hidden] { display: none !important; }
.share-menu__inner {
  background: var(--paper); border-radius: 16px;
  padding: 22px 24px; min-width: 280px; max-width: 360px;
  box-shadow: var(--shadow-lg);
}
.share-menu h4 { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--ink); }
.share-menu .share-list { display: grid; gap: 8px; }
.share-menu .share-item {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 10px;
  background: var(--bg); color: var(--ink);
  font-size: 14px; font-weight: 500;
  transition: background .15s;
  border: 1px solid var(--line);
}
.share-menu .share-item:hover { background: var(--hover); }
.share-menu .share-close {
  margin-top: 14px; width: 100%;
  background: transparent; color: var(--muted);
  border: none; padding: 8px; font: inherit; font-size: 13px;
  cursor: pointer;
}
.share-menu .share-close:hover { color: var(--ink); }
.share-toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
  z-index: 1000;
}
.share-toast.is-visible { opacity: 1; }

@media (max-width: 540px) {
  .article-meta { padding: 14px 16px; }
  .article-meta__actions { width: 100%; justify-content: space-between; }
  .art-share { padding: 7px 12px; }
}
