/* =====================================================================
   Blog page — 1:1 from Figma "Optiway — Blog" (loaded after styles.css).
   Reuses tokens, .home, .nav/.mega, .btn*, .footer/.rp-footer from styles.css.
   ===================================================================== */
:root{ --color-gray-50:#f7f7f9; --color-gray-800:#3f4250; }

/* ===== Header ===== */
.blog-hd{ width:100%; background:var(--color-gray-50); display:flex; flex-direction:column; align-items:center; gap:22px; padding:80px 0 28px; flex-shrink:0; }
.blog-hd__in{ width:min(1080px, calc(100% - 48px)); display:flex; flex-direction:column; align-items:center; gap:22px; }
.blog-hd__eyebrow{ font-weight:600; font-size:13px; line-height:1; color:var(--color-brand); letter-spacing:.78px; text-transform:uppercase; }
.blog-hd__title{ font-weight:700; font-size:41.4px; line-height:1.1; letter-spacing:-1px; color:var(--color-gray-900); text-align:center; }
.blog-hd__sub{ font-weight:500; font-size:16px; line-height:1.56; color:var(--color-gray-600); text-align:center; width:100%; }

.blog-filters{ display:flex; flex-wrap:wrap; gap:12px; justify-content:center; width:100%; padding-top:4px; }
.blog-chip{ display:inline-flex; align-items:center; padding:8px 15px; border-radius:999px; font-weight:500; font-size:14px; line-height:1; background:#fff; border:1px solid var(--color-gray-200); color:var(--color-gray-900); cursor:pointer; white-space:nowrap; transition:background .15s ease, color .15s ease, border-color .15s ease; }
.blog-chip:hover:not(.is-active){ border-color:var(--color-brand-300); color:var(--color-brand); }
.blog-chip.is-active{ background:var(--color-brand); border-color:var(--color-brand); color:#fff; }

/* ===== Category section ===== */
.blog-cat{ width:100%; background:#fff; display:flex; justify-content:center; padding:24px 0 56px; flex-shrink:0; }
.blog-cat__in{ width:min(1080px, calc(100% - 48px)); display:flex; flex-direction:column; gap:24px; }
.blog-cat__head{ display:flex; align-items:center; justify-content:space-between; gap:16px; }
.blog-cat__title{ font-weight:700; font-size:28px; line-height:1.1; letter-spacing:-.56px; color:var(--color-gray-900); }
.blog-showall{ display:inline-flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--color-gray-200); border-radius:12px; padding:11px 16px 11px 18px; font-weight:600; font-size:15px; line-height:1; color:var(--color-gray-900); text-decoration:none; white-space:nowrap; transition:border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.blog-showall:hover{ border-color:var(--color-brand); color:var(--color-brand); box-shadow:0 8px 20px -10px rgba(19,32,90,.18); }
.blog-showall svg{ width:16px; height:16px; display:block; }

.blog-row{ display:flex; gap:24px; align-items:stretch; }
.blog-art{ flex:1 1 0; min-width:0; display:flex; flex-direction:column; background:#fff; border:1px solid var(--color-gray-200); border-radius:18px; padding:14px; text-decoration:none; transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.blog-art:hover{ transform:translateY(-4px); box-shadow:0 26px 50px -24px rgba(19,32,90,.20); border-color:var(--color-brand-300); }
.blog-art__img{ width:100%; height:118px; border-radius:12px; overflow:hidden; flex:none; background:var(--color-blue-25); }
.blog-art__img img{ width:100%; height:100%; object-fit:cover; display:block; }
.blog-art__body{ display:flex; flex-direction:column; gap:8px; padding:14px 8px 4px; flex:1; }
.blog-art__title{ font-weight:700; font-size:17px; line-height:1.28; letter-spacing:-.2px; color:var(--color-gray-900); }
.blog-art__desc{ font-weight:500; font-size:14px; line-height:1.5; color:var(--color-gray-600); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.blog-art__foot{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:auto; padding-top:12px; }
.blog-art__author{ display:flex; align-items:center; gap:9px; min-width:0; }
.blog-art__avatar{ width:28px; height:28px; border-radius:50%; background:var(--c,var(--color-brand)); color:#fff; font-weight:700; font-size:10.5px; letter-spacing:.2px; display:flex; align-items:center; justify-content:center; flex:none; }
.blog-art__by{ font-weight:600; font-size:13px; line-height:1.2; color:var(--color-gray-900); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.blog-art__by em{ font-style:normal; font-weight:500; color:var(--color-gray-500); }
.blog-art__arrow{ width:18px; height:18px; color:var(--color-brand); flex:none; transition:transform .2s ease; }
.blog-art:hover .blog-art__arrow{ transform:translateX(3px); }

/* filtered out */
.blog-cat[hidden]{ display:none; }

/* =====================================================================
   Category page (blog-category.html) — 9 articles grid + pagination
   ===================================================================== */
.blog-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:24px; align-items:stretch; }
.blog-grid .blog-art{ flex:none; }

.blog-empty{ font-weight:500; font-size:15px; color:var(--color-gray-500); text-align:center; padding:40px 0; }

/* pagination */
.blog-pager{ display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap; padding-top:16px; }
.blog-pager:empty{ display:none; }
.blog-page{ min-width:40px; height:40px; padding:0 12px; display:inline-flex; align-items:center; justify-content:center; border-radius:12px; border:1px solid var(--color-gray-200); background:#fff; color:var(--color-gray-900); font-family:inherit; font-weight:600; font-size:15px; line-height:1; cursor:pointer; transition:border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease; }
.blog-page:hover:not(:disabled):not(.is-active){ border-color:var(--color-brand); color:var(--color-brand); box-shadow:0 8px 20px -10px rgba(19,32,90,.18); }
.blog-page.is-active{ background:var(--color-brand); border-color:var(--color-brand); color:#fff; cursor:default; }
.blog-page:disabled{ opacity:.4; cursor:not-allowed; }
.blog-page svg{ width:17px; height:17px; display:block; }
.blog-page--gap{ border:none; background:transparent; color:var(--color-gray-500); cursor:default; min-width:20px; padding:0; }
/* =====================================================================
   Article page (blog-article.html) — 1:1 from Figma "Optiway — Blog: Article"
   Grid: 230px TOC + 30px gap + 700px prose, centered (960px).
   ===================================================================== */
/* Layout: TOC (left) · prose (screen-centered) · sticky rail (right) — Figma 166:1021 */
.art-wrap{ width:min(1080px, calc(100% - 48px)); margin:0 auto; display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:0 clamp(40px,4vw,56px); }

/* ===== Article header ===== */
.art-hd{ width:100%; background:var(--color-gray-50); display:block; padding:60px 0 44px; flex-shrink:0; }
.art-hd .art-wrap{ align-items:start; }
.art-hd__tx{ grid-column:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; text-align:left; gap:16px; padding:6px 0 0; }
.art-hd__tx .art-title{ font-size:40px; }
.art-eyebrow{ font-weight:600; font-size:13px; line-height:1; letter-spacing:.78px; color:var(--color-brand); text-transform:uppercase; }
.art-meta{ display:flex; align-items:center; gap:9px; font-weight:500; font-size:14px; line-height:1; color:var(--color-gray-600); flex-wrap:wrap; }
.art-meta .blog-art__avatar{ width:40px; height:40px; font-size:13px; }
.art-meta b{ font-weight:600; color:var(--color-gray-900); }
.art-meta i{ font-style:normal; color:var(--color-gray-300,#c9cbd6); }
.art-title{ font-weight:700; font-size:42px; line-height:1.24; letter-spacing:-1.05px; color:var(--color-gray-900); }
.art-cover{ grid-column:2; align-self:start; width:100%; margin:0; border-radius:20px; overflow:hidden; background:var(--color-blue-25); }
.art-cover img{ width:100%; height:auto; display:block; }

/* ===== Body ===== */
.art{ width:100%; background:#fff; display:block; padding:52px 0 40px; flex-shrink:0; }

/* table of contents — inside the right rail */
.art-toc{ display:flex; flex-direction:column; gap:14px; }
.art-toc__back{ display:inline-flex; align-items:center; gap:7px; margin-bottom:24px; font-weight:700; font-size:14px; line-height:1; color:var(--color-brand); text-decoration:none; }
.art-toc__back svg{ width:16px; height:16px; display:block; transition:transform .2s ease; }
.art-toc__back:hover svg{ transform:translateX(-3px); }
.art-toc__label{ font-weight:600; font-size:12px; line-height:1; letter-spacing:.96px; color:var(--color-gray-600); }
.art-toc__list{ display:flex; flex-direction:column; gap:14px; }
.art-toc__list a{ font-weight:400; font-size:13.5px; line-height:1.4; color:var(--color-gray-600); text-decoration:none; padding-left:6px; border-left:1px solid transparent; transition:color .15s ease, border-color .15s ease; }
.art-toc__list a:hover{ color:var(--color-brand); }
.art-toc__list a.is-active{ font-weight:500; color:var(--color-brand); border-left-color:var(--color-brand); }

/* right rail — sticky CTA card + share (Figma 220:80) */
.art-rail{ grid-column:2; align-self:start; position:sticky; top:100px; padding-top:6px; display:flex; flex-direction:column; gap:28px; }
.art-promo{ background:var(--color-brand); border-radius:22px; padding:24px; display:flex; flex-direction:column; gap:14px; }
.art-promo__pill{ align-self:flex-start; background:rgba(255,255,255,.16); border-radius:999px; padding:7px 13px; font-weight:600; font-size:11.5px; line-height:1; letter-spacing:.69px; color:#fff; }
.art-promo__title{ font-weight:700; font-size:21px; line-height:1.18; color:#fff; }
.art-promo__sub{ font-weight:500; font-size:14px; line-height:1.5; color:#d9dbff; }
.art-promo__btn{ display:flex; align-items:center; justify-content:center; gap:8px; background:#fff; color:var(--color-brand); border-radius:12px; padding:14px; font-weight:600; font-size:15px; line-height:1; text-decoration:none; transition:filter .15s ease; }
.art-promo__btn:hover{ filter:brightness(.96); }
.art-promo__note{ font-weight:500; font-size:12.5px; line-height:1.3; color:rgba(255,255,255,.7); text-align:center; }
.art-rshare{ display:flex; flex-direction:column; gap:14px; }
.art-rshare__label{ font-weight:600; font-size:12px; line-height:1; letter-spacing:.96px; color:var(--color-gray-600); }
.art-rshare__btns{ display:flex; gap:8px; }

/* prose */
.art-prose{ grid-column:1; display:flex; flex-direction:column; gap:36px; }
.art-sec{ display:flex; flex-direction:column; gap:16px; scroll-margin-top:110px; }
.art-sec h2{ font-weight:700; font-size:26px; line-height:1.28; letter-spacing:-.39px; color:var(--color-gray-900); }
.art-sec p{ font-weight:500; font-size:17px; line-height:1.72; color:var(--color-gray-800,#3f4250); }
.art-sec strong{ font-weight:700; color:var(--color-gray-900); }
.art-sec a{ color:var(--color-brand); text-decoration:none; border-bottom:1px solid var(--color-brand-300); }
.art-note{ border-left:3px solid var(--color-brand); padding-left:16px; }
.art-note p{ font-weight:500; font-style:italic; font-size:17px; line-height:1.72; color:var(--color-brand); }
.art-fig{ width:100%; border-radius:20px; overflow:hidden; background:var(--color-blue-25); }
.art-fig img{ width:100%; height:100%; object-fit:cover; display:block; }
.art-fig--wide{ aspect-ratio:700/359; }
.art-fig--shot{ background:transparent; }
.art-fig--shot img{ height:auto; object-fit:contain; }

/* helpful */
.art-actions{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding-top:24px; border-top:1px solid var(--color-gray-200); }
.art-helpful{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.art-helpful__label{ font-weight:600; font-size:16px; line-height:1.25; color:var(--color-gray-900); }
.art-vote{ display:inline-flex; align-items:center; gap:8px; padding:10px 18px 10px 16px; border:1px solid var(--color-gray-200); border-radius:10px; background:#fff; font-family:inherit; font-weight:600; font-size:14px; line-height:1.25; color:var(--color-gray-900); cursor:pointer; transition:border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.art-vote svg{ width:17px; height:17px; display:block; }
.art-vote:hover{ border-color:var(--color-brand); color:var(--color-brand); box-shadow:0 8px 20px -10px rgba(19,32,90,.18); }
.art-vote.is-picked{ border-color:var(--color-brand); color:var(--color-brand); background:var(--color-blue-25); }
.art-ic{ width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--color-gray-200); border-radius:12px; background:#fff; color:var(--color-gray-900); cursor:pointer; transition:border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease; }
.art-ic svg{ width:18px; height:18px; display:block; }
.art-ic:hover{ border-color:var(--color-brand); color:var(--color-brand); box-shadow:0 8px 20px -10px rgba(19,32,90,.18); }
.art-ic.is-done{ border-color:var(--color-brand); background:var(--color-brand); color:#fff; }

/* ===== In-article list — ONE consistent style for every list =====
   Tinted panel + brand dot bullets, single column. */
.art-list{ list-style:none; margin:0; padding:22px 26px; background:var(--color-gray-50); border-radius:18px; display:flex; flex-direction:column; gap:13px; }
.art-list li{ position:relative; padding-left:22px; font-weight:500; font-size:16px; line-height:1.55; color:var(--color-gray-800,#3f4250); }
.art-list li::before{ content:""; position:absolute; left:2px; top:.62em; width:6px; height:6px; border-radius:50%; background:var(--color-brand); }

/* ===== You may also like — same component as the landings (.blog/.article) ===== */
a.article{ text-decoration:none; color:inherit; }
/* on the landing .blog rides 84px over the previous dark block — here it must not overlap the article */
.blog--flat{ margin-top:0; box-shadow:none; border-radius:0; padding:56px 0 72px; }

/* =====================================================================
   Responsive — article: 2-col (main + sidebar) → 1-col stack
   ===================================================================== */

/* --- Tablet / mobile: single column, sidebar (TOC+CTA+share) below text --- */
@media (max-width:900px){
  .art-wrap{ grid-template-columns:minmax(0,1fr); gap:0; }
  .art-hd{ padding:44px 0 20px; }
  .art-hd__tx{ grid-column:1; padding:0; gap:14px; }
  .art-cover{ grid-column:1; width:100%; max-width:460px; margin-top:24px; }
  .art{ padding:36px 0 32px; }
  .art-prose{ grid-column:1; gap:30px; }
  .art-rail{ grid-column:1; position:static; margin-top:40px; }
  /* on mobile the TOC is redundant with the article flow */
  .art-toc{ display:none; }
  .art-promo{ max-width:460px; }
}

/* --- Phone --- */
@media (max-width:600px){
  .art-wrap{ width:calc(100% - 48px); }
  .art-hd{ padding:36px 0 16px; }
  .art-title{ font-size:clamp(26px,7vw,34px); line-height:1.24; letter-spacing:-.6px; }
  .art-meta{ font-size:13px; gap:8px; }
  .art-meta .blog-art__avatar{ width:34px; height:34px; font-size:12px; }
  .art-cover{ margin-top:18px; border-radius:16px; }
  .art{ padding:28px 0 28px; }
  .art-prose{ gap:26px; }
  .art-sec{ gap:14px; }
  .art-sec h2{ font-size:22px; line-height:1.3; }
  .art-sec p, .art-note p{ font-size:16px; }
  .art-promo{ padding:22px; }
  .art-list{ padding:20px 22px; }
  .art-list li{ font-size:15.5px; }
  .art-actions{ gap:14px; }
  .art-helpful{ gap:10px; }
}

/* ===== Responsive — blog index & category ===== */
@media (max-width:1000px){
  .blog-hd{ padding:88px 0 40px; }
  .blog-hd__title{ font-size:clamp(30px,6vw,48px); }
  .blog-hd__sub{ font-size:16px; }
  .blog-cat{ padding:20px 0 40px; }
  .blog-cat__title{ font-size:24px; }
  .blog-row{ flex-direction:column; }
  .blog-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width:560px){
  .blog-cat__head{ flex-direction:column; align-items:flex-start; gap:12px; }
  .blog-grid{ grid-template-columns:1fr; }
  .blog-pager{ gap:6px; }
  .blog-page{ min-width:36px; height:36px; padding:0 9px; font-size:14px; }
}

/* ===== CTA (ported from dispatch.css, .disp-cta component) ===== */
.disp-sec{ width:100%; display:flex; flex-direction:column; align-items:center; flex-shrink:0; }
.disp-cta{ background:linear-gradient(to right,#2a20a8 0%,#3a2fc8 45%,#5b4bf2 100%); padding:100px 48px; gap:18px; text-align:center; min-height:100vh; justify-content:center; border-top-left-radius:44px; border-top-right-radius:44px; margin-top:-44px; position:relative; z-index:2; box-shadow:0 -28px 56px -28px rgba(19,32,90,.35);}
.disp-cta h2{ font-weight:700; font-size:42px; line-height:1.1; letter-spacing:-1.05px; color:#fff; width:1080px; max-width:100%; }
.disp-cta p{ font-weight:500; font-size:16px; line-height:1.56; color:#d7d9df; }
.disp-cta__btns{ display:flex; gap:12px; align-items:center; }
.disp-cta__primary{ background:#fff; color:var(--color-brand); display:inline-flex; align-items:center; gap:8px; padding:15px 32px; border-radius:12px; font-weight:600; font-size:15px; text-decoration:none; transition:transform .15s ease, box-shadow .2s ease; }
.disp-cta__primary:hover{ transform:translateY(-1px); box-shadow:0 10px 24px -8px rgba(0,0,0,.3); }
.disp-cta__ghost{ border:1.5px solid rgba(255,255,255,.5); color:#fff; display:inline-flex; align-items:center; height:50px; padding:0 28px; border-radius:12px; font-weight:600; font-size:15px; text-decoration:none; transition:background .2s ease; }
.disp-cta__ghost:hover{ background:rgba(255,255,255,.1); }
.disp-cta__checks{ display:flex; gap:26px; flex-wrap:wrap; justify-content:center; }
.disp-cta__checks span{ display:inline-flex; align-items:center; gap:6px; font-weight:500; font-size:14px; color:#d7d9df; }
.disp-cta__checks span::before{ content:"✓"; color:var(--color-green-500); font-weight:700; font-size:13px; }
@media (max-width:900px){
  .disp-cta h2{ font-size:clamp(28px,5vw,42px); }
}
@media (max-width:760px){
  .disp-cta{ padding:64px 20px; }
}
@media (max-width:560px){
  .disp-cta__checks{ flex-direction:column; gap:10px; }
}
