.course-interactive {
  margin: 34px 0;
  color: var(--pb-ink, #171b18);
}
.course-interactive[aria-busy="true"] { opacity: .78; }
.course-interactive-fallback { display: block; width: 100%; height: auto; border: 1px solid var(--pb-line, #d9ddd8); border-radius: 14px; background: var(--pb-paper, #fffef9); }
.course-interactive-error { margin: 10px 0 0; color: #8a4b08; font-size: .76rem; }
.cs-interactive-panel { overflow: hidden; border: 1px solid var(--pb-line, #d9ddd8); border-radius: 16px; background: var(--pb-paper, #fffef9); box-shadow: 0 16px 42px rgba(31,39,32,.07); }
.cs-interactive-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; padding: 22px 24px 18px; border-bottom: 1px solid var(--pb-line, #d9ddd8); }
.cs-interactive-kicker { margin: 0 0 7px !important; color: var(--pb-accent, #166534) !important; font-family: "SFMono-Regular", Consolas, monospace; font-size: .62rem; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.cs-interactive-title { margin: 0 !important; color: var(--pb-ink, #171b18) !important; font-size: 1.3rem !important; letter-spacing: -.025em !important; }
.cs-interactive-description { max-width: 640px; margin: 9px 0 0 !important; color: var(--pb-muted, #626a63) !important; font-size: .8rem; line-height: 1.65; }
.cs-interactive-badge { padding: 5px 9px; border: 1px solid var(--pb-line, #d9ddd8); border-radius: 999px; color: var(--pb-quiet, #899089); font-family: "SFMono-Regular", Consolas, monospace; font-size: .58rem; letter-spacing: .06em; text-transform: uppercase; }
.cs-interactive-body { padding: 20px 24px 22px; }
.cs-interactive-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.cs-interactive-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--pb-line, #d9ddd8); border-radius: 10px; background: #f7f7f2; }
.cs-interactive-control label { color: var(--pb-muted, #626a63); font-size: .7rem; font-weight: 680; }
.cs-interactive-control output { color: var(--pb-accent, #166534); font-family: "SFMono-Regular", Consolas, monospace; font-size: .7rem; }
.cs-interactive-control input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--pb-accent, #166534); }
.cs-interactive-plot { overflow: hidden; border: 1px solid var(--pb-line, #d9ddd8); border-radius: 12px; background: #fcfcf8; }
.cs-interactive-plot svg { display: block; width: 100%; height: auto; min-height: 280px; }
.cs-interactive-grid { stroke: #e2e5df; stroke-width: 1; }
.cs-interactive-axis { stroke: #929b93; stroke-width: 1.25; }
.cs-interactive-tick { fill: #707870; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.cs-interactive-axis-label { fill: #4d564e; font-size: 12px; font-weight: 680; }
.cs-interactive-series { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cs-interactive-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 12px; color: var(--pb-muted, #626a63); font-size: .7rem; }
.cs-interactive-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cs-interactive-swatch { width: 20px; height: 3px; border-radius: 999px; }
.cs-interactive-caption { margin: 14px 0 0 !important; color: var(--pb-muted, #626a63) !important; font-size: .72rem; line-height: 1.6; }
.cs-interactive-source { margin: 5px 0 0 !important; font-size: .68rem; }
.cs-interactive-source a { color: var(--pb-accent, #166534); }
.cs-matrix-frame { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; color: var(--pb-muted, #626a63); font-size: .72rem; }
.cs-matrix-frame strong { color: var(--pb-ink, #171b18); }
.cs-matrix-legend { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; color: var(--pb-quiet, #899089); font-size: .64rem; }
.cs-matrix-gradient { width: 128px; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #eef1ed, var(--pb-accent, #166534)); }
.cs-stepper-stage { min-height: 250px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .62fr); gap: 24px; align-items: center; padding: 22px; border: 1px solid var(--pb-line, #d9ddd8); border-radius: 12px; background: #fcfcf8; }
.cs-stepper-index { margin: 0 0 7px !important; color: var(--pb-accent, #166534) !important; font-family: "SFMono-Regular", Consolas, monospace; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
.cs-stepper-stage h4 { margin: 0 !important; color: var(--pb-ink, #171b18) !important; font-size: 1.28rem !important; }
.cs-stepper-text { margin: 12px 0 0 !important; color: var(--pb-muted, #626a63) !important; font-size: .86rem; line-height: 1.72; white-space: pre-line; }
.cs-stepper-formula { overflow-x: auto; margin-top: 16px; padding: 14px; border-radius: 9px; background: #f0f2ed; text-align: center; }
.cs-stepper-visual img { display: block; width: 100%; height: auto; max-height: 280px; object-fit: contain; }
.cs-stepper-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.cs-stepper-controls button { min-height: 36px; padding: 0 14px; border: 1px solid var(--pb-line, #d9ddd8); border-radius: 999px; background: var(--pb-paper, #fffef9); color: var(--pb-ink, #171b18); cursor: pointer; font-size: .72rem; }
.cs-stepper-controls button:hover, .cs-stepper-controls button:focus-visible { border-color: var(--pb-accent, #166534); color: var(--pb-accent, #166534); }
.cs-stepper-controls button:disabled { cursor: default; opacity: .4; }
.cs-stepper-progress { color: var(--pb-muted, #626a63); font-family: "SFMono-Regular", Consolas, monospace; font-size: .66rem; }
.cs-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }
@media (max-width: 720px) {
  .cs-interactive-header { grid-template-columns: 1fr; padding: 18px 16px 15px; }
  .cs-interactive-badge { justify-self: start; }
  .cs-interactive-body { padding: 16px; }
  .cs-interactive-plot svg { min-height: 230px; }
  .cs-stepper-stage { min-height: 0; grid-template-columns: 1fr; padding: 17px; }
  .cs-stepper-visual { order: -1; }
}
@media print {
  .cs-interactive-controls, .cs-stepper-controls { display: none !important; }
  .cs-interactive-panel { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .course-interactive * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
