/* Python examples retain the site's font and warm paper surface. */
.python-example { padding: 38px 0 48px; border-top: 1px solid var(--line, #d8d1c3); }
.python-example-heading { margin-bottom: 24px; }
.python-example-heading h2 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 33px); font-weight: 600; }
.python-example-heading p { margin: 0; color: var(--sub, #756f62); line-height: 1.8; }
.python-parameters { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 15px; color: var(--sub, #756f62); font-size: 14px; }
.python-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.python-editor, .python-output { min-width: 0; margin: 0; border: 1px solid var(--line, #d8d1c3); background: #fcf9f2; }
.python-panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 58px; padding: 14px 18px; border-bottom: 1px solid var(--line, #d8d1c3); font-size: 16px; line-height: 1.6; }
.python-panel-head > span { min-width: 0; overflow-wrap: anywhere; }
.python-code-mark { color: #bc5837; font-family: var(--mono, monospace); }
.python-file-type { margin-left: auto; color: var(--sub, #756f62); font-size: 12px; }
.python-code { padding: 22px 16px; overflow-x: auto; overscroll-behavior-x: contain; font-family: var(--mono, ui-monospace, monospace); font-size: 14px; line-height: 1.8; }
.python-code-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.python-code-row code { display: block; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; color: #355c51; }
.python-line-number { color: #928979; user-select: none; font-size: 12px; text-align: right; padding-top: 2px; }
.python-code-gap code { color: #928979; }
.python-panel-foot { padding: 13px 18px; border-top: 1px solid var(--line, #d8d1c3); color: var(--sub, #756f62); font-size: 13px; line-height: 1.7; }
.python-chart-controls { display: flex; flex-wrap: wrap; gap: 7px; padding: 15px 18px 0; }
.python-chart-controls[hidden] { display: none; }
.python-chart-controls button { min-height: 44px; padding: 8px 13px; border: 1px solid var(--line, #d8d1c3); border-radius: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.python-chart-controls button[aria-pressed="true"] { background: #eee3d7; border-color: #bc5837; color: #8e3d24; }
.python-chart-controls button:focus-visible, .python-chart-scroll:focus-visible, .python-code:focus-visible { outline: 2px solid #bc5837; outline-offset: 3px; }
.python-chart-scroll { overflow-x: auto; padding: 17px 12px 0; overscroll-behavior-x: contain; }
.python-chart { display: block; width: 100%; min-width: 440px; height: auto; }
.python-output[data-yield-mode="tan"] .python-yield-series[data-series="sag"],
.python-output[data-yield-mode="sag"] .python-yield-series[data-series="tan"] { display: none; }
.python-legend-note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 18px 18px; color: var(--sub, #756f62); font-size: 13px; line-height: 1.7; }
.python-range-key { width: 14px; height: 10px; margin-left: 9px; background: var(--series-color); }
.python-range-key:first-child { margin-left: 0; }
.python-result-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px; }
.python-result-highlights > span { display: grid; gap: 7px; min-width: 0; color: var(--sub, #756f62); font-size: 13px; line-height: 1.7; }
.python-result-highlights strong { font-size: 31px; font-weight: 500; color: var(--ink, #16130e); }
.python-result-table { margin: 18px; border-top: 1px solid var(--line, #d8d1c3); border-left: 1px solid var(--line, #d8d1c3); font-size: 14px; }
.python-result-row { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); }
.python-result-row > span { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 9px 8px; border-right: 1px solid var(--line, #d8d1c3); border-bottom: 1px solid var(--line, #d8d1c3); overflow-wrap: anywhere; line-height: 1.6; }
.python-result-row > span i { width: 13px; height: 2px; flex: none; background: var(--series-color); }
.python-result-head { color: var(--sub, #756f62); background: #f3ece1; }
.python-dof-table .python-result-row { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); }
.python-result-note { margin: 14px 18px 20px; font-size: 13px; line-height: 1.8; color: var(--sub, #756f62); }
@media (max-width: 900px) { .python-workspace { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
@media (max-width: 500px) {
  .python-example { padding: 28px 0 34px; }
  .python-example-heading p { font-size: 15px; }
  .python-code { padding: 17px 10px; font-size: 13px; }
  .python-code-row { grid-template-columns: 24px minmax(0, 1fr); column-gap: 9px; }
  .python-result-table { margin: 14px 12px; font-size: 13px; }
  .python-result-row > span { padding: 8px 6px; }
}
