/* multiplicationcharts.app (CYCLE186-LD-RT-MC-BUILD-1): the few parts the tracing door does not
   have. Loaded only on this door, after printables.css (the shared Crayon-bright design system,
   CYCLE186-DES-RT-PRINTABLES-DESIGN-1 direction B). No third-party assets. */

.mc-page .wordmark .tile { font-family: var(--font-ui); font-weight: 800; font-size: 25px; padding-bottom: 2px; }
.mc-page .wordmark { font-size: 18px; }
.mc-form .opt { font-weight: 500; color: var(--muted); }
/* Answers and Style side by side when there is room (Download PDF stays in the first screen) */
.mc-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 0 12px; }
@media (min-width: 900px) { .mc-page .hero-title { margin: 10px 0 12px; } }
/* MC-POLISH-1 (Andrew's review item 4): in the 440 px tool column the 52 px hand title "Blank Multiplication Chart"
   broke into three one-word lines (21% of the first screen; every other title takes two). At 44 px "Blank
   Multiplication" (416 px) fits one line, so it takes two like the rest. Phones are unchanged (two lines already). */
@media (min-width: 900px) { .mc-blank .hero-title { font-size: 44px; } }

/* the times-table facts on its page: the answer first (doctrine III.C) */
.mc-facts { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  font: 600 15px/1.2 var(--font-ui); }
@media (min-width: 520px) { .mc-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); font-size: 16px; } }
.mc-facts li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; white-space: nowrap; text-align: center; }
.mc-facts strong { font-weight: 800; }

/* links to the 11 times tables */
.mc-table-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mc-table-links a { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 6px 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 700; }
.mc-table-links .x { font: 800 20px/1 var(--font-ui); color: var(--primary); min-width: 2.2em; }
.mc-table-links a[aria-current="page"] { background: var(--soft); box-shadow: inset 0 -3px 0 var(--c2); }
.mc-tiles .big { font: 800 40px/52px var(--font-ui); }

/* MULT-PAGES-1/-2 (D-132): worked examples, and the times table chart's tables as lists */
.mc-ex-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 760px) { .mc-ex-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mc-ex-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.mc-ex-item h3 { font-size: 16px; margin: 0 0 4px; }
.mc-ex-item p { margin: 0; }
.mc-all { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .mc-all { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .mc-all { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.mc-all-t { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.mc-all-t h3 { font-size: 15px; margin: 0 0 4px; }
.mc-all-t ol { list-style: none; margin: 0; padding: 0; font: 600 14px/1.55 var(--font-ui); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mc-all-t strong { font-weight: 800; }
/* MULT-PAGES-2 (D-132): the 1-100 chart page: what it is, the pages choice, the page map */
.mc-page .nw { white-space: nowrap; }
.mc-what { background: var(--soft); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; }
.mc-what a { font-weight: 700; }
.mc-part { margin: 0 0 12px; }
.mc-part select { width: 100%; max-width: 22rem; }
.mc-map { display: grid; gap: 6px; }
.mc-map-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 8px; align-items: center; }
.mc-map-label { font-weight: 700; font-size: 14px; }
.mc-map-pages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.mc-map-pages li { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); text-align: center;
  font: 700 14px/30px var(--font-ui); font-variant-numeric: tabular-nums; min-width: 0; }
@media (max-width: 480px) { .mc-map-row { grid-template-columns: minmax(0, 1fr); gap: 2px; } .mc-map-pages li { font-size: 12px; line-height: 26px; } }

.mc-howto ol { margin: 0 0 10px; padding-left: 1.4em; }
.mc-howto li { margin: 4px 0; }
.mc-howto p { color: var(--muted); margin: 0; }
.mc-error { padding-top: 12px; }

/* A4: the preview frames take the A4 shape (mult.js sets the class and the print page size) */
body.paper-a4 .paper, body.paper-a4 .pv-page { aspect-ratio: 210 / 297; }
@media print {
  body.paper-a4 .print-page, body.paper-a4 .print-page > svg { width: 210mm; height: 297mm; }
  body.paper-a4:not(.printing) .paper { width: 210mm; height: 297mm; }
}

/* ---------------------------------------------------------------- the worksheet page (MC-WORKSHEETS-1, D-91) */
.ws-seg4 label { padding: 0 6px; }
@media (min-width: 900px) { .ws-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } .ws-pair .seg label { padding: 0 4px; } }
.ws-actions .btn-primary { grid-column: 1 / -1; }
.ws-actions .ws-new { grid-column: 1 / -1; }
/* SHARE-PDF-1: Pippin's longer name helper (mc.name.helper) adds a line at 390 px; this keeps Download PDF in the first screen */
@media (max-width: 420px) { .ws-form .actions { margin-top: 6px; } }
.ws-check { display: flex; align-items: center; gap: 12px; min-height: var(--tap); margin-top: 12px; }
.ws-check input { width: 24px; height: 24px; margin: 0; accent-color: var(--primary); flex: none; }
.ws-check label { font-weight: 700; min-height: var(--tap); display: inline-flex; align-items: center; cursor: pointer; }
.ws-tables-hint { margin: 0 0 8px; }
.ws-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.ws-chips input, .ws-cells input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ws-chips label, .ws-cells label { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: 0;
  padding: 0 4px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line-strong); font: 700 15px/1.1 var(--font-ui);
  color: var(--ink); cursor: pointer; white-space: nowrap; }
.ws-chips input:checked + label, .ws-cells input:checked + label { background: var(--pick); border-color: #8a6d00; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
.ws-chips input:focus-visible + label, .ws-cells input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

/* "Practice what I missed": the 12 x 12 grid. A phone shows one row per table, opened by its button;
   a wide screen shows the whole grid with the numbers along the top and down the side. */
.ws-mine .ws-privacy { margin: 0 0 14px; max-width: 46em; }
.ws-grid { display: grid; gap: 6px; }
.ws-headrow, .ws-rl { display: none; }
.ws-rh { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: var(--tap); padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font: 750 16px/1.2 var(--font-ui); color: var(--ink); cursor: pointer; text-align: left; }
.ws-rh::after { content: "+"; font-size: 22px; font-weight: 800; color: var(--primary); }
.ws-row.open .ws-rh::after { content: "\2212"; }
.ws-rc { margin-left: auto; padding-right: 10px; color: var(--muted); font-weight: 700; }
.ws-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 8px 0 4px; }
.js .ws-row:not(.open) .ws-cells { display: none; }
.ws-cells label { font-size: 14px; }
.ws-status { font-weight: 700; margin: 14px 0 0; }
.ws-mine-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 10px; }
.ws-levels-h { font-size: 17px; margin: 14px 0 4px; }
.ws-levels { margin: 0 0 10px; padding-left: 1.2em; }
.ws-levels li { margin: 3px 0; }
.mc-ws-link { margin: 0; }
.mc-ws-link a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; }
@media (min-width: 760px) {
  .ws-row { display: grid; grid-template-columns: 40px repeat(12, minmax(48px, 64px)); gap: 6px; align-items: center; justify-content: start; }
  .ws-headrow span, .ws-rl { display: flex; align-items: center; justify-content: center; font: 800 15px/1 var(--font-ui); color: var(--muted); }
  .ws-rh { display: none; }
  .ws-cells, .js .ws-row:not(.open) .ws-cells { display: contents; }
  .ws-grid { gap: 6px; }
}
@media (max-width: 480px) { .mc-page .nav a { padding: 0 7px; font-size: 14.5px; } }
/* CYCLE196-LD-RT-MC-NAV-HERO-1 (R-34, LD-6603): with Add / Subtract / Divide the pill row is 7 tabs; on a phone it wraps
   to two rows instead of scrolling sideways, so every section tab (and the lit one) is on the first screen */
@media (max-width: 899px) { .mc-page .nav { flex-wrap: wrap; overflow-x: visible; row-gap: 0; } }
/* rc-st7-9 UX pass (CYCLE191-LD-RT-RC-ST7-9-MERGE-1): the times table chart's table links are 44 px tall (they were 20 px
   at 1280 and 43 px at 390); the sign-post line under the maker is not printed with the sheet */
.mc-all-t h3 { display: flex; align-items: center; min-height: var(--tap, 44px); margin: 0; }
.mc-all-t h3 a { display: inline-flex; align-items: center; min-height: var(--tap, 44px); }
@media print { body:not(.printing) .mc-ws-link { display: none !important; } }
/* CYCLE192-LD-RT-MC-HUNDREDS-1: the hundreds chart pages' example sheets (engine-drawn SVG) and related links */
.hc-ex { margin: 0; }
.hc-ex img { display: block; width: 100%; max-width: 260px; height: auto; margin: 4px auto 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.hc-ex figcaption h3 { margin: 4px 0; }
@media (min-width: 900px) { .hc-ex-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } }
.hc-related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hc-related a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 700; color: var(--ink); text-decoration: none; }
.hc-missing { margin-top: 4px; }
