/* Markdown Formatter & Converter */
.t101-md-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.t101-md-split { display: grid; gap: 16px; min-width: 0; }
.t101-md-split > * { min-width: 0; }
@media (min-width: 1180px) {
  .t101-md-split.is-split { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .t101-md-split.is-split .t101-md-preview { max-height: none; height: calc(100% - 34px); }
}

.t101-md-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 0 8px; padding: 4px; border: 1px solid var(--t101-border); border-radius: 10px; background: var(--t101-soft); }
.t101-md-toolbar[hidden] { display: none; }
.t101-md-tool { appearance: none; border: 0; background: none; min-width: 32px; height: 30px; padding: 0 8px; border-radius: 6px; color: var(--t101-text); font: 600 13px/30px system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.t101-md-tool:hover { background: var(--t101-surface); box-shadow: 0 0 0 1px var(--t101-border); }
.t101-md-tool:focus-visible { outline: 2px solid var(--t101-accent); outline-offset: 0; }
.t101-md-tool.is-b { font-weight: 800; }
.t101-md-tool.is-i { font-style: italic; font-family: Georgia, serif; }
.t101-md-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--t101-border); }
.t101-md-input { min-height: 320px; }

/* Rendered preview */
.t101-md-preview { min-height: 220px; max-height: 640px; overflow: auto; padding: 14px 18px; border: 1px solid var(--t101-border); border-radius: 10px; background: var(--t101-surface); color: var(--t101-text); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.t101-md-preview > :first-child { margin-top: 0; }
.t101-md-preview > :last-child { margin-bottom: 0; }
.t101-md-preview h1, .t101-md-preview h2, .t101-md-preview h3, .t101-md-preview h4, .t101-md-preview h5, .t101-md-preview h6 { margin: 1.2em 0 .5em; line-height: 1.3; }
.t101-md-preview h1 { font-size: 1.75em; }
.t101-md-preview h2 { font-size: 1.4em; padding-bottom: .2em; border-bottom: 1px solid var(--t101-border); }
.t101-md-preview h3 { font-size: 1.18em; }
.t101-md-preview p, .t101-md-preview ul, .t101-md-preview ol, .t101-md-preview blockquote, .t101-md-preview pre, .t101-md-preview table { margin: 0 0 1em; }
.t101-md-preview ul, .t101-md-preview ol { padding-left: 1.6em; }
.t101-md-preview li > ul, .t101-md-preview li > ol { margin: .25em 0 0; }
.t101-md-preview li input[type="checkbox"] { margin: 0 .35em 0 -1.3em; vertical-align: middle; }
.t101-md-preview li:has(> input[type="checkbox"]) { list-style: none; }
.t101-md-preview blockquote { padding: .2em 1em; border-left: 4px solid var(--t101-border); color: var(--t101-muted); }
.t101-md-preview code { padding: .1em .35em; border-radius: 5px; background: var(--t101-soft); font: .9em ui-monospace, SFMono-Regular, Consolas, monospace; }
.t101-md-preview pre { padding: 12px 14px; border-radius: 8px; background: #111827; color: #f9fafb; overflow: auto; }
.t101-md-preview pre code { padding: 0; background: none; color: inherit; font-size: 13px; }
.t101-md-preview table { border-collapse: collapse; display: block; overflow-x: auto; }
.t101-md-preview th, .t101-md-preview td { padding: 6px 12px; border: 1px solid var(--t101-border); text-align: left; }
.t101-md-preview th { background: var(--t101-soft); }
.t101-md-preview hr { border: 0; border-top: 1px solid var(--t101-border); margin: 1.5em 0; }
.t101-md-preview img { max-width: 100%; height: auto; }
.t101-md-preview a { color: var(--t101-accent); }
.t101-md-preview mark { background: #fef08a; }
.t101-md-empty { color: var(--t101-muted); font-style: italic; }
.t101-md-tool.is-s { text-decoration: line-through; }
