.math-challenge-page { --accent: #e5a181; --accent-rgb: 229, 161, 129; }
.math-challenge-page .tool-hero { padding-bottom: 32px; }
.math-challenge-page .tool-hero h1 { max-width: 22ch; }
.math-challenge-page .hero-copy { max-width: 760px; }
.math-challenge-note { max-width: 760px; margin: 18px 0 0; color: #c1bbb2; font-size: .85rem; }
.math-challenge-list { display: grid; gap: 20px; margin-block: 0 36px; }
.math-question { padding: clamp(22px, 4vw, 32px); scroll-margin-top: 180px; }
.math-question h2 { margin: 8px 0 14px; font-size: clamp(1.4rem, 4vw, 1.85rem); line-height: 1.25; }
.math-question p { color: #d2ccc3; line-height: 1.65; }
.math-question .math-question-display { margin-block: 22px; padding: 18px; border-radius: 12px; border: 1px solid #48413b; background: #1c1a19; color: #f4efe6; font-size: clamp(1rem, 4vw, 1.6rem); font-weight: 500; overflow-wrap: anywhere; }
.math-challenge-form:not([hidden]) { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 24px 0 8px; }
.math-challenge-form .field { max-width: 260px; flex: 1 1 180px; }
.math-challenge-form .field span { font-size: .87rem; }
.math-challenge-form input { min-height: 48px; }
.math-challenge-page .button:not(.secondary):hover { color: #090a0c; }
.math-feedback { margin: 14px 0; min-height: 1.65em; font-size: .91rem; }
.math-question .math-feedback[data-kind="correct"] { color: #9de8be; }
.math-question .math-feedback[data-kind="invalid"] { color: #ffb6a3; }
.math-hints { display: grid; gap: 10px; margin-top: 18px; }
.math-hints details { padding: 14px 18px; border: 1px solid #45413d; border-radius: 12px; background: #151516; }
.math-hints summary { min-height: 28px; color: #eee8df; font-weight: 500; cursor: pointer; }
.math-hints p { margin: 12px 0 0; }
.math-hints a { display: inline-block; min-height: 44px; padding-top: 14px; }
.math-grid-visual { width: min(100%, 300px); height: auto; display: block; margin: 20px 0; color: #e5a181; }
.math-round-review { padding: 28px; margin-bottom: 36px; }
.math-round-review h2 { margin-bottom: 12px; font-size: 1.6rem; }
.math-round-review p { color: #d2ccc3; }
.math-round-review .button { margin-top: 16px; }
.math-challenge-page .guide-download { margin-bottom: 42px; }
.math-challenge-page .content-section { padding: 32px 0 48px; }
.math-challenge-page .math-help { max-width: 800px; }
.math-challenge-page .math-help h2 { margin-bottom: 14px; font-size: 1.8rem; }
.math-challenge-page .math-help h3 { margin: 24px 0 8px; font-size: 1.2rem; }
.math-challenge-page .math-help p { color: #c1bbb2; }
.math-challenge-page [hidden] { display: none !important; }
@media (max-width: 600px) {
  .math-challenge-form:not([hidden]) { align-items: stretch; }
  .math-challenge-form .field { max-width: none; width: 100%; flex-basis: 100%; }
  .math-challenge-form .button { width: 100%; }
  .math-round-review { padding: 22px; }
  .math-question { scroll-margin-top: 198px; }
}
@media print {
  .math-challenge-form, .math-feedback, .math-round-review, .math-challenge-page .guide-download { display: none !important; }
  .math-question { color: #000; background: #fff; border-color: #999; break-inside: avoid; }
  .math-question p, .math-question .math-question-display, .math-hints summary { color: #000; background: #fff; }
  .math-hints details { background: #fff; }
}
