:root { --copper-deep: #8f432a; }
.primary:hover { background: var(--copper-deep); }
.hero-copy h1 { font-size: clamp(2rem, 5vw, 3.25rem); overflow-wrap: anywhere; }
.hero-art { display: block; text-align: center; }
.hero-art .art-tag { margin-bottom: 0.75rem; }
.hero-art > p { font-size: 1rem; }
.course-index { padding: 2rem max(1rem, 6vw); max-width: 64rem; margin: auto; }
.course-index .compare-card { margin-block: 1rem; }
.course-index li { margin-block: .65rem; }
.course-index li a { text-decoration: underline; color: var(--copper-deep); }
.panel-body { padding: clamp(1rem, 4vw, 1.75rem); }
.panel-body p, .compare-card p, .solution p { line-height: 1.75; margin-block: .4rem; }
.p6-method { display: grid; gap: .75rem; margin-top: 1rem; }
.activity-form { margin-top: 1rem; }
fieldset { margin: 0 0 .75rem; padding: .75rem; min-inline-size: 0; border: 1px solid var(--line); border-radius: .6rem; }
legend { padding-inline: .25rem; line-height: 1.6; max-width: 100%; font-weight: 600; }
fieldset label { display: block; margin: .25rem 0; }
input, textarea, select {
  display: block; width: min(100%, 25rem); min-height: 44px;
  border: 1px solid var(--copper); border-radius: .5rem; padding: .5rem .65rem;
  background: var(--surface); color: var(--ink); font: inherit;
}
textarea { resize: vertical; }
select { display: inline-block; width: auto; }
.digits { display: grid; gap: .35rem; grid-template-columns: repeat(auto-fit, minmax(3.25rem, 1fr)); }
.digits label { text-align: center; }
.digits input { text-align: center; padding-inline: .2rem; }
[data-practice] { border-bottom: 1px solid var(--line); padding-bottom: .9rem; margin-bottom: 1.2rem; }
.feedback, [data-hint-text], [data-lab-status], #exit-status { color: var(--green); }
.lesson-end { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.lesson-footer p { line-height: 1.8; }
#question-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
#question-nav button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); }
#question-nav button[aria-pressed="true"] { background: var(--peach); color: var(--ink); }
.hero-copy h1 { text-wrap: balance; }
.activity-form > input { margin-bottom: .65rem; }
[data-correction] + [data-correction] { margin-top: 1rem; }
.unit-map a { text-decoration: underline; color: var(--copper-deep); }
.course-item strong { text-wrap: pretty; }
.compare-card svg, .lab svg, fieldset svg { max-width: 100%; height: auto; }
.control-pair { display: inline-flex; align-items: center; gap: .4rem; margin: .15rem .5rem .15rem 0; }
.place-table {
  width: 100%; table-layout: fixed; border-collapse: collapse;
  margin-block: .75rem; text-align: center; font-variant-numeric: tabular-nums;
}
.place-table caption { text-align: start; font-weight: 600; margin-bottom: .3rem; }
.place-table th, .place-table td { border: 1px solid var(--line); padding: .3rem .1rem; }
.place-table th { background: var(--warm); font-size: .875rem; overflow-wrap: anywhere; }
.place-table tr > :nth-child(4) { border-right: 2px solid var(--copper); }
.place-table input {
  width: 100%; min-width: 0; min-height: 44px; padding: .2rem 0; text-align: center;
}
.lab-groups {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
  gap: .4rem; padding: 0; list-style: none;
}
.lab-groups li { border: 1px solid var(--line); border-radius: .5rem; padding: .4rem; text-align: center; background: var(--warm); }
.lab-groups li:last-child { border-style: dashed; }
.unit-map a { display: inline-flex; align-items: center; min-height: 44px; }
.percent-grids { display: flex; flex-wrap: wrap; gap: .55rem; padding-block: .5rem; }
.percent-grids svg { width: min(45%, 9rem); height: auto; }
.percent-grids rect { stroke: var(--ink); stroke-width: .5; }
.percent-grids .grid-empty { fill: var(--surface); }
.percent-grids .grid-filled { fill: var(--copper); }
.ratio-bars { margin: .65rem 0; }
.ratio-bars text { fill: var(--ink); font: 14px system-ui, sans-serif; }
.ratio-bars .ratio-base { fill: var(--green); }
.ratio-bars .ratio-part { fill: var(--copper-deep); }
.equation-balance { display: block; margin: .4rem auto .7rem; }
.equation-balance path { fill: none; stroke: var(--copper-deep); stroke-width: 2.5; stroke-linejoin: round; }
.equation-balance text { fill: var(--ink); font: 14px system-ui, sans-serif; }
.equation-pieces { display: grid; gap: .4rem; margin-block: .65rem; }
.equation-pieces > div { display: flex; flex-wrap: wrap; gap: .25rem; }
.equation-pieces span { border: 1px solid var(--copper-deep); border-radius: .35rem; padding: .2rem .45rem; background: var(--warm); }
.equation-pieces .equation-removed { text-decoration: line-through; border-style: dashed; background: var(--surface); }
.angle-diagram { display: block; width: min(100%, 26rem); height: auto; margin: .5rem auto; overflow: visible; }
.angle-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.angle-pair figure { margin: 0; text-align: center; }
.angle-ray { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.angle-arc { fill: none; stroke: var(--copper-deep); stroke-width: 2; }
.angle-label { fill: var(--ink); font: 14px system-ui, sans-serif; }
.angle-center { fill: var(--ink); }
.protractor-outline { fill: var(--warm); stroke: var(--copper-deep); stroke-width: 1.5; }
.protractor-tick { stroke: var(--ink); stroke-width: 1.2; }
.protractor-outer, .protractor-inner { font: 13px system-ui, sans-serif; paint-order: stroke fill; stroke: var(--warm); stroke-width: 2px; }
.protractor-outer { fill: var(--ink); }
.protractor-inner { fill: var(--green); }
.symmetry-diagram { display: block; width: min(100%, 16rem); height: auto; margin: .5rem auto; overflow: hidden; }
.symmetry-outline { fill: var(--warm); stroke: var(--ink); stroke-width: 2; }
.symmetry-axis { stroke: var(--green); stroke-width: 2; stroke-dasharray: 5 3; }
.symmetry-reflected { fill: none; stroke: var(--copper-deep); stroke-width: 2; stroke-dasharray: 4 3; }
.symmetry-choices label { display: flex; align-items: center; gap: .6rem; min-height: 44px; }
.symmetry-choices input { width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0; flex: 0 0 auto; }
.reflect-grid { display: block; width: min(100%, 17rem); height: auto; margin: .5rem auto; }
.reflect-grid text { fill: var(--ink); font: 13px system-ui, sans-serif; }
.reflect-grid-line { stroke: var(--muted); stroke-opacity: .72; stroke-width: 1; fill: none; }
.reflect-original { stroke: var(--ink); stroke-width: 2.5; fill: none; }
.reflect-drawn { stroke: var(--copper-deep); stroke-width: 2.5; fill: none; }
.reflect-point { fill: var(--copper-deep); }
.volume-cups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem; max-width: 23rem; margin: .5rem auto; }
.volume-cups figure { margin: 0; text-align: center; }
.volume-cup { display: block; width: min(100%, 9rem); height: auto; margin: 0 auto; }
.volume-water { fill: var(--sage); }
.volume-outline { fill: none; stroke: var(--ink); stroke-width: 2; }
.volume-level { stroke: var(--green); stroke-width: 2; }
.volume-tick { stroke: var(--ink); stroke-width: 1; }
.volume-label { font: 12px system-ui, sans-serif; fill: var(--ink); }
.overflow-bucket { display: block; width: min(100%, 15rem); height: auto; margin: .6rem auto; }
.overflow-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.overflow-actions button { max-width: 100%; }
.circle-figure, .roll-wheel { display: block; width: min(100%, 16rem); height: auto; margin: .5rem auto; }
.circle-outline { fill: var(--warm); stroke: var(--ink); stroke-width: 2; }
.circle-dimension { fill: none; stroke: var(--green); stroke-width: 2; }
.circle-edges { display: block; width: min(100%, 18rem); height: auto; margin: .5rem auto; }
.circle-edge { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.circle-seam { stroke: var(--muted); stroke-dasharray: 5 3; }
.edge-selected { stroke: var(--copper-deep); stroke-width: 4; }
.area-fan { display: block; width: min(100%, 16rem); height: auto; margin: .5rem auto; }
.fan-polygon { fill: var(--sage); stroke: var(--green); stroke-width: 1.1; }
.fan-spoke { fill: none; stroke: var(--muted); stroke-width: 1; }
.fan-chord { fill: none; stroke: var(--copper-deep); stroke-width: 3; }

.area-shade { fill: var(--peach); stroke: var(--copper-deep); stroke-width: 2; }

.mean-chart { display: block; width: min(100%, 17rem); height: auto; margin: .5rem auto; }
.mean-grid { stroke: #a28b7e; stroke-width: 1; }
.mean-label { font-size: 11px; fill: var(--ink); }
.mean-axis { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.mean-bar { fill: var(--peach); stroke: var(--copper-deep); stroke-width: 1.3; }
.mean-level { stroke: var(--ink); stroke-width: 2.4; stroke-dasharray: 6 3; }

.trend-chart { display: block; width: min(100%, 19rem); height: auto; margin: .5rem auto; }
.trend-grid { fill: none; stroke: #a28b7e; stroke-width: 1; }
.trend-text, .trend-title { font-size: 12px; fill: var(--ink); }
.trend-title { font-weight: 700; }
.trend-axis { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.trend-line { fill: none; stroke-width: 2.2; }
.trend-line-0 { stroke: var(--copper-deep); }
.trend-line-1 { stroke: var(--ink); stroke-dasharray: 5 3; }
.trend-first { fill: var(--copper-deep); stroke: var(--surface); stroke-width: .75; }
.trend-second { fill: var(--ink); stroke: var(--surface); stroke-width: .75; }
.trend-bar { fill: var(--peach); stroke: var(--copper-deep); stroke-width: 1.3; }

.time-line { position: relative; display: flex; justify-content: space-between; gap: .5rem; padding: .5rem 0; margin: .5rem 0; }
.time-line::before { content: ""; position: absolute; top: 50%; width: 100%; border-top: 2px solid var(--copper-deep); }
.time-line span { z-index: 0; padding: .15rem .35rem; border: 1px solid var(--copper-deep); border-radius: .25rem; background: var(--warm); }

.speed-chart { display: block; width: min(100%, 19rem); height: auto; margin: .5rem auto; }
.speed-grid { fill: none; stroke: #a28b7e; stroke-width: 1; }
.speed-label, .speed-title { font-size: 11px; fill: var(--ink); }
.speed-title { font-weight: 700; }
.speed-axis { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.speed-first { fill: var(--copper-deep); stroke: var(--surface); stroke-width: .8; }
.speed-second { fill: var(--ink); stroke: var(--surface); stroke-width: .8; }

.speed-travel { stroke: var(--ink); stroke-width: 2; fill: none; }
.speed-highlight { stroke: var(--copper-deep); stroke-width: 4; fill: none; }

.pie-figure { margin: .65rem auto; max-width: 16rem; }
.pie-figure figcaption { font-weight: 700; text-align: center; }
.pie-chart { width: min(100%, 14rem); height: auto; display: block; margin: auto; }
.pie-wedge { stroke: var(--ink); stroke-width: 1.3; }
.pie-one { fill: #f8cbad; background: #f8cbad; }
.pie-two { fill: #f4ddab; background: #f4ddab; }
.pie-three { fill: #dbe9c7; background: #dbe9c7; }
.pie-four { fill: #cce3ed; background: #cce3ed; }
.pie-number { fill: var(--ink); font-weight: 700; font-size: 13px; }
.pie-legend { padding: 0; list-style: none; display: flex; justify-content: center; gap: .25rem .6rem; flex-wrap: wrap; }
.pie-swatch { display: inline-grid; place-items: center; min-width: 1.35em; border: 1px solid var(--ink); border-radius: .2em; }

.pie-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .75rem; }
.pie-pair .pie-figure { width: 100%; }

.pictogram { margin: .7rem 0; }
.pictogram figcaption { font-weight: 700; }
.pictogram ul { display: grid; gap: .35rem; padding: 0; list-style: none; }
.pictogram li { display: flex; align-items: center; gap: .55rem; }
.pictogram li > span:first-child { flex: 0 0 3em; }
.pictogram li > span:nth-child(2) { display: flex; align-items: center; gap: .25rem; }
.pictogram-token { display: inline-block; width: 1.05rem; height: 1.05rem; border: 1px solid var(--ink); background: var(--peach); }
.pictogram-half { width: .525rem; }
