/* ==========================================================================
   MathHero Review page (/review)
   Builds on styles.css tokens and the blog.css article layout
   (.article-layout, .article-body, TOC rail, .faq-*, .cta-bottom-banner).
   ========================================================================== */

/* ── Verdict and key numbers ──────────────────────────────────────────── */
.verdict-plain-box .label,
.review-box .label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-blue);
  margin-bottom: 6px;
}

.verdict-plain-box p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--deep-blue);
  font-weight: 500;
}

.verdict-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.verdict-stat {
  padding: 16px 20px;
  border-left: 1px solid #E4E9F2;
}

.verdict-stat:first-child {
  border-left: 0;
}

.verdict-stat-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 23px;
  font-weight: 800;
  color: var(--deep-blue);
  line-height: 1.2;
}

.verdict-stat-value img {
  width: 18px;
  height: 18px;
}

.verdict-stat-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-gray);
  line-height: 1.45;
  margin-top: 4px;
}

/* Rating cells link to the store listing so parents can verify them */
.verdict-stat.is-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s;
}

.verdict-stat.is-link:hover,
.verdict-stat.is-link:focus-visible {
  background: #F2F6FF;
}

.verdict-stat-source {
  text-decoration: underline;
  text-decoration-color: #B9C4DD;
  text-underline-offset: 3px;
}

.verdict-stat.is-link:hover .verdict-stat-source {
  text-decoration-color: var(--primary-blue);
}

.verdict-plain {
  margin-bottom: 30px;
}

.verdict-plain-box {
  background: #EEF2FF;
  border-left: 4px solid var(--primary-blue);
  border-radius: 0 14px 14px 0;
  padding: 16px 20px;
  margin-bottom: 18px;
}

.verdict-stats.is-strip {
  border-top: 1px solid #E4E9F2;
  border-bottom: 1px solid #E4E9F2;
}

.verdict-stats.is-centered .verdict-stat {
  text-align: center;
}

.verdict-stats.is-centered .verdict-stat-value {
  justify-content: center;
}

.verdict-plain-note {
  font-size: 13.5px;
  color: #6B7486;
  text-align: center;
  margin-top: 8px;
}

/* Mid-page store buttons after the pricing decision */
.article-body .review-store-cta p {
  margin: 0;
}

.review-store-cta .store-buttons {
  margin: 0;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.review-store-cta .store-badge-apple {
  height: 38px;
  margin: 6px 0;
}

.review-store-cta .store-badge-google {
  height: 52px;
}

/* ── Shared boxes / callouts ─────────────────────────────────────────── */
.review-box {
  border-radius: 16px;
  padding: 18px 22px;
  margin: 22px 0;
  font-size: 16px;
  line-height: 1.65;
}

.review-box p {
  margin-bottom: 0;
}

.review-box p + p {
  margin-top: 10px;
}

.review-box.is-definition,
.review-box.is-info {
  background: #EEF2FF;
  color: var(--deep-blue);
}

.review-box.is-warn {
  background: #FFF6E8;
  border: 1px solid #FCE3B4;
  color: #6B4E0E;
}

.review-box.is-warn .label {
  color: #B86E00;
}

.review-box.is-ok {
  background: #EFFAF4;
  border: 1px solid #CDEEDB;
  color: #17543A;
}

.review-box.is-ok .label {
  color: #1E8E5A;
}

.article-body .review-box strong {
  color: inherit;
}

/* ── Best for / Not for ──────────────────────────────────────────────── */
.fit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0 10px;
}

.fit-card {
  border-radius: 16px;
  padding: 20px 22px;
}

.fit-card h3 {
  font-size: 17px !important;
  font-weight: 800 !important;
  margin: 0 0 12px !important;
}

.fit-card ul {
  list-style: none;
  margin: 0 !important;
  padding: 0;
}

.fit-card li {
  position: relative;
  padding-left: 26px;
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 12px !important;
}

.fit-card li:last-child {
  margin-bottom: 0 !important;
}

.fit-card li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
}

.fit-card.is-best {
  background: #EFFAF4;
  border: 1px solid #CDEEDB;
}

.fit-card.is-best h3 {
  color: #1E8E5A !important;
}

.fit-card.is-best li::before {
  content: '\2713';
  color: #1E8E5A;
}

.fit-card.is-not {
  background: #F7F8FB;
  border: 1px solid #E4E9F2;
}

.fit-card.is-not h3 {
  color: #B86E00 !important;
}

.fit-card.is-not li::before {
  content: '\2715';
  color: #B86E00;
}

/* ── Tables ──────────────────────────────────────────────────────────── */
.article-body table.subscription-table {
  table-layout: fixed;
}

.article-body table.subscription-table thead th:first-child {
  width: 24%;
}

.article-body table.subscription-table thead th:nth-child(n+2) {
  width: 38%;
}

.article-body table.fact-table th[scope="row"] {
  width: 30%;
  background: #F7F9FD;
  font-weight: 700;
}

.article-body table.fact-table tr:nth-child(even) td {
  background: transparent;
}

.article-body table .muted {
  color: #8A93A6;
}

.article-body table .yes {
  color: #1E8E5A;
  font-weight: 700;
}

/* ── How it works: screenshot figures ────────────────────────────────── */
.review-figure {
  margin: 6px 0 26px;
}

.review-figure img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  border-radius: 16px;
}

.review-figure figcaption,
.shots-grid figcaption {
  font-size: 14px;
  color: #6B7486;
  margin-top: 8px;
  line-height: 1.45;
}

/* ── Pros / cons ─────────────────────────────────────────────────────── */
.pros-list,
.cons-list {
  border-radius: 16px;
  padding: 20px 22px 20px 22px;
  margin: 0 0 22px !important;
}

.pros-list {
  list-style: none;
  background: #EFFAF4;
  border: 1px solid #CDEEDB;
}

.pros-list li {
  position: relative;
  padding-left: 28px;
}

.pros-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: #1E8E5A;
}

.cons-list {
  list-style: none;
  counter-reset: cons;
  background: #FFF6E8;
  border: 1px solid #FCE3B4;
}

.cons-list li {
  position: relative;
  padding-left: 30px;
  counter-increment: cons;
}

.cons-list li::before {
  content: counter(cons) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: #B86E00;
}

.pros-list li:last-child,
.cons-list li:last-child {
  margin-bottom: 0;
}

/* ── Parent quotes ───────────────────────────────────────────────────── */
.quote-method {
  font-size: 15px;
  color: #6B7486;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 6px 0 26px;
}

.quote-card {
  margin: 0;
  background: #F7F9FD;
  border: 1px solid #E4E9F2;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.article-body .quote-card blockquote {
  border: 0;
  margin: 0;
  padding: 0;
  font-style: italic;
  color: var(--deep-blue);
}

.article-body .quote-card blockquote p {
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
}

.quote-card figcaption {
  font-size: 14px;
  font-weight: 600;
  color: #6B7486;
}

/* ── Screenshot grid ─────────────────────────────────────────────────── */
.shots-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0 10px;
}

.shots-grid.is-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shots-grid figure {
  margin: 0;
}

.shots-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

/* ── Team cards (How we wrote this review) ───────────────────────────── */
.team-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 18px 0 10px;
}

.team-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #F7F9FD;
  border-radius: 16px;
  padding: 16px 18px;
}

.team-card .avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-blue);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
}

.team-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card a {
  color: var(--deep-blue);
  font-weight: 800;
  text-decoration: none;
  font-size: 16px;
}

.team-card a:hover {
  color: var(--text-blue);
}

.team-card p {
  font-size: 14px;
  line-height: 1.45;
  margin: 2px 0 0 !important;
}

/* ── FAQ: questions are H3s for structure ────────────────────────────── */
.review-faq .faq-question {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-gray);
  line-height: 1.4;
}

.review-faq .faq-answer {
  font-weight: 400;
}

/* ── Final CTA ───────────────────────────────────────────────────────── */
.cta-bottom-banner .review-cta-link {
  display: inline-block;
  margin-top: 8px;
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── About this page ─────────────────────────────────────────────────── */
.review-about p {
  font-size: 15px;
  color: var(--text-gray);
  margin-bottom: 12px;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .shots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .fit-grid {
    grid-template-columns: 1fr;
  }

  .verdict-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .verdict-stat:nth-child(3) {
    border-left: 0;
  }

  .verdict-stat:nth-child(n+3) {
    border-top: 1px solid #E4E9F2;
  }

  .article-body table.wrap-table {
    min-width: 0;
  }

  .article-body table.wrap-table th,
  .article-body table.wrap-table td {
    padding: 9px 10px;
  }

  .shots-grid {
    grid-template-columns: 1fr;
  }

  .quote-grid {
    grid-template-columns: 1fr;
  }
}
