/* Blog: index, post pages and long-form reading. Loaded only on /blog/ pages; cards live in main.css. */

/* ---------- Blog index ---------- */
.blog-list > .container { display: grid; gap: clamp(64px, 7vw, 104px); }
.post-feature { display: grid; gap: 18px; padding: clamp(28px, 4vw, 56px); text-decoration: none; color: inherit; }
.post-feature .chip { justify-self: start; }
.post-feature-title {
  font: 900 clamp(2rem, 1.3rem + 2.6vw, 3.6rem)/0.95 var(--font-display); font-stretch: 64%;
  text-transform: uppercase; letter-spacing: -0.01em; color: var(--text); max-width: 24ch;
}
.post-feature p { font-size: var(--text-lead); max-width: 60ch; }
.blog-cat { display: grid; gap: 28px; scroll-margin-top: 110px; }
.blog-cat-head { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: start; max-width: 780px; }
.blog-cat-title { font: 900 clamp(1.9rem, 1.4rem + 1.8vw, 2.9rem)/0.95 var(--font-display); font-stretch: 64%; text-transform: uppercase; letter-spacing: -0.01em; }
.blog-cat-head p { color: var(--text-muted); margin-top: 8px; max-width: 62ch; }
.blog-list .post-end-cta { margin-top: 0; }

/* ---------- Post hero ---------- */
.post-hero { padding-top: calc(140px + env(safe-area-inset-top, 0px)); padding-bottom: clamp(36px, 4vw, 56px); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; font-size: var(--text-micro); color: var(--text-muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ink-300); }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.post-title {
  font: 900 clamp(2.3rem, 1.5rem + 3vw, 4.4rem)/0.95 var(--font-display); font-stretch: 64%;
  text-transform: uppercase; letter-spacing: -0.01em; color: var(--text); max-width: 21ch;
}
/* The Blue First Line Rule, applied to titles of any length. */
.post-title::first-line, .post-feature-title::first-line { color: var(--accent); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 28px; font-size: var(--text-small); color: var(--text-muted); }
.post-meta span { display: inline-flex; align-items: center; gap: 8px; }
.post-meta .ic { width: 18px; height: 18px; color: var(--accent); }
.post-by { color: var(--text); font-weight: 600; }
.post-by img { width: 26px; height: auto; }

/* ---------- Post layout ---------- */
.post-grid {
  display: grid; grid-template-columns: 250px minmax(0, 740px); justify-content: start;
  gap: clamp(40px, 5vw, 88px); align-items: start; padding-bottom: clamp(72px, 8vw, 128px);
}
.post-aside { position: sticky; top: 112px; display: grid; gap: 22px; max-height: calc(100vh - 130px); overflow-y: auto; padding: 4px; }
.toc-title { font: 600 var(--text-micro)/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.toc .toc-list { display: grid; border-left: 2px solid var(--line); }
.toc a {
  display: block; margin-left: -2px; padding: 7px 0 7px 14px; border-left: 2px solid transparent;
  font-size: 0.875rem; line-height: 1.35; color: var(--text-muted); text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}
.toc a.is-active { color: var(--accent-strong); border-left-color: var(--accent); font-weight: 600; }
.aside-cta { padding: 20px; display: grid; gap: 12px; }
.aside-cta-title { font: 750 1.0625rem/1.3 var(--font-body); color: var(--text); }
.aside-cta p:not(.aside-cta-title) { font-size: var(--text-small); color: var(--text-muted); }
.aside-cta .btn { white-space: normal; text-align: center; line-height: 1.2; }
.toc-mobile { display: none; }
@media (hover: hover) and (pointer: fine) {
  .crumbs a:hover { color: var(--accent-strong); }
  .toc a:hover { color: var(--accent-strong); border-left-color: var(--blue-300); }
}

/* ---------- Long-form reading ---------- */
.prose { font-size: 1.125rem; line-height: 1.72; color: var(--text-body); min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose .lede { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem); line-height: 1.55; color: var(--text); }
.prose h2 { font: 800 clamp(1.55rem, 1.25rem + 1vw, 2.1rem)/1.15 var(--font-body); letter-spacing: -0.022em; color: var(--text); margin-top: 2.4em; scroll-margin-top: 110px; }
.prose h3 { font: 700 1.25rem/1.3 var(--font-body); letter-spacing: -0.012em; color: var(--text); margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose a:not(.btn) { color: var(--accent-strong); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: var(--blue-300); }
.prose strong { color: var(--text); font-weight: 650; }
.prose ul, .prose ol:not(.toc-list) { display: grid; gap: 0.55em; }
.prose ul > li { position: relative; padding-left: 1.5em; }
.prose ul > li::before { content: ""; position: absolute; left: 0.25em; top: 0.68em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.prose ol:not(.toc-list) { counter-reset: step; }
.prose ol:not(.toc-list) > li { position: relative; padding-left: 2.5em; counter-increment: step; }
.prose ol:not(.toc-list) > li::before {
  content: counter(step); position: absolute; left: 0; top: 0.12em;
  display: grid; place-items: center; width: 1.75em; height: 1.75em; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-strong); font: 700 0.85rem/1 var(--font-body);
}
.prose li > ul, .prose li > ol { margin-top: 0.55em; }
.table-wrap { overflow-x: auto; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-panel); }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.9688rem; line-height: 1.5; }
.prose th { text-align: left; font-weight: 650; color: var(--text); background: var(--blue-50); padding: 12px 16px; }
.prose td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.callout { padding: 18px 20px; border-radius: 16px; background: var(--accent-soft); border: 1px solid var(--blue-100); }
.callout p { font-size: 1.0313rem; }
.callout p + p { margin-top: 0.6em; }
.callout strong { color: var(--accent-strong); }
.script { position: relative; padding: 18px 20px 20px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-panel); border-left: 4px solid var(--accent); }
.script p { font-size: 1.0313rem; }
.script p + p { margin-top: 0.7em; }
.script .script-label { padding-right: 96px; font: 600 var(--text-micro)/1.3 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-strong); }
.copy-btn {
  position: absolute; top: 12px; right: 12px; min-height: 36px; padding: 0 14px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-strong); font: 600 0.8125rem/1 var(--font-body);
  transition: background-color 160ms ease;
}
.copy-btn:active { transform: scale(0.97); }

/* Mid-article booking box: the one drenched surface on a post page. */
.prose .post-cta {
  margin-block: 2.6em; padding: clamp(24px, 3vw, 36px); border-radius: 22px; display: grid; gap: 14px;
  background: var(--core-gradient); color: var(--white);
  box-shadow: 0 3px 0 var(--blue-700), 0 26px 50px -28px rgba(29, 78, 216, 0.7);
}
.post-cta p { color: rgba(255, 255, 255, 0.92); font-size: 1rem; line-height: 1.6; }
.post-cta .post-cta-kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 var(--text-micro)/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); }
.post-cta-kicker .ic { width: 16px; height: 16px; }
.post-cta .post-cta-title { font: 900 clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem)/0.95 var(--font-display); font-stretch: 64%; text-transform: uppercase; color: var(--white); }
.post-cta .btn { justify-self: start; margin-top: 6px; text-decoration: none; }
.post-faq h3 { font-size: 1.125rem; margin-top: 1.4em; }

/* ---------- After the post ---------- */
.post-next .post-end-cta { margin-top: clamp(48px, 5vw, 72px); }
.post-end-copy { display: grid; gap: 16px; }
.post-end-copy .lead { max-width: 52ch; }

@media (hover: hover) and (pointer: fine) {
  .prose a:not(.btn):hover { text-decoration-color: currentColor; }
  .copy-btn:hover { background: var(--blue-100); }
}

@media (max-width: 1080px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin-inline: auto; }
  .post-aside { display: none; }
  .toc-mobile { display: block; margin-bottom: 28px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-panel); }
  .toc-mobile summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
    min-height: 52px; padding: 0 18px; font: 650 1rem/1.2 var(--font-body); color: var(--text);
  }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary .ic { width: 18px; height: 18px; color: var(--accent); transition: transform 200ms var(--ease-out); }
  .toc-mobile[open] summary .ic { transform: rotate(180deg); }
  .toc-mobile .toc-list { padding: 0 18px 10px; }
  .toc-mobile a { display: block; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.9375rem; line-height: 1.35; color: var(--text-muted); text-decoration: none; }
}
@media (max-width: 560px) {
  .prose { font-size: 1.0625rem; }
  .post-meta { gap: 8px 16px; }
  .script .script-label { padding-right: 84px; }
}
