/* Bootstrap Tools dark palette. Bootstrap 5.3 variables cover standard controls; these rules
   cover bespoke widgets and previous fixed colors without changing their dimensions. */
@media screen {
:root[data-site-theme="dark"] {
  --tool-blue: #9abfe0;
  --tool-blue-dark: #bed8ed;
  --tool-paper: #191b1e;
  --tool-bg: #0d0e10;
  --tool-ink: #e9e9eb;
  --tool-border: #383a40;
  --tool-added: #1b4031;
  --tool-removed: #502a35;
  --bs-body-bg: #0d0e10;
  --bs-body-color: #e9e9eb;
  --bs-secondary-color: #aaadb5;
  --bs-tertiary-bg: #202226;
  --bs-border-color: #383a40;
  --bs-primary-rgb: 154, 191, 224;
  --bs-link-color-rgb: 154, 191, 224;
}
:root[data-site-theme="dark"] body { background: var(--tool-bg); color: var(--tool-ink); }
:root[data-site-theme="dark"] .tool-header { background: #141518; }
:root[data-site-theme="dark"] .tool-header .brand img { filter: brightness(0) saturate(100%) invert(81%) sepia(11%) saturate(1001%) hue-rotate(170deg); }
:root[data-site-theme="dark"] .tool-site-link:hover,
:root[data-site-theme="dark"] .tool-site-link:focus-visible,
:root[data-site-theme="dark"] .tool-dropdown-toggle[aria-expanded="true"] { background: #292b30; }
:root[data-site-theme="dark"] .tool-nav-dropdown-menu,
:root[data-site-theme="dark"] .tool-mobile-panel { background: #191b1e; }
:root[data-site-theme="dark"] .tool-nav-dropdown-menu a:hover,
:root[data-site-theme="dark"] .tool-nav-dropdown-menu a:focus-visible,
:root[data-site-theme="dark"] .tool-mobile-panel nav > a:hover,
:root[data-site-theme="dark"] .tool-mobile-group summary:hover,
:root[data-site-theme="dark"] .tool-mobile-panel nav .tool-mobile-group > a:hover { background: #292b30; }
:root[data-site-theme="dark"] .tool-mobile-language, :root[data-site-theme="dark"] .tool-mobile-theme { border-color: var(--tool-border); }
:root[data-site-theme="dark"] .tool-section-word, :root[data-site-theme="dark"] .tool-headline { color: #e8e8ea; text-shadow: none; }
:root[data-site-theme="dark"] .tool-intro { border-bottom-color: var(--tool-border); }
:root[data-site-theme="dark"] .tool-page-card,
:root[data-site-theme="dark"] .editor-card,
:root[data-site-theme="dark"] .feature-card,
:root[data-site-theme="dark"] .result-toolbar,
:root[data-site-theme="dark"] .diff-output { background: var(--tool-paper); border-color: var(--tool-border); color: var(--tool-ink); }
:root[data-site-theme="dark"] .future-card,
:root[data-site-theme="dark"] .empty-state { background: #222428; border-color: var(--tool-border); color: var(--tool-ink); }
:root[data-site-theme="dark"] .feature-icon.subtle { background: #34373d; color: #d5d7dc; }
:root[data-site-theme="dark"] .privacy-tag { background: #242e38; color: #c5dded; }
:root[data-site-theme="dark"] .tool-footer { background: #131416; }
:root[data-site-theme="dark"] .tool-parallax { background-color: #101113; background-image: linear-gradient(rgb(8 9 10 / .28),rgb(8 9 10 / .28)), url('../../images/backgrounds/home.jpg'); }
:root[data-site-theme="dark"] .tool-header .tool-mobile-toggle,
:root[data-site-theme="dark"] .tool-lang, :root[data-site-theme="dark"] .tool-mobile-group summary,
:root[data-site-theme="dark"] .tool-mobile-panel nav > a { color: #9abfe0; }
:root[data-site-theme="dark"] .tool-mobile-panel-head { background: #292d33; }
:root[data-site-theme="dark"] .tool-header .tool-site-link { color: #9abfe0; }
:root[data-site-theme="dark"] .tool-header .tool-nav-dropdown-menu a { color: #a7c9e3; }
:root[data-site-theme="dark"] .tool-section-icon, :root[data-site-theme="dark"] .feature-icon { background: #376c91; }
:root[data-site-theme="dark"] .btn-primary {
  --bs-btn-bg: #376c91; --bs-btn-border-color: #376c91;
  --bs-btn-hover-bg: #457da3; --bs-btn-hover-border-color: #457da3;
  --bs-btn-active-bg: #4b84a9; --bs-btn-active-border-color: #4b84a9;
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff;
}
:root[data-site-theme="dark"] .btn-outline-primary { --bs-btn-color: #a9d7f5; --bs-btn-border-color: #6198bf; --bs-btn-hover-color: #121315; --bs-btn-hover-bg: #a9d7f5; --bs-btn-hover-border-color: #a9d7f5; }
:root[data-site-theme="dark"] .btn-outline-dark { --bs-btn-color: #ececef; --bs-btn-border-color: #9fa3ab; --bs-btn-hover-bg: #ececef; --bs-btn-hover-color: #111215; }
:root[data-site-theme="dark"] .form-control,
:root[data-site-theme="dark"] .form-select,
:root[data-site-theme="dark"] .input-group-text { background-color: #131518; color: #eeeeef; border-color: #393d43; }
:root[data-site-theme="dark"] .form-control::placeholder { color: #a9aab0; opacity: 1; }
:root[data-site-theme="dark"] .form-control:focus,
:root[data-site-theme="dark"] .form-select:focus { background-color: #191b1e; color: #fff; }
:root[data-site-theme="dark"] .form-control:disabled,
:root[data-site-theme="dark"] .form-select:disabled { background: #26282c; color: #9c9ea5; }
:root[data-site-theme="dark"] .form-text, :root[data-site-theme="dark"] .text-secondary { color: #aaadb5 !important; }
:root[data-site-theme="dark"] .breadcrumb-item.active { color: #babcc2; }
:root[data-site-theme="dark"] .badge.text-bg-light { background: #292c30 !important; color: #dee1e7 !important; border-color: #484c52 !important; }
:root[data-site-theme="dark"] .stat-chip { color: #c4c6ca; }
:root[data-site-theme="dark"] .stat-chip.added { background: #1b4031; border-color: #306e4f; color: #b5edce; }
:root[data-site-theme="dark"] .stat-chip.removed { background: #502a35; border-color: #864557; color: #ffd0d9; }
:root[data-site-theme="dark"] .diff-row, :root[data-site-theme="dark"] .diff-grid-row { border-bottom-color: #35383c; }
:root[data-site-theme="dark"] .diff-row .line-number + .line-number,
:root[data-site-theme="dark"] .line-number,
:root[data-site-theme="dark"] .diff-grid-header > div + div,
:root[data-site-theme="dark"] .diff-grid-row > div + div { border-color: #383a40; }
:root[data-site-theme="dark"] .diff-row-heading,
:root[data-site-theme="dark"] .diff-grid-header { background: #27292d; color: #c4c6cd; }
:root[data-site-theme="dark"] .line-number { background: #16181a; color: #a3a5ac; }
:root[data-site-theme="dark"] .diff-placeholder { background: #141618; }
:root[data-site-theme="dark"] .token-added { background: #2f7150; color: #f1fff7; }
:root[data-site-theme="dark"] .token-removed { background: #96505b; color: #fff4f5; }
:root[data-site-theme="dark"] .code-editor,
:root[data-site-theme="dark"] .formatter-code,
:root[data-site-theme="dark"] .hex-table-scroller,
:root[data-site-theme="dark"] .b64-text-preview,
:root[data-site-theme="dark"] .b64-hex-preview { background: #131518; border-color: #393d43; color: #e9e9eb; }
:root[data-site-theme="dark"] #diff-app .editor-card.diff-file-over .code-editor { background: #273b4b; }
:root[data-site-theme="dark"] .formatter-gutter { background: #202226; color: #afb1b8; border-color: var(--tool-border); }
:root[data-site-theme="dark"] .formatter-pre { color: #eeeeef; }
:root[data-site-theme="dark"] .formatter-placeholder { color: #b5b6bd; }
:root[data-site-theme="dark"] .formatter-status,
:root[data-site-theme="dark"] .metadata-status,
:root[data-site-theme="dark"] .pdf-merge-status { background: #26292d; color: #dadce0; }
:root[data-site-theme="dark"] .formatter-status.ok,
:root[data-site-theme="dark"] .metadata-status.text-success,
:root[data-site-theme="dark"] .pdf-merge-status.is-success { background: #203f33; color: #b6edd0 !important; }
:root[data-site-theme="dark"] .formatter-status.error,
:root[data-site-theme="dark"] .metadata-status.text-danger,
:root[data-site-theme="dark"] .pdf-merge-status.is-error { background: #4d2b35; color: #ffd3da !important; }
:root[data-site-theme="dark"] .fmt-key, :root[data-site-theme="dark"] .fmt-attr { color: #cfabfa; }
:root[data-site-theme="dark"] .fmt-string, :root[data-site-theme="dark"] .fmt-value { color: #9ae2ad; }
:root[data-site-theme="dark"] .fmt-number, :root[data-site-theme="dark"] .fmt-cdata { color: #efc58a; }
:root[data-site-theme="dark"] .fmt-keyword, :root[data-site-theme="dark"] .fmt-tag { color: #8fc7fa; }
:root[data-site-theme="dark"] .fmt-comment, :root[data-site-theme="dark"] .fmt-pi { color: #a9b1d3; }
:root[data-site-theme="dark"] .formatter-validation-dialog { background: #191b1e; color: #e9e9eb; }
:root[data-site-theme="dark"] .hex-drop,
:root[data-site-theme="dark"] .metadata-drop,
:root[data-site-theme="dark"] .pdf-merge-drop { background: #21252a; border-color: #56768d; color: #c5deef; }
:root[data-site-theme="dark"] .hex-drop.dragover,
:root[data-site-theme="dark"] .metadata-drop.dragover,
:root[data-site-theme="dark"] .pdf-merge-drop.is-over { background: #293d4c; }
:root[data-site-theme="dark"] .hex-facts dt,
:root[data-site-theme="dark"] .hex-inspector-cell span,
:root[data-site-theme="dark"] .metadata-file-facts dt { color: #afb1b8; }
:root[data-site-theme="dark"] .hex-row { border-color: #34363a; }
:root[data-site-theme="dark"] .hex-row:nth-child(even) { background: #1f2125; }
:root[data-site-theme="dark"] .hex-heading { background: #303236 !important; color: #e1e3e8; }
:root[data-site-theme="dark"] .hex-offset { background: #23262a; border-color: #45484f; color: #b9bdc6; }
:root[data-site-theme="dark"] .hex-ascii { border-color: #45484f; }
:root[data-site-theme="dark"] .hex-byte:hover,
:root[data-site-theme="dark"] .hex-char:hover { background: #3d4853; }
:root[data-site-theme="dark"] .hex-byte.bom-byte,
:root[data-site-theme="dark"] .hex-char.bom-byte { color: #d4a8ff; }
:root[data-site-theme="dark"] .hex-inspector-cell { border-color: var(--tool-border); background: #222529; }
:root[data-site-theme="dark"] .html-preview-shell,
:root[data-site-theme="dark"] .b64-image-preview,
:root[data-site-theme="dark"] .metadata-preview { background: #131518; border-color: #383a40; }
/* HTML iframe and image previews retain original content/pixels. */
:root[data-site-theme="dark"] .html-preview-placeholder { background: #222429; color: #b7bac2; }
:root[data-site-theme="dark"] .metadata-preview-placeholder { color: #b9bbc2; }
:root[data-site-theme="dark"] .metadata-summary-item,
:root[data-site-theme="dark"] .metadata-option,
:root[data-site-theme="dark"] .metadata-group { background: #222428; border-color: var(--tool-border); }
:root[data-site-theme="dark"] .metadata-summary-label,
:root[data-site-theme="dark"] .metadata-raw { color: #b4b6bd; }
:root[data-site-theme="dark"] .metadata-summary-value,
:root[data-site-theme="dark"] .metadata-table tbody td { color: #e2e3e8; }
:root[data-site-theme="dark"] .metadata-location { background: #2c3137; }
:root[data-site-theme="dark"] .metadata-option-disabled { background: #26282c; }
:root[data-site-theme="dark"] .metadata-group > summary { background: #27292d; color: #e1e2e8; }
:root[data-site-theme="dark"] .metadata-group-count { background: #27292e; border-color: var(--tool-border); color: #d4d6dc; }
:root[data-site-theme="dark"] .metadata-table tbody th { background: #292b30; color: #caccd3; }
:root[data-site-theme="dark"] .pdf-merge-empty,
:root[data-site-theme="dark"] .pdf-merge-item,
:root[data-site-theme="dark"] .pdf-merge-summary { background: #222529; border-color: var(--tool-border); }
:root[data-site-theme="dark"] .pdf-merge-item.is-over { background: #303a43; }
:root[data-site-theme="dark"] .pdf-merge-number { background: #3c444d; color: #e5ebef; }
:root[data-site-theme="dark"] .pdf-merge-file-title { color: #e5e6eb; }
:root[data-site-theme="dark"] .pdf-merge-grip { color: #a4a6af; }
:root[data-site-theme="dark"] .skip-link { background: #191b1e; }
}
.tool-mobile-theme { border-top: 1px solid #e5e5e5; margin-top: .5rem; }
.tool-mobile-theme .site-theme-switch { color: var(--tool-blue); }
@media (min-width: 992px) and (max-width: 1230px) { .tool-header .tool-site-link { padding-inline: 9px; } .tool-header .tool-nav-container { padding-inline: 12px; } }

/* The appearance option belongs to the compact language preferences in the
   Bootstrap mobile drawer (Tools and Letter Studio). */
.tool-mobile-theme .site-theme-trigger { font: 600 .85rem/1.4 'Raleway', Arial, sans-serif; color: var(--tool-blue); border: 0; border-radius: 0; }
.tool-mobile-language { margin-top: 0; border-top: 0; }
:root[data-site-theme="dark"] .tool-mobile-panel .tool-mobile-theme .site-theme-trigger { color: #9abfe0; }

/* Keep keyboard navigation legible in both themes, without Bootstrap's light focus fill. */
:root[data-site-theme="dark"] .tool-mobile-panel nav > a:focus-visible,
:root[data-site-theme="dark"] .tool-mobile-panel .tool-mobile-group summary:focus-visible,
:root[data-site-theme="dark"] .tool-mobile-panel .tool-mobile-group > a:focus-visible { background-color: #292b30; }

/* Desktop Bootstrap: match the appearance picker (icon and chevron) to the
   navigation and language links in both color schemes. Mobile is unchanged. */
.tool-header .tool-site-menu > .site-theme-switch .site-theme-trigger {
  color: var(--tool-blue);
}
