/* Code Editor: the file views (pictures, audio, video, PDF and binary) and the rendered Markdown preview. They take the
 * editor's place in the main column. Colours are the Code Editor tokens from base.css. */
.cd-viewer { min-height: 0; min-width: 0; overflow: auto; background: var(--cd-bg); color: var(--cd-fg); }
.cd-media { height: 100%; min-height: 0; display: grid; place-items: center; align-content: center; gap: 12px; padding: 16px; box-sizing: border-box; }
.cd-media .spv { min-height: 100%; }
.cd-media-name { margin: 0; color: var(--cd-dim); font-size: 13px; overflow-wrap: anywhere; text-align: center; }
.cd-audio audio { width: min(560px, 100%); }
.cd-video { max-width: 100%; max-height: 100%; background: var(--cd-bg); }
.cd-pdf { display: block; width: 100%; height: 100%; border: 0; background: var(--cd-panel); }
.cd-bin { max-width: 560px; margin: 0 auto; padding: 32px 16px; display: grid; gap: 12px; justify-items: start; }
.cd-bin h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.cd-bin p { margin: 0; color: var(--cd-dim); line-height: 1.55; }
.cd-bin-apps { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cd-bin-apps .cd-hint { width: 100%; margin: 0; }
.cd-md { max-width: 760px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 48px; line-height: 1.65; overflow-wrap: anywhere; }
.cd-md h1, .cd-md h2, .cd-md h3, .cd-md h4, .cd-md h5, .cd-md h6 { line-height: 1.25; margin: 1.4em 0 .5em; }
.cd-md h1 { font-size: 28px; } .cd-md h2 { font-size: 22px; } .cd-md h3 { font-size: 18px; }
.cd-md p, .cd-md ul, .cd-md ol, .cd-md blockquote, .cd-md pre { margin: 0 0 1em; }
.cd-md blockquote { padding: 0 14px; border-left: 3px solid var(--cd-line); color: var(--cd-dim); }
.cd-md hr { border: 0; border-top: 1px solid var(--cd-line); margin: 1.6em 0; }
.cd-md code { font: 13px/1.5 var(--cd-mono); padding: 1px 5px; border-radius: 4px; background: var(--cd-hover); }
.cd-md pre { padding: 12px 14px; overflow-x: auto; border-radius: 8px; background: var(--cd-panel); border: 1px solid var(--cd-line); }
.cd-md pre code { padding: 0; background: none; }
.cd-md a { color: var(--cd-accent); }
