﻿:root {
  color-scheme: dark;
  --bg: #182128;
  --panel: #2d353b;
  --panel-soft: #323b42;
  --panel-deep: #20282e;
  --line: rgba(207, 216, 222, 0.13);
  --line-strong: rgba(255, 179, 71, 0.38);
  --text: #d9dee2;
  --muted: #a8b2ba;
  --quiet: #7f8a92;
  --accent: #ffb347;
  --accent-strong: #d28a05;
  --tree-accent: #ffb347;
  --blue: #7fc3ff;
  --danger: #f27669;
  --shadow: rgba(0, 0, 0, 0.28);
}

/* Die UI- und Codeschriften liegen lokal vor. Damit hängt das erste saubere
 * Rendering weder vom Netz noch vom Zeitpunkt einer externen Font-Antwort ab. */
@font-face {
  font-family: "Source Sans 3";
  src: url("../assets/fonts/source-sans-3/SourceSans3-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 900;
  font-display: block;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../assets/fonts/source-sans-3/SourceSans3-Italic-Variable.ttf") format("truetype");
  font-style: italic;
  font-weight: 200 900;
  font-display: block;
}

@font-face {
  font-family: "Source Code Pro";
  src: url("../assets/fonts/source-code-pro/SourceCodePro-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 900;
  font-display: block;
}

@font-face {
  font-family: "Source Code Pro";
  src: url("../assets/fonts/source-code-pro/SourceCodePro-Italic-Variable.ttf") format("truetype");
  font-style: italic;
  font-weight: 200 900;
  font-display: block;
}

@font-face {
  font-family: "Roboto";
  src: url("../assets/fonts/roboto/Roboto-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
}

@font-face {
  font-family: "Roboto";
  src: url("../assets/fonts/roboto/Roboto-Italic-Variable.ttf") format("truetype");
  font-style: italic;
  font-weight: 100 900;
  font-display: block;
}

@font-face {
  font-family: "CMU Serif";
  src: url("../assets/fonts/cmu/cmunrm.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CMU Serif";
  src: url("../assets/fonts/cmu/cmunti.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "CMU Serif";
  src: url("../assets/fonts/cmu/cmunbx.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CMU Serif";
  src: url("../assets/fonts/cmu/cmunbi.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

body.typemap-theme-light {
  color-scheme: light;
  --bg: #f3efe6;
  --panel: rgba(255, 253, 248, 0.72);
  --panel-soft: rgba(255, 254, 250, 0.9);
  --panel-deep: #fbf8f1;
  --line: rgba(33, 54, 51, 0.14);
  --line-strong: rgba(33, 54, 51, 0.26);
  --text: #213633;
  --muted: #7a837d;
  --quiet: rgba(33, 54, 51, 0.48);
  --accent: #213633;
  --accent-strong: #3d504c;
  --tree-accent: #d28a05;
  --blue: #3d504c;
  --danger: #b85c52;
  --shadow: rgba(33, 54, 51, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

/* Die Artikelschrift wird lokal gebündelt, damit Browser für Fett und Kursiv
 * nicht auf eine ähnlich wirkende Ersatzschrift ausweichen. */
@font-face {
  font-family: "EB Garamond";
  src: url("../assets/fonts/eb-garamond/EBGaramond-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("../assets/fonts/eb-garamond/EBGaramond-Italic-Variable.ttf") format("truetype");
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "TypeMap EB Garamond Semibold";
  src: url("../assets/fonts/eb-garamond/EBGaramond-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "TypeMap EB Garamond Semibold";
  src: url("../assets/fonts/eb-garamond/EBGaramond-Italic-Variable.ttf") format("truetype");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-frame {
  position: relative;
  overflow: hidden;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 0;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 179, 71, 0.055), transparent 32%),
    linear-gradient(180deg, #182128 0%, #151c22 100%);
}

body.typemap-theme-light .app-frame {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.72), transparent 38%),
    linear-gradient(145deg, #fbf8f1 0%, #f3efe6 58%, #e8e2d8 100%);
}

body.typemap-theme-light .app-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(0deg, rgba(33, 54, 51, 0.018) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(33, 54, 51, 0.014) 0 1px, transparent 1px 12px);
  opacity: 0.56;
  pointer-events: none;
}

body.typemap-theme-light .preview-view,
body.typemap-theme-light .details-view {
  z-index: 1;
}

.preview-view,
.details-view {
  position: absolute;
  inset: 0;
  min-height: 0;
  transition: transform 240ms ease, opacity 240ms ease;
  will-change: transform, opacity;
}

.preview-view {
  padding: 0;
}

.app-frame.workspace-mode-preview .preview-view {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.app-frame.workspace-mode-preview .details-view {
  transform: translateY(6%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.app-frame.workspace-mode-details .preview-view {
  transform: translateY(-6%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.app-frame.workspace-mode-details .details-view {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 0;
  height: 82px;
  min-height: 82px;
  padding: 18px 18px 10px 20px;
  border-bottom: 1px solid var(--line);
  overflow: visible;
  z-index: 10;
}

body.typemap-theme-light .topbar {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.brand-mark,
.control-grid {
  display: flex;
  align-items: center;
}

.brand-plate {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  align-self: stretch;
  height: 54px;
  min-height: 54px;
  padding: 0 12px;
  z-index: 1;
}

.brand-mark {
  position: relative;
  gap: 12px;
  min-width: 0;
  color: var(--accent);
  z-index: 2;
  overflow: visible;
}

.brand-mark img {
  display: block;
  object-fit: contain;
}

.brand-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: 6px;
}

.brand-bird {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(75%) sepia(58%) saturate(889%) hue-rotate(340deg) brightness(104%) contrast(101%);
}

body.typemap-theme-light .brand-bird {
  filter: brightness(0) saturate(100%) invert(20%) sepia(18%) saturate(673%) hue-rotate(122deg) brightness(92%) contrast(90%);
  opacity: 0.93;
}

.brand-wordmark-text {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: currentColor;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.32rem, 2.05vw, 1.82rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: lowercase;
  text-shadow: none;
}

.type-menu-button,
.type-menu-close-button,
.control-grid button,
.secondary-button {
  border: 1px solid rgba(207, 216, 222, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.type-menu-button {
  width: 36px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-color: transparent;
  background: transparent;
  color: var(--accent);
  position: relative;
  border-radius: 9px;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.type-menu-button img {
  width: 28px;
  height: 28px;
  display: block;
  opacity: 0.94;
}

.theme-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.theme-toggle-button img {
  width: 23px;
  height: 23px;
}

.control-grid .topbar-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

.topbar-action-icon {
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.topbar-export-icon {
  mask-image: url("https://api.iconify.design/uil/export.svg");
  -webkit-mask-image: url("https://api.iconify.design/uil/export.svg");
}

.topbar-print-icon {
  mask-image: url("https://api.iconify.design/material-symbols/print-outline-rounded.svg");
  -webkit-mask-image: url("https://api.iconify.design/material-symbols/print-outline-rounded.svg");
}

.type-menu-close-button:hover,
.control-grid button:hover,
.secondary-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 179, 71, 0.08);
}

.type-menu-button:hover,
.type-menu-button[aria-expanded="true"] {
  border-color: rgba(255, 179, 71, 0.34);
  background: rgba(255, 179, 71, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.typemap-theme-light .type-menu-button:hover,
body.typemap-theme-light .type-menu-button[aria-expanded="true"] {
  border-color: rgba(33, 54, 51, 0.14);
  background: rgba(33, 54, 51, 0.055);
  box-shadow: none;
}

.control-grid {
  gap: 10px;
  height: 43px;
  min-height: 43px;
}

.topbar-search {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 3px;
  padding: 0;
}

body.typemap-theme-light .topbar-search .topbar-icon-button {
  color: #213633;
}

.topbar-search .topbar-icon-button:hover,
.topbar-search .topbar-icon-button:focus-visible,
.topbar-search .topbar-icon-button[aria-expanded="true"] {
  border-color: var(--line-strong);
  background: rgba(255, 179, 71, 0.08);
}

body.typemap-theme-light .topbar-search .topbar-icon-button:hover,
body.typemap-theme-light .topbar-search .topbar-icon-button:focus-visible,
body.typemap-theme-light .topbar-search .topbar-icon-button[aria-expanded="true"] {
  border-color: rgba(33, 54, 51, 0.2);
  background: rgba(33, 54, 51, 0.055);
}

.export-control {
  position: relative;
}

.control-grid button,
.secondary-button {
  min-height: 36px;
  padding: 7px 14px;
}

.export-menu {
  position: absolute;
  z-index: 24;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #252d33;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.export-menu[hidden] {
  display: none;
}

.export-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: start;
  width: 100%;
  min-height: 32px;
  padding: 6px 9px;
  border-color: transparent;
  background: transparent;
  text-align: left;
}

.file-format-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: var(--file-format-icon) center / contain no-repeat;
  mask: var(--file-format-icon) center / contain no-repeat;
}

.file-format-icon-markdown {
  --file-format-icon: url("https://api.iconify.design/material-symbols/markdown.svg");
}

.file-format-icon-html {
  --file-format-icon: url("https://api.iconify.design/material-symbols/html.svg");
}

.file-format-icon-png {
  --file-format-icon: url("https://api.iconify.design/material-symbols/file-png.svg");
}

.file-format-icon-json {
  --file-format-icon: url("https://api.iconify.design/devicon/json.svg");
}

.export-menu button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--accent);
}

.type-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.28);
}

.type-menu-overlay[hidden] {
  display: none;
}

.type-side-menu {
  position: fixed;
  z-index: 31;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(420px, calc(100vw - 28px));
  padding: 18px;
  background: #252d33;
  border-right: 1px solid var(--line);
  box-shadow: 22px 0 72px rgba(0, 0, 0, 0.36);
  transform: translateX(-100%);
  transition: transform 180ms ease;
}

body.typemap-theme-light .type-side-menu {
  background: rgba(255, 254, 250, 0.96);
  box-shadow: 22px 0 72px rgba(33, 54, 51, 0.13);
}

.type-side-menu.is-open {
  transform: translateX(0);
}

.type-side-menu-inner,
.type-menu-list,
.type-menu-popup,
.editor-section {
  display: flex;
  flex-direction: column;
}

.type-side-menu-inner {
  gap: 18px;
  height: 100%;
}

.type-menu-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.type-menu-head strong {
  color: var(--accent);
}

.type-menu-close-button {
  width: 36px;
  height: 36px;
}

.type-menu-list {
  gap: 10px;
  overflow: auto;
}

.type-menu-section-project {
  margin-top: auto;
}

.type-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.type-menu-item:hover,
.type-menu-item.is-active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.type-menu-icon {
  width: 19px;
  height: 19px;
}

.type-menu-popup {
  gap: 8px;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(24, 33, 40, 0.55);
}

body.typemap-theme-light .type-menu-popup {
  background: rgba(255, 253, 248, 0.72);
}

.type-menu-popup[hidden] {
  display: none;
}

.project-choice-list {
  display: grid;
  gap: 6px;
}

.project-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.project-choice:hover,
.project-choice[aria-current="page"] {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
}

body.typemap-theme-light .project-choice:hover,
body.typemap-theme-light .project-choice[aria-current="page"] {
  background: rgba(33, 54, 51, 0.055);
}

.project-choice[aria-current="page"]::after {
  content: "✓";
  color: var(--muted);
  font-weight: 700;
}

.type-stage {
  --type-stage-inline-padding: 40px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: calc(100% - 82px);
  min-height: 0;
  padding: 16px var(--type-stage-inline-padding) 54px;
  overflow: auto;
  container-type: inline-size;
  container-name: type-stage;
}

.preview-render-progress {
  position: fixed;
  z-index: 20;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 48px));
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--text);
  font-family: "Source Sans 3", Arial, sans-serif;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}

.preview-render-progress[hidden] {
  display: none;
}

.preview-render-progress progress {
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  accent-color: var(--accent);
}

.preview-canvas {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: min(1180px, 100%);
  min-height: max-content;
}

.preview-page {
  --preview-page-padding: clamp(34px, 5vw, 72px);
  --preview-side-gap: clamp(56px, 5.8vw, 66px);
  --preview-side-min-width: 220px;
  --preview-side-width: clamp(220px, 23vw, 310px);
  width: min(920px, 100%);
  min-height: min(560px, 100%);
  padding: var(--preview-page-padding);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.preview-page.is-empty {
  display: grid;
  place-items: center;
}

.preview-empty-state {
  margin: 0;
  color: var(--muted);
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 0.94rem;
  line-height: 1.5;
  text-align: center;
}

.preview-page.has-side-toc,
.preview-page.has-side-rail {
  width: min(920px, 100%);
}

.preview-side-toc {
  position: fixed;
  top: clamp(145px, 21vh, 220px);
  left: var(--preview-side-gap);
  width: var(--preview-side-width);
  display: grid;
  grid-template-rows: minmax(0, 1fr) 0;
  gap: 0;
  height: calc(100vh - clamp(210px, 30vh, 280px));
  min-height: 260px;
  padding-top: 0.22em;
  overflow: hidden;
  color: var(--muted);
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.28;
}

/* Randspalte und Satzspiegel verwenden dieselbe Lücke. Bei kleiner werdendem
   Fenster wird deshalb die Textfläche schmaler, nicht der geometrische Bezug
   zwischen Navigation und Text verschoben. */
@container type-stage (min-width: 981px) {
  .preview-canvas:has(.preview-page.has-side-rail) {
    justify-content: flex-start;
    width: 100%;
  }

  .preview-page.has-side-rail {
    --preview-side-text-offset: calc(
      var(--preview-side-gap) + var(--preview-side-gap) + var(--preview-side-width)
      - var(--type-stage-inline-padding) - var(--preview-page-padding)
    );
    width: min(920px, calc(100% - var(--preview-side-text-offset)));
    margin-left: var(--preview-side-text-offset);
  }
}

.preview-side-toc.has-footnotes {
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 2.6vh, 28px);
}

.preview-side-toc.has-footnotes.has-right-footnotes {
  grid-template-rows: minmax(0, 1fr) 0;
  gap: 0;
}

.preview-page.has-right-footnote-rail .preview-side-footnotes-section:not(.preview-side-footnotes-rail) {
  visibility: hidden;
  pointer-events: none;
}

.preview-side-toc-section,
.preview-side-footnotes-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.preview-side-toc-section.is-empty,
.preview-side-footnotes-section.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.preview-side-toc-title {
  margin-bottom: 0.55em;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.preview-side-toc-list {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.preview-side-toc-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.preview-side-footnotes-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.preview-side-footnotes-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.preview-side-footnotes-rail {
  position: fixed;
  top: clamp(145px, 21vh, 220px);
  right: var(--preview-right-rail-right, var(--preview-side-gap));
  left: var(--preview-right-rail-left, auto);
  display: none;
  height: calc(100vh - clamp(210px, 30vh, 280px));
  min-width: var(--preview-side-min-width);
  min-height: 260px;
  padding-top: 0.22em;
  overflow: hidden;
  color: var(--muted);
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.28;
}

.preview-page.has-right-footnote-rail .preview-side-footnotes-rail {
  display: grid;
}

.preview-side-footnotes-rail .preview-side-footnote {
  font-size: 1em;
}

.preview-side-footnote {
  display: grid;
  grid-template-columns: 1.35em minmax(0, 1fr);
  gap: 0.48em;
  padding: 0.18em 0.35em 0.9em 0;
  color: var(--muted);
  font-size: 0.9em;
  line-height: 1.38;
}

.preview-side-footnote[hidden] {
  display: none;
}

.preview-side-footnote-label {
  color: var(--accent);
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
}

.preview-side-footnote-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.preview-side-toc-item {
  width: 100%;
  min-height: 26px;
  padding: 3px 6px 3px calc(4px + var(--toc-level, 0) * 13px);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.preview-side-toc-item:hover,
.preview-side-toc-item:focus-visible,
.preview-side-toc-item.is-active {
  outline: none;
  background: rgba(255, 179, 71, 0.1);
  color: var(--accent);
}

body.typemap-theme-light .preview-side-toc-item:hover,
body.typemap-theme-light .preview-side-toc-item:focus-visible,
body.typemap-theme-light .preview-side-toc-item.is-active {
  background: rgba(63, 76, 71, 0.08);
  color: #3f4c47;
}

.preview-text {
  position: relative;
  max-width: var(--preview-measure);
  color: var(--text);
  font-family: var(--preview-body-font, inherit);
  font-size: var(--preview-font-size);
  line-height: var(--preview-line-height);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  text-wrap: pretty;
  font-synthesis-style: none;
  font-synthesis-weight: none;
  scroll-margin-top: 28px;
}

.preview-text.has-ligatures {
  font-variant-ligatures: common-ligatures contextual;
  font-feature-settings: "liga" 1, "clig" 1, "calt" 1;
  text-rendering: optimizeLegibility;
}

.preview-small-caps {
  font-size: inherit;
  font-variant-caps: small-caps;
  font-feature-settings: "smcp" 1;
  letter-spacing: 0.01em;
  text-transform: none;
  hyphens: inherit;
  -webkit-hyphens: inherit;
  overflow-wrap: inherit;
  word-break: normal;
}

.preview-small-caps-f {
  font-variant-caps: all-small-caps;
  font-feature-settings: "c2sc" 1;
}

.preview-text p {
  margin: 0 0 var(--preview-paragraph-spacing, 0.72em);
}

.preview-text p:last-child {
  margin-bottom: 0;
}

.preview-text strong,
.preview-text em {
  font-family: inherit;
}

.preview-text em {
  font-style: italic;
  font-synthesis-style: none;
}

.preview-text p strong,
.preview-text li strong,
.preview-text blockquote strong {
  font-family: var(--preview-strong-font, inherit);
  font-weight: 600;
}

.preview-document-head {
  margin: 0 0 1.55em;
  text-align: center;
  white-space: normal;
}

.preview-text.is-text-type-lyric .preview-document-head {
  text-align: left;
}

.preview-document-title {
  margin: 0;
  color: var(--text);
  font-family: var(--preview-title-font, inherit);
  font-size: var(--preview-title-size, 1.48em);
  font-weight: var(--preview-title-weight, 700);
  line-height: var(--preview-title-line-height, 1.12);
}

.preview-document-subtitle {
  margin: 0.34em 0 0;
  color: rgba(217, 222, 226, 0.76);
  font-family: var(--preview-subtitle-font, inherit);
  font-size: var(--preview-subtitle-size, 0.86em);
  font-weight: var(--preview-subtitle-weight, 400);
  line-height: var(--preview-subtitle-line-height, 1.28);
}

body.typemap-theme-light .preview-document-subtitle {
  color: rgba(33, 54, 51, 0.72);
}

.preview-document-lead {
  margin: 1.1em 0 0;
  color: var(--text);
  font-family: var(--preview-lead-font, var(--preview-body-font, inherit));
  font-size: var(--preview-lead-size, 1em);
  font-weight: var(--preview-lead-weight, 400);
  line-height: var(--preview-lead-line-height, 1.42);
  white-space: pre-wrap;
}

.preview-document-authors {
  margin: 0.68em 0 0;
  color: var(--accent);
  font-family: var(--preview-meta-font, inherit);
  font-size: var(--preview-authors-size, 0.76em);
  font-weight: var(--preview-meta-weight, 400);
  line-height: var(--preview-authors-line-height, 1.28);
  letter-spacing: 0;
}

.preview-document-head.is-authors-first .preview-document-authors {
  margin: 0 0 0.68em;
}

.preview-text.is-text-type-lyric p {
  white-space: pre-wrap;
  margin-bottom: 1.5em;
}

.preview-text.is-text-type-lyric .preview-source-line-block {
  margin-bottom: 0;
}

.preview-text.is-text-type-lyric .preview-blank-line {
  min-height: 1.5em;
  margin: 0;
}

.preview-text.is-text-type-drama p {
  margin-left: 2.2em;
  text-indent: -2.2em;
}

.preview-text.is-text-type-note {
  font-size: calc(var(--preview-font-size) * 0.82);
}

.preview-text h1,
.preview-text h2,
.preview-text h3,
.preview-text h4,
.preview-text h5,
.preview-text h6 {
  margin: var(--preview-heading-space-before, 1.2em) 0 0.58em;
  color: currentColor;
  font-family: var(--preview-heading-font, inherit);
  line-height: 1.12;
  font-weight: var(--preview-heading-weight, 700);
}

.preview-text .preview-heading-level-1 {
  font-size: var(--preview-heading-1, 1.55em);
}

.preview-text .preview-heading-level-2 {
  font-size: var(--preview-heading-2, 1.28em);
}

.preview-text .preview-heading-level-3 {
  font-size: var(--preview-heading-3, 1.1em);
}

.preview-text .preview-heading-level-4 {
  font-size: var(--preview-heading-4, 1em);
  font-weight: 700;
}

.preview-text .preview-heading-level-5 {
  font-size: var(--preview-heading-5, 1em);
  font-weight: 600;
  font-style: italic;
}

.preview-text .preview-heading-level-6 {
  font-size: var(--preview-heading-6, 0.94em);
  font-weight: 600;
  font-style: italic;
}

.preview-text .preview-heading-level-7 {
  font-size: var(--preview-heading-7, 0.9em);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0;
}

.preview-embedded-object {
  margin: 0 0 0.8em;
  line-height: inherit;
}

.preview-object-capsule {
  display: inline-flex;
  align-items: center;
  max-height: 1.45em;
  padding: 0 0.58em;
  border: 1px solid rgba(255, 179, 71, 0.5);
  border-radius: 999px;
  background: rgba(255, 179, 71, 0.16);
  color: var(--accent);
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 0.72em;
  font-weight: 700;
  line-height: 1.25;
  vertical-align: baseline;
}

body.typemap-theme-light .preview-object-capsule {
  border-color: rgba(196, 136, 47, 0.42);
  background: rgba(196, 136, 47, 0.13);
  color: #8f5d14;
}

.preview-citation-object {
  display: grid;
  width: 100%;
  margin-top: 2em;
  justify-items: start;
}

.preview-citation-text {
  width: 100%;
  margin: 0;
  color: inherit;
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: min(var(--preview-authors-size, 0.76em), 1em);
  line-height: 1.42;
}

.preview-footnote-reference {
  margin-inline: 0.08em;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.72em;
  font-weight: 600;
  line-height: 0;
  vertical-align: super;
}

.preview-footnote-definition {
  display: flex;
  align-items: baseline;
  gap: 0.48em;
  margin: 0.16em 0 0.9em;
  padding-left: 0.9em;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.84em;
  font-style: normal;
  line-height: 1.38;
  white-space: pre-wrap;
}

.preview-footnote-definition-label {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.82em;
  font-weight: 600;
  line-height: 1;
  vertical-align: super;
}

.preview-text blockquote {
  margin: 0 0 0.8em;
  padding-left: 1em;
  border-left: 3px solid rgba(255, 179, 71, 0.55);
  color: rgba(222, 230, 234, 0.88);
  font-family: var(--preview-quote-font, inherit);
}

body.typemap-theme-light .preview-text blockquote {
  border-left-color: rgba(61, 75, 69, 0.42);
  color: rgba(38, 54, 50, 0.86);
}

.preview-text.has-italic-quotes blockquote {
  font-style: italic;
}

.preview-text.has-first-line-indent > p {
  text-indent: var(--preview-first-line-indent, 0);
}

.preview-text.has-first-line-indent > p:first-of-type,
.preview-text.has-first-line-indent > .preview-heading + p {
  text-indent: 0;
}

.preview-text a {
  color: var(--accent);
  text-decoration: none;
}

.preview-text a:hover {
  text-decoration: underline;
}

.preview-text u,
.preview-text mark {
  color: currentColor;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  background: transparent;
}

.preview-line-number-layer {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  pointer-events: none;
}

.preview-line-number {
  position: absolute;
  right: calc(100% + 1.1em);
  color: rgba(168, 178, 186, 0.56);
  font-size: 0.72em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transform: translateY(calc(-100% - 0.22em));
}

body.typemap-theme-light .preview-line-number {
  color: rgba(33, 54, 51, 0.58);
}

.preview-text.is-text-type-drama strong:first-child {
  color: var(--accent);
  letter-spacing: 0.03em;
}

.preview-text ul,
.preview-text ol {
  margin: 0 0 0.8em;
  padding-left: 1.3em;
}

.preview-text code,
.preview-text pre {
  font-family: var(--preview-code-font, "Source Code Pro", "Courier New", monospace);
  font-size: var(--preview-code-size, 0.9em);
}

.preview-text code {
  background: rgba(132, 202, 255, 0.12);
  color: #b9e4ff;
  padding: 0.08em 0.24em;
  border-radius: 3px;
}

body.typemap-theme-light .preview-text code {
  background: rgba(33, 54, 51, 0.08);
  color: #264f63;
}

.preview-text pre {
  margin: 0.2em 0 0.9em;
  padding: 0.95em 1.05em;
  border: 1px solid rgba(132, 202, 255, 0.16);
  border-radius: 7px;
  background: #151e24;
  color: #dce8eb;
  line-height: 1.5;
  tab-size: 2;
  overflow-x: auto;
  overflow-y: hidden;
}

body.typemap-theme-light .preview-text pre {
  border-color: rgba(33, 54, 51, 0.16);
  background: rgba(244, 242, 236, 0.86);
  color: #29443f;
}

.preview-text pre code,
body.typemap-theme-light .preview-text pre code {
  display: block;
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  line-height: inherit;
}

.preview-empty {
  color: rgba(217, 222, 226, 0.48);
  font-style: italic;
}

.workspace-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: rgba(45, 53, 59, 0.96);
  color: rgba(217, 222, 226, 0.45);
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.workspace-strip-top {
  top: 0;
  bottom: auto;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.workspace-strip-label,
.label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.details-view {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(430px, 1.44fr);
  gap: 20px;
  padding: 60px 22px 22px;
  border-top: 1px solid var(--line);
  background: #20282e;
  overflow: hidden;
}

.app-frame.details-layout-browser .details-view {
  grid-template-columns: minmax(0, 1fr);
}

.app-frame.details-layout-editor .details-view {
  grid-template-columns: minmax(0, 1fr);
}

.app-frame.details-layout-browser .editor-panel,
.app-frame.details-layout-editor .browser-panel {
  display: none;
}

body.typemap-theme-light .details-view {
  background: rgba(243, 239, 230, 0.94);
}

.details-inline {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  background: rgba(45, 53, 59, 0.72);
}

body.typemap-theme-light .details-inline {
  background: rgba(255, 253, 248, 0.72);
}

.browser-panel,
.editor-panel {
  padding: 18px;
}

.browser-panel {
  display: flex;
  flex-direction: column;
}

.editor-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.editor-panel.is-empty {
  opacity: 0.72;
}

.panel-header,
.panel-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-layout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(207, 216, 222, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.panel-layout-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 179, 71, 0.08);
}

.panel-layout-button img {
  width: 20px;
  height: 20px;
}

.panel-header strong {
  display: block;
  margin-top: 6px;
  color: var(--accent);
  font-size: 1.22rem;
  line-height: 1.18;
}

.event-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.browser-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.browser-actions-menu-shell {
  position: relative;
}

.browser-actions-menu-trigger {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.browser-actions-menu-trigger:hover,
.browser-actions-menu-trigger[aria-expanded="true"] {
  border-color: rgba(207, 216, 222, 0.16);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.browser-actions-menu-dots {
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  -webkit-mask: center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 2.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0 5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0 5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z'/%3E%3C/svg%3E");
  mask: center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 2.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0 5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0 5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z'/%3E%3C/svg%3E");
}

.browser-actions-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 5px;
  border: 1px solid rgba(207, 216, 222, 0.14);
  border-radius: 12px;
  background: rgba(37, 45, 51, 0.98);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}

.browser-actions-menu[hidden] {
  display: none;
}

.browser-actions-menu button {
  width: 100%;
  min-height: 34px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.browser-actions-menu button:hover,
.browser-actions-menu button:focus-visible {
  background: rgba(255, 255, 255, 0.055);
  color: var(--accent);
}

body.typemap-theme-light .browser-actions-menu {
  border-color: rgba(33, 54, 51, 0.14);
  background: rgba(249, 247, 241, 0.98);
  box-shadow: 0 16px 36px rgba(45, 51, 48, 0.18);
}

.browser-project-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.project-list {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
}

.project-browser-item {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  align-self: start;
  gap: 4px;
}

.project-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.project-row:hover,
.project-browser-item.is-active > .project-row {
  border-color: var(--line-strong);
  background: rgba(255, 179, 71, 0.065);
}

.project-row-copy {
  min-width: 0;
}

.project-row-heading {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.36em;
}

.project-row strong {
  min-width: 0;
  color: var(--text);
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-row-author {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-row-copy > span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
}

.project-row > button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(242, 118, 105, 0.34);
  border-radius: 50%;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}

.project-row .project-tree-toggle {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: "Source Code Pro", "Courier New", monospace;
  font-size: 0.9rem;
}

.project-row .project-tree-toggle:hover {
  color: var(--accent);
  background: rgba(255, 179, 71, 0.08);
}

.document-tree {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 2px;
  padding: 2px 4px 6px 18px;
  font-family: "Source Code Pro", "Courier New", monospace;
}

.document-tree-empty {
  margin: 4px 0 8px;
  color: var(--muted);
  font-family: "Source Code Pro", "Courier New", monospace;
  font-size: 0.78rem;
}

.document-tree-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  align-self: start;
  gap: 2px;
  padding-left: calc(var(--tree-depth, 0) * 18px);
}

.document-tree-row.has-visibility-toggle {
  grid-template-columns: 22px minmax(0, 1fr) 24px;
}

.document-tree-toggle,
.document-tree-label,
.document-tree-visibility {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.document-tree-toggle {
  width: 22px;
  height: 28px;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

.document-tree-toggle:disabled {
  cursor: default;
  opacity: 0.28;
}

.document-tree-visibility {
  width: 24px;
  height: 28px;
  padding: 0;
  cursor: pointer;
}

.document-tree-visibility::before {
  content: "";
  display: block;
  width: 1.05em;
  height: 1.05em;
  margin: 0 auto;
  background: currentColor;
  mask: url("https://api.iconify.design/mdi/eye-outline.svg") center / contain no-repeat;
}

.document-tree-visibility.is-visible {
  color: var(--text);
}

.document-tree-visibility.is-hidden {
  color: var(--quiet);
  opacity: 0.46;
}

.document-tree-visibility:hover {
  color: var(--accent);
}

.document-tree-visibility.is-inherited-hidden {
  color: #ef6a67;
  opacity: 1;
}

.document-tree-label {
  min-width: 0;
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 7px;
  display: grid;
  grid-template-columns: minmax(5.8ch, max-content) minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  text-align: left;
  font-family: inherit;
}

.document-tree-label:not(:disabled) {
  cursor: pointer;
}

.document-tree-label:not(:disabled):hover,
.document-tree-row.is-active .document-tree-label {
  background: rgba(255, 179, 71, 0.08);
  color: var(--accent);
}

.document-tree-icon {
  color: var(--tree-accent);
  opacity: 0.88;
  text-align: left;
}

.document-tree-icon-matter {
  width: 1.15em;
  height: 1.15em;
  align-self: center;
  background: var(--tree-accent);
  opacity: 0.92;
  mask: url("https://api.iconify.design/mdi/paperclip.svg") center / contain no-repeat;
}

.document-tree-icon-toc {
  width: 1.05em;
  height: 1.05em;
  align-self: center;
  background: var(--tree-accent);
  opacity: 0.92;
  mask: url("https://api.iconify.design/mdi/paperclip.svg") center / contain no-repeat;
}

.document-tree-icon-paratext {
  width: 1.05em;
  height: 1.05em;
  align-self: center;
  background: var(--tree-accent);
  opacity: 0.92;
  mask: url("https://api.iconify.design/mdi/paperclip.svg") center / contain no-repeat;
}

.document-tree-icon-matter.document-tree-icon-body {
  background: transparent;
  mask: none;
}

.document-tree-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.document-tree-title,
.document-tree-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-tree-title {
  color: var(--text);
  font-size: 0.86rem;
}

.document-tree-row.is-active .document-tree-title {
  color: var(--accent);
}

.document-tree-meta {
  color: var(--muted);
  font-size: 0.72rem;
}

body.typemap-theme-light .document-tree-label:not(:disabled):hover,
body.typemap-theme-light .document-tree-row.is-active .document-tree-label {
  background: rgba(63, 76, 71, 0.08);
}

.editor-section {
  gap: 14px;
  margin-bottom: 0;
}

.editor-controls {
  position: relative;
  z-index: 3;
  min-height: 0;
  overflow: visible;
  padding-right: 4px;
  margin-bottom: 10px;
}

.editor-menu-room {
  position: relative;
  display: grid;
  gap: 9px;
  padding: 0;
}

.editor-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.editor-view-controls {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.editor-data-view-picker .editor-data-view-select {
  width: auto;
  min-width: 132px;
  min-height: 34px;
  padding-left: 34px;
}

.editor-data-view-picker {
  position: relative;
  display: inline-flex;
  color: var(--text);
}

.editor-data-view-picker > .file-format-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 9px;
  width: 17px;
  height: 17px;
  pointer-events: none;
  transform: translateY(-50%);
}

.editor-panel.editor-json-mode .editor-toolbar-primary,
.editor-panel.editor-json-mode .editor-toolbar-format {
  opacity: 0.42;
}

.editor-panel.editor-json-mode .text-editor-field textarea[aria-invalid="true"] {
  box-shadow: inset 0 0 0 1px rgba(255, 112, 96, 0.72);
}

.editor-toolbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  align-items: start;
  gap: 8px;
  width: 100%;
  min-height: 0;
  padding: 0;
}

.editor-toolbar-primary {
  flex: 1 1 auto;
  gap: 7px;
}

.editor-toolbar-format {
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(207, 216, 222, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
}

body.typemap-theme-light .editor-toolbar-format {
  border-color: rgba(33, 54, 51, 0.12);
  background: rgba(255, 255, 255, 0.46);
}

.editor-menu {
  position: relative;
}

.editor-menu summary {
  min-width: 74px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(207, 216, 222, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.editor-menu summary::-webkit-details-marker {
  display: none;
}

.editor-menu[open] summary,
.editor-menu summary:hover {
  border-color: var(--line-strong);
  background: rgba(255, 179, 71, 0.08);
  color: var(--accent);
}

.editor-menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  gap: 6px;
  width: 292px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #252d33;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.editor-submenu {
  position: relative;
}

.editor-submenu-arrow {
  margin-left: auto;
  color: var(--muted);
}

.editor-submenu-panel {
  position: absolute;
  top: -1px;
  left: calc(100% + 8px);
  display: none;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #252d33;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.editor-submenu:hover .editor-submenu-panel,
.editor-submenu:focus-within .editor-submenu-panel {
  display: grid;
  gap: 4px;
}

body.typemap-theme-light .editor-submenu-panel {
  background: rgba(255, 254, 250, 0.98);
  box-shadow: 0 18px 44px rgba(33, 54, 51, 0.13);
}

.editor-submenu-panel button,
.toolbar-popover-panel button {
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.editor-submenu-panel button:hover,
.toolbar-popover-panel button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--accent);
}

body.typemap-theme-light .editor-menu-panel,
body.typemap-theme-light .export-menu,
body.typemap-theme-light .property-dialog {
  background: rgba(255, 254, 250, 0.96);
  box-shadow: 0 18px 44px rgba(33, 54, 51, 0.13);
}

.editor-menu-action {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.editor-menu-action[hidden] {
  display: none;
}

.editor-menu-action:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--accent);
}

.editor-menu-action img {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.editor-menu-action .editor-menu-check {
  width: 18px;
  height: 18px;
  margin-left: auto;
}

.toolbar-select,
.toolbar-button,
.toolbar-icon-button,
.font-size-stepper {
  min-height: 32px;
  border: 1px solid rgba(207, 216, 222, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--text);
}

.toolbar-select {
  max-width: 184px;
  padding: 5px 28px 5px 9px;
}

.toolbar-select-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.toolbar-style-select-shell {
  width: 184px;
  max-width: 184px;
}

.toolbar-select-shell .toolbar-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.toolbar-select-shell > .toolbar-dropdown-caret {
  position: absolute;
  right: 9px;
  pointer-events: none;
}

.toolbar-select-shell:hover > .toolbar-dropdown-caret,
.toolbar-select-shell:focus-within > .toolbar-dropdown-caret {
  color: var(--accent);
}

.toolbar-select-compact {
  max-width: 82px;
}

.toolbar-button,
.toolbar-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 9px;
  cursor: pointer;
}

.toolbar-button img,
.toolbar-icon-button img,
.toolbar-align-panel img {
  width: 18px;
  height: 18px;
}

.toolbar-icon-button {
  width: 34px;
  padding: 0;
}

.toolbar-icon-button.toolbar-alignment-trigger {
  width: 46px;
  gap: 4px;
  padding: 0 5px 0 7px;
}

.toolbar-icon-button.toolbar-zoom-trigger {
  width: 46px;
  gap: 4px;
  padding: 0 5px 0 7px;
}

.toolbar-dropdown-caret {
  width: 0;
  height: 0;
  margin-top: 2px;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  color: var(--muted);
}

.toolbar-popover[open] .toolbar-alignment-trigger .toolbar-dropdown-caret,
.toolbar-alignment-trigger:hover .toolbar-dropdown-caret,
.toolbar-popover[open] .toolbar-zoom-trigger .toolbar-dropdown-caret,
.toolbar-zoom-trigger:hover .toolbar-dropdown-caret {
  color: var(--accent);
}

.toolbar-text-button {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.toolbar-text-button.is-italic {
  font-style: italic;
}

.toolbar-text-button.is-underlined {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.font-size-stepper {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
}

.font-size-stepper button {
  width: 28px;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.font-size-stepper span {
  min-width: 28px;
  color: var(--accent);
  font-size: 0.86rem;
  text-align: center;
}

.toolbar-popover {
  position: relative;
}

.toolbar-popover summary {
  list-style: none;
}

.toolbar-popover summary::-webkit-details-marker {
  display: none;
}

.toolbar-popover-panel {
  position: absolute;
  z-index: 19;
  top: calc(100% + 7px);
  left: 0;
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #252d33;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.toolbar-popover:not([open]) .toolbar-popover-panel {
  display: none;
}

.toolbar-align-panel {
  grid-template-columns: repeat(4, 32px);
  min-width: max-content;
}

.toolbar-zoom-panel {
  min-width: 112px;
}

.toolbar-zoom-panel button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.toolbar-zoom-panel button[aria-pressed="true"] {
  color: var(--accent);
}

.toolbar-zoom-panel button[aria-pressed="true"]::after {
  content: "✓";
  margin-left: 12px;
}

.toolbar-align-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body.typemap-theme-light .toolbar-popover-panel {
  background: rgba(255, 254, 250, 0.98);
  box-shadow: 0 18px 44px rgba(33, 54, 51, 0.13);
}

.toolbar-button:hover,
.toolbar-icon-button:hover,
.font-size-stepper button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 179, 71, 0.08);
  color: var(--accent);
}

.editor-controls .field input,
.editor-controls .field select {
  min-height: 34px;
  padding: 6px 9px;
}

.editor-controls .field span {
  font-size: 0.8rem;
}

.editor-controls .editor-section:last-child {
  margin-bottom: 0;
}

.editor-section h2 {
  margin: 0;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 0.86rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(207, 216, 222, 0.14);
  border-radius: 8px;
  background: rgba(24, 33, 40, 0.38);
  color: var(--text);
}

body.typemap-theme-light .field input,
body.typemap-theme-light .field select,
body.typemap-theme-light .field textarea,
body.typemap-theme-light .property-row input,
body.typemap-theme-light .property-row select,
body.typemap-theme-light .property-row textarea {
  background: rgba(255, 254, 250, 0.84);
}

.field input,
.field select {
  min-height: 42px;
  padding: 8px 11px;
}

.field textarea {
  min-height: 170px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.editor-text-section {
  min-height: 0;
  margin-bottom: 0;
}

.text-editor-field {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.markdown-editor-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(207, 216, 222, 0.14);
  border-radius: 8px;
  background: #182128;
}

body.typemap-theme-light .markdown-editor-frame {
  border-color: rgba(33, 54, 51, 0.2);
  background: #182128;
}

body.typemap-theme-light .text-editor-field .markdown-editor-frame {
  background: #182128;
}

.markdown-editor-highlight,
.text-editor-field textarea {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: calc(15px * var(--editor-zoom, 1));
  line-height: calc(23px * var(--editor-zoom, 1));
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: normal;
  font-kerning: none;
  font-variant-ligatures: none;
  text-rendering: auto;
  tab-size: 2;
}

.markdown-editor-highlight {
  z-index: 1;
  right: auto;
  bottom: auto;
  pointer-events: none;
  overflow: visible;
  color: transparent;
  box-sizing: border-box;
}

/*
 * The textarea is deliberately the only layer that paints glyphs. The mirror
 * contributes only capsule backgrounds and outlines, so differing native text
 * baselines can never produce doubled or drifting letterforms.
 */
.markdown-editor-highlight span {
  position: absolute;
  display: block;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  font-kerning: inherit;
  font-variant-ligatures: inherit;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.markdown-editor-emphasis {
  color: transparent !important;
}

.markdown-editor-strong {
  color: transparent !important;
}

.markdown-editor-mark {
  color: transparent !important;
}

.markdown-editor-heading {
  --editor-capsule-border: rgba(205, 218, 225, 0.48);
  --editor-capsule-fill: rgba(205, 218, 225, 0.17);
  padding: 0 0.34em;
  margin-inline: -0.34em;
  border: 0;
  outline: 1.5px solid var(--editor-capsule-border);
  outline-offset: -1px;
  border-radius: 7px;
  background: var(--editor-capsule-fill);
  box-shadow: none;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: transparent !important;
  font-weight: inherit;
  line-height: inherit;
}

.markdown-editor-heading-main {
  --editor-capsule-border: rgba(255, 190, 94, 0.58);
  --editor-capsule-fill: rgba(255, 179, 71, 0.22);
  color: transparent !important;
}

.markdown-editor-heading-foreword,
.markdown-editor-heading-afterword {
  --editor-capsule-border: rgba(153, 215, 255, 0.54);
  --editor-capsule-fill: rgba(132, 202, 255, 0.21);
  color: transparent !important;
}

.markdown-editor-title {
  padding: 0 0.34em;
  margin-inline: -0.34em;
  border: 0;
  outline: 1.5px solid rgba(255, 190, 94, 0.58);
  outline-offset: -1px;
  border-radius: 7px;
  background: rgba(255, 179, 71, 0.22);
  box-shadow: none;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: transparent !important;
  font-weight: inherit;
  line-height: inherit;
}

.markdown-editor-object {
  padding: 0 0.34em;
  margin-inline: -0.34em;
  border: 0;
  outline: 1.5px solid rgba(143, 238, 220, 0.56);
  outline-offset: -1px;
  border-radius: 7px;
  background: rgba(119, 219, 200, 0.21);
  box-shadow: none;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: transparent !important;
  font-weight: inherit;
  line-height: inherit;
}

.markdown-editor-inline-object {
  display: inline-block !important;
  width: max-content;
  max-width: none;
  white-space: pre !important;
  overflow-wrap: normal !important;
}

.markdown-editor-paratext {
  padding: 0 0.34em;
  margin-inline: -0.34em;
  border: 0;
  outline: 1.5px solid rgba(153, 215, 255, 0.54);
  outline-offset: -1px;
  border-radius: 7px;
  background: rgba(132, 202, 255, 0.21);
  box-shadow: none;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: transparent !important;
  font-weight: inherit;
  line-height: inherit;
}

.markdown-editor-link {
  color: transparent !important;
}

.markdown-editor-code {
  color: transparent !important;
}

.markdown-editor-fence {
  color: transparent !important;
}

.chapter-role-menu {
  position: fixed;
  z-index: 1200;
  width: 220px;
  padding: 10px;
  border: 1px solid rgba(255, 179, 71, 0.34);
  border-radius: 7px;
  background: #252f36;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 8px;
}

.original-page-info-menu {
  position: fixed;
  z-index: 1200;
  display: grid;
  gap: 5px;
  width: max-content;
  max-width: 260px;
  padding: 11px 13px;
  border: 1px solid rgba(143, 238, 220, 0.56);
  border-radius: 7px;
  background: #252f36;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.original-page-info-menu span {
  color: #c9fff5;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.original-page-info-menu strong {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
}

body.typemap-theme-light .original-page-info-menu {
  border-color: rgba(50, 139, 123, 0.28);
  background: #f6f3eb;
  box-shadow: 0 12px 30px rgba(45, 51, 48, 0.16);
}

body.typemap-theme-light .original-page-info-menu span {
  color: #176f61;
}

.chapter-role-menu > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-role-menu select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(207, 216, 222, 0.18);
  border-radius: 6px;
  background: #313b42;
  color: #edf2f4;
  font: inherit;
}

body.typemap-theme-light .chapter-role-menu {
  border-color: rgba(63, 76, 71, 0.2);
  background: #f6f3eb;
  box-shadow: 0 12px 30px rgba(45, 51, 48, 0.16);
}

body.typemap-theme-light .chapter-role-menu select {
  border-color: rgba(63, 76, 71, 0.2);
  background: #fffdf7;
  color: #293b37;
}

.text-editor-field textarea {
  z-index: 2;
  width: 100%;
  min-height: 0;
  height: 100%;
  resize: none;
  overflow: auto;
  scrollbar-gutter: stable;
  background: transparent !important;
  color: #d9e3e8 !important;
  caret-color: #ffb347;
  -webkit-text-fill-color: #d9e3e8 !important;
  scrollbar-color: rgba(207, 216, 222, 0.45) #182128;
}

body.typemap-theme-light .text-editor-field textarea {
  background: transparent !important;
  color: #d9e3e8 !important;
  -webkit-text-fill-color: #d9e3e8 !important;
}

.text-editor-field textarea::selection {
  background: rgba(132, 202, 255, 0.28);
}

.text-editor-field textarea:focus {
  box-shadow: none;
}

.markdown-editor-frame:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.08);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--line-strong);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.08);
}

.text-editor-field textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

input[type="range"] {
  accent-color: var(--accent);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.44);
}

.modal-overlay[hidden],
.property-dialog[hidden] {
  display: none;
}

.property-dialog {
  position: fixed;
  z-index: 81;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(860px, calc(100vw - 44px));
  max-height: min(820px, calc(100vh - 44px));
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 179, 71, 0.28);
  background: #252d33;
  box-shadow: 0 28px 88px rgba(0, 0, 0, 0.48);
}

#documentPropertiesDialog {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1080px, calc(100vw - 44px));
}

.settings-dialog {
  width: min(680px, calc(100vw - 44px));
}

.generate-dialog {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(900px, calc(100vw - 44px));
}

.generate-source-tabs {
  padding-top: 10px;
}

.generate-source-panel {
  display: grid;
  gap: 14px;
}

.generate-source-panel[hidden] {
  display: none;
}

.search-dialog {
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(820px, calc(100vw - 44px));
}

.wikisource-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.wikisource-filter-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 250px);
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.wikisource-filter-field select {
  width: 100%;
}

.wikisource-results {
  display: grid;
  gap: 6px;
  min-height: 120px;
  max-height: min(430px, 48vh);
  overflow-y: auto;
  scrollbar-width: thin;
}

.wikisource-result {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.wikisource-result:hover,
.wikisource-result:focus-visible,
.wikisource-result.is-selected {
  border-color: var(--line-strong);
  outline: none;
  background: rgba(255, 179, 71, 0.08);
}

.wikisource-result-title {
  font-weight: 650;
}

.wikisource-result-meta {
  color: var(--muted);
  font-size: 0.88em;
  line-height: 1.35;
}

.provenance-link {
  min-width: 0;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.provenance-link:empty::after {
  content: "Nicht vorhanden";
  color: var(--muted);
}

.provenance-related-links {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.provenance-related-link {
  display: block;
  padding: 7px 9px;
  border-radius: 7px;
  color: var(--accent);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.provenance-related-link:hover,
.provenance-related-link:focus-visible {
  outline: none;
  background: rgba(255, 179, 71, 0.08);
}

.provenance-license-control {
  display: grid;
  gap: 8px;
}

.property-select-shell {
  position: relative;
}

.property-select-shell select {
  width: 100%;
  padding-right: 34px;
  appearance: none;
}

.property-select-caret {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-68%) rotate(45deg);
}

.generate-pdf-api-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr);
  gap: 10px;
}

.generate-api-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .generate-pdf-api-grid {
    grid-template-columns: 1fr;
  }
}

.generate-url-field,
.generate-prompt-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
}

.generate-prompt-field[hidden] {
  display: none;
}

.generate-url-field input,
.generate-prompt-field textarea {
  width: 100%;
}

.generate-prompt-field textarea {
  min-height: 300px;
  resize: vertical;
  font-family: "Source Code Pro", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.48;
}

.generate-rights-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.generate-dialog-status {
  min-height: 1.35em;
  margin: 0;
  color: var(--muted);
}

.generate-dialog-status.is-error {
  color: #ff9f91;
}

.generate-dialog-actions {
  flex-wrap: wrap;
}

.property-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.property-dialog-head h2 {
  margin: 6px 0 0;
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1.15;
}

.property-tabs {
  display: flex;
  gap: 6px;
  min-width: 0;
  padding: 10px 14px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}

.property-tab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.property-tab:hover,
.property-tab:focus-visible {
  color: var(--text);
}

.property-tab.is-active {
  border-color: var(--line);
  background: rgba(255, 179, 71, 0.08);
  color: var(--accent);
}

.property-tab-body {
  display: block;
}

.property-tab-panel {
  display: grid;
  gap: 18px;
}

.property-tab-panel[hidden] {
  display: none;
}

.property-section[hidden] {
  display: none;
}

.dialog-icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(207, 216, 222, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
}

.dialog-icon-button:hover {
  border-color: var(--line-strong);
  color: var(--accent);
}

.property-dialog-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  padding: 18px 22px;
  overflow: auto;
}

.property-section {
  display: grid;
  gap: 10px;
}

.property-section h3 {
  margin: 0;
  color: var(--accent);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.property-hint {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(255, 179, 71, 0.25);
  border-radius: 8px;
  background: rgba(255, 179, 71, 0.07);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.property-hint[hidden] {
  display: none;
}

.property-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(24, 33, 40, 0.26);
}

.property-conditional-fields {
  display: contents;
}

.property-conditional-fields[hidden] {
  display: none;
}

body.typemap-theme-light .property-list {
  background: rgba(255, 253, 248, 0.52);
}

.property-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 46px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(207, 216, 222, 0.08);
}

.property-row[hidden] {
  display: none;
}

.property-row:last-child {
  border-bottom: 0;
}

.property-row > span {
  color: var(--muted);
  font-size: 0.86rem;
}

.property-row > span em {
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-size: 0.7rem;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.property-row input,
.property-row select,
.property-row textarea {
  width: 100%;
  border: 1px solid rgba(207, 216, 222, 0.12);
  border-radius: 8px;
  background: rgba(45, 53, 59, 0.62);
  color: var(--text);
}

.property-row input,
.property-row select {
  min-height: 34px;
  padding: 6px 9px;
}

.property-row textarea {
  min-height: 68px;
  padding: 8px 9px;
  resize: vertical;
  line-height: 1.4;
}

.property-row input:focus,
.property-row select:focus,
.property-row textarea:focus {
  border-color: var(--line-strong);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.08);
}

.property-row-stack {
  align-items: start;
}

.citation-output {
  display: grid;
  gap: 8px;
}

.citation-output textarea[readonly] {
  min-height: 64px;
  background: rgba(24, 33, 40, 0.3);
  color: var(--text);
  cursor: text;
}

.citation-rendered-output {
  min-height: 76px;
  padding: 10px 11px;
  border: 1px solid rgba(207, 216, 222, 0.12);
  border-radius: 8px;
  background: rgba(24, 33, 40, 0.3);
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}

.citation-rendered-output:focus-visible {
  border-color: var(--line-strong);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.08);
}

body.typemap-theme-light .citation-rendered-output {
  background: rgba(33, 54, 51, 0.05);
}

body.typemap-theme-light .citation-output textarea[readonly] {
  background: rgba(33, 54, 51, 0.05);
}

.property-copy-button {
  justify-self: start;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.property-copy-button:hover,
.property-copy-button:focus-visible {
  border-color: var(--line-strong);
  color: var(--accent);
}

.citation-author-list {
  display: grid;
  gap: 7px;
}

.citation-author-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 7px;
}

.citation-author-remove {
  min-height: 34px;
  border: 1px solid rgba(242, 118, 105, 0.3);
  border-radius: 8px;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}

.citation-author-remove:disabled {
  opacity: 0.35;
  cursor: default;
}

.property-add-button {
  margin-top: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.property-add-button:hover,
.property-add-button:focus-visible {
  border-color: var(--line-strong);
  color: var(--accent);
}

.property-toggle-row {
  grid-template-columns: minmax(160px, 0.34fr) auto;
  justify-content: start;
}

@media (max-width: 720px) {
  .property-row,
  .property-toggle-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.property-toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Im Nummerierungsdialog beginnen Checkboxen, Ziffern und Auswahllisten auf
 * derselben Vertikalen; so lassen sich die zusammengehörigen Werte schneller lesen. */
#lineNumberDialog .line-number-property-list .property-row,
#lineNumberDialog .line-number-property-list .property-toggle-row {
  grid-template-columns: minmax(190px, 1fr) 190px;
}

#lineNumberDialog .line-number-property-list .property-toggle-row input[type="checkbox"] {
  justify-self: start;
  margin: 0 0 0 9px;
}

@media (max-width: 560px) {
  #lineNumberDialog .line-number-property-list .property-row,
  #lineNumberDialog .line-number-property-list .property-toggle-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #lineNumberDialog .line-number-property-list .property-toggle-row input[type="checkbox"] {
    margin-left: 9px;
  }
}

.property-dialog-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--line);
}

.primary-action {
  border-color: var(--line-strong);
  color: var(--accent);
}

#generatePromptButton:disabled {
  border-color: var(--line);
  background: rgba(128, 128, 128, 0.1);
  color: var(--muted);
  opacity: 0.5;
  cursor: wait;
  box-shadow: none;
}

@container type-stage (max-width: 980px) {
  .preview-page.has-side-toc,
  .preview-page.has-side-rail {
    width: min(920px, 100%);
    margin-left: 0;
  }

  .preview-side-toc {
    display: none;
  }

  .preview-side-footnotes-rail {
    display: none !important;
  }
}

@media (max-width: 920px) {
  .preview-page.has-side-toc,
  .preview-page.has-side-rail {
    width: min(920px, 100%);
    margin-left: 0;
    padding-left: clamp(34px, 5vw, 72px);
  }

  .details-view,
  .app-frame.details-layout-browser .details-view,
  .app-frame.details-layout-editor .details-view {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-inline: 14px;
  }

  .app-frame.details-layout-browser .editor-panel,
  .app-frame.details-layout-editor .browser-panel {
    display: none;
  }

  .browser-panel,
  .editor-panel {
    min-height: 0;
  }
}

@media (max-width: 980px) {
  .preview-side-toc {
    display: none;
  }

  .preview-side-footnotes-rail {
    display: none !important;
  }
}

