:root{color-scheme:light;--ink:#25372f;--muted:#7b837c;--line:#e1e5dd;--accent:#315c48;--split:50%;font-family:"Segoe UI",sans-serif;color:var(--ink);background:#f6f7f2}*{box-sizing:border-box}body{margin:0;height:100dvh;display:flex;flex-direction:column}header{min-height:94px;display:flex;align-items:center;gap:28px;padding:20px 30px;border-bottom:1px solid var(--line);background:#fcfcf9}.brand{display:flex;align-items:center;gap:13px;min-width:230px}.brand strong{font-size:23px;font-weight:650;letter-spacing:-.7px}.brand small{display:block;font-size:12px;color:var(--muted);margin-top:3px}.mark{border:1px solid #a9bbac;border-radius:9px;padding:7px;font-family:Consolas,monospace;font-size:19px;letter-spacing:-3px;color:var(--accent)}.mark span{margin-left:3px}.file{margin:auto;min-width:100px;text-align:center;font-size:13px;overflow:hidden}.file>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#save-state{font-size:11px;color:var(--muted);margin-top:5px}nav{display:flex;gap:8px}button{font:inherit;font-size:13px;font-weight:550;padding:9px 15px;border:1px solid var(--line);background:#fff;border-radius:7px;color:var(--ink);cursor:pointer;white-space:nowrap}button:hover{background:#edf1e9;border-color:#b0bdb1}button:focus-visible,input:focus-visible,#divider:focus-visible{outline:3px solid #91bca4;outline-offset:3px}.primary{background:var(--accent);border-color:var(--accent);color:white}.primary:hover{background:#254936;color:white}button:disabled{opacity:.5;cursor:wait}main{display:grid;grid-template-columns:minmax(0,var(--split)) 7px minmax(0,1fr);flex:1;min-height:0;padding:20px 24px 0}.pane{display:flex;min-width:0;min-height:0;flex-direction:column;background:white;border:1px solid var(--line);overflow:hidden}.source-pane{border-radius:9px 0 0 9px;background:#f9faf6}.preview-pane{border-radius:0 9px 9px 0}.pane-heading{height:48px;flex-shrink:0;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 23px;background:#fff}.pane-heading h1,.pane-heading h2{font-size:12px;font-weight:650;margin:0}.pane-heading>span{font-size:9px;letter-spacing:1.5px;color:#8a938b}.live{display:flex;align-items:center;gap:6px}.live i{height:5px;width:5px;background:#659c7c;border-radius:50%}textarea{resize:none;border:0;outline:0;width:100%;flex:1;min-height:0;background:transparent;padding:29px;font-family:Consolas,"Cascadia Code",monospace;font-size:14px;line-height:1.85;color:#46564d;tab-size:2}#divider{cursor:col-resize;position:relative;touch-action:none}#divider:hover,#divider:focus-visible{background:#b6cbb9}#preview-scroll{overflow:auto;flex:1;min-height:0;padding:29px 42px}article{max-width:760px;margin:0 auto;font-family:Georgia,"Times New Roman",serif;font-size:17px;line-height:1.75;color:#334138;overflow-wrap:anywhere}article>:first-child{margin-top:0}article h1,article h2,article h3,article h4{line-height:1.3;color:#24382c;letter-spacing:-.5px}article h1{font-size:36px;margin-bottom:20px}article h2{font-size:25px;margin-top:32px}article h3{font-size:21px}article a{color:#357353;text-underline-offset:3px}article p{margin:0 0 18px}article blockquote{margin:24px 0;border-left:3px solid #9db59c;padding:5px 20px;color:#6b7869;background:#f6f8f1}article blockquote p:last-child{margin:0}article code{font:13px Consolas,monospace;background:#eef2ea;padding:3px 5px;border-radius:3px}article pre{overflow:auto;padding:18px;background:#f0f3ed;border-radius:7px;line-height:1.6}article pre code{padding:0;background:transparent}article table{border-collapse:collapse;width:100%;font:14px "Segoe UI",sans-serif;margin:20px 0}article th,article td{border:1px solid var(--line);padding:10px;text-align:left}article th{background:#f1f5ee}article img{max-width:100%;height:auto}article hr{border:0;border-top:1px solid var(--line);margin:28px 0}article li{margin:5px 0}footer{height:44px;flex-shrink:0;display:flex;gap:18px;align-items:center;justify-content:space-between;padding:0 30px;font-size:11px;color:var(--muted)}footer label{display:flex;gap:6px;align-items:center;white-space:nowrap}input[type=checkbox]{accent-color:var(--accent)}#message{text-align:center}dialog{border:1px solid var(--line);border-radius:12px;padding:28px;max-width:440px;box-shadow:0 20px 80px #24382c33}dialog::backdrop{background:#24382c55}dialog h2{margin-top:0;font-size:22px}.dialog-actions{display:flex;gap:9px;justify-content:flex-end;margin-top:25px}@media(max-width:850px){header{padding:14px 18px;gap:12px;flex-wrap:wrap}.brand{min-width:150px}.brand small{display:none}.file{margin-left:auto;flex:1}nav{margin-left:auto}main{padding:10px 10px 0}.pane-heading{padding:0 14px}.pane-heading>span:not(.live){display:none}textarea{padding:18px;font-size:13px}#preview-scroll{padding:20px}article{font-size:15px}article h1{font-size:28px}footer{padding:0 15px}#message{display:none}}@media(max-width:520px){nav{width:100%;justify-content:flex-end}button{padding:8px 12px}.brand strong{font-size:20px}main{grid-template-columns:minmax(0,1fr);grid-template-rows:1fr 5px 1fr}#divider{cursor:default;pointer-events:none}.pane{border-radius:7px}.pane-heading{height:33px}footer{font-size:10px}}

#help-dialog{width:min(940px,calc(100vw - 32px));max-width:940px;max-height:86dvh;padding:0;color:var(--ink)}.help-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:25px 28px 19px;border-bottom:1px solid var(--line);background:#f9faf6;position:sticky;top:0}.help-header h2{margin:0 0 7px}.help-header p{margin:0;color:var(--muted);font-size:13px}.help-content{padding:22px 28px;font-size:14px;line-height:1.65}.help-tip{color:#68776b}.help-content p:first-child{margin-top:0}.help-table{width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}.help-table th,.help-table td{text-align:left;padding:13px 12px;vertical-align:top;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.help-table th{background:#eef3eb;font-size:11px;text-transform:uppercase;letter-spacing:.6px}.help-table th:first-child{width:20%}.help-table th:nth-child(2){width:43%}.help-table code,.help-content code{font:12px/1.7 Consolas,monospace;color:#315c48;white-space:pre-wrap;overflow-wrap:anywhere}.help-table pre{margin:0;white-space:pre-wrap}.help-example{padding:16px;background:#f0f3ed;border-radius:7px;white-space:pre-wrap}.help-content h3{font-size:16px;margin:25px 0 10px}kbd{font:11px Consolas,monospace;border:1px solid #d4ded1;border-radius:4px;padding:2px 5px;background:#f6f8f2}@media(max-width:600px){.help-header{padding:18px}.help-header h2{font-size:19px}.help-content{padding:16px}.help-table th,.help-table td{padding:10px 6px}.help-table th:first-child{width:23%}.help-table th:nth-child(2){width:45%}.help-table{font-size:12px}}
 
@page { margin: 0.7in; }
@media screen {
  header nav { flex-wrap: wrap; justify-content: flex-end; }
}
@media print {
  :root { background: white; }
  body, main, .preview-pane, #preview-scroll {
    display: block;
    width: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
  }
  body > header, body > footer, .source-pane, #divider, .pane-heading, dialog {
    display: none !important;
  }
  #preview {
    max-width: none;
    font-size: 11pt;
    line-height: 1.5;
    print-color-adjust: exact;
  }
  #preview h1 { font-size: 24pt; }
  #preview h2 { font-size: 17pt; }
  #preview h3 { font-size: 13pt; }
  #preview h1, #preview h2, #preview h3, #preview h4, #preview h5, #preview h6 {
    break-after: avoid;
  }
  #preview p, #preview li { orphans: 2; widows: 2; }
  #preview pre { overflow: visible; white-space: pre-wrap; overflow-wrap: anywhere; }
  #preview table, #preview code { font-size: 9pt; }
  #preview tr, #preview img { break-inside: avoid; }
  #preview img { max-height: 8in; object-fit: contain; }
}
