:root { color-scheme: light; font-family: system-ui, sans-serif; color: #172334; background: #f3f5f8; }
* { box-sizing: border-box; }
body { margin: 0; }
.app-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1.2rem 1.5rem; background:#15283e; color:white; }
.eyebrow { margin:0 0 .35rem; font-size:.8rem; letter-spacing:.04em; }
h1 { margin:0; font-size:1.5rem; }
.version { font-size:.8rem; color:#d4e1ef; }
main { padding:1rem; margin:auto; }
.toolbar { padding:.65rem; background:white; border:1px solid #cbd4de; border-radius:.4rem; margin-bottom:.75rem; }
#controls { display:flex; flex-wrap:wrap; align-items:center; gap:.55rem; border:0; padding:0; margin:0; min-width:0; }
.tool-group { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; padding-right:.55rem; border-right:1px solid #d6dfe8; }
.tool-group:last-child { border:0; padding-right:0; }
button { font:inherit; font-size:.83rem; color:#23394d; background:#edf2f7; border:1px solid #cbd4de; border-radius:.3rem; padding:.48rem .68rem; cursor:pointer; }
.toolbar button:hover:not(:disabled) { background:#dce6f0; }
button.primary { background:#214b78; color:white; border-color:#214b78; }
.toolbar button.primary:hover:not(:disabled) { background:#17395d; }
button:disabled { opacity:.48; cursor:default; }
button:focus-visible, input:focus-visible, #splitter:focus-visible { outline:3px solid #719ac2; outline-offset:2px; }
.tool-group label { font-size:.83rem; display:inline-flex; align-items:center; gap:.3rem; padding:.25rem; white-space:nowrap; }
#status { margin:.5rem .2rem 0; font-size:.8rem; color:#42536a; min-height:1.2em; overflow-wrap:anywhere; }
#status[data-error="true"] { color:#a02222; }
.workspace { --source-share:50%; display:grid; grid-template-columns:minmax(0,var(--source-share)) 12px minmax(0,1fr); }
.panel { min-width:0; border:1px solid #cbd4de; border-radius:.4rem; overflow:hidden; background:white; }
.panel-heading { min-height:2.6rem; display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; padding:.55rem .7rem; background:#e6ebf1; border-bottom:1px solid #cbd4de; font-size:.8rem; }
.panel h2 { font-size:.85rem; font-weight:650; margin:0; }
.filename { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#42536a; }
.document-state, #preview-status { margin-left:auto; font-size:.75rem; color:#42536a; }
.document-state[data-dirty="true"] { color:#93520b; font-weight:650; }
#editor, #preview { height:max(420px,65vh); width:100%; }
#editor .cm-editor { height:100%; }
#editor .cm-scroller { overflow:auto; }
#editor .cm-panel button { padding:.18rem .35rem; }
#preview { border:0; display:block; background:white; }
#splitter { position:relative; cursor:col-resize; touch-action:none; }
#splitter::after { content:""; position:absolute; inset:0 4px; background:#aab8c7; border-radius:3px; }
#splitter:hover::after, #splitter:focus-visible::after { background:#214b78; }
.workspace.dragging iframe { pointer-events:none; }
.workspace.dragging { user-select:none; }
.statusbar { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.45rem 1rem; padding:.5rem .7rem; margin-top:.65rem; background:#15283e; color:#e1e9f3; border-radius:.3rem; font-size:.77rem; overflow-wrap:anywhere; }
.note { font-size:.8rem; line-height:1.5; color:#526176; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
@media (max-width:760px) { .workspace { grid-template-columns:minmax(0,1fr); gap:.75rem; } #splitter, #reset-width { display:none; } .app-header { flex-wrap:wrap; } .tool-group { border:0; } #editor,#preview { height:max(350px,55vh); } }
