/* Consistent community and content-editor surfaces in both themes. */
.v35-header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px}.v35-header h1{margin:5px 0}.v35-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 20px}.v35-tabs a{color:var(--text,#152a43);border:1px solid var(--border,#dbe3ef);background:var(--card,#fff);padding:10px 15px;border-radius:10px;text-decoration:none;font-weight:650}.v35-tabs a:hover{border-color:var(--blue,#166dff)}.v35-board{border:1px solid var(--border,#dbe3ef);background:var(--card,#fff);color:var(--text,#17243b);border-radius:16px;padding:22px;margin-bottom:20px;box-shadow:0 3px 14px #0c203007}.v35-board h2{margin:0 0 16px;font-size:1.15rem}.v35-board-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.v35-compose{background:var(--surface,#f8fafc);border-radius:12px;padding:14px;margin:0 0 20px}.v35-compose textarea,.v35-answer-form textarea{display:block;width:100%;resize:vertical;min-height:84px;margin:0 0 12px;background:var(--card,#fff);color:var(--text,#17243b);border:1px solid var(--border,#dbe3ef);border-radius:9px;padding:12px}.v35-compose-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between}.v35-file-pick{font-weight:600;font-size:.9rem;display:inline-flex;align-items:center;gap:8px;cursor:pointer}.v35-file-pick input{max-width:190px;font-size:.76rem}.v35-caption{margin:8px 0 0;color:var(--muted,#66758b);font-size:.8rem}.v35-thread{display:grid;gap:10px}.v35-message,.v35-question,.v35-review{border:1px solid var(--border,#dbe3ef);border-radius:11px;padding:15px;background:var(--card,#fff);margin-bottom:10px}.v35-message p,.v35-question p{white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0}.v35-post-meta{display:flex;justify-content:space-between;gap:12px;align-items:center}.v35-post-meta time{font-size:.78rem;color:var(--muted,#66758b)}.v35-attachment{display:inline-flex;gap:6px;align-items:center;margin:6px 12px 6px 0;padding:6px 8px;border:1px solid var(--border,#dbe3ef);border-radius:8px;word-break:break-word;max-width:100%;font-size:.84rem}.v35-attachment small{color:var(--muted,#66758b)}.v35-report{background:none;border:0;padding:4px 0;color:var(--muted,#66758b);cursor:pointer;font-size:.76rem}.v35-report:hover{text-decoration:underline}.v35-question-title{font-weight:650}.v35-answer{padding:12px;margin:9px 0 0 14px;background:var(--surface,#f8fafc);border-left:3px solid var(--blue,#166dff);border-radius:6px}.v35-answer-form{margin:13px 0}.v35-answer-form summary,.v35-rules summary{cursor:pointer;color:var(--blue,#166dff);font-weight:650}.v35-answer-form form{padding-top:12px}.v35-empty{text-align:center;color:var(--muted,#66758b);padding:24px}.v35-rules{padding:12px 4px;margin-bottom:30px;font-size:.85rem;color:var(--muted,#66758b)}.v35-rules p{max-width:75ch}.v35-back{display:inline-block;margin-bottom:14px}.v35-team-form{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:16px}.v35-team-form select{max-width:260px}
html[data-theme="dark"] .v35-board,html[data-theme="dark"] .v35-message,html[data-theme="dark"] .v35-question,html[data-theme="dark"] .v35-review,html[data-theme="dark"] .v35-tabs a {background:#162339;border-color:#33435d;color:#edf3fb} html[data-theme="dark"] .v35-compose,html[data-theme="dark"] .v35-answer {background:#1b2c45} html[data-theme="dark"] .v35-compose textarea,html[data-theme="dark"] .v35-answer-form textarea{background:#111d30;border-color:#3d4d66;color:#edf3fb}html[data-theme="dark"] .v35-post-meta time,html[data-theme="dark"] .v35-caption,html[data-theme="dark"] .v35-report,html[data-theme="dark"] .v35-empty {color:#b9c6d8}
@media(max-width:750px){.v35-header{align-items:flex-start;flex-direction:column}.v35-board{padding:14px}.v35-compose-actions{align-items:stretch;flex-direction:column}.v35-file-pick{flex-direction:column;align-items:flex-start}.v35-answer{margin-left:5px}}

/* Contrast repairs for the old global header in dark mode. */
html[data-theme="dark"] .topbar .navlinks a{color:#e3edfa!important}
html[data-theme="dark"] .topbar .navlinks a:hover{color:#74baff!important}
html[data-theme="dark"] .topbar .theme-toggle,html[data-theme="dark"] .topbar .nav-menu-toggle{color:#e3edfa!important;background:#1b2c45!important;border-color:#3d4d66!important}
html[data-theme="dark"] .sidebar .sidelink:not(.active){color:#bdcce1!important}
html[data-theme="dark"] .v35-tabs a{color:#ebf2fb}
/* Highest specificity to override legacy portal classes in dark theme. */
html[data-theme="dark"] body header.topbar .navlinks a{color:#e7edf9!important;-webkit-text-fill-color:#e7edf9!important}
html[data-theme="dark"] body .portal .portal-main .v35-tabs a{background:#1b2b44!important;color:#edf4fc!important;border-color:#465671!important;-webkit-text-fill-color:#edf4fc!important}
html[data-theme="dark"] body .portal .portal-main .v35-board .v35-compose{background:#1d304d!important}
html[data-theme="dark"] body .portal .portal-main .v35-board .v35-compose textarea{background:#111d30!important;color:#edf4fc!important;border-color:#465671!important}

/* Online-only pilot: display-only group format. */
.v36-format-label{min-height:43px;display:flex;align-items:center;padding:0 14px;background:var(--surface,transparent);border:1px solid var(--border,#cbd5e1);border-radius:10px;font-weight:600}

/* V4: older inline lesson Python editor follows site color. */
html:not([data-theme="dark"]) .lesson-terminal-shell{background:#f4f7fc!important;color:#17375c!important;border-color:#d4dfeb!important}
html:not([data-theme="dark"]) .lesson-terminal-shell .terminal{background:#f4f7fc!important;color:#17375c!important}
html:not([data-theme="dark"]) body .portal-main textarea.code-field{background:#ffffff!important;color:#183454!important}
html:not([data-theme="dark"]) .code-toolbar{background:#e8f0fc!important;color:#1c3b63!important}
html:not([data-theme="dark"]) .line-numbers{background:#f3f7fc!important;color:#687d98!important}
