/* Try-it editor page. Builds on the tokens in course.css. */
.tryit-page { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100dvh; overflow: hidden; }
.tryit-bar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--bg); min-width: 0; }
.tryit-brand img { width: 28px; height: 28px; border-radius: 7px; display: block; }
.tryit-back { color: var(--text); text-decoration: none; font-weight: 650; font-size: 14.5px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; }
.tryit-back:hover span { text-decoration: underline; }
.tryit-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.tryit-count { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.tryit-count a { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); color: var(--text); text-decoration: none; }
@media (max-width: 640px) { .tryit-count { display: none; } .tryit-actions .icon-btn { display: none; } }
.tryit-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 0; }
@media (max-width: 900px) { .tryit-main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); } }
.pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.pane-code { border-right: 1px solid var(--border); background: #212121; }
@media (max-width: 900px) { .pane-code { border-right: 0; border-bottom: 1px solid var(--border); } }
.pane-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 14px; font: 600 12.5px var(--font); color: var(--text-2); background: var(--bg-soft); border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; }
.pane-head > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.pane-hint kbd { font: 600 11px var(--font-mono); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg); }
@media (max-width: 640px) { .pane-hint { display: none; } }
.pane-status { color: var(--brand); }
.pane-code textarea { flex: 1; width: 100%; resize: none; border: 0; padding: 14px; font: 14px/1.6 var(--font-mono); background: #212121; color: #eeffff; tab-size: 2; }
.pane-code .CodeMirror { flex: 1; height: auto; min-height: 0; font: 14px/1.6 var(--font-mono); }
.pane-code .CodeMirror-scroll { min-height: 100%; }
.pane-result { background: var(--bg); }
.pane-result iframe { flex: 1; width: 100%; border: 0; background: #fff; min-height: 0; }
.console { flex: none; max-height: 40%; overflow: auto; border-top: 1px solid var(--border); background: var(--code-bg); color: var(--code-text); font: 13.5px/1.55 var(--font-mono); padding: 10px 14px; white-space: pre-wrap; word-break: break-word; }
.console-full { flex: 1; max-height: none; border-top: 0; }
.console .line { padding: 1px 0; }
.console .warn { color: #f5c46c; }
.console .error { color: #ff8b9a; }
.console .info { color: #8fc7ff; }
.console .muted { color: #8796ab; font-style: italic; }
.console table { border-collapse: collapse; margin: 6px 0 4px; font: inherit; }
.console th, .console td { border: 1px solid #334155; padding: 4px 10px; text-align: left; white-space: nowrap; }
.console th { background: #1e293b; color: #e2e8f0; }
.console td.null { color: #8796ab; font-style: italic; }
.console .rows { color: #8796ab; margin-bottom: 10px; }
.tryit-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 7px 14px; border-top: 1px solid var(--border); background: var(--bg-soft); font-size: 12.5px; color: var(--text-2); }
.tryit-foot a { color: var(--brand); font-weight: 650; text-decoration: none; }
.tryit-foot a:hover { text-decoration: underline; }
.console img.py-plot { display: block; max-width: 100%; margin: 8px 0; border-radius: 10px; background: #fff; }
