.md-composer {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background: rgba(5, 7, 12, .84);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .28);
  color: #e9edf5;
  scrollbar-color: rgba(123, 151, 215, .34) transparent;
  scrollbar-width: thin;
}

.md-composer * {
  scrollbar-color: rgba(123, 151, 215, .32) transparent;
  scrollbar-width: thin;
}

.md-composer *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.md-composer *::-webkit-scrollbar-track {
  background: transparent;
}

.md-composer *::-webkit-scrollbar-thumb {
  min-height: 32px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(135, 164, 255, .42), rgba(102, 118, 176, .28)) border-box;
}

.md-composer *::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(164, 188, 255, .62), rgba(124, 139, 204, .42)) border-box;
}

.md-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  padding: 8px 10px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(255, 255, 255, .075);
  background: rgba(255, 255, 255, .018);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-color: rgba(136, 165, 236, .38) transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.md-toolbar::-webkit-scrollbar { height: 4px; }
.md-toolbar::-webkit-scrollbar-track { background: transparent; }
.md-toolbar::-webkit-scrollbar-thumb {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(116, 149, 229, .18), rgba(151, 178, 246, .58), rgba(116, 149, 229, .18));
}

.md-toolbar button {
  flex: 0 0 auto;
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 12px;
  color: #929eb3;
  background: transparent;
  font: 650 9px 'Geist Mono', ui-monospace, monospace;
  cursor: pointer;
}

.md-toolbar button:hover,
.md-toolbar button:focus-visible {
  outline: 0;
  color: #fff;
  background: rgba(255, 255, 255, .085);
}

.md-toolbar button[data-active="true"] {
  color: #eaf1ff;
  background: linear-gradient(135deg, rgba(91, 153, 255, .18), rgba(158, 112, 255, .14));
  box-shadow: inset 0 0 0 1px rgba(138, 176, 255, .22), 0 0 20px rgba(91, 126, 255, .08);
}

.md-toolbar button .anopen-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: block;
}
.md-toolbar button:disabled { cursor: default; opacity: .34; }

.md-viewbar {
  display: flex;
  justify-content: flex-start;
  padding: 8px 10px 0;
}

.md-mode-group {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(130, 159, 224, .14);
  border-radius: 14px;
  background: rgba(5, 9, 17, .58);
}

.md-mode-button {
  min-width: 58px;
  height: 44px;
  padding-inline: 10px;
  border: 0;
  border-radius: 12px;
  color: #929eb3;
  background: transparent;
  font: 650 10px 'Geist Mono', ui-monospace, monospace;
  cursor: pointer;
}

.md-mode-button:hover,
.md-mode-button:focus-visible {
  outline: 0;
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

.md-mode-button[aria-pressed="true"] {
  color: #f3f6ff;
  background: linear-gradient(135deg, rgba(91, 153, 255, .2), rgba(158, 112, 255, .17));
  box-shadow: inset 0 0 0 1px rgba(151, 184, 255, .25), 0 0 18px rgba(104, 126, 255, .08);
}

.md-interference-select {
  flex: 0 0 auto;
  min-width: 108px;
  min-height: 44px;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(130, 159, 224, .14);
  border-radius: 12px;
  color: #9caac0;
  background: rgba(5, 9, 17, .58);
  font: 650 9px 'Geist Mono', ui-monospace, monospace;
}

.md-interference-select:focus-visible {
  outline: 2px solid rgba(143, 183, 255, .82);
  outline-offset: 2px;
}

.md-toolbar-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 22px;
  margin: 0 5px;
  background: rgba(255, 255, 255, .08);
}

.md-format-state {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.md-insights {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  color: #77849a;
  font: 8px 'Geist Mono', ui-monospace, monospace;
  letter-spacing: .08em;
  background: linear-gradient(90deg, rgba(8, 12, 20, .72), rgba(16, 19, 35, .46), rgba(8, 12, 20, .72));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.md-insights::-webkit-scrollbar { display: none; }
.md-word-count,
.md-reading-time {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(126, 158, 255, .1);
  border-radius: 999px;
  align-items: center;
  background: rgba(8, 12, 20, .48);
  color: #8fa1c0;
  white-space: nowrap;
}
.md-flow-score {
  --md-flow-alpha: calc(.22 + var(--md-flow, 0) * .45);
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 10px 0 24px;
  border: 1px solid rgba(126, 158, 255, .16);
  border-radius: 999px;
  align-items: center;
  color: color-mix(in srgb, #bdd0ff calc(48% + var(--md-flow, 0) * .52), #748197);
  background:
    radial-gradient(circle at calc(18% + var(--md-flow, 0) * 64%) 50%, rgba(151, 126, 255, var(--md-flow-alpha)), transparent 38%),
    rgba(8, 12, 20, .58);
  box-shadow: inset 0 1px rgba(255,255,255,.04), 0 0 22px rgba(98, 128, 255, calc(var(--md-flow, 0) * .08));
  white-space: nowrap;
}

.md-flow-score::before {
  content: '';
  position: absolute;
  left: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8eacff;
  opacity: calc(.36 + var(--md-flow, 0) * .58);
  box-shadow: 0 0 12px rgba(132, 164, 255, calc(.18 + var(--md-flow, 0) * .52));
}

.md-rhythm {
  flex: 1 1 130px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  width: min(28vw, 176px);
  min-width: 82px;
  height: 20px;
  margin-left: auto;
  overflow: hidden;
  padding: 0 8px;
  border: 1px solid rgba(126, 158, 255, .1);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(115, 149, 255, .08), rgba(154, 125, 255, .04));
}

.md-rhythm-segment {
  flex: 0 1 9px;
  min-width: 4px;
  max-width: 10px;
  height: clamp(4px, calc(var(--md-rhythm-size, 4) * .36px), 12px);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(189, 205, 255, .78), rgba(101, 143, 255, .35));
  opacity: calc(.24 + var(--md-activity, 0) * .52);
  box-shadow: 0 0 calc(var(--md-activity, 0) * 8px) rgba(127, 169, 255, .32);
  cursor: pointer;
  transition: opacity .16s, transform .16s, background .16s;
}

.md-rhythm-segment:hover,
.md-rhythm-segment:focus-visible { opacity: .95; transform: scaleY(1.16); outline: 0; }

.md-workspace {
  display: grid;
  grid-template-columns: 0 minmax(0, 1fr);
  min-width: 0;
  transition: grid-template-columns .24s cubic-bezier(.2,.8,.2,1);
}

.md-composer[data-outline="true"] .md-workspace { grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); }

.md-outline {
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid transparent;
  background: rgba(8, 11, 18, .64);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, border-color .18s;
}

.md-composer[data-outline="true"] .md-outline {
  border-right-color: rgba(255, 255, 255, .06);
  opacity: 1;
  pointer-events: auto;
}

.md-outline-title {
  display: block;
  padding: 18px 16px 8px;
  color: #8da0bd;
  font: 9px 'Geist Mono', ui-monospace, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.md-font-select {
  width: calc(100% - 20px);
  min-height: 40px;
  margin: 0 10px 12px;
  padding: 0 34px 0 12px;
  border: 1px solid rgba(129, 160, 220, .2);
  border-radius: 12px;
  color: rgba(220, 230, 248, .84);
  background: rgba(7, 12, 22, .76);
  font: 500 12px/1 'Geist Mono', ui-monospace, monospace;
}

.md-outline-list { display: grid; gap: 2px; padding: 4px 8px 18px; }
.md-outline-list button {
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  color: #68778e;
  background: transparent;
  font: 500 11px/1.35 'Space Grotesk', 'Noto Sans TC', sans-serif;
  text-align: left;
  cursor: pointer;
}
.md-outline-list button[data-level="2"] { padding-left: 17px; }
.md-outline-list button[data-level="3"] { padding-left: 26px; }
.md-outline-list button[data-level="4"],
.md-outline-list button[data-level="5"],
.md-outline-list button[data-level="6"] { padding-left: 34px; }
.md-outline-list button[data-active="true"] { color: #e8efff; background: rgba(111, 149, 255, .1); }
.md-outline-empty { width: 170px; margin: 8px 16px; color: #59657a; font: 10px/1.55 'Geist Mono', monospace; }

.md-knowledge { width: 200px; margin: 6px 8px 18px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.055); }
.md-knowledge-title { display: block; margin: 9px 8px 6px; color: #687890; font: 8px 'Geist Mono', monospace; letter-spacing: .11em; text-transform: uppercase; }
.md-backlinks,.md-concepts { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 5px; }
.md-backlinks button,.md-concepts button { padding: 5px 7px; border: 1px solid rgba(137,167,226,.1); border-radius: 8px; color: #8294af; background: rgba(123,148,201,.035); font: 8px/1.3 'Geist Mono', monospace; cursor: pointer; }
.md-concepts button { color: color-mix(in srgb, #a9c2ff calc(45% + var(--md-concept-weight, 0) * 55%), #718099); }
.md-concept-graph { width: 100%; height: 145px; margin-top: 8px; overflow: visible; }
.md-concept-graph line { stroke: rgba(126,157,226,.24); }
.md-concept-graph circle { fill: #91adff; filter: drop-shadow(0 0 4px rgba(126,159,255,.45)); }
.md-concept-graph text { fill: #7587a5; font: 7px 'Geist Mono', monospace; }

.md-timeline {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: linear-gradient(90deg, rgba(8, 12, 20, .76), rgba(15, 18, 31, .6));
}
.md-composer[data-timeline="true"] .md-timeline { display: grid; }
.md-timeline-head { grid-column: 1 / -1; display: flex; justify-content: space-between; color: #8290a8; font: 9px 'Geist Mono', monospace; }
.md-timeline-range {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 18px !important;
  height: 18px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 999px;
  accent-color: #8da9ff;
  background: transparent;
}
.md-timeline-range:focus-visible {
  outline: 1px solid rgba(138, 184, 255, .72);
  outline-offset: 5px;
}
.md-timeline-preview { min-height: 28px; max-height: 64px; margin: 0; overflow: auto; color: #9ca8ba; background: transparent; white-space: pre-wrap; font: 10px/1.45 'Geist Mono', monospace; }
.md-timeline-restore { align-self: end; min-height: 34px; padding: 0 12px; border: 1px solid rgba(148, 174, 231, .18); border-radius: 10px; color: #c8d4e7; background: rgba(113, 143, 207, .07); font: 9px 'Geist Mono', monospace; }
.md-timeline-restore:disabled { opacity: .35; }

.md-surface,
.md-surface .cm-editor,
.md-surface .cm-scroller {
  min-width: 0;
  max-width: 100%;
}

.md-surface { position: relative; }

.md-paragraph-interference {
  position: absolute;
  z-index: 3;
  display: block;
  box-sizing: border-box;
  overflow: hidden;
  color: rgba(230, 238, 255, .94);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  pointer-events: none;
  user-select: none;
  transform-origin: 50% 50%;
  animation: md-interference-glow .62s cubic-bezier(.2,.8,.2,1) both;
}

.md-paragraph-interference::before,
.md-paragraph-interference::after {
  position: absolute;
  inset: 0;
  overflow: hidden;
  content: attr(data-source);
  color: inherit;
  white-space: inherit;
  pointer-events: none;
}

.md-paragraph-interference[data-md-interference="rgb"] {
  color: rgba(236, 241, 255, .9);
  text-shadow: -1px 0 rgba(255, 45, 128, .72), 1px 0 rgba(43, 226, 255, .72);
  animation-name: md-interference-rgb;
}
.md-paragraph-interference[data-md-interference="rgb"]::before {
  color: rgba(255, 45, 128, .48);
  transform: translateX(-2px);
  clip-path: inset(4% 0 58% 0);
}
.md-paragraph-interference[data-md-interference="rgb"]::after {
  color: rgba(43, 226, 255, .5);
  transform: translateX(2px);
  clip-path: inset(52% 0 8% 0);
}
.md-paragraph-interference[data-md-interference="noise"] {
  background: linear-gradient(90deg, rgba(5,7,12,.58), rgba(121,102,255,.12), rgba(5,7,12,.38));
  text-shadow: 0 0 9px rgba(153, 174, 255, .55);
  animation-name: md-interference-noise;
}
.md-paragraph-interference[data-md-interference="swap"] {
  background: rgba(5, 7, 12, .9);
  color: #e8edff;
  text-shadow: -1px 0 #ff4e9a, 1px 0 #42dfff, 0 0 13px rgba(147, 121, 255, .72);
  animation-name: md-interference-swap;
}

@keyframes md-interference-glow {
  0%, 100% { opacity: 0; filter: blur(0); transform: translate3d(0,0,0); }
  35%, 68% { opacity: .94; filter: drop-shadow(0 0 8px rgba(145,123,255,.66)); transform: translate3d(0,-.4px,0); }
}
@keyframes md-interference-rgb {
  0%, 100% { opacity: 0; transform: translate3d(0,0,0); }
  34% { opacity: .98; transform: translate3d(-1px,0,0) skewX(-.35deg); }
  68% { opacity: .72; transform: translate3d(1px,0,0) skewX(.25deg); }
}
@keyframes md-interference-noise {
  0%, 100% { opacity: 0; transform: translate3d(0,0,0); }
  42%, 72% { opacity: .86; transform: translate3d(.6px,-.4px,0); }
}
@keyframes md-interference-swap {
  0%, 100% { opacity: 0; transform: translate3d(0,0,0); }
  38% { opacity: .97; transform: translate3d(-1px,.4px,0); }
  72% { opacity: .82; transform: translate3d(1px,-.3px,0); }
}

.md-composer[data-md-mode="preview"] .md-task-toggle,
.md-composer[data-md-mode="preview"] .md-code-language,
.md-composer[data-md-mode="preview"] .md-code-copy,
.md-composer[data-md-mode="preview"] .md-table-tools,
.md-composer[data-md-mode="preview"] .md-block[draggable="true"] {
  pointer-events: none;
}

.md-surface .cm-editor {
  min-height: 440px;
  color: #cbd4e2;
  background: transparent;
  font-family: 'Space Grotesk', 'Noto Sans TC', system-ui, sans-serif;
  font-size: calc(15px * var(--md-editor-zoom, 1));
  line-height: 1.52;
}

.md-surface .cm-editor.cm-focused {
  outline: 0;
  background: linear-gradient(180deg, rgba(132, 153, 255, .018), transparent 120px);
}

.md-surface .cm-gutters {
  border: 0;
  background: transparent;
  color: rgba(136, 151, 180, .42);
  font: 10px/1.78 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.md-surface .cm-lineNumbers .cm-gutterElement {
  min-width: 28px;
  padding: 0 12px 0 0;
  color: rgba(136, 151, 180, .38);
  text-align: right;
}

.md-surface .cm-gutter-lint {
  width: 30px;
  min-width: 30px;
}

.md-surface .cm-gutter-lint .cm-gutterElement {
  display: grid;
  width: 30px;
  min-width: 30px;
  padding: 0 4px;
  box-sizing: border-box;
  place-items: center;
  overflow: visible;
}

.md-surface .cm-activeLineGutter {
  color: rgba(184, 203, 255, .72);
  background: transparent;
  text-shadow: 0 0 12px rgba(127, 162, 255, .22);
}

.md-composer .cm-lint-marker[data-md-lint-icon] {
  content: none !important;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  color: #f5f5f5;
  background: #171717;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}

.md-composer .cm-lint-marker[data-md-lint-icon] .anopen-icon {
  display: block;
  width: 14px;
  height: 14px;
}

.md-composer .cm-tooltip.cm-tooltip-lint {
  overflow: hidden;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  color: #f5f5f5;
  background: #171717;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .42);
}

.md-composer .cm-tooltip-lint ul { margin: 0; padding: 0; }
.md-composer .cm-tooltip-lint .cm-diagnostic {
  padding: 8px 10px;
  border-left: 0;
  border-radius: 10px;
  background: transparent;
}
.md-composer .cm-tooltip-lint .cm-diagnostic + .cm-diagnostic {
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.md-lint-message {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 24px;
  color: #f5f5f5;
  font: 500 13px/1.35 Inter, 'Noto Sans TC', system-ui, sans-serif;
}
.md-lint-message-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}
.md-lint-message-copy { max-width: min(420px, calc(100vw - 96px)); }
.md-composer .cm-lintRange-warning,
.md-composer .cm-lintRange-error {
  background-image: none;
  border-bottom: 1px solid rgba(255, 255, 255, .46);
}

.md-composer[data-mood-enabled="true"][data-mood="warm"] .md-surface .cm-editor {
  background: radial-gradient(circle at 70% 35%, rgba(255, 157, 91, .038), transparent 58%), linear-gradient(180deg, rgba(132, 153, 255, .018), transparent 120px);
}
.md-composer[data-mood-enabled="true"][data-mood="cool"] .md-surface .cm-editor {
  background: radial-gradient(circle at 68% 35%, rgba(79, 132, 255, .045), transparent 58%), linear-gradient(180deg, rgba(132, 153, 255, .018), transparent 120px);
}

.md-surface .cm-scroller {
  overflow: auto;
  font: inherit;
}

.md-editor.cm-content {
  min-height: 440px;
  padding: 34px 52px 96px;
  box-sizing: border-box;
  font-family: var(--md-editor-font, ui-sans-serif, system-ui, sans-serif);
  caret-color: #a9c2ff;
  outline: 0;
}

.md-composer[data-typewriter="true"] .md-editor.cm-content {
  padding-top: max(38px, 45vh);
  padding-bottom: max(64px, 45vh);
}
.md-composer[data-typewriter="true"] .md-surface .cm-editor {
  height: min(68vh, 720px);
  min-height: 440px;
}

.md-editor .cm-line {
  min-height: 1.52em;
  padding: 0;
}

.md-editor .cm-line.md-source-blank-line {
  min-height: 10px;
  height: 10px;
  line-height: 10px;
}

/* A block replacement is rendered between CodeMirror line boxes. Collapse the
   emptied source line so the widget and its source row are not counted twice. */
.md-editor .cm-line.md-rendered-source-line {
  min-height: 1px;
  height: 1px;
  line-height: 1px;
  overflow: hidden;
}

/* CodeMirror emits a synthetic, gutter-less boundary line immediately after a
   block replacement. It is not a Markdown source line and must not contribute
   another text row to the document rhythm. */
.md-editor .md-block + .cm-line:not(.md-source-line):not(.md-source-blank-line):not(.md-rendered-source-line) {
  min-height: 1px;
  height: 1px;
  line-height: 1px;
  overflow: hidden;
}

.md-surface .cm-activeLine { background: transparent; }

.md-editor .cm-line.md-source-line {
  position: relative;
  color: #dbe4f3;
  font-family: 'Space Grotesk', 'Noto Sans TC', system-ui, sans-serif;
  white-space: pre-wrap;
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
}

.md-editor .cm-line.md-source-line::before {
  content: none;
}

.md-surface .cm-line,
.md-surface .cm-line::before,
.md-surface .cm-line::after,
.md-surface .cm-content,
.md-surface .cm-gutters,
.md-surface .cm-gutter,
.md-surface .cm-gutterElement {
  border-left: 0 !important;
}

.md-editor .cm-line.md-source-atxheading1 { font-size: 1.72em; line-height: 1.3; }
.md-editor .cm-line.md-source-atxheading2 { font-size: 1.42em; line-height: 1.4; }
.md-editor .cm-line.md-source-atxheading3 { font-size: 1.2em; line-height: 1.5; }
.md-surface .cm-selectionBackground,
.md-surface .cm-content ::selection {
  background: rgba(86, 112, 195, .36) !important;
}
.md-surface .cm-focused .cm-selectionBackground {
  background: rgba(103, 126, 214, .42) !important;
}
.md-surface .cm-line ::selection {
  color: #f1f5ff;
  -webkit-text-fill-color: currentColor;
}
.md-surface .cm-content ::selection {
  text-shadow: none !important;
}
.md-surface .cm-cursor { border-left-color: #d7e2ff; }

.md-composer-compact .md-surface .cm-editor,
.md-composer-compact .md-editor.cm-content { min-height: 168px; }
.md-composer-compact .md-editor.cm-content { padding: 22px 24px 30px; }

.md-block {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  color: #cbd4e2;
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
}

.md-block[draggable="true"] { position: relative; cursor: grab; transition: opacity .18s, transform .18s, filter .18s; }
.md-block[draggable="true"] { border-left: 0; padding-left: 0; }
.md-block[draggable="true"]:active { cursor: grabbing; }
.md-block[draggable="true"]::before {
  content: '⋮⋮';
  position: absolute;
  left: -27px;
  top: .7em;
  color: #58667d;
  font: 10px 'Geist Mono', monospace;
  letter-spacing: -3px;
  opacity: 0;
  transition: opacity .16s;
}
.md-block[draggable="true"]:hover::before { opacity: .8; }
.md-block[data-dragging="true"] { opacity: .3; filter: blur(1px); transform: scale(.99); }

.md-composer[data-focus-mode="true"] .md-block { opacity: .17; filter: saturate(.35); }
.md-composer[data-focus-mode="true"] .md-source-line { opacity: 1; filter: none; }

html.md-fullscreen-open { overflow: hidden; }
.md-composer[data-fullscreen="true"] {
  position: fixed;
  inset: 10px;
  width: auto;
  max-width: none;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(142, 169, 235, .22);
  border-radius: 22px;
  background: rgba(3, 6, 12, .97);
  box-shadow: 0 28px 100px rgba(0, 0, 0, .72), inset 0 0 80px rgba(75, 82, 180, .06);
  backdrop-filter: blur(24px);
}
.md-composer[data-fullscreen="true"] .md-workspace,
.md-composer[data-fullscreen="true"] .md-surface,
.md-composer[data-fullscreen="true"] .cm-editor,
.md-composer[data-fullscreen="true"] .cm-scroller { min-height: 0; height: 100%; }
.md-composer[data-fullscreen="true"] .md-workspace { flex: 1 1 auto; overflow: hidden; }
.md-composer[data-fullscreen="true"] .md-surface { overflow: hidden; }

.md-sentence-sparkline {
  position: absolute;
  right: -38px;
  top: .65em;
  display: flex;
  align-items: flex-end;
  gap: 1px;
  width: 30px;
  height: 18px;
  opacity: .34;
  pointer-events: none;
}
.md-sentence-sparkline i { flex: 1 1 2px; min-width: 1px; height: calc(var(--md-sentence-length, 2) * .55px); max-height: 17px; border-radius: 1px; background: linear-gradient(#8d78ff, #66b7ff); }

.md-block > :first-child { margin-top: 0; }
.md-block > :last-child { margin-bottom: 0; }
.md-block p { margin: .32em 0; }

.md-block h1,
.md-block h2,
.md-block h3,
.md-block h4,
.md-block h5,
.md-block h6 {
  margin: 1.35em 0 .48em;
  color: #f2f4f9;
  line-height: 1.08;
  letter-spacing: -.025em;
}

.md-block h1,
.md-block h2,
.md-block h3 { margin-top: .72em; margin-bottom: .26em; }

.md-block h1 { font-size: 1.75em; }
.md-block h2 { font-size: 1.375em; }
.md-block h3 { font-size: 1.125em; }
.md-block h4 { font-size: 1em; }
.md-block h5,
.md-block h6 { font-size: .875em; letter-spacing: .02em; }

.md-block strong { color: #f3f6fc; font-weight: 720; }
.md-strong-signal {
  --md-signal-delay: 0ms;
  --md-signal-speed: 4200ms;
  color: #f4f7ff;
  background-image: linear-gradient(
    96deg,
    #f6f8ff 0%,
    #79d8ff 16%,
    #9b7cff 34%,
    #ff73c8 52%,
    #ffd166 68%,
    #7dffd1 84%,
    #f6f8ff 100%
  );
  background-size: 280% 100%;
  background-position: 120% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: md-bold-spectrum var(--md-signal-speed) linear var(--md-signal-delay) infinite;
}

.md-strong-signal-0 {
  animation:
    md-bold-spectrum var(--md-signal-speed) linear var(--md-signal-delay) infinite,
    md-signal-glow 5100ms steps(1, end) var(--md-signal-delay) infinite;
}

.md-strong-signal-1 {
  animation:
    md-bold-spectrum var(--md-signal-speed) linear var(--md-signal-delay) infinite,
    md-signal-glitch 4300ms steps(1, end) var(--md-signal-delay) infinite;
}

.md-strong-signal-2 {
  animation:
    md-bold-spectrum var(--md-signal-speed) linear var(--md-signal-delay) infinite,
    md-signal-broken 5700ms steps(1, end) var(--md-signal-delay) infinite;
}

.md-strong-signal-3 {
  animation:
    md-bold-spectrum var(--md-signal-speed) linear var(--md-signal-delay) infinite,
    md-signal-noise 4700ms steps(1, end) var(--md-signal-delay) infinite;
}

.md-composer:focus-within .md-strong-signal { animation-play-state: paused; }

.md-heading-scrambling {
  position: relative;
  isolation: isolate;
}

.md-heading-scrambling > * { opacity: 0; }

.md-heading-scrambling::after {
  content: attr(data-md-scramble);
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  color: #f2f4f9;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  white-space: pre-wrap;
  pointer-events: none;
  text-shadow: 0 0 18px rgba(128, 174, 255, .28);
}

.md-heading-flip {
  perspective: 900px;
  transform-style: preserve-3d;
}

.md-heading-flip-char {
  display: inline-block;
  transform-origin: 50% 70%;
  backface-visibility: hidden;
  transform: rotateX(-90deg) translateY(.16em);
  opacity: 0;
  will-change: transform, opacity, filter;
}

.md-heading-flip-space {
  width: .28em;
}

.md-heading-flip-run .md-heading-flip-char {
  animation: md-heading-flip-in 680ms cubic-bezier(.18,.88,.24,1) both;
  animation-delay: calc(var(--md-flip-order, 0) * 35ms);
}

@keyframes md-heading-flip-in {
  0% {
    opacity: 0;
    transform: rotateX(-90deg) translateY(.2em) scale(.98);
    filter: blur(2px) brightness(1.45);
    text-shadow: 0 0 20px rgba(141, 186, 255, .22);
  }
  55% {
    opacity: 1;
    transform: rotateX(12deg) translateY(-.02em) scale(1.01);
    filter: blur(.3px) brightness(1.12);
  }
  100% {
    opacity: 1;
    transform: rotateX(0) translateY(0) scale(1);
    filter: none;
    text-shadow: none;
  }
}

@keyframes md-bold-spectrum {
  from { background-position: 120% 50%; }
  to { background-position: -120% 50%; }
}

@keyframes md-signal-glow {
  0%, 72%, 100% { text-shadow: none; }
  73% { text-shadow: 0 0 6px rgba(113, 216, 255, .72), 0 0 17px rgba(152, 118, 255, .38); }
  75% { text-shadow: 0 0 2px rgba(255, 255, 255, .88); }
  77% { text-shadow: none; }
}

@keyframes md-signal-glitch {
  0%, 61%, 65%, 100% { text-shadow: none; }
  62% { text-shadow: -1px 0 #58ddff, 1px 0 #ff5cb8; }
  63% { text-shadow: 1px 0 #58ddff, -2px 0 #ff5cb8; }
  64% { text-shadow: 0 0 9px rgba(255, 255, 255, .42); }
}

@keyframes md-signal-broken {
  0%, 46%, 49%, 100% { opacity: 1; filter: none; }
  47% { opacity: .62; filter: contrast(1.35); }
  48% { opacity: .9; filter: brightness(1.28); }
}

@keyframes md-signal-noise {
  0%, 82%, 86%, 100% { filter: none; text-shadow: none; }
  83% { filter: contrast(1.55) saturate(1.25); text-shadow: 0 0 4px rgba(255, 255, 255, .55); }
  84% { filter: brightness(.72); text-shadow: 1px 0 rgba(97, 224, 255, .65); }
  85% { filter: brightness(1.18); text-shadow: -1px 0 rgba(255, 95, 192, .62); }
}
.md-block em { color: #dbe1ee; }
.md-block s { color: #7d899d; text-decoration-color: #76839a; }

.md-block a,
.md-link {
  color: #9bbcff;
  text-decoration-color: rgba(155, 188, 255, .35);
  text-underline-offset: 3px;
}

.md-link-invalid { color: #8f99aa; }
.md-wikilink { color: #b7a4ff; text-decoration: none; border-bottom: 1px dotted rgba(183,164,255,.5); }
.md-wikilink::before { content: '['; opacity: .35; }
.md-wikilink::after { content: ']'; opacity: .35; }
.md-equation-ref,
.md-document-ref {
  display: inline-block;
  padding: 0 .18em;
  border-radius: 5px;
  color: #b7c8ff;
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 3px;
}
.md-equation-ref:hover,
.md-equation-ref:focus-visible,
.md-document-ref:hover,
.md-document-ref:focus-visible {
  outline: 0;
  color: #fff;
  background: rgba(255, 255, 255, .1);
}
.md-equation-ref-missing,
.md-document-ref-missing {
  color: #c2c2c2;
  border-bottom: 1px dotted rgba(255, 255, 255, .42);
}
.md-section-number { color: #8f99aa; font-variant-numeric: tabular-nums; }

.md-block code {
  padding: .16em .38em;
  border-radius: 5px;
  color: #d9cbff;
  background: rgba(157, 126, 255, .11);
  font: 13px/1.65 'Geist Mono', ui-monospace, monospace;
}

.md-block pre {
  overflow: auto;
  margin: .7em 0;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 11px;
  background: #05070b;
  white-space: pre;
}

.md-code-shell {
  overflow: hidden;
  margin: .7em 0;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: #05070b;
}

.md-code-shell .md-code-block {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.md-code-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 8px 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: rgba(124, 145, 190, .045);
}

.md-code-language,
.md-code-copy {
  min-height: 44px;
  border: 0;
  color: #8190a8;
  background: transparent;
  font: 500 10px/1 'Geist Mono', ui-monospace, monospace;
  letter-spacing: .06em;
}

.md-code-copy { padding: 0 10px; cursor: pointer; }
.md-code-copy:hover { color: #dce7ff; }
.md-code-shell .tok-keyword,
.md-code-shell .tok-typeName { color: #b9a3ff; }
.md-code-shell .tok-string,
.md-code-shell .tok-regexp { color: #91d8ca; }
.md-code-shell .tok-number,
.md-code-shell .tok-bool { color: #ffbd8a; }
.md-code-shell .tok-comment { color: #637189; font-style: italic; }
.md-code-shell .tok-variableName,
.md-code-shell .tok-propertyName { color: #a8c8ff; }
.md-code-shell .tok-function { color: #83bfff; }
.md-code-shell .tok-operator { color: #d5dbea; }

.md-location-shell,
.md-mermaid-shell {
  width: min(100%, 920px);
  max-width: 100%;
  box-sizing: border-box;
  margin-inline: auto;
}
.md-location-shell { border: 0; background: transparent; }
.md-location-card {
  display: grid;
  grid-template-columns: minmax(150px, 36%) minmax(0, 1fr);
  width: 100%;
  box-sizing: border-box;
  min-height: 190px;
  margin: 4px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 18px;
  background: #111;
}
.md-location-map {
  position: relative;
  display: grid;
  min-height: 190px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(32deg, transparent 44%, rgba(255, 255, 255, .09) 45% 47%, transparent 48%),
    linear-gradient(145deg, transparent 40%, rgba(255, 255, 255, .06) 41% 44%, transparent 45%),
    #1c1c1c;
}
.md-location-roads { position: absolute; inset: 0; background: radial-gradient(circle at 28% 66%, rgba(255, 255, 255, .08), transparent 28%); }
.md-location-pin {
  position: relative;
  width: 22px;
  height: 22px;
  border: 5px solid #fff;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  transform: rotate(-45deg);
}
.md-location-pin::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #111; }
.md-location-map iframe { width: 100%; height: 100%; min-height: 190px; border: 0; }
.md-location-attribution { position: absolute; right: 5px; bottom: 4px; padding: 2px 5px; border-radius: 4px; color: #444; background: rgba(255, 255, 255, .88); font: 9px/1.2 system-ui, sans-serif; }
.md-location-body { display: flex; min-width: 0; padding: 18px; flex-direction: column; align-items: flex-start; gap: 7px; }
.md-location-label { color: #f5f5f5; font: 650 16px/1.35 var(--md-editor-font, system-ui, sans-serif); }
.md-location-coordinates { color: #aaa; background: transparent; font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.md-location-note { color: #b5b5b5; font: 13px/1.5 var(--md-editor-font, system-ui, sans-serif); }
.md-location-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.md-location-load,
.md-location-external {
  display: inline-flex;
  min-height: 38px;
  box-sizing: border-box;
  padding: 0 13px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  color: #ededed;
  background: #242424;
  font: 600 12px/1 var(--md-editor-font, system-ui, sans-serif);
  text-decoration: none;
  cursor: pointer;
}
.md-location-load:hover,
.md-location-load:focus-visible,
.md-location-external:hover,
.md-location-external:focus-visible { outline: 0; background: #303030; box-shadow: 0 0 0 2px rgba(255, 255, 255, .13); }

.md-link-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  color: #f4f4f4;
  background: #171717;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .62);
}
.md-link-dialog::backdrop { background: rgba(0, 0, 0, .66); backdrop-filter: blur(3px); }
.md-link-dialog form { display: grid; gap: 14px; padding: 22px; }
.md-dialog-title { color: #fff; font: 650 18px/1.3 var(--md-editor-font, system-ui, sans-serif); }
.md-dialog-description { margin: -6px 0 2px; color: #a3a3a3; font: 13px/1.5 var(--md-editor-font, system-ui, sans-serif); }
.md-dialog-field { display: grid; gap: 7px; }
.md-dialog-field > span { color: #b5b5b5; font: 550 12px/1.3 var(--md-editor-font, system-ui, sans-serif); }
.md-link-dialog input,
.md-link-dialog textarea,
.md-link-dialog select {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 13px;
  outline: 0;
  color: inherit;
  background: #0d0d0d;
  font: 14px/1.4 var(--md-editor-font, system-ui, sans-serif);
}
.md-link-dialog textarea { min-height: 112px; padding-block: 11px; resize: vertical; }
.md-link-dialog select { appearance: auto; }
.md-link-dialog input:focus,
.md-link-dialog textarea:focus,
.md-link-dialog select:focus { border-color: rgba(255, 255, 255, .5); box-shadow: 0 0 0 3px rgba(255, 255, 255, .08); }
.md-link-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.md-link-dialog-actions button {
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  color: #ededed;
  background: #262626;
  font: 600 13px/1 var(--md-editor-font, system-ui, sans-serif);
  cursor: pointer;
}
.md-link-dialog-actions button:hover,
.md-link-dialog-actions button:focus-visible { outline: 0; background: #333; box-shadow: 0 0 0 2px rgba(255, 255, 255, .16); }
.md-link-dialog-actions .md-dialog-primary { border-color: #f5f5f5; color: #111; background: #f5f5f5; }
.md-link-dialog-actions .md-dialog-primary:hover,
.md-link-dialog-actions .md-dialog-primary:focus-visible { background: #fff; }
.md-location-coordinate-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.md-location-current {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  color: #ededed;
  background: transparent;
  font: 600 13px/1 var(--md-editor-font, system-ui, sans-serif);
  cursor: pointer;
}
.md-location-current:hover,
.md-location-current:focus-visible { outline: 0; background: rgba(255, 255, 255, .07); }
.md-location-current[data-busy="true"] { color: #9c9c9c; }
.md-citation-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(820px, calc(100dvh - 32px)); overflow: auto; }
.md-citation-import,
.md-citation-library-section {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 15px;
  background: rgba(255, 255, 255, .025);
}
.md-citation-import-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.md-citation-import-actions button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  color: #ededed;
  background: #262626;
  font: 600 12px/1 var(--md-editor-font, system-ui, sans-serif);
  cursor: pointer;
}
.md-citation-import-status { color: #9f9f9f; font-size: 12px; }
.md-citation-import-status[data-error="true"] { color: #ff9fae; }
.md-citation-library { display: grid; max-height: 260px; overflow: auto; gap: 7px; }
.md-citation-library-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(116px, .3fr) minmax(120px, .35fr);
  gap: 8px;
  align-items: center;
  padding: 9px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
}
.md-citation-library-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 9px; min-width: 0; }
.md-citation-library-summary > input { grid-row: 1 / span 2; width: 18px; min-height: 18px; margin: 2px 0 0; }
.md-citation-library-summary > strong,
.md-citation-library-summary > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-citation-library-summary > span { color: #999; font-size: 11px; }
.md-citation-library-empty { margin: 0; color: #888; font-size: 12px; }
.md-citation-manual-title { margin-top: 3px; }
.md-citation-lookup { display: flex; align-items: center; gap: 10px; }
.md-citation-lookup > button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  color: #ededed;
  background: #262626;
  font: 600 12px/1 var(--md-editor-font, system-ui, sans-serif);
  cursor: pointer;
}
.md-citation-lookup > button:hover,
.md-citation-lookup > button:focus-visible { outline: 0; background: #333; }
.md-citation-lookup > button[data-busy="true"] { color: #999; cursor: wait; }
.md-citation-status {
  min-width: 0;
  color: #999;
  font: 12px/1.4 var(--md-editor-font, system-ui, sans-serif);
}
.md-citation-status[data-verified="true"] { color: #8ed9ae; }
.md-citation-metadata-fields { display: grid; grid-template-columns: minmax(110px, .35fr) minmax(0, 1fr); gap: 10px; }
.md-command-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: min(620px, calc(100dvh - 40px));
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(143, 173, 236, .24);
  border-radius: 20px;
  color: #dce5f6;
  background: rgba(7, 11, 20, .98);
  box-shadow: 0 32px 110px rgba(0, 0, 0, .64);
}
.md-command-dialog::backdrop { background: rgba(0, 3, 10, .72); backdrop-filter: blur(7px); }
.md-command-dialog > input {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid rgba(143, 173, 236, .2);
  border-radius: 13px;
  outline: 0;
  color: inherit;
  background: rgba(0, 0, 0, .3);
  font: 14px/1.4 var(--md-editor-font, system-ui, sans-serif);
}
.md-command-dialog > input:focus { border-color: rgba(126, 165, 255, .55); box-shadow: 0 0 0 3px rgba(88, 126, 218, .12); }
.md-command-list { display: grid; max-height: min(500px, calc(100dvh - 130px)); margin-top: 8px; overflow: auto; }
.md-command-list button {
  min-height: 44px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  color: #abb8cf;
  background: transparent;
  text-align: left;
  font: 520 12px/1.35 var(--md-editor-font, system-ui, sans-serif);
}
.md-command-list button:hover,
.md-command-list button:focus-visible { outline: 0; color: #eef4ff; background: rgba(104, 135, 218, .13); }
.md-command-empty { padding: 18px 12px; color: #66748c; text-align: center; }

.md-table-shell { max-width: 100%; overflow: auto; margin: .8em 0; }
.md-table-tools {
  display: flex;
  gap: 3px;
  width: max-content;
  margin: 0 0 8px auto;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: #111;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
}
.md-table-tools button {
  min-width: 36px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: #b5b5b5;
  background: transparent;
  white-space: nowrap;
  font: 600 11px/1 Inter, 'Noto Sans TC', system-ui, sans-serif;
}
.md-table-tools button:hover,
.md-table-tools button:focus-visible {
  outline: 0;
  color: #0a0a0a;
  background: #f5f5f5;
}

.md-block pre code {
  padding: 0;
  background: transparent;
  white-space: pre;
}

.md-block blockquote {
  position: relative;
  margin: .6em 0;
  padding: .5em 16px .5em 42px;
  border-left: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(118, 148, 255, .07), transparent 72%);
  color: #9ca8bb;
}

/* 引言專用 quote 圖示：走 mask 的 inline SVG（零外部請求），只出現在最外層。 */
.md-block blockquote::before {
  content: '';
  position: absolute;
  top: .68em;
  left: 13px;
  width: 17px;
  height: 17px;
  background-color: #8fa5d9;
  opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.3 5.4C4.6 6.9 3.2 9 3.2 11.8v6.8h6.9v-6.9H6.7c0-1.8 1-3.2 2.9-4.2L7.3 5.4zm9.8 0c-2.7 1.5-4.1 3.6-4.1 6.4v6.8h6.9v-6.9h-3.4c0-1.8 1-3.2 2.9-4.2l-2.3-2.1z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.3 5.4C4.6 6.9 3.2 9 3.2 11.8v6.8h6.9v-6.9H6.7c0-1.8 1-3.2 2.9-4.2L7.3 5.4zm9.8 0c-2.7 1.5-4.1 3.6-4.1 6.4v6.8h6.9v-6.9h-3.4c0-1.8 1-3.2 2.9-4.2l-2.3-2.1z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

.md-block blockquote > :first-child { margin-top: 0; }
.md-block blockquote > :last-child { margin-bottom: 0; }

.md-block blockquote blockquote {
  margin-left: 8px;
  padding-left: 16px;
  border-left: 0;
}

.md-block blockquote blockquote::before { content: none; }

.md-block ul,
.md-block ol {
  margin: .45em 0;
  padding-left: 1.75em;
}

.md-block li { margin: .3em 0; }
.md-block li { line-height: 1.48; }
.md-block li > p { display: inline; margin: 0; }
.md-block li > ul,
.md-block li > ol { margin: .28em 0 .28em .1em; }

.md-block hr {
  margin: 1em 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.md-block table {
  width: 100%;
  margin: .7em 0;
  border-collapse: collapse;
  border: 1px solid rgba(151, 177, 232, .18);
  background: rgba(9, 14, 24, .38);
}

.md-block th,
.md-block td {
  min-width: 90px;
  padding: 10px 12px;
  border: 1px solid rgba(151, 177, 232, .14);
  text-align: left;
}

.md-block th {
  color: #e8efff;
  background: rgba(107, 135, 202, .09);
  font-weight: 650;
}

.md-task-list { padding-left: 0 !important; list-style: none; }
.md-task-item { display: flex; align-items: flex-start; gap: 9px; }
.md-task-toggle {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  /* 對齊首行文字的視覺中心：li 的 line-height 是 1.48，固定 .35em 會讓
     方格略低於文字。用行高推回置中位置。 */
  margin: calc((1.48em - 18px) / 2) 0 0;
  accent-color: #8faeff;
}
.md-task-toggle:checked ~ * { color: #707e94; text-decoration: line-through; }

.md-math {
  color: #edf1fa;
  cursor: text;
}

.md-math-inline {
  display: inline-block;
  margin: 0 .08em;
  padding: .05em .15em;
  border-radius: 5px;
  vertical-align: -.08em;
}

.md-math-block {
  position: relative;
  overflow: auto;
  margin: .7em 0;
  padding: 12px 14px;
  border: 1px solid rgba(163, 145, 255, .12);
  border-radius: 12px;
  background: rgba(124, 102, 197, .035);
  text-align: center;
}
.md-math-block.md-math-numbered { padding-inline: 62px; scroll-margin-top: 72px; }
.md-equation-number {
  position: absolute;
  top: 50%;
  right: 16px;
  translate: 0 -50%;
  min-width: 36px;
  padding: 5px 7px;
  border-radius: 999px;
  color: #a9b3c4;
  background: rgba(255, 255, 255, .055);
  font: 600 .72em/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
a.md-equation-number:hover,
a.md-equation-number:focus-visible {
  outline: 0;
  color: #111;
  background: #f5f5f5;
}

.md-math:hover { background: rgba(144, 121, 226, .08); }
.md-block .katex { font-size: 1.12em; }

@media (max-width: 620px) {
  .md-math-block.md-math-numbered { padding: 14px 14px 42px; }
  .md-equation-number { top: auto; right: 10px; bottom: 8px; translate: 0; }
}

.md-image {
  display: block;
  max-width: 100%;
  max-height: 520px;
  margin: 1em auto;
  border-radius: 12px;
  object-fit: contain;
}

.md-image-placeholder {
  display: inline-block;
  padding: .35em .55em;
  border: 1px dashed rgba(255, 255, 255, .14);
  border-radius: 7px;
  color: #8995aa;
}
.md-mermaid {
  min-height: 120px;
  overflow: auto;
  padding: 18px;
  border-radius: 9px;
  background: rgba(4, 8, 17, .68);
  color: #91a5ca;
  text-align: center;
}
.md-mermaid svg { display: block; width: auto; max-width: 100%; height: auto; max-height: 560px; margin: auto; }
.md-mermaid[data-rendered="error"] { min-height: 0; color: #ff9d9d; text-align: left; }

.md-frontmatter {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 5px 16px;
  margin: 4px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(119, 149, 207, .15);
  border-radius: 10px;
  background: rgba(92, 111, 166, .055);
  font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.md-frontmatter dt { color: #7692c2; }
.md-frontmatter dd { min-width: 0; margin: 0; color: #b4bfd1; overflow-wrap: anywhere; }
.md-callout {
  margin: .45em 0;
  padding: 11px 14px;
  border: 1px solid rgba(119, 156, 255, .28);
  border-left: 3px solid #829dff;
  border-radius: 9px;
  background: rgba(110, 120, 255, .07);
}
.md-callout-title { display: block; margin-bottom: 5px; color: #a8baff; font-size: .72em; letter-spacing: .1em; }
.md-callout-body > :first-child { margin-top: 0; }
.md-callout-body > :last-child { margin-bottom: 0; }
.md-definition-list { margin: .55em 0; }
.md-definition-list dt { color: #d7e0ef; font-weight: 680; }
.md-definition-list dd { margin: .2em 0 .65em 1.2em; color: #aeb9cd; }
.md-footnote-reference { padding: 0 .12em; font-size: .7em; vertical-align: super; }
.md-footnote-definition { display: flex; gap: 10px; padding: 5px 0; color: #95a5bf; font-size: .86em; }
.md-footnote-definition > sup { color: #819eff; }
.md-citation-reference,
.md-citation-cluster { position: relative; display: inline-block; padding: 0 .18em; }
.md-citation-cluster { border-radius: 4px; color: #b7c8ff; font-weight: 700; text-decoration: none; }
.md-citation-reference > a {
  border-radius: 4px;
  color: #b7c8ff;
  font-weight: 700;
  text-decoration: none;
}
.md-citation-reference > a:hover,
.md-citation-reference > a:focus-visible { outline: 0; color: #fff; background: rgba(255, 255, 255, .1); }
.md-hover-preview {
  position: fixed;
  z-index: 2147483000;
  display: grid;
  gap: 8px;
  width: min(330px, calc(100vw - 40px));
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  color: #d7d7d7;
  background: rgba(24, 24, 24, .98);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .52);
  font: 12px/1.45 var(--md-editor-font, system-ui, sans-serif);
  pointer-events: none;
}
.md-hover-preview[hidden] { display: none; }
.md-hover-preview-row { display: grid; gap: 3px; }
.md-hover-preview strong { color: #fff; font-size: 13px; }
.md-hover-preview span { color: #aaa; }
.md-hover-preview-eyebrow { color: #8ea7d5 !important; font-size: 11px; letter-spacing: .04em; }
.md-hover-preview-open { color: #d7d7d7 !important; font-weight: 650; }
.md-citation-definition {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-inline: 0;
  align-items: baseline;
  border-top: 0;
  color: #aaa;
}
.md-citation-definition > span { min-width: 0; overflow-wrap: anywhere; }
/* CSL HTML 帶有排版縮排；編輯區是 pre-wrap，這些換行會被當真渲染成空行，
   讓每筆 reference 撐到三四行高。收斂回一般 white-space 才會緊湊。 */
.md-citation-definition .csl-entry { white-space: normal; line-height: 1.55; }
.md-citation-definition > sup { min-width: 28px; color: #d7d7d7; font-weight: 700; }
.md-citation-back {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  color: #aaa;
  text-decoration: none;
}
.md-citation-back:hover,
.md-citation-back:focus-visible { outline: 0; color: #fff; background: rgba(255, 255, 255, .09); }

@media (max-width: 720px) {
  .md-format-state { font-size: 7px; }
  .md-toolbar {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-color: rgba(151, 178, 246, .72) transparent;
    box-shadow: inset -18px 0 18px -20px rgba(151, 178, 246, .8);
  }
  .md-toolbar::-webkit-scrollbar { height: 8px; }
  .md-surface .cm-editor,
  .md-editor.cm-content { min-height: 380px; }
  .md-editor.cm-content { padding: 26px 22px 48px; }
  .md-insights { gap: 8px; }
  .md-flow-score { display: none; }
  .md-workspace,
  .md-composer[data-outline="true"] .md-workspace { grid-template-columns: minmax(0, 1fr); }
  .md-outline { display: none; }
  .md-composer[data-outline="true"] .md-outline { display: block; max-height: 180px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.06); }
}

@media (prefers-reduced-motion: reduce) {
  .md-composer *,
  .md-composer *::before,
  .md-composer *::after { scroll-behavior: auto !important; transition: none !important; }
  .md-strong-signal {
    background-position: 50% 50%;
    animation: none !important;
  }
  .md-heading-flip-char {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    will-change: auto;
  }
  .md-heading-scrambling::after { content: none !important; }
  .md-paragraph-interference { display: none !important; animation: none !important; }
}

@media (max-width: 560px) {
  .md-location-card { grid-template-columns: 1fr; }
  .md-location-map { min-height: 150px; }
  .md-location-map iframe { min-height: 150px; }
  .md-location-coordinate-fields { grid-template-columns: 1fr; }
  .md-citation-metadata-fields { grid-template-columns: 1fr; }
  .md-citation-library-row { grid-template-columns: 1fr; }
  .md-citation-lookup { align-items: flex-start; flex-direction: column; }
}

@media (pointer: coarse), (forced-colors: active), print {
  .md-paragraph-interference { display: none !important; animation: none !important; }
}

/* AOM-246 — Black Observatory work chrome.
   This layer changes presentation only. CodeMirror remains the sole document,
   selection, history, IME, autosave, sanitizer, and export owner. */
.md-composer {
  --md-work-ui: Roboto, "AnOpen Roboto", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  --md-work-mono: "Roboto Mono", "AnOpen Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --md-work-line: #2a2a2a;
  --md-work-line-strong: #555;
  --md-work-muted: #a1a1aa;
  --md-work-focus: #4493f8;
  border-color: var(--md-work-line);
  background: #000;
  box-shadow: none;
  color: #f7f7f8;
  font-family: var(--md-work-ui);
  color-scheme: dark;
  scrollbar-color: #555 transparent;
}

.md-composer * { scrollbar-color: #555 transparent; }
.md-composer *::-webkit-scrollbar-thumb,
.md-composer *::-webkit-scrollbar-thumb:hover,
.md-toolbar::-webkit-scrollbar-thumb {
  background: #555;
  box-shadow: none;
}

.md-viewbar { background: #000; }
.md-toolbar {
  border-bottom-color: var(--md-work-line);
  background: #000;
  box-shadow: none;
  scrollbar-color: #555 transparent;
}

.md-toolbar button {
  border: 1px solid var(--md-work-line);
  color: var(--md-work-muted);
  background: #000;
  box-shadow: none;
  font: 600 12px/1 var(--md-work-mono);
}

.md-toolbar button:hover {
  border-color: var(--md-work-line-strong);
  color: #fff;
  background: #101010;
}

.md-toolbar button:focus-visible,
.md-mode-button:focus-visible,
.md-interference-select:focus-visible {
  outline: 2px solid var(--md-work-focus);
  outline-offset: -3px;
  border-color: var(--md-work-focus);
  color: #fff;
  background: #101010;
  box-shadow: none;
}

.md-toolbar button[data-active="true"],
.md-toolbar button[aria-pressed="true"] {
  border-color: #fff;
  color: #000;
  background: #fff;
  box-shadow: none;
}

.md-toolbar button:disabled {
  border-color: #1f1f1f;
  color: #5f5f66;
  background: #000;
}

.md-mode-group {
  border-color: var(--md-work-line);
  background: #000;
  box-shadow: none;
}

.md-mode-button {
  border: 1px solid transparent;
  color: var(--md-work-muted);
  background: #000;
  box-shadow: none;
  /* AOM-264：非 metadata 文字下限 14px（shell 底線對 .anopen-product 內失效後由這裡自持）。 */
  font: 600 14px/1 var(--md-work-ui);
}

.md-mode-button:hover {
  border-color: var(--md-work-line-strong);
  color: #fff;
  background: #101010;
}

.md-mode-button[aria-pressed="true"] {
  border-color: #fff;
  color: #000;
  background: #fff;
  box-shadow: none;
}

.md-interference-select {
  border-color: var(--md-work-line);
  color: #d4d4d8;
  background: #000;
  box-shadow: none;
  font: 600 12px/1 var(--md-work-ui);
}

.md-toolbar-divider { background: var(--md-work-line); }

.md-insights {
  border-bottom-color: var(--md-work-line);
  color: var(--md-work-muted);
  background: #000;
  box-shadow: none;
  /* AOM-265：metadata mono 下限 12px（DRAFT §12；shell 底線對產品面讓位後由元件自持）。 */
  font: 500 12px/1 var(--md-work-mono);
  letter-spacing: .02em;
}

.md-word-count,
.md-reading-time,
.md-flow-score,
.md-rhythm {
  border-color: var(--md-work-line);
  color: var(--md-work-muted);
  background: #000;
  background-image: none;
  box-shadow: none;
}

.md-flow-score::before {
  background: #d4d4d8;
  box-shadow: none;
}

.md-rhythm-segment {
  background: #71717a;
  box-shadow: none;
}

.md-outline,
.md-timeline {
  background: #000;
  background-image: none;
  box-shadow: none;
}

.md-outline-title,
.md-font-select,
.md-outline-empty,
.md-knowledge-title,
.md-backlinks button,
.md-concepts button,
.md-timeline-head,
.md-timeline-preview,
.md-timeline-restore {
  font-family: var(--md-work-mono);
}

.md-font-select,
.md-backlinks button,
.md-concepts button,
.md-timeline-restore {
  border-color: var(--md-work-line);
  background: #000;
  box-shadow: none;
}

.md-outline-list button { font-family: var(--md-work-ui); }
.md-outline-list button[data-active="true"] { color: #000; background: #fff; }

.md-surface .cm-editor {
  color: #d4d4d8;
  background: #000;
  font-family: var(--md-work-ui);
}

.md-surface .cm-editor.cm-focused,
.md-composer[data-mood-enabled="true"][data-mood="warm"] .md-surface .cm-editor,
.md-composer[data-mood-enabled="true"][data-mood="cool"] .md-surface .cm-editor {
  background: #000;
  background-image: none;
}

.md-editor.cm-content,
.md-editor .cm-line.md-source-line { font-family: var(--md-editor-font, var(--md-work-ui)); }
.md-composer[data-md-mode="source"] .md-surface .cm-editor,
.md-composer[data-md-mode="source"] .md-editor.cm-content,
.md-composer[data-md-mode="source"] .md-editor .cm-line.md-source-line {
  font-family: var(--md-work-mono);
}

.md-surface .cm-gutters { font-family: var(--md-work-mono); }
.md-surface .cm-activeLineGutter { text-shadow: none; }
.md-surface .cm-cursor { border-left-color: var(--md-work-focus); }

@media (max-width: 240px) {
  .md-insights { padding-inline: 8px; }
  .md-rhythm { display: none; }
  .md-composer[data-outline="true"] .md-outline {
    max-width: 100%;
    overflow: auto;
  }
  .md-knowledge {
    width: auto;
    max-width: calc(100% - 16px);
  }
  .md-surface .cm-gutters { display: none; }
  .md-editor.cm-content { padding-inline: 12px; }
}
