/* Document colors are scoped independently of editor chrome. An explicit
   data-document-theme wins; the interactive preview follows UI theme by default. */
.preview-body {
  --preview-text:#d8dadf; --heading-text:#f4f5f7; --text:#e7e8ec;
  --text-dim:#9a9da6; --text-mute:#858994; --border:#2a2b32;
  --blue:#5aa2ef; --blue-soft:rgba(90,162,239,.14); --bg-elevated:#212228;
  --hover:rgba(255,255,255,.05); --bg-inline-code:#26272e; --code-text:#ffb27a; --bg-code:#16171c;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-family:"Apple SD Gothic Neo","Malgun Gothic",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  color-scheme:dark;
}
.preview-body[data-document-theme="light"], :root[data-ui-theme="light"] .preview-body:not([data-document-theme]) {
  --preview-text:#343b47; --heading-text:#171f2c; --text:#252a34;
  --text-dim:#596273; --text-mute:#6e7787; --border:#dce1e8;
  --blue:#246ec4; --blue-soft:rgba(36,110,196,.09); --bg-elevated:#f4f6fa;
  --hover:rgba(34,52,78,.05); --bg-inline-code:#edf0f5; --code-text:#965014; --bg-code:#f6f8fb;
  color-scheme:light;
}
  /* ---------- Preview typography ---------- */
  .preview-body{
    font-size:15px;line-height:1.75;color:var(--preview-text);
  }
  .preview-body h1,.preview-body h2,.preview-body h3,.preview-body h4,.preview-body h5,.preview-body h6{
    color:var(--heading-text);font-weight:700;line-height:1.35;margin:1.4em 0 .6em;
  }
  .preview-body h1{font-size:1.9em;padding-bottom:.35em;border-bottom:1px solid var(--border);margin-top:0;}
  .preview-body h2{font-size:1.4em;padding-bottom:.3em;border-bottom:1px solid var(--border);}
  .preview-body h3{font-size:1.15em;}
  .preview-body h5{font-size:1.05em;}
  .preview-body h6{font-size:.95em;}
  .preview-body p{margin:.7em 0;}
  .preview-body strong{color:var(--heading-text);font-weight:700;}
  .preview-body em{color:var(--text);}
  .preview-body a{color:var(--blue);text-decoration:none;}
  .preview-body a:hover{text-decoration:underline;}
  .preview-body ul,.preview-body ol{padding-left:1.5em;margin:.6em 0;}
  .preview-body li{margin:.25em 0;}
  .preview-body li.task-list-item{list-style:none;margin-left:-1.5em;padding-left:1.5em;}
  .preview-body input[type="checkbox"]{accent-color:var(--blue);margin-right:.5em;}
  .preview-body blockquote{
    margin:.9em 0;padding:.4em 1em;border-left:3px solid var(--blue);
    background:var(--blue-soft);color:var(--text-dim);border-radius:0 6px 6px 0;
  }
  .preview-body hr{border:none;border-top:1px solid var(--border);margin:1.8em 0;}
  .preview-body table{border-collapse:collapse;margin:1em 0;width:100%;font-size:.92em;}
  .preview-body th,.preview-body td{border:1px solid var(--border);padding:.5em .8em;text-align:left;}
  .preview-body :is(th,td)[align="center"]{text-align:center;}
  .preview-body :is(th,td)[align="right"]{text-align:right;}
  .preview-body th{background:var(--bg-elevated);color:var(--heading-text);}
  .preview-body tr:nth-child(even) td{background:var(--hover);}
  .preview-body code{
    font-family:var(--mono);background:var(--bg-inline-code);color:var(--code-text);border-radius:4px;
    padding:.15em .4em;font-size:.88em;
  }
  .preview-body pre{
    background:var(--bg-code);border:1px solid var(--border);border-radius:8px;
    padding:14px 16px;overflow:auto;margin:1em 0;
  }
  .preview-body pre code{
    background:none;color:inherit;padding:0;font-size:.88em;line-height:1.6;
    display:block;
  }
  .preview-body img{max-width:100%;height:auto;}
  .preview-body figure{margin:1em 0;}
  .preview-body figcaption{font-size:.88em;color:var(--text-dim);margin-top:.5em;}
  .preview-body .empty-state{color:var(--text-mute);font-style:italic;}


.shared-html-block { contain:layout style; display:flow-root; position:relative; max-width:100%; margin:1em 0; color:#222; background:#fff; overflow-wrap:anywhere; }
