:root {
  --bg: #1a1a1a;
  --panel: #262626;
  --border: #3a3a3a;
  --text: #e6e6e6;
  --muted: #9a9a9a;
  --accent: #2cbb5d;
  --fail: #ef4743;
  --easy: #00b8a3;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, Segoe UI, sans-serif;
  display: flex;
  flex-direction: column;
}
header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
}
header h1 { font-size: 16px; margin: 0; }
.badge { color: var(--easy); font-size: 12px; font-weight: 600; }
.muted { color: var(--muted); font-size: 12px; }
.spacer { flex: 1; }
main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(260px, 2fr) 3fr;
  gap: 8px;
  padding: 8px;
  min-height: 0;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: auto;
}
#description { padding: 4px 16px; }
pre, code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
#description pre { background: #1e1e1e; padding: 10px; border-radius: 6px; }
#description code { background: #1e1e1e; padding: 1px 4px; border-radius: 4px; }
.editor-panel { display: flex; flex-direction: column; overflow: hidden; }
.toolbar { display: flex; gap: 8px; padding: 8px; border-bottom: 1px solid var(--border); }
#editor { flex: 1; min-height: 200px; }
#editor .CodeMirror { height: 100%; font-size: 14px; }
#results { max-height: 40%; overflow: auto; border-top: 1px solid var(--border); padding: 8px 12px; }
#results:empty { display: none; }
.summary { font-weight: 600; margin-bottom: 6px; }
.pass { color: var(--accent); }
.fail { color: var(--fail); }
.case { border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; margin: 6px 0; font-family: ui-monospace, Menlo, monospace; font-size: 12px; white-space: pre-wrap; }
button, select {
  background: #3a3a3a;
  color: var(--text);
  border: 0;
  border-radius: 6px;
  padding: 6px 14px;
  font: inherit;
  cursor: pointer;
}
button:disabled { opacity: .5; cursor: wait; }
button.primary { background: var(--accent); color: #fff; font-weight: 600; }
button.ghost { background: transparent; border: 1px solid var(--border); }
@media (max-width: 760px) {
  main { grid-template-columns: 1fr; grid-auto-rows: minmax(300px, auto); }
  #learner { display: none; }
}
