.doc-detail:has(#docSingleDetail:not(.hidden) #mdPane:not([hidden])) {background:white}
.doc-workspace,.doc-workspace>* {min-width:0}
#docSingleDetail:has(#mdPane:not([hidden])) {width:100%;max-width:none;box-sizing:border-box;border:0;box-shadow:none;background:transparent;padding:0}
#docSingleDetail:has(#mdPane:not([hidden]))>.doc-type {display:none}
#docSingleDetail:has(#mdPane:not([hidden]))>dl {display:flex;flex-wrap:wrap;gap:6px 20px;margin:8px 0 16px}
#docSingleDetail:has(#mdPane:not([hidden]))>dl>div {display:flex;align-items:baseline;gap:6px;padding:0;border:0}
#docSingleDetail:has(#mdPane:not([hidden]))>dl>div:nth-child(4) {display:none}
#mdPane [hidden] {display:none!important}
.md-actions {display:flex;align-items:center;gap:8px;border-block:1px solid #dae1e6;padding:8px 0;color:#52646c;font-size:13px}
#mdStatus {margin-right:auto}
.md-actions button {border:1px solid #becad1;background:white;color:#253a43;border-radius:5px;padding:6px 12px;cursor:pointer}
#mdSave {background:#176958;color:white}
.md-columns {min-width:0}
.md-columns:has(textarea:not([hidden])) {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;padding-top:16px}
#mdSource {width:100%;min-width:0;height:54vh;box-sizing:border-box;padding:14px;border:1px solid #bac8ca;border-radius:5px;font:14px/1.65 Consolas,monospace;resize:vertical}
#mdOutput {min-width:0;max-width:780px;margin:0 auto;padding:18px 0 40px;line-height:1.75;font-size:16px;color:#23313a;overflow:auto;overflow-wrap:anywhere}
.md-columns:has(textarea:not([hidden])) #mdOutput {width:100%;padding-top:0}
#mdOutput h1,#mdOutput h2,#mdOutput h3 {line-height:1.35;margin:1.3em 0 .55em}
#mdOutput h1 {font-size:26px} #mdOutput h2 {font-size:20px}
#mdOutput>:first-child {margin-top:0}
#mdOutput table {border-collapse:collapse;width:100%;font-size:14px}
#mdOutput th,#mdOutput td {padding:8px 12px;border:1px solid #d6dfe1;text-align:left}
#mdOutput th {background:#eff5f3}
#mdOutput blockquote {margin:14px 0;border-left:3px solid #649a90;padding:0 14px;color:#536664}
#mdOutput pre {overflow:auto;background:#f2f4f5;padding:12px}
#mdOutput img {max-width:100%;height:auto}
@media(max-width:950px){.md-columns:has(textarea:not([hidden])) {grid-template-columns:minmax(0,1fr)} #mdSource {height:30vh}}

.doc-workspace:has(#docSingleDetail:not(.hidden) #mdPane:not([hidden])) {
  margin-inline:auto; width:100%; gap:24px;
  --md-ink:#203039; --md-accent:#116854; --md-rule:#dce5e2;
}
.doc-workspace:has(#docSingleDetail:not(.hidden) #mdPane:not([hidden])) .doc-workspace-header {
  align-items:center; border-bottom:1px solid var(--md-rule); padding-bottom:14px;
}
.doc-workspace:has(#docSingleDetail:not(.hidden) #mdPane:not([hidden])) #docWorkspaceMeta {display:none}
.doc-workspace:has(#docSingleDetail:not(.hidden) #mdPane:not([hidden])) #docWorkspaceTitle {font-size:16px}
#docSingleDetail:has(#mdPane:not([hidden])) {margin-inline:auto}
#docSingleDetail:has(#mdPane:not([hidden])):not(:has(#mdSource:not([hidden]))) {max-width:800px}
#docSingleDetail:has(#mdPane:not([hidden]))>#docTitle {font-size:28px;line-height:1.35;margin:4px 0 12px;color:var(--md-ink);overflow-wrap:anywhere}
#docSingleDetail:has(#mdPane:not([hidden]))>dl {margin-bottom:20px}
.md-actions {border:0;border-bottom:1px solid var(--md-rule);padding:4px 0 12px}
.md-actions strong {color:var(--md-accent);font-size:12px}
.md-actions button {min-height:32px;padding-inline:14px;font-weight:600}
#mdEdit {background:#ecf6f2;color:#125742;border-color:#c6dfd4}
.md-actions button:hover {filter:brightness(.96)}
#mdOutput {max-width:none;padding-top:24px;font-size:16px;line-height:1.85}
#mdOutput h2 {margin-top:1.6em;border-bottom:1px solid var(--md-rule);padding-bottom:6px}
#mdOutput p {margin:.7em 0}
#mdOutput th {background:#e9f3ef;color:#204c40}
#mdOutput tbody tr:nth-child(even) {background:#f7faf9}
#mdOutput blockquote {background:#f1f7f4;padding:5px 16px}
#mdOutput :not(pre)>code {background:#edf1f2;border-radius:3px;padding:2px 4px}
#mdSource {background:#f8faf9;line-height:1.8;tab-size:2}
#mdSource:focus-visible,.md-actions button:focus-visible {outline:2px solid #288269;outline-offset:2px}
@media(max-width:600px){#docSingleDetail:has(#mdPane:not([hidden]))>#docTitle {font-size:23px}.md-actions {flex-wrap:wrap}}
.doc-source {display:flex;gap:4px;padding:4px;border-radius:6px;background:#edf2f1}
.doc-source label {flex:1;text-align:center;padding:7px 4px;cursor:pointer;font-size:14px;position:relative}
.doc-source input {position:absolute;opacity:0;width:1px;height:1px}
.doc-source label:has(:checked) {background:white;color:#165f50;border-radius:4px;box-shadow:0 1px 3px #182f2925;font-weight:700}
.doc-source label:focus-within,#mdDrop:focus-within {outline:2px solid #287966}
#mdDrop {position:relative;display:grid;gap:6px;text-align:center;align-content:center;min-height:92px;padding:12px;border:1px dashed #80aa9e;background:#f4faf7;border-radius:6px;color:#205c4e;overflow-wrap:anywhere}
#mdDrop input {position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
#docForm [hidden] {display:none!important}
