/* Blog: layered on top of styles.css.
   Shared across every /blog/ page (index + posts) since they all reuse the
   same post cards, article prose, figure framing and closing CTA. */

/* ---------- Index header ---------- */
.blog-hero {
  padding: 72px 0 0;
}
.blog-hero .section-head { max-width: 720px; }
.blog-hero h1 { font-size: clamp(34px, 3.8vw, 56px); margin-top: 14px; }
.blog-hero .lede { margin-top: 16px; }

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 24px;
}
.blog-back:hover { color: var(--amber-light); }
.blog-back::before { content: "←"; }

/* ---------- Post list (index page) ---------- */
.blog-list { padding: 48px 0 96px; }

.blog-post-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.blog-post-card + .blog-post-card { margin-top: 22px; }
.blog-post-card:hover {
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-2px);
}
.blog-post-thumb {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  aspect-ratio: 2 / 1;
}
.blog-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-post-body { padding: 4px 6px 6px 0; }
.blog-post-card h2 {
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 10px 0 10px;
}
.blog-post-card p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}
.blog-post-more {
  display: inline-block;
  margin-top: 14px;
  color: var(--amber-light);
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 760px) {
  .blog-post-card { grid-template-columns: 1fr; gap: 18px; }
  .blog-post-card h2 { font-size: 22px; }
}

/* ---------- Article page ---------- */
.blog-article-wrap { padding: 40px 0 88px; }
.blog-article {
  max-width: 760px;
  margin: 0 auto;
}
.blog-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--text-faint);
  font-size: 14px;
}
.blog-meta .dot { color: var(--line-strong); }

.blog-article h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 46px);
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0 0 20px;
}
.blog-article h2 {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.015em;
  margin: 48px 0 14px;
  color: var(--text);
}
.blog-article h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 30px 0 10px;
  color: var(--text);
}
.blog-article p, .blog-article li {
  color: rgba(226, 232, 240, 0.82);
  font-size: 17px;
  line-height: 1.75;
  margin: 0 0 16px;
}
.blog-article ul, .blog-article ol {
  padding-left: 22px;
  margin: 0 0 18px;
}
.blog-article li { margin-bottom: 8px; }
.blog-article strong { color: var(--text); font-weight: 600; }
.blog-article a { color: var(--amber-light); text-decoration: underline; text-underline-offset: 3px; }
.blog-article a:hover { color: var(--amber); }
.blog-article .lede {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-dim);
  margin-bottom: 26px;
}

/* Numbered step headings, mirroring the newsletter's amber step badges */
.blog-step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 48px 0 14px;
}
.blog-step-num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--amber);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.blog-step h2 { margin: 0; font-size: 26px; }

/* ---------- Figures ---------- */
.blog-figure { margin: 26px 0 30px; }
.blog-figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  display: block;
}
.blog-figure figcaption {
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}
/* Lesson screenshots are wider than the prose column, so let them bleed out
   past it and stay centered on the same axis. */
.blog-figure.wide {
  width: min(1040px, calc(100vw - 56px));
  margin-left: 50%;
  transform: translateX(-50%);
}
/* Below 640px the container drops to 20px of padding, so the bleed would sit
   narrower than the prose it interrupts. Go flush instead. */
@media (max-width: 640px) {
  .blog-figure.wide {
    width: 100%;
    margin-left: 0;
    transform: none;
  }
}

/* Student label above a screenshot: "THEO  circuits" */
.blog-shot-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 26px 0 8px;
}
.blog-shot-label span {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-faint);
  margin-left: 8px;
}

/* ---------- Callouts ---------- */
.blog-note {
  margin: 28px 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 158, 11, 0.18);
  background: rgba(245, 158, 11, 0.05);
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.7;
}
.blog-note p { font-size: 16px; margin: 0; color: var(--text-dim); }
.blog-note strong { color: var(--text); }

.blog-tip {
  margin: 40px 0;
  padding: 24px 26px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.07);
}
.blog-tip-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}
.blog-tip-head img { width: 30px; height: 30px; }
.blog-tip p {
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 500;
  color: var(--text);
}

/* ---------- Two-column example split ---------- */
.blog-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 28px 0 32px;
}
.blog-split-col {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.015);
}
.blog-split-col h3 { margin: 0 0 10px; font-size: 17px; }
.blog-split-col p:last-child { margin-bottom: 0; }
.blog-split-col p, .blog-split-col li { font-size: 15px; line-height: 1.65; }

@media (max-width: 700px) {
  .blog-split { grid-template-columns: 1fr; }
}

/* ---------- Handwriting report card ----------
   Rebuilt as real markup rather than a screenshot, so the letter grid stays
   legible at any width and reads correctly to a screen reader. */
.blog-report {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 22px 24px 24px;
  margin: 28px 0 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}
.blog-report-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.blog-report-head h3 { margin: 0; font-size: 19px; }
.blog-report-head .count { color: var(--text-faint); font-size: 13px; white-space: nowrap; }
.blog-report p { margin: 10px 0 0; font-size: 15px; line-height: 1.6; }
.blog-report .muted { color: var(--text-faint); font-size: 14px; margin-top: 6px; }

.blog-report-legend {
  margin: 18px 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.blog-letters {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.blog-letters li {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 8px 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-faint);
}
/* Warm squares are the letters this student has practiced, matching the
   letter-by-letter grid in Reports. */
.blog-letters li.on {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber-light);
}

.blog-report-caption {
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 560px) {
  .blog-letters { grid-template-columns: repeat(7, 1fr); }
  .blog-letters li { font-size: 14px; padding: 7px 0; }
}

/* Three-up variant of the split, for a who-does-what breakdown. */
.blog-split.three { grid-template-columns: repeat(3, 1fr); }
.blog-split.three .blog-split-col { padding: 18px 18px 20px; }
.blog-split.three h3 { font-size: 15px; color: var(--amber-light); }

@media (max-width: 700px) {
  .blog-split.three { grid-template-columns: 1fr; }
}
