/* ============ Phonics Check Buddy — article.css ============
   Layout + typography for content pages (articles, privacy,
   support). Builds on styles.css tokens — load styles.css FIRST,
   then this file. Vanilla, no build step.
   Wonderword re-skin: containers/typography only, no HTML changes.
   ========================================================= */

/* Content pages drop the paper grain for calm, fast reading (finding 11) */
body::before { display: none !important; }

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 18px calc(28px + var(--safe-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- Header nav ---- */
.page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(14px + var(--safe-top)) 2px 10px;
}
.page-nav__home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display), 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.page-nav__home .logo-mark { display: inline-flex; align-items: center; }
.page-nav__home .logo-mark svg { display: block; }
.page-nav__cta {
  background: var(--coral);
  color: var(--ink);
  border-radius: var(--r-pill, 999px);
  padding: 9px 16px;
  font-family: var(--font-display), 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--coral-deep);
  white-space: nowrap;
}

/* ---- Breadcrumbs ---- */
.breadcrumbs {
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 4px 2px 0;
}
.breadcrumbs a { color: var(--coral-ink); text-decoration: none; font-weight: 700; }
.breadcrumbs span[aria-current] { color: var(--ink-soft); }

/* ---- Article body ---- */
.article {
  background: var(--card);
  border-radius: var(--r-lg, 28px);
  box-shadow: var(--flat-lg);
  padding: 26px 22px 30px;
  margin: 10px 0 0;
}
.article h1 {
  font-family: var(--font-display), 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(24px, 6.4vw, 32px);
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 6px;
}
.article .lede {
  font-family: var(--font-body), 'Andika', sans-serif;
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 6px 0 18px;
}
.article h2 {
  font-family: var(--font-display), 'Fredoka', sans-serif;
  font-size: clamp(19px, 5vw, 24px);
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 8px;
}
.article h3 {
  font-family: var(--font-display), 'Fredoka', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 20px 0 6px;
}
.article p { font-family: var(--font-body), 'Andika', sans-serif; font-size: 16px; line-height: 1.62; color: var(--ink); margin: 0 0 14px; }
.article ul, .article ol { margin: 0 0 16px; padding-left: 22px; }
.article li { font-family: var(--font-body), 'Andika', sans-serif; font-size: 16px; line-height: 1.58; margin-bottom: 8px; color: var(--ink); }
.article a { color: var(--coral-ink); font-weight: 700; }
.article strong { color: var(--ink); }
.article .meta-note {
  font-family: var(--font-body), 'Andika', sans-serif;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 16px;
}

/* ---- Callout / tip box ---- */
.callout {
  background: var(--card);
  box-shadow: var(--flat);
  border-radius: var(--r-md, 18px);
  padding: 14px 16px 14px 18px;
  margin: 0 0 18px;
  font-family: var(--font-body), 'Andika', sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  border-left: 6px solid var(--teal);
}
.callout--tip { border-left-color: var(--green); }
.callout--note { border-left-color: var(--yellow-edge, var(--yellow)); }
.callout b, .callout strong { font-family: var(--font-display), 'Fredoka', sans-serif; font-weight: 600; }

/* ---- Word tables ---- */
.word-table-wrap { overflow-x: auto; margin: 0 0 18px; }
.word-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 320px;
}
.word-table caption {
  text-align: left;
  font-family: var(--font-display), 'Fredoka', sans-serif;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 0 8px;
  font-size: 15px;
}
.word-table th, .word-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--hair, rgba(34,37,75,.14));
  vertical-align: top;
}
.word-table th { font-family: var(--font-display), 'Fredoka', sans-serif; color: var(--ink-soft); font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.word-table td.word { font-weight: 600; font-family: var(--font-display), 'Fredoka', sans-serif; font-size: 16px; color: var(--ink); }
.word-table .tag-alien { color: var(--coral-ink); font-weight: 700; }
.word-table .tag-real { color: var(--ink-soft); font-weight: 700; }

/* ---- Year / practice cards ---- */
.paper-cards { display: grid; gap: 12px; margin: 0 0 20px; }
.paper-card {
  background: var(--card);
  border: 1.5px solid var(--hair, rgba(34,37,75,.14));
  border-radius: var(--r-md, 18px);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.paper-card__year { font-family: var(--font-display), 'Fredoka', sans-serif; font-weight: 600; font-size: 18px; color: var(--ink); }
.paper-card__desc { font-family: var(--font-body), 'Andika', sans-serif; font-size: 13.5px; color: var(--ink-soft); flex: 1 1 150px; }
.btn-practice {
  background: var(--coral);
  color: var(--ink);
  border-radius: var(--r-pill, 999px);
  padding: 10px 18px;
  font-family: var(--font-display), 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--coral-deep);
  white-space: nowrap;
}

/* ---- Support CTA box (end of every article) ---- */
.cta-support {
  margin: 26px 0 0;
  background: var(--paper-2, #FBEEDC);
  border-radius: var(--r-lg, 28px);
  padding: 22px 20px;
  text-align: center;
  box-shadow: var(--flat);
}
.cta-support h2 { font-family: var(--font-display), 'Fredoka', sans-serif; margin: 0 0 8px; font-size: 19px; color: var(--ink); }
.cta-support p { font-family: var(--font-body), 'Andika', sans-serif; font-size: 14.5px; color: var(--ink); margin: 0 0 14px; line-height: 1.55; }
.cta-support .btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cta-support__note { font-family: var(--font-body), 'Andika', sans-serif; font-size: 12px; color: var(--ink-soft); margin: 12px 0 0; }

/* ---- Related links (flat Row tier) ---- */
.related { margin: 24px 0 0; }
.related h2 { font-family: var(--font-display), 'Fredoka', sans-serif; font-size: 17px; margin: 0 0 8px; color: var(--ink); }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.related a {
  display: block;
  background: var(--card);
  border: 1.5px solid var(--hair, rgba(34,37,75,.14));
  border-radius: var(--r-md, 18px);
  padding: 11px 14px;
  color: var(--coral-ink);
  font-family: var(--font-display), 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* ---- Content-page footer ---- */
.site-footer { max-width: 720px; margin: 8px auto 0; }

/* ---- Support page embed ---- */
.kofi-embed-wrap {
  margin: 0 0 18px;
  border-radius: var(--r-md, 18px);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--flat);
}
.kofi-embed-wrap iframe { display: block; width: 100%; border: none; }
