:root { color-scheme: light; font: 15px/1.5 system-ui, sans-serif; color: #222; background: #fff; }
* { box-sizing: border-box; }
body { margin: 0 auto; max-width: 1500px; padding: 24px; }
header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 16px; }
header nav { display: flex; gap: 20px; }
h1 { margin: 0; font-size: 22px; font-weight: 600; }
h1 a { color: inherit; text-decoration: none; }
header p { grid-column: 1 / -1; margin: 4px 0 24px; color: #666; }
h2 { margin: 0; padding: 10px 14px; border-bottom: 1px solid #ddd; font-size: 14px; font-weight: 600; }
button, select { padding: 6px 14px; border: 1px solid #aaa; border-radius: 3px; background: #fff; color: #222; font: inherit; cursor: pointer; }
button:hover { background: #f4f4f4; }
button:disabled { opacity: .5; cursor: wait; }
:focus-visible { outline: 2px solid #245caa; outline-offset: 2px; }
a { color: #245caa; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.toolbar-group { display: flex; align-items: center; gap: 8px; max-width: 100%; }
#example { min-width: 0; width: 260px; max-width: 100%; }
#evaluate { font-weight: 600; border-color: #555; }
.hint { margin-left: auto; color: #777; font-size: 13px; }
#working { visibility: hidden; color: #666; }
#working.htmx-request { visibility: visible; }
.panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid #ddd; }
.panes section { min-width: 0; }
.panes section + section { border-left: 1px solid #ddd; }
textarea, .cm-editor, pre { font: 14px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 4; }
textarea { display: block; width: 100%; height: 60vh; min-height: 320px; padding: 12px 14px; resize: vertical; border: 0; color: inherit; background: #fff; }
[hidden] { display: none !important; }
.cm-editor { height: 60vh; min-height: 320px; }
.cm-scroller { overflow: auto; }
.cm-editor .cm-gutters { background: #fff; border-right: 1px solid #eee; color: #888; }
/* CodeMirror draws selections below the text, so keep this translucent. */
.cm-editor .cm-activeLine { background: #00000009; }
.cm-editor .cm-activeLineGutter { background: #f6f6f6; }
.cm-editor.cm-focused { outline: none; }
/* Paint the focus border above the gutter and active-line backgrounds. */
.cm-editor:focus-within::after { content: ""; position: absolute; inset: 0; z-index: 5; border: 1px solid #245caa; pointer-events: none; }
#output { display: flex; flex-direction: column; height: 60vh; min-height: 320px; overflow: hidden; }
#output .result-text { flex: 1; min-height: 0; overflow: auto; padding: 0 16px 12px; }
.result-editor { flex: 1; min-height: 0; }
.result-editor .cm-editor { height: 100%; min-height: 0; }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.placeholder, .result-status { margin: 12px 16px; color: #777; font-size: 13px; }
.error { color: #a02020; }
#share-result { overflow-wrap: anywhere; }
#share-result p { margin: 0 0 16px; }
#copy-share { margin-left: 6px; padding: 2px 8px; font-size: 13px; }
#notice:empty { display: none; }
#notice, footer { color: #666; font-size: 13px; }
footer { margin-top: 16px; }
footer p { margin: 4px 0; }
.cue-version { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  body { padding: 16px; }
  .hint { display: none; }
  .panes { grid-template-columns: minmax(0, 1fr); }
  .panes section + section { border-left: 0; border-top: 1px solid #ddd; }
  textarea, .cm-editor { height: 45vh; min-height: 260px; }
  #output { height: 45vh; min-height: 200px; max-height: 60vh; }
}
