/* =========================================================
   Blog: post hero, reading layout, table of contents,
   callout boxes, tables, FAQ, author box, post cards.
   ========================================================= */

/* ---------- post hero ---------- */
/* body overflow-x:hidden makes <body> a scroll box, which breaks position:sticky; clip does not */
body.single-post{overflow-x:clip;overflow-y:visible}
.post-hero{padding-bottom:40px}
.post-hero-in{max-width:900px}
.post-hero .crumbs{margin-bottom:18px}
.post-hero .eyebrow{margin-bottom:18px}
.post-title{font-size:clamp(30px,4vw,52px);line-height:1.08;letter-spacing:-.035em;font-weight:800;margin-bottom:18px;text-wrap:balance}
.post-hero .post-dek{max-width:760px;margin-bottom:26px}
.post-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;font-size:14px;color:var(--muted);font-weight:500}
.post-meta a{color:var(--ink);font-weight:700}
.post-meta a:hover{color:var(--indigo)}
.post-meta .dot{width:4px;height:4px;border-radius:50%;background:currentColor;opacity:.5}
.post-avatar{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:50%;background:var(--grad);color:#fff;font-weight:800;font-size:14px;letter-spacing:.02em;flex:none}
.post-avatar.lg{width:64px;height:64px;font-size:22px}

.post-cover{margin-top:6px}
.post-cover img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:28px;box-shadow:var(--shadow);border:1px solid var(--line)}

/* ---------- reading layout ---------- */
.post-body{padding-top:56px}
.post-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:32px;justify-content:center}
@media (min-width:1024px){.post-grid{grid-template-columns:250px minmax(0,740px);gap:64px}}

/* table of contents */
.post-toc{align-self:start}
@media (min-width:1024px){.post-toc{position:sticky;top:124px;max-height:calc(100vh - 144px);overflow:auto;scrollbar-width:thin}}
.toc{background:#fff;border:1px solid var(--line);border-radius:20px;padding:6px 6px 8px;box-shadow:var(--shadow)}
.toc summary{list-style:none;cursor:pointer;padding:12px 14px;font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--indigo);display:flex;justify-content:space-between;align-items:center}
.toc summary::-webkit-details-marker{display:none}
.toc summary::after{content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .25s var(--ease);margin-top:-4px}
.toc[open] summary::after{transform:rotate(-135deg);margin-top:4px}
@media (min-width:1024px){.toc summary{pointer-events:none}.toc summary::after{display:none}}
.toc ol{list-style:none;padding:0 4px 4px;margin:0}
.toc a{display:flex;gap:10px;padding:8px 10px;border-radius:12px;font-size:14px;line-height:1.35;color:var(--muted);font-weight:500;transition:background .2s,color .2s}
.toc a .n{font-size:11px;font-weight:800;color:var(--indigo);opacity:.55;padding-top:2px;font-variant-numeric:tabular-nums}
.toc a:hover{background:var(--bg);color:var(--ink)}
.toc a.on{background:var(--bg-2);color:var(--ink);font-weight:700}
.toc a.on .n{opacity:1}

/* ---------- article typography ---------- */
.post-content{font-size:18px;line-height:1.75;color:var(--ink-2);min-width:0}
.post-content>*+*{margin-top:22px}
.post-content p,.post-content li{color:var(--ink-2)}
.post-content strong{color:var(--ink);font-weight:700}
.post-content a{color:var(--indigo);font-weight:600;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:rgba(65,70,242,.35)}
.post-content a:hover{text-decoration-color:currentColor}
.post-content h2{font-size:clamp(26px,2.6vw,34px);line-height:1.15;letter-spacing:-.03em;font-weight:800;color:var(--ink);margin-top:64px;scroll-margin-top:110px;text-wrap:balance}
.post-content h3{font-size:clamp(20px,1.8vw,23px);line-height:1.25;letter-spacing:-.02em;font-weight:700;color:var(--ink);margin-top:40px;scroll-margin-top:110px}
.post-content h2+*,.post-content h3+*{margin-top:14px}
.post-content ul,.post-content ol{padding-left:24px}
.post-content li+li{margin-top:10px}
.post-content li::marker{color:var(--indigo);font-weight:700}
.post-content em{color:var(--muted)}

/* bold direct answer right under a question heading (what answer engines quote) */
.post-content .df-answer{font-size:19px;line-height:1.6;color:var(--ink);font-weight:600;padding-left:18px;border-left:3px solid var(--indigo)}

/* ---------- callout boxes ---------- */
.df-box{border-radius:22px;padding:24px 26px;border:1px solid var(--line);background:#fff}
.post-content .df-box{margin-top:32px;margin-bottom:8px}
.df-box>*+*{margin-top:12px}
.df-box p,.df-box li,.df-box dd{font-size:16.5px;line-height:1.65}
.df-box__title{font-size:13px!important;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--indigo)!important;display:flex;align-items:center;gap:10px}
.df-box__title::before{content:"";width:22px;height:22px;flex:none;border-radius:7px;background:#5145F5 center/14px no-repeat}
.df-box ul{padding-left:20px}

.df-box--answer{background:linear-gradient(135deg,#EEF0FE,#F6F2FF);border-color:rgba(65,70,242,.18)}
.df-box--answer .df-box__title::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M13 3L5 14h6l-1 7 8-11h-6z'/%3E%3C/svg%3E")}
.df-box--answer p:not(.df-box__title){color:var(--ink);font-size:17.5px}

.df-box--takeaways .df-box__title::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E")}
.df-box--takeaways ul{list-style:none;padding:0}
.df-box--takeaways li{position:relative;padding-left:30px}
.df-box--takeaways li::before{content:"";position:absolute;left:0;top:5px;width:18px;height:18px;border-radius:50%;background:#E7F8EF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312B76A' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/11px no-repeat}

.df-box--note{background:#F4F5F9}
.df-box--note .df-box__title::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M4 5h7a3 3 0 013 3v12a2 2 0 00-2-2H4zM20 5h-4M20 9h-4M20 13h-4'/%3E%3C/svg%3E")}
.df-box--note dl{display:grid;gap:14px}
.df-box--note dt{font-weight:800;color:var(--ink);font-size:16px}
.df-box--note dd{margin:2px 0 0;color:var(--muted)}
@media (min-width:640px){.df-box--note dl{grid-template-columns:170px 1fr;gap:14px 20px}.df-box--note dd{margin:0}}

.df-box--example{background:#F1FAF5;border-color:rgba(18,183,106,.22)}
.df-box--example .df-box__title{color:#0B8A50!important}
.df-box--example .df-box__title::before{background:#12B76A url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 00-3.5 10.9c.6.5 1 1.2 1 2.1h5c0-.9.4-1.6 1-2.1A6 6 0 0012 3z'/%3E%3C/svg%3E") center/14px no-repeat}

.df-box--cta{background:var(--ink);background-image:radial-gradient(120% 140% at 100% 0%,rgba(123,61,242,.55),transparent 55%),radial-gradient(90% 120% at 0% 100%,rgba(45,91,255,.45),transparent 60%);border:0;color:#fff;padding:30px 30px 32px}
.df-box--cta .df-box__title{color:#C9CEFF!important}
.df-box--cta .df-box__title::before{background-color:rgba(255,255,255,.14);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8.5-8 9-4.5-.5-8-4-8-9V6l8-3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E")}
.df-box--cta p,.df-box--cta strong{color:rgba(255,255,255,.88)!important}
.df-box--cta strong{color:#fff!important}
.df-box--cta a{color:#fff}
.df-box__cta{margin-top:20px!important}
.df-btn{display:inline-flex;align-items:center;gap:10px;background:#fff;color:var(--ink)!important;text-decoration:none!important;font-weight:800;font-size:15px;padding:13px 22px;border-radius:99px;transition:transform .25s var(--ease),box-shadow .25s}
.df-btn::after{content:"→";font-weight:800}
.df-btn:hover{transform:translateY(-2px);box-shadow:0 10px 30px -8px rgba(0,0,0,.5)}

/* ---------- tables ---------- */
.df-table{margin:30px 0 0;overflow-x:auto;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow);-webkit-overflow-scrolling:touch}
.df-table table{width:100%;border-collapse:collapse;font-size:15.5px;line-height:1.5}
.df-table table:has(thead th:nth-child(4)){min-width:640px}
.df-table th,.df-table td{padding:14px 18px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}
.df-table thead th{background:var(--bg-2);color:var(--ink);font-size:12.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.df-table tbody th{color:var(--ink);font-weight:700}
.df-table td{color:var(--ink-2)}
.df-table tbody tr:last-child>*{border-bottom:0}
.df-table tbody tr:nth-child(even){background:#FAFBFF}
.df-table--total tbody tr:last-child{background:#FFF4F4}
.df-table--total tbody tr:last-child>*{color:var(--ink);font-weight:700}

/* ---------- lists ---------- */
.post-content .df-steps{list-style:none;padding:0;counter-reset:s}
.post-content .df-steps li{counter-increment:s;position:relative;padding:16px 18px 16px 62px;background:#fff;border:1px solid var(--line);border-radius:18px}
.post-content .df-steps li::before{content:counter(s);position:absolute;left:16px;top:15px;width:30px;height:30px;border-radius:50%;background:var(--grad);color:#fff;font-weight:800;font-size:14px;display:grid;place-items:center}
.post-content .df-checklist{list-style:none;padding:0;background:#fff;border:1px solid var(--line);border-radius:22px;padding:10px 22px;box-shadow:var(--shadow)}
.post-content .df-checklist li{position:relative;padding:12px 0 12px 38px;margin:0;border-bottom:1px dashed var(--line)}
.post-content .df-checklist li:last-child{border-bottom:0}
.post-content .df-checklist li::before{content:"";position:absolute;left:0;top:14px;width:22px;height:22px;border-radius:7px;border:2px solid var(--indigo);background:#fff}
.post-content .df-sources{font-size:15px;line-height:1.55;color:var(--muted)}
.post-content .df-sources li{color:var(--muted)}
.post-content .df-sources li+li{margin-top:8px}
.post-content .df-sources a{font-weight:600;word-break:break-word}

/* ---------- figure ---------- */
.df-figure{margin:32px 0 0}
.df-figure img{width:100%;height:auto;border-radius:22px;border:1px solid var(--line)}
.df-figure figcaption{margin-top:10px;font-size:14px;color:var(--muted);text-align:center}

/* ---------- FAQ ---------- */
.df-faq{display:grid;gap:12px}
.df-faq__item{background:#fff;border:1px solid var(--line);border-radius:20px;padding:20px 22px}
.post-content .df-faq__item h3{margin:0;font-size:18.5px}
.post-content .df-faq__item p{margin-top:8px;font-size:16.5px;line-height:1.65}

/* ---------- author box ---------- */
.author-box{display:flex;gap:20px;align-items:flex-start;margin-top:64px!important;padding:28px;background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow)}
.author-kicker{font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--indigo)}
.post-content .author-box h2{margin:4px 0 8px;font-size:24px}
.author-box p{font-size:16px;line-height:1.6}
.author-links{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:12px}
.author-links a{font-size:14px}
@media (max-width:560px){.author-box{flex-direction:column;padding:22px}}

/* ---------- post cards (blog list, related) ---------- */
.post-list{padding-top:30px}
.post-list-title{font-size:clamp(34px,4.6vw,64px);font-weight:800;margin:16px 0}
.post-list-hero .crumbs ol{justify-content:center}
.post-cards{display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr))}
.post-card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:24px;overflow:hidden;box-shadow:var(--shadow);transition:transform .35s var(--ease),box-shadow .35s}
.post-card:hover{transform:translateY(-4px);box-shadow:0 20px 50px -18px rgba(45,60,180,.35)}
.post-card-img img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
.post-card-body{padding:22px 24px 24px;display:flex;flex-direction:column;gap:10px;flex:1}
.post-card-cat{align-self:flex-start;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--indigo)}
.post-card h2{font-size:21px;line-height:1.25;letter-spacing:-.02em;font-weight:800}
.post-card h2 a:hover{color:var(--indigo)}
.post-card p{color:var(--muted);font-size:15px;line-height:1.6}
.post-card-meta{margin-top:auto;font-size:13px!important;font-weight:600}
.post-related h2#related-h{font-size:clamp(26px,3vw,38px);margin-bottom:26px}
.post-empty{text-align:center;color:var(--muted);font-size:18px}
.post-list .nav-links{display:flex;gap:10px;justify-content:center;margin-top:36px}
.post-list .page-numbers{padding:10px 16px;border-radius:12px;background:#fff;border:1px solid var(--line);font-weight:700}
.post-list .page-numbers.current{background:var(--ink);color:#fff}

@media (max-width:640px){
  .post-content{font-size:17px}
  .post-content h2{margin-top:52px}
  .df-box{padding:20px}
  .df-table th,.df-table td{padding:12px 12px;font-size:14.5px}
  .df-table thead th{white-space:normal}
  .df-box--cta{padding:24px 22px 26px}
  .post-cover img{border-radius:18px}
}

/* ---------- homepage: latest guides ---------- */
.home-blog-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:20px 40px;margin-bottom:36px}
.home-blog-head h2{margin:14px 0 12px}
.home-blog-head .lead{max-width:560px}

img.post-avatar{object-fit:cover;background:#E9EBF5;box-shadow:0 0 0 2px #fff,0 0 0 3px var(--line)}
.author-box .author-job{margin:-4px 0 10px;font-size:14px;font-weight:700;color:var(--indigo)}
