/* ============================================================
   Lexoft — Article page styles
   ============================================================ */

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
  padding-top: 28px;
}
.article-main { min-width: 0; max-width: 760px; }

/* --- Article header --- */
.article-head { margin-bottom: 30px; }
.article-head .breadcrumbs { margin-bottom: 18px; }
.article-cat-tag { margin-bottom: 14px; }
.article-head h1 {
  font-size: clamp(30px, 4.2vw, 42px);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.12;
  color: var(--ink); text-wrap: balance;
}
.article-lead {
  font-size: 19px; line-height: 1.6; color: var(--ink-2);
  margin-top: 18px; font-weight: 400;
}

/* --- Byline --- */
.byline {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.byline-author { display: flex; align-items: center; gap: 11px; }
.byline-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(140deg, #2E6FD6, #133A82);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px;
}
.byline-name { font-size: 14.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.byline-name .verified { width: 15px; height: 15px; color: var(--accent); }
.byline-role { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.byline-meta { display: flex; align-items: center; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.byline-meta .bm { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.byline-meta .bm svg { width: 15px; height: 15px; color: var(--ink-4); }
.byline-meta .bm b { color: var(--ink-2); font-weight: 600; }

/* --- Actuality banner --- */
.actuality {
  display: flex; align-items: center; gap: 11px;
  background: var(--amber-soft); border: 1px solid #F0DDB4;
  border-radius: var(--r); padding: 12px 16px; margin: 24px 0;
  font-size: 13.5px; color: #6F4E0F;
}
.actuality svg { width: 19px; height: 19px; color: var(--amber); flex-shrink: 0; }
.actuality b { font-weight: 700; }

/* --- TL;DR box --- */
.tldr {
  background: var(--accent-soft); border: 1px solid var(--accent-soft-2);
  border-radius: var(--r-lg); padding: 24px 26px; margin: 30px 0;
  position: relative;
}
.tldr h2 {
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent-dark); display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.tldr h2 svg { width: 18px; height: 18px; }
.tldr ul { display: flex; flex-direction: column; gap: 10px; }
.tldr li { display: flex; gap: 11px; font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.tldr li svg { width: 19px; height: 19px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* --- Body typography --- */
.article-body { font-size: 17.5px; line-height: 1.75; color: var(--ink-2); }
.article-body > * { margin-bottom: 22px; }
.article-body h2 {
  font-size: 27px; font-weight: 800; letter-spacing: -.02em; color: var(--ink);
  margin-top: 48px; margin-bottom: 18px; line-height: 1.2; scroll-margin-top: 90px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: 20px; font-weight: 700; color: var(--ink);
  margin-top: 32px; margin-bottom: 12px; scroll-margin-top: 90px;
}
.article-body p { color: var(--ink-2); }
.article-body a:not(.btn) { color: var(--accent); font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent-soft-2); text-underline-offset: 3px; }
.article-body a:not(.btn):hover { text-decoration-color: var(--accent); }
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body ul.bullets { display: flex; flex-direction: column; gap: 11px; padding-left: 4px; }
.article-body ul.bullets li { display: flex; gap: 12px; }
.article-body ul.bullets li::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0; margin-top: 11px;
}

/* --- Numbered steps --- */
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 18px; padding-bottom: 26px; position: relative; }
.step:not(:last-child)::before {
  content: ''; position: absolute; left: 17px; top: 38px; bottom: 0; width: 2px; background: var(--line);
}
.step-num {
  counter-increment: step; width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 16px; z-index: 1;
}
.step-num::after { content: counter(step); }
.step-body { padding-top: 4px; }
.step-body h4 { font-size: 17.5px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.step-body p { font-size: 16px; color: var(--ink-2); margin: 0; }

/* --- Tables --- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 26px 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data thead th { background: var(--bg-2); text-align: left; font-weight: 700; color: var(--ink); padding: 13px 18px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
table.data td { padding: 13px 18px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--bg-2); }
table.data td strong { color: var(--ink); }

/* --- Callout / tip --- */
.callout {
  display: flex; gap: 14px; border-radius: var(--r); padding: 16px 18px; margin: 26px 0;
  font-size: 15.5px; line-height: 1.6;
}
.callout svg { width: 21px; height: 21px; flex-shrink: 0; margin-top: 1px; }
.callout-tip { background: var(--green-soft); color: #0B5E4D; border: 1px solid #C8E8DF; }
.callout-tip svg { color: var(--green); }
.callout-warn { background: var(--red-soft); color: #8A2E1E; border: 1px solid #F3D3CC; }
.callout-warn svg { color: var(--red); }
.callout b { font-weight: 700; }

/* --- FAQ --- */
.faq-section { margin-top: 48px; }
.faq-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; text-align: left; font-size: 17.5px; font-weight: 700; color: var(--ink); transition: .15s;
}
.faq-q:hover { color: var(--accent); }
.faq-q .chev { width: 22px; height: 22px; color: var(--ink-3); flex-shrink: 0; transition: transform .25s; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); color: var(--accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 4px 22px; font-size: 16px; line-height: 1.7; color: var(--ink-2); }

/* --- Sources --- */
.sources { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 26px; margin: 40px 0; }
.sources h3 { font-size: 16px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.sources h3 svg { width: 18px; height: 18px; color: var(--accent); }
.sources ol { display: flex; flex-direction: column; gap: 10px; counter-reset: src; }
.sources li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); counter-increment: src; }
.sources li::before { content: counter(src) '.'; color: var(--ink-4); font-weight: 600; flex-shrink: 0; }
.sources a { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

/* --- Author bio card --- */
.author-card { display: flex; gap: 18px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; margin: 40px 0; box-shadow: var(--sh-1); }
.author-card .ac-avatar { width: 62px; height: 62px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(140deg, #2E6FD6, #133A82); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 22px; }
.author-card .ac-name { font-size: 17px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.author-card .ac-name .verified { width: 16px; height: 16px; color: var(--accent); }
.author-card .ac-role { font-size: 13.5px; color: var(--accent); font-weight: 600; margin-top: 2px; }
.author-card .ac-bio { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; margin-top: 10px; }

/* --- Share / actions row --- */
.article-actions { display: flex; align-items: center; gap: 10px; margin: 32px 0; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.article-actions .label { font-size: 13.5px; font-weight: 600; color: var(--ink-3); margin-right: 4px; }
.share-btn { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); transition: .15s; }
.share-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft-2); }
.share-btn svg { width: 18px; height: 18px; }

/* ============================================================
   Sidebar
   ============================================================ */
.article-sidebar { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 24px; }

/* TOC */
.toc { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.toc-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }
.toc-title svg { width: 15px; height: 15px; }
.toc-list { display: flex; flex-direction: column; gap: 2px; }
.toc-list a {
  display: block; font-size: 13.5px; line-height: 1.4; color: var(--ink-3);
  padding: 7px 12px; border-radius: 7px; border-left: 2px solid transparent; transition: .14s;
}
.toc-list a:hover { color: var(--ink); background: var(--bg-3); }
.toc-list a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; border-left-color: var(--accent); }

/* Related */
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.side-card h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 14px; }
.related-item { display: block; padding: 11px 0; border-bottom: 1px solid var(--line); transition: .12s; }
.related-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-item:first-child { padding-top: 0; }
.related-item .ri-cat { font-size: 11px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
.related-item .ri-title { font-size: 14px; font-weight: 500; color: var(--ink); margin-top: 3px; line-height: 1.35; transition: .12s; }
.related-item:hover .ri-title { color: var(--accent); }

/* CTA mini */
.side-cta { background: linear-gradient(155deg, var(--accent), var(--accent-darker)); border-radius: var(--r-lg); padding: 22px; color: #fff; }
.side-cta h3 { font-size: 16.5px; font-weight: 700; color: #fff; margin-bottom: 7px; letter-spacing: -.01em; }
.side-cta p { font-size: 13px; color: rgba(255,255,255,.82); line-height: 1.5; margin-bottom: 14px; }
.side-cta .btn { background: #fff; color: var(--accent); width: 100%; }
.side-cta .btn:hover { background: rgba(255,255,255,.92); }

/* --- Read also grid (bottom) --- */
.read-also { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.read-also h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-bottom: 22px; }
.ra-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ra-card { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; transition: .16s; }
.ra-card:hover { border-color: var(--accent-soft-2); box-shadow: var(--sh-2); transform: translateY(-2px); }
.ra-card .ra-title { font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.32; }
.ra-card .ra-meta { font-size: 12.5px; color: var(--ink-3); margin-top: auto; display: flex; align-items: center; gap: 7px; }

@media (max-width: 1040px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .article-sidebar { position: static; flex-direction: row; flex-wrap: wrap; margin-top: 40px; }
  .article-sidebar > * { flex: 1; min-width: 240px; }
  .toc { display: none; }
}
@media (max-width: 720px) {
  .ra-grid { grid-template-columns: 1fr; }
  .byline-meta { margin-left: 0; width: 100%; }
  .article-sidebar { flex-direction: column; }
}
