:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: #151515;
  --panel-soft: #202020;
  --text: #f7f7f7;
  --muted: #b8b8b8;
  --line: #343434;
  --accent: #ffffff;
  --accent-dark: #d8d8d8;
}

html { scroll-behavior: smooth; }
a:any-link { color: #fff !important; }
a.download, a.download:hover { background: #202020; color: #fff; }
.back-to-top {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 100;
  display: grid;
  place-items: center;
  width: 48px;
  min-height: 48px;
  padding: 0;
  border: 1px solid #666;
  border-radius: 8px;
  background: #151515;
  color: #fff;
  box-shadow: 0 4px 16px #0008;
  cursor: pointer;
}
.back-to-top span { font-size: 26px; line-height: 1; }
.back-to-top:hover { background: #303030; border-color: #fff; }
.back-to-top:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#powerpoint-versturen { scroll-margin-top: 5rem; }
.distribution-panel { margin-top: 24px; }
.distribution-panel .distribution-upload-history,
.distribution-panel .distribution-send-history {
  display: flow-root;
  margin: 24px 0;
}
.distribution-panel .distribution-upload-history > ul { margin: 12px 0 0; }
.distribution-panel .distribution-send-history > .service-note { margin: 8px 0; }
.distribution-panel .distribution-send-history .service-table { margin-top: 0; }
.distribution-panel .distribution-upload-history > summary,
.distribution-panel .distribution-send-history > summary { cursor: pointer; }
.distribution-panel label { display: block; margin: 12px 0; }
.distribution-panel .check-row { display: flex; }
.distribution-panel [data-recipient-form] td .check-row { margin: 0; }
.distribution-panel .distribution-add-recipients { margin-top: 1.5rem; }
.distribution-table-wrap { width: 100%; overflow-x: auto; }
.distribution-table-wrap td { vertical-align: top; min-width: 120px; overflow-wrap: anywhere; }
.distribution-table-wrap input:not([type="checkbox"]), .distribution-table-wrap select { min-width: 150px; width: 100%; }
.distribution-panel .recipient-table td { vertical-align: middle; min-width: 0; }
.recipient-table .linktype-cell { width: 8rem; white-space: nowrap; }
.distribution-panel .recipient-table select { min-width: 7rem; width: 7rem; margin: 0; padding: 6px 10px; min-height: 36px; vertical-align: middle; }
.recipient-table .checkbox-cell, .address-table .checkbox-cell { width: 1%; min-width: 0; text-align: center; vertical-align: middle; white-space: nowrap; }
.distribution-panel .recipient-table .check-row { min-height: 0; justify-content: center; margin: 0; }
.recipient-table input[type="checkbox"], .address-table input[type="checkbox"] { width: 18px; height: 18px; margin: 0; vertical-align: middle; }
.distribution-table-wrap .address-table td { vertical-align: middle; }
.address-table select { margin: 0; }
.address-table input:disabled, .address-table select:disabled { opacity: 0.45; }
.distribution-panel a { overflow-wrap: anywhere; }
.distribution-preview-dialog:not([open]) { display: none; }
.distribution-preview-dialog {
  width: min(1040px, calc(100% - 32px)); max-width: none;
  max-height: calc(100dvh - 32px); padding: 0;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 20px 80px #0009;
}
.distribution-preview-dialog[open] { display: flex; flex-direction: column; }
.distribution-preview-dialog::backdrop { background: #000b; }
.distribution-preview-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.distribution-preview-header h2 { margin: 0; }
.distribution-preview-dialog [data-draft-save]:disabled,
.distribution-preview-dialog [data-draft-save]:disabled:hover {
  background: #303030;
  border-color: #555;
  color: #999;
  opacity: 1;
  cursor: not-allowed;
}
.distribution-preview-content { padding: 0 24px 24px; overflow-y: auto; min-height: 0; }
.distribution-preview-content [data-prepare-links] {
  margin: 24px 0 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}
.distribution-preview-content [data-prepare-links] button {
  min-height: 48px;
  max-width: 100%;
  padding: 14px 24px;
  margin: 0 0 8px;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.4;
  white-space: normal;
}
.distribution-preview-content [data-prepare-links] p { margin: 12px 0 0; line-height: 1.55; }
.distribution-preview-content [data-prepare-results] { margin: 16px 0 0; padding-left: 20px; line-height: 1.6; }
.distribution-preview-content [data-prepare-status]:empty,
.distribution-preview-content [data-prepare-results]:empty { display: none; }
@media (max-width: 640px) {
  .distribution-preview-content [data-prepare-links] { padding: 18px; }
  .distribution-preview-content [data-prepare-links] button { width: 100%; padding: 12px 16px; }
}
.distribution-modal-open { overflow: hidden; scrollbar-gutter: stable; }
@media (max-width: 640px) {
  .distribution-preview-dialog { max-height: calc(100dvh - 16px); }
  .distribution-preview-header { padding: 14px; }
  .distribution-preview-content { padding: 0 14px 14px; }
}
.distribution-panel input:not([type="checkbox"]):not([type="hidden"]),
.distribution-panel textarea,
.distribution-table-wrap input:not([type="checkbox"]):not([type="hidden"]) {
  width: 100%; min-width: 0; padding: 12px 14px;
  color: var(--text); background: #0b0b0b; border: 1px solid var(--line);
  border-radius: 6px; font: inherit;
}
.distribution-panel form.service-grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.distribution-panel .presentation-upload-form > button { justify-self: start; width: auto; }
.distribution-panel .wide { grid-column: 1 / -1; }
.distribution-panel .service-card { min-width: 0; }
@media (max-width: 640px) {
  .distribution-panel form.service-grid-form { grid-template-columns: minmax(0, 1fr); }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

* {
  box-sizing: border-box;
}

input,
select,
button {
  accent-color: #ffffff;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Tahoma, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 24px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 28px;
}

.heading {
  margin-bottom: 28px;
}

.service-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.service-title-row h1 { flex: 1 1 auto; min-width: 0; }
.service-presentation-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.service-presentation-actions form { margin: 0; }
.service-presentation-actions .download { padding: 0 12px; white-space: nowrap; }
.service-presentation-note { margin: 4px 0 0; text-align: right; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
#presentatie-uploaden { scroll-margin-top: 24px; }
@media (max-width: 680px) {
  .service-presentation-actions { width: 100%; }
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.title-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 400;
}

.info-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  text-decoration: none;
}

.lead {
  margin: 8px 0 0;
  color: var(--muted);
}

.lead a {
  color: var(--text);
}

.heading-actions {
  margin-top: 16px;
}

.upload-box {
  display: grid;
  gap: 10px;
}

.zip-label {
  margin-top: 12px;
}

label,
.label {
  color: var(--muted);
  font-size: 0.92rem;
}

.inline-help {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.inline-help a {
  color: var(--accent);
}

.info-popover {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.info-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.info-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 30;
  width: max-content;
  max-width: min(320px, calc(100vw - 48px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101010;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  visibility: hidden;
  white-space: normal;
}

.info-popover:hover .info-bubble,
.info-popover:focus .info-bubble,
.info-popover:focus-within .info-bubble {
  opacity: 1;
  visibility: visible;
}

.file-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 4px;
  padding: 0;
  border: 0;
}

.mode-grid legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.92rem;
}

.mode-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0d0d;
  cursor: pointer;
}

.mode-option:has(input:checked) {
  border-color: var(--accent);
  background: #181818;
}

.mode-option:hover {
  border-color: var(--accent-dark);
  background: #202020;
}

.mode-option input {
  margin-top: 3px;
  accent-color: #ffffff;
}

.mode-option strong,
.mode-option small {
  display: block;
}

.mode-option strong {
  color: var(--text);
  font-size: 0.98rem;
}

.mode-option small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

input[type="file"],
input[type="password"],
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d0d0d;
  color: var(--text);
  font: inherit;
}

.drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 24px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background: #0d0d0d;
  transition: border-color 160ms ease, background 160ms ease;
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-zone-content {
  display: grid;
  gap: 8px;
  max-width: 620px;
  text-align: center;
  pointer-events: none;
}

.drop-zone-content strong {
  color: var(--text);
  font-size: 1.15rem;
}

.drop-zone-content span,
.drop-zone-content small,
.form-hint {
  color: var(--muted);
  line-height: 1.45;
}

.drop-zone-content small {
  font-size: 0.9rem;
}

.selected-file-list {
  display: grid;
  gap: 4px;
  margin: 4px auto 0;
  padding: 0;
  max-width: 100%;
  list-style: none;
  color: var(--text);
  font-size: 0.88rem;
  text-align: left;
}

.selected-file-list li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drop-zone.is-drag-over {
  border-color: var(--accent);
  background: #181818;
}

.drop-zone.drop-zone-error {
  border-color: #ffb4b4;
}

.form-hint {
  margin: 0;
  font-size: 0.9rem;
}

.order-mode-fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.order-mode-fieldset legend {
  padding: 0 6px;
  color: var(--text);
}

textarea {
  min-height: 260px;
  margin-top: 8px;
  line-height: 1.45;
  resize: vertical;
}

button,
.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #080808;
  font: 700 0.95rem Tahoma, Arial, sans-serif;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
}

.download.danger {
  background: rgba(220, 53, 69, 0.16);
  border-color: rgba(220, 53, 69, 0.85);
  color: #ffb3bd;
}

.download.danger:hover {
  background: rgba(220, 53, 69, 0.28);
  border-color: #ff6b7a;
  color: #fff;
}

button:hover,
.download:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #080808;
}

.logout-form {
  margin: 0 0 auto auto;
}

.link-button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
  text-decoration: underline;
}

.link-button:hover {
  background: transparent;
  color: var(--text);
}

.login-shell {
  max-width: 460px;
}

.login-panel {
  width: 100%;
}

.login-form {
  display: grid;
  gap: 12px;
}

.error-text {
  margin: 0;
  color: var(--text);
}

.manual-content {
  display: grid;
  gap: 10px;
}

.manual-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.manual-content a {
  color: var(--accent);
}

.manual-heading {
  margin-bottom: 22px;
}

.manual-content h2 {
  margin: 18px 0 0;
  font-size: 1.35rem;
  font-weight: 400;
}

.manual-content h3 {
  margin: 8px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.manual-content ul {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.manual-content li + li {
  margin-top: 4px;
}

.manual-page {
  color-scheme: light;
  --bg: #f5f5f5;
  --panel: #ffffff;
  --panel-soft: #f4f4f4;
  --text: #111111;
  --muted: #252525;
  --line: #d0d0d0;
  --accent: #111111;
  --accent-dark: #555555;
}

.manual-page .panel {
  border-color: #d8d8d8;
  box-shadow: 0 1px 2px rgb(0 0 0 / 8%), 0 16px 42px rgb(0 0 0 / 10%);
}

.manual-page .lead,
.manual-page .manual-content p,
.manual-page .manual-content ul,
.manual-page footer {
  color: var(--muted);
}

.manual-page .manual-content a,
.manual-page footer a,
.manual-page .footer-icon-link {
  color: var(--text);
}

button:disabled,
.download[aria-disabled="true"],
.check-row.disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.check-row.disabled input,
.check-row.disabled span {
  cursor: not-allowed;
}

.status-panel {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.bible-panel {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.section-toggle {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.section-toggle:hover {
  background: #2a2a2a;
  color: var(--text);
}

.toggle-arrow {
  display: inline-block;
  width: 14px;
  transform-origin: center;
  transition: transform 0.16s ease;
}

.section-toggle[aria-expanded="true"] .toggle-arrow {
  transform: rotate(180deg);
}

.bible-content {
  padding: 0 18px 18px;
}

.bible-form {
  display: grid;
  gap: 12px;
}

.status-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
  font-weight: 400;
}

.status-panel p {
  margin: 0;
  color: var(--muted);
}

progress {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #080808;
}

progress::-webkit-progress-bar {
  background: #080808;
}

progress::-webkit-progress-value {
  background: var(--accent);
}

progress::-moz-progress-bar {
  background: var(--accent);
}

.result-panel {
  margin-top: 24px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  margin-bottom: 16px;
}

.actions form {
  margin: 0;
}

.multi-downloads {
  display: grid;
  gap: 8px;
  width: 100%;
}

.multi-download-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.multi-download-row > span {
  min-width: 220px;
  color: var(--muted);
}

.preview-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
  overflow: auto;
}

.preview-stage {
  position: relative;
  width: 100%;
  min-width: 720px;
}

.preview-stage:fullscreen {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  height: 100%;
  background: #000;
}

.preview-stage.is-faux-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  width: 100vw;
  min-width: 0;
  height: 100vh;
  background: #000;
}

.preview-stage img {
  display: block;
  width: 100%;
  height: auto;
}

.preview-stage:fullscreen img,
.preview-stage.is-faux-fullscreen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fullscreen-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 8;
  display: none;
  gap: 8px;
}

.preview-stage:fullscreen .fullscreen-controls,
.preview-stage.is-faux-fullscreen .fullscreen-controls {
  display: inline-flex;
}

body.preview-fullscreen-active {
  overflow: hidden;
}

.icon-button {
  width: 38px;
  min-height: 34px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: 1rem;
}

.icon-button:hover {
  border-color: #fff;
  background: rgba(80, 80, 80, 0.72);
  color: #fff;
}

.esc-button {
  width: auto;
  padding: 0 10px;
  font-size: 0.82rem;
}

.text-editor-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.committed-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.commit-erase,
.commit-text,
.edit-erase {
  position: absolute;
  display: block;
}

.commit-erase,
.edit-erase {
  background: #000;
}

.edit-erase {
  z-index: 1;
  pointer-events: none;
}

.commit-text {
  color: #fff;
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1;
  white-space: nowrap;
}

.commit-text.commit-dash {
  color: transparent;
  background: #fff;
  border-radius: 1px;
  line-height: 0;
  overflow: hidden;
}

.text-item {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #fff;
  caret-color: #fff;
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1;
  outline: none;
  cursor: ew-resize;
  pointer-events: auto;
  text-shadow: none;
  transform-origin: left top;
  white-space: nowrap;
  overflow: visible;
  box-sizing: content-box;
}

.text-item:focus,
.text-item:hover {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  outline: 1px solid rgba(255, 255, 255, 0.75);
  outline-offset: 1px;
  cursor: text;
}

.text-editor-layer .text-item.dash-item {
  color: transparent;
  caret-color: transparent;
  background: transparent;
  border: 0;
  border-radius: 1px;
  line-height: 0;
  overflow: hidden;
  cursor: ew-resize;
}

.text-editor-layer .text-item.dash-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 1px;
  background: #fff;
  pointer-events: none;
}

.text-editor-layer .text-item.dash-item:focus,
.text-editor-layer .text-item.dash-item:hover {
  color: transparent;
  background: transparent;
  border: 0;
  outline: 1px solid #4ea1ff;
  outline-offset: 1px;
  cursor: ew-resize;
}

.text-editor-layer .text-item.deleted-item {
  display: none;
}

footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

footer a {
  color: var(--accent);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.footer-icon-link svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.settings-grid,
.onedrive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

select,
input[type="text"] {
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d0d0d;
  color: var(--text);
}

.text-editor-layer .text-item {
  position: absolute;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1;
  outline: none;
  cursor: ew-resize;
  pointer-events: auto;
  text-shadow: none;
  z-index: 2;
}

.text-editor-layer .text-item:focus {
  background: transparent;
  color: transparent;
  caret-color: transparent;
  outline: 1px solid #58a6ff;
  outline-offset: 1px;
  box-shadow: none;
  cursor: text;
}

.text-editor-layer .text-item.live-typing,
.text-editor-layer .text-item.live-typing:focus {
  color: #ffffff;
  caret-color: transparent;
  z-index: 4;
}

.text-editor-layer .editor-caret {
  position: absolute;
  display: none;
  width: 2px;
  min-height: 14px;
  background: #58a6ff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  z-index: 8;
}

.text-editor-layer .editor-caret.visible {
  display: block;
  animation: editor-caret-blink 1s steps(1, end) infinite;
}

@keyframes editor-caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.text-editor-layer .text-item.dash-item.live-typing,
.text-editor-layer .text-item.dash-item.live-typing:focus {
  color: transparent;
}

.text-editor-layer .text-item:hover:not(:focus) {
  background: transparent;
  outline: 1px solid rgba(255, 255, 255, 0.55);
  outline-offset: 1px;
}

/* The source preview already contains the correctly rendered lyric and dashes.
   Editor items are interaction targets only, so they must never redraw it. */
.text-editor-layer .text-item.dash-item::after {
  display: none;
}

.text-editor-layer .text-item.dash-item.live-typing::after,
.text-editor-layer .text-item.dash-item:focus::after {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: var(--dash-width, 6px);
  height: var(--dash-height, 2px);
  border-radius: 999px;
  background: #ffffff;
  content: "";
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.secondary {
  background: transparent;
  color: var(--text);
}

.secondary:hover {
  background: #2a2a2a;
  color: var(--text);
}

.source-list,
.onedrive-results {
  margin-top: 14px;
  color: var(--muted);
}

.onedrive-results {
  min-height: 54px;
  max-height: 480px;
  overflow-y: auto;
  padding: 0 12px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101010;
  scrollbar-color: #ffffff #101010;
}

.onedrive-results.has-files {
  min-height: 180px;
}

.onedrive-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.onedrive-filter-row button {
  min-height: 34px;
  padding: 0 12px;
}

.onedrive-filter-row button.active {
  background: #ffffff;
  color: #070707;
}

.onedrive-sort-row {
  display: flex;
  flex: 1 1 300px;
  justify-content: flex-end;
}

.onedrive-sort-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.onedrive-sort-row select {
  min-height: 34px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d0d0d;
  color: var(--text);
  font: inherit;
}

.onedrive-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
}

.preview-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 12px;
}

.preview-nav button {
  width: auto;
}

#fullscreen-toggle {
  margin-left: auto;
  order: 2;
}

#edit-toggle {
  order: 1;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.align-end {
  align-self: end;
}

.button-row.align-end {
  justify-content: flex-end;
}

.review-action-row {
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-top: 6px;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: #ffffff;
}

.onedrive-summary {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 -12px 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #101010;
  color: var(--text);
  font-weight: 700;
}

.onedrive-results a {
  color: var(--text);
  overflow-wrap: anywhere;
}

.onedrive-file-name {
  min-width: 0;
}

.onedrive-tag {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.onedrive-file-table {
  width: 100%;
  min-width: 760px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.onedrive-file-table thead th {
  position: sticky;
  top: 35px;
  z-index: 2;
  background: #101010;
  box-shadow: 0 1px 0 var(--line), 0 10px 12px #101010;
}

.onedrive-file-table th,
.onedrive-file-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.onedrive-file-table th:nth-child(2),
.onedrive-file-table td:nth-child(2) {
  width: 160px;
  white-space: nowrap;
}

.onedrive-file-table th:nth-child(3),
.onedrive-file-table td:nth-child(3) {
  width: 90px;
  white-space: nowrap;
}

.onedrive-file-table th:nth-child(4),
.onedrive-file-table td:nth-child(4) {
  width: 150px;
  white-space: nowrap;
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(0 0 0 / 72%);
}

.modal-content {
  position: relative;
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgb(0 0 0 / 45%);
}

.modal.hidden {
  display: none;
}

.modal-content h2 {
  margin: 0 32px 12px 0;
  font-size: 1.35rem;
  font-weight: 400;
}

.modal-content p {
  margin: 0;
  color: var(--muted);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.check-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0d0d;
}

.check-card.is-ok {
  border-color: #ffffff;
}

.check-card.is-error {
  border-color: #d8d8d8;
  background: #1c1c1c;
}

.check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.check-head strong {
  color: var(--text);
  font-size: 1rem;
}

.check-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.check-card p {
  margin: 10px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.check-card pre {
  max-height: 180px;
  margin: 12px 0 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #050505;
  color: var(--muted);
  white-space: pre-wrap;
}

h2 {
  margin: 26px 0 0;
  font-size: 1.2rem;
  font-weight: 400;
}

@media (max-width: 700px) {
  .distribution-preview-dialog { width: min(1040px, calc(100% - 20px)); }

  .shell {
    width: min(100% - 20px, 1040px);
    padding-top: 20px;
  }

  .panel {
    padding: 18px;
  }

  .file-row {
    grid-template-columns: 1fr;
  }

  .onedrive-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .onedrive-sort-row label {
    justify-content: flex-start;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .check-grid,
  .check-grid.compact {
    grid-template-columns: 1fr;
  }

  button,
  .download {
    width: 100%;
    display: inline-grid;
    place-items: center;
  }

  .settings-grid,
  .onedrive-grid {
    grid-template-columns: 1fr;
  }

  .review-action-row {
    align-items: stretch;
    flex-direction: column;
  }
}
.service-list {
  margin-top: 1.5rem;
  overflow-x: auto;
}

.service-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.service-table th,
.service-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

.compact-link {
  padding: 0.45rem 0.7rem;
}

.service-form,
.service-grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.service-grid-form .wide,
.import-item .wide {
  grid-column: 1 / -1;
}

.service-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  margin-top: 1.25rem;
  padding: 1rem;
}

.service-card h2 {
  margin-top: 0;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.section-heading-row h2 {
  margin: 0;
}

.order-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.edit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 34px;
  color: var(--text);
}

.order-toolbar button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-color: var(--line);
  background: #0d0d0d;
  color: var(--text);
}

.order-toolbar button:not(:disabled):hover {
  border-color: var(--accent);
  background: #252525;
  color: var(--text);
}

.service-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.powerpoint-outline {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.slide-outline {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-items: start;
}

.slide-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  min-height: 128px;
  padding: 0.7rem;
  background: #101010;
  cursor: default;
}

.slide-outline.is-editing .slide-card {
  cursor: grab;
}

.slide-card.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.slide-card-delete-form {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  z-index: 2;
}

.slide-outline.is-editing .slide-card-delete-form {
  display: block;
}

.slide-card-delete-form button {
  display: grid;
  place-items: center;
  width: 28px;
  min-height: 28px;
  padding: 0;
  border-color: rgba(220, 53, 69, 0.85);
  background: rgba(220, 53, 69, 0.16);
  color: #ffb3bd;
  font-size: 1.2rem;
  line-height: 1;
}

.slide-card-delete-form button:hover {
  border-color: #ff6b7a;
  background: rgba(220, 53, 69, 0.28);
  color: #fff;
  caret-color: #fff;
}

.slide-card-head {
  display: grid;
  grid-template-columns: auto 1.45rem minmax(0, 1fr);
  padding-right: 34px;
  gap: 0.45rem;
  align-items: start;
  margin-bottom: 0.45rem;
}

.slide-card-head strong,
.slide-card-head small {
  display: block;
}

.slide-card-head small,
.slide-block-editor small {
  color: var(--muted);
}

.drag-handle {
  color: var(--muted);
  cursor: default;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.45rem;
  user-select: none;
}

.slide-outline.is-editing .drag-handle {
  cursor: grab;
  color: var(--text);
}

.slide-move-actions {
  display: none;
  gap: 0.4rem;
  grid-column: 1 / -1;
}

.slide-outline.is-editing .slide-move-actions {
  display: flex;
}

.slide-move-actions form,
.slide-block-editor {
  margin: 0;
}

.slide-move-actions button {
  min-height: 32px;
  padding: 0 10px;
}

.slide-summary {
  display: grid;
  gap: 0.25rem;
  min-height: 34px;
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.slide-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slide-view-panel,
.slide-edit-panel {
  margin-top: 0.5rem;
}

.slide-outline:not(.is-editing) .slide-edit-panel {
  display: none;
}

.slide-view-panel {
  font-size: 0.86rem;
}

.slide-outline.is-editing .slide-view-panel {
  display: none;
}

.slide-view-block {
  border-top: 1px solid var(--line);
  padding-top: 0.45rem;
  margin-top: 0.45rem;
}

.slide-view-block p {
  color: var(--muted);
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
}

.slide-view-block small {
  color: var(--muted);
}

.slide-view-panel summary,
.slide-edit-panel summary {
  color: var(--text);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
}

.slide-block-editor {
  display: grid;
  gap: 0.55rem;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.slide-block-editor textarea {
  min-height: 90px;
}

.slide-block-editor textarea:disabled,
.slide-block-editor button:disabled {
  opacity: 0.62;
}

.add-slide-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: 1rem;
}

.outline-part {
  align-items: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: inherit;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  min-height: 4.25rem;
  padding: 0.75rem;
  text-decoration: none;
}

.outline-editor {
  grid-template-columns: 1.7rem minmax(0, 1fr);
  margin: 0;
}

.outline-editor .wide,
.outline-editor .outline-actions {
  grid-column: 1 / -1;
}

.outline-editor textarea {
  min-height: 96px;
  margin-top: 0.45rem;
}

.outline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.outline-actions a {
  color: var(--muted);
}

.outline-actions button {
  min-height: 34px;
  padding: 0 12px;
}

.outline-part strong,
.outline-part small {
  display: block;
}

.outline-part small {
  color: var(--muted);
  line-height: 1.35;
  margin-top: 0.25rem;
}

.outline-state {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 700;
  height: 1.45rem;
  justify-content: center;
  line-height: 1;
  margin-top: 0.1rem;
  width: 1.45rem;
}

.outline-bekend {
  border-color: rgba(76, 175, 80, 0.7);
}

.outline-bekend .outline-state {
  background: rgba(76, 175, 80, 0.2);
  color: #8dde91;
}

.outline-ontbreekt {
  border-color: rgba(255, 193, 7, 0.85);
}

.outline-ontbreekt .outline-state {
  background: rgba(255, 193, 7, 0.16);
  color: #ffd76a;
}

.service-completeness {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.section-chip {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  text-decoration: none;
}

.section-chip strong {
  font-size: 0.85rem;
  text-transform: capitalize;
}

.status-compleet {
  border-color: rgba(76, 175, 80, 0.7);
}

.status-incompleet {
  border-color: rgba(255, 193, 7, 0.85);
}

.status-niet_van_toepassing {
  opacity: 0.68;
}

.import-item {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(220px, 0.65fr);
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
}

.error-panel {
  border-color: rgba(255, 99, 99, 0.75);
}

@media (max-width: 720px) {
  .import-item {
    grid-template-columns: 1fr;
  }

  .slide-card-head,
  .add-slide-form {
    grid-template-columns: 1fr;
  }

  .slide-move-actions {
    width: 100%;
  }

  .slide-move-actions form {
    flex: 1;
  }
}
