/* Year 6 Maths: its pictures (js/maths/y6/draw.js) and its Extreme topics. Year 6 also uses the
   Year 5 pictures and keys (maths-y5.css). */

.topics.advanced.y6 .topic-card.advanced { background: linear-gradient(135deg, #fff 55%, #f1dcff); box-shadow: var(--shadow), inset 0 0 0 3px #8a4fd6; }

/* Fractions on a line: the line, then "The arrow points to ?/12" */
.y6fline { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.y6fline .pic.svg { max-height: 170px; }
.y6-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; font: 400 34px/1.2 var(--book); }
.y6-ask > span:first-child { color: var(--muted); font-size: 0.8em; }
.y6-ask .frac .cell.blank { display: inline-block; min-width: 1.3em; padding: 0 0.15em; border-radius: 12px; line-height: 1.1; }

/* An algorithm: steps one under another */
.y6flow { display: flex; flex-direction: column; align-items: center; gap: 2px; width: min(100%, 560px); }
.y6flow-step { width: 100%; margin: 0; padding: 8px 16px; border: 3px solid var(--line); border-radius: 16px; background: #fff; text-align: center; font: 400 26px/1.3 var(--book); }
.y6flow-step.decide { border-color: #f2c14e; background: #fffaf0; border-radius: 28px; }
.y6flow-arrow { color: var(--muted); font: 700 22px/1 var(--ui); }

/* Letters for numbers */
.y6alg { display: grid; justify-items: center; gap: 14px; font: 400 46px/1.2 var(--book); }
.y6alg p { margin: 0; }
.y6alg-top { padding: 6px 22px; border-radius: 16px; background: var(--accent-soft); font-style: italic; }
.y6alg-ask { display: flex; align-items: center; gap: 12px; font-style: italic; }
.y6alg-ask .cell.blank { font-style: normal; }

/* Powers and roots */
.y6pow { --most: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.25em; font: 400 min(var(--most), 9cqw) / 1.2 var(--book); }
.y6pow .cell.sign { color: var(--muted); font-size: 0.9em; }
.y6pow sup { font-size: 0.55em; vertical-align: 0.85em; }
.y6pow sup .cell.blank { display: inline-block; min-width: 1.2em; padding: 0 0.1em; border-radius: 8px; font-size: 1.2em; line-height: 1.05; vertical-align: middle; }
.y6root { display: inline-flex; align-items: flex-start; }
.y6root-sign { font-size: 1.1em; line-height: 1; }
.y6root-under { border-top: 0.07em solid currentColor; padding: 0 0.08em; }

.work > .pic.svg.y6tree { max-width: 560px; }
.work > .pic.svg.y6rect { max-width: 560px; }
.work > .pic.svg.y6angles { max-width: 400px; }
.work > .pic.svg.y6prism { max-width: 440px; }
.work > .pic.svg.y6vertex { max-width: 400px; }
.work > .pic.svg.y6twin { max-width: 760px; }
.work > .pic.svg.y6bars { max-width: 480px; }
.work > .pic.svg.y6box { max-width: 460px; }
.work > .pic.svg.y6parallel { max-width: 520px; }

@media (max-width: 600px) {
  .y6-ask { font-size: 24px; gap: 8px; }
  .y6flow-step { padding: 6px 10px; font-size: 18px; }
  .y6alg { gap: 8px; font-size: 28px; }
  .y6pow { --most: 40px; }
}
