:root {
  --navy: #0d2577; --navy-2: #1a3aa8; --teal: #00bfa6; --teal-d: #00927f; --coral: #ff7a6b;
  --ink: #12183a; --text: #4a5170; --muted: #8a90a8; --bg: #ffffff; --soft: #f4f6fd; --card: #ffffff; --line: #e6e9f4;
  --shadow: 0 18px 44px rgba(13, 37, 119, .10); --shadow-h: 0 26px 60px rgba(13, 37, 119, .16);
  --hero: linear-gradient(125deg, #0d2577 0%, #1a3aa8 50%, #0aa39a 100%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #eef1fb; --text: #b7bfd6; --muted: #8a93ad; --bg: #0b1020; --soft: #111830; --card: #141c36; --line: #232d4d;
    --shadow: 0 18px 44px rgba(0,0,0,.35); --shadow-h: 0 26px 60px rgba(0,0,0,.5); color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.7; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
a { color: var(--teal-d); }
@media (prefers-color-scheme: dark) { a { color: var(--teal); } }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 900px; }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), #7ef0dd); }

/* buttons, chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 24px; font-weight: 600; font-size: 15px; text-decoration: none; border: 0; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: #fff !important; box-shadow: 0 10px 24px rgba(0, 191, 166, .35); }
.btn-light { background: #fff; color: var(--navy) !important; }
.kicker { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.kicker.light { color: #7ef0dd; }
.chip { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px; letter-spacing: .01em; }
.chip.accent-navy { background: rgba(13,37,119,.08); color: var(--navy); }
.chip.accent-teal { background: rgba(0,191,166,.12); color: var(--teal-d); }
.chip.accent-coral { background: rgba(255,122,107,.14); color: #d9533f; }
@media (prefers-color-scheme: dark) {
  .chip.accent-navy { background: rgba(120,150,255,.16); color: #a9bcff; }
  .chip.accent-teal { background: rgba(0,191,166,.16); color: #5fe3cf; }
  .chip.accent-coral { background: rgba(255,122,107,.16); color: #ff9e92; }
}
.chip.on-dark { background: rgba(255,255,255,.16); color: #fff; }

/* covers */
.cover { position: relative; overflow: hidden; aspect-ratio: 16 / 9; }
.cover .cover-art { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.92); }
.cover .cover-art::before, .cover .cover-art::after { content: ""; position: absolute; border-radius: 50%; border: 2px dashed rgba(255,255,255,.22); }
.cover .cover-art::before { width: 46%; aspect-ratio: 1; }
.cover .cover-art::after { width: 70%; aspect-ratio: 1; border-style: solid; border-color: rgba(255,255,255,.1); }
.cover .cover-art svg { position: relative; z-index: 1; width: 22%; height: auto; padding: 4%; border-radius: 28%; background: rgba(255,255,255,.14); box-sizing: content-box; }
.cover img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.cover.accent-navy { background: radial-gradient(circle at 80% 20%, rgba(0,191,166,.45), transparent 50%), linear-gradient(135deg, #0d2577, #1a3aa8); }
.cover.accent-teal { background: radial-gradient(circle at 15% 85%, rgba(13,37,119,.55), transparent 55%), linear-gradient(135deg, #00a08c, #19c9b0); }
.cover.accent-coral { background: radial-gradient(circle at 85% 80%, rgba(13,37,119,.5), transparent 55%), linear-gradient(135deg, #ff7a6b, #ff9f7a); }

/* blog index hero */
.blog-hero { position: relative; background: var(--hero); color: #fff; padding: 160px 0 150px; overflow: hidden; }
.blog-hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: -120px; top: -160px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.14); }
.blog-hero h1 { color: #fff; font-size: 52px; line-height: 1.12; margin: 0 0 18px; max-width: 760px; }
.blog-hero h1 span { color: #7ef0dd; }
.blog-hero p { margin: 0; font-size: 18px; max-width: 620px; color: rgba(255,255,255,.82); }
.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; }
.wave path { fill: var(--bg); }

.blog-main { position: relative; z-index: 2; margin-top: -96px; padding-bottom: 80px; }
.featured { display: grid; grid-template-columns: 1.15fr 1fr; background: var(--card); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: box-shadow .3s, transform .3s; }
.featured:hover { box-shadow: var(--shadow-h); transform: translateY(-4px); }
.featured .cover { aspect-ratio: auto; min-height: 340px; }
.featured:hover .cover img, .pcard:hover .cover img { transform: scale(1.05); }
.fbody { padding: 44px 44px 40px; display: flex; flex-direction: column; gap: 14px; }
.fbody h2 { font-size: 30px; line-height: 1.25; margin: 0; }
.fbody p { margin: 0; font-size: 16.5px; }
.pmeta { margin-top: auto; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.pmeta .go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--teal-d); font-weight: 600; }
@media (prefers-color-scheme: dark) { .pmeta .go { color: var(--teal); } }
.pmeta .go svg { transition: transform .2s; }
a:hover .pmeta .go svg { transform: translateX(4px); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 56px 0 28px; }
.filters button { font: inherit; font-size: 14.5px; font-weight: 500; color: var(--text); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; cursor: pointer; transition: all .2s; }
.filters button:hover { border-color: var(--teal); color: var(--ink); }
.filters button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .filters button.on { background: var(--teal); border-color: var(--teal); color: #04221d; } }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pcard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--text); transition: transform .3s, box-shadow .3s, border-color .3s; }
.pcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-h); border-color: transparent; }
.pbody { padding: 22px 24px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pbody h3 { margin: 0; font-size: 18.5px; line-height: 1.38; }
.pbody p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#posts .is-feat { display: none; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }
.pbody .chip, .fbody .chip { align-self: flex-start; }

/* post */
.post-hero { position: relative; background: var(--hero); color: #fff; padding: 124px 0 170px; overflow: hidden; }
.post-hero.accent-teal { background: linear-gradient(125deg, #0d2577 0%, #0e6f8f 55%, #0aa39a 100%); }
.post-hero.accent-coral { background: linear-gradient(125deg, #0d2577 0%, #3a3aa0 60%, #c9607a 115%); }
.post-hero::before { content: ""; position: absolute; width: 460px; height: 460px; right: -140px; top: -120px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.14); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; margin-bottom: 26px; color: rgba(255,255,255,.65); }
.crumbs a { color: rgba(255,255,255,.75); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs b { font-weight: 500; color: #fff; }
.post-hero h1 { color: #fff; font-size: 44px; line-height: 1.18; margin: 16px 0 26px; }
.byline { display: flex; align-items: center; gap: 12px; }
.byline b { display: block; color: #fff; font-weight: 600; font-size: 15px; line-height: 1.3; }
.byline span { font-size: 13.5px; color: rgba(255,255,255,.72); }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--navy); background: linear-gradient(135deg, #7ef0dd, #fff); flex-shrink: 0; }
.avatar.big { width: 58px; height: 58px; font-size: 22px; color: #fff; background: var(--hero); }
.hero-cover { position: relative; z-index: 2; margin-top: -140px; border-radius: 26px; box-shadow: var(--shadow-h); }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; padding-top: 56px; padding-bottom: 40px; max-width: 1140px; }
.post-body { font-size: 17.5px; line-height: 1.85; min-width: 0; }
.post-body .lede { font-size: 20px; line-height: 1.7; color: var(--ink); font-weight: 500; margin-bottom: 26px; }
.post-body h2 { font-size: 27px; line-height: 1.3; margin: 48px 0 14px; scroll-margin-top: 96px; position: relative; padding-left: 18px; }
.post-body h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 4px; background: linear-gradient(var(--teal), var(--navy-2)); }
.post-body h3 { font-size: 20px; margin: 30px 0 8px; }
.post-body p { margin: 0 0 18px; }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body ul { list-style: none; padding: 0; margin: 0 0 22px; }
.post-body ul li { position: relative; padding-left: 34px; margin: 10px 0; }
.post-body ul li::before { content: ""; position: absolute; left: 0; top: .42em; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,191,166,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300a38e' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.post-body ol { counter-reset: n; list-style: none; padding: 0; margin: 0 0 22px; }
.post-body ol li { counter-increment: n; position: relative; padding: 16px 18px 16px 64px; margin: 12px 0; background: var(--soft); border-radius: 16px; }
.post-body ol li::before { content: counter(n); position: absolute; left: 16px; top: 15px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; background: var(--hero); }
.post-body table.info { width: 100%; border-collapse: separate; border-spacing: 0; margin: 10px 0 26px; font-size: 15.5px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.post-body table.info th, .post-body table.info td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body table.info tr:last-child th, .post-body table.info tr:last-child td { border-bottom: 0; }
.post-body table.info tr:first-child { background: var(--navy); }
.post-body table.info tr:first-child th, .post-body table.info tr:first-child td, .post-body table.info tr:first-child strong { color: #fff; }
.post-body table.info th { width: 30%; color: var(--ink); font-weight: 600; background: var(--soft); }
.post-body table.info tr:first-child th { background: transparent; }

.post-end { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 26px; }
.share > span { font-weight: 600; color: var(--ink); margin-right: 4px; }
.share a, .share button { font: inherit; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; cursor: pointer; transition: border-color .2s, color .2s; }
.share a:hover, .share button:hover { border-color: var(--teal); color: var(--ink); }
.author { display: flex; gap: 18px; align-items: flex-start; background: var(--soft); border-radius: 20px; padding: 24px; }
.author b { color: var(--ink); font-size: 16.5px; }
.author p { margin: 4px 0 0; font-size: 15px; line-height: 1.65; }

.sidebar { position: relative; }
.side-box { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; margin-bottom: 20px; }
.sidebar .toc { position: sticky; top: 100px; }
.side-box h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.45; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--teal-d); border-left-color: var(--teal); font-weight: 600; }
@media (prefers-color-scheme: dark) { .toc a.on { color: var(--teal); } }
.side-box.app { text-align: center; background: var(--hero); border: 0; color: rgba(255,255,255,.85); }
.side-box.app h4 { color: #fff; text-transform: none; letter-spacing: 0; font-size: 19px; margin: 12px 0 6px; }
.side-box.app p { font-size: 14px; margin: 0 0 16px; }
.app-ic { width: 56px; height: 56px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: rgba(255,255,255,.15); color: #fff; }
.side-box.app .btn { width: 100%; }
.stores { display: flex; gap: 8px; }
.stores a { flex: 1; text-align: center; color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.45); white-space: nowrap; }
.stores a:hover { background: rgba(255,255,255,.12); }
.stores.small { margin-top: 10px; }
.stores.small a { font-size: 13px; padding: 8px 6px; }

.related { background: var(--soft); padding: 70px 0 80px; margin-top: 30px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.sec-head h2 { margin: 0; font-size: 28px; }
.sec-head a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }

/* cta band + footer */
.cta-band { background: var(--hero); color: #fff; padding: 64px 0; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 380px; height: 380px; left: -120px; bottom: -220px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.16); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; position: relative; z-index: 1; }
.cta-band .kicker { color: #7ef0dd; margin-bottom: 8px; }
.cta-band h2 { color: #fff; font-size: 30px; line-height: 1.25; margin: 0 0 10px; max-width: 600px; }
.cta-band p { margin: 0; color: rgba(255,255,255,.8); max-width: 560px; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; min-width: 280px; }
.bfoot { background: #081650; color: rgba(255,255,255,.65); padding: 60px 0 28px; font-size: 14.5px; }
.foot-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.foot-top img { height: 36px; width: auto; margin-bottom: 14px; }
.foot-top p { margin: 0; max-width: 320px; }
.foot-top h4 { color: #fff; font-size: 15px; margin: 4px 0 14px; }
.foot-top a { display: block; color: rgba(255,255,255,.65); text-decoration: none; margin: 8px 0; }
.foot-top a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; font-size: 13.5px; }

@media (max-width: 1000px) {
  .post-layout { grid-template-columns: 1fr; gap: 0; }
  .sidebar { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr; }
  .featured .cover { min-height: 0; aspect-ratio: 16 / 9; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .cta-actions { min-width: 0; width: 100%; max-width: 420px; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 18px; }
  .blog-hero { padding: 120px 0 130px; }
  .blog-hero h1 { font-size: 34px; }
  .blog-hero p { font-size: 16px; }
  .fbody { padding: 26px 22px; }
  .fbody h2 { font-size: 23px; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .filters { margin-top: 36px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .filters button { white-space: nowrap; }
  .post-hero { padding: 100px 0 120px; }
  .post-hero h1 { font-size: 29px; }
  .hero-cover { margin-top: -96px; border-radius: 18px; }
  .post-layout { padding-top: 34px; }
  .post-body { font-size: 16.5px; line-height: 1.8; }
  .post-body .lede { font-size: 18px; }
  .post-body h2 { font-size: 23px; margin-top: 38px; }
  .post-body ol li { padding-left: 58px; }
  .post-body table.info { font-size: 14px; }
  .post-body table.info th, .post-body table.info td { padding: 10px; }
  .author { flex-direction: column; }
  .cta-band h2 { font-size: 24px; }
  .foot-top { grid-template-columns: 1fr; gap: 24px; }
  .sec-head h2 { font-size: 23px; }
}
