/* The Mathematical Edition (lang/math.php): only its pages link this file. The site keeps its look; formulas get
   the serif face, the welcome note fades by itself, the puzzle sits quietly in the footer. */
h1, h2, h3, .lead, .formula, nav.main a, .tabs a, .chips a, .eyebrow { font-family: var(--serif); letter-spacing: 0; }
.eyebrow { text-transform: none; font-size: .95rem; }
h1, .hero h1 { font-style: italic; }
.formula { font-size: 1.05rem; color: var(--teal-dark); font-style: italic; }
.words summary { cursor: pointer; color: var(--ink-soft); font-size: .88rem; }
.words p { margin-top: 8px; }
.math-hello { position: fixed; z-index: 90; inset-inline: 0; bottom: 22px; margin: 0 auto; width: fit-content; max-width: calc(100% - 32px); padding: 14px 22px;
  border-radius: 14px; background: var(--teal-dark); color: #fff; text-align: center; box-shadow: var(--shadow); animation: math-hello 8s ease-in-out forwards; }
.math-hello p { margin: 0; }
.math-hello p:first-child { font: italic 1.15rem var(--serif); }
.math-hello p + p { font-size: .9rem; opacity: .9; }
@keyframes math-hello { 0% { opacity: 0; transform: translateY(12px); } 8%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; } }
.math-foot { margin: 0 0 22px; padding-top: 18px; border-top: 1px solid var(--cream-line); }
.math-foot summary { cursor: pointer; }
.math-puzzle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; font-family: var(--serif); font-style: italic; }
.math-puzzle input { width: 4.5em; padding: 6px 8px; border: 1px solid var(--cream-line); border-radius: 8px; font: inherit; text-align: center; background: #fff; color: var(--ink); }
.math-puzzle p { flex-basis: 100%; margin: 0; }
.qed { margin: 14px 0; padding: 16px 18px; border-radius: 14px; background: #fff; text-align: center; }
.qed p { margin: 2px 0; }
.qed-0 { font: italic 1.25rem var(--serif); color: var(--teal-dark); }
.qed-2 { font-weight: 700; margin-top: 10px !important; }
.qed-3 { color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .math-hello { animation: none; position: static; margin: 12px auto; } }
