/* vendor/mark/dist/mark.css */
:root {
  --mark-toolbar-bg: rgba(255, 255, 255, 0.95);
  --mark-toolbar-text: #24292f;
  --mark-toolbar-text-muted: rgba(0, 0, 0, 0.5);
  --mark-toolbar-border: #d0d7de;
  --mark-toolbar-hover: rgba(0, 0, 0, 0.08);
  --mark-toolbar-shadow: rgba(0, 0, 0, 0.1);
  --mark-accent: #007acc;
  --mark-accent-hover: #005a9e;
}
:root.mark-dark,
body.mark-dark {
  --mark-toolbar-bg: rgba(30, 30, 30, 0.95);
  --mark-toolbar-text: #c9d1d9;
  --mark-toolbar-text-muted: rgba(255, 255, 255, 0.6);
  --mark-toolbar-border: #30363d;
  --mark-toolbar-hover: rgba(255, 255, 255, 0.1);
  --mark-toolbar-shadow: rgba(0, 0, 0, 0.3);
  --mark-accent: #58a6ff;
  --mark-accent-hover: #4493e1;
}
.mark-container {
  --mark-bg-primary: var(--mark-theme-bg-primary, #ffffff);
  --mark-bg-secondary: var(--mark-theme-bg-secondary, #f6f8fa);
  --mark-bg-editor: var(--mark-theme-bg-editor, #fafbfc);
  --mark-text-primary: var(--mark-theme-text-primary, #24292f);
  --mark-text-secondary: var(--mark-theme-text-secondary, #586069);
  --mark-text-editor: var(--mark-theme-text-editor, var(--mark-text-primary));
  --mark-border-primary: var(--mark-theme-border-primary, #d0d7de);
  --mark-border-secondary: var(--mark-theme-border-secondary, #e1e4e8);
  --mark-accent: var(--mark-theme-accent, #007acc);
  --mark-accent-hover: var(--mark-theme-accent-hover, #005a9e);
  --mark-toolbar-bg: var(--mark-theme-toolbar-bg, rgba(255, 255, 255, 0.95));
  --mark-toolbar-text: var(--mark-theme-toolbar-text, #24292f);
  --mark-toolbar-text-muted: var(--mark-theme-toolbar-text-muted, rgba(0, 0, 0, 0.5));
  --mark-toolbar-border: var(--mark-theme-toolbar-border, #d0d7de);
  --mark-toolbar-hover: var(--mark-theme-toolbar-hover, rgba(0, 0, 0, 0.08));
  --mark-toolbar-shadow: var(--mark-theme-toolbar-shadow, rgba(0, 0, 0, 0.1));
  --mark-scrollbar-thumb: var(--mark-theme-scrollbar-thumb, #c1c1c1);
  --mark-scrollbar-thumb-hover: var(--mark-theme-scrollbar-thumb-hover, #a8a8a8);
  --mark-scrollbar-track: var(--mark-theme-scrollbar-track, transparent);
}
.mark-container.mark-dark {
  --mark-bg-primary: var(--mark-theme-bg-primary, #0d1117);
  --mark-bg-secondary: var(--mark-theme-bg-secondary, #161b22);
  --mark-bg-editor: var(--mark-theme-bg-editor, var(--mark-bg-primary));
  --mark-text-primary: var(--mark-theme-text-primary, #c9d1d9);
  --mark-text-secondary: var(--mark-theme-text-secondary, #8b949e);
  --mark-text-editor: var(--mark-theme-text-editor, var(--mark-text-primary));
  --mark-border-primary: var(--mark-theme-border-primary, #30363d);
  --mark-border-secondary: var(--mark-theme-border-secondary, #21262d);
  --mark-accent: var(--mark-theme-accent, #58a6ff);
  --mark-accent-hover: var(--mark-theme-accent-hover, #4493e1);
  --mark-toolbar-bg: var(--mark-theme-toolbar-bg, rgba(22, 27, 34, 0.95));
  --mark-toolbar-text: var(--mark-theme-toolbar-text, #c9d1d9);
  --mark-toolbar-text-muted: var(--mark-theme-toolbar-text-muted, rgba(255, 255, 255, 0.6));
  --mark-toolbar-border: var(--mark-theme-toolbar-border, #30363d);
  --mark-toolbar-hover: var(--mark-theme-toolbar-hover, rgba(255, 255, 255, 0.1));
  --mark-toolbar-shadow: var(--mark-theme-toolbar-shadow, rgba(0, 0, 0, 0.3));
  --mark-scrollbar-thumb: var(--mark-theme-scrollbar-thumb, #484f58);
  --mark-scrollbar-thumb-hover: var(--mark-theme-scrollbar-thumb-hover, #6e7681);
  --mark-scrollbar-track: var(--mark-theme-scrollbar-track, transparent);
}
.mark-container {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 400px;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(--mark-bg-primary);
  color: var(--mark-text-primary);
  border: 1px solid var(--mark-border-primary);
  border-radius: 8px;
  overflow: hidden;
}
.mark-toolbar {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: transparent;
}
.mark-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--mark-toolbar-text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.mark-btn:hover {
  background: var(--mark-toolbar-hover);
  color: var(--mark-toolbar-text);
}
.mark-btn.mark-active {
  background: var(--mark-accent);
  color: #fff;
}
.mark-btn svg {
  display: block;
}
.mark-toolbar-left,
.mark-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mark-toolbar-left {
  flex: 1;
}
.mark-toolbar-right {
  flex-shrink: 0;
}
.mark-dropdown {
  position: relative;
}
.mark-btn-more {
  background: transparent !important;
}
.mark-btn-more:hover {
  background: transparent !important;
}
.mark-container.mark-dark .mark-btn-more {
  background: var(--mark-bg-secondary) !important;
  border-radius: 6px;
}
.mark-container.mark-dark .mark-btn-more:hover {
  background: var(--mark-toolbar-hover) !important;
}
.mark-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 160px;
  background: var(--mark-bg-primary);
  border: 1px solid var(--mark-border-primary);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 4px;
  z-index: 1000;
}
.mark-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.mark-dropdown:hover .mark-dropdown-menu {
  display: block;
}
.mark-dropdown.mark-dropdown-open .mark-dropdown-menu {
  display: block;
}
.mark-dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--mark-text-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.mark-dropdown-item:hover {
  background: var(--mark-bg-secondary);
}
.mark-dropdown-divider {
  height: 1px;
  margin: 4px 0;
  background: var(--mark-border-secondary);
}
.mark-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mark-dropdown-toggle-label {
  flex: 1;
}
.mark-dropdown-toggle-indicator {
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: var(--mark-border-primary);
  position: relative;
  transition: background 0.2s;
}
.mark-dropdown-toggle-indicator::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
}
.mark-dropdown-toggle.mark-active .mark-dropdown-toggle-indicator {
  background: var(--mark-accent);
}
.mark-dropdown-toggle.mark-active .mark-dropdown-toggle-indicator::after {
  transform: translateX(14px);
}
.mark-dropdown-mode-toggle {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 4px;
}
.mark-dropdown-mode-toggle .mark-btn {
  flex: 1;
  padding: 8px 12px;
}
.mark-dropdown-mode-toggle .mark-btn:hover {
  background: var(--mark-bg-secondary);
}
.mark-dark .mark-dropdown-menu {
  background: #1e1e2e;
  border-color: #313244;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.mark-dark .mark-dropdown-item {
  color: #cdd6f4;
}
.mark-dark .mark-dropdown-item:hover {
  background: #313244;
}
.mark-dark .mark-dropdown-divider {
  background: #313244;
}
.mark-panels {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.mark-editor-panel,
.mark-preview-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.mark-editor {
  flex: 1;
  width: 100%;
  padding: 60px 20px 20px 20px;
  background: var(--mark-bg-editor);
  color: var(--mark-text-editor);
  font-family:
    "Consolas",
    "Monaco",
    "Courier New",
    monospace;
  font-size: 14px;
  line-height: 1.6;
  border: none;
  resize: none;
  outline: none;
  overflow-y: auto;
  tab-size: 2;
}
.mark-editor::placeholder {
  color: var(--mark-text-secondary);
}
.mark-resizer {
  width: 4px;
  background: transparent;
  cursor: ew-resize;
  flex-shrink: 0;
  transition: background 0.15s;
}
.mark-resizer:hover {
  background: var(--mark-accent);
}
.mark-preview {
  flex: 1;
  padding: 40px 20px 20px 20px;
  overflow-y: auto;
  background: var(--mark-bg-primary);
  color: var(--mark-text-primary);
  line-height: 1.6;
  outline: none;
}
.mark-preview:focus {
  outline: none;
  box-shadow: none;
}
.mark-editor-panel,
.mark-preview-panel {
  transition:
    flex 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  will-change:
    flex,
    width,
    opacity;
}
body.resizing .mark-editor-panel,
body.resizing .mark-preview-panel {
  transition: none !important;
}
.mark-resizer {
  transition: opacity 0.2s ease;
}
.mark-editor,
.mark-preview {
  transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.mark-mode-code .mark-editor-panel {
  flex: 1;
  width: 100%;
  opacity: 1;
  display: flex;
  justify-content: center;
}
.mark-mode-code .mark-editor {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 40px 40px 40px;
}
.mark-mode-code .mark-preview-panel {
  flex: 0;
  width: 0;
  min-width: 0;
  opacity: 0;
  padding: 0;
  border: none;
  overflow: hidden;
}
.mark-mode-code .mark-resizer {
  opacity: 0;
  pointer-events: none;
}
.mark-mode-preview .mark-preview-panel {
  flex: 1;
  width: 100%;
  opacity: 1;
  display: flex;
  justify-content: center;
}
.mark-mode-preview .mark-preview {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 40px 40px 40px;
}
.mark-mode-preview .mark-editor-panel {
  flex: 0;
  width: 0;
  min-width: 0;
  opacity: 0;
  padding: 0;
  border: none;
  overflow: hidden;
}
.mark-mode-preview .mark-resizer {
  opacity: 0;
  pointer-events: none;
}
.mark-mode-divided .mark-editor-panel {
  flex: 0 0 auto;
  width: calc(50% - 2px);
  min-width: 200px;
  opacity: 1;
  border-right: 1px solid var(--mark-border-primary);
}
.mark-mode-divided .mark-preview-panel {
  flex: 0 0 auto;
  width: calc(50% - 2px);
  min-width: 200px;
  opacity: 1;
  border-left: 1px solid var(--mark-border-primary);
}
.mark-mode-divided .mark-resizer {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
.mark-mode-divided .mark-editor,
.mark-mode-divided .mark-preview {
  max-width: none;
  margin: 0;
  padding: 40px 20px 20px 20px;
}
.mark-resizer:active {
  background: var(--mark-accent);
}
.mark-preview h1 {
  font-size: 2em;
  font-weight: 600;
  margin: 24px 0 16px 0;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--mark-border-primary);
}
.mark-preview h2 {
  font-size: 1.5em;
  font-weight: 600;
  margin: 24px 0 16px 0;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--mark-border-primary);
}
.mark-preview h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin: 24px 0 16px 0;
}
.mark-preview h4,
.mark-preview h5,
.mark-preview h6 {
  font-size: 1em;
  font-weight: 600;
  margin: 24px 0 16px 0;
}
.mark-preview p {
  margin-bottom: 16px;
}
.mark-preview strong {
  font-weight: 600;
}
.mark-preview em {
  font-style: italic;
}
.mark-preview code {
  background: var(--mark-bg-secondary);
  padding: 2px 6px;
  border-radius: 3px;
  font-family:
    "Consolas",
    "Monaco",
    "Courier New",
    monospace;
  font-size: 85%;
  color: #e83e8c;
}
.mark-dark .mark-preview code {
  color: #ff7b72;
}
.mark-preview pre {
  background: var(--mark-bg-secondary);
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 16px;
  border: 1px solid var(--mark-border-primary);
}
.mark-preview pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.mark-preview .math-inline {
  font-family:
    "KaTeX_Math",
    "Times New Roman",
    serif;
  font-style: italic;
  padding: 0 2px;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s;
}
.mark-preview .math-inline:hover {
  background: var(--mark-bg-tertiary);
}
.mark-preview .math-block {
  display: block;
  font-family:
    "KaTeX_Math",
    "Times New Roman",
    serif;
  font-style: italic;
  text-align: center;
  padding: 1em;
  margin: 1em 0;
  background: var(--mark-bg-tertiary);
  border-radius: 4px;
  overflow-x: auto;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.mark-preview .math-block:hover {
  box-shadow: 0 0 0 2px var(--mark-border);
}
.mark-preview .katex-display {
  margin: 1em 0;
  text-align: center;
}
.mark-preview blockquote {
  padding: 0 1em;
  color: var(--mark-text-secondary);
  border-left: 0.25em solid var(--mark-border-secondary);
  margin: 0 0 16px 0;
}
.mark-preview ul,
.mark-preview ol {
  margin-bottom: 16px;
  padding-left: 2em;
}
.mark-preview li {
  margin-bottom: 4px;
}
.mark-preview a {
  color: var(--mark-accent);
  text-decoration: none;
}
.mark-preview a:hover {
  text-decoration: underline;
}
.mark-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.mark-preview hr {
  height: 0.25em;
  padding: 0;
  margin: 24px 0;
  background-color: var(--mark-border-primary);
  border: 0;
}
.mark-preview table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 16px;
}
.mark-preview th,
.mark-preview td {
  padding: 10px 16px;
  border: 1px solid var(--mark-border-primary);
  text-align: left;
}
.mark-preview th {
  background: var(--mark-bg-secondary);
  font-weight: 600;
}
.mark-preview li.task-item {
  list-style: none;
  display: flex;
  align-items: flex-start;
}
.mark-preview li.task-item input[type=checkbox] {
  margin-right: 8px;
  margin-top: 4px;
}
.mark-editor::-webkit-scrollbar,
.mark-preview::-webkit-scrollbar {
  width: 8px;
}
.mark-editor::-webkit-scrollbar-track,
.mark-preview::-webkit-scrollbar-track {
  background: var(--mark-scrollbar-track);
}
.mark-editor::-webkit-scrollbar-thumb,
.mark-preview::-webkit-scrollbar-thumb {
  background: var(--mark-scrollbar-thumb);
  border-radius: 4px;
}
.mark-editor::-webkit-scrollbar-thumb:hover,
.mark-preview::-webkit-scrollbar-thumb:hover {
  background: var(--mark-scrollbar-thumb-hover);
}
.mark-container.mark-delegate-scroll {
  overflow: visible;
  min-height: auto;
}
.mark-container.mark-delegate-scroll .mark-panels {
  overflow: visible;
}
.mark-container.mark-delegate-scroll .mark-editor-panel,
.mark-container.mark-delegate-scroll .mark-preview-panel {
  overflow: visible;
}
.mark-container.mark-delegate-scroll .mark-editor,
.mark-container.mark-delegate-scroll .mark-preview {
  overflow: visible;
  max-height: none;
}
.mark-container.mark-delegate-scroll .mark-editor::-webkit-scrollbar,
.mark-container.mark-delegate-scroll .mark-preview::-webkit-scrollbar {
  display: none;
}
.mark-container.mark-delegate-scroll .mark-editor,
.mark-container.mark-delegate-scroll .mark-preview {
  scrollbar-width: none;
}
.mark-focus-mode .mark-preview > *:not(.mark-focused) {
  opacity: 0.3;
  transition: opacity 0.2s ease;
}
.mark-focus-mode .mark-preview > .mark-focused {
  opacity: 1;
}
.mark-focus-mode .mark-editor {
}
.mark-typewriter-mode .mark-editor-panel {
  scroll-behavior: smooth;
}
.mark-typewriter-mode .mark-editor {
  padding-top: 40vh;
  padding-bottom: 40vh;
}
.mark-scroll-sync .mark-editor-panel,
.mark-scroll-sync .mark-preview-panel {
  scroll-behavior: smooth;
}
.mark-reading-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--mark-accent);
  width: 0%;
  transition: width 0.1s ease-out;
  z-index: 200;
  border-radius: 0 2px 2px 0;
}
.mark-editor {
  caret-color: var(--mark-accent);
}
.mark-preview [contenteditable] {
  caret-color: var(--mark-accent);
}
.mark-editor::selection,
.mark-preview ::selection {
  background: var(--mark-accent);
  color: white;
}
.mark-editor::-moz-selection,
.mark-preview ::-moz-selection {
  background: var(--mark-accent);
  color: white;
}
.mark-preview a {
  position: relative;
}
.mark-link-preview {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--mark-bg-secondary);
  border: 1px solid var(--mark-border-primary);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--mark-text-secondary);
  white-space: nowrap;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.mark-preview a:hover .mark-link-preview {
  opacity: 1;
}
@media (max-width: 768px) {
  .mark-mode-divided .mark-panels {
    flex-direction: column;
  }
  .mark-mode-divided .mark-editor-panel,
  .mark-mode-divided .mark-preview-panel {
    flex: 1;
  }
  .mark-mode-divided .mark-resizer {
    width: 100%;
    height: 4px;
    cursor: ns-resize;
  }
}
.mark-preview .tag {
  display: inline-block;
  background: transparent;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: text;
  border: 2px solid;
}
.mark-preview .tag-purple {
  border-color: #8b5cf6;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
}
.mark-preview .tag-purple:hover {
  background: rgba(139, 92, 246, 0.15);
}
.mark-preview .tag-blue {
  border-color: #3b82f6;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}
.mark-preview .tag-blue:hover {
  background: rgba(59, 130, 246, 0.15);
}
.mark-preview .tag-red {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}
.mark-preview .tag-red:hover {
  background: rgba(239, 68, 68, 0.15);
}
.mark-preview .tag-green {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}
.mark-preview .tag-green:hover {
  background: rgba(16, 185, 129, 0.15);
}
.mark-preview .tag-orange {
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}
.mark-preview .tag-orange:hover {
  background: rgba(245, 158, 11, 0.15);
}
.mark-preview .tag-pink {
  border-color: #ec4899;
  color: #ec4899;
  background: rgba(236, 72, 153, 0.05);
}
.mark-preview .tag-pink:hover {
  background: rgba(236, 72, 153, 0.15);
}
.mark-preview .tag-teal {
  border-color: #14b8a6;
  color: #14b8a6;
  background: rgba(20, 184, 166, 0.05);
}
.mark-preview .tag-teal:hover {
  background: rgba(20, 184, 166, 0.15);
}
.mark-preview .tag-yellow {
  border-color: #eab308;
  color: #eab308;
  background: rgba(234, 179, 8, 0.05);
}
.mark-preview .tag-yellow:hover {
  background: rgba(234, 179, 8, 0.15);
}
.mark-dark .mark-preview .tag-purple {
  border-color: #a78bfa;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
}
.mark-dark .mark-preview .tag-purple:hover {
  background: rgba(167, 139, 250, 0.2);
}
.mark-dark .mark-preview .tag-blue {
  border-color: #60a5fa;
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
}
.mark-dark .mark-preview .tag-blue:hover {
  background: rgba(96, 165, 250, 0.2);
}
.mark-dark .mark-preview .tag-red {
  border-color: #f87171;
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}
.mark-dark .mark-preview .tag-red:hover {
  background: rgba(248, 113, 113, 0.2);
}
.mark-dark .mark-preview .tag-green {
  border-color: #34d399;
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}
.mark-dark .mark-preview .tag-green:hover {
  background: rgba(52, 211, 153, 0.2);
}
.mark-dark .mark-preview .tag-orange {
  border-color: #fbbf24;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}
.mark-dark .mark-preview .tag-orange:hover {
  background: rgba(251, 191, 36, 0.2);
}
.mark-dark .mark-preview .tag-pink {
  border-color: #f472b6;
  color: #f472b6;
  background: rgba(244, 114, 182, 0.1);
}
.mark-dark .mark-preview .tag-pink:hover {
  background: rgba(244, 114, 182, 0.2);
}
.mark-dark .mark-preview .tag-teal {
  border-color: #2dd4bf;
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.1);
}
.mark-dark .mark-preview .tag-teal:hover {
  background: rgba(45, 212, 191, 0.2);
}
.mark-dark .mark-preview .tag-yellow {
  border-color: #facc15;
  color: #facc15;
  background: rgba(250, 204, 21, 0.1);
}
.mark-dark .mark-preview .tag-yellow:hover {
  background: rgba(250, 204, 21, 0.2);
}
.mark-preview details {
  margin-bottom: 16px;
  border: 1px solid var(--mark-border-primary);
  border-radius: 6px;
  padding: 8px;
}
.mark-preview summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px;
  user-select: none;
}
.mark-preview details[open] summary {
  margin-bottom: 8px;
}
.mark-preview details > *:not(summary) {
  padding-left: 1em;
}
.mark-preview h1[id],
.mark-preview h2[id],
.mark-preview h3[id],
.mark-preview h4[id],
.mark-preview h5[id],
.mark-preview h6[id] {
  position: relative;
  scroll-margin-top: 80px;
}
.mark-preview h1[id]::before,
.mark-preview h2[id]::before,
.mark-preview h3[id]::before,
.mark-preview h4[id]::before,
.mark-preview h5[id]::before,
.mark-preview h6[id]::before {
  content: "\1f517";
  position: absolute;
  left: -1.5em;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
  font-size: 0.8em;
  user-select: none;
  pointer-events: auto;
}
.mark-preview h1[id]:hover::before,
.mark-preview h2[id]:hover::before,
.mark-preview h3[id]:hover::before,
.mark-preview h4[id]:hover::before,
.mark-preview h5[id]:hover::before,
.mark-preview h6[id]:hover::before {
  opacity: 0.5;
}
.mark-preview h1[id]::before:hover,
.mark-preview h2[id]::before:hover,
.mark-preview h3[id]::before:hover,
.mark-preview h4[id]::before:hover,
.mark-preview h5[id]::before:hover,
.mark-preview h6[id]::before:hover {
  opacity: 1 !important;
}
body.resizing {
  cursor: ew-resize !important;
  user-select: none !important;
}
body.resizing * {
  cursor: ew-resize !important;
}
.perf-indicator {
  position: fixed;
  top: 60px;
  right: 10px;
  z-index: 10000;
  font-family:
    "SF Mono",
    "Monaco",
    "Inconsolata",
    "Courier New",
    monospace;
  font-size: 12px;
}
.perf-badge {
  background: #2ecc71;
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: grab;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  user-select: none;
}
.perf-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.perf-badge:active {
  transform: scale(0.98);
}
.perf-badge.perf-good {
  background: #2ecc71;
}
.perf-badge.perf-ok {
  background: #f39c12;
}
.perf-badge.perf-bad {
  background: #e74c3c;
  animation: perf-pulse 1s infinite;
}
@keyframes perf-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}
.perf-icon {
  font-size: 16px;
  line-height: 1;
}
.perf-value {
  font-size: 18px;
  font-weight: bold;
  min-width: 35px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.perf-unit {
  font-size: 11px;
  opacity: 0.9;
}
.perf-details {
  margin-top: 10px;
  background: #2d2d2d;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  min-width: 280px;
  animation: perf-slide-in 0.2s ease;
}
@keyframes perf-slide-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.perf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #444;
}
.perf-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.perf-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  line-height: 1;
  transition: color 0.2s;
}
.perf-close:hover {
  color: #fff;
}
.perf-metrics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.perf-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  color: #fff;
  font-size: 13px;
}
.perf-label {
  font-weight: 500;
  color: #aaa;
}
.perf-metric span:last-child {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #2ecc71;
}
.perf-info {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #444;
  text-align: center;
  color: #888;
  font-size: 11px;
}
.mark-editor:empty::before,
.mark-editor:not(:focus):has(> br:only-child)::before {
  content: attr(data-placeholder);
  color: var(--mark-text-secondary);
  opacity: 0.6;
  pointer-events: none;
  font-style: italic;
}
.mark-preview:empty::before {
  content: "Preview will appear here...";
  color: var(--mark-text-secondary);
  opacity: 0.5;
  font-style: italic;
}
.mark-status-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: var(--mark-bg-secondary);
  border-top: 1px solid var(--mark-border-primary);
  font-size: 12px;
  color: var(--mark-text-secondary);
  z-index: 50;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.mark-container:hover .mark-status-bar,
.mark-container:focus-within .mark-status-bar {
  opacity: 1;
}
.mark-status-left,
.mark-status-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.mark-status-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mark-status-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.mark-word-count {
  font-variant-numeric: tabular-nums;
}
.mark-autosave {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mark-autosave-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  transition: all 0.3s ease;
}
.mark-autosave-dot.saving {
  background: #f59e0b;
  animation: autosave-pulse 0.8s ease-in-out infinite;
}
.mark-autosave-dot.error {
  background: #ef4444;
}
@keyframes autosave-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}
.mark-container.mark-zen .mark-toolbar,
.mark-container.mark-zen .mark-status-bar {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mark-container.mark-zen:hover .mark-toolbar {
  opacity: 1;
  pointer-events: auto;
}
.mark-container.mark-zen .mark-editor,
.mark-container.mark-zen .mark-preview {
  font-size: 18px;
  line-height: 1.8;
}
.mark-editor {
  font-family:
    "SF Mono",
    "Monaco",
    "Inconsolata",
    "Fira Code",
    "Consolas",
    monospace;
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.mark-preview {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Helvetica Neue",
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.mark-preview h1:first-child,
.mark-preview h2:first-child,
.mark-preview h3:first-child {
  margin-top: 0;
}
.mark-shortcuts-hint {
  position: absolute;
  bottom: 40px;
  right: 12px;
  padding: 8px 12px;
  background: var(--mark-toolbar-bg);
  border-radius: 6px;
  font-size: 11px;
  color: var(--mark-text-secondary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 2px 8px var(--mark-toolbar-shadow);
}
.mark-container:focus-within .mark-shortcuts-hint {
  opacity: 0.8;
}
.mark-shortcuts-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--mark-bg-secondary);
  border: 1px solid var(--mark-border-primary);
  border-radius: 3px;
  font-family: inherit;
  font-size: 10px;
  margin: 0 2px;
}
.mark-editor::selection,
.mark-preview::selection {
  background: var(--mark-accent);
  color: #fff;
}
.mark-editor::-moz-selection,
.mark-preview::-moz-selection {
  background: var(--mark-accent);
  color: #fff;
}
.mark-command-palette-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 15vh;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
.mark-command-palette-overlay.visible {
  opacity: 1;
  visibility: visible;
}
.mark-command-palette {
  width: 100%;
  max-width: 560px;
  background: var(--mark-bg-primary);
  border: 1px solid var(--mark-border-primary);
  border-radius: 12px;
  box-shadow: 0 16px 70px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: translateY(-20px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.mark-command-palette-overlay.visible .mark-command-palette {
  transform: translateY(0) scale(1);
}
.mark-command-palette-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--mark-border-secondary);
  gap: 12px;
}
.mark-command-palette-icon {
  color: var(--mark-text-secondary);
  flex-shrink: 0;
}
.mark-command-palette-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--mark-text-primary);
  outline: none;
  caret-color: var(--mark-accent);
}
.mark-command-palette-input::placeholder {
  color: var(--mark-text-secondary);
}
.mark-command-palette-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}
.mark-command-palette-empty {
  padding: 24px;
  text-align: center;
  color: var(--mark-text-secondary);
  font-size: 14px;
}
.mark-command-palette-category {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mark-text-secondary);
}
.mark-command-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s ease;
}
.mark-command-item:hover,
.mark-command-item.selected {
  background: var(--mark-bg-secondary);
}
.mark-command-item.selected {
  background: var(--mark-accent);
  color: white;
}
.mark-command-item.selected .mark-command-shortcut,
.mark-command-item.selected .mark-command-desc {
  color: rgba(255, 255, 255, 0.8);
}
.mark-command-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mark-text-secondary);
  flex-shrink: 0;
}
.mark-command-item.selected .mark-command-icon {
  color: white;
}
.mark-command-content {
  flex: 1;
  min-width: 0;
}
.mark-command-title {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mark-command-desc {
  font-size: 12px;
  color: var(--mark-text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mark-command-shortcut {
  font-size: 11px;
  padding: 3px 6px;
  background: var(--mark-bg-secondary);
  border: 1px solid var(--mark-border-primary);
  border-radius: 4px;
  color: var(--mark-text-secondary);
  font-family: inherit;
  white-space: nowrap;
}
.mark-command-item.selected .mark-command-shortcut {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}
.mark-command-palette-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--mark-border-secondary);
  font-size: 12px;
  color: var(--mark-text-secondary);
}
.mark-command-palette-hint {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mark-command-palette-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--mark-bg-secondary);
  border: 1px solid var(--mark-border-primary);
  border-radius: 3px;
  font-family: inherit;
  font-size: 10px;
}
.mark-dark .mark-command-palette-overlay {
  background: rgba(0, 0, 0, 0.7);
}
.mark-dark .mark-command-palette {
  background: #1a1a2e;
  border-color: #30363d;
  box-shadow: 0 16px 70px rgba(0, 0, 0, 0.5);
}
.mark-dark .mark-command-item:hover,
.mark-dark .mark-command-item.selected:not(.selected) {
  background: #252540;
}
.mark-command-palette-results::-webkit-scrollbar {
  width: 6px;
}
.mark-command-palette-results::-webkit-scrollbar-track {
  background: transparent;
}
.mark-command-palette-results::-webkit-scrollbar-thumb {
  background: var(--mark-scrollbar-thumb);
  border-radius: 3px;
}
.mark-command-palette-results::-webkit-scrollbar-thumb:hover {
  background: var(--mark-scrollbar-thumb-hover);
}
.mark-search-panel {
  position: absolute;
  top: 8px;
  right: 60px;
  z-index: 150;
  background: var(--mark-bg-primary);
  border: 1px solid var(--mark-border-primary);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 12px;
  width: 320px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.mark-search-panel.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mark-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mark-search-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--mark-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mark-search-close {
  background: none;
  border: none;
  color: var(--mark-text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mark-search-close:hover {
  background: var(--mark-toolbar-hover);
  color: var(--mark-text-primary);
}
.mark-search-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.mark-search-input-wrapper {
  flex: 1;
  position: relative;
}
.mark-search-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--mark-border-primary);
  border-radius: 6px;
  background: var(--mark-bg-secondary);
  color: var(--mark-text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mark-search-input:focus {
  border-color: var(--mark-accent);
  box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}
.mark-search-input::placeholder {
  color: var(--mark-text-secondary);
}
.mark-search-options {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}
.mark-search-option {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--mark-border-secondary);
  border-radius: 4px;
  background: transparent;
  color: var(--mark-text-secondary);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.mark-search-option:hover {
  background: var(--mark-toolbar-hover);
  color: var(--mark-text-primary);
}
.mark-search-option.active {
  background: var(--mark-accent);
  border-color: var(--mark-accent);
  color: white;
}
.mark-search-actions {
  display: flex;
  gap: 6px;
}
.mark-search-btn {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--mark-border-primary);
  border-radius: 4px;
  background: var(--mark-bg-secondary);
  color: var(--mark-text-primary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.mark-search-btn:hover {
  background: var(--mark-toolbar-hover);
}
.mark-search-btn.primary {
  background: var(--mark-accent);
  border-color: var(--mark-accent);
  color: white;
}
.mark-search-btn.primary:hover {
  background: var(--mark-accent-hover);
}
.mark-search-nav {
  display: flex;
  gap: 2px;
}
.mark-search-nav-btn {
  padding: 6px 8px;
  border: 1px solid var(--mark-border-primary);
  border-radius: 4px;
  background: var(--mark-bg-secondary);
  color: var(--mark-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mark-search-nav-btn:hover {
  background: var(--mark-toolbar-hover);
}
.mark-search-nav-btn:first-child {
  border-radius: 4px 0 0 4px;
}
.mark-search-nav-btn:last-child {
  border-radius: 0 4px 4px 0;
}
.mark-search-count {
  font-size: 11px;
  color: var(--mark-text-secondary);
  padding: 4px 0;
  text-align: center;
}
.mark-search-count.no-results {
  color: #dc3545;
}
.mark-search-highlight {
  background: rgba(255, 213, 0, 0.4);
  border-radius: 2px;
}
.mark-search-highlight.current {
  background: rgba(255, 165, 0, 0.6);
  box-shadow: 0 0 0 1px rgba(255, 165, 0, 0.8);
}
.mark-dark .mark-search-panel {
  background: #1a1a2e;
  border-color: #30363d;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.mark-dark .mark-search-input {
  background: #252540;
  border-color: #30363d;
}
.mark-dark .mark-search-highlight {
  background: rgba(255, 213, 0, 0.3);
}
.mark-dark .mark-search-highlight.current {
  background: rgba(255, 165, 0, 0.5);
}
.mark-link-tooltip {
  position: fixed;
  z-index: 1000;
  background: var(--mark-bg-primary);
  border: 1px solid var(--mark-border-primary);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 10px 12px;
  max-width: 320px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all 0.15s ease;
}
.mark-link-tooltip.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mark-link-tooltip-url {
  font-size: 12px;
  color: var(--mark-accent);
  word-break: break-all;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mark-link-tooltip-url svg {
  flex-shrink: 0;
  color: var(--mark-text-secondary);
}
.mark-link-tooltip-preview {
  font-size: 11px;
  color: var(--mark-text-secondary);
  line-height: 1.4;
}
.mark-link-tooltip-hint {
  font-size: 10px;
  color: var(--mark-text-secondary);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--mark-border-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.mark-link-tooltip-hint kbd {
  display: inline-block;
  padding: 1px 4px;
  background: var(--mark-bg-secondary);
  border: 1px solid var(--mark-border-primary);
  border-radius: 3px;
  font-family: inherit;
  font-size: 9px;
}
.mark-dark .mark-link-tooltip {
  background: #1a1a2e;
  border-color: #30363d;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.mark-container {
  --docmap-collapsed-width: 24px;
  --docmap-preview-width: 60px;
  --docmap-expanded-width: 280px;
  --docmap-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --docmap-line-h1: var(--mark-accent);
  --docmap-line-h2: color-mix(in srgb, var(--mark-accent) 70%, transparent);
  --docmap-line-h3: color-mix(in srgb, var(--mark-accent) 50%, transparent);
  --docmap-line-h4: color-mix(in srgb, var(--mark-accent) 40%, transparent);
  --docmap-line-p: var(--mark-text-secondary);
  --docmap-line-code: #10b981;
  --docmap-line-list: #f59e0b;
  --docmap-line-quote: #8b5cf6;
  --docmap-viewport-bg: color-mix(in srgb, var(--mark-accent) 15%, transparent);
}
.mark-docmap {
  position: absolute;
  top: 48px;
  right: 0;
  bottom: 32px;
  width: var(--docmap-collapsed-width);
  background: var(--mark-bg-primary);
  border-left: 1px solid var(--mark-border-secondary);
  z-index: 100;
  overflow: hidden;
  transition: width var(--docmap-transition), box-shadow var(--docmap-transition);
}
.mark-docmap[data-state=collapsed] {
  width: var(--docmap-collapsed-width);
}
.mark-docmap[data-state=preview] {
  width: var(--docmap-preview-width);
}
.mark-docmap[data-state=expanded] {
  width: var(--docmap-expanded-width);
  box-shadow: -4px 0 20px var(--mark-toolbar-shadow);
}
.mark-docmap.mark-docmap-hidden,
.mark-docmap.mark-docmap-empty {
  width: 0;
  padding: 0;
  border: none;
  pointer-events: none;
  opacity: 0;
}
.mark-docmap-hide {
  position: absolute;
  top: 8px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: var(--mark-toolbar-bg);
  border: 1px solid var(--mark-border-secondary);
  border-radius: 4px;
  color: var(--mark-text-secondary);
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s,
    background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
  padding: 0;
}
.mark-docmap[data-state=collapsed] .mark-docmap-hide,
.mark-docmap[data-state=expanded] .mark-docmap-hide {
  display: none;
}
.mark-docmap[data-state=preview]:hover .mark-docmap-hide {
  opacity: 1;
}
.mark-docmap-hide:hover {
  background: var(--mark-accent);
  color: white;
  border-color: var(--mark-accent);
}
.mark-docmap-hide svg {
  width: 12px;
  height: 12px;
}
.mark-docmap-minimap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}
.mark-docmap-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
  z-index: 3;
}
.mark-docmap-viewport {
  position: absolute;
  left: 2px;
  right: 2px;
  background: var(--docmap-viewport-bg);
  border-radius: 2px;
  pointer-events: none;
  transition: top 0.1s ease;
  min-height: 20px;
  z-index: 2;
}
.mark-docmap-lines {
  position: absolute;
  top: 8px;
  left: 4px;
  right: 4px;
  bottom: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  pointer-events: none;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mark-docmap-lines::-webkit-scrollbar {
  display: none;
}
.mark-docmap-minimap:hover .mark-docmap-lines,
.mark-docmap.mark-docmap-scrolling .mark-docmap-lines {
  pointer-events: auto;
  cursor: grab;
}
.mark-docmap-minimap:hover .mark-docmap-lines:active,
.mark-docmap.mark-docmap-scrolling .mark-docmap-lines:active {
  cursor: grabbing;
}
.mark-docmap-line {
  width: var(--width, 60%);
  border-radius: 1px;
  flex-shrink: 0;
  transition:
    width var(--docmap-transition),
    height var(--docmap-transition),
    opacity var(--docmap-transition);
}
.mark-docmap-line[data-type=h1] {
  height: 4px;
  background: var(--docmap-line-h1);
  opacity: 1;
}
.mark-docmap-line[data-type=h2] {
  height: 3px;
  background: var(--docmap-line-h2);
  opacity: 0.9;
}
.mark-docmap-line[data-type=h3] {
  height: 3px;
  background: var(--docmap-line-h3);
  opacity: 0.7;
  margin-left: 4px;
}
.mark-docmap-line[data-type=h4] {
  height: 2px;
  background: var(--docmap-line-h4);
  opacity: 0.6;
  margin-left: 8px;
}
.mark-docmap-line[data-type=p] {
  height: 2px;
  background: var(--docmap-line-p);
  opacity: 0.4;
}
.mark-docmap-line[data-type=code] {
  height: 2px;
  background: var(--docmap-line-code);
  opacity: 0.6;
}
.mark-docmap-line[data-type=list] {
  height: 2px;
  background: var(--docmap-line-list);
  opacity: 0.5;
  margin-left: 4px;
}
.mark-docmap-line[data-type=quote] {
  height: 2px;
  background: var(--docmap-line-quote);
  opacity: 0.5;
  margin-left: 4px;
}
.mark-docmap-line[data-type=empty] {
  height: 3px;
  background: transparent;
}
.mark-docmap-line.active {
  opacity: 1;
  filter: brightness(1.2);
}
.mark-docmap-line.mark-docmap-line-visible {
  opacity: 1;
  transform: scaleX(1.1);
  filter: brightness(1.3);
}
.mark-docmap-toc {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--mark-bg-primary);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity var(--docmap-transition), transform var(--docmap-transition);
  z-index: 10;
}
.mark-docmap[data-state=expanded] .mark-docmap-toc {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.mark-docmap[data-state=expanded] .mark-docmap-minimap {
  opacity: 0;
  pointer-events: none;
}
.mark-docmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px;
  border-bottom: 1px solid var(--mark-border-secondary);
}
.mark-docmap-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mark-text-secondary);
}
.mark-docmap-collapse {
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--mark-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.mark-docmap-collapse:hover {
  background: var(--mark-toolbar-hover);
  color: var(--mark-text-primary);
}
.mark-docmap-collapse svg {
  width: 14px;
  height: 14px;
}
.mark-docmap-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.mark-docmap-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  color: var(--mark-text-primary);
  font-size: 13px;
  line-height: 1.4;
  transition: background 0.1s, color 0.1s;
  margin-bottom: 2px;
}
.mark-docmap-item:hover {
  background: var(--mark-bg-secondary);
}
.mark-docmap-item.active {
  background: var(--mark-accent);
  color: white;
}
.mark-docmap-indicator {
  width: 3px;
  height: 12px;
  background: var(--mark-accent);
  border-radius: 2px;
  flex-shrink: 0;
  opacity: 0.6;
}
.mark-docmap-item.active .mark-docmap-indicator {
  background: white;
  opacity: 1;
}
.mark-docmap-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mark-docmap-item[data-level="2"] {
  padding-left: 20px;
}
.mark-docmap-item[data-level="3"] {
  padding-left: 32px;
  font-size: 12px;
  color: var(--mark-text-secondary);
}
.mark-docmap-item[data-level="4"] {
  padding-left: 44px;
  font-size: 12px;
  color: var(--mark-text-secondary);
}
.mark-docmap-item[data-level="3"]:hover,
.mark-docmap-item[data-level="4"]:hover {
  color: var(--mark-text-primary);
}
.mark-docmap-item[data-level="3"].active,
.mark-docmap-item[data-level="4"].active {
  color: white;
}
.mark-docmap-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--mark-text-secondary);
  font-size: 12px;
  text-align: center;
  padding: 20px;
}
.mark-docmap-content::-webkit-scrollbar {
  width: 4px;
}
.mark-docmap-content::-webkit-scrollbar-track {
  background: transparent;
}
.mark-docmap-content::-webkit-scrollbar-thumb {
  background: var(--mark-scrollbar-thumb);
  border-radius: 2px;
}
.mark-docmap-content::-webkit-scrollbar-thumb:hover {
  background: var(--mark-scrollbar-thumb-hover);
}
.mark-dark .mark-docmap {
  background: #161b22;
  border-color: #30363d;
}
.mark-dark .mark-docmap[data-state=expanded] {
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
}
.mark-dark .mark-docmap-toc {
  background: #161b22;
}
.mark-dark .mark-docmap-header {
  border-color: #30363d;
}
.mark-dark .mark-docmap-item:hover {
  background: #252540;
}
.mark-container.mark-docmap-visible .mark-panels {
  margin-right: var(--docmap-collapsed-width);
  transition: margin-right var(--docmap-transition);
}
.mark-container.mark-docmap-visible[data-docmap-state=preview] .mark-panels {
  margin-right: var(--docmap-preview-width);
}
.mark-container.mark-docmap-visible[data-docmap-state=expanded] .mark-panels {
  margin-right: var(--docmap-expanded-width);
}
@media print {
  .mark-toolbar,
  .mark-status-bar,
  .mark-editor-panel,
  .mark-resizer,
  .mark-command-palette-overlay,
  .mark-search-panel,
  .mark-docmap,
  .mark-link-tooltip {
    display: none !important;
  }
  .mark-container {
    border: none;
    background: white;
  }
  .mark-preview-panel {
    flex: 1;
  }
  .mark-preview {
    max-width: 100%;
    padding: 0;
    color: black;
    background: white;
  }
}
.mark-preview [placeholder]:empty::after,
.mark-preview [placeholder].empty-placeholder::after {
  content: attr(placeholder);
  color: var(--placeholder-color, rgba(155, 155, 155, 0.6));
  font-style: normal;
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: text;
}
.mark-preview [placeholder]:empty:focus::after,
.mark-preview [placeholder].empty-placeholder:focus::after {
  opacity: 0.4;
}
.mark-preview p[placeholder]:empty:not(:focus)::after,
.mark-preview p[placeholder].empty-placeholder:not(:focus)::after {
  content: none;
  display: none;
}
.mark-preview h1[placeholder]:empty::after,
.mark-preview h1[placeholder].empty-placeholder::after {
  font-weight: 600;
}
.mark-preview h2[placeholder]:empty::after,
.mark-preview h2[placeholder].empty-placeholder::after {
  font-weight: 600;
}
.mark-preview h3[placeholder]:empty::after,
.mark-preview h3[placeholder].empty-placeholder::after {
  font-weight: 600;
}
.mark-preview h4[placeholder]:empty::after,
.mark-preview h4[placeholder].empty-placeholder::after,
.mark-preview h5[placeholder]:empty::after,
.mark-preview h5[placeholder].empty-placeholder::after,
.mark-preview h6[placeholder]:empty::after,
.mark-preview h6[placeholder].empty-placeholder::after {
  font-weight: 500;
}
.mark-preview p[placeholder]:empty::after,
.mark-preview p[placeholder].empty-placeholder::after,
.mark-preview blockquote[placeholder]:empty::after,
.mark-preview blockquote[placeholder].empty-placeholder::after {
  font-style: italic;
}
.mark-preview td[placeholder]:empty::after,
.mark-preview td[placeholder].empty-placeholder::after,
.mark-preview th[placeholder]:empty::after,
.mark-preview th[placeholder].empty-placeholder::after {
  font-size: 0.85em;
  opacity: 0.5;
}
.mark-preview pre code[placeholder]:empty::after,
.mark-preview pre code[placeholder].empty-placeholder::after {
  font-family: inherit;
  font-style: italic;
}
@media (prefers-color-scheme: dark) {
  .mark-preview [placeholder]:empty::after,
  .mark-preview [placeholder].empty-placeholder::after {
    color: rgba(180, 180, 180, 0.5);
  }
  .mark-preview [placeholder]:empty:focus::after,
  .mark-preview [placeholder].empty-placeholder:focus::after {
    opacity: 0.3;
  }
}
body.dark-mode .mark-preview [placeholder]:empty::after,
body.dark-mode .mark-preview [placeholder].empty-placeholder::after,
.dark .mark-preview [placeholder]:empty::after,
.dark .mark-preview [placeholder].empty-placeholder::after,
.mark-dark .mark-preview [placeholder]:empty::after,
.mark-dark .mark-preview [placeholder].empty-placeholder::after,
[data-theme=dark] .mark-preview [placeholder]:empty::after,
[data-theme=dark] .mark-preview [placeholder].empty-placeholder::after {
  color: rgba(180, 180, 180, 0.5);
}
body.dark-mode .mark-preview [placeholder]:empty:focus::after,
body.dark-mode .mark-preview [placeholder].empty-placeholder:focus::after,
.dark .mark-preview [placeholder]:empty:focus::after,
.dark .mark-preview [placeholder].empty-placeholder:focus::after,
.mark-dark .mark-preview [placeholder]:empty:focus::after,
.mark-dark .mark-preview [placeholder].empty-placeholder:focus::after,
[data-theme=dark] .mark-preview [placeholder]:empty:focus::after,
[data-theme=dark] .mark-preview [placeholder].empty-placeholder:focus::after {
  opacity: 0.3;
}
.mark-preview [placeholder]:empty,
.mark-preview [placeholder].empty-placeholder {
  min-height: 1em;
  display: block;
}
.mark-preview h1[placeholder]:empty,
.mark-preview h1[placeholder].empty-placeholder {
  min-height: 1.5em;
}
.mark-preview h2[placeholder]:empty,
.mark-preview h2[placeholder].empty-placeholder {
  min-height: 1.4em;
}
.mark-preview h3[placeholder]:empty,
.mark-preview h3[placeholder].empty-placeholder {
  min-height: 1.3em;
}
.mark-preview [placeholder]:empty:hover::after,
.mark-preview [placeholder].empty-placeholder:hover::after {
  cursor: text;
}
.mark-preview ul li:empty,
.mark-preview ol li:empty,
.mark-preview ul li[placeholder]:empty,
.mark-preview ol li[placeholder]:empty {
  min-height: 1.4em;
  display: list-item;
}
.mark-preview li[placeholder]:empty::after,
.mark-preview li[placeholder].empty-placeholder::after {
  content: attr(placeholder);
  color: var(--placeholder-color, rgba(155, 155, 155, 0.6));
  font-style: italic;
  opacity: 0.5;
}
.mark-preview ul.checklist li:empty,
.mark-preview ul.checklist li[placeholder]:empty {
  display: flex;
  align-items: center;
  min-height: 1.4em;
}
.mark-preview ul.checklist li input[type=checkbox] {
  flex-shrink: 0;
  margin-right: 8px;
}
.ai-sidebar {
  --ai-sidebar-width: 380px;
  position: fixed;
  top: 50px;
  right: 0;
  bottom: 0;
  width: var(--ai-sidebar-width);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-primary);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  opacity: 0;
  transition:
    transform 0.25s ease-out,
    opacity 0.25s ease-out,
    visibility 0.25s ease-out;
  z-index: 900;
}
.ai-sidebar.open {
  transform: translateX(0);
  visibility: visible;
  opacity: 1;
}
.ai-sidebar-resizer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  cursor: ew-resize;
  background: transparent;
  z-index: 10;
}
.ai-sidebar-resizer:hover,
.ai-sidebar-resizer.resizing {
  background: var(--accent-primary);
}
@media (pointer: coarse), (max-width: 768px) {
  .ai-sidebar-resizer {
    width: 6px;
    background: #374151;
  }
  .ai-sidebar-resizer::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }
}
body.ai-sidebar-open .container {
  margin-right: var(--ai-sidebar-width, 380px);
}
.ai-sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ai-header-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.ai-header-btn:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}
.ai-settings-wrapper {
  position: relative;
}
.ai-settings-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 12px;
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.2s,
    transform 0.2s,
    visibility 0.2s;
}
.ai-settings-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.ai-settings-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ai-settings-section label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ai-settings-divider {
  height: 1px;
  background: var(--border-secondary);
  margin: 10px 0;
}
.ai-layout-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ai-layout-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  transition: background 0.2s;
}
.ai-layout-option:hover {
  background: var(--bg-tertiary);
}
.ai-layout-option input[type=radio] {
  accent-color: var(--accent-primary);
}
.ai-bubble {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 950;
  transition: transform 0.2s, box-shadow 0.2s;
  font-size: 20px;
}
.ai-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
body.ai-mode-floating .ai-bubble {
  display: flex;
}
body.ai-mode-floating .ai-sidebar {
  top: auto;
  bottom: 88px;
  right: 24px;
  width: 360px;
  max-height: 480px;
  border-radius: 12px;
  border: 1px solid var(--border-primary);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
}
body.ai-mode-floating .ai-sidebar.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
body.ai-mode-floating.ai-sidebar-open .container {
  margin-right: 0;
}
body.ai-mode-floating.ai-sidebar-open .ai-bubble {
  transform: scale(0);
  opacity: 0;
}
.ai-model-select {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.ai-model-select:hover {
  border-color: var(--accent-primary);
}
.ai-model-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ai-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-tertiary);
  text-align: center;
  padding: 20px;
}
.ai-chat-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.ai-chat-empty-text {
  font-size: 14px;
  line-height: 1.5;
}
.ai-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 95%;
}
.ai-message.user {
  align-self: flex-end;
}
.ai-message.assistant {
  align-self: flex-start;
}
.ai-message-role {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ai-message-content {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}
.ai-message.user .ai-message-content {
  background: var(--accent-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-message.assistant .ai-message-content {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.ai-message.assistant .ai-message-content p {
  margin: 0 0 8px 0;
}
.ai-message.assistant .ai-message-content p:last-child {
  margin-bottom: 0;
}
.ai-message.assistant .ai-message-content code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Fira Code", monospace;
  font-size: 12px;
}
.ai-message.assistant .ai-message-content pre {
  background: var(--code-bg);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0;
}
.ai-message.assistant .ai-message-content pre code {
  background: transparent;
  padding: 0;
}
.ai-message-streaming {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}
.ai-message-streaming span {
  width: 6px;
  height: 6px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: ai-typing 1.4s infinite ease-in-out;
}
.ai-message-streaming span:nth-child(1) {
  animation-delay: 0s;
}
.ai-message-streaming span:nth-child(2) {
  animation-delay: 0.2s;
}
.ai-message-streaming span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes ai-typing {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
.ai-chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
}
.ai-chat-options {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.ai-chat-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}
.ai-chat-option input[type=checkbox] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}
.ai-chat-option:hover {
  color: var(--text-primary);
}
.ai-chat-input-container {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.ai-chat-input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.2s;
}
.ai-chat-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}
.ai-chat-input::placeholder {
  color: var(--text-tertiary);
}
.ai-chat-send {
  background: var(--accent-primary);
  border: none;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.ai-chat-send:hover {
  background: var(--accent-hover);
}
.ai-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ai-chat-send svg {
  width: 18px;
  height: 18px;
}
.ai-chat-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-secondary);
}
.ai-chat-action-btn {
  background: transparent;
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}
.ai-chat-action-btn:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}
.ai-chat-action-btn.primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}
.ai-chat-action-btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.ai-chat-action-btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ai-chat-status {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-chat-status.streaming {
  color: var(--accent-primary);
}
.ai-token-indicator {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-primary);
}
.ai-token-indicator:empty {
  display: none;
}
.ai-token-indicator.warning {
  color: #b58900;
  background: rgba(181, 137, 0, 0.15);
}
.ai-token-indicator.danger {
  color: #dc322f;
  background: rgba(220, 50, 47, 0.15);
}
.ai-message.system {
  align-self: center;
  max-width: 90%;
}
.ai-message.system .ai-message-content {
  background: rgba(181, 137, 0, 0.15);
  border: 1px solid rgba(181, 137, 0, 0.3);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
}
.ai-message.system.info .ai-message-content {
  background: rgba(38, 139, 210, 0.15);
  border-color: rgba(38, 139, 210, 0.3);
}
.ai-chat-status.compacting::before {
  content: "\23f3  ";
}
.ai-chat-status.compacting {
  color: var(--accent-primary);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
@media (max-width: 768px) {
  .ai-sidebar {
    width: 100%;
    right: 0;
    left: auto;
    transform: translateX(100%);
    visibility: hidden;
    opacity: 0;
  }
  .ai-sidebar.open {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
  }
  body.ai-sidebar-open .container {
    margin-right: 0;
    display: none;
  }
  body.ai-mode-floating .ai-sidebar {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  body.ai-mode-floating .ai-bubble {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}
.prompt-dropdown {
  position: fixed;
  z-index: 10000;
  background: var(--bg-primary, #ffffff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  min-width: 250px;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 14px;
}
.prompt-dropdown::-webkit-scrollbar {
  width: 8px;
}
.prompt-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.prompt-dropdown::-webkit-scrollbar-thumb {
  background: var(--scrollbar-color, #ccc);
  border-radius: 4px;
}
.prompt-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-hover, #999);
}
.prompt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light, #f0f0f0);
  transition: background-color 0.15s ease;
}
.prompt-item:last-child {
  border-bottom: none;
}
.prompt-item:hover {
  background: var(--hover-bg, #f5f5f5);
}
.prompt-item.selected {
  background: var(--selected-bg, #e3f2fd);
}
.prompt-item-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.prompt-item-content {
  flex: 1;
  min-width: 0;
}
.prompt-item-label {
  font-weight: 500;
  color: var(--text-primary, #333);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prompt-item-desc {
  display: block;
  font-size: 12px;
  color: var(--text-secondary, #666);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prompt-item-value {
  flex-shrink: 0;
  font-family:
    "Monaco",
    "Menlo",
    "Courier New",
    monospace;
  font-size: 11px;
  padding: 2px 6px;
  background: var(--code-bg, #f5f5f5);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 3px;
  color: var(--text-secondary, #666);
}
.prompt-item-label mark {
  background: var(--highlight-bg, #fff59d);
  color: var(--text-primary, #333);
  font-weight: 600;
  padding: 0;
}
@media (prefers-color-scheme: dark) {
  .prompt-dropdown {
    --bg-primary: #2b2b2b;
    --border-color: #404040;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --hover-bg: #3a3a3a;
    --selected-bg: #1e3a5f;
    --border-light: #383838;
    --code-bg: #1e1e1e;
    --scrollbar-color: #555;
    --scrollbar-hover: #777;
    --highlight-bg: #7a6f00;
  }
  .prompt-dropdown {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
}
body.dark-mode .prompt-dropdown,
.dark .prompt-dropdown,
[data-theme=dark] .prompt-dropdown {
  --bg-primary: #2b2b2b;
  --border-color: #404040;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --hover-bg: #3a3a3a;
  --selected-bg: #1e3a5f;
  --border-light: #383838;
  --code-bg: #1e1e1e;
  --scrollbar-color: #555;
  --scrollbar-hover: #777;
  --highlight-bg: #7a6f00;
}
.prompt-dropdown {
  animation: promptFadeIn 0.15s ease;
}
@keyframes promptFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 600px) {
  .prompt-dropdown {
    max-width: calc(100vw - 20px);
    min-width: 200px;
  }
  .prompt-item {
    padding: 8px 10px;
  }
  .prompt-item-icon {
    width: 20px;
    height: 20px;
    font-size: 14px;
  }
  .prompt-item-desc {
    display: none;
  }
}
.prompt-dropdown:focus-within {
  outline: 2px solid var(--focus-color, #2196f3);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .prompt-dropdown {
    animation: none;
  }
  .prompt-item {
    transition: none;
  }
}
@media (prefers-contrast: high) {
  .prompt-dropdown {
    border-width: 2px;
  }
  .prompt-item.selected {
    outline: 2px solid currentColor;
    outline-offset: -2px;
  }
}
.prompt-item.executing {
  background: var(--executing-bg, #c8e6c9) !important;
  transform: scale(0.98);
}
body.dark-mode .prompt-item.executing,
.dark .prompt-item.executing {
  --executing-bg: #1b5e20;
}
.prompt-feedback {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 10001;
  background: var(--feedback-bg, #333);
  color: var(--feedback-text, #fff);
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    visibility 0.3s;
  pointer-events: none;
}
.prompt-feedback.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.prompt-feedback.hiding {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
}
.prompt-feedback-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prompt-feedback-label {
  white-space: nowrap;
}
body.dark-mode .prompt-feedback,
.dark .prompt-feedback {
  --feedback-bg: #424242;
  --feedback-text: #fff;
}
.prompt-feedback[data-type=success] {
  --feedback-bg: #4caf50;
}
.prompt-feedback[data-type=info] {
  --feedback-bg: #2196f3;
}
@media (prefers-reduced-motion: reduce) {
  .prompt-feedback {
    transition: opacity 0.15s ease;
    transform: translateX(-50%) translateY(0) !important;
  }
  .prompt-item.executing {
    transform: none;
  }
}
.floating-toolbar {
  position: fixed;
  z-index: 9999;
  background: var(--mark-toolbar-bg);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--mark-toolbar-shadow);
  padding: 4px;
  display: none;
  gap: 2px;
  flex-direction: row;
  align-items: center;
  animation: toolbarFadeIn 0.2s ease;
}
.floating-toolbar.visible {
  display: flex;
}
.toolbar-btn {
  background: transparent;
  border: none;
  color: var(--mark-toolbar-text-muted);
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}
.toolbar-btn:hover {
  background: var(--mark-toolbar-hover);
  color: var(--mark-toolbar-text);
}
.toolbar-btn:active {
  background: var(--mark-toolbar-hover);
}
.toolbar-btn.active {
  background: var(--mark-accent);
  color: #fff;
}
.toolbar-btn.active:hover {
  background: var(--mark-accent-hover);
}
.toolbar-btn.disabled,
.toolbar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.toolbar-btn.disabled:hover,
.toolbar-btn:disabled:hover {
  background: transparent;
}
.toolbar-btn strong,
.toolbar-btn em,
.toolbar-btn del,
.toolbar-btn mark {
  font-style: normal;
  text-decoration: none;
  background: none;
  color: inherit;
}
.toolbar-btn mark {
  padding: 2px 4px;
  background: var(--highlight-toolbar, #fff59d);
  color: var(--toolbar-bg, #1a1a1a);
  border-radius: 2px;
}
.toolbar-separator {
  width: 1px;
  height: 24px;
  background: var(--mark-toolbar-border);
  margin: 0 4px;
}
@keyframes toolbarFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 600px) {
  .toolbar-btn {
    padding: 6px 10px;
    min-width: 28px;
    height: 28px;
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .floating-toolbar {
    animation: none;
  }
}
.toolbar-btn:focus-visible {
  outline: 2px solid var(--focus-color, #2196f3);
  outline-offset: 2px;
}
.toolbar-link-input {
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 4px;
  margin-left: 4px;
  border-left: 1px solid var(--mark-toolbar-border);
}
.toolbar-link-input.visible {
  display: flex;
}
.toolbar-link-input input {
  background: var(--mark-toolbar-hover);
  border: 1px solid var(--mark-toolbar-border);
  border-radius: 4px;
  color: var(--mark-toolbar-text);
  padding: 4px 8px;
  font-size: 12px;
  width: 180px;
  outline: none;
}
.toolbar-link-input input:focus {
  border-color: var(--mark-accent);
}
.toolbar-link-input input::placeholder {
  color: var(--mark-toolbar-text-muted);
}
.toolbar-link-input button {
  background: transparent;
  border: none;
  color: var(--mark-toolbar-text-muted);
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: background-color 0.15s ease;
}
.toolbar-link-input button:hover {
  background: var(--mark-toolbar-hover);
  color: var(--mark-toolbar-text);
}
.toolbar-link-input .link-confirm {
  color: #4caf50;
}
.toolbar-link-input .link-cancel {
  color: #f44336;
}
.mark-preview.upload-drag-over {
  outline: 2px dashed var(--mark-accent, #3b82f6);
  outline-offset: -4px;
  background: var(--mark-bg-tertiary, rgba(59, 130, 246, 0.05));
}
.mark-preview.upload-drag-over::before {
  content: "Drop files to upload";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 24px;
  background: var(--mark-bg-secondary, #f1f5f9);
  border: 1px solid var(--mark-border, #e2e8f0);
  border-radius: 8px;
  font-size: 14px;
  color: var(--mark-text-secondary, #64748b);
  pointer-events: none;
  z-index: 100;
}
.upload-progress {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--mark-bg-secondary, #ffffff);
  border: 1px solid var(--mark-border, #e2e8f0);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 280px;
  max-width: 360px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.upload-progress.visible {
  opacity: 1;
  transform: translateY(0);
}
.upload-progress.fade-out {
  opacity: 0;
  transform: translateY(10px);
}
.upload-progress-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upload-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.upload-filename {
  font-size: 13px;
  color: var(--mark-text, #1e293b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.upload-progress-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--mark-text-secondary, #64748b);
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.upload-progress-close:hover {
  opacity: 1;
}
.upload-progress-bar {
  height: 4px;
  background: var(--mark-border, #e2e8f0);
  border-radius: 2px;
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%;
  background: var(--mark-accent, #3b82f6);
  border-radius: 2px;
  transition: width 0.15s ease;
}
.upload-percent {
  font-size: 12px;
  color: var(--mark-text-secondary, #64748b);
}
.upload-progress.complete .upload-progress-fill {
  background: #22c55e;
}
.upload-progress.complete .upload-percent {
  color: #22c55e;
}
.upload-progress.error .upload-progress-fill {
  background: #ef4444;
}
.upload-progress.error .upload-percent {
  color: #ef4444;
}
.upload-drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}
.upload-drop-overlay-content {
  background: var(--mark-bg, #ffffff);
  border: 2px dashed var(--mark-accent, #3b82f6);
  border-radius: 16px;
  padding: 48px 64px;
  text-align: center;
}
.upload-drop-icon {
  color: var(--mark-accent, #3b82f6);
  margin-bottom: 16px;
}
.upload-drop-overlay-content p {
  font-size: 18px;
  color: var(--mark-text, #1e293b);
  margin: 0;
}
.dark .upload-progress,
[data-theme=dark] .upload-progress {
  background: var(--mark-bg-secondary, #1e293b);
  border-color: var(--mark-border, #334155);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.dark .upload-progress-bar,
[data-theme=dark] .upload-progress-bar {
  background: var(--mark-border, #334155);
}
.dark .upload-drop-overlay,
[data-theme=dark] .upload-drop-overlay {
  background: rgba(0, 0, 0, 0.7);
}
.dark .upload-drop-overlay-content,
[data-theme=dark] .upload-drop-overlay-content {
  background: var(--mark-bg, #0f172a);
}
.upload-progress:nth-of-type(2) {
  bottom: 100px;
}
.upload-progress:nth-of-type(3) {
  bottom: 180px;
}
.upload-progress:nth-of-type(n+4) {
  bottom: 260px;
}
.attachment-selected {
  outline: 2px solid var(--mark-accent, #0066cc);
  outline-offset: 2px;
  border-radius: 4px;
}
.attachment-toolbar {
  position: fixed;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--mark-toolbar-bg);
  border: 1px solid var(--mark-toolbar-border);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--mark-toolbar-shadow);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-4px);
  animation: attachment-toolbar-appear 0.15s ease forwards;
}
@keyframes attachment-toolbar-appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.attachment-toolbar-group {
  display: flex;
  gap: 2px;
}
.attachment-toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--mark-toolbar-border);
  margin: 0 4px;
}
.attachment-toolbar button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: var(--mark-toolbar-text-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.attachment-toolbar button:hover {
  background: var(--mark-toolbar-hover);
  color: var(--mark-toolbar-text);
}
.attachment-toolbar button.active {
  background: var(--mark-accent);
  color: white;
}
.attachment-toolbar button svg {
  width: 16px;
  height: 16px;
}
.attachment-toolbar button.attachment-toolbar-delete {
  color: #ff4444;
}
.attachment-toolbar button.attachment-toolbar-delete:hover {
  background: rgba(255, 68, 68, 0.15);
  color: #ff3333;
}
figure.align-left,
figure.align-center,
figure.align-right,
figure.attachment-stretched {
  display: block;
  margin: 1em 0;
}
figure.align-left,
.attachment.align-left {
  margin-right: auto;
  margin-left: 0;
  text-align: left;
}
figure.align-center,
.attachment.align-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
figure.align-right,
.attachment.align-right {
  margin-left: auto;
  margin-right: 0;
  text-align: right;
}
figure.attachment-stretched,
.attachment.attachment-stretched {
  width: 100%;
}
figure.attachment-stretched img,
figure.attachment-stretched video,
.attachment.attachment-stretched img,
.attachment.attachment-stretched video {
  width: 100%;
  height: auto;
}
figure figcaption,
.attachment figcaption {
  text-align: center;
  font-size: 0.9em;
  color: var(--mark-text-secondary, #888);
  margin-top: 8px;
  padding: 0 16px;
  line-height: 1.4;
}
figure figcaption[contenteditable=true]:focus,
.attachment figcaption[contenteditable=true]:focus {
  outline: 1px dashed var(--mark-accent, #0066cc);
  outline-offset: 2px;
  border-radius: 2px;
}
figure figcaption:empty::before {
  content: "Add a caption...";
  color: var(--mark-text-secondary, #666);
  font-style: italic;
}
.attachment-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.attachment-lightbox.open {
  opacity: 1;
}
.attachment-lightbox.closing {
  opacity: 0;
}
.attachment-lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.attachment-lightbox-content img,
.attachment-lightbox-content video {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.attachment-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 24px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.attachment-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}
.attachment-lightbox::after {
  content: "Press ESC to close";
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  pointer-events: none;
}
@media (max-width: 768px) {
  .attachment-toolbar {
    padding: 6px 10px;
    gap: 6px;
  }
  .attachment-toolbar button {
    width: 36px;
    height: 36px;
  }
  .attachment-toolbar button svg {
    width: 18px;
    height: 18px;
  }
  .attachment-lightbox-close {
    width: 48px;
    height: 48px;
    font-size: 28px;
  }
}
/*# sourceMappingURL=/assets/mark-239dc63a.css.map */
