/* =========================================================
   hispeech.ai blog — styles (loaded after styles.css)
   © BlueNeyron, LLC
   Pages are generated by tools/gen_blog.py.
   ========================================================= */

.main-nav a[aria-current="page"] { color: var(--blue); font-weight: 700; }

/* ---------- Tags & meta ---------- */
.post-tag {
  display: inline-block; color: var(--blue); font-weight: 700; font-size: .74rem;
  text-transform: uppercase; letter-spacing: .08em;
}
.post-meta { color: var(--muted); font-size: .88rem; margin-top: 10px; }

/* ---------- Blog index ---------- */
.blog-hero {
  padding: clamp(44px, 7vw, 80px) 0 20px;
  background: radial-gradient(1100px 420px at 50% -160px, rgba(35,85,173,.10), transparent 70%), #fff;
}
.blog-hero h1 { margin-bottom: 12px; }
.blog-hero .lead { max-width: 680px; }
.blog-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.blog-tab {
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--muted); cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: 999px; padding: 7px 15px;
}
.blog-tab:hover { color: var(--ink); background: var(--bg-alt); }
.blog-tab.is-active { color: var(--ink); background: #fff; border-color: var(--blue); }

.blog-list { padding: 28px 0 20px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 26px; }

.post-card { display: flex; flex-direction: column; min-width: 0; }
.post-card[hidden] { display: none; }
.post-card-img { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-dark); aspect-ratio: 1200 / 630; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card-img img { transform: scale(1.03); }
.post-card-body { padding: 16px 2px 0; }
.post-card-title { font-size: 1.14rem; line-height: 1.32; margin-top: 8px; }
.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--blue); text-decoration: none; }
.post-card-excerpt { color: var(--body); margin-top: 10px; }

.post-card-big { display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: center; }
.post-card-big .post-card-body { padding: 0; }
.post-card-big .post-card-title { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.2; }

.blog-cta-section { padding-bottom: clamp(48px, 7vw, 80px); }

/* ---------- CTA box ---------- */
.blog-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 44px; padding: 28px 30px; border-radius: var(--radius);
  background: linear-gradient(120deg, var(--blue), var(--blue-dark)); color: #dbe5ff;
}
.blog-cta h2 { color: #fff; font-size: 1.4rem; text-align: left; margin: 0 0 6px; }
.blog-cta p { margin: 0; }
.blog-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.blog-cta .btn-primary { background: #fff; color: var(--blue); }
.blog-cta .btn-primary:hover { background: #eef3ff; color: var(--blue-dark); }
.blog-cta .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.blog-cta .btn-outline:hover { border-color: #fff; color: #fff; }

/* ---------- Post ---------- */
.post-hero { padding: clamp(32px, 5vw, 56px) 0 0; background: linear-gradient(180deg, var(--bg-alt), #fff 75%); }
.post-narrow { max-width: 860px; }
.crumbs { display: flex; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }
.post-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin: 10px 0 14px; }
.post-lead { font-size: clamp(1.06rem, 2vw, 1.22rem); color: var(--body); }
.post-cover-wrap { max-width: 1060px; margin-top: 32px; }
.post-cover { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }

.post-layout { display: grid; grid-template-columns: 230px minmax(0, 760px); gap: 56px; justify-content: center; padding-top: 40px; padding-bottom: 20px; }
.post-layout > .post-body:only-child { grid-column: 1 / -1; max-width: 760px; margin: 0 auto; }

.post-toc { position: sticky; top: 88px; align-self: start; font-size: .9rem; }
.post-toc-h { font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .06em; font-size: .76rem; margin-bottom: 10px; }
.post-toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.post-toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.35; }
.post-toc li a:hover { color: var(--ink); text-decoration: none; }
.post-toc li a.is-active { color: var(--blue); border-left-color: var(--blue); font-weight: 600; }

.post-body { font-size: 1.07rem; line-height: 1.75; color: var(--body); min-width: 0; }
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-top: 2.2em; scroll-margin-top: 90px; position: relative; }
.post-body h3 { font-size: 1.18rem; margin-top: 1.8em; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: .45em; }
.post-body strong { color: var(--ink); }
.post-body a { text-decoration: underline; text-underline-offset: 2px; }
.h-anchor { margin-left: 8px; color: var(--line); text-decoration: none !important; font-weight: 400; opacity: 0; transition: opacity .15s; }
.post-body h2:hover .h-anchor { opacity: 1; color: var(--muted); }

.post-body code { font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: .88em; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.post-body pre { background: #0a0f1a; border: 1px solid #1d2738; border-radius: var(--radius-sm); padding: 18px 20px; overflow-x: auto; line-height: 1.6; }
.post-body pre code { background: none; border: 0; padding: 0; color: #e6edf3; font-size: .86rem; white-space: pre; }
.code-label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: -.6em !important; }

.post-tldr { background: rgba(35,85,173,.06); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius-sm); padding: 18px 22px; }
.post-tldr-h { font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.post-tldr ul { margin: 0; }

.callout { background: rgba(240,85,46,.07); border: 1px solid rgba(240,85,46,.25); border-radius: var(--radius-sm); padding: 14px 18px; }
.steps-list { counter-reset: s; list-style: none; padding-left: 0 !important; }
.steps-list > li { counter-increment: s; position: relative; padding-left: 46px; }
.steps-list > li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; font-size: .9rem; display: flex; align-items: center; justify-content: center; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.post-body table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
.post-body th, .post-body td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body thead th { background: var(--bg-alt); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.post-body tbody tr:last-child td, .post-body tbody tr:last-child th { border-bottom: 0; }

.post-faq h2 { margin-bottom: 4px; }
.post-faq .faq-item p { margin: 0; }

.post-related { padding: clamp(40px, 6vw, 70px) 0; background: var(--bg-alt); margin-top: 40px; }
.post-related h2 { font-size: 1.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .post-layout { grid-template-columns: minmax(0, 760px); }
  .post-toc { display: none; }
}
@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-card-big { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 560px) {
  .post-grid { grid-template-columns: 1fr; }
  .blog-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -20px; padding-right: 20px; }
  .blog-tab { flex: none; }
  .blog-cta { padding: 22px; }
  .blog-cta-btns, .blog-cta-btns .btn { width: 100%; }
  .post-body { font-size: 1.02rem; }
}

/* "About hispeech.ai" box at the end of a post */
.post-about { display: flex; gap: 16px; align-items: flex-start; margin: 32px 0; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(35,85,173,.04); }
.post-about img { flex: none; width: 48px; height: 48px; border-radius: 12px; }
.post-about-h { font-weight: 800; color: var(--ink); margin: 0 0 4px; }
.post-about p { margin: 0; }
