/* Editor chrome is never part of stored page content. */
#cms-toolbar, .cms-window, #cms-dialog-root { font:13px/1.5 monospace; color:#111; text-transform:none; letter-spacing:normal; }
#cms-toolbar { position:fixed; z-index:10000; left:12px; right:12px; bottom:12px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px; background:#eee; border:2px solid #111; box-shadow:3px 3px 0 #111; }
#cms-toolbar button,.cms-window button,.cms-window input,.cms-window select,.cms-window textarea {font:inherit; color:#111; border:1px solid #111; border-radius:0; background:white; padding:6px 10px; min-height:34px; width:auto; cursor:pointer;box-shadow:1px 1px 0 #111; text-transform:none;}
#cms-toolbar button:disabled,.cms-window button:disabled {opacity:.5;cursor:wait;}
#cms-toolbar a,.cms-window a {color:#111; text-decoration:underline;}
#cms-page-name {max-width:160px;overflow:hidden;text-overflow:ellipsis;}
#cms-status {flex:1 1 220px;font-size:11px;}
body.cms-editing {padding-bottom:145px;}
body.cms-editing [contenteditable=true] {outline:1px dashed #aaa;outline-offset:3px;cursor:text;}
body.cms-editing [contenteditable=true]:focus {outline:2px solid #111;background:#fffbe0;}
body.cms-editing img {cursor:copy;}
body.cms-editing .portrait-grey {pointer-events:none;}
body.cms-editing .portrait-photo:hover .portrait-grey {opacity:0;}
.cms-window {background:#eee;border:2px solid #111;box-shadow:4px 4px 0 #111;padding:20px;min-width:0;width:min(580px,calc(100vw - 32px));max-height:80vh;overflow:auto;box-sizing:border-box;}
.cms-window h1,.cms-window h2 {font:bold 17px/1.4 monospace;margin:0 0 12px;letter-spacing:normal;text-transform:none;}
.cms-window label {display:block;margin:12px 0;font-size:13px;}
.cms-window input:not([type=checkbox]),.cms-window select,.cms-window textarea {display:block;width:100%;box-sizing:border-box;margin-top:5px;cursor:text;}
.cms-window p {margin:10px 0;font:13px/1.6 monospace;}
.cms-window button {margin:4px 5px 4px 0;}
.cms-window [role=alert] {color:#8a1212;}
.cms-window .cms-actions {display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end;margin-top:14px;}
.cms-overlay {position:fixed;inset:0;z-index:10001;background:#0005;display:grid;place-items:center;padding:16px;}
.cms-login {margin:0;min-height:100vh;display:grid;place-items:center;background:repeating-conic-gradient(#ddd 0% 25%,white 0% 50%) 0 0/4px 4px;}
.cms-page-row {padding:12px 0;border-bottom:1px solid #999;}
.cms-page-row strong {display:block;}
.cms-page-logo {max-width:70%;height:auto;margin:12px 0 26px;}
.cms-page-body {margin:24px 0 70px;}
.cms-page-body p {margin:1em 0;}
#cms-upload-preview {display:block;max-width:100%;max-height:220px;margin:10px 0;image-rendering:pixelated;}
@media(max-width:600px){#cms-toolbar {left:5px;right:5px;bottom:5px;gap:5px;padding:7px;}#cms-toolbar strong{flex:1 1 60%;}#cms-status{flex-basis:100%;}#cms-toolbar button{padding:5px 8px;} .cms-window{padding:16px;} }
/* Rearranging controls never appear in public HTML. */
body.cms-editing .cms-reorder-target{position:relative}
.cms-move-controls{position:absolute;top:4px;right:4px;z-index:8;display:flex;gap:2px;padding:2px;background:#eee;border:1px solid #111;box-shadow:1px 1px 0 #111;font:12px/1 monospace;color:#111;white-space:nowrap;cursor:default}
.cms-section-target>.cms-move-controls{top:-27px;right:0}
.cms-move-controls button{font:14px/1 monospace!important;border:1px solid #111;background:#fff;color:#111;padding:2px 4px;width:25px;height:25px;min-height:25px;box-shadow:none;cursor:pointer}
.cms-move-controls button:disabled{opacity:.35;cursor:default}
.cms-move-controls .cms-grip{cursor:grab;touch-action:none}
.cms-fixed-hero{font:10px/1.4 monospace;top:4px;right:4px;padding:4px}
.cms-dragging{outline:2px dashed #111!important;opacity:.65}
#cms-drop-indicator{display:none;position:fixed;z-index:10005;pointer-events:none;background:#111;box-shadow:0 0 0 2px #fff}
.cms-move-controls button:focus-visible{outline:2px solid #111;outline-offset:2px}
body.cms-editing .check-list>li{padding-right:151px;min-height:34px}
body.cms-editing .faq summary{padding-right:151px;min-height:34px}
body.cms-editing .step{padding-top:44px}
body.cms-editing .oath-items>div{padding-top:38px}
@media(max-width:560px){.cms-move-controls button{width:25px;height:27px;min-height:27px;padding:2px}.cms-section-target>.cms-move-controls{top:-28px}.cms-move-controls{gap:1px}body.cms-editing .check-list>li,body.cms-editing .faq summary{padding-right:0;padding-top:39px}.cms-fixed-hero{font-size:9px}}
#cms-layout[aria-pressed=true]{background:#111;color:#fff;}
/* Theme switcher (homepage, desktop layout) */
#cms-theme-label{display:inline-flex;align-items:center;gap:6px}
#cms-toolbar select{font:inherit;color:#111;border:1px solid #111;border-radius:0;background:white;padding:6px 8px;min-height:34px;box-shadow:1px 1px 0 #111;max-width:260px}
/* Keep text being edited readable on dark themes */
body.cms-editing [contenteditable=true]:focus{color:#111;text-shadow:none}
/* Replace image: border picker */
.cms-window .cms-frame-preview{width:200px;margin:10px 0}
.cms-window .cms-frame-preview #cms-upload-preview{width:100%;max-width:none;max-height:none;margin:0}
#cms-frame-picker{border:1px solid #111;margin:12px 0;padding:6px 10px 8px;display:flex;flex-wrap:wrap;gap:4px 14px}
#cms-frame-picker legend{font-size:13px;padding:0 4px}
#cms-frame-picker label{margin:4px 0;display:inline-flex;align-items:center;gap:5px;font-size:13px}
#cms-frame-picker input[type=radio]{display:inline-block;width:auto;min-height:0;margin:0;padding:0;box-shadow:none}
/* Replace image: clear, clickable checkbox */
.cms-window label.cms-check{display:flex;align-items:center;gap:8px;cursor:pointer;font-size:14px}
.cms-window input[type=checkbox]{-webkit-appearance:auto;appearance:auto;width:18px;height:18px;min-height:0;margin:0;padding:0;border:0;box-shadow:none;flex:none;accent-color:#111;cursor:pointer}
