/* Usher Media US — blog listing + post. Loaded after /us/style.css; uses its tokens only. */

/* ---------- shared ---------- */
.tagchip { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: var(--butter); border: 1px solid var(--line); color: var(--ink); }

/* ---------- listing ---------- */
.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.blog-filters[hidden] { display: none; }
.blog-filters button { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: background .15s ease, color .15s ease; }
.blog-filters button:hover { border-color: var(--ink); }
.blog-filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 940px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .blog-grid { grid-template-columns: 1fr; gap: 22px; } }

/* hover lift uses `translate`, not `transform`, so it doesn't fight the site's stagger reveal (which animates transform) */
.bcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: opacity .7s var(--ease), transform .7s var(--ease), translate .25s var(--ease), box-shadow .25s var(--ease); }
.bcard:hover { translate: 0 -4px; box-shadow: var(--shadow-m); }
.bcard .thumb { aspect-ratio: 16 / 9; background: var(--butter); overflow: hidden; }
.bcard .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.bcard:hover .thumb img { transform: scale(1.04); }
.bcard .body { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 24px; flex: 1; }
.bcard .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); letter-spacing: .04em; }
.bcard h2, .bcard h3 { font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.bcard p { color: var(--muted); font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard .by { margin-top: auto; padding-top: 6px; font-size: 13.5px; color: var(--muted); }
.bcard .by b { color: var(--ink); font-weight: 600; }

/* "Load more": new cards start hidden, then blog.js drops this class so they ease in like the rest */
.stagger.in > .is-new { opacity: 0; transform: translateY(26px); transition: none; }
.blog-more { display: flex; justify-content: center; margin-top: 44px; }
.blog-more[hidden] { display: none; }

.blog-empty { border: 1px dashed var(--line); border-radius: var(--r); background: var(--butter); padding: 56px 28px; text-align: center; }
.blog-empty[hidden] { display: none; }
.blog-empty h2 { font-size: clamp(26px, 3.4vw, 36px); text-transform: none; }
.blog-empty p { color: var(--muted); max-width: 52ch; margin: 14px auto 26px; }

/* ---------- post: hero ---------- */
.post-hero .hero2-grid { max-width: 900px; }
/* long question titles read badly in the site's all-caps hero style */
.post-hero h1 { font-size: clamp(32px, 4.2vw, 54px); max-width: 22ch; text-transform: none; letter-spacing: -.035em; line-height: 1.06; }
.post-hero .tagchip { background: #fff; margin-bottom: 20px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 22px; font-size: 15px; color: var(--muted); }
.byline b { color: var(--ink); font-weight: 600; }
.byline .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.post-hero-img { position: relative; max-width: 1100px; margin: 40px auto 0; }
.post-hero-img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); box-shadow: var(--shadow-m); background: #fff; }

/* ---------- post: layout ---------- */
.post-layout { display: grid; grid-template-columns: minmax(0, 760px) 290px; grid-template-areas: "body toc"; justify-content: center; gap: 64px; align-items: start; padding: 64px 0 40px; }
.post-body { grid-area: body; min-width: 0; }
.post-toc { grid-area: toc; position: sticky; top: 104px; }
@media (max-width: 1000px) {
  .post-layout { grid-template-columns: minmax(0, 760px); grid-template-areas: "toc" "body"; gap: 32px; padding-top: 40px; }
  .post-toc { position: static; }
}

.toc-box { background: var(--butter); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; }
.toc-box .eyebrow { display: block; margin-bottom: 12px; }
.toc-box ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; max-height: calc(100vh - 200px); overflow-y: auto; }
@media (max-width: 1000px) { .toc-box ol { max-height: none; } }
.toc-box li { margin: 0; }
.toc-box a { display: block; padding: 7px 0 7px 12px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.4; color: var(--muted); transition: color .15s ease, border-color .15s ease; }
.toc-box a:hover { color: var(--ink); }
.toc-box a.on { color: var(--ink); border-left-color: var(--coral); font-weight: 600; }
.toc-box li.sub a { padding-left: 26px; font-size: 13px; }

/* ---------- post: body typography ---------- */
.post-body { font-size: 17.5px; line-height: 1.75; color: #2a2a2a; }
.post-body > :first-child { margin-top: 0; }
.post-body h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -.025em; margin: 2.2em 0 .55em; color: var(--ink); scroll-margin-top: 100px; }
.post-body h3 { font-size: 21px; line-height: 1.3; letter-spacing: -.015em; margin: 1.6em 0 .45em; color: var(--ink); scroll-margin-top: 100px; }
.post-body p { margin: .75em 0; }
.post-body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.post-body a:hover { color: var(--coral-d); }
.post-body strong { color: var(--ink); }
.post-body ul, .post-body ol { margin: .8em 0 1.1em; padding-left: 1.35em; }
.post-body li { margin: .4em 0; padding-left: .2em; }
.post-body ul li::marker { color: var(--coral); }
.post-body ol li::marker { font-family: var(--mono); font-size: .85em; color: var(--muted); }
.post-body blockquote { margin: 1.4em 0; padding: 16px 22px; border-left: 4px solid var(--coral); background: var(--butter); border-radius: 0 16px 16px 0; color: var(--muted); }

/* in-body images */
.post-body figure { margin: 2em 0; }
.post-body figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; background: var(--butter); }
.post-body figcaption { margin-top: 10px; font-size: 13.5px; line-height: 1.5; color: var(--muted); text-align: center; }
.post-body figcaption .credit { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--faint); margin-top: 2px; }
.post-body figcaption .credit a { color: inherit; text-decoration-color: var(--line); text-decoration-thickness: 1px; }

/* tables: scroll inside their own box on narrow screens, never the page */
.table-scroll { margin: 1.6em 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 16px; }
.post-body table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.post-body th, .post-body td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 12px 16px; text-align: left; vertical-align: top; }
.post-body th:last-child, .post-body td:last-child { border-right: none; }
.post-body tbody tr:last-child td { border-bottom: none; }
.post-body thead th { background: var(--butter); font-family: var(--display); font-weight: 500; color: var(--ink); }
.post-body tbody tr:nth-child(even) { background: #FBFBF6; }

/* FAQ */
.post-faq { margin-top: 3em; }
.post-faq details { border: 1px solid var(--line); border-radius: 18px; background: #fff; margin: 12px 0; transition: opacity .7s var(--ease), transform .7s var(--ease), border-color .15s ease, box-shadow .15s ease; }
.post-faq details[open] { border-color: rgba(17,17,17,.25); box-shadow: var(--shadow-s); }
.post-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; font-family: var(--display); font-size: 18px; line-height: 1.35; color: var(--ink); }
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after { content: "+"; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--butter); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--body); font-size: 18px; line-height: 1; transition: transform .2s ease; }
.post-faq details[open] summary::after { transform: rotate(45deg); }
.post-faq details > p { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 16px; }

/* end CTA + related */
.post-cta { margin-top: 3.2em; background: var(--ink); color: #fff; border-radius: var(--r); padding: 34px 32px; }
.post-cta h2 { color: #fff; font-size: clamp(24px, 2.6vw, 32px); margin: 0; }
.post-cta p { color: rgba(255,255,255,.72); margin: 12px 0 22px; font-size: 16px; }
.post-cta .btn { text-decoration: none; color: #fff; }
.post-related[hidden] { display: none; }

@media (max-width: 620px) {
  .post-body { font-size: 16.5px; }
  .post-hero-img { margin-top: 28px; }
  .post-cta { padding: 28px 22px; }
  .post-faq summary { padding: 16px 18px; font-size: 16.5px; }
  .post-faq details > p { padding: 0 18px 18px; }
}
