/* Calculation workbooks, using the existing watercolor village and paper palette. */
.skill-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.skill-card { min-height: 185px; padding: 23px 22px; }
.skill-card h3 { font-size: 1.4rem; margin-bottom: 12px; flex: 0; }
.skill-card .card-top { margin-bottom: 19px; }
.skill-card .card-bottom { font-size: .8rem; line-height: 1.6; }
.skill-symbol { font-family: var(--serif); font-size: 1.08rem; color: #865b32; height: 24px; }
.exam-card { background-color: #e9e8d4; border-color: #b2b48d; box-shadow: 3px 4px 0 #d8dcc1; }
.exam-card .card-top, .exam-card .card-chevron { color: #59613a; }
.exam-card:hover { border-color: #6d7748; box-shadow: 3px 6px 0 #d5d9ba; }
.question-context { line-height: 1.8; color: #675640; white-space: pre-line; font-size: .97rem; }
.question-prompt { font-weight: 600; font-size: 1.04rem; line-height: 1.75; }
.question-title { overflow-wrap: anywhere; }
.question-title:focus, #skills-title:focus, .hint-panel [tabindex]:focus { outline: none; }
.question-title.keyboard-focus:focus, #skills-title.keyboard-focus:focus { outline: 3px solid #8d3d28; outline-offset: 4px; }
.guided-work { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 22px 0 26px; padding: 13px 0; }
.guided-work > .text-button { color: #69543a; font-size: .84rem; }
.guided-step { padding: 18px 0 4px; }
.guided-step + .guided-step { border-top: 1px dashed var(--line); margin-top: 14px; }
.guided-step label { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; line-height: 1.65; margin-bottom: 12px; }
.step-number { border: 1px solid #c8b693; color: #775a36; border-radius: 50%; font-size: .72rem; width: 24px; height: 24px; flex: none; display: grid; place-items: center; }
.step-entry { display: flex; gap: 10px; align-items: center; }
.step-entry input { min-width: 0; width: 100%; flex: 1; padding: 10px 14px; height: 44px; border: 1px solid #9f7d52; border-radius: 4px; color: var(--ink); background: #fffdf7; font-variant-numeric: tabular-nums; }
.step-entry input:disabled { color: #6a573d; background: #f4ebd9; }
.step-entry .button { flex: none; }
.step-feedback { color: #94412c; font-size: .8rem; margin: 7px 0 0; }
.step-feedback:empty { display: none; }
.step-feedback.good { color: #4e6032; }
.worked-solution > strong { font-size: .8rem; display: block; margin-bottom: 14px; color: #665139; }
.worked-solution li + li { margin-top: 16px; }
.formula, .calculation { display: block; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.formula { font-family: var(--serif); font-size: 1rem; margin-top: 4px; }
.calculation { color: #6b5943; font-size: .87rem; }
.reveal-row { display: flex; }
.practice-wrap .source-note { display: block; }
@media (max-width: 1100px) {
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-card { min-height: 165px; }
}
@media (max-width: 560px) {
  .skill-grid { grid-template-columns: 1fr; gap: 14px; }
  .skill-card { min-height: 0; padding: 19px 23px; }
  .skill-card .card-top { margin-bottom: 11px; }
  .skill-card h3 { font-size: 1.4rem; margin-bottom: 9px; }
  .question-context { font-size: .9rem; }
  .question-prompt { font-size: .98rem; }
  .session-heading { flex-wrap: wrap; align-items: flex-start; gap: 0 14px; }
  .session-heading h1 { margin-bottom: 12px; }
  .question-count { margin: 0 0 19px; }
  .step-entry { flex-wrap: wrap; }
  .step-entry input { flex-basis: 100%; }
  .step-entry .button { min-height: 40px; }
  .guided-step label { font-size: .83rem; }
  .guided-work > .text-button { min-height: 40px; }
  .reveal-row { flex-wrap: wrap; }
  .source-note { overflow-wrap: anywhere; }
  .input-help { line-height: 1.7; }
}
.intermediate-answers { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 22px 0 26px; padding: 13px 0; font-size: .82rem; line-height: 1.7; color: #66543a; }
.intermediate-answers summary { cursor: pointer; padding: 5px 0; }
.intermediate-answers li + li { margin-top: 10px; }

/* Typeset mathematics stays on the same paper surfaces as the question. */
.question-card, .result-card, .worked-solution, .guided-step { min-width: 0; }
.math-block { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 7px 2px 10px; overscroll-behavior-x: contain; }
.math-block:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.math-block .katex { font-size: 1.08em; }
.math-inline .katex { font-size: 1.05em; }
.math-inline { white-space: normal; }
.math-line { padding: 3px 0; }
.formula { color: var(--ink); font-family: inherit; margin-top: 7px; }
.calculation { color: #675640; font-size: .95rem; }
.worked-solution { padding: 23px 25px; }
.worked-solution h3 { font: 600 .88rem var(--sans, Arial, sans-serif); letter-spacing: 0; margin: 0 0 20px; color: #665139; }
.worked-solution ol { line-height: 1.65; }
.worked-solution li + li { margin-top: 24px; }
.solution-step-title { display: block; font-size: .88rem; }
.final-calculation { border-top: 1px solid var(--line); padding-top: 23px; }
.final-calculation:first-child { border-top: 0; padding-top: 0; }
.final-calculation .solution-step-title { font-weight: 600; color: var(--ink); }
.rounding-note { font-size: .83rem; margin: 12px 0 0; color: var(--muted); }
.rounding-note strong { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.answer-comparison { display: flex; flex-wrap: wrap; gap: 18px 34px; padding: 0 0 24px; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.answer-comparison > div { min-width: 0; flex: 1 1 120px; }
.answer-comparison .correct-answer { display: block; min-width: max-content; margin: 0; padding: 0; text-align: left; }
.answer-comparison > div > span { display: block; font-size: .76rem; line-height: 1.5; color: var(--muted); margin-bottom: 5px; }
.answer-comparison > div > strong { display: block; font-family: var(--serif); font-size: 1.9rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.submitted-answer strong { color: #66543e; }
.answer-comparison .correct-answer strong { color: #6f4a2d; }
.correct .answer-comparison .correct-answer strong { color: #555c34; }
@media (max-width: 560px) {
  .worked-solution { padding: 20px 17px; }
  .worked-solution ol { padding-left: 18px; }
  .worked-solution li { padding-left: 0; }
  .solution-step-title { font-size: .84rem; }
  .calculation { font-size: .88rem; }
  .formula { font-size: .94rem; }
  .answer-comparison { gap: 16px; }
  .answer-comparison > div { flex-basis: 95px; }
  .answer-comparison > div > strong { font-size: 1.65rem; }
}
