/* LeetCode-style workbench. The library and long-form theory are not affected. */
#practiceView,.lc-project { --lc-left:46%;--lc-console:210px;--lc-bg:#f0f0f0;--lc-panel:#fff;--lc-chrome:#fafafa;--lc-stroke:#e3e3e3;--lc-ink:#262626;--lc-muted:#737373; }
:root:not([data-theme=light]) #practiceView,:root:not([data-theme=light]) .lc-project { --lc-bg:#1a1a1a;--lc-panel:#262626;--lc-chrome:#2d2d2d;--lc-stroke:#393939;--lc-ink:#eff1f6;--lc-muted:#aaa; }
#practiceView { position:relative;padding:8px;gap:0;display:grid;grid-template-columns:minmax(0,var(--lc-left)) 8px minmax(0,1fr);background:var(--lc-bg);overflow:hidden; }
body.sidebar-collapsed #practiceView { grid-template-columns:minmax(0,var(--lc-left)) 8px minmax(0,1fr); }
#practiceView .problem-pane { grid-column:1;border:1px solid var(--lc-stroke);border-radius:9px;overflow:hidden;background:var(--lc-panel); }
#practiceView .editor-pane { grid-column:3;grid-template-rows:auto auto minmax(100px,1fr) 8px minmax(120px,var(--lc-console));height:100%;border:0;border-radius:9px;background:var(--lc-panel);overflow:hidden; }
#practiceView .editor-wrap { grid-row:3; }
#practiceView .console-panel { grid-row:5;border:1px solid var(--lc-stroke);border-radius:8px;background:var(--lc-panel); }
#practiceView .pane-tabs,#practiceView .editor-toolbar,#practiceView .console-header { min-height:42px;height:auto;background:var(--lc-chrome);border-bottom:1px solid var(--lc-stroke);padding:0 12px;gap:6px; }
#practiceView .pane-tabs { flex-wrap:wrap; }
#practiceView .pane-tab { font-size:13px;padding:12px 10px;color:var(--lc-muted);border:0; }
#practiceView .pane-tab.active { color:var(--lc-ink);background:transparent;box-shadow:inset 0 -2px #2cbb5d; }
#practiceView .editor-toolbar { flex-wrap:wrap;padding:8px 12px;row-gap:10px; }
#practiceView .runtime-label { display:none; }
#practiceView .editor-title { font-size:12px;color:var(--lc-ink); }
#practiceView .editor-actions { margin-left:auto; }
#practiceView .editor-actions .compact { display:inline-block; }
#practiceView .run-button { background:#2cbb5d1f;color:#168b40;border:0;border-radius:6px;box-shadow:none;padding:7px 13px;font-weight:600;font-size:13px; }
:root:not([data-theme=light]) #practiceView .run-button { color:#4cce7a; }
#practiceView .ghost-button { color:var(--lc-muted);background:var(--lc-chrome);border-color:var(--lc-stroke);border-radius:6px;font-weight:400; }
#practiceView .ghost-button:hover { color:var(--lc-ink);background:var(--lc-bg); }
#practiceView .problem-content { padding:24px 22px; }
#practiceView .problem-content h2 { font-size:23px;line-height:1.4; }
#practiceView .problem-footer { background:var(--lc-chrome);padding:9px 14px;border-top:1px solid var(--lc-stroke); }
#practiceView .console-header { flex:0 0 40px; }
#practiceView .console-tabs .active { color:var(--lc-ink);font-size:13px;font-weight:500; }
#practiceView .shortcut { color:var(--lc-muted);font-size:11px; }
#practiceView .runtime-status-strip { background:var(--lc-chrome);grid-template-columns:minmax(0,1fr) 80px 54px;padding:7px 12px;gap:8px;min-height:35px; }
#practiceView .runtime-status-copy { color:var(--lc-muted); }#practiceView .runtime-status-copy small { overflow:hidden;text-overflow:ellipsis; }
#practiceView .runtime-loader { margin:20px auto; }
#practiceView .runtime-loader small { line-height:1.5; }
.lc-directory-button { border:0!important;background:transparent!important;color:inherit;font:500 13px var(--sans)!important;padding:8px!important;white-space:nowrap;cursor:pointer; }
#practiceView .lc-directory-button { margin-right:auto;border-right:1px solid var(--lc-stroke)!important;border-radius:0;padding-right:14px!important;color:var(--lc-ink); }
.lc-splitter { position:relative;touch-action:none;outline:none;background:var(--lc-bg);z-index:2; }
.lc-splitter::after { content:'';position:absolute;background:transparent;border-radius:5px;transition:background .12s; }
.lc-splitter:hover::after,.lc-splitter:focus-visible::after { background:#7a7a7a; }
.lc-splitter-x { cursor:col-resize;grid-column:2;grid-row:1; }.lc-splitter-x::after { width:3px;top:40%;bottom:40%;left:2px; }
.lc-splitter-y { cursor:row-resize;grid-row:4; }.lc-splitter-y::after { height:3px;left:44%;right:44%;top:2px; }
.lc-dragging,.lc-dragging * { user-select:none!important; }
.lc-drawer-backdrop { display:none;position:absolute;inset:0;z-index:20;border:0!important;border-radius:0!important;background:#0005!important;cursor:default; }
#practiceView .task-sidebar,.lc-project .project-sidebar { display:none; }
#practiceView.lc-directory-open .task-sidebar,.lc-project.lc-directory-open .project-sidebar { display:flex;position:absolute;left:8px;top:8px;bottom:8px;width:min(310px,calc(100% - 32px));height:auto;min-height:0;max-height:none;flex-direction:column;overflow:auto;z-index:21;background:var(--lc-panel);border:1px solid var(--lc-stroke);border-radius:10px;box-shadow:0 14px 40px #0002; }
.lc-directory-open>.lc-drawer-backdrop { display:block; }
#practiceView .task-sidebar .task-list { flex:1;min-height:0; }
.app-shell:has(#practiceView:not([hidden])) .topbar { height:52px;flex-basis:52px;gap:12px; }
.app-shell:has(#practiceView:not([hidden])) .top-progress { min-width:0; }.app-shell:has(#practiceView:not([hidden])) .progress-track { display:none; }
.app-shell:has(#practiceView:not([hidden])) .progress-copy { font-size:12px; }.app-shell:has(#practiceView:not([hidden])) .top-center { gap:15px; }
/* Project steps use the same two-pane layout and independent scroll areas. */
.lc-project { position:relative;display:flex;flex-direction:column;height:100dvh;overflow:hidden;background:var(--lc-bg); }
.lc-project .project-top { flex:0 0 auto;padding:8px 14px;min-height:54px;background:var(--lc-chrome);border:0;gap:10px; }
.lc-project .project-top>div:first-child { display:flex;gap:12px;align-items:center;min-width:0; }.lc-project .project-top h1 { font-size:14px;line-height:1.4;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.lc-project .project-top a { font-size:12px;white-space:nowrap;color:var(--lc-muted); }
.lc-project .project-top button,.lc-project .project-top select { padding:6px 9px;font-size:12px;border-radius:6px; }.lc-project .project-top label { display:none; }
.lc-project .project-body { display:block;min-height:0;flex:1;overflow:hidden; }
.lc-project .project-main { display:flex;flex-direction:column;height:100%;padding:8px;min-height:0; }
.lc-project [data-project-content] { flex:1;display:flex;flex-direction:column;min-height:0; }
.lc-project .project-workspace { display:grid;grid-template-columns:minmax(0,var(--lc-left)) 8px minmax(0,1fr);gap:0;align-items:stretch;flex:1;min-height:0; }
.lc-project .project-problem { grid-column:1;overflow:auto;padding:0 22px 28px;background:var(--lc-panel);border:1px solid var(--lc-stroke);border-radius:9px; }
.lc-problem-heading { position:sticky;top:0;margin:0 -22px 23px;padding:12px 18px;background:var(--lc-chrome);border-bottom:1px solid var(--lc-stroke);font-size:13px;font-weight:500;line-height:18px;z-index:3;color:var(--lc-ink); }
.lc-project .project-problem h2 { font-size:23px;line-height:1.4; }.lc-project .project-problem h3 { font-size:15px; }
.lc-project .project-code { grid-column:3;display:grid;grid-template-rows:auto minmax(100px,1fr) 8px minmax(120px,var(--lc-console));border:0;min-height:0;background:var(--lc-panel);overflow:hidden;border-radius:9px; }
.lc-project .project-codebar { padding:8px 12px;background:var(--lc-chrome);border:1px solid var(--lc-stroke);gap:8px; }
.lc-project .project-codebar .project-save { margin-left:auto;font-size:10px; }.lc-project .project-codebar .project-actions { width:100%;padding-top:3px;gap:6px; }
.lc-project .project-codebar button { padding:6px 10px;font-size:12px;border:0;background:var(--lc-bg);color:var(--lc-ink);border-radius:5px; }
.lc-project .project-codebar .project-primary { background:#2cbb5d1f;color:#168b40; }.lc-project .project-codebar [data-reset] { margin-left:auto; }
:root:not([data-theme=light]) .lc-project .project-codebar .project-primary { color:#4cce7a; }
.lc-project .project-editor { height:auto;min-height:0;grid-row:2;overflow:hidden; }
.lc-project .project-code>.lc-splitter-y { grid-row:3; }
.lc-project .project-console { grid-row:4;min-height:0;overflow:auto;padding:0;background:var(--lc-panel);border:1px solid var(--lc-stroke);border-radius:8px; }
.lc-console-heading { position:sticky;top:0;padding:12px 16px;border-bottom:1px solid var(--lc-stroke);background:var(--lc-chrome);color:var(--lc-ink);font-size:13px; }
.lc-project .project-console pre { margin:0;padding:16px;max-height:none;white-space:pre-wrap;font-size:12px; }.lc-project .project-console>a { display:block;margin:0 16px 16px;font-size:12px; }
.lc-project .project-footer { flex:0 0 36px;display:flex;align-items:center;justify-content:space-between;margin:0;padding:0 6px;font-size:12px; }
.lc-project .project-runtime { flex-shrink:0;margin:0 0 6px;padding:8px 14px;background:var(--lc-chrome);font-size:12px; }.lc-project .project-runtime progress { height:4px;margin-top:5px; }
.lc-project.lc-directory-open .project-sidebar { top:60px;padding:20px 14px; }.lc-project .project-sidebar nav { display:grid;overflow:visible; }.lc-project .project-sidebar .project-step { min-width:0; }
@media(max-width:1000px) { .lc-project .project-top h1 { max-width:220px; }.lc-project .project-top { flex-wrap:wrap; }.app-shell:has(#practiceView:not([hidden])) .top-progress { display:none; } }
@media(max-width:820px) {
 .app-shell:has(#practiceView:not([hidden])) { height:100dvh;min-height:0;overflow:hidden; }
 #practiceView,body.sidebar-collapsed #practiceView { display:flex;flex-direction:column;overflow:auto;gap:8px;padding:8px; }
 #practiceView .problem-pane { min-height:0;height:54dvh;flex:none; }#practiceView .problem-content { min-height:0; }
 #practiceView .editor-pane { min-height:600px;height:75dvh;flex:none; }
 #practiceView .lc-splitter-x,.lc-project .lc-splitter-x { display:none; }
 #practiceView.lc-directory-open .task-sidebar { position:fixed;top:60px;bottom:12px;left:8px; }
 #practiceView.lc-directory-open>.lc-drawer-backdrop { position:fixed;top:52px; }
 #practiceView .runtime-status-strip { grid-template-columns:minmax(0,1fr) 45px; }#practiceView .runtime-status-strip .runtime-status-progress { display:none; }
 #practiceView .pane-tabs { gap:0; }.lc-directory-button { font-size:12px!important; }#practiceView .pane-tab { padding:12px 8px;font-size:12px; }
 .lc-project .project-top { flex-direction:row;align-items:center; }.lc-project .project-top>div:first-child { flex-wrap:wrap;gap:8px; }.lc-project .project-top h1 { max-width:100%;width:100%; }
 .lc-project .project-body { overflow:auto; }.lc-project .project-main { height:auto;min-height:100%; }.lc-project [data-project-content] { display:block; }
 .lc-project .project-workspace { display:flex;flex-direction:column;gap:8px; }.lc-project .project-problem { height:54dvh;flex:none;min-height:300px; }.lc-project .project-code { height:75dvh;min-height:600px;flex:none; }.lc-project .project-footer { padding:12px 6px; }
 .lc-project.lc-directory-open .project-sidebar { top:8px;bottom:8px; }.lc-project .project-top [data-export] { display:inline-block; }
}
