/* Mathematical list filters and worked examples, November 2026. */
.math-filters{border:2px solid var(--ink,#172544);border-radius:18px;padding:18px;margin:16px 0 28px;min-width:0}
.math-filters legend{font-weight:800;padding:0 8px}.math-filters p{margin:8px 0 12px}
.math-filter-buttons{display:flex;gap:8px;flex-wrap:wrap}.math-filter-buttons button{font:inherit;font-weight:700;min-height:44px;padding:9px 13px;border:2px solid #1b45c2;border-radius:14px;background:#fff;color:#173b9b;cursor:pointer}
.math-filter-buttons button[aria-pressed=true]{background:#1b45c2;color:#fff}.math-filter-buttons button:focus-visible{outline:3px solid #111;outline-offset:3px}
.math-filter-status{font-weight:700}.riddles [hidden],.lists .list-part[hidden]{display:none!important}
.math-worked{margin:22px 0;padding:16px;border:2px solid #b5c6eb;border-radius:14px;background:#fff;color:#172544;font-size:1rem;max-width:100%}
.math-worked figcaption{font-weight:800;font-size:1.1rem}.math-worked p{margin:12px 0}.math-worked ol{padding-left:24px;list-style:decimal}.math-worked li{margin:8px 0;padding:0;border:0;background:none}
.dice-grid{border-collapse:collapse;width:100%;max-width:440px;table-layout:fixed;text-align:center}.dice-grid caption{font-size:.95rem;text-align:left;margin-bottom:9px}.dice-grid td,.dice-grid th{border:1px solid #6b7b97;padding:7px 2px}.dice-grid th:first-child{width:23%;overflow-wrap:anywhere}.dice-grid .dice-hit{background:#f9d35d;color:#172544}.math-equation{font-size:1.3rem;font-weight:800}
.age-bar-row{display:grid;grid-template-columns:54px 1fr;align-items:center;gap:8px;margin:8px 0}.age-bar-track{display:flex;min-width:0}.age-part{display:flex;justify-content:center;align-items:center;min-height:40px;border:2px solid #172544;font-weight:800}.age-base{width:16.129%;background:#cbe6ff}.age-extra{width:83.871%;background:#ffdf8d;border-left:0}
@media print{.math-filters{display:none}.math-worked{break-inside:avoid}}
