.ofv-root {
  --ofv-bg: #eef1f6;
  --ofv-surface: #ffffff;
  --ofv-surface-muted: #f1f4f9;
  --ofv-text: #1c2333;
  --ofv-text-muted: #5b6478;
  --ofv-border: #e3e7ef;
  --ofv-button-hover: rgba(28, 35, 51, 0.07);
  --ofv-highlight: #fde68a;
  --ofv-accent: #4f6bf6;
  --ofv-accent-soft: rgba(79, 107, 246, 0.18);
  --ofv-toolbar-bg: var(--ofv-surface);
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--ofv-bg);
  color: var(--ofv-text);
  border: 1px solid var(--ofv-border);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ofv-theme-dark {
  --ofv-bg: #0b101f;
  --ofv-surface: #121a30;
  --ofv-surface-muted: #1a2440;
  --ofv-text: #e9edf8;
  --ofv-text-muted: #97a1bf;
  --ofv-border: rgba(148, 163, 200, 0.18);
  --ofv-button-hover: rgba(148, 163, 200, 0.14);
  --ofv-highlight: rgba(245, 158, 11, 0.4);
  --ofv-accent: #8b9cff;
  --ofv-accent-soft: rgba(139, 156, 255, 0.22);
  --ofv-toolbar-bg: var(--ofv-surface);
}

.ofv-root *,
.ofv-root *::before,
.ofv-root *::after {
  box-sizing: border-box;
}

.ofv-root [hidden],
.ofv-root .ofv-pdf-summary[aria-hidden="true"],
.ofv-root .ofv-sheet-summary[aria-hidden="true"],
.ofv-root .ofv-presentation-summary[aria-hidden="true"],
.ofv-root .ofv-xmind-summary[aria-hidden="true"],
.ofv-root .ofv-media-info[aria-hidden="true"],
.ofv-root .ofv-image-info[aria-hidden="true"],
.ofv-root .ofv-drawing-summary[aria-hidden="true"],
.ofv-root .ofv-cad-summary[aria-hidden="true"],
.ofv-root .ofv-asset-summary[aria-hidden="true"],
.ofv-root .ofv-asset-download[aria-hidden="true"],
.ofv-root .ofv-gis-summary[aria-hidden="true"],
.ofv-root .ofv-archive-summary[aria-hidden="true"],
.ofv-root .ofv-archive-info[aria-hidden="true"],
.ofv-root .ofv-archive-probe-meta[aria-hidden="true"],
.ofv-root .ofv-epub-meta[aria-hidden="true"],
.ofv-root .ofv-xps-summary[aria-hidden="true"],
.ofv-root .ofv-sqlite-summary[aria-hidden="true"],
.ofv-root .ofv-wasm-summary[aria-hidden="true"],
.ofv-root .ofv-data-summary[aria-hidden="true"],
.ofv-root .ofv-data-note[aria-hidden="true"],
.ofv-root .ofv-font-status[aria-hidden="true"],
.ofv-root .ofv-font-info[aria-hidden="true"],
.ofv-root .ofv-model-measure[aria-hidden="true"],
.ofv-root .ofv-model-materials[aria-hidden="true"],
.ofv-root .ofv-details[aria-hidden="true"],
.ofv-root .ofv-table-scroll[aria-hidden="true"] {
  display: none !important;
}

.ofv-host {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 160px;
  overflow: hidden;
}

.ofv-viewport {
  container-type: inline-size;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--ofv-bg);
  color: var(--ofv-text);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ofv-text-muted) 42%, transparent) transparent;
}

.ofv-viewport::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.ofv-viewport::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ofv-text-muted) 42%, transparent);
  background-clip: content-box;
}

.ofv-viewport::-webkit-scrollbar-track {
  background: transparent;
}

/* Inner preview scrollers get persistent, styled scrollbars. On Chromium and
   WebKit, ::-webkit-scrollbar styling switches to classic (space-reserving,
   always visible) bars, so zoomed-in content visibly signals that it can be
   scrolled — macOS overlay scrollbars are otherwise invisible until a scroll
   starts. The standard properties would override the pseudo styling back to
   overlay bars on Chromium — including the scrollbar-color inherited from
   .ofv-viewport — so they are reset here and re-applied for Firefox only. */
.ofv-panel,
.ofv-pdf,
.ofv-table-scroll,
.ofv-docx-document,
.ofv-pptx-viewer,
.ofv-epub-reader,
.ofv-markdown-body,
.ofv-code-body,
.ofv-xps-pages,
.ofv-text-block,
.ofv-office-package-list {
  scrollbar-width: auto;
  scrollbar-color: auto;
}

@supports not selector(::-webkit-scrollbar) {
  .ofv-panel,
  .ofv-pdf,
  .ofv-table-scroll,
  .ofv-docx-document,
  .ofv-pptx-viewer,
  .ofv-epub-reader,
  .ofv-markdown-body,
  .ofv-code-body,
  .ofv-xps-pages,
  .ofv-text-block,
  .ofv-office-package-list {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--ofv-text-muted) 42%, transparent) transparent;
  }

  .ofv-pdf.ofv-pdf-pages {
    scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
  }
}

.ofv-panel::-webkit-scrollbar,
.ofv-pdf::-webkit-scrollbar,
.ofv-table-scroll::-webkit-scrollbar,
.ofv-docx-document::-webkit-scrollbar,
.ofv-pptx-viewer::-webkit-scrollbar,
.ofv-epub-reader::-webkit-scrollbar,
.ofv-markdown-body::-webkit-scrollbar,
.ofv-code-body::-webkit-scrollbar,
.ofv-xps-pages::-webkit-scrollbar,
.ofv-text-block::-webkit-scrollbar,
.ofv-office-package-list::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.ofv-panel::-webkit-scrollbar-thumb,
.ofv-pdf::-webkit-scrollbar-thumb,
.ofv-table-scroll::-webkit-scrollbar-thumb,
.ofv-docx-document::-webkit-scrollbar-thumb,
.ofv-pptx-viewer::-webkit-scrollbar-thumb,
.ofv-epub-reader::-webkit-scrollbar-thumb,
.ofv-markdown-body::-webkit-scrollbar-thumb,
.ofv-code-body::-webkit-scrollbar-thumb,
.ofv-xps-pages::-webkit-scrollbar-thumb,
.ofv-text-block::-webkit-scrollbar-thumb,
.ofv-office-package-list::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ofv-text-muted) 42%, transparent);
  background-clip: content-box;
}

.ofv-panel::-webkit-scrollbar-track,
.ofv-pdf::-webkit-scrollbar-track,
.ofv-table-scroll::-webkit-scrollbar-track,
.ofv-docx-document::-webkit-scrollbar-track,
.ofv-pptx-viewer::-webkit-scrollbar-track,
.ofv-epub-reader::-webkit-scrollbar-track,
.ofv-markdown-body::-webkit-scrollbar-track,
.ofv-code-body::-webkit-scrollbar-track,
.ofv-xps-pages::-webkit-scrollbar-track,
.ofv-text-block::-webkit-scrollbar-track,
.ofv-office-package-list::-webkit-scrollbar-track {
  background: transparent;
}

/* The PDF scroller sits on a dark page backdrop — use a lighter thumb there. */
.ofv-pdf::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.45);
  background-clip: content-box;
}

.ofv-toolbar {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 46px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--ofv-border);
  background: var(--ofv-toolbar-bg);
  color: var(--ofv-text);
}

.ofv-toolbar button,
.ofv-toolbar input {
  max-width: 100%;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 10px;
  background: transparent;
  color: var(--ofv-text);
  font: inherit;
  font-size: 13px;
}

.ofv-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ofv-text-muted);
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease;
}

.ofv-toolbar-icon-button {
  flex: 0 0 auto;
  width: 32px;
  padding: 0;
}

.ofv-toolbar-icon-button .ofv-toolbar-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ofv-toolbar-zoom-reset {
  flex: 0 0 auto;
  min-width: 52px;
  padding: 0 8px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.ofv-toolbar-sep {
  flex: 0 0 auto;
  align-self: center;
  width: 1px;
  height: 18px;
  margin: 0 5px;
  background: var(--ofv-border);
}

.ofv-toolbar-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.ofv-toolbar-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.ofv-toolbar-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ofv-react-toolbar,
.ofv-vue-toolbar,
.ofv-vue-toolbar-content {
  display: contents;
}

.ofv-toolbar button:hover:not(:disabled) {
  background: var(--ofv-button-hover);
  color: var(--ofv-text);
}

.ofv-toolbar button:active:not(:disabled) {
  transform: scale(0.94);
}

.ofv-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.ofv-toolbar button:focus-visible,
.ofv-image-controls button:focus-visible,
.ofv-tabs button:focus-visible,
.ofv-code-action:focus-visible {
  outline: 2px solid var(--ofv-accent, #2563eb);
  outline-offset: 2px;
}

.ofv-toolbar-queue {
  flex: 0 0 auto;
  min-width: 42px;
  color: var(--ofv-text-muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.ofv-toolbar-search {
  position: relative;
  display: flex;
  flex: 1 1 180px;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-width: 0;
}

.ofv-toolbar-search-icon {
  position: absolute;
  top: 50%;
  left: 10px;
  display: inline-flex;
  transform: translateY(-50%);
  color: var(--ofv-text-muted);
  pointer-events: none;
}

.ofv-toolbar-search-icon svg {
  display: block;
  width: 14px;
  height: 14px;
}

.ofv-toolbar-search input {
  flex: 1 1 120px;
  width: min(200px, 100%);
  min-width: 0;
  padding: 0 12px 0 30px;
  border-radius: 999px;
  background: var(--ofv-surface-muted);
  color: var(--ofv-text);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.ofv-toolbar-search input::placeholder {
  color: var(--ofv-text-muted);
}

.ofv-toolbar-search input:focus {
  border-color: var(--ofv-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--ofv-accent-soft);
}

.ofv-toolbar-search-count {
  flex: 0 0 auto;
  min-width: 24px;
  color: var(--ofv-text-muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.ofv-search-match {
  border-radius: 2px;
  background: var(--ofv-highlight);
  color: inherit;
}

.ofv-print-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border: 0;
  visibility: hidden;
}

.ofv-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ofv-status {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}

.ofv-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: min(420px, 100%);
  padding: 10px 18px;
  border: 1px solid var(--ofv-border);
  border-radius: 14px;
  background: var(--ofv-surface);
  box-shadow: 0 12px 32px -14px rgba(2, 6, 23, 0.45);
  color: var(--ofv-text-muted);
  font-size: 13px;
  line-height: 1.5;
  pointer-events: auto;
}

.ofv-status-spinner {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 2px solid var(--ofv-accent-soft);
  border-top-color: var(--ofv-accent);
  border-radius: 50%;
  animation: ofv-status-spin 0.8s linear infinite;
}

@keyframes ofv-status-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ofv-status-spinner {
    animation-duration: 1.6s;
  }
}

.ofv-status-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ofv-status-error .ofv-status-spinner {
  display: none;
}

.ofv-status-error .ofv-status-chip {
  border-color: rgba(220, 38, 38, 0.35);
  color: #dc2626;
}

.ofv-theme-dark .ofv-status-error .ofv-status-chip {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

.ofv-media {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.ofv-image-viewer {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: var(--ofv-bg);
}

.ofv-image-controls {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--ofv-border);
  background: var(--ofv-surface);
  color: var(--ofv-text);
}

.ofv-image-controls button {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--ofv-surface-muted);
  color: var(--ofv-text);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ofv-image-controls button:hover {
  background: var(--ofv-button-hover);
}

.ofv-image-zoom {
  flex: 0 0 auto;
  min-width: 48px;
  color: var(--ofv-text-muted);
  font-size: 13px;
  text-align: center;
}

.ofv-image-stage {
  display: flex;
  flex: 1 1 auto;
  min-height: min(320px, 55vh);
  min-width: 0;
  overflow: auto;
  cursor: grab;
  touch-action: none;
}

.ofv-image-stage .ofv-fallback {
  margin: auto;
}

.ofv-image-stage-pages {
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 24px;
}

.ofv-image-stage.is-dragging {
  cursor: grabbing;
}

.ofv-image-scrollbox {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  /* Auto margins center the box while it fits and collapse to zero once it
     overflows the stage, keeping the whole footprint scroll-reachable. */
  margin: auto;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
}

.ofv-image-stage-pages .ofv-image-scrollbox {
  margin: 0 auto;
}

.ofv-image-content {
  flex-shrink: 0;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  transform-origin: center;
  transition: transform 120ms ease;
  will-change: transform;
  user-select: none;
}

.ofv-image-stage.is-dragging .ofv-image-content {
  transition: none;
}

.ofv-tiff-pages {
  display: grid;
  gap: 18px;
  width: max-content;
  max-width: 100%;
  height: auto;
  transform-origin: top center;
}

.ofv-tiff-page {
  display: grid;
  gap: 8px;
  margin: 0;
  justify-items: center;
}

.ofv-tiff-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--ofv-border);
  border-radius: 4px;
  background: var(--ofv-surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.ofv-tiff-page figcaption {
  max-width: 100%;
  color: var(--ofv-text-muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

.ofv-image-info {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px 14px;
  max-width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border-top: 1px solid var(--ofv-border);
  background: var(--ofv-surface);
  color: var(--ofv-text-muted);
  font-size: 12px;
}

.ofv-image-info-item {
  display: inline-flex;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ofv-image-info-item strong {
  color: var(--ofv-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ofv-text {
  min-height: 100%;
  margin: 0;
  padding: 16px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--ofv-surface);
  color: var(--ofv-text);
}

.ofv-pdf-viewer {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: #6b7280;
}

.ofv-pdf-summary {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--ofv-surface);
  color: var(--ofv-text-muted);
  font-size: 12px;
}

.ofv-pdf-summary > span {
  display: inline-flex;
  gap: 5px;
  min-width: 0;
}

.ofv-pdf-summary strong {
  color: var(--ofv-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ofv-pdf-page-navigator {
  display: flex;
  z-index: 3;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--ofv-border);
  background: var(--ofv-surface);
  color: var(--ofv-text);
  font-size: 13px;
}

.ofv-pdf-page-navigator button,
.ofv-pdf-page-navigator input {
  box-sizing: border-box;
  height: 28px;
  border: 1px solid var(--ofv-border);
  border-radius: 5px;
  background: var(--ofv-surface);
  color: var(--ofv-text);
  font: inherit;
}

.ofv-pdf-page-navigator button {
  min-width: 30px;
  padding: 0 8px;
  cursor: pointer;
}

.ofv-pdf-page-navigator button:disabled {
  cursor: default;
  opacity: 0.45;
}

.ofv-pdf-page-navigator input {
  width: 58px;
  padding: 0 6px;
  text-align: center;
}

.ofv-pdf {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  overflow-x: auto;
  /* Always reserve the vertical scrollbar so the layout width stays stable
     while pages are being rebuilt (documents virtually always overflow). */
  overflow-y: scroll;
  background: #6b7280;
}

.ofv-pdf-page {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0;
  background: #fff;
}

.ofv-audio {
  width: min(520px, calc(100% - 32px));
  padding: 20px;
  border-radius: 8px;
  background: var(--ofv-surface);
  color: var(--ofv-text);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.16);
}

.ofv-audio-title {
  margin-bottom: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.ofv-audio audio {
  width: 100%;
}

.ofv-media-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ofv-border);
  color: var(--ofv-text-muted);
  font-size: 12px;
}

.ofv-media-info-item {
  display: inline-flex;
  gap: 5px;
  min-width: 0;
}

.ofv-media-info-item strong {
  color: var(--ofv-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ofv-video-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: #000;
}

.ofv-video-stage {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  position: relative;
}

.ofv-video-container .ofv-media-info {
  margin-top: 0;
  border-top-color: rgba(255, 255, 255, 0.16);
  background: var(--ofv-surface);
}

.ofv-fallback {
  width: min(420px, calc(100% - 32px));
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 20px;
  border-radius: 8px;
  background: var(--ofv-surface);
  color: var(--ofv-text);
  text-align: center;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.16);
}

.ofv-fallback span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ofv-text-muted);
}

.ofv-fallback-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
  color: var(--ofv-text);
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.ofv-fallback-meta dt {
  margin: 0;
  color: var(--ofv-text-muted);
  font-weight: 500;
}

.ofv-fallback-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.ofv-fallback a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.ofv-pdf-web-fallback {
  display: flex;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 480px;
  min-width: 0;
}

.ofv-pdf-web-fallback-frame {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  min-height: inherit;
  border: 0;
  background: #fff;
}

.ofv-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: 16px;
  overflow: auto;
  background: var(--ofv-surface-muted);
  color: var(--ofv-text);
}

.ofv-section {
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--ofv-border);
  border-radius: 8px;
  background: var(--ofv-surface);
}

.ofv-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.ofv-section p {
  margin: 0 0 10px;
  line-height: 1.6;
}

.ofv-meta-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--ofv-border);
  font-size: 13px;
}

.ofv-meta-row span {
  color: var(--ofv-text-muted);
}

.ofv-meta-row strong {
  overflow-wrap: anywhere;
}

.ofv-office {
  --ofv-office-zoom: 1;
  min-width: 0;
  max-width: 100%;
}

/* DOCX 纵向滚动统一由 viewport 承担，避免 panel 和文档层重复显示 scrollbar。 */
.ofv-office-docx {
  overflow: visible;
}

.ofv-document {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.7;
  zoom: var(--ofv-office-zoom, 1);
}

.ofv-document img {
  max-width: 100%;
  height: auto;
}

.ofv-word-html-document {
  box-sizing: border-box;
  width: min(100%, 794px);
  min-height: 1123px;
  margin: 0 auto;
  padding: clamp(32px, 9vw, 96px) clamp(24px, 11vw, 120px);
  overflow-wrap: normal;
  background: #fff;
  color: #000;
}

.ofv-word-html-document p {
  margin: 0;
}

.ofv-document-extra {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.ofv-office-conversion {
  border-style: dashed;
}

.ofv-office-conversion > p:first-of-type {
  margin-top: 0;
  color: var(--ofv-text);
  line-height: 1.7;
}

.ofv-office-conversion > p:first-of-type strong {
  color: #f59e0b;
}

.ofv-office-binary-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 12px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: var(--ofv-surface-muted);
  font-size: 13px;
}

.ofv-office-binary-meta dt {
  color: var(--ofv-text-muted);
  font-weight: 600;
}

.ofv-office-binary-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.ofv-office-binary-fragments {
  margin-top: 14px;
}

.ofv-office-binary-fragments h4 {
  margin: 0 0 10px;
  color: var(--ofv-text);
  font-size: 14px;
}

.ofv-office-binary-empty {
  margin: 14px 0 0;
  padding: 12px;
  border: 1px dashed var(--ofv-border);
  border-radius: 6px;
  background: var(--ofv-surface-muted);
  color: var(--ofv-text-muted);
  line-height: 1.6;
}

.ofv-msdoc-document {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  padding: 24px;
  gap: 24px;
  overflow: auto;
  background: var(--ofv-surface-muted);
}

.ofv-msdoc-page {
  position: relative;
  width: calc(794px * var(--ofv-office-zoom, 1));
  min-height: calc(1123px * var(--ofv-office-zoom, 1));
  height: calc(1123px * var(--ofv-office-zoom, 1));
  box-sizing: border-box;
  overflow: hidden;
  padding: calc(86px * var(--ofv-office-zoom, 1)) calc(76px * var(--ofv-office-zoom, 1));
  border: 1px solid var(--ofv-border);
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.14);
  color: #111827;
  font-family: Arial, Helvetica, sans-serif;
  font-size: calc(10pt * var(--ofv-office-zoom, 1));
  line-height: 1.32;
}

.ofv-msdoc-page-footer {
  position: absolute;
  right: calc(64px * var(--ofv-office-zoom, 1));
  bottom: calc(34px * var(--ofv-office-zoom, 1));
  left: calc(132px * var(--ofv-office-zoom, 1));
  padding-top: calc(5px * var(--ofv-office-zoom, 1));
  border-top: 1px solid #9ca3af;
  color: #111827;
  font-family: Arial, Helvetica, sans-serif;
  font-size: calc(8px * var(--ofv-office-zoom, 1));
  line-height: 1.35;
}

.ofv-msdoc-footer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: calc(18px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-footer-row span:last-child {
  text-align: right;
}

.ofv-msdoc-line-numbered {
  padding: calc(44px * var(--ofv-office-zoom, 1)) calc(114px * var(--ofv-office-zoom, 1)) calc(86px * var(--ofv-office-zoom, 1)) calc(132px * var(--ofv-office-zoom, 1));
  font-size: calc(9pt * var(--ofv-office-zoom, 1));
  line-height: 1.25;
}

.ofv-msdoc-page-header {
  position: relative;
  margin: 0 0 calc(8px * var(--ofv-office-zoom, 1));
  padding: 0 0 calc(8px * var(--ofv-office-zoom, 1));
  border-bottom: 1px solid #6b7280;
}

.ofv-msdoc-oasis-header::before {
  position: absolute;
  top: calc(20px * var(--ofv-office-zoom, 1));
  right: calc(100% + 28px * var(--ofv-office-zoom, 1));
  width: calc(30px * var(--ofv-office-zoom, 1));
  color: #111827;
  content: "1";
  font-family: "Times New Roman", Times, serif;
  font-size: calc(12px * var(--ofv-office-zoom, 1));
  font-weight: 400;
  text-align: right;
}

.ofv-msdoc-oasis-logo {
  display: flex;
  align-items: center;
  gap: calc(8px * var(--ofv-office-zoom, 1));
  min-height: calc(54px * var(--ofv-office-zoom, 1));
  color: #4b148c;
  font-family: Arial, Helvetica, sans-serif;
  font-size: calc(52px * var(--ofv-office-zoom, 1));
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.ofv-msdoc-oasis-logo-image {
  min-height: calc(54px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-oasis-logo-image img {
  width: calc(190px * var(--ofv-office-zoom, 1));
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.ofv-msdoc-oasis-mark {
  display: inline-grid;
  place-items: center;
  width: calc(40px * var(--ofv-office-zoom, 1));
  height: calc(40px * var(--ofv-office-zoom, 1));
  border-radius: calc(7px * var(--ofv-office-zoom, 1));
  background: #f4b000;
  color: #4b148c;
  font-size: calc(34px * var(--ofv-office-zoom, 1));
  font-weight: 800;
}

.ofv-msdoc-oasis-mark::before {
  content: "S";
}

.ofv-msdoc-page p {
  position: relative;
  margin: 0 0 calc(6px * var(--ofv-office-zoom, 1));
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ofv-msdoc-line-numbered > :not(.ofv-msdoc-meta, .ofv-msdoc-page-header)::before {
  position: absolute;
  right: calc(100% + 28px * var(--ofv-office-zoom, 1));
  top: 0;
  width: calc(30px * var(--ofv-office-zoom, 1));
  color: #111827;
  content: attr(data-line);
  font-family: "Times New Roman", Times, serif;
  font-size: calc(12px * var(--ofv-office-zoom, 1));
  font-weight: 400;
  line-height: inherit;
  text-align: right;
}

.ofv-msdoc-title {
  margin: 0 0 calc(6px * var(--ofv-office-zoom, 1));
  color: #333399;
  font-size: calc(24px * var(--ofv-office-zoom, 1));
  font-weight: 700;
  line-height: 1.18;
}

.ofv-msdoc-line-numbered .ofv-msdoc-title {
  font-size: calc(20px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-form-document .ofv-msdoc-title {
  color: #111827;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, Helvetica, sans-serif;
  font-size: calc(18pt * var(--ofv-office-zoom, 1));
  text-align: center;
}

.ofv-msdoc-subtitle {
  margin: 0 0 calc(18px * var(--ofv-office-zoom, 1));
  color: #333399;
  font-size: calc(18px * var(--ofv-office-zoom, 1));
  font-weight: 700;
  line-height: 1.2;
}

.ofv-msdoc-line-numbered .ofv-msdoc-subtitle {
  margin-bottom: calc(14px * var(--ofv-office-zoom, 1));
  font-size: calc(16px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-heading {
  margin: calc(18px * var(--ofv-office-zoom, 1)) 0 calc(6px * var(--ofv-office-zoom, 1));
  color: #000099;
  font-size: calc(18px * var(--ofv-office-zoom, 1));
  font-weight: 700;
}

.ofv-msdoc-heading-level-1 {
  padding-top: calc(5px * var(--ofv-office-zoom, 1));
  border-top: 1px solid #9ca3af;
  font-size: calc(18px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-heading-level-2 {
  margin: calc(12px * var(--ofv-office-zoom, 1)) 0 calc(4px * var(--ofv-office-zoom, 1));
  border-top: 0;
  font-size: calc(14px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-heading-level-3 {
  margin: calc(8px * var(--ofv-office-zoom, 1)) 0 calc(4px * var(--ofv-office-zoom, 1));
  border-top: 0;
  font-size: calc(12px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-label {
  margin-top: calc(6px * var(--ofv-office-zoom, 1));
  color: #333399;
  font-weight: 700;
}

.ofv-msdoc-label + .ofv-msdoc-paragraph {
  margin-left: calc(36px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-indent {
  margin-left: calc(36px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-instruction {
  color: #111827;
  font-style: italic;
}

.ofv-msdoc-listItem {
  margin-left: calc(18px * var(--ofv-office-zoom, 1));
  padding-left: calc(14px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-listItem::after {
  position: absolute;
  top: 0;
  left: 0;
  color: #111827;
  content: "•";
  font-family: Arial, Helvetica, sans-serif;
  font-size: inherit;
  line-height: inherit;
}

.ofv-msdoc-list-level-2 {
  margin-left: calc(36px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-reference {
  margin-left: calc(108px * var(--ofv-office-zoom, 1));
  text-indent: calc(-90px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-page em {
  font-style: italic;
}

.ofv-msdoc-ref-term {
  font-weight: 700;
}

.ofv-msdoc-inline-code {
  font-family: "Courier New", Courier, monospace;
  font-size: calc(10px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-keyword,
.ofv-msdoc-variable {
  font-style: italic;
}

.ofv-msdoc-link-text {
  color: #0000ee;
  text-decoration: underline;
}

.ofv-msdoc-toc {
  display: grid;
  grid-template-columns: auto minmax(calc(20px * var(--ofv-office-zoom, 1)), 1fr) max-content;
  column-gap: calc(3px * var(--ofv-office-zoom, 1));
  align-items: baseline;
  margin: calc(1px * var(--ofv-office-zoom, 1)) 0;
  color: #0000ee;
}

.ofv-msdoc-line-numbered .ofv-msdoc-toc {
  color: #111827;
}

.ofv-msdoc-toc span {
  position: relative;
  z-index: 1;
}

.ofv-msdoc-toc-title {
  background: #fff;
  white-space: nowrap;
}

.ofv-msdoc-toc-number {
  display: inline-block;
  min-width: calc(28px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-toc-leader {
  align-self: center;
  height: 0;
  border-bottom: 1px dotted #111827;
}

.ofv-msdoc-toc-page {
  padding-left: calc(2px * var(--ofv-office-zoom, 1));
  background: #fff;
  text-align: right;
}

.ofv-msdoc-toc-level-2 {
  margin-left: calc(16px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-toc-level-3 {
  margin-left: calc(32px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-page .ofv-msdoc-code {
  margin: 0 calc(22px * var(--ofv-office-zoom, 1));
  padding: 0 calc(4px * var(--ofv-office-zoom, 1));
  background: #e5e5e5;
  color: #800000;
  font-family: "Courier New", Courier, monospace;
  font-size: calc(8px * var(--ofv-office-zoom, 1));
  line-height: 1.05;
}

.ofv-msdoc-page .ofv-msdoc-code-ruler {
  display: flex;
  justify-content: space-between;
  color: #111827;
}

.ofv-msdoc-table {
  position: relative;
  width: auto;
  max-width: 100%;
  margin: calc(8px * var(--ofv-office-zoom, 1)) 0;
  border-collapse: collapse;
  table-layout: auto;
}

.ofv-msdoc-revision-table {
  table-layout: fixed;
}

.ofv-msdoc-form-table {
  width: 100%;
  table-layout: fixed;
  border: 2px solid #111827;
  color: #111827;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, Helvetica, sans-serif;
}

.ofv-msdoc-table th,
.ofv-msdoc-table td {
  padding: 0 calc(5px * var(--ofv-office-zoom, 1));
  border: 1px solid #bfbfbf;
  vertical-align: top;
  text-align: left;
  line-height: 1.32;
  white-space: pre-line;
}

.ofv-msdoc-table th {
  background: #f8fafc;
  font-weight: 700;
}

.ofv-msdoc-table .ofv-msdoc-label-cell {
  background: #e8e8e8;
  text-align: center;
  vertical-align: middle;
}

.ofv-msdoc-table .ofv-msdoc-span-cell {
  text-align: center;
}

.ofv-msdoc-cjk-document .ofv-msdoc-title,
.ofv-msdoc-cjk-document .ofv-msdoc-subtitle,
.ofv-msdoc-cjk-document .ofv-msdoc-heading {
  color: #1f2328;
  font-family: "Microsoft YaHei", "PingFang SC", "SimSun", serif;
}

.ofv-msdoc-cjk-document .ofv-msdoc-title,
.ofv-msdoc-cjk-document .ofv-msdoc-subtitle {
  text-align: center;
}

.ofv-msdoc-cjk-document .ofv-msdoc-table {
  width: 100%;
}

.ofv-msdoc-cjk-document .ofv-msdoc-table th {
  background: #e8e8e8;
}

.ofv-msdoc-form-table th,
.ofv-msdoc-form-table td {
  min-height: calc(34px * var(--ofv-office-zoom, 1));
  padding: calc(6px * var(--ofv-office-zoom, 1)) calc(8px * var(--ofv-office-zoom, 1));
  border-color: #111827;
  font-size: calc(11pt * var(--ofv-office-zoom, 1));
  line-height: 1.45;
}

.ofv-msdoc-form-label,
.ofv-msdoc-form-section {
  background: #b7e63a;
  font-weight: 700;
}

.ofv-msdoc-form-label {
  text-align: center;
}

.ofv-msdoc-form-section {
  font-size: calc(12pt * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-form-caption {
  font-weight: 700;
}

.ofv-msdoc-form-empty {
  background: #fff;
}

.ofv-msdoc-training-workbook {
  font-family: SimSun, "Songti SC", serif;
}

.ofv-msdoc-training-page {
  padding: calc(74px * var(--ofv-office-zoom, 1)) calc(68px * var(--ofv-office-zoom, 1));
  color: #111;
  font-family: SimSun, "Songti SC", serif;
  font-size: calc(10pt * var(--ofv-office-zoom, 1));
  line-height: 1.55;
}

.ofv-msdoc-training-page::after {
  position: absolute;
  inset: calc(110px * var(--ofv-office-zoom, 1)) calc(66px * var(--ofv-office-zoom, 1)) calc(70px * var(--ofv-office-zoom, 1));
  border: 1px solid #111;
  content: "";
  pointer-events: none;
}

.ofv-msdoc-training-page > * {
  position: relative;
  z-index: 1;
}

.ofv-msdoc-training-page .ofv-msdoc-title {
  margin: 0 0 calc(8px * var(--ofv-office-zoom, 1));
  color: #111;
  font-family: SimHei, "Microsoft YaHei", sans-serif;
  font-size: calc(16pt * var(--ofv-office-zoom, 1));
  line-height: 1.3;
  text-align: center;
}

.ofv-msdoc-training-paragraph {
  margin: 0;
  padding: calc(2px * var(--ofv-office-zoom, 1)) calc(4px * var(--ofv-office-zoom, 1));
  white-space: pre-line;
}

.ofv-msdoc-training-indent {
  padding-left: calc(30px * var(--ofv-office-zoom, 1));
  text-indent: 2em;
}

.ofv-msdoc-training-center {
  border: 1px solid #111;
  text-align: center;
}

.ofv-msdoc-training-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.ofv-msdoc-training-table td {
  box-sizing: border-box;
  padding: calc(3px * var(--ofv-office-zoom, 1)) calc(5px * var(--ofv-office-zoom, 1));
  border: 1px solid #111;
  vertical-align: middle;
  white-space: pre-line;
}

.ofv-msdoc-training-identity td:nth-child(odd) {
  width: 25%;
  background: #a6e600;
  font-family: SimHei, "Microsoft YaHei", sans-serif;
  font-weight: 700;
  text-align: center;
}

.ofv-msdoc-training-identity td:nth-child(even) {
  width: 25%;
  height: calc(36px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-training-section {
  margin: 0;
}

.ofv-msdoc-training-section-head td {
  width: 50%;
  padding: calc(7px * var(--ofv-office-zoom, 1));
  font-family: SimHei, "Microsoft YaHei", sans-serif;
  font-size: calc(11pt * var(--ofv-office-zoom, 1));
  font-weight: 700;
}

.ofv-msdoc-training-green {
  background: #a6e600;
}

.ofv-msdoc-training-image-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(8px * var(--ofv-office-zoom, 1));
  margin: calc(6px * var(--ofv-office-zoom, 1)) auto;
}

.ofv-msdoc-training-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ofv-msdoc-training-switches .ofv-msdoc-training-image {
  width: calc(128px * var(--ofv-office-zoom, 1));
  height: calc(138px * var(--ofv-office-zoom, 1));
}

.ofv-msdoc-training-plan td:first-child { width: 10%; }
.ofv-msdoc-training-plan td { height: calc(34px * var(--ofv-office-zoom, 1)); text-align: center; }
.ofv-msdoc-training-plan tr:first-child td { height: auto; }
.ofv-msdoc-training-plan tr:last-child td { height: calc(88px * var(--ofv-office-zoom, 1)); text-align: left; }
.ofv-msdoc-training-assignment td { text-align: center; }

.ofv-msdoc-training-equipment {
  margin-bottom: calc(50px * var(--ofv-office-zoom, 1));
}
.ofv-msdoc-training-equipment tr:first-child td { text-align: center; }
.ofv-msdoc-training-equipment tr:not(:first-child) td:nth-child(1) { width: 8%; }
.ofv-msdoc-training-equipment tr:not(:first-child) td:nth-child(2) { width: 43%; }
.ofv-msdoc-training-equipment tr:not(:first-child) td:nth-child(3) { width: 27%; }
.ofv-msdoc-training-equipment tr:not(:first-child) td:nth-child(4) { width: 22%; text-align: center; }
.ofv-msdoc-training-equipment tr:nth-child(n+3) td { height: calc(33px * var(--ofv-office-zoom, 1)); }

.ofv-msdoc-training-people td:first-child { width: 29%; padding: 0; }
.ofv-msdoc-training-people td:nth-child(2) { width: 22%; }
.ofv-msdoc-training-people td:nth-child(3) { width: 49%; }
.ofv-msdoc-training-people .ofv-msdoc-training-image { height: calc(112px * var(--ofv-office-zoom, 1)); object-fit: contain; }

.ofv-msdoc-training-work-table td:first-child {
  width: 34%;
  padding: calc(3px * var(--ofv-office-zoom, 1));
}
.ofv-msdoc-training-work-table td:last-child { width: 66%; }
.ofv-msdoc-training-work-table .ofv-msdoc-training-image { height: calc(115px * var(--ofv-office-zoom, 1)); }
.ofv-msdoc-training-work { break-inside: avoid; }

.ofv-msdoc-training-quality td:first-child { width: 18%; text-align: center; }
.ofv-msdoc-training-quality td:nth-child(2) { width: 55%; }
.ofv-msdoc-training-quality td:nth-child(3) { width: 27%; text-align: center; }
.ofv-msdoc-training-quality tr:last-child td { height: calc(105px * var(--ofv-office-zoom, 1)); }

.ofv-msdoc-training-reflection {
  margin: calc(20px * var(--ofv-office-zoom, 1));
  padding: calc(12px * var(--ofv-office-zoom, 1));
  border: 1px solid #111;
  white-space: pre-line;
}

.ofv-msdoc-training-score {
  margin-top: calc(18px * var(--ofv-office-zoom, 1));
}
.ofv-msdoc-training-score tr:first-child td {
  background: #a6e600;
  font-family: SimHei, "Microsoft YaHei", sans-serif;
  font-size: calc(12pt * var(--ofv-office-zoom, 1));
  font-weight: 700;
  text-align: center;
}
.ofv-msdoc-training-score td:first-child { width: 20%; text-align: center; }
.ofv-msdoc-training-score td:nth-child(2) { width: 58%; }
.ofv-msdoc-training-score td:nth-child(3),
.ofv-msdoc-training-score td:nth-child(4) { width: 11%; text-align: center; }

.ofv-msdoc-training-footer {
  position: absolute !important;
  right: 0;
  bottom: calc(54px * var(--ofv-office-zoom, 1));
  left: 0;
  color: #9ca3af;
  font-size: calc(8px * var(--ofv-office-zoom, 1));
  text-align: center;
}

.ofv-msdoc-meta,
.ofv-msdoc-warning {
  display: none;
}

.ofv-docx-document {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  color: #111827;
}

.ofv-docx-document .ofv-docx-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  padding: 24px;
  overflow: hidden;
  background: transparent;
  --ofv-docx-scale: 1;
  --ofv-docx-page-width: 794px;
}

.ofv-docx-page-frame {
  flex: 0 0 auto;
  width: min(100%, calc(var(--ofv-docx-page-width) * var(--ofv-docx-scale) * var(--ofv-office-zoom, 1)));
  max-width: 100%;
  min-width: 0;
  margin-bottom: 30px;
  position: relative;
  overflow: visible;
}

.ofv-docx-document section.ofv-docx {
  box-sizing: border-box;
  flex: 0 0 auto;
  max-width: none;
  min-width: auto;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  color: #111827;
  overflow: visible;
  overflow-wrap: normal;
  transform: scale(calc(var(--ofv-docx-scale) * var(--ofv-office-zoom, 1)));
  transform-origin: top left;
}

.ofv-docx-document section.ofv-docx > section,
.ofv-docx-document section.ofv-docx .docx,
.ofv-docx-document section.ofv-docx .docx-wrapper {
  background: #fff;
}

.ofv-docx-document section.ofv-docx img,
.ofv-docx-document section.ofv-docx svg,
.ofv-docx-document section.ofv-docx canvas,
.ofv-docx-document section.ofv-docx video {
  max-width: 100%;
  height: auto;
}

.ofv-docx-document section.ofv-docx table {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.ofv-docx-right-tab-line {
  display: flex;
  align-items: baseline;
  width: var(--ofv-docx-right-tab-position);
  max-width: 100%;
}

.ofv-docx-right-tab-end {
  min-width: 0;
  margin-inline-start: auto;
}

.ofv-docx-right-tab-source {
  display: none !important;
}

.ofv-docx-page-bottom-frame {
  position: absolute;
  z-index: 1;
  line-height: 1.2;
}

.ofv-docx-chart-preview {
  min-width: 0;
  overflow: hidden;
  background: #fff;
}

.ofv-docx-chart-preview .ofv-chart-svg {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.ofv-docx-fallback-note {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: var(--ofv-surface-muted);
  color: var(--ofv-text-muted);
  font-size: 13px;
}

.ofv-docx-textbox-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 22px;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 38px;
  border: 1px solid var(--ofv-border);
  background: #fff;
  color: #111827;
  box-shadow: 0 10px 32px rgb(15 23 42 / 10%);
}

.ofv-docx-textbox-page {
  position: relative;
  width: min(100%, var(--ofv-docx-textbox-page-width, 595pt));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--ofv-border);
  background: #fff;
  color: #111827;
  box-shadow: 0 10px 32px rgb(15 23 42 / 10%);
}

.ofv-docx-textbox-page-has-sidebar::before {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--ofv-docx-textbox-sidebar-width, 180pt);
  background: var(--ofv-docx-textbox-sidebar-bg, #1f1c34);
  content: "";
}

.ofv-docx-textbox-page-flow-layout {
  display: grid;
  grid-template-columns: var(--ofv-docx-textbox-sidebar-width, 180pt) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.ofv-docx-textbox-page-flow-layout::before {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--ofv-docx-textbox-sidebar-width, 180pt);
  background: var(--ofv-docx-textbox-sidebar-bg, #1f1c34);
  content: "";
}

.ofv-docx-textbox-page-flow-sidebar,
.ofv-docx-textbox-page-flow-main {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  min-width: 0;
}

.ofv-docx-textbox-page-flow-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 28pt;
  padding: 36pt 22pt 32pt;
  color: #fff;
}

.ofv-docx-textbox-page-flow-main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 24pt;
  padding: 36pt 36pt 38pt 26pt;
  background: #fff;
  color: #111827;
}

.ofv-docx-textbox-page-flow-layout .ofv-docx-textbox-block-filled {
  background: transparent;
  color: inherit;
}

.ofv-docx-textbox-page-flow-layout .ofv-docx-textbox-block h3 {
  margin-bottom: 8pt;
}

.ofv-docx-textbox-page-flow-sidebar .ofv-docx-textbox-block h3 {
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.ofv-docx-textbox-page-flow-sidebar .ofv-docx-textbox-block p {
  color: #fff;
  font-size: 13.5px;
  line-height: 1.72;
}

.ofv-docx-textbox-page-flow-sidebar .ofv-docx-textbox-block + .ofv-docx-textbox-block {
  padding-top: 22pt;
  border-top: 1px solid rgb(255 255 255 / 65%);
}

.ofv-docx-textbox-page-flow-sidebar .ofv-docx-textbox-block:first-child h3 {
  font-size: 23px;
  line-height: 1.25;
}

.ofv-docx-textbox-page-flow-sidebar .ofv-docx-textbox-block:first-child p {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.ofv-docx-textbox-page-flow-main .ofv-docx-textbox-block h3 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #111827;
  font-size: 20px;
  line-height: 1.35;
}

.ofv-docx-textbox-page-flow-main .ofv-docx-textbox-block h3::before {
  display: inline-block;
  flex: 0 0 auto;
  width: 15px;
  height: 22px;
  background: #303241;
  clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%, 55% 50%);
  content: "";
}

.ofv-docx-textbox-page-flow-main .ofv-docx-textbox-block p {
  color: #111827;
  font-size: 14px;
  line-height: 1.78;
}

.ofv-docx-textbox-page-flow-main .ofv-docx-textbox-block p + p {
  margin-top: 4px;
}

.ofv-docx-textbox-page-flow-main .ofv-docx-textbox-block + .ofv-docx-textbox-block {
  padding-top: 15pt;
  border-top: 1px solid #c9c9cf;
}

.ofv-docx-textbox-section-skills p {
  position: relative;
  padding-left: 18px;
}

.ofv-docx-textbox-section-skills p::before {
  position: absolute;
  top: 0.72em;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentcolor;
  content: "";
}

.ofv-docx-textbox-section-education p,
.ofv-docx-textbox-section-work p {
  font-weight: 700;
}

.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-sidebar {
  justify-content: flex-start;
  gap: 18pt;
  padding: 52pt 24pt 32pt;
}

.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-main {
  justify-content: flex-start;
  gap: 20pt;
  padding-top: 52pt;
}

.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-sidebar .ofv-docx-textbox-block {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-sidebar .ofv-docx-textbox-block h3 {
  margin-bottom: 10pt;
  font-size: 17px;
  line-height: 1.3;
}

.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-sidebar .ofv-docx-textbox-block p {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.78;
}

.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-main .ofv-docx-textbox-section-heading h3,
.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-main .ofv-docx-textbox-block h3 {
  width: 100%;
  padding-bottom: 4pt;
  border-bottom: 2px solid #303241;
}

.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-main .ofv-docx-textbox-block h3::before {
  flex: 0 0 auto;
}

.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-main .ofv-docx-textbox-section-heading {
  margin-bottom: 2pt;
}

.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-main .ofv-docx-textbox-section-heading h3 {
  font-size: 18px;
}

.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-main .ofv-docx-textbox-block p {
  font-size: 13px;
  line-height: 2.05;
}

.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-main .ofv-docx-textbox-block p + p {
  margin-top: 5px;
}

.ofv-docx-textbox-continuation-flow-layout .ofv-docx-textbox-page-flow-main .ofv-docx-textbox-block:only-child {
  min-height: 0;
}

.ofv-docx-textbox-page-block,
.ofv-docx-textbox-page-flow {
  position: absolute;
  z-index: 1;
  box-sizing: border-box;
}

.ofv-docx-textbox-page-block {
  overflow: hidden;
}

.ofv-docx-textbox-page-title-block h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.15;
}

.ofv-docx-textbox-page-title-block p {
  font-size: 13px;
  line-height: 1.45;
}

.ofv-docx-textbox-page-filled-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8pt 12pt;
  background: var(--ofv-docx-textbox-fill, #303241);
  color: #fff;
}

.ofv-docx-textbox-page-filled-block h3,
.ofv-docx-textbox-page-filled-block p {
  color: inherit;
}

.ofv-docx-textbox-page-has-sidebar .ofv-docx-textbox-page-sidebar-block:not(.ofv-docx-textbox-page-filled-block),
.ofv-docx-textbox-page-has-sidebar .ofv-docx-textbox-page-sidebar-flow .ofv-docx-textbox-flow-block,
.ofv-docx-textbox-page-has-sidebar .ofv-docx-textbox-page-sidebar-flow .ofv-docx-textbox-flow-block h3,
.ofv-docx-textbox-page-has-sidebar .ofv-docx-textbox-page-sidebar-flow .ofv-docx-textbox-flow-block p {
  color: #fff;
}

.ofv-docx-textbox-page-has-sidebar .ofv-docx-textbox-page-sidebar-flow .ofv-docx-textbox-flow-block h3 {
  border-bottom-color: rgb(255 255 255 / 65%);
}

.ofv-docx-textbox-page-main-flow .ofv-docx-textbox-flow-block {
  margin-bottom: 14px;
}

.ofv-docx-textbox-page-main-flow .ofv-docx-textbox-flow-block h3 {
  padding-bottom: 5px;
  border-bottom: 3px solid #303241;
}

.ofv-docx-textbox-page-sidebar-flow .ofv-docx-textbox-flow-block {
  margin-bottom: 14px;
}

.ofv-docx-textbox-sidebar,
.ofv-docx-textbox-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

.ofv-docx-textbox-block {
  min-width: 0;
  break-inside: avoid;
}

.ofv-docx-textbox-sidebar-block.ofv-docx-textbox-block-filled {
  padding: 16px;
  background: var(--ofv-docx-textbox-fill, #303241);
  color: #fff;
}

.ofv-docx-textbox-block h3 {
  margin: 0 0 10px;
  color: inherit;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

.ofv-docx-textbox-main .ofv-docx-textbox-block h3 {
  padding-bottom: 6px;
  border-bottom: 3px solid #303241;
}

.ofv-docx-textbox-main-block.ofv-docx-textbox-block-filled {
  padding: 0;
  background: transparent;
  color: #111827;
}

.ofv-docx-textbox-main-block.ofv-docx-textbox-block-filled h3 {
  margin-bottom: 10px;
  padding: 10px 14px;
  border-bottom: 0;
  background: var(--ofv-docx-textbox-fill, #303241);
  color: #fff;
}

.ofv-docx-textbox-main-block.ofv-docx-textbox-block-filled p {
  padding: 0 14px;
}

.ofv-docx-textbox-block p {
  margin: 0 0 7px;
  color: inherit;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.ofv-docx-textbox-block p:last-child {
  margin-bottom: 0;
}

.ofv-root.ofv-theme-dark .ofv-docx-document {
  color-scheme: light;
}

.ofv-details {
  margin-top: 12px;
}

.ofv-tabs {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
  margin-bottom: 12px;
}

.ofv-tabs button {
  max-width: 100%;
  min-width: 0;
  min-height: 32px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--ofv-surface);
  color: var(--ofv-text);
  cursor: pointer;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
}

.ofv-tabs button.is-active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1e3a8a;
}

.ofv-root.ofv-theme-dark .ofv-tabs button.is-active {
  border-color: #60a5fa;
  background: #1e3a8a;
  color: #eff6ff;
}

.ofv-sheet h3 {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}

.ofv-sheet {
  font-size: 13px;
}

.ofv-sheet-summary {
  margin: 0 0 10px;
  color: var(--ofv-text-muted);
  font-size: 13px;
}

.ofv-office-package-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: var(--ofv-surface-muted);
  color: var(--ofv-text);
  font-size: 13px;
  line-height: 1.55;
}

.ofv-iwork-meta {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
}

.ofv-iwork-meta > strong {
  font-size: 13px;
}

.ofv-iwork-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 16px;
}

.ofv-office-package-list {
  display: grid;
  gap: 4px;
  max-height: 320px;
  margin: 12px 0 0;
  overflow: auto;
  padding: 12px 12px 12px 30px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: var(--ofv-surface);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ofv-sheet-window {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 10px;
  padding: 8px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: var(--ofv-surface-muted);
}

.ofv-sheet-window-note {
  flex: 1 1 260px;
  min-width: 0;
  color: var(--ofv-text-muted);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ofv-sheet-window button {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--ofv-surface);
  color: var(--ofv-text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ofv-sheet-window button:hover {
  background: var(--ofv-button-hover);
}

.ofv-sheet-window button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.ofv-table-scroll {
  max-width: 100%;
  max-height: min(680px, 72vh);
  overflow: auto;
  border: 1px solid var(--ofv-border);
  background: var(--ofv-surface);
}

.ofv-table-scroll table {
  border-collapse: collapse;
  min-width: 100%;
  table-layout: fixed;
}

.ofv-workbook-table {
  font-size: 11px;
}

.ofv-table-scroll td,
.ofv-table-scroll th {
  position: relative;
  border: 1px solid var(--ofv-border);
  padding: 5px 10px 5px 8px;
  white-space: nowrap;
  overflow: hidden;
  overflow-wrap: normal;
  word-break: normal;
  text-overflow: clip;
  font-size: inherit;
  line-height: 1.45;
  vertical-align: middle;
}

.ofv-workbook-table td,
.ofv-workbook-table th {
  padding: 2px 2px 2px 3px;
  line-height: 1.25;
}

.ofv-cell-number {
  text-align: right;
}

/* Blank spreadsheet cells have no line box, so an all-blank row collapses to
   its padding; give them one so blank rows keep the normal row height. */
.ofv-sheet .ofv-table-scroll td:empty::before,
.ofv-sheet .ofv-table-scroll th:empty::before {
  content: "\00a0";
}

/* Sheet cells carry file-native fills and inks that assume Excel's light
   canvas; pin the light-surface palette in dark mode (same convention as the
   DOCX white page) so the viewer theme never restyles cell content. */
.ofv-root.ofv-theme-dark .ofv-sheet .ofv-table-scroll {
  --ofv-border: #e3e7ef;
  --ofv-text-muted: #5b6478;
  background: #ffffff;
  color: #1c2333;
  color-scheme: light;
}

.ofv-cell-formula {
  background-image: linear-gradient(135deg, #f59e0b 0 8px, transparent 8px);
  background-repeat: no-repeat;
}

.ofv-cell-merged {
  white-space: normal;
}

.ofv-cell-multiline {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: visible;
  text-overflow: clip;
}

.ofv-cell-rich-text .ofv-rich-text-run {
  white-space: inherit;
}

.ofv-cell-image {
  padding: 6px;
  vertical-align: middle;
}

.ofv-workbook-image {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 2px 0;
}

.ofv-workbook-image img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.ofv-column-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.ofv-column-resize-handle::after {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 3px;
  width: 1px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.ofv-column-resize-handle:hover::after,
.ofv-column-resize-handle:active::after {
  background: #2563eb;
}

.ofv-formula-list ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ofv-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}

.ofv-chart-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ofv-border);
  border-radius: 8px;
  background: var(--ofv-surface);
}

.ofv-chart-card header {
  display: grid;
  gap: 4px;
  padding: 12px 14px 0;
}

.ofv-chart-card h4 {
  margin: 0;
  overflow: hidden;
  color: var(--ofv-text);
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ofv-chart-card header span {
  color: var(--ofv-text-muted);
  font-size: 12px;
}

.ofv-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 180px;
  padding: 8px 10px;
  fill: none;
  shape-rendering: geometricPrecision;
  stroke: none;
  stroke-linecap: initial;
  stroke-linejoin: initial;
  stroke-width: 0;
  text-rendering: geometricPrecision;
}

.ofv-chart-svg text {
  font-synthesis: none;
  stroke: none;
  stroke-width: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.ofv-chart-axis {
  stroke: var(--ofv-border);
  stroke-width: 1.5;
}

.ofv-chart-gridline {
  stroke: #d9d9d9;
  stroke-width: 1;
}

.ofv-chart-title {
  fill: #595959;
  font: 400 20px/1.2 Calibri, Arial, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

.ofv-chart-label {
  fill: #595959;
  font: 400 12px/1.2 Calibri, Arial, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

.ofv-chart-data {
  margin: 0;
  padding: 0 14px 12px;
  color: var(--ofv-text-muted);
  font-size: 13px;
}

.ofv-chart-data ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.ofv-epub-meta {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 520px;
}

.ofv-epub-reader {
  max-width: 100%;
  max-height: min(760px, 74vh);
  min-width: 0;
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--ofv-border);
  border-radius: 8px;
  background: var(--ofv-surface);
  color: var(--ofv-text);
}

.ofv-epub-chapter {
  max-width: 760px;
  min-width: 0;
  margin: 0 auto 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ofv-border);
}

.ofv-epub-chapter:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.ofv-epub-chapter h3 {
  margin: 0 0 18px;
  font-size: 18px;
}

.ofv-epub-content {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.75;
}

.ofv-epub-zoom-layer {
  zoom: var(--ofv-epub-zoom, 1);
}

.ofv-epub-content p {
  margin: 0 0 1em;
}

.ofv-epub-content img,
.ofv-epub-content svg {
  max-width: 100%;
  height: auto;
}

.ofv-epub-content a {
  color: #2563eb;
}

.ofv-root.ofv-theme-dark .ofv-epub-content a {
  color: #60a5fa;
}

.ofv-xps-meta {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.ofv-xps-pages {
  display: grid;
  gap: 18px;
  max-width: 100%;
  max-height: min(760px, 74vh);
  min-width: 0;
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--ofv-border);
  border-radius: 8px;
  background: var(--ofv-surface-muted);
}

.ofv-xps-page {
  width: min(100%, 840px);
  max-width: 840px;
  min-width: 0;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: var(--ofv-surface);
  box-shadow: var(--ofv-shadow);
}

.ofv-xps-page h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.ofv-xps-page > span {
  display: block;
  margin-bottom: 14px;
  color: var(--ofv-text-muted);
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ofv-xps-canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 68vh;
  margin: 12px 0 16px;
  border: 1px solid var(--ofv-border);
  border-radius: 4px;
  background: #fff;
  color-scheme: light;
}

.ofv-xps-text p {
  margin: 0 0 8px;
  line-height: 1.7;
}

.ofv-slide {
  min-width: 0;
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--ofv-border);
  border-radius: 8px;
  background: var(--ofv-surface);
  font-size: 14px;
  overflow-wrap: anywhere;
  zoom: var(--ofv-office-zoom, 1);
}

.ofv-pptx-viewer {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 160px;
  overflow: auto;
  background: var(--ofv-bg);
}

.ofv-pptx-viewer > div[data-slide-index] {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  overflow-wrap: anywhere;
}

.ofv-ppt-binary-viewer {
  display: grid;
  justify-items: center;
  gap: 20px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 20px;
  background: color-mix(in srgb, var(--ofv-bg) 92%, #000);
}

.ofv-ppt-binary-slide {
  position: relative;
  box-sizing: border-box;
  width: min(960px, 100%);
  min-width: 320px;
  aspect-ratio: var(--ofv-ppt-aspect, 4 / 3);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ofv-border) 72%, transparent);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 12px 32px rgb(0 0 0 / 18%);
  container-type: size;
  transform-origin: top center;
}

.ofv-ppt-binary-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ofv-ppt-binary-shape {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  min-width: 1px;
  min-height: 1px;
  overflow: hidden;
}

.ofv-ppt-binary-master-shape {
  z-index: 0;
}

.ofv-ppt-binary-round-rectangle {
  border-radius: 999px;
}

.ofv-ppt-binary-ellipse {
  border-radius: 50%;
}

.ofv-ppt-binary-diamond {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.ofv-ppt-binary-line-shape {
  min-width: 0;
  min-height: 0;
  overflow: visible;
}

.ofv-ppt-binary-line-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.ofv-ppt-binary-right-arrow {
  clip-path: polygon(0 18%, 68% 18%, 68% 0, 100% 50%, 68% 100%, 68% 82%, 0 82%);
}

.ofv-ppt-binary-down-arrow {
  clip-path: polygon(18% 0, 82% 0, 82% 68%, 100% 68%, 50% 100%, 0 68%, 18% 68%);
}

.ofv-ppt-binary-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
}

.ofv-ppt-binary-text {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  overflow: hidden;
  color: #202124;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: clamp(7px, 2.15cqw, 24px);
  line-height: 1.22;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.ofv-ppt-binary-plain-text {
  padding: 0.833cqh 1.25cqw;
}

.ofv-ppt-binary-short-text-shape,
.ofv-ppt-binary-short-text-shape .ofv-ppt-binary-styled-text,
.ofv-ppt-binary-nowrap-title-shape,
.ofv-ppt-binary-nowrap-title-shape .ofv-ppt-binary-styled-text {
  overflow: visible;
}

.ofv-ppt-binary-nowrap-title-shape .ofv-ppt-binary-styled-text {
  white-space: pre;
}

.ofv-ppt-binary-nowrap-short-text-shape .ofv-ppt-binary-styled-text {
  white-space: pre;
}

.ofv-ppt-binary-vertical-text-shape,
.ofv-ppt-binary-vertical-text-shape .ofv-ppt-binary-vertical-text {
  overflow: visible;
}

.ofv-ppt-binary-vertical-text {
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: normal;
}

.ofv-ppt-binary-master-shape .ofv-ppt-binary-text {
  color: #80a812;
  font-weight: 600;
}

.ofv-ppt-binary-filled-text,
.ofv-ppt-binary-section-number {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25cqh 0.5cqw;
  text-align: center;
}

.ofv-ppt-binary-filled-text {
  font-size: clamp(7px, 1.8cqw, 18px);
  line-height: 1.15;
}

.ofv-ppt-binary-picture-overlay-text {
  justify-content: flex-start;
  padding-inline: 1cqw;
  text-align: left;
}

.ofv-ppt-binary-section-number {
  color: #fff;
  font-size: clamp(12px, 2.3cqw, 25px);
  font-weight: 700;
}

.ofv-ppt-binary-section-heading {
  color: #80a812;
  font-weight: 700;
}

.ofv-ppt-binary-title {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5cqw;
  text-align: center;
  font-size: clamp(13px, 3.2cqw, 34px);
  font-weight: 600;
  line-height: 1.12;
}

.ofv-ppt-binary-body-text {
  padding-top: 15cqh;
}

.ofv-ppt-binary-table-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3cqh 0.5cqw;
  border: 0;
  background: transparent;
  color: #26351b;
  font-size: clamp(8px, 1.95cqw, 18px);
  font-weight: 600;
  text-align: center;
}

.ofv-ppt-binary-has-master-background .ofv-ppt-binary-title {
  color: #fff;
  text-shadow: 0 1px 2px rgb(0 0 0 / 24%);
}

.ofv-ppt-binary-slide-number {
  position: absolute;
  right: 8px;
  bottom: 6px;
  z-index: 5;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgb(0 0 0 / 48%);
  color: #fff;
  font: 500 10px/1.4 ui-sans-serif, system-ui, sans-serif;
  pointer-events: none;
}

.ofv-ppt-binary-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #64748b;
  font: 500 clamp(14px, 3cqw, 28px)/1.4 ui-sans-serif, system-ui, sans-serif;
}

@media (max-width: 640px) {
  .ofv-ppt-binary-viewer {
    gap: 12px;
    padding: 12px;
  }

  .ofv-ppt-binary-slide {
    min-width: 260px;
  }
}

.ofv-pptx-diagram-cycle-text {
  box-sizing: border-box;
  padding: 2px 4px;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.ofv-pptx-circle-callout-text {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: normal;
}

.ofv-pptx-viewer svg {
  width: auto;
  height: auto;
  fill: initial;
  stroke: initial;
  stroke-linecap: initial;
  stroke-linejoin: initial;
  stroke-width: initial;
}

.ofv-presentation-summary {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.ofv-presentation-summary > p {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: var(--ofv-surface-muted);
}

.ofv-presentation-summary strong {
  color: var(--ofv-text);
  font-size: 13px;
}

.ofv-presentation-summary span {
  color: var(--ofv-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ofv-presentation-slides {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ofv-presentation-slides li {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: var(--ofv-surface);
}

.ofv-presentation-slides p {
  margin: 0;
  overflow: hidden;
  color: var(--ofv-text-muted);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}



.ofv-slide-image {
  margin: 12px 0 0;
}

.ofv-slide-image > img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.ofv-slide-image figcaption {
  margin-top: 6px;
  color: var(--ofv-text-muted);
  font-size: 12px;
}

.ofv-text-block {
  max-width: 100%;
  max-height: 520px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border-radius: 6px;
  background: #0f172a;
  color: #e5e7eb;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  zoom: var(--ofv-email-zoom, var(--ofv-office-zoom, 1));
}

/* Avoid compound zoom when a text block sits inside an already-zoomed layer. */
.ofv-document .ofv-text-block,
.ofv-email-content .ofv-text-block {
  zoom: 1;
}

.ofv-font-preview {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--ofv-border);
  border-radius: 8px;
  background: var(--ofv-surface-muted);
}

.ofv-font-preview strong {
  font-size: 13px;
}

.ofv-font-sample {
  font-size: 28px;
  line-height: 1.25;
  word-break: break-word;
}

.ofv-font-pangram {
  color: var(--ofv-text-muted);
  font-size: 16px;
  line-height: 1.5;
  word-break: break-word;
}

.ofv-font-status {
  color: var(--ofv-text-muted);
  font-size: 12px;
}

.ofv-font-info {
  display: grid;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--ofv-border);
}

.ofv-font-tables {
  max-width: 100%;
  overflow: auto;
}

.ofv-font-tables strong {
  display: block;
  margin: 0 0 8px;
}

.ofv-font-tables table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13px;
}

.ofv-font-tables th,
.ofv-font-tables td {
  padding: 8px;
  border-bottom: 1px solid var(--ofv-border);
  text-align: left;
  vertical-align: top;
}

.ofv-font-tables th {
  color: var(--ofv-text-muted);
  font-weight: 600;
}

.ofv-font-tables td {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ofv-wasm-preview {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.ofv-wasm-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 16px;
}

.ofv-wasm-sections {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ofv-wasm-sections th,
.ofv-wasm-sections td {
  padding: 8px;
  border-bottom: 1px solid var(--ofv-border);
  text-align: left;
  vertical-align: top;
}

.ofv-wasm-sections th {
  color: var(--ofv-text-muted);
  font-weight: 600;
}

.ofv-wasm-error {
  color: #b91c1c;
}

.ofv-wasm-list ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ofv-psd-preview {
  display: grid;
  min-width: 0;
}

.ofv-psd-error {
  color: #b91c1c;
}

.ofv-psd-composite {
  display: grid;
  min-width: 0;
}

.ofv-psd-canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(72vh, 920px);
  margin: 0 auto;
  border: 1px solid var(--ofv-border);
  border-radius: 10px;
  background:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-color: #f8fafc;
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
  object-fit: contain;
}

.ofv-sqlite-preview {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.ofv-sqlite-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 16px;
}

.ofv-sqlite-schema,
.ofv-sqlite-data {
  max-width: 100%;
  overflow: auto;
}

.ofv-sqlite-schema strong,
.ofv-sqlite-data > strong {
  display: block;
  margin: 0 0 8px;
}

.ofv-sqlite-schema table,
.ofv-sqlite-data-table table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

.ofv-sqlite-schema th,
.ofv-sqlite-schema td,
.ofv-sqlite-data-table th,
.ofv-sqlite-data-table td {
  padding: 8px;
  border-bottom: 1px solid var(--ofv-border);
  text-align: left;
  vertical-align: top;
}

.ofv-sqlite-schema th,
.ofv-sqlite-data-table th {
  color: var(--ofv-text-muted);
  font-weight: 600;
}

.ofv-sqlite-schema td:last-child {
  max-width: 420px;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ofv-sqlite-table-sample {
  min-width: 0;
  margin-top: 10px;
}

.ofv-sqlite-data-table {
  max-width: 100%;
  overflow: auto;
}

.ofv-sqlite-data-table td {
  max-width: 280px;
  overflow-wrap: anywhere;
}

.ofv-sqlite-error,
.ofv-sqlite-empty {
  color: var(--ofv-text-muted);
}

.ofv-data-preview {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.ofv-data-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 16px;
}

.ofv-data-error,
.ofv-data-note {
  color: var(--ofv-text-muted);
}

.ofv-ai-pdf-preview {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ofv-asset:has(.ofv-ai-pdf-preview .ofv-pdf-page-wrapper) > .ofv-section > h3,
.ofv-asset:has(.ofv-ai-pdf-preview .ofv-pdf-page-wrapper) .ofv-asset-summary,
.ofv-asset:has(.ofv-ai-pdf-preview .ofv-pdf-page-wrapper) .ofv-asset-download,
.ofv-asset:has(.ofv-ai-pdf-preview .ofv-pdf-page-wrapper) .ofv-asset-hex,
.ofv-asset:has(.ofv-ai-pdf-preview .ofv-pdf-page-wrapper) .ofv-data-preview {
  display: none !important;
}

.ofv-ai-pdf-preview .ofv-pdf-viewer {
  min-height: min(720px, 68vh);
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: var(--ofv-surface-muted);
  overflow: hidden;
}

.ofv-data-kv,
.ofv-avro-schema,
.ofv-avro-records,
.ofv-parquet-schema {
  max-width: 100%;
  overflow: auto;
}

.ofv-parquet-records {
  max-width: 100%;
  overflow: auto;
}

.ofv-parquet-schema,
.ofv-parquet-records {
  max-width: 100%;
  overflow: auto;
}

.ofv-data-kv strong,
.ofv-avro-schema > strong,
.ofv-avro-records > strong,
.ofv-parquet-schema > strong,
.ofv-parquet-records > strong {
  display: block;
  margin: 0 0 8px;
}

.ofv-data-kv table,
.ofv-avro-records table,
.ofv-parquet-schema table,
.ofv-parquet-records table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13px;
}

.ofv-data-kv th,
.ofv-data-kv td,
.ofv-avro-records th,
.ofv-avro-records td,
.ofv-parquet-schema th,
.ofv-parquet-schema td,
.ofv-parquet-records th,
.ofv-parquet-records td {
  padding: 8px;
  border-bottom: 1px solid var(--ofv-border);
  text-align: left;
  vertical-align: top;
}

.ofv-data-kv th,
.ofv-avro-records th {
  width: 180px;
  color: var(--ofv-text-muted);
  font-weight: 600;
}

.ofv-data-kv td,
.ofv-avro-records td,
.ofv-parquet-schema td,
.ofv-parquet-records td {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ofv-avro-schema ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ofv-file-list {
  max-width: 100%;
  max-height: 520px;
  overflow: auto;
  margin: 12px 0 0;
  padding-left: 18px;
  font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ofv-svg-stage {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: min(620px, 70vh);
  border: 1px solid var(--ofv-border);
  border-radius: 8px;
  background: var(--ofv-surface);
  color: var(--ofv-text);
}

/* 版图预览固定使用深色画布，浅色/深色主题下图层配色一致 */
.ofv-layout-stage {
  border-color: #1f2733;
  background: #10141c;
  color: #e2e8f0;
}

.ofv-layout-webgl-stage {
  height: auto;
  aspect-ratio: 5 / 3;
  max-height: 70vh;
}

.ofv-drawing-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: var(--ofv-surface-muted);
  color: var(--ofv-text-muted);
  font-size: 12px;
}

.ofv-drawing-summary > span {
  display: inline-flex;
  gap: 5px;
  min-width: 0;
}

.ofv-drawing-summary strong {
  color: var(--ofv-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ofv-xmind {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.ofv-xmind-workbook {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--ofv-border);
  border-radius: 10px;
  background: var(--ofv-surface);
}

.ofv-xmind-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 9px 10px;
  border-bottom: 1px solid var(--ofv-border);
  background: var(--ofv-surface);
}

.ofv-xmind-tabs {
  display: flex;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
}

.ofv-xmind-tab,
.ofv-xmind-fit {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ofv-text-muted);
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.ofv-xmind-tab:hover,
.ofv-xmind-fit:hover {
  background: var(--ofv-button-hover);
  color: var(--ofv-text);
}

.ofv-xmind-tab.is-active {
  border-color: color-mix(in srgb, var(--ofv-accent) 38%, transparent);
  background: var(--ofv-accent-soft);
  color: var(--ofv-accent);
  font-weight: 600;
}

.ofv-xmind-fit {
  flex: 0 0 auto;
  border-color: var(--ofv-border);
  background: var(--ofv-surface-muted);
}

.ofv-xmind-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 460px;
  overflow: hidden;
  outline: none;
  cursor: grab;
  touch-action: none;
  background-color: var(--ofv-bg);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--ofv-text-muted) 18%, transparent) 1px, transparent 1px);
  background-size: 18px 18px;
}

.ofv-xmind-stage:focus-visible {
  box-shadow: inset 0 0 0 2px var(--ofv-accent);
}

.ofv-xmind-stage.is-panning {
  cursor: grabbing;
  user-select: none;
}

.ofv-xmind-surface {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.ofv-xmind-edges {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.ofv-xmind-edges path {
  fill: none;
  stroke: color-mix(in srgb, var(--ofv-accent) 62%, var(--ofv-border));
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.ofv-xmind-edges .ofv-xmind-edge-detached {
  stroke-dasharray: 6 5;
}

.ofv-xmind-edges .ofv-xmind-edge-summary,
.ofv-xmind-edges .ofv-xmind-edge-callout {
  stroke: #f59e0b;
}

.ofv-xmind-topic {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 160px;
  margin: 0;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ofv-accent) 28%, var(--ofv-border));
  border-left: 4px solid var(--ofv-accent);
  border-radius: 10px;
  background: var(--ofv-surface);
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.08);
  overflow-wrap: anywhere;
}

.ofv-xmind-topic-title {
  display: block;
  overflow: hidden;
  color: var(--ofv-text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

a.ofv-xmind-topic-title:hover {
  color: var(--ofv-accent);
  text-decoration: underline;
}

.ofv-xmind-topic-depth-0 {
  border: 0;
  background: linear-gradient(135deg, #4f6bf6, #7c3aed);
  box-shadow: 0 10px 28px rgba(79, 107, 246, 0.28);
}

.ofv-xmind-topic-depth-0 .ofv-xmind-topic-title,
.ofv-xmind-topic-depth-0 .ofv-xmind-topic-notes {
  color: #fff;
}

.ofv-xmind-topic-summary,
.ofv-xmind-topic-callout {
  border-left-color: #f59e0b;
  background: color-mix(in srgb, #f59e0b 8%, var(--ofv-surface));
}

.ofv-xmind-topic-detached {
  border-style: dashed;
}

.ofv-xmind-topic-image {
  width: 100%;
  max-height: 92px;
  margin-top: 8px;
  object-fit: contain;
  border-radius: 5px;
}

.ofv-xmind-topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  color: var(--ofv-text-muted);
  font-size: 10px;
}

.ofv-xmind-topic-meta span {
  max-width: 100%;
  overflow: hidden;
  padding: 2px 5px;
  border: 1px solid var(--ofv-border);
  border-radius: 999px;
  background: var(--ofv-surface-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ofv-xmind-topic-depth-0 .ofv-xmind-topic-meta span {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
}

.ofv-xmind-topic-notes {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--ofv-text-muted);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ofv-xmind-fallback small {
  color: var(--ofv-text-muted);
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .ofv-xmind-workbook {
    min-height: 440px;
  }

  .ofv-xmind-stage {
    min-height: 390px;
  }

  .ofv-xmind-fit {
    display: none;
  }
}

.ofv-cad-layers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--ofv-border);
  border-radius: 8px;
  background: var(--ofv-surface-muted);
  font-size: 13px;
}

.ofv-cad-layers strong {
  margin-right: 4px;
}

.ofv-cad-layers label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--ofv-border);
  border-radius: 999px;
  background: var(--ofv-surface);
  color: var(--ofv-text-muted);
  cursor: pointer;
}

.ofv-cad-layers input {
  margin: 0;
}

.ofv-cad-summary {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 520px;
  margin: 12px 0;
}

.ofv-cad-types ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 14px;
  min-width: 0;
  margin: 8px 0 0;
  padding-left: 18px;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ofv-cad-conversion {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--ofv-border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(20, 184, 166, 0.08)),
    var(--ofv-surface-muted);
  color: var(--ofv-text);
  font-size: 13px;
  line-height: 1.6;
}

.ofv-cad-conversion h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.ofv-cad-conversion ol {
  margin: 0;
  padding-left: 20px;
}

.ofv-cad-conversion li + li {
  margin-top: 6px;
}

.ofv-cad-binary-probe,
.ofv-cad-raw-preview {
  margin-top: 12px;
}

.ofv-cad-probe-list {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding-left: 18px;
  color: var(--ofv-text-muted);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ofv-cad-entities {
  margin-top: 12px;
}

.ofv-dwg-webgl-preview {
  position: relative;
  width: 100%;
  height: clamp(520px, 70vh, 760px);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: #05070d;
}

.ofv-dwg-webgl-stage {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
}

.ofv-dwg-webgl-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.ofv-dwg-webgl-status {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.94);
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
}

.ofv-dwg-webgl-status[hidden] {
  display: none;
}

.ofv-dwg-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 520px;
  padding: 14px;
  border: 1px solid var(--ofv-border);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    #020617;
  background-size: 24px 24px;
  overflow: auto;
}

.ofv-dwg-preview-status {
  position: sticky;
  top: 0;
  z-index: 1;
  width: max-content;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 13px;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.32);
}

.ofv-dwg-preview-status span {
  display: grid;
  gap: 4px;
}

.ofv-dwg-preview-status small {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.ofv-dwg-thumbnail {
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(100%, 640px);
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.78);
}

.ofv-dwg-thumbnail img,
.ofv-dwg-thumbnail-preview img {
  display: block;
  height: auto;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 6px;
  background: #020617;
  image-rendering: auto;
}

.ofv-dwg-thumbnail img {
  width: 100%;
}

.ofv-dwg-thumbnail figcaption {
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
}

.ofv-dwg-thumbnail-preview {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 420px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: #020617;
  overflow: auto;
}

.ofv-dwg-thumbnail-preview img {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.ofv-dwg-thumbnail-preview figcaption {
  max-width: 920px;
  margin: 0 auto;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.ofv-dwg-preview-svg {
  display: block;
  max-width: none;
  height: auto;
}

.ofv-dwg-preview-frame {
  min-height: 420px;
  overflow: auto;
  background: #020617;
}

.ofv-dwg-preview-frame .ofv-dwg-preview-svg {
  min-height: 420px;
}

@container (max-width: 720px) {
  .ofv-dwg-thumbnail {
    grid-template-columns: 1fr;
  }
}

.ofv-ofd {
  --ofv-ofd-zoom: 1;
  --ofv-ofd-rotation: 0deg;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: auto;
  background: var(--ofv-bg);
}

.ofv-ofd-pages {
  display: grid;
  gap: 18px;
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 16px;
  justify-items: center;
  overscroll-behavior: contain;
}

.ofv-ofd-page {
  width: calc(var(--ofv-ofd-page-width, 210mm) * var(--ofv-ofd-zoom));
  aspect-ratio: var(--ofv-ofd-page-width, 210mm) / var(--ofv-ofd-page-height, 297mm);
  min-width: 0;
  margin: 0;
}

.ofv-ofd.is-ofd-rotated-sideways .ofv-ofd-page {
  width: calc(var(--ofv-ofd-page-height, 297mm) * var(--ofv-ofd-zoom));
  aspect-ratio: var(--ofv-ofd-page-height, 297mm) / var(--ofv-ofd-page-width, 210mm);
}

.ofv-ofd-page svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: none;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  transform: rotate(var(--ofv-ofd-rotation));
  transform-origin: center;
}

.ofv-ofd-page svg {
  fill: revert;
  stroke: revert;
  stroke-linecap: revert;
  stroke-linejoin: revert;
  stroke-width: revert;
}

.ofv-model-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 360px;
  background: var(--ofv-bg);
}

.ofv-model-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.ofv-model-message {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  max-width: min(520px, calc(100% - 24px));
  padding: 8px 10px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--ofv-surface) 92%, transparent);
  color: var(--ofv-text);
  font-size: 13px;
  line-height: 1.5;
}

.ofv-model-measure {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  width: max-content;
  min-width: min(180px, calc(100% - 24px));
  max-width: min(260px, calc(100% - 24px));
  padding: 10px 12px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--ofv-surface) 92%, transparent);
  color: var(--ofv-text);
  box-shadow: var(--ofv-shadow);
}

.ofv-model-materials {
  position: absolute;
  z-index: 1;
  top: 190px;
  right: 12px;
  width: max-content;
  min-width: min(180px, calc(100% - 24px));
  max-width: min(260px, calc(100% - 24px));
  padding: 10px 12px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--ofv-surface) 92%, transparent);
  color: var(--ofv-text);
  box-shadow: var(--ofv-shadow);
}

.ofv-model-measure strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.ofv-model-materials strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.ofv-model-measure dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 12px;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.ofv-model-materials dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 12px;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.ofv-model-measure dt {
  color: var(--ofv-text-muted);
}

.ofv-model-materials dt {
  color: var(--ofv-text-muted);
}

.ofv-model-measure dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ofv-model-materials dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

@media (max-width: 640px) {
  .ofv-model-materials {
    top: auto;
    right: 12px;
    bottom: 12px;
  }
}

/* Archive / Zip layout styling */
.ofv-archive {
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.ofv-archive-layout {
  --ofv-archive-sidebar-expanded: 320px;
  --ofv-archive-sidebar-collapsed: 56px;
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  background: var(--ofv-surface);
  min-height: 360px;
}

.ofv-archive-sidebar {
  width: var(--ofv-archive-sidebar-expanded);
  flex: 0 0 var(--ofv-archive-sidebar-expanded);
  min-width: 0;
  max-width: 100%;
  border-right: 1px solid var(--ofv-border);
  overflow: hidden;
  position: relative;
  z-index: 2;
  color: var(--ofv-text);
  background: var(--ofv-surface-muted);
  transition:
    flex-basis 0.2s ease,
    width 0.2s ease,
    max-width 0.2s ease;
}

.ofv-archive-layout.is-sidebar-collapsed .ofv-archive-sidebar {
  flex-basis: var(--ofv-archive-sidebar-collapsed);
  width: var(--ofv-archive-sidebar-collapsed);
  max-width: var(--ofv-archive-sidebar-collapsed);
}

.ofv-archive-sidebar-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--ofv-surface-muted);
}

.ofv-archive-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ofv-border);
  font-weight: bold;
  font-size: 14px;
  color: var(--ofv-text);
  background: var(--ofv-surface);
}

.ofv-archive-header-title {
  min-width: 0;
  overflow: hidden;
  opacity: 1;
  text-overflow: ellipsis;
  transition: opacity 0.12s ease;
  white-space: nowrap;
}

.ofv-archive-sidebar-toggle {
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  color: var(--ofv-text);
  background: var(--ofv-surface-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.ofv-archive-sidebar-toggle:hover,
.ofv-archive-sidebar-toggle:focus-visible {
  background: var(--ofv-button-hover);
}

.ofv-archive-sidebar-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.ofv-archive-tree {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.ofv-archive-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  overscroll-behavior: contain;
  position: relative;
  background: var(--ofv-bg);
}

.ofv-archive-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  font: inherit;
  color: var(--ofv-text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  user-select: none;
  gap: 8px;
  text-align: left;
  transition: background 0.15s ease;
}

.ofv-archive-layout.is-sidebar-collapsed .ofv-archive-item {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
}

.ofv-archive-item:hover,
.ofv-archive-item:focus-visible {
  background: var(--ofv-button-hover);
}

.ofv-archive-item:focus-visible {
  outline: 2px solid var(--ofv-accent);
  outline-offset: -2px;
}

.ofv-archive-item.is-active {
  background: var(--ofv-button-hover);
  font-weight: bold;
  border-left: 3px solid var(--ofv-text);
  padding-left: 13px;
}

.ofv-archive-layout.is-sidebar-collapsed .ofv-archive-item.is-active {
  padding-left: 0;
  border-left-width: 0;
  box-shadow: inset 3px 0 0 var(--ofv-text);
}

.ofv-archive-item-icon {
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  width: 20px;
  text-align: center;
  font-size: 14px;
}

.ofv-archive-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  opacity: 1;
  text-overflow: ellipsis;
  transition: opacity 0.12s ease;
  white-space: nowrap;
}

.ofv-archive-layout.is-sidebar-collapsed .ofv-archive-header {
  justify-content: center;
  padding-right: 0;
  padding-left: 0;
}

.ofv-archive-layout.is-sidebar-collapsed .ofv-archive-header-title,
.ofv-archive-layout.is-sidebar-collapsed .ofv-archive-item-name {
  flex: 0 1 0;
  width: 0;
  opacity: 0;
}

.ofv-archive-layout.is-sidebar-collapsed .ofv-archive-tree {
  overflow: hidden;
}

@container (max-width: 520px) {
  .ofv-archive-layout {
    --ofv-archive-sidebar-expanded: min(280px, 72cqw);
    --ofv-archive-sidebar-collapsed: 48px;
  }

  .ofv-archive-sidebar {
    flex: 0 0 var(--ofv-archive-sidebar-expanded);
    width: var(--ofv-archive-sidebar-expanded);
    max-width: var(--ofv-archive-sidebar-expanded);
    height: 100%;
    min-height: 0;
  }

  .ofv-archive-header {
    min-height: 48px;
    padding: 9px;
  }

  .ofv-archive-main {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 0;
  }

  .ofv-archive-info {
    justify-content: flex-start;
    max-width: 100%;
    margin: 0;
    padding: 16px;
  }
}

@container (max-width: 360px) {
  .ofv-archive-layout {
    --ofv-archive-sidebar-expanded: min(248px, 78cqw);
    --ofv-archive-sidebar-collapsed: 44px;
  }

  .ofv-archive-sidebar {
    flex-basis: var(--ofv-archive-sidebar-expanded);
    width: var(--ofv-archive-sidebar-expanded);
    max-width: var(--ofv-archive-sidebar-expanded);
  }

  .ofv-archive-header {
    min-height: 44px;
    padding: 7px;
  }

  .ofv-archive-sidebar-toggle {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }

  .ofv-archive-item {
    gap: 6px;
    padding: 7px 10px;
  }

  .ofv-archive-item.is-active {
    padding-left: 7px;
  }

  .ofv-archive-layout.is-sidebar-collapsed .ofv-archive-item.is-active {
    padding-left: 0;
  }
}

.ofv-archive-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--ofv-text-muted);
  font-size: 14px;
  gap: 12px;
}

.ofv-archive-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--ofv-border);
  border-top-color: var(--ofv-text);
  border-radius: 50%;
  animation: ofv-spin 1s linear infinite;
}

@keyframes ofv-spin {
  to { transform: rotate(360deg); }
}

.ofv-archive-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: 40px;
  color: var(--ofv-text);
  max-width: 600px;
  margin: auto;
}

.ofv-archive-info h3 {
  margin: 0 0 16px;
  font-size: 20px;
  border-bottom: 1px solid var(--ofv-border);
  padding-bottom: 8px;
}

.ofv-archive-info-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
}

.ofv-archive-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  min-width: 0;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--ofv-border);
  font-size: 13px;
  line-height: 1.45;
}

.ofv-archive-summary dt {
  margin: 0;
  color: var(--ofv-text-muted);
  font-weight: 600;
}

.ofv-archive-summary dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.ofv-archive-probe-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 16px;
  margin: 12px 0;
}

.ofv-archive-probe-table {
  margin-top: 12px;
}

/* Email specific styles */
.ofv-email-attachments {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
}

.ofv-email-mbox-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 16px;
  margin-bottom: 12px;
}

.ofv-email-mbox-table {
  margin-top: 8px;
}

.ofv-email-attachment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 12px;
  background: var(--ofv-surface-muted);
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ofv-text);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ofv-email-attachment-item:hover {
  background: var(--ofv-button-hover);
  border-color: var(--ofv-text-muted);
}

.ofv-email-body-iframe {
  width: 100%;
  max-width: 100%;
  border: none;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: inset 0 0 2px rgba(0,0,0,0.05);
}

/* GIS / Map Visualization Styles */
.ofv-gis-viewer {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 320px;
  overflow: hidden;
}

.ofv-gis-summary {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ofv-border);
  background: var(--ofv-surface);
  color: var(--ofv-text-muted);
  font-size: 12px;
}

.ofv-gis-summary > span {
  display: inline-flex;
  gap: 5px;
  min-width: 0;
}

.ofv-gis-summary strong {
  color: var(--ofv-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ofv-map-stage {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 280px;
  position: relative;
  background: var(--ofv-bg);
  overflow: hidden;
}

.ofv-map-stage .leaflet-container,
.ofv-map-stage.leaflet-container {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 280px;
  background: var(--ofv-bg);
}

.ofv-map-stage .leaflet-pane,
.ofv-map-stage .leaflet-tile,
.ofv-map-stage .leaflet-marker-icon,
.ofv-map-stage .leaflet-marker-shadow,
.ofv-map-stage .leaflet-tile-container,
.ofv-map-stage .leaflet-pane > svg,
.ofv-map-stage .leaflet-pane > canvas,
.ofv-map-stage.leaflet-container .leaflet-pane,
.ofv-map-stage.leaflet-container .leaflet-tile,
.ofv-map-stage.leaflet-container .leaflet-marker-icon,
.ofv-map-stage.leaflet-container .leaflet-marker-shadow,
.ofv-map-stage.leaflet-container .leaflet-tile-container,
.ofv-map-stage.leaflet-container .leaflet-pane > svg,
.ofv-map-stage.leaflet-container .leaflet-pane > canvas {
  position: absolute;
  left: 0;
  top: 0;
}

.ofv-map-stage .leaflet-container,
.ofv-map-stage.leaflet-container {
  overflow: hidden;
}

.ofv-map-stage .leaflet-tile,
.ofv-map-stage .leaflet-marker-icon,
.ofv-map-stage .leaflet-marker-shadow,
.ofv-map-stage.leaflet-container .leaflet-tile,
.ofv-map-stage.leaflet-container .leaflet-marker-icon,
.ofv-map-stage.leaflet-container .leaflet-marker-shadow {
  user-select: none;
  -webkit-user-drag: none;
}

.ofv-map-stage .leaflet-overlay-pane svg,
.ofv-map-stage.leaflet-container .leaflet-overlay-pane svg {
  width: auto;
  height: auto;
  pointer-events: none;
}

.ofv-map-stage .leaflet-interactive,
.ofv-map-stage.leaflet-container .leaflet-interactive {
  pointer-events: auto;
}

.ofv-map-stage .leaflet-map-pane,
.ofv-map-stage.leaflet-container .leaflet-map-pane {
  z-index: 400;
}

.ofv-map-stage .leaflet-tile-pane,
.ofv-map-stage.leaflet-container .leaflet-tile-pane {
  z-index: 200;
}

.ofv-map-stage .leaflet-overlay-pane,
.ofv-map-stage.leaflet-container .leaflet-overlay-pane {
  z-index: 400;
}

.ofv-map-stage .leaflet-shadow-pane,
.ofv-map-stage.leaflet-container .leaflet-shadow-pane {
  z-index: 500;
}

.ofv-map-stage .leaflet-marker-pane,
.ofv-map-stage.leaflet-container .leaflet-marker-pane {
  z-index: 600;
}

.ofv-map-stage .leaflet-tooltip-pane,
.ofv-map-stage.leaflet-container .leaflet-tooltip-pane {
  z-index: 650;
}

.ofv-map-stage .leaflet-popup-pane,
.ofv-map-stage.leaflet-container .leaflet-popup-pane {
  z-index: 700;
}

.ofv-map-stage .leaflet-control,
.ofv-map-stage.leaflet-container .leaflet-control {
  position: relative;
  z-index: 800;
  pointer-events: auto;
}

.ofv-map-empty {
  position: absolute;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
  color: var(--ofv-text-muted);
  pointer-events: none;
}

.ofv-map-empty strong {
  color: var(--ofv-text);
  font-size: 14px;
}

.ofv-map-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 450;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: min(280px, calc(100% - 24px));
  padding: 8px 10px;
  border: 1px solid rgba(225, 29, 72, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #475569;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  font-size: 12px;
  pointer-events: none;
}

.ofv-map-legend strong {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111827;
  font-size: 13px;
}

.ofv-map-legend strong::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 4px;
  border-radius: 999px;
  background: #e11d48;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 0 5px rgba(225, 29, 72, 0.24);
}

.ofv-map-stage .ofv-map-feature {
  filter: drop-shadow(0 1px 0 #ffffff) drop-shadow(0 0 5px rgba(225, 29, 72, 0.82));
}

.ofv-map-stage .ofv-map-point {
  filter: drop-shadow(0 0 0 #ffffff) drop-shadow(0 0 8px rgba(225, 29, 72, 0.95));
}

.ofv-map-stage .ofv-map-tooltip {
  border: 1px solid rgba(225, 29, 72, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

/* Premium custom Leaflet map controls styling */
.ofv-map-stage .leaflet-bar {
  border: 1px solid var(--ofv-border) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.ofv-map-stage .leaflet-bar a {
  background-color: var(--ofv-surface) !important;
  color: var(--ofv-text) !important;
  border-bottom: 1px solid var(--ofv-border) !important;
}

.ofv-map-stage .leaflet-bar a:hover {
  background-color: var(--ofv-button-hover) !important;
}

/* Elegant feature popup table styling */
.ofv-map-popup {
  font-family: inherit;
  color: var(--ofv-text);
  min-width: 0;
  max-width: 280px;
}

.ofv-map-popup h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--ofv-border);
  padding-bottom: 4px;
}

.ofv-map-popup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.ofv-map-popup-table tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.ofv-map-popup-table tr:last-child {
  border-bottom: none;
}

.ofv-map-popup-key {
  font-weight: 600;
  color: var(--ofv-text-muted);
  padding: 4px 8px 4px 0;
  vertical-align: top;
  white-space: nowrap;
}

.ofv-map-popup-val {
  padding: 4px 0;
  word-break: break-word;
}

/* Code container styling */
.ofv-code-container {
  --ofv-text-zoom: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--ofv-surface);
}

.ofv-code-header {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  min-width: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ofv-border);
  background: var(--ofv-surface);
}

.ofv-code-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ofv-code-title strong {
  overflow: hidden;
  color: var(--ofv-text);
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ofv-code-title span {
  color: var(--ofv-text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.ofv-code-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.ofv-code-status {
  flex: 0 1 96px;
  min-width: 0;
  overflow: hidden;
  color: var(--ofv-text-muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ofv-code-action {
  flex: 0 0 auto;
  min-height: 30px;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--ofv-surface-muted);
  color: var(--ofv-text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
}

.ofv-code-action:hover {
  background: var(--ofv-button-hover);
}

.ofv-code-action:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ofv-code-action[aria-pressed="true"] {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.ofv-theme-dark .ofv-code-action[aria-pressed="true"] {
  color: #93c5fd;
}

.ofv-lrc-modebar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 8px 14px;
  border-bottom: 1px solid var(--ofv-border);
  background: var(--ofv-surface-muted);
}

.ofv-lrc-mode-switch {
  display: inline-flex;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
  background: var(--ofv-surface);
}

.ofv-lrc-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-height: 30px;
  border: 0;
  border-right: 1px solid var(--ofv-border);
  padding: 0;
  background: transparent;
  color: var(--ofv-text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
}

.ofv-lrc-mode-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.ofv-lrc-mode-button:last-child {
  border-right: 0;
}

.ofv-lrc-mode-button:hover {
  background: var(--ofv-button-hover);
  color: var(--ofv-text);
}

.ofv-lrc-mode-button[aria-selected="true"] {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-weight: 600;
}

.ofv-theme-dark .ofv-lrc-mode-button[aria-selected="true"] {
  color: #93c5fd;
}

.ofv-lrc-mode-button:focus-visible,
.ofv-code-action:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.ofv-lrc-annotated,
.ofv-lrc-display {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.ofv-lrc-annotated[hidden],
.ofv-lrc-display[hidden] {
  display: none;
}

.ofv-lrc-annotated {
  background: var(--ofv-surface-muted);
}

.ofv-lrc-annotated-table {
  min-width: min(100%, 520px);
  padding: 10px 0 28px;
  font-size: calc(14px * var(--ofv-text-zoom));
}

.ofv-lrc-annotated-row {
  display: grid;
  grid-template-columns: minmax(116px, max-content) minmax(0, 1fr);
  min-width: max-content;
  border-bottom: 1px solid color-mix(in srgb, var(--ofv-border) 65%, transparent);
}

.ofv-lrc-annotated-row.is-metadata {
  background: color-mix(in srgb, var(--ofv-surface) 82%, transparent);
}

.ofv-lrc-annotated-row.is-secondary .ofv-lrc-annotated-gutter,
.ofv-lrc-annotated-row.is-secondary .ofv-lrc-meta-value {
  padding-block: 7px;
  font-size: calc(11px * var(--ofv-text-zoom));
  line-height: 1.35;
}

.ofv-lrc-annotated-row.is-title .ofv-lrc-annotated-gutter,
.ofv-lrc-annotated-row.is-title .ofv-lrc-meta-value {
  padding-block: 14px;
}

.ofv-lrc-annotated-row.is-title .ofv-lrc-meta-value {
  color: var(--ofv-text);
  font-size: calc(19px * var(--ofv-text-zoom));
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.ofv-lrc-annotated-gutter {
  position: sticky;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
  padding: 10px 12px 10px 14px;
  border-right: 1px solid var(--ofv-border);
  background: color-mix(in srgb, var(--ofv-surface-muted) 94%, transparent);
  color: var(--ofv-text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: calc(11px * var(--ofv-text-zoom));
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}

.ofv-lrc-annotated-row.is-metadata .ofv-lrc-annotated-gutter {
  align-items: center;
  background: var(--ofv-surface);
}

.ofv-lrc-annotated-row.is-lyric .ofv-lrc-annotated-gutter {
  align-items: center;
}

.ofv-lrc-times {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.ofv-lrc-time {
  white-space: nowrap;
}

.ofv-lrc-meta-label {
  color: var(--ofv-text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: calc(10px * var(--ofv-text-zoom));
  font-weight: 600;
  letter-spacing: 0.045em;
  line-height: 1.35;
  text-transform: uppercase;
}

.ofv-lrc-role {
  position: absolute;
  z-index: 1;
  color: var(--ofv-text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: calc(8px * var(--ofv-text-zoom));
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  text-transform: uppercase;
}

.ofv-lrc-meta-value,
.ofv-lrc-annotated-text {
  min-width: 0;
  padding: 10px 18px;
  color: var(--ofv-text);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.ofv-lrc-meta-value {
  color: var(--ofv-text-muted);
}

.ofv-lrc-timed-word {
  position: relative;
  z-index: 0;
  display: inline-block;
  line-height: 1;
  ruby-position: over;
  vertical-align: baseline;
}

.ofv-lrc-timed-word:hover,
.ofv-lrc-timed-word:focus-visible {
  z-index: 2;
}

.ofv-lrc-timed-word rt {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: max-content;
  color: var(--ofv-text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.58em;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 2px));
  user-select: none;
}

.ofv-lrc-word-text {
  display: inline-block;
  line-height: 1;
  text-decoration: none;
}

.ofv-lrc-word-separator {
  white-space: pre;
}

.ofv-lrc-timed-word:hover .ofv-lrc-word-text,
.ofv-lrc-timed-word:focus-visible .ofv-lrc-word-text {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.ofv-lrc-timed-word:hover rt,
.ofv-lrc-timed-word:focus-visible rt {
  opacity: 1;
}

.ofv-lrc-timed-word:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.ofv-lrc-annotated-content,
.ofv-lrc-display-content {
  min-width: 0;
}

.ofv-lrc-annotated-text {
  position: relative;
}

.ofv-lrc-annotated-text > .ofv-lrc-role {
  top: calc(10px + 0.15em);
  left: 6px;
}

.ofv-lrc-display {
  background: var(--ofv-surface-muted);
}

.ofv-lrc-display-page {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0 72px;
  color: var(--ofv-text);
  font-size: 16px;
}

.ofv-lrc-display-header {
  margin-bottom: 30px;
}

.ofv-lrc-display-header h2 {
  margin: 0;
  color: var(--ofv-text);
  font-size: calc(30px * var(--ofv-text-zoom));
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.ofv-lrc-display-artist {
  margin: 9px 0 0;
  color: var(--ofv-text-muted);
  font-size: calc(13px * var(--ofv-text-zoom));
  line-height: 1.5;
}

.ofv-lrc-display-credits {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 12px;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  color: var(--ofv-text-muted);
  font-size: calc(11px * var(--ofv-text-zoom));
  line-height: 1.45;
}

.ofv-lrc-display-credits dt {
  font-weight: 600;
}

.ofv-lrc-display-credits dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.ofv-lrc-display-track-info {
  margin-top: 12px;
}

.ofv-lrc-display-lyrics {
  display: grid;
  gap: 10px;
}

.ofv-lrc-display-line {
  position: relative;
  margin: 0;
  color: var(--ofv-text);
  font-size: calc(1em * var(--ofv-text-zoom));
  letter-spacing: 0.005em;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.ofv-lrc-display-line > .ofv-lrc-role {
  top: 0.4em;
  left: -12px;
}

.ofv-lrc-display-file-info {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--ofv-border);
}

.ofv-lrc-empty {
  margin: 0;
  padding: 28px 18px;
  color: var(--ofv-text-muted);
  font-size: 13px;
}

@container (max-width: 520px) {
  .ofv-lrc-modebar {
    align-items: flex-start;
    flex-direction: column;
  }

  .ofv-lrc-mode-switch {
    width: 100%;
  }

  .ofv-lrc-mode-button {
    flex: 1 0 auto;
  }

  .ofv-lrc-annotated-row {
    grid-template-columns: minmax(82px, max-content) minmax(0, 1fr);
  }

  .ofv-lrc-annotated-gutter {
    padding-inline: 8px;
  }

  .ofv-lrc-meta-value,
  .ofv-lrc-annotated-text {
    padding-inline: 12px;
  }

  .ofv-lrc-annotated-text > .ofv-lrc-role {
    left: 2px;
  }

  .ofv-lrc-display-page {
    width: calc(100% - 28px);
    padding-top: 32px;
  }

  .ofv-lrc-display-header h2 {
    font-size: calc(25px * var(--ofv-text-zoom));
  }
}

.ofv-code-notice {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-bottom: 1px solid var(--ofv-border);
  background: rgba(245, 158, 11, 0.12);
  color: var(--ofv-text);
  font-size: 12px;
  line-height: 1.45;
}

.ofv-text-structure {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
  padding: 8px 14px;
  border-bottom: 1px solid var(--ofv-border);
  background: var(--ofv-surface-muted);
  color: var(--ofv-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ofv-text-structure > span {
  display: inline-flex;
  gap: 5px;
  min-width: 0;
}

.ofv-text-structure strong {
  color: var(--ofv-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ofv-code-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  flex: 1 1 auto;
  position: relative;
  isolation: isolate;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: var(--ofv-surface-muted);
}

.ofv-code-body[hidden] {
  display: none;
}

.ofv-code-gutter {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: calc(48px * var(--ofv-text-zoom, 1));
  margin: 0;
  padding: calc(18px * var(--ofv-text-zoom, 1)) calc(12px * var(--ofv-text-zoom, 1));
  border-right: 1px solid var(--ofv-border);
  background: var(--ofv-surface);
  box-shadow: 8px 0 14px -14px rgba(15, 23, 42, 0.65);
  color: var(--ofv-text-muted);
  font-family: var(--ofv-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  font-size: calc(13px * var(--ofv-text-zoom, 1));
  line-height: 1.6;
  text-align: right;
  user-select: none;
}

.ofv-code-container pre {
  position: relative;
  z-index: 0;
  margin: 0;
  padding: calc(18px * var(--ofv-text-zoom, 1)) calc(20px * var(--ofv-text-zoom, 1));
  max-width: 100%;
  min-width: max-content;
  background: transparent !important;
  color: var(--ofv-text);
  font-family: var(--ofv-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  font-size: calc(13px * var(--ofv-text-zoom, 1));
  line-height: 1.6;
}

.ofv-code-container pre[class*="language-"] {
  overflow: visible;
}

.ofv-code-container code {
  white-space: pre;
}

.ofv-code-container.is-wrapped .ofv-code-body {
  overflow-x: hidden;
}

.ofv-code-container.is-wrapped pre[class*="language-"] {
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.ofv-code-container.is-wrapped code {
  white-space: pre-wrap;
  word-break: break-word;
}

.ofv-code-container .token.comment,
.ofv-code-container .token.prolog,
.ofv-code-container .token.doctype,
.ofv-code-container .token.cdata,
.ofv-markdown-body pre .token.comment,
.ofv-markdown-body pre .token.prolog,
.ofv-markdown-body pre .token.doctype,
.ofv-markdown-body pre .token.cdata {
  color: #6b7280;
}

.ofv-code-container .token.punctuation,
.ofv-markdown-body pre .token.punctuation {
  color: #64748b;
}

.ofv-code-container .token.namespace,
.ofv-markdown-body pre .token.namespace {
  opacity: 0.72;
}

.ofv-code-container .token.property,
.ofv-code-container .token.tag,
.ofv-code-container .token.boolean,
.ofv-code-container .token.number,
.ofv-code-container .token.constant,
.ofv-code-container .token.symbol,
.ofv-code-container .token.deleted,
.ofv-markdown-body pre .token.property,
.ofv-markdown-body pre .token.tag,
.ofv-markdown-body pre .token.boolean,
.ofv-markdown-body pre .token.number,
.ofv-markdown-body pre .token.constant,
.ofv-markdown-body pre .token.symbol,
.ofv-markdown-body pre .token.deleted {
  color: #b45309;
}

.ofv-code-container .token.selector,
.ofv-code-container .token.attr-name,
.ofv-code-container .token.string,
.ofv-code-container .token.char,
.ofv-code-container .token.builtin,
.ofv-code-container .token.inserted,
.ofv-markdown-body pre .token.selector,
.ofv-markdown-body pre .token.attr-name,
.ofv-markdown-body pre .token.string,
.ofv-markdown-body pre .token.char,
.ofv-markdown-body pre .token.builtin,
.ofv-markdown-body pre .token.inserted {
  color: #15803d;
}

.ofv-code-container .token.operator,
.ofv-code-container .token.entity,
.ofv-code-container .token.url,
.ofv-code-container .language-css .token.string,
.ofv-code-container .style .token.string,
.ofv-markdown-body pre .token.operator,
.ofv-markdown-body pre .token.entity,
.ofv-markdown-body pre .token.url,
.ofv-markdown-body pre .language-css .token.string,
.ofv-markdown-body pre .style .token.string {
  color: #0369a1;
}

.ofv-code-container .token.atrule,
.ofv-code-container .token.attr-value,
.ofv-code-container .token.keyword,
.ofv-markdown-body pre .token.atrule,
.ofv-markdown-body pre .token.attr-value,
.ofv-markdown-body pre .token.keyword {
  color: #7c3aed;
}

.ofv-code-container .token.function,
.ofv-code-container .token.class-name,
.ofv-markdown-body pre .token.function,
.ofv-markdown-body pre .token.class-name {
  color: #2563eb;
}

.ofv-code-container .token.regex,
.ofv-code-container .token.important,
.ofv-code-container .token.variable,
.ofv-markdown-body pre .token.regex,
.ofv-markdown-body pre .token.important,
.ofv-markdown-body pre .token.variable {
  color: #be123c;
}

.ofv-code-container .token.important,
.ofv-code-container .token.bold,
.ofv-markdown-body pre .token.important,
.ofv-markdown-body pre .token.bold {
  font-weight: 600;
}

.ofv-code-container .token.italic,
.ofv-markdown-body pre .token.italic {
  font-style: italic;
}

.ofv-code-container .token.entity,
.ofv-markdown-body pre .token.entity {
  cursor: help;
}

.ofv-root.ofv-theme-dark .ofv-code-container .token.comment,
.ofv-root.ofv-theme-dark .ofv-code-container .token.prolog,
.ofv-root.ofv-theme-dark .ofv-code-container .token.doctype,
.ofv-root.ofv-theme-dark .ofv-code-container .token.cdata,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.comment,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.prolog,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.doctype,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.cdata {
  color: #94a3b8;
}

.ofv-root.ofv-theme-dark .ofv-code-container .token.punctuation,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.punctuation {
  color: #cbd5e1;
}

.ofv-root.ofv-theme-dark .ofv-code-container .token.property,
.ofv-root.ofv-theme-dark .ofv-code-container .token.tag,
.ofv-root.ofv-theme-dark .ofv-code-container .token.boolean,
.ofv-root.ofv-theme-dark .ofv-code-container .token.number,
.ofv-root.ofv-theme-dark .ofv-code-container .token.constant,
.ofv-root.ofv-theme-dark .ofv-code-container .token.symbol,
.ofv-root.ofv-theme-dark .ofv-code-container .token.deleted,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.property,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.tag,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.boolean,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.number,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.constant,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.symbol,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.deleted {
  color: #fbbf24;
}

.ofv-root.ofv-theme-dark .ofv-code-container .token.selector,
.ofv-root.ofv-theme-dark .ofv-code-container .token.attr-name,
.ofv-root.ofv-theme-dark .ofv-code-container .token.string,
.ofv-root.ofv-theme-dark .ofv-code-container .token.char,
.ofv-root.ofv-theme-dark .ofv-code-container .token.builtin,
.ofv-root.ofv-theme-dark .ofv-code-container .token.inserted,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.selector,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.attr-name,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.string,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.char,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.builtin,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.inserted {
  color: #86efac;
}

.ofv-root.ofv-theme-dark .ofv-code-container .token.operator,
.ofv-root.ofv-theme-dark .ofv-code-container .token.entity,
.ofv-root.ofv-theme-dark .ofv-code-container .token.url,
.ofv-root.ofv-theme-dark .ofv-code-container .language-css .token.string,
.ofv-root.ofv-theme-dark .ofv-code-container .style .token.string,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.operator,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.entity,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.url,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .language-css .token.string,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .style .token.string {
  color: #7dd3fc;
}

.ofv-root.ofv-theme-dark .ofv-code-container .token.atrule,
.ofv-root.ofv-theme-dark .ofv-code-container .token.attr-value,
.ofv-root.ofv-theme-dark .ofv-code-container .token.keyword,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.atrule,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.attr-value,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.keyword {
  color: #c4b5fd;
}

.ofv-root.ofv-theme-dark .ofv-code-container .token.function,
.ofv-root.ofv-theme-dark .ofv-code-container .token.class-name,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.function,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.class-name {
  color: #93c5fd;
}

.ofv-root.ofv-theme-dark .ofv-code-container .token.regex,
.ofv-root.ofv-theme-dark .ofv-code-container .token.important,
.ofv-root.ofv-theme-dark .ofv-code-container .token.variable,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.regex,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.important,
.ofv-root.ofv-theme-dark .ofv-markdown-body pre .token.variable {
  color: #fda4af;
}

@media (max-width: 640px) {
  .ofv-code-header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .ofv-code-actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .ofv-code-status {
    flex-basis: 88px;
    text-align: left;
  }
}

/* Markdown container styling */
.ofv-markdown-body {
  --ofv-markdown-zoom: 1;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  overflow: auto;
  padding: 32px;
  box-sizing: border-box;
  background: var(--ofv-surface);
  color: var(--ofv-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 15px;
  line-height: 1.65;
  word-wrap: break-word;
}

.ofv-markdown-content {
  zoom: var(--ofv-markdown-zoom, 1);
}

/* Light / Dark adjustments for Markdown */
.ofv-root.ofv-theme-dark .ofv-markdown-body {
  background: var(--ofv-surface-muted);
}

.ofv-markdown-body h1,
.ofv-markdown-body h2,
.ofv-markdown-body h3,
.ofv-markdown-body h4,
.ofv-markdown-body h5,
.ofv-markdown-body h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ofv-text);
}

.ofv-markdown-body h1 { font-size: 2em; padding-bottom: .3em; border-bottom: 1px solid var(--ofv-border); }
.ofv-markdown-body h2 { font-size: 1.5em; padding-bottom: .3em; border-bottom: 1px solid var(--ofv-border); }
.ofv-markdown-body h3 { font-size: 1.25em; }
.ofv-markdown-body h4 { font-size: 1em; }

.ofv-markdown-body p,
.ofv-markdown-body blockquote,
.ofv-markdown-body ul,
.ofv-markdown-body ol,
.ofv-markdown-body dl,
.ofv-markdown-body table,
.ofv-markdown-body pre {
  margin-top: 0;
  margin-bottom: 16px;
}

.ofv-markdown-body a {
  color: #2563eb;
  text-decoration: none;
}

.ofv-markdown-body a:hover {
  text-decoration: underline;
}

.ofv-root.ofv-theme-dark .ofv-markdown-body a {
  color: #60a5fa;
}

.ofv-markdown-body blockquote {
  padding: 0 1em;
  color: var(--ofv-text-muted);
  border-left: .25em solid var(--ofv-border);
  margin-left: 0;
  margin-right: 0;
}

.ofv-markdown-body ul,
.ofv-markdown-body ol {
  padding-left: 2em;
}

.ofv-markdown-body ul {
  list-style-type: disc;
}

.ofv-markdown-body ol {
  list-style-type: decimal;
}

.ofv-markdown-body li + li {
  margin-top: .25em;
}

.ofv-markdown-body code {
  padding: .2em .4em;
  margin: 0;
  font-size: 85%;
  background-color: var(--ofv-surface-muted);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ofv-root.ofv-theme-dark .ofv-markdown-body code {
  background-color: rgba(255, 255, 255, 0.08);
}

.ofv-markdown-body pre {
  max-width: 100%;
  padding: 16px;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
  color: var(--ofv-text);
  background-color: var(--ofv-surface-muted);
  border-radius: 6px;
}

.ofv-root.ofv-theme-dark .ofv-markdown-body pre {
  background-color: rgba(0, 0, 0, 0.2);
}

.ofv-markdown-body pre code {
  padding: 0;
  margin: 0;
  font-size: 100%;
  word-break: normal;
  white-space: pre;
  background: transparent !important;
  border: 0;
}

.ofv-markdown-body .ofv-mermaid,
.ofv-mermaid-file .ofv-mermaid {
  display: flex;
  justify-content: center;
  max-width: 100%;
  margin-top: 0;
  margin-bottom: 16px;
  padding: 16px;
  overflow-x: auto;
  background-color: #fff;
  border: 1px solid var(--ofv-border);
  border-radius: 6px;
}

.ofv-markdown-body .ofv-mermaid svg,
.ofv-mermaid-file .ofv-mermaid svg {
  max-width: 100%;
  height: auto;
}

/* Standalone mermaid file (.mmd / .mermaid) container */
.ofv-mermaid-file {
  --ofv-mermaid-zoom: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: auto;
  padding: 32px;
  box-sizing: border-box;
  background: var(--ofv-surface);
}

/* Zoom applies to an inner layer whose width is pinned by the zoom
   controller, so magnified diagrams overflow into the scroller instead
   of being re-fit to the container width. */
.ofv-mermaid-file .ofv-mermaid-zoom-layer {
  zoom: var(--ofv-mermaid-zoom, 1);
}

.ofv-mermaid-file .ofv-mermaid {
  margin-bottom: 0;
}

.ofv-root.ofv-theme-dark .ofv-mermaid-file {
  background: var(--ofv-surface-muted);
}

.ofv-markdown-body hr {
  height: .25em;
  padding: 0;
  margin: 24px 0;
  background-color: var(--ofv-border);
  border: 0;
}

.ofv-markdown-body table {
  border-spacing: 0;
  border-collapse: collapse;
  display: block;
  width: max-content;
  max-width: 100%;
  overflow: auto;
}

.ofv-markdown-body table th,
.ofv-markdown-body table td {
  padding: 6px 13px;
  border: 1px solid var(--ofv-border);
}

.ofv-markdown-body table tr {
  background-color: var(--ofv-surface);
}

.ofv-markdown-body table tr:nth-child(2n) {
  background-color: var(--ofv-surface-muted);
}

/* PDF lazy loading elements */
.ofv-pdf-page-wrapper {
  margin: 16px auto;
  min-width: 0;
  outline: 1px solid var(--ofv-border);
  outline-offset: -1px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.28);
  background-color: var(--ofv-surface);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}

.ofv-pdf-skeleton {
  font-size: 14px;
  color: var(--ofv-text-muted);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--ofv-surface-muted) 25%, var(--ofv-border) 37%, var(--ofv-surface-muted) 63%);
  background-size: 400% 100%;
  animation: ofv-skeleton-pulse 1.4s ease infinite;
}

@keyframes ofv-skeleton-pulse {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.ofv-pdf-error {
  color: #ef4444;
  font-weight: 500;
  font-size: 14px;
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  line-height: 1.6;
  background: color-mix(in srgb, #ef4444 8%, var(--ofv-surface));
  box-sizing: border-box;
}

.ofv-pdf-empty {
  position: absolute;
  inset: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1px solid color-mix(in srgb, #f59e0b 34%, var(--ofv-border));
  border-radius: 8px;
  background: color-mix(in srgb, #fef3c7 86%, transparent);
  color: #92400e;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  box-sizing: border-box;
}

/* PDF Text Layer styling */
.ofv-pdf-text-layer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  line-height: 1;
  pointer-events: none;
  user-select: text;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

.ofv-pdf-text-layer span {
  color: transparent;
  position: absolute;
  white-space: pre;
  line-height: 1;
  cursor: text;
  transform-origin: 0% 0%;
  pointer-events: auto;
}

.ofv-pdf-text-layer span::selection {
  background: rgba(59, 130, 246, 0.35); /* Premium blue highlight matching theme */
}

/* For Firefox support of selection background */
.ofv-pdf-text-layer span::-moz-selection {
  background: rgba(59, 130, 246, 0.35);
}
