.worked-shell { max-width: 1100px; }
.worked-header { margin-bottom: 27px; }
.worked-back { margin: 0 0 24px; font-size: .88rem; }
.worked-header h1 { max-width: 850px; }
.worked-lead { max-width: 72ch; color: #cbdbe2; font-size: 1.03rem; line-height: 1.6; margin: 17px 0 0; text-align: justify; hyphens: auto; }
.worked-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; min-width: 0; }
.worked-main section { border-top: 1px solid var(--line); padding-top: 25px; min-width: 0; }
.worked-main h2 { margin: 0 0 14px; font-size: 1.35rem; }
.worked-main h3 { margin: 24px 0 7px; font-size: 1.07rem; }
.worked-main p { max-width: 90ch; color: #d6e2e8; font-size: .98rem; line-height: 1.65; margin: 0 0 13px; text-align: justify; hyphens: auto; }
.exam-parts { max-width: 85ch; color: #d6e2e8; font-size: .98rem; line-height: 1.65; padding-left: 25px; margin: 8px 0 0; }
.exam-parts li { padding-left: 5px; margin-bottom: 3px; }
.worked-main var { font-family: Georgia, Cambria, serif; font-style: italic; }
.worked-figure { width: 100%; max-width: 850px; min-width: 0; margin: 22px 0 25px; }
.worked-figure svg { display: block; width: 100%; height: auto; border: 1px solid #315067; border-radius: 15px; background: #0c1c2b; }
.worked-figure figcaption { color: var(--muted); font-size: .86rem; line-height: 1.5; margin: 9px 3px 0; }
.circuit-wires, .resistor { fill: none; stroke: #e5f1f1; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.source-circle, .source-wave { fill: none; stroke: var(--teal); stroke-width: 3.8; stroke-linecap: round; stroke-linejoin: round; }
.source-sign { fill: var(--teal); font-size: 25px; font-weight: 700; }
.battery-short, .battery-long { stroke: var(--amber); stroke-linecap: round; }
.battery-short { stroke-width: 5; }
.battery-long { stroke-width: 7; }
.diode-body { fill: var(--violet); }
.diode-bar { stroke: var(--violet); stroke-width: 6; stroke-linecap: round; }
.component-label, .ground-label { fill: #e6eeee; font-size: 23px; font-weight: 650; }
.node-label, .probe-label { fill: var(--amber); font-size: 23px; font-weight: 750; }
.circuit-node { fill: var(--amber); }
.output-terminal { fill: #0c1c2b; stroke: var(--amber); stroke-width: 3; }
.probe-leader { fill: none; stroke: var(--amber); stroke-width: 3; }
.current-arrow, .current-arrowhead { fill: none; stroke: var(--green); stroke-width: 3; }
.current-label { fill: var(--green); font-size: 20px; font-weight: 750; }
.kvl-loop { fill: none; stroke: var(--green); stroke-width: 3; stroke-dasharray: 9 7; }
.kvl-label { fill: var(--green); font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.equation { max-width: 900px; overflow-x: auto; padding: 16px 19px; border-left: 4px solid var(--teal); background: #11283b; color: #ebf5f4; font-family: Georgia, Cambria, serif; font-size: 1.14rem; line-height: 1.6; white-space: nowrap; }
.result-equation { border-left-color: var(--amber); }
.result-equation { display: flex; align-items: center; gap: 11px; }
.piecewise-brace { font-size: 3rem; line-height: 1; font-weight: 300; }
.piecewise-rows { display: grid; gap: 3px; font-size: 1.02rem; line-height: 1.45; }
.answer-table-wrap { width: 100%; max-width: 850px; overflow-x: auto; }
.answer-table { width: 100%; border-collapse: collapse; color: #e4eff0; font-size: .98rem; }
.answer-table caption { caption-side: top; text-align: left; color: #d4e3e6; font-weight: 700; margin: 0 0 9px; }
.answer-table th, .answer-table td { padding: 11px 13px; border: 1px solid #315067; text-align: left; vertical-align: top; }
.answer-table thead th { background: #18344b; }
.answer-table tbody th { width: 76px; color: var(--teal); background: #102638; }
.answer-table tbody tr:nth-child(even) td { background: #11283a; }
.graph-grid { fill: none; stroke: #2f4960; stroke-width: 1; }
.graph-axis { fill: none; stroke: #bdd0d7; stroke-width: 2.5; }
.graph-threshold { fill: none; stroke: var(--violet); stroke-width: 2; stroke-dasharray: 7 7; }
.graph-input { fill: none; stroke: var(--teal); stroke-width: 4; stroke-linejoin: round; }
.graph-output { fill: none; stroke: var(--amber); stroke-width: 5; stroke-linejoin: round; }
.graph-label, .graph-extrema { fill: #dce9eb; font-size: 18px; font-family: Georgia, Cambria, serif; }
.graph-t { fill: var(--violet); }
.graph-line-label { font-family: Georgia, Cambria, serif; font-size: 23px; font-style: italic; font-weight: 700; }
.input-label { fill: var(--teal); }
.output-label { fill: var(--amber); }
.graph-extrema { fill: var(--amber); font-size: 16px; }
.worked-footer { border-top: 1px solid var(--line); margin-top: 36px; }
@media (max-width: 650px) {
  .worked-figure { overflow-x: auto; }
  .worked-figure svg { min-width: 0; }
  .equation { font-size: 1rem; }
  .piecewise-rows { font-size: .92rem; }
}
