/* CrazyDodo blog — article + index layout (loaded on /blog/ pages only) */
:root { --b-head: "Antonio", "Inter", sans-serif; --b-ink: #1B2140; --b-body: #333A57; --b-muted: #6B7392; --b-line: #E6E7F2; --b-acc: #5A67D8; }

/* let the sticky sidebar work: main must not be a scroll container on blog pages */
.main-content:has(.post) { overflow: visible; overflow-x: clip; }
html:has(.post), body:has(.post) { overflow-x: clip; overflow-y: visible; }

/* reading progress */
.post-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: linear-gradient(90deg, #667EEA, #764BA2); transition: width .1s linear; }

/* ── Hero ── */
.post { max-width: 1180px; margin: 0 auto; }
.post-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; background: radial-gradient(120% 140% at 100% 0%, #3B3F86 0%, #1B2140 55%); border-radius: 24px; padding: 44px 44px 44px 48px; color: #D9DCF0; overflow: hidden; position: relative; }
.post-hero::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(118, 75, 162, .45), transparent 70%); pointer-events: none; }
.post-crumbs { font-size: 13px; color: #A9AED6; margin-bottom: 18px; display: flex; gap: 8px; align-items: center; }
.post-crumbs a { color: #fff; font-weight: 600; text-decoration: none; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 4px 12px; }
.post-hero h1 { font-family: var(--b-head); font-weight: 700; font-size: clamp(34px, 3.9vw, 50px); line-height: 1.06; letter-spacing: .2px; color: #fff; margin: 0 0 16px; }
.ph-lead { font-size: 17px; line-height: 1.6; color: #C9CCE6; margin: 0 0 24px; max-width: 560px; }
.ph-author { display: flex; align-items: center; gap: 12px; }
.ph-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 700 14px "Inter", sans-serif; color: #1B2140; background: linear-gradient(135deg, #F7C948, #F59F00); flex: none; }
.ph-author b { display: block; color: #fff; font-size: 14px; }
.ph-author small { font-size: 13px; color: #A9AED6; }
.ph-media { position: relative; z-index: 1; }
.ph-frame { border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); transform-origin: left center; }
.ph-frame img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }

/* ── Two columns ── */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; margin-top: 40px; }
.post-main { min-width: 0; max-width: 760px; }
.post-side { min-width: 0; }
.ps-sticky { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.ps-toc { border-left: 2px solid var(--b-line); padding: 2px 0 2px 16px; }
.ps-toc b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--b-muted); margin-bottom: 10px; }
.ps-toc ol { list-style: none; margin: 0; padding: 0; }
.ps-toc li { margin: 0 0 2px; }
.ps-toc a { display: block; font-size: 14px; line-height: 1.4; color: var(--b-muted); text-decoration: none; padding: 5px 0; margin-left: -18px; padding-left: 16px; border-left: 2px solid transparent; transition: color .15s; }
.ps-toc a:hover { color: var(--b-ink); }
.ps-toc a.on { color: var(--b-acc); border-left-color: var(--b-acc); font-weight: 600; }
.ps-cta { background: linear-gradient(135deg, #F6F5FF, #EEF1FE); border: 1px solid #DCD8FA; border-radius: 16px; padding: 18px; }
.ps-cta b { font-family: var(--b-head); font-size: 22px; color: var(--b-ink); display: block; }
.ps-cta p { font-size: 13.5px; line-height: 1.5; color: var(--b-body); margin: 6px 0 14px; }
.ps-cta .btn-cta { display: block; text-align: center; text-decoration: none; color: #fff !important; }
.post-mtoc { display: none; }

/* ── Key takeaways ── */
.post-key { background: #fff; border: 1px solid var(--b-line); border-left: 4px solid #F59F00; border-radius: 14px; padding: 20px 24px; margin: 0 0 32px; }
.post-key b { font-family: var(--b-head); font-size: 22px; color: var(--b-ink); letter-spacing: .3px; }
.post-key ul { margin: 10px 0 0; padding: 0; list-style: none; }
.post-key li { position: relative; padding-left: 28px; margin: 0 0 8px; font-size: 15.5px; line-height: 1.6; color: var(--b-body); }
.post-key li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 50%; background: #E6F8F1; color: #12B886; font-size: 12px; font-weight: 700; display: grid; place-items: center; }

/* ── Article body ── */
.post .guide-body { font-size: 17px; line-height: 1.78; color: var(--b-body); }
.post .guide-body > p:first-child { font-size: 19px; line-height: 1.7; color: var(--b-ink); }
.post .guide-body p { margin: 0 0 20px; }
.post .guide-body a { color: var(--b-acc); text-decoration: underline; text-decoration-color: rgba(90, 103, 216, .35); text-underline-offset: 3px; }
.post .guide-body a:hover { text-decoration-color: currentColor; }
.post .guide-body h2:not(.guide-step) { font-family: var(--b-head); font-weight: 700; font-size: 34px; line-height: 1.12; letter-spacing: .2px; color: var(--b-ink); margin: 56px 0 16px; padding-top: 28px; border-top: 1px solid var(--b-line); scroll-margin-top: 20px; }
.post .guide-body h3 { font-family: var(--b-head); font-weight: 700; font-size: 24px; line-height: 1.2; color: var(--b-ink); margin: 34px 0 10px; scroll-margin-top: 20px; }
.post .guide-toc { display: none; }
.post .guide-list { padding-left: 0; list-style: none; margin: 0 0 24px; }
.post ul.guide-list > li { position: relative; padding-left: 26px; margin: 0 0 12px; }
.post ul.guide-list > li::before { content: ""; position: absolute; left: 6px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #667EEA, #764BA2); }
.post ol.guide-list { counter-reset: gl; }
.post ol.guide-list > li { counter-increment: gl; position: relative; padding-left: 40px; margin: 0 0 14px; }
.post ol.guide-list > li::before { content: counter(gl); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 8px; background: #EEF0FD; color: var(--b-acc); font: 700 13px/26px "Inter", sans-serif; text-align: center; }

/* screenshots */
.post .guide-shot { margin: 30px 0 34px; }
.post .gs-frame { border-radius: 14px; box-shadow: 0 20px 50px rgba(27, 33, 64, .12); }
.post .guide-shot figcaption { font-size: 14px; margin-top: 12px; }

/* tables */
.post .guide-table-wrap { margin: 10px 0 28px; border: 1px solid var(--b-line); border-radius: 14px; background: #fff; }
.post .guide-table-wrap .guide-table { border: 0; border-radius: 0; }
.post .guide-table { font-size: 15px; }
.post .guide-table thead th { background: #1B2140; color: #fff; font-size: 12px; letter-spacing: .6px; padding: 12px 16px; border: 0; }
.post .guide-table td { padding: 13px 16px; }
.post .guide-table tbody tr:nth-child(even) td { background: #FAFAFE; }
.post .guide-table td:first-child { white-space: normal; min-width: 130px; color: var(--b-ink); }
.post > .post-layout .guide-body > .guide-table { border-radius: 14px; overflow: hidden; }

/* stats */
.post .blog-stats div { border-radius: 16px; padding: 18px; }
.post .blog-stats b { font-family: var(--b-head); font-size: 40px; background: linear-gradient(135deg, #667EEA, #764BA2); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Steps ── */
.steps { list-style: none; margin: 26px 0 34px; padding: 0; position: relative; }
.step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 20px; padding-bottom: 30px; }
.step::before { content: ""; position: absolute; left: 21px; top: 46px; bottom: 4px; width: 2px; background: linear-gradient(#C9C3F5, #EDEBFB); }
.step:last-child { padding-bottom: 0; }
.step:last-child::before { display: none; }
.step-n { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font: 700 18px var(--b-head); color: #fff; background: linear-gradient(135deg, #667EEA, #764BA2); box-shadow: 0 8px 20px rgba(102, 126, 234, .35); }
.post .guide-body .step-b h3 { margin: 8px 0 6px; font-size: 23px; }
.post .guide-body .step-b p { margin: 0 0 12px; }
.step-shot { margin: 14px 0 0; border: 1px solid #DEDCF2; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 12px 34px rgba(27, 33, 64, .10); }
.step-shot img { display: block; width: 100%; height: auto; }
.step-shot figcaption { font-size: 13.5px; color: var(--b-muted); padding: 10px 14px; border-top: 1px solid #EEEDF7; background: #FBFBFE; }

/* tip */
.blog-tip { background: #FFF9EB; border: 1px solid #F8E3B0; border-radius: 14px; padding: 16px 20px 16px 52px; margin: 24px 0 28px; position: relative; }
.blog-tip::before { content: "💡"; position: absolute; left: 18px; top: 15px; font-size: 20px; }
.blog-tip b { color: #7A4B00; font-size: 15px; }
.post .guide-body .blog-tip p { margin: 4px 0 0; font-size: 15.5px; line-height: 1.6; color: #5C4A26; }

/* CTA boxes */
.post .blog-cta, .post .blog-try { border-radius: 18px; padding: 24px 26px; }
.post .blog-cta { background: radial-gradient(120% 160% at 100% 0%, #3B3F86, #1B2140 60%); border: 0; margin-top: 44px; }
.post .blog-cta b { color: #fff; font-family: var(--b-head); font-size: 26px; }
.post .blog-cta p { color: #C9CCE6; }
.post .blog-try b { font-family: var(--b-head); font-size: 22px; }

/* end-of-article CTA */
.post-cta { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: center; margin: 52px 0 8px; padding: 34px 34px 30px; border-radius: 22px; color: #C9CCE6; background: radial-gradient(90% 120% at 100% 0%, #4B3F99 0%, rgba(75, 63, 153, 0) 60%), radial-gradient(70% 90% at 0% 100%, #2E3C8A 0%, rgba(46, 60, 138, 0) 60%), #1B2140; box-shadow: 0 24px 60px rgba(27, 33, 64, .22); }
.post-cta::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 18px 18px; pointer-events: none; }
.pc-text { position: relative; }
.pc-eyebrow { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #1B2140; background: #F7C948; border-radius: 999px; padding: 4px 10px; margin-bottom: 12px; }
.post-cta b { display: block; font-family: var(--b-head); font-weight: 700; font-size: 34px; line-height: 1.08; color: #fff; letter-spacing: .2px; }
.post .guide-body .post-cta p, .post-cta p { margin: 10px 0 18px; font-size: 15.5px; line-height: 1.6; color: #C9CCE6; }
.pc-form { display: flex; gap: 6px; background: #fff; border-radius: 14px; padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: 460px; }
.pc-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 15px "Inter", sans-serif; color: #1B2140; padding: 10px 12px; }
.pc-form input::placeholder { color: #9AA0BC; }
.pc-form button { flex: none; border: 0; cursor: pointer; border-radius: 10px; padding: 11px 18px; font: 700 14.5px "Inter", sans-serif; color: #fff; background: linear-gradient(135deg, #667EEA, #764BA2); transition: transform .15s, box-shadow .15s; }
.pc-form button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(102, 126, 234, .45); }
.pc-points { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; padding: 0; font-size: 13px; color: #A9AED6; }
.pc-points li { position: relative; padding-left: 20px; }
.pc-points li::before { content: "✓"; position: absolute; left: 0; color: #6BD3A6; font-weight: 700; }
.pc-visual { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; padding: 18px; backdrop-filter: blur(4px); transform: rotate(2deg); }
.pc-ring { display: grid; justify-items: center; gap: 6px; background: #fff; border-radius: 14px; padding: 14px 8px 10px; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.pc-ring i { font-style: normal; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font: 800 17px "Inter", sans-serif; color: #1B2140; background: radial-gradient(closest-side, #fff 76%, transparent 78% 100%), conic-gradient(var(--c) calc(var(--v) * 1%), #ECEEF6 0); }
.pc-ring small { font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #6B7392; }

/* in-article "try it" boxes */
.post .blog-try { display: flex; align-items: center; gap: 16px 22px; flex-wrap: wrap; background: #fff; border: 1px solid var(--b-line); border-left: 4px solid #667EEA; border-radius: 16px; padding: 20px 22px; margin: 30px 0; box-shadow: 0 8px 24px rgba(27, 33, 64, .05); }
.post .blog-try > div { flex: 1 1 280px; }
.post .blog-try b { color: var(--b-ink); }
.post .guide-body .blog-try p { margin: 4px 0 0; font-size: 15px; color: var(--b-body); }
.post .blog-try .btn-cta { flex: none; display: inline-flex; align-items: center; justify-content: center; width: auto; height: auto; min-height: 0; line-height: 1.2; padding: 12px 20px; border-radius: 12px; font-size: 14.5px; text-decoration: none; }

/* related */
.post-related { margin: 64px 0 20px; padding-top: 36px; border-top: 1px solid var(--b-line); }
.post-related h2 { font-family: var(--b-head); font-size: 34px; color: var(--b-ink); margin: 0 0 20px; }
.pr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pr-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--b-line); border-radius: 16px; overflow: hidden; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.pr-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(27, 33, 64, .10); }
.pr-img { display: block; background: #EEF0FA; padding: 14px 14px 0; height: 150px; overflow: hidden; }
.pr-img img { display: block; width: 100%; border-radius: 8px 8px 0 0; box-shadow: 0 6px 18px rgba(27, 33, 64, .12); }
.pr-txt { padding: 16px 18px 18px; font-family: var(--b-head); font-size: 21px; font-weight: 700; line-height: 1.2; color: var(--b-ink); }
.pr-txt small { display: block; font-family: "Inter", sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #764BA2; margin-bottom: 6px; }

/* lightbox */
.post-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(15, 18, 38, .88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.post-lightbox[hidden] { display: none; }
.post-lightbox img { max-width: min(1400px, 100%); max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }

/* ── Blog index ── */
.blog-hero { padding: 8px 0 26px; }
.bh-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #764BA2; margin: 0 0 8px; }
.blog-hero h1 { font-family: var(--b-head); font-weight: 700; font-size: clamp(40px, 5vw, 60px); line-height: 1.02; color: var(--b-ink); margin: 0 0 10px; }
.blog-hero p { font-size: 17px; color: var(--b-muted); margin: 0; max-width: 620px; line-height: 1.6; }
.blog-grid { gap: 22px; }
.blog-card { padding: 0; overflow: hidden; gap: 0; border-radius: 18px; }
.bc-img { display: block; height: 180px; overflow: hidden; background: linear-gradient(135deg, #EEF0FD, #F3EEFB); padding: 16px 16px 0; }
.bc-img img { display: block; width: 100%; border-radius: 8px 8px 0 0; box-shadow: 0 8px 22px rgba(27, 33, 64, .14); transition: transform .3s; }
.blog-card:hover .bc-img img { transform: translateY(-4px); }
.bc-txt { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 20px; flex: 1; }
.blog-card h2 { font-family: var(--b-head); font-size: 25px; font-weight: 700; line-height: 1.12; }
.blog-card p { font-size: 14.5px; }
.bc-foot { font-size: 13px; border-top: 1px solid #F0F1F7; padding-top: 12px; margin-top: auto; }
.blog-card.featured { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 0; }
.blog-card.featured .bc-img { order: 2; height: auto; min-height: 300px; background: transparent; padding: 32px 0 0 0; }
.blog-card.featured .bc-img img { border-radius: 10px 0 0 0; }
.blog-card.featured .bc-txt { padding: 36px 36px 30px; justify-content: center; }
.blog-card.featured h2 { font-size: 40px; line-height: 1.05; }
.blog-card.featured .bc-foot { border-top-color: rgba(255, 255, 255, .12); color: #A9AED6; }

/* ── Responsive ── */
@media (max-width: 1180px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-side { display: none; }
  .post-main { max-width: 780px; width: 100%; margin: 0 auto; }
  .post-mtoc { display: block; background: #fff; border: 1px solid var(--b-line); border-radius: 14px; padding: 14px 18px; margin: 0 0 30px; }
  .post-mtoc summary { cursor: pointer; font-weight: 700; color: var(--b-ink); }
  .post-mtoc ol { margin: 10px 0 2px; padding-left: 20px; }
  .post-mtoc li { margin: 0 0 6px; }
  .post-mtoc a { color: var(--b-acc); text-decoration: none; font-size: 15px; }
}
@media (max-width: 960px) {
  .post-cta { grid-template-columns: minmax(0, 1fr); }
  .pc-visual { grid-template-columns: repeat(4, minmax(0, 1fr)); transform: none; padding: 12px; gap: 8px; }
  .pc-ring i { width: 46px; height: 46px; font-size: 14px; }
  .post-hero { grid-template-columns: minmax(0, 1fr); padding: 32px 26px; gap: 28px; }
  .ph-frame { transform: none; }
  .pr-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .blog-card.featured { grid-template-columns: minmax(0, 1fr); }
  .blog-card.featured .bc-img { order: 0; min-height: 0; height: 200px; padding: 20px 20px 0; }
  .blog-card.featured .bc-img img { border-radius: 8px 8px 0 0; }
  .blog-card.featured h2 { font-size: 32px; }
}
@media (max-width: 640px) {
  .post-cta { padding: 26px 20px 22px; border-radius: 18px; }
  .post-cta b { font-size: 28px; }
  .pc-form button { padding: 11px 14px; }
  .post-hero { border-radius: 18px; padding: 26px 20px; margin: 0 -4px; }
  .post-hero h1 { font-size: 34px; }
  .ph-lead { font-size: 16px; }
  .post .guide-body { font-size: 16.5px; }
  .post .guide-body > p:first-child { font-size: 17.5px; }
  .post .guide-body h2:not(.guide-step) { font-size: 29px; margin-top: 44px; }
  .step { grid-template-columns: 36px minmax(0, 1fr); gap: 14px; }
  .step-n { width: 36px; height: 36px; font-size: 16px; border-radius: 11px; }
  .step::before { left: 17px; top: 38px; }
  .pr-grid { grid-template-columns: minmax(0, 1fr); }
  .post-key { padding: 18px; }
  .blog-tip { padding-left: 46px; }
}
