/* Narrated construction uses the site's single accent and reading face. */
.solve-start, .solve-controls button { font-family: var(--ui); font-size: 15px; font-weight: 600; line-height: 1.25; min-height: 44px; border: 1px solid currentColor; border-radius: 5px; background: var(--bg); color: var(--ink); padding: 8px 12px; cursor: pointer; box-shadow: none; }
.solve-start { margin-inline-start: 16px; vertical-align: middle; white-space: nowrap; }
.solve-panel { margin: 20px 0; font-family: var(--ui); color: var(--ink); }
.solve-controls { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; padding: 3px 3px 8px; scrollbar-width: thin; }
.solve-controls button { flex: 0 0 auto; min-width: 44px; white-space: nowrap; }
.solve-controls button[aria-disabled="true"] { border-style: dashed; cursor: default; }
.solve-controls button:focus-visible, .solve-start:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.solve-status { font-size: 18px; font-weight: 650; margin: 10px 0 0; line-height: 1.5; }
.solve-note { font-size: 15px; margin: 4px 0 0; line-height: 1.5; }
.solve-note:empty { display: none; }
.solving { --solve-accent: #195c40; --solve-wash: #edf5ef; color: #151916; }
[data-theme="dark"] .solving { --solve-accent: #bddbc5; --solve-wash: #202b24; color: #f3f6f1; }
.solving .ex-work { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.solving .ex-hints, .solving .ex-help, .solving .ex-entry, .solving .ex-stepsrow, .solving .ex-more, .solving .cue-read-row, .solving .fig-play { display: none !important; }
.solving .steps { margin: 0; min-width: 0; }
.solving .steps > li { font-size: 18px; line-height: 1.6; margin-block: 0 20px; padding: 12px 14px; border-inline-start: 3px solid transparent; }
.solving .steps > li.solve-current { border-inline-start-color: var(--solve-accent); background: var(--solve-wash); }
.solving .steps .r { display: block; font-size: 18px; line-height: 1.6; color: inherit; margin-block-start: 10px; }
.solving .steps .s { font-size: 18px; color: inherit; }
.solve-whole-change { text-decoration: underline; text-decoration-color: var(--solve-accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
::highlight(solve-change) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
[data-drawn="0"] { visibility: hidden !important; }
.solve-figure { min-width: 0; align-self: start; position: sticky; top: 80px; background: var(--bg); z-index: 2; max-height: 38vh; overflow: auto; }
.solving .solve-figure .fig { margin: 0 0 12px; }
.solving .solve-figure svg { max-height: 28vh; }
.solve-board { border: 1px solid currentColor; border-radius: 5px; padding: 16px; }
.solve-board-line { font-size: 18px; line-height: 1.6; padding-block: 8px; border-bottom: 1px solid currentColor; }
.solve-board-line[data-drawn="0"] { display: none; }
.solve-sketch { width: 100%; color: var(--ink); fill: currentColor; font: 18px var(--ui); }
.solve-axis { stroke: currentColor; stroke-width: 1; fill: none; }
.solve-guide { stroke: var(--solve-accent); stroke-width: 2; fill: none; }
.solve-dot { fill: var(--solve-accent); stroke: currentColor; }
.solving .ex-pics .note-words { font-size: 18px; line-height: 1.6; }
.solving .ex-pics [data-solve-mark="write"] { font-size: max(15px, 1em); }
@media (min-width: 800px) {
  .solving .ex-work:has(.solve-figure) { grid-template-columns: minmax(220px, .9fr) minmax(0, 1.1fr); align-items: start; }
  .solving .solve-figure { grid-column: 1; grid-row: 1 / span 5; max-height: 65vh; }
  .solving .steps { grid-column: 2; }
  .solving .solve-figure svg { max-height: 45vh; }
}
@media (max-width: 500px) {
  .solve-start { margin-inline-start: 8px; padding-inline: 8px; }
  .solve-controls button { padding-inline: 8px; }
  .solving .steps > li { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .solving *, .solving *::before, .solving *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .solve-whole-change { text-decoration-color: Highlight; }
  ::highlight(solve-change) { text-decoration: underline; text-decoration-color: Highlight; }
  .solving .steps > li.solve-current { border-color: Highlight; }
  .solve-guide, .solve-dot { stroke: CanvasText; }
}
@media print {
  .solve-start, .solve-panel, .solve-board { display: none !important; }
  .solving [hidden], .solving [data-drawn="0"] { display: revert !important; visibility: visible !important; }
  .solve-figure { position: static; max-height: none; }
}

.solving .ex-answer > :not(.ex-record) { display: none !important; }
.solving .solve-figure .ex-pics { position: static; max-height: none; }
.solving .ex-work .solve-figure .solve-board { position: static; max-height: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .solving { --solve-accent: #bddbc5; --solve-wash: #202b24; color: #f3f6f1; }
}

.solve-curve { fill: none; stroke: var(--solve-accent); stroke-width: 2.5; }
.solve-controls { padding-inline-end: 18px; mask-image: linear-gradient(to right, #000, #000 calc(100% - 10px), transparent); }

.solving { --curve: var(--solve-accent); --mid: var(--solve-accent); --gold: var(--solve-accent); }

.solve-added { display: none; }
.solving .solve-added { display: inline; }

/* Construction owns its clock; the exercise's generic entrance must not fade it. */
section.ex.solving ol.steps > li, section.ex.solving .ex-pics, section.ex.solving .ex-record { animation: none !important; opacity: 1; transform: none; }
section.ex.solving.ex-mounted { display: block; }
.solving .steps .r { background: none; padding-inline: 0; border: 0; }
.solving .solve-current { outline: none !important; }

.solve-arrow { stroke: var(--solve-accent); stroke-width: 2; fill: none; }
.solving .solve-figure svg text { fill: currentColor; }
.solving .solve-figure svg .ax { stroke: currentColor; }
.solving .solve-figure svg .grid { stroke: currentColor; stroke-opacity: .25; }
.solve-panel { scroll-margin-top: 80px; }

section.ex.solving, .solving .ex-title { font-family: var(--ui); }
.solving .ex-head { font-size: 15px; }
.solving .ex-where, .solving .asks b { color: inherit; }
.solving .solve-figure figcaption { font: 15px/1.5 var(--ui); color: inherit; }

.solving .solve-figure svg { color: inherit; }
.solving .solve-figure svg text { font-size: 15px; color: inherit; fill: currentColor; }
.solving .solve-figure svg .tk { color: inherit; fill: currentColor; }
.solving .solve-figure .note-words [data-drawn="0"] { display: none; }
.solving .solve-sketch { min-width: 340px; }

/* Keep the authored heading's accessible name, with its action beside it. */
.ex-title.solve-title { display: inline; }
section.ex.solving .solve-figure figure.fig figcaption:not(.waits) { font: 15px/1.5 var(--ui); color: inherit; }
section.ex.solving .asks b { color: inherit; }
section.ex.solving .tp-marks, .blk:has(section.ex.solving) > .tp-marks { display: none; }
section.ex.solving ol.steps > li .r { font: 18px/1.6 var(--ui); color: inherit; background: none; border: 0; padding-inline: 0; }
figure.fig:has([data-construct-step][data-drawn]) { --curve: var(--accent); --mid: var(--accent); --gold: var(--accent); overflow: auto; }
figure.fig:has([data-construct-step][data-drawn]) svg { color: var(--ink); }
figure.fig:has([data-construct-step][data-drawn]) svg text { font-size: 15px; fill: currentColor; color: inherit; }
.solving .solve-sketch { min-width: 400px; }
