/* Number Facts: shared by the student and teacher pages (after style.css). */
a { color: inherit; }
.top h1 a { text-decoration: none; }
.tag.good { color: var(--good); }
.banner { border: 1.5px solid var(--answer); background: var(--answer-wash); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-weight: var(--w-semi); }
.note { border-left: 4px solid var(--accent); padding: 6px 10px; background: var(--hover); border-radius: 0 8px 8px 0; }
.small { font-size: .86rem; }
.center { text-align: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* The heatmaps: 12 x 12 for × and ÷, 15 x 15 for + and −. Cell colours come from shared.js and are
   the same in both themes. A 15 x 15 grid gets a little more room on a wide screen, and smaller
   writing and gaps so it still fits a 375 px phone. */
.heatWrap { width: 100%; max-width: 560px; }
.heatWrap:has(.heat15) { max-width: 640px; }
/* A run with more than one operation: its grids side by side where there is room. */
.heatList { display: grid; gap: 14px; }
.heatList.multi { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
table.heat { table-layout: fixed; width: 100%; border-collapse: separate; border-spacing: 2px; font-variant-numeric: tabular-nums; }
table.heat caption { text-align: left; font-size: .82rem; color: var(--muted); padding-bottom: 4px; }
table.heat th, table.heat td { padding: 0; border: 0; text-align: center; }
table.heat th { font-size: .72rem; color: var(--muted); font-weight: var(--w-bold); }
table.heat thead th { padding-bottom: 2px; }
table.heat .corner { color: var(--ink); }
table.heat td { position: relative; border-radius: 4px; font-size: clamp(.55rem, 2.3vw, .8rem); font-weight: var(--w-semi); cursor: pointer; line-height: 1; }
table.heat td > span { display: grid; place-items: center; aspect-ratio: 1; }
table.heat td i { position: absolute; top: 1px; right: 2px; font-style: normal; font-size: .62em; line-height: 1; }
table.heat15 { border-spacing: 1.5px; }
table.heat15 th { font-size: clamp(.56rem, 2.2vw, .72rem); }
table.heat15 td { font-size: clamp(.5rem, 2vw, .76rem); border-radius: 3px; }
table.heat15 td i { right: 1px; }
/* The settings chooser (chooser.js): operations, numbers and timer as rows of big tappable tick
   buttons. Students use it for their own practice, the teacher for a class practice. */
.chooser { display: grid; gap: 4px; }
.picker { border: 0; padding: 0; margin: 4px 0 6px; min-width: 0; }
.picker legend { font-weight: var(--w-semi); padding: 0 0 6px; }
.chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.chip { position: relative; display: block; min-width: 0; }
.chip.half { grid-column: span 3; }
.chip.wide { grid-column: 1 / -1; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: var(--w-bold); background: var(--board); text-align: center; }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.chip .tick { display: none; font-style: normal; margin-right: 6px; }
.chip input:checked + span .tick { display: inline; }
.chip input:disabled { cursor: not-allowed; }
.chip input:disabled + span { opacity: .45; border-style: dashed; text-decoration: line-through; background: transparent; }
/* Operations: the symbol big, the name under it. Four across, two on a phone. */
.chips.ops { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 520px) { .chips.ops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chip.op span { flex-direction: column; gap: 1px; min-height: 62px; font-size: .86rem; line-height: 1.15; }
.chip.op .sym { font-size: 1.6rem; line-height: 1; }
.chip.op .tick { position: absolute; top: 5px; left: 7px; margin: 0; }
/* Numbers: Recommended and All, then 1 to 12 six to a row, or 1 to 15 (once + or − is ticked) five
   to a row. */
.chips.nums:has(input[value="13"]) { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.chips.nums:has(input[value="13"]) .chip { grid-column: span 2; }
.chips.nums:has(input[value="13"]) .chip.half { grid-column: span 5; }
.chips.nums:has(input[value="13"]) .chip.wide { grid-column: 1 / -1; }
/* Timer: one row on a wide screen (No timer a little wider), two rows of three on a phone. */
.chips.timers { grid-template-columns: minmax(0, 1.5fr) repeat(5, minmax(0, 1fr)); }
.chips.timers .chip.wide { grid-column: auto; }
@media (max-width: 520px) { .chips.timers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.chooserNote { min-height: 1.3em; }
.chooserNote.error { color: var(--answer); font-weight: var(--w-semi); }
.groupPick { display: flex; align-items: center; gap: 8px; font-weight: var(--w-semi); }
.groupPick select { flex: 1; min-width: 0; max-width: 320px; }
table.heat td.unasked { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
table.heat td.sel { outline: 3px solid var(--ink); outline-offset: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.legend .sw.wide { width: 56px; }
.legend b { color: var(--ink); }
.cellInfo { min-height: 1.4em; font-size: .9rem; margin-top: 4px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 6px 0 10px; }
.stats div { border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.stats dt { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: var(--w-bold); }
.stats dd { margin: 0; font-size: 1.35rem; font-weight: var(--w-bold); }
.stats dd small { font-size: .7em; color: var(--muted); font-weight: var(--w-semi); }
@media (max-width: 420px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
