/* ===== Blog section (index + article pages) =====
   Uses only the official palette tokens defined in styles.css. */

/* ---- Blog index ---- */
.blog-hero {
  padding: 64px 0 40px;
}
.blog-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  margin-bottom: 16px;
}
.blog-hero .lede {
  max-width: 640px;
  color: var(--ink-soft);
  font-size: 17px;
}

.blog-cluster {
  padding: 40px 0 8px;
}
.blog-cluster > .container > h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin-bottom: 6px;
}
.blog-cluster .cluster-sub {
  color: var(--ink-soft);
  margin-bottom: 28px;
  max-width: 620px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 38, 74, 0.1);
  border-color: rgba(244, 21, 126, 0.35);
}
.post-card h3 {
  font-size: 19px;
  line-height: 1.3;
}
.post-card .post-desc {
  color: var(--ink-soft);
  font-size: 14.5px;
  flex-grow: 1;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.post-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  width: fit-content;
}
.post-tag--parent-worry   { color: var(--pink-700); background: var(--pink-100); }
.post-tag--mental-maths   { color: var(--navy-700); background: var(--blue-100); }
.post-tag--olympiad       { color: #7A5A43; background: rgba(216, 188, 172, 0.4); }  /* warm beige tonal step */
.post-tag--curriculum     { color: var(--navy-800); background: var(--navy-100); }
.post-tag--everyday-maths { color: var(--mint-400); background: rgba(104, 104, 74, 0.12); } /* olive tint */

/* ---- Article pages ---- */
.article-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}
.article-head {
  margin-bottom: 40px;
}
.article-head h1 {
  font-size: clamp(30px, 4.5vw, 44px);
  line-height: 1.12;
  margin: 14px 0 18px;
}
.article-head .article-lede {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 640px;
}
.article-head .post-meta { margin-top: 18px; }

.article-body {
  font-size: 16.5px;
  line-height: 1.72;
}
.article-body h2 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.25;
  margin: 52px 0 16px;
}
.article-body h3 {
  font-size: 18.5px;
  margin: 34px 0 12px;
}
.article-body p { margin: 0 0 18px; }
.article-body a {
  color: var(--pink-700);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(244, 21, 126, 0.35);
  text-underline-offset: 3px;
}
.article-body a:hover { text-decoration-color: var(--pink-500); }

.article-body ul,
.article-body ol {
  margin: 0 0 18px;
  padding-left: 26px;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 8px; }
.article-body li::marker { color: var(--pink-500); }

.article-body ul li.task {
  list-style: none;
  position: relative;
  padding-left: 4px;
}
.article-body li.task .box {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin: 0 10px -2px -24px;
  border: 2px solid var(--sky-300);
  border-radius: 4px;
  background: var(--bg);
}

.article-body blockquote {
  margin: 36px 0;
  padding: 22px 28px;
  border-left: 4px solid var(--pink-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--white);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--navy-800);
}
.article-body blockquote p { margin: 0; }

.article-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.article-body table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
  line-height: 1.5;
}
.article-body th,
.article-body td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.article-body th {
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--navy-100);
  color: var(--navy-800);
  white-space: nowrap;
}
.article-body tr:last-child td { border-bottom: none; }

.article-body strong { color: var(--navy-800); }

/* ---- Shared closing CTA panel ---- */
.article-cta {
  margin: 64px auto 96px;
  max-width: 780px;
  padding: 0 24px;
}
.article-cta .panel {
  background: var(--navy-800);
  color: #F5F7FB;
  border-radius: var(--radius);
  padding: 44px 40px;
  text-align: center;
}
.article-cta h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin-bottom: 10px;
}
.article-cta p {
  color: rgba(245, 247, 251, 0.75);
  max-width: 520px;
  margin: 0 auto 24px;
}

/* ---- /exams pages (share this stylesheet) ---- */
.verify-note {
  background: var(--blue-100);
  border: 1px solid rgba(0, 38, 74, 0.12);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 28px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--navy-800);
}
.verify-note--ok {
  background: rgba(104, 104, 74, 0.1); /* olive tint — verified */
  border-color: rgba(104, 104, 74, 0.25);
}
.status-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--pink-100);
  color: var(--pink-700);
  white-space: nowrap;
}
.fact-table th { width: 180px; }

/* ---- /olympiad-zone style paper pages (share this stylesheet) ---- */
.paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.paper-meta strong { color: var(--navy-800); }

.paper-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--navy-100);
  padding-bottom: 8px;
  margin: 48px 0 8px;
}
.paper-section-head .marks {
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.paper-q {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.paper-q .q-text { margin-bottom: 12px; }
.paper-q .q-text strong { color: var(--navy-800); }

.q-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 20px;
  font-size: 15.5px;
}
.q-options span .opt-letter {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--pink-700);
  margin-right: 8px;
}

.answer-key {
  margin: 48px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.answer-key summary {
  cursor: pointer;
  padding: 18px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy-800);
}
.answer-key[open] summary { border-bottom: 1px solid var(--line); }
.answer-key .key-body { padding: 8px 24px 20px; }
.answer-key .key-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.answer-key .key-row:last-child { border-bottom: none; }
.answer-key .key-row .key-ans {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--pink-700);
}

@media print {
  .nav, .site-footer, .article-cta, .answer-key, .breadcrumbs { display: none; }
  .paper-q { break-inside: avoid; }
}

/* ---- Back link on articles ---- */
.article-back {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pink-700);
}
.article-back:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .article-wrap { padding-top: 36px; }
  .article-body blockquote { font-size: 17.5px; padding: 18px 20px; }
  .article-cta .panel { padding: 32px 22px; }
}
