/* Blog guides (blog-sell-faster, blog-shaxmatka, blog-installment): article layout, table of contents, figures,
   author box. Loaded only on those pages via page.styles. Builds on the tokens and .prose rules in /styles.css. */

/* Hero: keep the long headline readable instead of spanning the full container. */
:is(.page-blogSellFaster, .page-blogShaxmatka, .page-blogInstallment) .page-hero__copy { max-width: 880px; }
:is(.page-blogSellFaster, .page-blogShaxmatka, .page-blogInstallment) .page-hero h1 { font-size: clamp(2rem, 1.25rem + 2.6vw, 3.15rem); line-height: 1.1; }
:is(.page-blogSellFaster, .page-blogShaxmatka, .page-blogInstallment) .page-hero .eyebrow { align-items: flex-start; line-height: 1.5; }
:is(.page-blogSellFaster, .page-blogShaxmatka, .page-blogInstallment) .page-hero .eyebrow::before { margin-top: calc(.75em - 1px); }
.page-hero .eyebrow time, .nowrap { white-space: nowrap; }

/* Two columns: sticky contents on the left, article on the right. */
.article-section { padding-block: clamp(48px, 6vw, 88px) clamp(64px, 7vw, 104px); }
.article-layout { display: grid; grid-template-columns: minmax(0, 270px) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }

.toc {
  position: sticky; top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 14px 16px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line);
}
.toc__title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding-inline: 8px;
  font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--eyebrow);
}
.toc ol { display: grid; gap: 2px; list-style: none; }
.toc a {
  display: block; padding: 7px 10px; border-radius: 10px; border-left: 2px solid transparent;
  font-size: .9rem; line-height: 1.4; color: var(--fg-muted); text-decoration: none;
  transition: color .2s, background-color .2s, border-color .2s;
}
.toc a:hover { color: var(--ink); background: #fff; border-left-color: var(--teal); }

/* Article column */
.article-main { min-width: 0; }
.article-main > * { max-width: 740px; }
.article-part { margin-top: 2.6rem; }
.article-part > .prose > h2:first-child { margin-top: 0; }
.article-part > .prose + .prose { margin-top: 1.1em; }
.article-intro > p:first-child { font-size: 1.14rem; color: var(--ink); }

.prose .callout { font-size: .98rem; line-height: 1.65; }
.prose .callout p { margin: 0; }
.prose .table-wrap { margin-block: 1.6em; }
.prose .table { font-size: .95rem; }
.prose .table th, .prose .table td { white-space: normal; vertical-align: top; line-height: 1.5; }
.prose .table caption { padding-bottom: 6px; line-height: 1.4; }
.prose .table tbody th { min-width: 8.5em; color: var(--ink); }
.prose .formula {
  padding: 16px 20px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line);
  font-size: 1rem; line-height: 1.6; color: var(--ink);
}

/* Product widgets placed between prose blocks */
.article-figure { margin: 2rem 0 0; }
.article-figure > .widget { width: 100%; }
.article-figure figcaption { margin-top: 12px; font-size: .88rem; line-height: 1.5; color: var(--fg-muted); }
.article-figure + .prose { margin-top: 1.6rem; }
.article-figure .widget__hint { flex-wrap: nowrap; align-items: flex-start; line-height: 1.45; }
.article-figure .widget__hint > .icon { margin-top: 1px; }

/* FAQ inside the article column */
.article-main .faq { max-width: 740px; margin: 1.4rem 0 0; }

/* Author / brand box */
.article-author {
  display: flex; gap: 18px; align-items: flex-start; margin-top: 3rem; padding: 22px 24px;
  border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); color: var(--fg-muted);
}
.article-author img { width: 56px; height: 56px; border-radius: 14px; flex: none; box-shadow: 0 8px 18px -10px rgba(11, 44, 66, .5); }
.article-author__name { font-family: var(--font-head); font-size: 1.08rem; font-weight: 700; color: var(--ink); }
.article-author p + p { margin-top: 6px; line-height: 1.6; }
.article-author .article-author__more { margin-top: 12px; }

/* CTA directly after the article: tighter top spacing */
.article-cta { padding-block: clamp(48px, 6vw, 80px); }

@media (max-width: 1023px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .toc { position: static; max-height: none; overflow: visible; }
  .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; }
  .article-main > * { max-width: none; }
  .article-main .faq { max-width: none; }
}
@media (max-width: 767px) {
  .toc ol { grid-template-columns: minmax(0, 1fr); }
  .toc a { padding-block: 6px; }
  .prose { font-size: 1.02rem; line-height: 1.75; }
  .article-intro > p:first-child { font-size: 1.06rem; }
  .prose .table { font-size: .88rem; }
  .prose .table th, .prose .table td { padding: 10px 12px; }
  .prose .table tbody th { min-width: 7em; }
  .article-author { flex-direction: column; gap: 12px; padding: 20px; }
}
@media (max-width: 479px) {
  /* Installment widget inside an article: fit the 4-column schedule on phones instead of clipping the status column. */
  .article-figure .inst .widget__body { padding: 12px; }
  .article-figure .inst .table--compact { font-size: .72rem; }
  .article-figure .inst .table--compact th, .article-figure .inst .table--compact td { padding: 8px 4px; }
  .article-figure .inst .table--compact th:first-child, .article-figure .inst .table--compact td:first-child { padding-left: 9px; }
  .article-figure .inst .table--compact th:last-child, .article-figure .inst .table--compact td:last-child { padding-right: 9px; }
  .article-figure .inst .table--compact thead th { font-size: .6rem; letter-spacing: .02em; }
  .article-figure .inst .st { padding: 2px 6px; font-size: .66rem; }
}
@media (max-width: 379px) {
  .article-figure .inst .table--compact { font-size: .68rem; }
  .article-figure .inst .st { padding: 2px 5px; font-size: .62rem; }
  .prose .table th, .prose .table td { padding: 9px 8px; }
  .prose .table tbody th { min-width: 0; }
}
@media (max-width: 640px) {
  /* Comparison tables become one labelled card per row (labels come from data-label). */
  .prose .table--stack, .prose .table--stack tbody, .prose .table--stack tr,
  .prose .table--stack th, .prose .table--stack td { display: block; width: auto; }
  .prose .table--stack caption { display: block; padding: 14px 16px 10px; border-bottom: 1px solid #e8eef2; }
  .prose .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .prose .table--stack tbody tr { padding: 14px 16px; border-bottom: 1px solid #e8eef2; }
  .prose .table--stack tbody tr:last-child { border-bottom: 0; }
  .prose .table--stack tbody th { min-width: 0; padding: 0 0 6px; border: 0; font-size: .98rem; }
  .prose .table--stack td { padding: 6px 0 0; border: 0; }
  .prose .table--stack td::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6a7f90;
  }
}
