/* =========================================================
   KEMET — Blog (listing + article). Extends styles.css tokens.
   ========================================================= */

/* ---------- Media frame: uniform ratio, image never cropped ---------- */
.bmedia {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; isolation: isolate;
  background: var(--navy-800);
}
.bmedia__bg {
  position: absolute; inset: -12%; z-index: -1;
  background: center / cover no-repeat;
  filter: blur(26px) saturate(1.3) brightness(.6);
  transform: scale(1.1);
}
.bmedia::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: linear-gradient(rgba(2,22,71,.45), rgba(2,22,71,.45)), linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px, 22px 22px;
  mask-image: linear-gradient(90deg, #000 0 18%, transparent 30% 70%, #000 82%);
  -webkit-mask-image: linear-gradient(90deg, #000 0 18%, transparent 30% 70%, #000 82%);
}
.bmedia img {
  position: relative; z-index: 2; height: 100%; width: auto; max-width: 100%; margin-inline: auto;
  object-fit: contain; box-shadow: 0 20px 40px -12px rgba(0,0,0,.6);
  transition: transform .8s var(--ease-out);
}

/* ---------- Category pills ---------- */
.bpill {
  --c: var(--navy-600);
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  font-size: 13px; font-weight: 800; line-height: 1; padding: 7px 12px; border-radius: 999px;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
  position: relative; z-index: 3;
}
.bpill::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.bpill--guide { --c: #b58a00; }
.bpill--benches { --c: #16398f; }
.bpill--equipment { --c: #0e7c86; }
.bpill--safety { --c: #c0392b; }
.bpill--materials { --c: #6b4fb3; }
.on-dark .bpill, .ahero .bpill, .bfeat__lead .bpill { color: #fff; background: color-mix(in srgb, var(--c) 55%, rgba(255,255,255,.08)); }
.bpill--lg { font-size: 14px; padding: 9px 16px; }
a.bpill { transition: transform .3s var(--ease-spring), filter .3s; }
a.bpill:hover { transform: translateY(-2px); filter: brightness(1.15); }

.bmeta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--muted); }
.bmeta span { display: inline-flex; align-items: center; gap: 6px; }
.bmeta svg { width: 15px; height: 15px; color: var(--gold-600); }

/* ---------- Listing hero ---------- */
.bhero h1 em { color: var(--gold-500); }
.bsearch {
  margin-top: 34px; max-width: 620px; position: relative; display: flex; align-items: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 18px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.bsearch:focus-within { border-color: var(--gold-500); background: rgba(255,255,255,.12); box-shadow: 0 0 0 6px rgba(252,196,0,.12); }
.bsearch__ico { position: absolute; right: 20px; color: var(--gold-500); display: grid; }
.bsearch__ico svg { width: 22px; height: 22px; }
.bsearch input {
  flex: 1; min-height: 62px; padding: 0 58px 0 60px; font: inherit; font-size: 17px; color: #fff;
  background: transparent; border: 0; outline: none;
}
.bsearch input::placeholder { color: rgba(220,228,250,.6); }
.bsearch input::-webkit-search-cancel-button { filter: invert(1); }
.bsearch kbd { position: absolute; left: 16px; font: 700 12px ui-monospace, Consolas, monospace; color: var(--muted-on-dark); border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 3px 8px; }
.bhero__stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.bhero__stats li { font-size: 14px; color: var(--muted-on-dark); padding: 6px 14px; border-radius: 999px; border: 1px dashed rgba(180,192,228,.35); }
.bhero__stats strong { color: var(--gold-500); font-size: 16px; margin-inline-end: 4px; }

/* ---------- Featured (magazine layout) ---------- */
.bfeat-sec { padding-bottom: 70px; }
.bfeat { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; }
.bfeat__lead, .bfeat__item { position: relative; border-radius: var(--radius-lg); overflow: hidden; isolation: isolate; transition: transform .5s var(--ease-out), box-shadow .5s; }
.bfeat__lead { background: linear-gradient(170deg, var(--navy-700), var(--navy-900)); color: #fff; box-shadow: var(--shadow-2); display: flex; flex-direction: column; }
.bfeat__lead .bmedia { aspect-ratio: 16 / 9; }
.bfeat__lead .bfeat__body { padding: 30px 34px 34px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.bfeat__lead h3 { font-size: clamp(24px, 2.5vw, 34px); font-weight: 900; }
.bfeat__lead p { color: var(--muted-on-dark); font-size: 17px; }
.bfeat__lead .bmeta { color: var(--muted-on-dark); }
.bfeat__lead .bmeta svg { color: var(--gold-500); }
.bfeat__lead .btn { margin-top: auto; align-self: flex-start; pointer-events: none; }
.bfeat__lead:hover .btn { box-shadow: var(--glow-gold); }
.bfeat__top { display: flex; align-items: center; justify-content: space-between; }
.bfeat__no { font: 900 40px/1 ui-monospace, Consolas, monospace; color: transparent; -webkit-text-stroke: 1.5px rgba(252,196,0,.55); }
.bfeat__side { display: grid; gap: 24px; }
.bfeat__item { display: grid; grid-template-columns: 42% 1fr; background: var(--white); box-shadow: var(--shadow-1); border: 1px solid rgba(3,28,91,.06); }
.bfeat__item .bmedia { aspect-ratio: auto; height: 100%; min-height: 220px; }
.bfeat__item .bfeat__body { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.bfeat__item h3 { font-size: 19px; color: var(--navy-800); line-height: 1.45; }
.bfeat__item .bfeat__no { font-size: 28px; -webkit-text-stroke-color: rgba(3,28,91,.25); }
.bfeat__item .bcard__more { margin-top: auto; }
.bfeat__ex { color: var(--muted); font-size: 15px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bfeat__lead:hover, .bfeat__item:hover { transform: translateY(-8px); box-shadow: var(--shadow-2); }
.bfeat__lead:hover .bmedia img, .bfeat__item:hover .bmedia img { transform: scale(1.05); }

/* ---------- Filter bar ---------- */
.bfilter { position: sticky; top: 70px; z-index: 50; background: rgba(243,245,251,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-block: 1px solid rgba(3,28,91,.08); scroll-margin-top: 70px; }
.header.is-hidden ~ main .bfilter { top: 0; }
.bfilter__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bfilter__chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px; scrollbar-width: none; }
.bfilter__chips::-webkit-scrollbar { display: none; }
.bchip {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; min-height: 44px; padding: 8px 16px;
  border-radius: 999px; border: 1.5px solid rgba(3,28,91,.14); background: var(--white);
  color: var(--navy-700); font-weight: 700; font-size: 15px;
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease-spring);
}
.bchip span { font: 700 12px ui-monospace, Consolas, monospace; background: rgba(3,28,91,.08); border-radius: 999px; padding: 2px 8px; transition: background .3s; }
.bchip:hover { border-color: var(--navy-600); transform: translateY(-2px); }
.bchip.is-active { background: var(--navy-700); color: var(--gold-500); border-color: var(--navy-700); }
.bchip.is-active span { background: rgba(252,196,0,.18); }
.bfilter__status { font-size: 14px; color: var(--muted); white-space: nowrap; }
.bfilter__status b { color: var(--navy-800); }

/* ---------- Card grid ---------- */
.bgrid-sec { padding-top: 60px; }
.bgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.bcard {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--white); border: 1px solid rgba(3,28,91,.07); box-shadow: var(--shadow-1);
  transition: transform .5s var(--ease-out), box-shadow .5s, border-color .4s;
}
.bcard[hidden] { display: none; }
.bcard.is-shown { animation: cardIn .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(28px) scale(.98); } }
.bcard__link { position: absolute; inset: 0; z-index: 5; border-radius: inherit; }
.bcard__link:focus-visible { outline-offset: -4px; }
.bcard__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; position: relative; }
.bcard__body::before { content: ""; position: absolute; top: 0; right: 24px; left: 24px; height: 2px; background: var(--gold-500); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease-out); }
.bcard__title { font-size: 20px; line-height: 1.5; color: var(--navy-800); transition: color .3s; }
.bcard__excerpt { color: var(--muted); font-size: 15px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard__more { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--navy-700); margin-top: auto; padding-top: 6px; font-size: 15px; }
.bcard__more svg { width: 18px; height: 18px; transition: transform .4s var(--ease-out); color: var(--gold-600); }
.bcard:hover { transform: translateY(-8px); box-shadow: var(--shadow-2); border-color: rgba(252,196,0,.5); }
.bcard:hover .bmedia img { transform: scale(1.05) translateY(-2px); }
.bcard:hover .bcard__body::before { transform: scaleX(1); }
.bcard:hover .bcard__title { color: var(--navy-600); }
.bcard:hover .bcard__more svg, .bfeat__item:hover .bcard__more svg { transform: translateX(-6px); }
.bcard:focus-within { border-color: var(--gold-500); }
.on-dark .bcard { border-color: transparent; }

.bempty { text-align: center; padding: 70px 20px; max-width: 460px; margin-inline: auto; }
.bempty__ico { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center; background: var(--navy-700); color: var(--gold-500); animation: floatY 5s ease-in-out infinite; }
.bempty__ico svg { width: 34px; height: 34px; }
.bempty h3 { font-size: 24px; color: var(--navy-800); }
.bempty p { color: var(--muted); margin: 8px 0 22px; }

.bmore { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 50px; }
.bmore[hidden] { display: none; }
.bmore__n { font: 700 13px ui-monospace, Consolas, monospace; background: rgba(255,255,255,.14); border-radius: 999px; padding: 2px 10px; }
.bmore__bar { width: 200px; height: 4px; border-radius: 4px; background: rgba(3,28,91,.1); overflow: hidden; }
.bmore__bar span { display: block; height: 100%; background: var(--gold-500); transform-origin: right; transition: transform .6s var(--ease-out); }

mark.hl { background: rgba(252,196,0,.35); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ================= ARTICLE ================= */
.ahero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  padding: calc(var(--header-h) + 64px) 0 190px;
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
}
.ahero .hero__grid { z-index: -1; }
.ahero__inner { max-width: 940px; }
.ahero .crumbs { flex-wrap: wrap; row-gap: 4px; }
.ahero .crumbs span[aria-current] { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ahero__title { font-size: clamp(32px, 4.8vw, 58px); font-weight: 900; line-height: 1.3; margin-top: 20px; text-wrap: balance; }
.ahero__lead { margin-top: 18px; font-size: clamp(17px, 1.6vw, 21px); color: var(--muted-on-dark); max-width: 62ch; }
.ahero__meta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 22px 34px; padding-top: 26px; border-top: 1px solid rgba(180,192,228,.18); }
.ahero__author { display: flex; align-items: center; gap: 12px; }
.ahero__author img { width: 48px; height: 48px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(252,196,0,.4); }
.ahero__author small, .ahero__facts small { display: block; font-size: 12px; color: var(--muted-on-dark); }
.ahero__author strong { font-size: 16px; }
.ahero__facts { display: flex; flex-wrap: wrap; gap: 14px 30px; }
.ahero__facts li { font-weight: 700; font-size: 15px; position: relative; }
.ahero__facts li + li::before { content: ""; position: absolute; right: -16px; top: 20%; bottom: 20%; width: 1px; background: rgba(180,192,228,.25); }

.acover { margin: -150px auto 0; position: relative; z-index: 2; max-width: 1100px; }
.acover .bmedia--cover { aspect-ratio: 21 / 10; border-radius: var(--radius-lg); box-shadow: var(--shadow-2); }
.acover .bmedia--cover img { box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
.acover__dim { top: -26px; right: 0; left: 0; }
.acover::after { content: ""; position: absolute; inset: 14px; border-radius: calc(var(--radius-lg) - 8px); border: 1px dashed rgba(252,196,0,.4); pointer-events: none; z-index: 3; }

.abody { display: grid; grid-template-columns: 250px minmax(0, 720px) 56px; justify-content: center; gap: 56px; padding-block: 70px 90px; align-items: start; }
.is-article main { background:
  radial-gradient(700px 500px at 100% 20%, rgba(252,196,0,.08), transparent 60%),
  radial-gradient(800px 600px at 0% 60%, rgba(22,57,143,.08), transparent 60%),
  var(--paper); }

/* TOC */
.abody__toc { position: sticky; top: 100px; }
.toc { border-radius: var(--radius); background: var(--white); border: 1px solid rgba(3,28,91,.08); box-shadow: var(--shadow-1); overflow: hidden; }
.toc summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 16px 18px; font-weight: 800; color: var(--navy-800); border-bottom: 1px solid rgba(3,28,91,.07); }
.toc summary::-webkit-details-marker { display: none; }
.toc summary svg { width: 18px; height: 18px; color: var(--gold-600); }
.toc__count { margin-inline-start: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.toc ol { list-style: none; padding: 10px 8px 14px; margin: 0; max-height: calc(100vh - 240px); overflow-y: auto; }
.toc li a { display: flex; gap: 10px; align-items: baseline; padding: 7px 12px; border-radius: 10px; font-size: 14.5px; line-height: 1.55; color: var(--muted); border-inline-start: 2px solid transparent; transition: color .25s, background .25s, border-color .25s; }
.toc li a b { font: 700 11px ui-monospace, Consolas, monospace; color: rgba(3,28,91,.35); transition: color .25s; }
.toc .toc__l3 a { padding-inline-start: 34px; font-size: 13.5px; }
.toc li a:hover { color: var(--navy-800); background: rgba(3,28,91,.04); }
.toc li a.is-active { color: var(--navy-800); font-weight: 700; background: rgba(252,196,0,.12); border-color: var(--gold-500); }
.toc li a.is-active b { color: var(--gold-600); }
.toc__progress { height: 3px; background: rgba(3,28,91,.06); }
.toc__progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-600), var(--gold-400)); transform: scaleX(0); transform-origin: right; }

/* Share */
.abody__share { position: sticky; top: 100px; }
.share { display: flex; align-items: center; gap: 8px; }
.share--rail { flex-direction: column; }
.share__label { font-size: 12px; font-weight: 800; color: var(--muted); writing-mode: vertical-rl; margin-bottom: 6px; }
.share--row .share__label { writing-mode: initial; margin: 0 0 0 6px; }
.share__btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); color: var(--navy-700); border: 1px solid rgba(3,28,91,.12); box-shadow: var(--shadow-1);
  transition: transform .4s var(--ease-spring), background .3s, color .3s, border-color .3s;
}
.share__btn svg { width: 18px; height: 18px; }
.share__btn:hover { transform: translateY(-3px) rotate(-8deg); background: var(--navy-700); color: var(--gold-500); border-color: var(--navy-700); }
.share__btn[data-share="whatsapp"]:hover { background: #25d366; color: #fff; border-color: #25d366; }
.share__btn[data-share="facebook"]:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.share__tip { position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 0; white-space: nowrap; font-size: 12px; font-weight: 700; background: var(--navy-800); color: var(--gold-500); padding: 4px 10px; border-radius: 8px; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .3s var(--ease-out); pointer-events: none; }
.share__tip.is-on { opacity: 1; transform: none; }

/* ---------- Prose ---------- */
.prose { font-size: 19px; line-height: 2; color: #1c2547; min-width: 0; }
.prose > * + * { margin-top: 1.15em; }
.prose > p:first-child { font-size: 1.12em; color: var(--navy-800); }
.prose h2 {
  font-size: clamp(25px, 2.6vw, 32px); font-weight: 900; color: var(--navy-800); line-height: 1.45;
  margin-top: 2.2em; padding-top: 1em; border-top: 1px solid rgba(3,28,91,.1); position: relative;
  display: flex; gap: 14px; align-items: baseline; scroll-margin-top: 100px;
}
.prose h2::before { content: ""; position: absolute; top: -1px; right: 0; width: 64px; height: 3px; background: var(--gold-500); }
.h-num { font: 800 .55em ui-monospace, Consolas, monospace; color: var(--gold-600); background: rgba(252,196,0,.14); padding: 4px 8px; border-radius: 8px; flex-shrink: 0; transform: translateY(-.2em); }
.prose h3 { font-size: 22px; font-weight: 800; color: var(--navy-700); margin-top: 1.8em; padding-inline-start: 16px; border-inline-start: 4px solid var(--gold-500); line-height: 1.5; scroll-margin-top: 100px; }
.prose h2 + p, .prose h3 + p { margin-top: .7em; }
.prose strong { color: var(--navy-800); font-weight: 800; }
.prose a:not([class]) {
  color: var(--navy-600); font-weight: 700;
  background: linear-gradient(var(--gold-500), var(--gold-500)) no-repeat 100% 100% / 100% 2px;
  transition: background-size .35s var(--ease-out), color .25s; padding-bottom: 1px;
}
.prose a:not([class]):hover { background-size: 100% 100%; color: var(--navy-900); }
.prose ul, .prose ol { padding: 0; list-style: none; display: grid; gap: .55em; }
.prose ul li { position: relative; padding-inline-start: 28px; }
.prose ul li::before { content: ""; position: absolute; right: 4px; top: .8em; width: 9px; height: 9px; border: 2px solid var(--gold-500); background: var(--navy-700); transform: rotate(45deg); }
.prose ol { counter-reset: li; }
.prose ol li { counter-increment: li; position: relative; padding-inline-start: 46px; }
.prose ol li::before { content: counter(li); position: absolute; right: 0; top: .25em; width: 32px; height: 32px; border-radius: 10px; background: var(--navy-700); color: var(--gold-500); display: grid; place-items: center; font: 800 15px/1 ui-monospace, Consolas, monospace; }

/* Callouts */
.callout { --c: var(--navy-600); --bg: rgba(22,57,143,.06); display: flex; gap: 16px; padding: 22px 24px; border-radius: var(--radius); background: var(--bg); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); position: relative; overflow: hidden; }
.callout::before { content: ""; position: absolute; inset-block: 0; right: 0; width: 4px; background: var(--c); }
.callout--tip { --c: #b58a00; --bg: rgba(252,196,0,.1); }
.callout--warn { --c: #c0392b; --bg: rgba(192,57,43,.06); }
.callout__ico { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; background: var(--c); position: relative; }
.callout__ico::after { content: ""; position: absolute; inset: 0; background: #fff; -webkit-mask: var(--m) center / 22px no-repeat; mask: var(--m) center / 22px no-repeat; }
.callout--note .callout__ico { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E"); }
.callout--tip .callout__ico { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 00-4 12.7V17h8v-2.3A7 7 0 0012 2z'/%3E%3C/svg%3E"); }
.callout--warn .callout__ico { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9L1.8 18a2 2 0 001.7 3h17a2 2 0 001.7-3L13.7 3.9a2 2 0 00-3.4 0zM12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.callout strong { display: block; color: var(--c); font-size: 17px; margin-bottom: 4px; }
.callout p { font-size: 17px; line-height: 1.85; margin: 0; }

/* Pull quote */
.pull, .prose blockquote { margin-inline: 0; margin-block: 1.8em; padding: 34px 36px 30px; border-radius: var(--radius-lg); position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(150deg, var(--navy-700), var(--navy-900)); color: #fff; }
.pull::before, .prose blockquote::before { content: "”"; position: absolute; top: -40px; left: 18px; font-size: 200px; line-height: 1; font-weight: 900; color: rgba(252,196,0,.25); z-index: -1; }
.pull::after, .prose blockquote::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(111,134,196,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(111,134,196,.1) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(270deg, transparent, #000); -webkit-mask-image: linear-gradient(270deg, transparent, #000); }
.pull p, .prose blockquote p { font-size: clamp(20px, 2.2vw, 25px); font-weight: 800; line-height: 1.7; }
.pull cite, .prose blockquote cite { display: block; margin-top: 14px; font-style: normal; font-size: 15px; color: var(--gold-500); }
.pull cite::before, .prose blockquote cite::before { content: "— "; }

/* Figures */
.a-fig { margin: 1.8em 0; }
.a-frame { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); position: relative; isolation: isolate; overflow: hidden; }
.a-frame .bmedia__bg { filter: blur(26px) brightness(.5) saturate(1.3); transform: none; }
.a-frame::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: rgba(2,22,71,.35); }
.a-frame img { position: relative; z-index: 1; }
.a-frame img { height: 100%; width: auto; margin-inline: auto; object-fit: contain; box-shadow: 0 20px 40px -12px rgba(0,0,0,.6); }
.a-fig figcaption { margin-top: 12px; font-size: 14.5px; color: var(--muted); display: flex; gap: 10px; line-height: 1.7; }
.a-fig figcaption::before { content: ""; flex-shrink: 0; width: 22px; height: 2px; background: var(--gold-500); margin-top: .8em; }

/* Table */
.a-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid rgba(3,28,91,.1); box-shadow: var(--shadow-1); background: #fff; margin-block: 1.8em; }
.a-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.6; min-width: 520px; }
.a-table th { background: var(--navy-700); color: #fff; font-weight: 800; text-align: start; padding: 14px 16px; }
.a-table th:first-child { color: var(--gold-500); }
.a-table td { padding: 13px 16px; border-top: 1px solid rgba(3,28,91,.08); }
.a-table td:first-child { font-weight: 800; color: var(--navy-800); }
.a-table tbody tr { transition: background .2s; }
.a-table tbody tr:hover { background: rgba(252,196,0,.08); }

/* Product link card */
.a-product {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--radius);
  background: var(--white); border: 1.5px solid rgba(3,28,91,.1); box-shadow: var(--shadow-1); margin-block: 1.6em;
  transition: transform .45s var(--ease-out), border-color .3s, box-shadow .4s;
}
.a-product__ico { width: 54px; height: 54px; border-radius: 14px; background: var(--navy-700); color: var(--gold-500); display: grid; place-items: center; flex-shrink: 0; transition: transform .5s var(--ease-spring); }
.a-product__ico svg { width: 26px; height: 26px; }
.a-product small { display: block; font-size: 12px; color: var(--gold-600); font-weight: 800; line-height: 1.4; }
.a-product strong { display: block; font-size: 18px; line-height: 1.5; }
.a-product em { display: block; font-style: normal; font-size: 14px; color: var(--muted); line-height: 1.5; }
.a-product__go { margin-inline-start: auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(252,196,0,.18); color: var(--navy-800); flex-shrink: 0; transition: background .3s, transform .4s var(--ease-out); }
.a-product__go svg { width: 18px; height: 18px; }
.a-product:hover { transform: translateY(-4px); border-color: var(--gold-500); box-shadow: var(--shadow-2); }
.a-product:hover .a-product__ico { transform: rotate(-10deg); }
.a-product:hover .a-product__go { background: var(--gold-500); transform: translateX(-4px); }

/* Takeaways */
.takeaways { margin-top: 2.4em; padding: 30px 32px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--gold-400), var(--gold-500) 55%, var(--gold-600)); color: var(--navy-900); position: relative; overflow: hidden; isolation: isolate; }
.takeaways::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: repeating-linear-gradient(-45deg, rgba(3,28,91,.07) 0 2px, transparent 2px 18px); }
.takeaways h4 { font-size: 22px; font-weight: 900; margin-bottom: 14px; }
.takeaways ul { display: grid; gap: 10px; }
.prose .takeaways ul li::before { background: var(--navy-800); border-color: var(--navy-800); transform: none; border-radius: 50%; width: 10px; height: 10px; }
.takeaways li { font-weight: 700; font-size: 17px; line-height: 1.8; }

/* Video facade */
.a-video { margin: 1.8em 0; }
.a-video__btn { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: var(--radius-lg); overflow: hidden; position: relative; isolation: isolate; background: center / cover no-repeat; color: #fff; box-shadow: var(--shadow-2); }
.a-video__btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(1,13,46,.92), rgba(3,28,91,.45)); transition: background .4s; }
.a-video__play { position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 84px; height: 84px; border-radius: 50%; background: var(--gold-500); color: var(--navy-900); display: grid; place-items: center; box-shadow: 0 0 0 0 rgba(252,196,0,.6); animation: vpulse 2.2s infinite; transition: transform .4s var(--ease-spring); }
.a-video__play svg { width: 32px; height: 32px; fill: currentColor; margin-left: 4px; }
@keyframes vpulse { 70% { box-shadow: 0 0 0 22px rgba(252,196,0,0); } 100% { box-shadow: 0 0 0 0 rgba(252,196,0,0); } }
.a-video__title { position: absolute; bottom: 22px; right: 26px; left: 26px; font-weight: 800; font-size: 18px; text-align: start; }
.a-video__btn:hover .a-video__play { transform: scale(1.1); }
.a-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-lg); }

/* End of article */
.aend { margin-top: 3em; padding-top: 26px; border-top: 1px solid rgba(3,28,91,.1); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.atags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.atags > svg { width: 18px; height: 18px; color: var(--gold-600); }
.atags a { font-size: 14px; font-weight: 700; color: var(--navy-700); padding: 6px 14px; border-radius: 999px; background: rgba(3,28,91,.06); transition: background .3s, color .3s; line-height: 1.6; }
.atags a:hover { background: var(--navy-700); color: var(--gold-500); }

.author { margin-top: 44px; display: grid; grid-template-columns: auto 1fr; gap: 24px; padding: 30px; border-radius: var(--radius-lg); background: #fff; border: 1px solid rgba(3,28,91,.08); box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.author::after { content: ""; position: absolute; left: -60px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; border: 2px dashed rgba(252,196,0,.4); }
.author img { width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(252,196,0,.35); }
.author small { color: var(--gold-600); font-weight: 800; font-size: 13px; }
.author h2 { font-size: 22px; color: var(--navy-800); line-height: 1.4; }
.author__role { font-size: 14px !important; color: var(--muted); margin-top: 2px !important; }
.author p { font-size: 16px; line-height: 1.85; margin-top: 10px; color: var(--muted); }
.author__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 800; font-size: 15px; color: var(--navy-700); }
.author__link svg { width: 16px; height: 16px; transition: transform .3s; }
.author__link:hover svg { transform: translateX(-5px); }

.pn { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pn__item { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: var(--radius); background: #fff; border: 1px solid rgba(3,28,91,.08); box-shadow: var(--shadow-1); transition: transform .45s var(--ease-out), border-color .3s, background .3s; }
.pn__item--next { text-align: end; align-items: flex-end; }
.pn__item small { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--gold-600); }
.pn__item small svg { width: 15px; height: 15px; }
.pn__item strong { font-size: 16px; line-height: 1.6; color: var(--navy-800); }
.pn__item:hover { border-color: var(--gold-500); background: var(--navy-700); }
.pn__item:hover strong { color: #fff; }
.pn__item--prev:hover { transform: translateX(6px); }
.pn__item--next:hover { transform: translateX(-6px); }

.bgrid--related { grid-template-columns: repeat(3, 1fr); }

/* Comments / questions */
.acomments { margin-top: 70px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; padding: clamp(28px, 4vw, 44px); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-1); border: 1px solid rgba(3,28,91,.07); }
.acomments__head h2 { font-size: clamp(24px, 2.6vw, 32px); color: var(--navy-800); }
.acomments__head p { color: var(--muted); margin-top: 10px; }
.acomments__form { display: grid; gap: 16px; }
.acomments__form .btn { justify-self: start; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .abody { grid-template-columns: minmax(0, 720px); gap: 0; }
  .abody__toc { position: static; margin-bottom: 34px; }
  .toc:not([open]) { box-shadow: none; }
  .abody__share { display: none; }
}
@media (max-width: 1024px) {
  .bfeat { grid-template-columns: 1fr; }
  .bgrid, .bgrid--related { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .acomments { grid-template-columns: 1fr; }
  .acover { margin-top: -120px; }
  .acover .bmedia--cover { aspect-ratio: 16 / 10; }
  .ahero { padding-bottom: 160px; }
  .bfilter__status { display: none; }
}
@media (max-width: 600px) {
  .bgrid, .bgrid--related { grid-template-columns: 1fr; gap: 20px; }
  .bfeat__item { grid-template-columns: 1fr; }
  .bfeat__item .bmedia { aspect-ratio: 16 / 10; min-height: 0; height: auto; }
  .bfeat__lead .bfeat__body { padding: 24px 22px 26px; }
  .bsearch input { min-height: 56px; font-size: 16px; padding-left: 16px; }
  .bsearch kbd { display: none; }
  .prose { font-size: 17.5px; line-height: 1.95; }
  .pull { padding: 26px 22px; }
  .callout { padding: 18px; gap: 12px; }
  .callout__ico { width: 34px; height: 34px; }
  .author { grid-template-columns: 1fr; padding: 24px; }
  .pn { grid-template-columns: 1fr; }
  .pn__item--next { text-align: start; align-items: flex-start; }
  .ahero__facts li + li::before { display: none; }
  .ahero .crumbs span[aria-current] { max-width: 20ch; }
  .share--row { flex-wrap: wrap; }
  .acover::after { inset: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .bcard.is-shown { animation: none; }
}

/* Resets for components living inside .prose */
.prose .author h2 { border: 0; padding: 0; margin: 2px 0 0; display: block; font-size: 22px; }
.prose .author h2::before { display: none; }
.prose .author > div > * + * { margin-top: 0; }
.prose .atags a { background: rgba(3,28,91,.06); padding-bottom: 6px; }
.prose .atags a:hover { background: var(--navy-700); color: var(--gold-500); }
.pull::before, .prose blockquote::before { opacity: .6; top: -56px; }
@media (max-width: 600px) { .ahero .deco--ring { display: none; } }

/* =========================================================
   WordPress content (Classic Editor output) — mapped onto the existing article styles
   ========================================================= */
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .6em; }
.prose blockquote cite, .prose blockquote footer { display: block; margin-top: 14px; font-style: normal; font-size: 15px; color: var(--gold-500); }
.prose iframe, .prose video, .prose embed, .prose object { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-2); }
.prose .wp-video, .prose .wp-audio-shortcode { width: 100% !important; }
.prose .wp-caption, .prose figure.wp-caption { max-width: 100%; margin: 1.8em 0; }
.prose .wp-caption img, .prose > p > img, .prose > p > a > img { border-radius: var(--radius); margin-inline: auto; }
.prose .wp-caption-text { font-size: 14.5px; color: var(--muted); margin-top: 10px; }
.prose img.alignleft, .prose img.alignright, .prose img.aligncenter { float: none; margin-inline: auto; }
.prose hr { border: 0; height: 1px; background: rgba(3,28,91,.12); margin-block: 2.4em; }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; background: rgba(3,28,91,.07); padding: 2px 6px; border-radius: 6px; direction: ltr; unicode-bidi: embed; }
.prose pre { direction: ltr; text-align: left; overflow-x: auto; padding: 18px 20px; border-radius: var(--radius); background: var(--navy-900); color: #e3e9fb; font-size: 15px; line-height: 1.7; }
.prose pre code { background: none; padding: 0; }
.prose h4 { font-size: 19px; font-weight: 800; color: var(--navy-800); margin-top: 1.6em; }
.prose p:empty { display: none; }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.prose .gallery .a-fig { margin: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sticky, .bypostauthor, .gallery-caption { /* WordPress core classes */ }

/* Generic WordPress page (page.php) + 404 */
.wp-page .prose { max-width: 760px; margin-inline: auto; }
.bpager { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 40px; }
.bpager .page-numbers { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 12px; border-radius: 12px; background: #fff; border: 1px solid rgba(3,28,91,.12); font-weight: 800; color: var(--navy-700); }
.bpager .page-numbers.current, .bpager a.page-numbers:hover { background: var(--navy-700); color: var(--gold-500); border-color: var(--navy-700); }
