/* PyCharm Darcula-like IDE for python-online page */

body.python-online-page {
    --ide-bg: #2B2B2B;
    --ide-toolbar: #3C3F41;
    --ide-border: #323232;
    --ide-text: #E2E8F0;
    --ide-text-bright: #E2E8F0;
    --ide-text-primary: #F1F5F9;
    --ide-muted: #94A3B8;
    --ide-surface: #313335;
    --ide-page-bg: #1E1F22;
    --ide-accent-run: #6EEB83;
    --ide-accent-stop: #FF6B6B;
    --ide-accent-link: #7CB9FF;
    --ide-radius: 8px;
    font-family: "JetBrains Mono", "Segoe UI", system-ui, sans-serif;
    background-color: var(--ide-page-bg);
    color: var(--ide-text-bright);
}

body.python-online-page .wrapper {
    background: transparent;
}

body.python-online-page .breadcrumb,
body.python-online-page .breadcrumb-item,
body.python-online-page .breadcrumb-item a {
    color: var(--ide-muted);
}

body.python-online-page .breadcrumb-item.active {
    color: var(--ide-text-bright);
}

body.python-online-page .breadcrumb-item a:hover {
    color: var(--ide-accent-link);
}

.po-wrap {
    max-width: 1680px;
    margin: 0 auto;
    padding: clamp(0.75rem, 2vw, 1.25rem) clamp(1rem, 2.5vw, 2rem) clamp(2rem, 4vw, 2.5rem);
}

.po-page-layout {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 992px) {
    .po-page-layout {
        grid-template-columns: minmax(0, 0.94fr) minmax(400px, 1.06fr);
        align-items: start;
    }

    .po-workspace-col {
        position: sticky;
        top: 1rem;
    }

    .po-ide-shell {
        --po-ide-height: clamp(540px, 80vh, 920px);
        margin-bottom: 1rem;
    }

    .po-task-col {
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

.po-task-stack {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

#taskSection.po-task-stack {
    margin: 0;
}

body.python-online-page .alert-info.po-test-alert {
    border: 1px solid #4B6EAF;
    background: #2D3F5F;
    color: #E2E8F0;
    border-radius: var(--ide-radius);
}

body.python-online-page .alert-info.po-test-alert .text-muted {
    color: #94A3B8 !important;
}

/* IDE shell */
.po-ide-shell {
    --po-ide-height: clamp(480px, 72vh, 720px);
    background: var(--ide-bg);
    border: 1px solid var(--ide-border);
    border-radius: var(--ide-radius);
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.po-ide-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.65rem;
    background: var(--ide-toolbar);
    border-bottom: 1px solid var(--ide-border);
}

.po-ide-toolbar .po-tb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 0.3rem 0.65rem;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: "Segoe UI", system-ui, sans-serif;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.po-ide-toolbar .po-tb-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#poRunBtn {
    background: transparent;
    border-color: var(--ide-accent-run);
    color: var(--ide-accent-run);
}

#poRunBtn:hover:not(:disabled) {
    background: rgba(110, 235, 131, 0.15);
}

#poStopBtn {
    background: transparent;
    border-color: var(--ide-accent-stop);
    color: var(--ide-accent-stop);
}

#poStopBtn:hover:not(:disabled) {
    background: rgba(255, 107, 107, 0.15);
}

#poClearBtn {
    background: transparent;
    border-color: #666;
    color: #E2E8F0;
}

#poClearBtn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    border-color: #555;
}

#poPyStatus {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 500;
    color: #CBD5E1;
    font-family: "Segoe UI", system-ui, sans-serif;
}

#poPyStatus[data-tone="loading"],
#poPyStatus[data-tone="running"] {
    color: #FFC66D;
}

#poPyStatus[data-tone="ready"] {
    color: var(--ide-accent-run);
}

#poPyStatus[data-tone="error"] {
    color: var(--ide-accent-stop);
}

/* Resizable split */
.po-ide-split {
    display: flex;
    flex-direction: column;
    height: var(--po-ide-height);
    min-height: 420px;
}

.po-ide-editor-pane {
    flex: 1 1 72%;
    min-height: 160px;
    overflow: hidden;
    background: var(--ide-bg);
}

#poEditor {
    width: 100%;
    height: 100%;
    min-height: 160px;
    font-size: 14px;
}

body.python-online-page .ace_editor,
body.python-online-page .ace_scroller,
body.python-online-page #poEditor {
    background: #282a36 !important;
}

body.python-online-page .ace_gutter {
    background: #21222c !important;
}

body.python-online-page .ace_autocomplete {
    background: #3C3F41;
    color: #E6E6E6;
    border: 1px solid #555;
}

body.python-online-page .ace_autocomplete .ace_line {
    color: #E6E6E6;
}

body.python-online-page .ace_autocomplete .ace_line.ace_selected {
    background: #4B6EAF;
    color: #F1F5F9;
}

.po-ide-splitter {
    flex: 0 0 6px;
    background: var(--ide-toolbar);
    border-top: 1px solid var(--ide-border);
    border-bottom: 1px solid var(--ide-border);
    cursor: row-resize;
    touch-action: none;
}

.po-ide-splitter:hover,
body.po-ide-dragging .po-ide-splitter {
    background: #4B6EAF;
}

.po-ide-console-pane {
    flex: 1 1 28%;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    background: #1E1F22;
    overflow: hidden;
}

.po-ide-console-pane.po-console-pane--idle {
    flex: 0 1 28%;
    max-height: 140px;
}

.po-ide-height-handle {
    flex: 0 0 6px;
    background: var(--ide-toolbar);
    border-top: 1px solid var(--ide-border);
    cursor: row-resize;
    touch-action: none;
}

.po-ide-height-handle:hover,
body.po-ide-dragging .po-ide-height-handle {
    background: #4B6EAF;
}

.po-console-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ide-text);
    background: var(--ide-toolbar);
    border-bottom: 1px solid var(--ide-border);
    font-family: "Segoe UI", system-ui, sans-serif;
}

.po-console-tab {
    padding: 0.2rem 0.5rem;
    background: var(--ide-bg);
    border: 1px solid var(--ide-border);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    color: var(--ide-text-bright);
}

#poOutput {
    flex: 1;
    overflow: auto;
    padding: 0.6rem 0.75rem;
    font-family: "JetBrains Mono", Menlo, Monaco, monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--ide-text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.po-console-line {
    margin: 0;
}

.po-console-error {
    color: #FF9E80;
}

.po-console-input-echo {
    color: #A5D6A7;
}

#poStdinRow {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    background: var(--ide-toolbar);
    border-top: 1px solid var(--ide-border);
}

#poStdinInput {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--ide-border);
    border-radius: 4px;
    background: var(--ide-bg);
    color: var(--ide-text-bright);
    font-family: "JetBrains Mono", Menlo, monospace;
    font-size: 0.8125rem;
    padding: 0.35rem 0.55rem;
}

#poStdinInput:focus {
    outline: none;
    border-color: #4B6EAF;
    box-shadow: 0 0 0 1px rgba(75, 110, 175, 0.4);
}

#poStdinSubmit {
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8125rem;
    white-space: nowrap;
    background: var(--ide-accent-run);
    border: none;
    color: #fff;
    padding: 0.35rem 0.75rem;
}

/* Actions + task section */
.po-actions {
    margin-bottom: 0;
}

.po-actions-random {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.75rem;
}

.po-random-btn,
#randomTaskBtn {
    border-radius: 6px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--ide-accent-run);
    background: transparent;
    color: var(--ide-accent-run);
    font-family: "Segoe UI", system-ui, sans-serif;
    transition: background 0.15s ease;
}

.po-random-btn:hover:not(:disabled),
#randomTaskBtn:hover:not(:disabled) {
    background: rgba(110, 235, 131, 0.15);
}

.po-random-btn:disabled,
#randomTaskBtn:disabled {
    opacity: 0.6;
}

.po-kompege-attribution {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.85rem;
}

.po-kompege-attribution a {
    color: var(--ide-accent-run);
    text-decoration: none;
}

.po-kompege-attribution a:hover {
    text-decoration: underline;
}

.po-task-meta {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.po-card--task-light {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.po-card--task-light .po-card-head.task-head {
    background: #f1f5f9;
    border-bottom-color: #e2e8f0;
    color: #334155;
}

.po-card--task-light #taskFipiId.badge {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border-color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.po-card--task-light .po-card-body {
    background: #ffffff;
}

.po-card--task-light .task-content a {
    color: #2563eb;
}

.po-card--task-light .po-kompege-attribution a {
    color: #15803d;
}

.po-card--task-light .po-ege-answer {
    border-top-color: #e2e8f0;
}

.po-card--task-light .po-ege-answer-head {
    color: #64748b;
}

.po-card--task-light .po-ege-check-btn {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}

.po-card--task-light .po-ege-check-btn:hover:not(:disabled) {
    background: #15803d;
    border-color: #15803d;
    color: #ffffff;
}

.po-card--task-light .po-ege-answer-result.alert-success {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.po-card--task-light .po-ege-answer-result.alert-danger {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.po-ege-answer {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--ide-border);
}

.po-ege-answer-head {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ide-muted);
    margin-bottom: 0.65rem;
}

.po-ege-answer-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.po-ege-answer-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.po-ege-answer-fields--single {
    align-items: flex-start;
}

.po-ege-answer-row--single {
    width: auto;
}

.po-ege-answer-fields--multi {
    gap: 0.85rem;
}

.po-ege-answer-part {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.po-ege-answer-part-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.po-ege-answer-part-fields {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.po-ege-answer-paste-hint {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #64748b;
}

.po-card--task-light .po-ege-answer-paste-hint {
    color: #64748b;
}

.po-ege-answer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.po-ege-clear-btn {
    background: #ffffff;
    border: 1px solid #f89187;
    color: #f89187;
}

.po-ege-clear-btn:hover:not(:disabled) {
    background: #fff5f4;
    border-color: #ef4444;
    color: #ef4444;
}

.po-ege-table-wrap {
    width: 100%;
    max-width: 100%;
}

.po-ege-table-input {
    background: #ffffff;
    padding: 0.5rem 0.5rem 0.75rem;
}

.po-ege-table-instruction {
    background: #1e325a;
    color: #ffffff;
    font-size: 0.75rem;
    line-height: 1.35;
    text-align: center;
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.5rem;
}

.po-ege-table-border {
    border: 2px solid #1e325a;
    padding: 0.5rem;
    overflow-x: auto;
}

.po-ege-answer-table {
    width: auto;
    border-collapse: collapse;
    margin: 0 auto;
}

.po-ege-table-label {
    background: #e7edf9;
    border: 1px solid #808080;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    min-width: 2.25rem;
    height: 2rem;
    padding: 0;
}

.po-ege-table-label--row {
    min-width: 2.25rem;
}

.po-ege-table-label--part {
    min-width: 2.75rem;
    font-weight: 700;
}

.po-ege-table-empty-col {
    border: 1px solid #808080;
    background: #f1f5f9;
    min-width: 5.5rem;
}

.po-ege-table-input-col {
    border: 1px solid #808080;
    padding: 0;
    vertical-align: middle;
    background: #ffffff;
}

.po-ege-table-input-col--span {
    text-align: center;
}

body.python-online-page .po-ege-table-input-col--span .po-ege-answer-input--table {
    width: 5.5rem;
    margin: 0 auto;
}

body.python-online-page .po-ege-answer-input--table {
    display: block;
    width: 5.5rem;
    min-width: 4.5rem;
    max-width: none;
    height: 1.85rem;
    padding: 0.1rem 0.25rem;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.35;
}

body.python-online-page .po-ege-answer-input--table:focus {
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
    background: #ffffff;
}

.po-ege-answer-fields--multi .po-ege-table-wrap + .po-ege-table-wrap {
    margin-top: 0.75rem;
}

.po-ege-table-wrap--multi {
    max-width: 100%;
}

.po-ege-answer-table--multi .po-ege-table-part-row + .po-ege-table-part-row .po-ege-table-label--part {
    border-top-width: 1px;
}

body.python-online-page .po-ege-answer-input {
    flex: 0 1 auto;
    min-width: 5rem;
    max-width: 10rem;
    padding: 0.45rem 0.65rem;
    background: #f3f4f6;
    border: 1px solid #cbd5e1;
    color: #111827;
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.35;
}

body.python-online-page .po-ege-answer-input--single {
    flex: 0 0 auto;
    width: 9rem;
    max-width: 100%;
}

body.python-online-page .po-ege-answer-input::placeholder {
    color: #6b7280;
}

body.python-online-page .po-ege-answer-input:focus {
    background: #ffffff;
    border-color: #60a5fa;
    color: #111827;
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(96, 165, 250, 0.35);
}

.po-ege-check-btn {
    background: rgba(110, 235, 131, 0.12);
    border: 1px solid rgba(110, 235, 131, 0.45);
    color: var(--ide-accent-run);
    font-weight: 600;
}

.po-ege-check-btn:hover:not(:disabled) {
    background: rgba(110, 235, 131, 0.2);
    border-color: var(--ide-accent-run);
    color: var(--ide-accent-run);
}

.po-ege-check-btn:disabled {
    opacity: 0.6;
}

.po-ege-answer-result.alert-success {
    background: rgba(110, 235, 131, 0.12);
    border-color: rgba(110, 235, 131, 0.45);
    color: var(--ide-accent-run);
}

.po-ege-answer-result.alert-danger {
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.45);
    color: #ffb4b4;
}

.task-content .katex {
    color: #c8ccd4;
}

@media (max-width: 576px) {
    .po-actions-random {
        flex-direction: column;
        align-items: stretch;
    }

    .po-random-btn {
        width: 100%;
    }
}


.po-panel {
    min-width: 0;
}

.po-card {
    height: auto;
    background: var(--ide-bg);
    border: 1px solid var(--ide-border);
    border-radius: var(--ide-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.po-card-head {
    padding: 0.65rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ide-muted);
    border-bottom: 1px solid var(--ide-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: var(--ide-toolbar);
    font-family: "Segoe UI", system-ui, sans-serif;
}

.po-card-head.task-head {
    color: var(--ide-text-bright);
}

.po-card-head .bi {
    font-size: 1rem;
    opacity: 0.85;
}

#taskFipiId.badge {
    font-weight: 600;
    font-size: 0.7rem;
    padding: 0.3em 0.6em;
    border-radius: 4px;
    background: rgba(75, 110, 175, 0.25) !important;
    color: var(--ide-accent-link) !important;
    border: 1px solid rgba(75, 110, 175, 0.4);
}

.po-card-body {
    padding: 1rem 1.1rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.task-content {
    font-size: 0.9375rem;
    line-height: 1.65;
    padding: 0.85rem 1rem;
    background: var(--ide-surface);
    border-radius: 4px;
    border: 1px solid var(--ide-border);
    border-left: 3px solid #4B6EAF;
    color: var(--ide-text-primary);
    font-family: "Segoe UI", system-ui, sans-serif;
}

.task-content,
.task-content * {
    background-color: transparent !important;
}

.task-content pre,
.task-content code,
.task-content table {
    background: var(--ide-surface) !important;
    color: var(--ide-text-primary) !important;
}

.task-content table {
    width: auto;
    max-width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    border: 1px solid #5A5A5A;
}

.task-content table span {
    font-size: inherit !important;
}

.task-content p {
    margin-bottom: 0.75rem;
    color: var(--ide-text-primary);
}

.task-content strong {
    font-weight: 600;
    color: #FFC66D;
}

.task-content a {
    color: var(--ide-accent-link);
}

.task-content table,
.task-content th,
.task-content td {
    border: 1px solid #5A5A5A !important;
    color: var(--ide-text-primary) !important;
    background: transparent !important;
    padding: 0.35rem 0.65rem;
    vertical-align: top;
}

/* Светлая карточка «Условие» — переопределение тёмных .task-content правил выше */
.po-card--task-light .task-content {
    background: #f8fafc;
    border-color: #e2e8f0;
    border-left-color: #3b82f6;
    color: #1e293b;
}

.po-card--task-light .task-content,
.po-card--task-light .task-content * {
    color: #1e293b !important;
}

.po-card--task-light .task-content p,
.po-card--task-light .task-content li,
.po-card--task-light .task-content span,
.po-card--task-light .task-content div {
    color: #1e293b !important;
}

.po-card--task-light .task-content strong {
    color: #0f172a !important;
}

.po-card--task-light .task-content .po-task-part-head,
.po-card--task-light .task-content h4 {
    color: #0f172a !important;
    font-size: 1rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem;
}

.po-card--task-light .task-content .po-task-part-head:first-child,
.po-card--task-light .task-content h4:first-child {
    margin-top: 0;
}

.po-card--task-light .task-content a {
    color: #2563eb !important;
}

.po-card--task-light .task-content .katex {
    color: #1e293b !important;
}

.po-card--task-light .task-content pre,
.po-card--task-light .task-content code {
    background: #f1f5f9 !important;
    color: #1e293b !important;
}

.po-card--task-light .task-content table {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
}

.po-card--task-light .task-content th,
.po-card--task-light .task-content td {
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
    background: #ffffff !important;
}

.po-hint {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #CBD5E1;
    padding: 0.75rem 0.9rem;
    background: var(--ide-surface);
    border-radius: 4px;
    border: 1px solid var(--ide-border);
    margin-bottom: 1rem;
    font-family: "Segoe UI", system-ui, sans-serif;
}

.po-hint .bi {
    color: #FFC66D;
    margin-right: 0.35rem;
}

.po-ai-buttons {
    display: grid;
    gap: 0.6rem;
}

#conceptBtn,
#templateBtn {
    border-radius: 4px;
    font-weight: 600;
    padding: 0.6rem 1rem;
    font-family: "Segoe UI", system-ui, sans-serif;
    transition: background 0.15s ease;
}

.btn-po-concept {
    color: #9876AA;
    border: 1px solid rgba(152, 118, 170, 0.5);
    background: rgba(152, 118, 170, 0.08);
}

.btn-po-concept:hover:not(:disabled) {
    background: rgba(152, 118, 170, 0.2);
    color: #C5B3D4;
}

.btn-po-template {
    color: #CF8E6D;
    border: 1px solid rgba(207, 142, 109, 0.5);
    background: rgba(207, 142, 109, 0.08);
}

.btn-po-template:hover:not(:disabled) {
    background: rgba(207, 142, 109, 0.2);
    color: #E8B4A0;
}

#conceptBtn:disabled,
#templateBtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#helpResponse {
    margin-top: 0.85rem;
}

body.python-online-page #helpResponse .alert {
    background: var(--ide-surface);
    border: 1px solid var(--ide-border);
    border-radius: 4px;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

body.python-online-page #helpContent {
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ide-text-primary);
    background: var(--ide-surface);
    padding: 1rem 1.1rem;
    border-left: 3px solid #4B6EAF;
    margin: 0;
}

body.python-online-page #helpContent pre {
    background: var(--ide-bg) !important;
    color: var(--ide-text-bright) !important;
    border: 1px solid var(--ide-border);
    border-radius: 4px;
    font-size: 0.9375rem;
    font-family: "JetBrains Mono", Menlo, monospace;
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "calt" 0;
    padding: 1rem;
    line-height: 1.65;
    overflow-x: auto;
    margin: 0.85rem 0;
}

body.python-online-page #helpContent pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "calt" 0;
}

body.python-online-page #helpContent strong {
    color: #FFC66D;
    font-weight: 600;
}

body.python-online-page #helpContent em {
    color: #9876AA;
}

body.python-online-page #helpContent ul,
body.python-online-page #helpContent ol {
    margin: 0.65rem 0;
    padding-left: 1.25rem;
}

body.python-online-page #helpContent li {
    margin: 0.3rem 0;
}

body.python-online-page #helpContent p {
    margin: 0.55rem 0;
}

body.python-online-page #helpContent h1,
body.python-online-page #helpContent h2,
body.python-online-page #helpContent h3,
body.python-online-page #helpContent h4 {
    color: var(--ide-text-bright);
    font-weight: 600;
    margin: 1rem 0 0.45rem 0;
    font-size: 1.125rem;
}

body.python-online-page #helpContent code {
    background: rgba(75, 110, 175, 0.2);
    color: var(--ide-accent-link);
    padding: 0.12em 0.4em;
    border-radius: 3px;
    font-size: 0.875em;
    font-family: "JetBrains Mono", monospace;
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "calt" 0;
}

body.python-online-page #helpContent blockquote {
    border-left: 3px solid var(--ide-border);
    margin: 0.85rem 0;
    padding: 0.45rem 0.85rem;
    background: var(--ide-bg);
    color: var(--ide-muted);
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

body.python-online-page #helpContent table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.85rem 0;
    border: 1px solid var(--ide-border);
}

body.python-online-page #helpContent th,
body.python-online-page #helpContent td {
    padding: 0.5rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid var(--ide-border);
    color: var(--ide-text-bright);
}

body.python-online-page #helpContent th {
    background: var(--ide-toolbar);
    font-weight: 600;
}

body.python-online-page #helpContent tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

#loadingIndicator .spinner-border {
    color: var(--ide-accent-run) !important;
    width: 2rem;
    height: 2rem;
}

#loadingIndicator p {
    color: var(--ide-muted) !important;
}

.po-help-feedback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    padding: 0.75rem 1.1rem;
    border-top: 1px solid var(--ide-border);
    background: var(--ide-toolbar);
}

.po-help-feedback-label {
    font-size: 0.875rem;
    color: var(--ide-text-primary);
    font-weight: 500;
}

.po-help-feedback-actions {
    display: flex;
    gap: 0.5rem;
}

.po-help-feedback-thanks {
    font-size: 0.8125rem;
    color: var(--ide-muted);
}

.btn-po-feedback-yes,
.btn-po-feedback-no {
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.25rem 0.75rem;
    font-family: "Segoe UI", system-ui, sans-serif;
}

.btn-po-feedback-yes {
    color: #6A8759;
    border: 1px solid rgba(106, 135, 89, 0.5);
    background: rgba(106, 135, 89, 0.12);
}

.btn-po-feedback-yes:hover:not(:disabled) {
    background: rgba(106, 135, 89, 0.22);
    color: #8FBC7A;
}

.btn-po-feedback-no {
    color: #CF8E6D;
    border: 1px solid rgba(207, 142, 109, 0.5);
    background: rgba(207, 142, 109, 0.1);
}

.btn-po-feedback-no:hover:not(:disabled) {
    background: rgba(207, 142, 109, 0.2);
    color: #E8B4A0;
}

.btn-po-feedback-yes:disabled,
.btn-po-feedback-no:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 767px) {
    .po-ide-shell {
        --po-ide-height: auto;
    }

    .po-ide-split {
        min-height: 420px;
        height: auto;
    }

    .po-ide-height-handle {
        display: none;
    }

    .po-ide-splitter {
        display: none;
    }

    .po-ide-editor-pane {
        flex: 1 1 55%;
    }

    .po-ide-console-pane {
        flex: 1 1 45%;
    }

    .po-ide-console-pane.po-console-pane--idle {
        flex: 1 1 45%;
        max-height: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .po-ide-toolbar .po-tb-btn,
    #randomTaskBtn {
        transition: none;
    }
}
