/* CreatStrat blog layer: post pages and the blog index.
   Loaded after styles.css; reuses page-head, mini-cta, footer from there. */

/* ---- Post header ---- */
.post-head h1 {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.08;
  max-width: 30ch;
  letter-spacing: -0.02em;
}
.post-head .eyebrow a {
  color: inherit;
  text-decoration: none;
}
.post-head .eyebrow a:hover { color: var(--violet); }

/* ---- Post body ---- */
.post-body { padding: clamp(48px, 7vh, 72px) clamp(24px, 4vw, 80px) clamp(72px, 11vh, 112px); }
.post-col { max-width: 760px; margin: 0 auto; }
.post-col h2 {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 16px;
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
}
.post-col h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.post-col h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 28px 0 10px;
}
.post-col p, .post-col li { font-size: 16.5px; line-height: 1.72; color: var(--slate); }
.post-col p { margin: 0 0 18px; }
.post-col ul, .post-col ol { margin: 0 0 18px; padding-left: 22px; }
.post-col li { margin-bottom: 9px; }
.post-col li::marker { color: var(--violet); }
.post-col a { color: var(--violet); text-decoration: underline; text-underline-offset: 2px; }
.post-col a:hover { color: var(--violet-deep); }
.post-col strong { color: var(--ink); font-weight: 650; }
.post-col .post-note {
  font-size: 14px;
  color: var(--fog);
  border-left: 2px solid var(--line);
  padding-left: 14px;
}
.post-col .post-cta { margin: 6px 0 26px; }

.post-col .post-code {
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  padding: 16px 18px;
  margin: 0 0 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}
.post-col .post-code code { font-family: inherit; }
.post-col p code, .post-col li code, .post-col td code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--violet-soft);
  color: var(--violet-deep);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---- Tables ---- */
.table-scroll { overflow-x: auto; margin: 0 0 24px; }
.post-col table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 14.5px;
  line-height: 1.5;
}
.post-col caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fog);
  padding-bottom: 10px;
}
.post-col th, .post-col td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  color: var(--slate);
}
.post-col th {
  background: var(--violet-soft);
  color: var(--ink);
  font-weight: 650;
  font-size: 13.5px;
}

/* ---- Figures ----
   Diagrams are authored for wide display, so figures break out of the 760px
   prose column up to 1080px and link to the full-size file. */
.post-figure {
  width: min(1080px, calc(100vw - 48px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 6px 0 28px;
}
.post-figure a { display: block; }
.post-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

/* ---- Blog index ---- */
.post-index { padding: clamp(48px, 7vh, 72px) clamp(24px, 4vw, 80px) clamp(72px, 11vh, 112px); }
.pi-inner { max-width: 860px; margin: 0 auto; display: grid; gap: 0; }
.post-card {
  display: block;
  padding: 30px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.post-card:first-child { border-top: 1px solid var(--line); }
.post-card h2 {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 8px;
  transition: color 0.15s ease;
}
.post-card:hover h2 { color: var(--violet); }
.post-card p { font-size: 15.5px; line-height: 1.6; color: var(--slate); margin: 0 0 14px; max-width: 68ch; }
.post-card .pc-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fog);
}
.post-card .pc-arrow { color: var(--violet); transition: transform 0.15s ease; display: inline-block; }
.post-card:hover .pc-arrow { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  .post-card h2, .post-card .pc-arrow { transition: none; }
  .post-card:hover .pc-arrow { transform: none; }
}
