/* Editing challenge: find the data leak. Scoped to .leak-page so it never affects other pages. */
.leak-safety{margin:0 0 28px;padding:16px 18px;border-radius:14px;background:#e6f2ec;max-width:70ch}
.leak-safety p{margin:0;line-height:1.6;color:#193f43}
.leak-safety a{color:#17594f;font-weight:600}
body[data-theme="dark"] .leak-safety{background:#1d332f;color:#d8efe6}
body[data-theme="dark"] .leak-safety p{color:#d8efe6}

.leak-grid{display:grid;grid-template-columns:320px minmax(0,1fr);gap:28px;align-items:start}
.leak-instructions h2{margin:0 0 12px;font-size:20px}
.leak-instructions ol{margin:0 0 18px;padding-left:1.3em;line-height:1.7}
.leak-instructions ol li{margin-bottom:6px}
.leak-hint{margin:0 0 10px;border:1px solid #d9e5e1;border-radius:12px;padding:10px 14px;background:#fffdf8}
.leak-hint summary{cursor:pointer;font-weight:700;color:#17594f}
.leak-hint p{margin:8px 0 0;line-height:1.6}
.leak-why{margin-top:18px;line-height:1.65;color:#4d6863;font-size:15px}
.leak-why a{color:#17594f}
body[data-theme="dark"] .leak-hint{background:#172724;border-color:#2c4a43}
body[data-theme="dark"] .leak-why{color:#b9d3ca}

.leak-workspace{min-width:0}
.leak-toolbar{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border:1px solid #d9e5e1;border-bottom:0;border-radius:12px 12px 0 0;background:#17594f;color:#fff;font:600 13px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace}
.leak-toolbar button{border:0;border-radius:999px;padding:6px 14px;font:600 13px/1 inherit;font-family:'DM Sans',system-ui,sans-serif;cursor:pointer;background:#fffdf8;color:#17594f;margin-left:8px}
.leak-toolbar button.primary{background:#e8684a;color:#fff}
.leak-toolbar button:hover{filter:brightness(.95)}
#leak-editor{display:block;width:100%;min-height:260px;box-sizing:border-box;margin:0;padding:14px;border:1px solid #d9e5e1;border-top:0;border-radius:0 0 12px 12px;background:#fffdf8;color:#17221f;font:13.5px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;resize:vertical}
#leak-editor:focus{outline:2px solid #17594f;outline-offset:-2px}

.leak-preview-row{display:grid;grid-template-columns:1fr 280px;gap:16px;margin-top:16px}
.leak-preview,.leak-monitor{border:1px solid #d9e5e1;border-radius:14px;background:#fffdf8;overflow:hidden}
.leak-panel-label{margin:0;padding:8px 12px;font:700 12px/1.4 'DM Sans',system-ui,sans-serif;letter-spacing:.04em;text-transform:uppercase;color:#4d6863;border-bottom:1px solid #d9e5e1;background:#f3f0ea}
#leak-frame{display:block;width:100%;height:340px;border:0;background:#fff}
.leak-monitor-status{padding:12px;font:600 14px/1.5 'DM Sans',system-ui,sans-serif;color:#4d6863;border-bottom:1px solid #d9e5e1}
.leak-monitor.is-clean .leak-monitor-status{color:#17594f;background:#e6f2ec}
.leak-monitor.is-leaking .leak-monitor-status{color:#9a2b1f;background:#fbe6e2}
.leak-monitor-log{list-style:none;margin:0;padding:8px 12px;max-height:240px;overflow:auto;font:12.5px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace}
.leak-monitor-log li{margin-bottom:10px;padding:8px 10px;border-radius:8px;background:#fbe6e2;color:#7a241a;word-break:break-word}
.leak-monitor-log li b{display:block;font-family:'DM Sans',system-ui,sans-serif;color:#9a2b1f}

body[data-theme="dark"] #leak-editor{background:#101615;color:#dfeae6;border-color:#2c4a43}
body[data-theme="dark"] .leak-preview,body[data-theme="dark"] .leak-monitor{background:#101615;border-color:#2c4a43}
body[data-theme="dark"] .leak-panel-label{background:#172724;border-color:#2c4a43;color:#9fb3ae}
body[data-theme="dark"] .leak-toolbar{background:#0f453d}
body[data-theme="dark"] .leak-monitor-status{border-color:#2c4a43;color:#9fb3ae}
body[data-theme="dark"] .leak-monitor.is-clean .leak-monitor-status{background:#1d332f;color:#8fd3bf}
body[data-theme="dark"] .leak-monitor.is-leaking .leak-monitor-status{background:#3a1c18;color:#ffb3a3}
body[data-theme="dark"] .leak-monitor-log li{background:#3a1c18;color:#ffb3a3}
body[data-theme="dark"] .leak-monitor-log li b{color:#ffcabd}

@media (max-width:860px){
 .leak-grid{grid-template-columns:1fr}
 .leak-preview-row{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){.leak-toolbar button{transition:none}}
