/* =========================================================
   Blog — USPI WORK & DOCUMENTS (loaded after main.css)
   ========================================================= */
.blog-main { padding-top: calc(var(--header-h) + 26px); padding-bottom: 64px; }
.blog-progress { position: fixed; left: 0; top: 0; z-index: 120; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad); pointer-events: none; }

/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--blue); }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .5; }

/* ---------- blog index ---------- */
.blog-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 36px; align-items: center; margin-bottom: 40px; }
.blog-hero__title { font-size: clamp(30px, 3vw + 10px, 48px); line-height: 1.08; font-weight: 900; color: var(--navy); letter-spacing: -.015em; }
.blog-hero__lead { margin-top: 14px; font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 600px; }
.blog-hero__img { margin: 0; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 3 / 2; }
.blog-hero__img img { width: 100%; height: 100%; object-fit: cover; }
.blog-hero .hero__actions { margin-top: 22px; }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid rgba(255, 255, 255, .95); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card__img { aspect-ratio: 3 / 2; overflow: hidden; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.post-card:hover .post-card__img img { transform: scale(1.05); }
.post-card__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; flex: 1; }
.post-card__tag { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--blue); }
.post-card__title { font-size: 19px; line-height: 1.25; font-weight: 800; color: var(--navy); }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card__desc { font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.post-card__meta { margin-top: auto; padding-top: 6px; font-size: 13px; color: #7a89a6; }

/* ---------- article ---------- */
.article-head { max-width: 860px; }
.article-head__title { font-size: clamp(28px, 2.6vw + 12px, 46px); line-height: 1.1; font-weight: 900; color: var(--navy); letter-spacing: -.015em; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.article-meta b { color: var(--ink); font-weight: 600; }
.article-cover { margin: 26px 0 0; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 2.2 / 1; }
.article-cover img { object-position: 50% 45%; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; margin-top: 34px; }
.article-aside { position: sticky; top: calc(var(--header-h) + 18px); display: grid; gap: 18px; }

.toc { padding: 18px 18px 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.toc__title { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); margin-bottom: 10px; }
.toc ol { display: grid; gap: 2px; counter-reset: t; }
.article-aside .toc ol { max-height: max(150px, calc(100vh - var(--header-h) - 470px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 14px; line-height: 1.35; color: var(--muted); transition: background .2s, color .2s; }
.toc a::before { content: counter(t) "."; color: #9aa9c4; font-weight: 700; min-width: 16px; }
.toc a:hover { background: #eef5ff; color: var(--blue); }
.toc a.is-active { background: #eef5ff; color: var(--blue); font-weight: 600; }
.toc-mobile { display: none; }

.prose { font-size: 17.5px; line-height: 1.72; color: var(--ink); }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 44px; font-size: clamp(23px, 1.2vw + 14px, 30px); line-height: 1.2; font-weight: 900; color: var(--navy); letter-spacing: -.01em; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose h3 { margin-top: 28px; font-size: 20px; line-height: 1.3; font-weight: 800; color: var(--navy); }
.prose > ul, .prose > ol { padding-left: 1.3em; display: grid; gap: 8px; }
.prose > ul { list-style: none; padding-left: 0; }
.prose > ul > li { position: relative; padding-left: 28px; }
.prose > ul > li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 9px; height: 9px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(31, 139, 255, .12); }
.prose > ol { list-style: decimal; }
.prose > ol > li::marker { color: var(--blue); font-weight: 800; }
.prose a { color: var(--blue); text-decoration: underline; text-decoration-color: rgba(11, 99, 229, .35); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { color: var(--navy); }
.prose blockquote { margin-left: 0; padding: 14px 18px; border-left: 4px solid var(--blue-2); background: #fff; border-radius: 0 12px 12px 0; color: var(--ink); font-style: italic; }
.prose .note { padding: 14px 18px 14px 50px; position: relative; background: #eaf4ff; border: 1px solid #cfe3ff; border-radius: 12px; font-size: 16px; line-height: 1.6; }
.prose .note::before { content: "i"; position: absolute; left: 16px; top: 14px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-weight: 800; font-size: 13px; font-style: normal; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; box-shadow: var(--shadow-sm); background: #fff; }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid #e6eef9; }
.prose thead th { background: #0f47a8; color: #fff; font-weight: 700; position: sticky; top: 0; }
.prose tbody tr:nth-child(even) td { background: #f6f9ff; }
.prose tbody td:first-child { font-weight: 600; color: var(--navy); }

.tldr { position: relative; padding: 20px 22px 20px 24px; border-radius: 16px; background: linear-gradient(135deg, #ffffff, #eef6ff); border: 1px solid #d7e7fd; box-shadow: var(--shadow-sm); }
.tldr::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad); }
.tldr__label { display: inline-block; margin-bottom: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.tldr p { font-size: 17.5px; line-height: 1.6; color: var(--navy); }

.facts { padding: 20px 22px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.facts__title { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.facts ul { display: grid; gap: 8px; }
.facts li { display: flex; gap: 10px; font-size: 15.5px; line-height: 1.5; }
.facts li svg { flex: none; width: 20px; height: 20px; margin-top: 2px; fill: url(#gi); }

/* CTA cards */
.cta-card {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 24px; border-radius: 18px; color: #fff;
  background: linear-gradient(160deg, #0f47a8 0%, #0a2f78 55%, #051a48 100%);
  box-shadow: var(--shadow-lg);
}
.cta-card::after { content: ""; position: absolute; z-index: -1; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(80, 180, 255, .45), transparent 70%); }
.cta-card__eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8fd0ff; }
.cta-card__title { margin-top: 6px; font-size: 21px; line-height: 1.25; font-weight: 900; }
.cta-card__text { margin-top: 8px; font-size: 15px; line-height: 1.5; color: #cfe0ff; }
.cta-card__list { margin-top: 12px; display: grid; gap: 6px; }
.cta-card__list li { display: flex; gap: 8px; font-size: 14.5px; line-height: 1.4; color: #e3eeff; }
.cta-card__list svg { flex: none; width: 18px; height: 18px; fill: #56b8ff; margin-top: 1px; }
.cta-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.cta-card .btn--ghost { color: #fff; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.cta-card .btn--ghost:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.cta-card--wide { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 28px 30px; }
.cta-card--wide .cta-card__actions { margin-top: 0; }
.prose .cta-card a { color: inherit; text-decoration: none; }
.prose .cta-card a.btn--primary { color: #fff; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; cursor: pointer; font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2.5px solid var(--blue); border-bottom: 2.5px solid var(--blue); transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq .faq__a { padding: 0 18px 18px; font-size: 16px; line-height: 1.65; color: var(--ink); }

/* sources, author, related */
.sources { font-size: 14px; line-height: 1.5; color: var(--muted); }
.sources ol { padding-left: 1.3em; list-style: decimal; display: grid; gap: 6px; }
.sources a { color: var(--blue); word-break: break-word; }
.author-box { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.author-box img { width: 56px; height: 56px; flex: none; }
.author-box__name { font-weight: 800; color: var(--navy); }
.author-box__text { margin-top: 4px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.related { margin-top: 56px; }
.related .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.block-title { font-size: clamp(22px, 1vw + 16px, 28px); font-weight: 900; color: var(--navy); margin-bottom: 18px; }

@media (max-width: 1100px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-aside { display: none; }
  .toc-mobile { display: block; margin-top: 22px; }
  .toc-mobile summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); font-weight: 800; color: var(--navy); }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary::after { content: "+"; font-size: 22px; color: var(--blue); line-height: 1; }
  .toc-mobile[open] summary::after { content: "–"; }
  .toc-mobile .toc { margin-top: 8px; }
}
@media (max-width: 1023px) {
  .blog-hero { grid-template-columns: 1fr; gap: 22px; }
  .post-grid, .related .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-card--wide { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .blog-main { padding-top: calc(var(--header-h) + 18px); }
  .post-grid, .related .post-grid { grid-template-columns: 1fr; }
  .article-cover { border-radius: 16px; margin-top: 20px; aspect-ratio: 3 / 2; }
  .prose { font-size: 16.5px; line-height: 1.68; }
  .prose table { min-width: 0; font-size: 13.5px; line-height: 1.4; }
  .prose th, .prose td { padding: 9px 8px; }
  .prose thead th { position: static; }
  .prose h2 { margin-top: 36px; }
  .tldr, .facts, .cta-card { padding: 18px; }
  .cta-card__actions .btn { flex: 1 1 100%; }
  .faq summary { font-size: 16px; padding: 14px 16px; }
  .author-box { padding: 16px; }
}
