:root{font-family:Inter,Arial,Helvetica,sans-serif;color:#172333;background:#f8fafc}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}a{color:#275c91}header{background:#fff;border-bottom:1px solid #dfe5eb;padding:13px max(24px,calc((100vw - 1450px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px}.mark{font-size:11px;letter-spacing:2px;font-weight:750;color:#527393}h1{font-size:24px;margin:5px 0}h2{font-size:17px;margin:0 0 12px}p{line-height:1.55}small,.muted{font-size:13px;color:#657383}header .muted{margin:2px 0}.grid{max-width:1480px;margin:20px auto;padding:0 22px;display:grid;grid-template-columns:250px minmax(0,1fr);gap:18px}.side,.mainpanel,.panel{border:1px solid #dfe5eb;background:#fff;border-radius:7px;padding:18px}.side{height:max-content}.side button{width:100%;text-align:left;display:block;border:1px solid transparent;background:white;padding:10px 12px;border-radius:4px;margin:3px 0;color:#34465a}.side button.active{background:#eaf1f8;color:#194f82;border-color:#d4e3f1;font-weight:700}.side button:hover{background:#f4f7fa}.appbar{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.badge{background:#edf3f9;border-radius:20px;padding:5px 10px;font-size:12px;color:#315e83}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0}button.primary,.primary{background:#275c91;border:1px solid #275c91;color:white;padding:9px 14px;border-radius:4px}.secondary{background:#fff;border:1px solid #ccd6df;padding:9px 14px;border-radius:4px;color:#243e58}input{padding:9px 10px;border:1px solid #cbd5df;border-radius:4px;width:100%;max-width:320px}iframe{width:100%;height:680px;border:1px solid #e0e7ed;border-radius:5px;background:white} .welcome{max-width:920px;margin:11vh auto;padding:30px}.welcome h1{font-size:44px}.choice{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:28px 0}.choice a{display:flex;flex-direction:column;gap:12px;background:white;border:1px solid #dfe5eb;padding:25px;text-decoration:none;color:#172333;border-radius:7px}.choice strong{font-size:19px}.choice span{color:#58748d;font-size:13px}.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.panel{margin-top:15px}.playground{background:#f7fafc;border:1px solid #dfe5eb;border-radius:5px;padding:13px}.terminal{white-space:pre-wrap;min-height:210px;max-height:430px;overflow:auto;background:#1e2935;color:#e8f2fc;font:13px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;border-radius:5px;padding:15px}.cmdinput{font-family:ui-monospace,Consolas,monospace;max-width:100%}.notice{border-left:3px solid #c58f46;background:#fff9ed;padding:10px 13px;font-size:13px;color:#745421}.stats{width:100%;border-collapse:collapse;font-size:13px}.stats td,.stats th{text-align:left;border-bottom:1px solid #ecf0f4;padding:9px} .hidden{display:none!important}@media(max-width:800px){.grid{display:block;padding:10px}.side{margin-bottom:14px}.choice{grid-template-columns:1fr}.welcome h1{font-size:31px}iframe{height:650px}header{padding:12px}}

/* Compact, single-navigation portal layout */
html,body{height:100%;overflow:hidden}
body{display:flex;flex-direction:column;background:#fff}
header{flex:0 0 auto;min-height:51px;padding:8px 18px}
header h1{font-size:17px;margin:1px 0}header .mark{font-size:10px}
.grid{flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:10px;grid-template-columns:207px minmax(0,1fr);gap:10px}
.side,.mainpanel{min-height:0;margin:0;padding:11px;border-radius:5px}
.side{height:auto;overflow-y:auto}
.side button{font-size:12px;padding:8px 9px;margin:1px 0}
.side label{font-size:12px;line-height:1.3}
.side .muted{font-size:11px;margin:6px 0}
.side input:not([type=checkbox]){font-size:12px;padding:7px;max-width:100%}
.mainpanel{display:flex;flex-direction:column;overflow:hidden;gap:7px}
.mainpanel>.appbar,.mainpanel>#workspace>.appbar{flex:0 0 auto;min-height:27px}
.current-topic{font-size:15px;margin:0}
#workspace{display:flex;flex-direction:column;min-height:0;flex:1;gap:8px}
#auth{margin:0 0 10px;flex:0 0 auto}
#workspace iframe,.mainpanel>iframe{display:block;flex:1;min-height:180px;height:100%;border-radius:4px}
.aux-panel{flex:0 0 auto;margin:0;border:1px solid #dfe5eb;background:#fff;border-radius:5px;padding:8px 10px;max-height:44%;overflow:auto}
.aux-panel summary{font-weight:700;font-size:13px;cursor:pointer;color:#284f74}
.aux-panel[open]{padding-bottom:14px}
.aux-panel .terminal{min-height:125px;max-height:180px}
.aux-panel p{font-size:12px;margin:7px 0}
@media(max-width:800px){html,body{overflow:auto;height:auto;min-height:100%}.grid{display:flex;flex-direction:column;padding:8px}.side{overflow:visible}.mainpanel{height:75vh;min-height:430px}.side #topics{display:flex;flex-wrap:wrap;gap:4px}.side button{width:auto}.aux-panel{max-height:48%}header{padding:9px 12px}}

/* Participant-first welcome and inline completion action */
.name-gate{position:fixed;inset:0;z-index:1000;background:rgba(248,250,252,.98);display:grid;place-items:center;padding:18px}
.name-card{background:#fff;border:1px solid #dfe5eb;width:min(440px,100%);padding:34px;border-radius:8px;display:flex;flex-direction:column;gap:13px;box-shadow:0 18px 48px rgba(30,54,78,.08)}
.name-card h2{font-size:27px;margin:5px 0 0}.name-card p{margin:0 0 8px;color:#657383}.name-card input{max-width:none}.name-card button{margin-top:7px}
.completion-bar{display:flex;gap:12px;align-items:center;justify-content:space-between;background:#f8fafc;border:1px solid #e2e8ee;border-radius:5px;padding:10px 14px;flex:0 0 auto}
.completion-summary{display:flex;flex-direction:column;gap:3px}.completion-label{font-size:13px;font-weight:750;color:#243e58}.completion-summary small{font-size:12px}.completion-bar button{white-space:nowrap;font-size:13px}
@media(max-width:800px){.completion-bar{align-items:stretch;flex-direction:column}.completion-bar button{width:100%}}

.real-playground{max-height:none;overflow:visible}.real-head{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.real-head strong{flex:1;font-size:13px}.real-playground #realTerminal{height:255px;background:#152332;padding:6px;border-radius:4px;overflow:hidden}.real-playground #realTerminalBox:not(.hidden){margin-top:9px}.real-playground .badge{white-space:nowrap}

/* Learning material on left, real shell on right */
.participant-grid{grid-template-columns:minmax(0,3fr) minmax(335px,2fr)}
.participant-grid .mainpanel{grid-column:1;grid-row:1;min-width:0}
.participant-grid .shell-column{grid-column:2;grid-row:1;min-width:0}
.participant-grid .shell-column{padding:10px;overflow:hidden;display:flex;min-height:0}
.participant-grid .shell-column .real-playground{width:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;gap:8px;border:none;padding:4px}
.participant-grid .shell-column .real-head strong{font-size:14px}
.participant-grid .shell-column .shell-actions{display:flex;gap:7px;flex-wrap:wrap}
.participant-grid #realTerminalBox:not(.hidden){flex:1;min-height:0;display:flex;flex-direction:column;gap:8px}
.participant-grid .real-playground #realTerminal{height:auto;min-height:260px;flex:1}
.participant-grid .topic-strip{display:flex;gap:5px;overflow-x:auto;flex:0 0 auto;padding:2px 0 9px;border-bottom:1px solid #e2e8ee;scrollbar-width:thin}
.participant-grid .topic-strip button{font-size:11px;white-space:nowrap;padding:7px 10px;border:1px solid #dfe5eb;border-radius:4px;background:#fff;color:#34465a;cursor:pointer}
.participant-grid .topic-strip button.active{background:#eaf1f8;border-color:#b5d0e8;color:#194f82;font-weight:700}
.participant-grid .topic-strip button:disabled{opacity:.55;cursor:default}
@media(max-width:900px){.participant-grid{display:flex;flex-direction:column;overflow:auto}.participant-grid .shell-column{order:2;flex:0 0 auto;min-height:310px;max-height:52vh}.participant-grid .mainpanel{order:1;height:70vh;min-height:420px}.participant-grid .real-playground #realTerminal{min-height:200px}}

/* Real shell controls: maintain readable foreground and background in all pointer states. */
.participant-grid .shell-actions #openWorkspace,
.participant-grid .shell-actions #openWorkspace:link,
.participant-grid .shell-actions #openWorkspace:visited {background:#275c91!important;color:#fff!important;border:1px solid #275c91!important;font-weight:650;}
.participant-grid .shell-actions #openWorkspace:hover,
.participant-grid .shell-actions #openWorkspace:focus-visible {background:#173f68!important;color:#fff!important;border-color:#173f68!important;box-shadow:0 0 0 3px rgba(39,92,145,.18);}
.participant-grid .shell-actions #openWorkspace:active {background:#10314f!important;color:#fff!important;}
.participant-grid .shell-actions #openWorkspace:disabled {background:#e9edf2!important;color:#45556a!important;border-color:#cbd5df!important;cursor:wait;}
.participant-grid .shell-actions #terminateWorkspace:hover,
.participant-grid .shell-actions #terminateWorkspace:focus-visible {background:#edf2f7!important;color:#172333!important;border-color:#94a8bb!important;}

/* Clean-install right-hand Git shell layout */
@media (min-width: 900px) {
  .participant-grid { display: grid !important; grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr) !important; }
  .participant-grid > .mainpanel { grid-column: 1 !important; grid-row: 1 !important; min-width: 0; }
  .participant-grid > .shell-column { grid-column: 2 !important; grid-row: 1 !important; min-width: 0; }
}
#openWorkspace, #openWorkspace:hover, #openWorkspace:focus-visible {color: #fff !important;}
#openWorkspace:hover, #openWorkspace:focus-visible {background: #173f68 !important;}

/* Terminal keyboard-focus visibility and click-to-type affordance */
.participant-grid #realTerminal,.participant-grid #realTerminal .xterm,.participant-grid #realTerminal .xterm-screen {pointer-events:auto;}
.participant-grid #realTerminal .xterm-helper-textarea{position:absolute!important;opacity:0!important;pointer-events:auto!important;}
.participant-grid #realTerminal:focus-within{outline:2px solid #4e9bd4;outline-offset:2px;}
