/* Query Arena workspace styles. */
:root{--green:#25634f;--ink:#24332e;--muted:#596861;--line:#dce3de;--surface:#fff;--soft:#f4f6f4;--accent-soft:#eaf2ed}
*{box-sizing:border-box}body{margin:0;background:var(--soft);color:var(--ink);font:15px/1.55 system-ui,-apple-system,'Segoe UI',sans-serif;display:flex;min-height:100vh}button,input,textarea{font:inherit}button{cursor:pointer;border:0;background:none;color:inherit;border-radius:6px;padding:8px 12px;transition:background .15s}button:hover{background:#e8ede9}button:disabled{cursor:not-allowed;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #528d76;outline-offset:3px}[hidden]{display:none!important}
.rail{display:none}.sidebar{width:264px;flex-shrink:0;padding:28px 18px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:0}.project{font-size:22px;font-weight:650;letter-spacing:-.6px}.edition{font-size:10px;font-weight:600;letter-spacing:1px;color:var(--muted);border:1px solid var(--line);padding:3px 6px;border-radius:4px;vertical-align:middle;margin-left:6px}.contest-card{margin:28px 0;padding:16px;background:var(--soft);border-radius:8px}.eyebrow,.section-label{font-size:11px;font-weight:650;letter-spacing:1.2px;color:var(--muted)}.contest-card .eyebrow{display:none}.contest-card strong{font-size:15px}.contest-card p{font-size:12px;color:var(--muted);margin:8px 0 16px;line-height:1.7}.progress-track{height:5px;background:#dbe5de;border-radius:4px;overflow:hidden}.progress-track div{height:100%;width:0;background:var(--green);transition:width .3s}.contest-card small{display:block;font-size:12px;color:var(--muted);margin-top:10px}.section-label{display:flex;justify-content:space-between;margin:0 8px 12px}.sidebar nav{overflow:auto;min-height:80px}.challenge{width:100%;display:flex;align-items:flex-start;gap:12px;text-align:left;padding:13px 10px;margin-bottom:5px;border:1px solid transparent}.challenge.active{background:var(--accent-soft);border-color:#cddfd3}.challenge-number{display:grid;place-items:center;width:28px;height:28px;flex-shrink:0;border:1px solid var(--line);border-radius:5px;color:var(--muted);font:12px/1.4 Consolas,monospace}.challenge.active .challenge-number{background:white;color:var(--green)}.challenge.solved .challenge-number{background:var(--green);color:#fff;border-color:var(--green)}.challenge strong{display:block;font-size:14px;line-height:1.45;font-weight:600;margin-bottom:4px}.challenge small{font-size:12px;color:var(--muted)}.challenge small span{padding:0 6px}.sidebar-score{border-top:1px solid var(--line);margin-top:24px;padding:20px 10px;display:flex;flex-direction:column;gap:8px}.sidebar-score>span{font-size:13px;color:var(--muted)}.sidebar-score strong b{font-size:32px;font-weight:600}.sidebar-score strong small{font-size:16px;color:var(--muted);font-weight:400}.sidebar-score button{text-align:left;padding:6px 0;font-size:13px;color:var(--green)}.side-foot{display:none}
main{flex:1;min-width:0;padding:0 28px 24px}header{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line)}.breadcrumbs{font-size:13px;color:var(--muted)}.breadcrumbs span{margin:0 10px}.breadcrumbs strong{font-weight:600;color:var(--ink)}.header-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.header-right button{font-size:13px;font-weight:500}.demo-tag{font-size:12px;color:var(--green);margin-right:8px}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:28px 0 24px}h1{font-size:30px;font-weight:650;letter-spacing:-1px;line-height:1.25;margin:8px 0 10px}h1 span{color:var(--green)}.page-heading p{font-size:14px;color:var(--muted);margin:0}.timer-box{min-width:125px;text-align:right}.timer-box small{font-size:10px;letter-spacing:1px;color:var(--muted);display:block}.timer-box strong{display:block;font:28px/1.4 Consolas,monospace;letter-spacing:-1px}.timer-box button{font-size:13px;color:var(--green);padding:4px 0}.timer-box.expiring strong{color:#a0442c}.environment-note{font-size:12px;line-height:1.7;padding:12px 16px;margin-bottom:20px;background:#edf2ee;color:#455c4f;border-radius:6px;border-left:3px solid #7a9c88}
.arena{display:grid;grid-template-columns:minmax(300px,1fr) minmax(390px,1.45fr);border:1px solid var(--line);border-radius:10px;overflow:hidden;background:white}.problem-pane{min-width:0;border-right:1px solid var(--line)}.pane-tabs,.tabbar{height:50px;background:#f7f9f7;border-bottom:1px solid var(--line)}.pane-tabs{display:flex;gap:24px;padding:0 24px}.pane-tabs button,.result-tabs button{font-size:13px;color:var(--muted);padding:0;border-radius:0}.pane-tabs .selected,.result-tabs .selected{color:var(--green);border-bottom:2px solid var(--green);font-weight:600}#problemContent,#schemaContent{padding:24px;max-height:760px;overflow:auto}.problem-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px}.level{background:var(--accent-soft);color:var(--green);padding:3px 8px;border-radius:4px}.points{color:var(--muted)}.problem-pane h2{font-size:24px;line-height:1.3;letter-spacing:-.5px;font-weight:650;margin:18px 0 14px}.problem-pane p{font-size:15px;line-height:1.8;color:#42534b;margin:10px 0}.problem-pane h3{font-size:14px;font-weight:650;margin:26px 0 10px}.tags{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0}.tag{font:11px/1.5 Consolas,monospace;padding:3px 7px;border:1px solid var(--line);border-radius:4px;color:var(--muted)}.problem-pane .spec{font-size:14px;border-left:2px solid #b8cec0;padding-left:14px}.sample-wrap{overflow:auto;border:1px solid var(--line);border-radius:6px;margin-top:12px}.sample-wrap th,.sample-wrap td{font-size:12px;padding:10px 12px}.sample-wrap th:first-child,.sample-wrap td:first-child{color:inherit;width:auto;text-align:left}.sample-caption{font-size:12px!important;color:var(--muted)!important}.accepted-note{font-size:13px;background:var(--accent-soft);color:var(--green);padding:12px;border-radius:6px;margin-top:20px}
.workbench{min-width:0}.tabbar{display:flex;align-items:center;padding:0 18px;gap:12px}.query-title{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.query-title>span{font:11px Consolas,monospace;margin-right:8px;color:var(--green)}.query-title b{font-weight:500}.autosave{margin-left:auto;font-size:11px;color:var(--muted);white-space:nowrap}.editor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;padding:0 16px;font-size:12px;color:var(--muted)}.editor-toolbar button{font-size:12px;padding:6px 8px}.green-dot{display:inline-block;background:var(--green);width:6px;height:6px;border-radius:50%;margin-right:5px}.muted{color:var(--muted);margin-left:8px}.editor{height:300px;display:flex;padding-top:16px;overflow:hidden;font:14px/27px Consolas,'Cascadia Mono',monospace}#lineNumbers{width:48px;flex-shrink:0;padding-right:16px;white-space:pre;text-align:right;color:#7b8982}.code-wrap{position:relative;flex:1;min-width:0;overflow:hidden}pre,textarea{font:inherit;line-height:27px;white-space:pre;margin:0;padding:0 16px 20px 0;tab-size:2}pre{pointer-events:none;color:#253a30}textarea{position:absolute;inset:0;width:100%;height:100%;resize:none;border:0;outline:0;background:transparent;color:transparent;caret-color:#183f2e;overflow:auto}textarea::selection{background:#6ca68740}.keyword{color:#38598a}.string{color:#855222}.comment{color:#68766f}.number{color:#76538a}.editor-footer{display:flex;justify-content:space-between;padding:10px 16px;border-bottom:1px solid var(--line);font-size:11px;color:var(--muted)}.execution-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);min-height:70px}#queryStatus{font-size:12px;color:var(--muted)}.execution-bar>div{display:flex;gap:8px;flex-shrink:0}.outline{border:1px solid #cbd7cf;background:#fff;font-size:13px;padding:9px 13px}button.run{background:var(--green);color:#fff;font-size:13px;font-weight:600;padding:10px 15px}button.run:hover{background:#1c503e}.results-toolbar{height:49px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--line)}.result-tabs{display:flex;gap:20px;height:100%}.result-tabs span{font-size:11px;background:var(--accent-soft);padding:2px 5px;border-radius:4px;margin-left:4px}.results-toolbar>button{font-size:12px;color:var(--muted)}.results{height:260px;overflow:auto}.empty{height:100%;min-height:170px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:24px;text-align:center;color:var(--muted)}.empty>span{font-size:24px;color:#82958a;margin-bottom:12px}.empty strong{font-size:15px;font-weight:500;color:#42574b}.empty p{font-size:13px;margin:8px 0}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}th,td{padding:12px 14px;border-bottom:1px solid #e7ece8;font:13px/1.5 Consolas,monospace;color:#34473c}th{position:sticky;top:0;background:#f4f7f4;font:600 12px/1.5 system-ui,sans-serif;color:#405649}th:first-child,td:first-child{width:32px;text-align:center;color:var(--muted)}tbody tr:hover{background:#f5f8f5}.result-footer{display:flex;justify-content:space-between;gap:12px;padding:10px 16px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.bottom-note{display:flex;justify-content:space-between;gap:20px;font-size:11px;color:var(--muted);margin-top:16px}.feedback{padding:24px}.feedback strong{font-size:18px;color:var(--green)}.feedback p{font-size:14px;line-height:1.7;color:var(--muted)}.feedback.error strong,.form-error{color:#a13f30!important}.test-count{font:12px Consolas,monospace;background:var(--soft);padding:6px 9px;border-radius:4px}.history-item{display:flex;align-items:center;gap:14px;padding:15px 18px;border-bottom:1px solid var(--line);font-size:13px}.history-item small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.history-item>span{margin-left:auto;color:var(--green)}.history-item button{font-size:12px;border:1px solid var(--line)}.schema-table{border:1px solid var(--line);border-radius:6px;padding:16px;margin-top:16px}.schema-table>strong{font-size:15px}.column{display:flex;justify-content:space-between;gap:12px;padding:8px 0;font-size:13px}.column small{font-size:11px;color:var(--muted)}.schema-table button{color:var(--green);font-size:13px;padding:8px 0}.relationship{font:12px/1.8 Consolas,monospace;background:var(--soft);padding:12px;overflow:auto;border-radius:5px;color:var(--muted)}
#toast{position:fixed;z-index:10;bottom:24px;left:50%;transform:translateX(-50%);background:#263d31;color:white;padding:12px 20px;border-radius:6px;opacity:0;pointer-events:none;transition:.2s;font-size:14px}#toast.show{opacity:1}dialog{border:1px solid var(--line);border-radius:12px;background:white;color:var(--ink);padding:28px;width:560px;max-width:calc(100% - 32px);max-height:90vh;box-shadow:0 24px 80px #182b2229;overflow:auto}dialog::backdrop{background:#1f30284d}dialog h2{font-size:26px;letter-spacing:-.6px;line-height:1.3;font-weight:650;margin:8px 0 16px}dialog p{font-size:14px;color:var(--muted);line-height:1.7}.dialog-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.dialog-top button{font-size:20px;color:var(--muted);padding:4px 10px}.field{display:block;font-size:14px;font-weight:600;margin-top:20px}.field input{display:block;width:100%;border:1px solid #bccdc1;border-radius:6px;padding:12px 14px;background:#fff;color:var(--ink);margin-top:8px;font-size:15px;font-weight:400}.field input::placeholder{color:#6b7870}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.small-note{font-size:12px!important}.rules-list{padding-left:22px;font-size:14px;line-height:1.8;color:var(--muted)}.rules-list li{margin-bottom:14px}.rules-list strong{color:var(--ink)}.leader-row{display:grid;grid-template-columns:40px 1fr 80px 75px;gap:10px;padding:14px 10px;border-bottom:1px solid var(--line);font-size:14px}.leader-row.you{background:var(--accent-soft)}.leader-row small{font-size:12px;color:var(--muted)}.leader-head{font-size:11px;color:var(--muted)}.leader-row b{font-weight:600}.leader-row>span:last-child{text-align:right}
#moderatorDialog{width:min(760px,94vw)}.selection-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:22px 0 16px}.selection-toolbar strong{font-size:13px;color:var(--green)}#problemChoices{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:24px}.problem-choice{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid var(--line);border-radius:7px;cursor:pointer}.problem-choice:has(input:checked){background:var(--accent-soft);border-color:#a7c5b2}.problem-choice:hover{border-color:#8ba997}.problem-choice input{width:18px;height:18px;flex-shrink:0;margin:3px 0 0;accent-color:var(--green)}.problem-choice strong,.problem-choice small{display:block}.problem-choice strong{font-size:14px;font-weight:600;line-height:1.45}.problem-choice small{font-size:12px;color:var(--muted);margin-top:5px}
@media(min-width:1600px){main{padding-left:40px;padding-right:40px}.arena{grid-template-columns:minmax(380px,1fr) minmax(540px,1.5fr)}}
@media(max-width:1250px){.sidebar{width:230px;padding:24px 14px}main{padding:0 20px 24px}.breadcrumbs{display:none}header{justify-content:flex-end}.arena{grid-template-columns:minmax(280px,1fr) minmax(350px,1.3fr)}.autosave{display:none}.execution-bar{flex-wrap:wrap}h1{font-size:27px}}
@media(max-width:1050px){.arena{grid-template-columns:1fr}.problem-pane{border-right:0;border-bottom:1px solid var(--line)}#problemContent,#schemaContent{max-height:470px}.editor{height:280px}.page-heading{align-items:flex-start}.page-heading h1{font-size:25px}.bottom-note>span:last-child{display:none}}
@media(max-width:720px){body{display:block}.sidebar{width:100%;padding:18px;border-right:0;border-bottom:1px solid var(--line)}.contest-card,.sidebar-score,.section-label{display:none}.project{font-size:20px}#challengeList{display:flex;gap:8px;overflow-x:auto;margin-top:16px;min-height:0}.challenge{min-width:210px;margin:0;padding:10px}.challenge strong{font-size:13px}.challenge small{font-size:11px}main{padding:0 16px 24px}header{min-height:64px;padding:10px 0}.header-right{justify-content:flex-start;width:100%;gap:4px}.header-right button{font-size:12px;padding:8px}.demo-tag{font-size:11px;flex-basis:100%}.page-heading{padding:22px 0;gap:16px}.page-heading h1{font-size:23px}.page-heading p{font-size:13px}.eyebrow{font-size:10px}.timer-box{min-width:95px}.timer-box strong{font-size:24px}.timer-box button{font-size:12px}.environment-note{font-size:12px}#problemContent,#schemaContent{padding:20px}.execution-bar>div{flex-wrap:wrap}.result-tabs{gap:14px}.result-tabs button{font-size:12px}.result-footer{flex-wrap:wrap}.editor-toolbar{flex-wrap:wrap;padding:8px 12px}.editor{font-size:13px}dialog{padding:22px}#problemChoices{grid-template-columns:1fr}.selection-toolbar{align-items:flex-start;flex-direction:column}.leader-row{grid-template-columns:30px 1fr 65px 55px;font-size:12px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.team-review{padding:20px 24px;border-top:1px solid var(--line);background:#f6f9f6}.team-review h3{font-size:15px;margin:0 0 10px}.team-review p{font-size:14px;line-height:1.7;color:var(--muted)}.team-review .comment-text{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--ink)}.team-review small{font-size:12px;color:var(--muted)}
