html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    background: #ffffff;
    color: #172033;
}

html[data-theme="dark"] body {
    background: #101827;
    color: #e5e7eb;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
    padding-top: 0.75rem;
}

.ui-settings {
    align-items: end;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 0.75rem 1.5rem 0;
}

.ui-settings label {
    color: #2d3748;
    display: grid;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 0.25rem;
    min-width: 8.5rem;
}

html[data-theme="dark"] .ui-settings label,
html[data-theme="dark"] .home-shell p,
html[data-theme="dark"] .home-link span,
html[data-theme="dark"] .chapter-controls label,
html[data-theme="dark"] .chapter-control-group,
html[data-theme="dark"] .translation-chip span,
html[data-theme="dark"] .translation-layout-switch,
html[data-theme="dark"] .bible-text-size-control,
html[data-theme="dark"] .bible-text-size-control output,
html[data-theme="dark"] .options-select,
html[data-theme="dark"] .options-switch-grid .reader-hsk-exclusion,
html[data-theme="dark"] .options-tab,
html[data-theme="dark"] .options-version,
html[data-theme="dark"] .reader-speech-controls,
html[data-theme="dark"] .reader-speech-controls output,
html[data-theme="dark"] .cache-header p,
html[data-theme="dark"] .cache-translation-summary,
html[data-theme="dark"] .metric-label,
html[data-theme="dark"] .vocabulary-shell p,
html[data-theme="dark"] .vocabulary-panel label,
html[data-theme="dark"] .vocabulary-count,
html[data-theme="dark"] .vocabulary-empty,
html[data-theme="dark"] .practice-status,
html[data-theme="dark"] .practice-answer dt,
html[data-theme="dark"] .statistics-grid dt,
html[data-theme="dark"] .parallel-chapter-header p,
html[data-theme="dark"] .chapter-reader h5,
html[data-theme="dark"] .parallel-heading-cell h5,
html[data-theme="dark"] .verse-stack-headings h5 {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-control {
    background-color: #172033 !important;
    border-color: #475569 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] .btn-secondary {
    background-color: #475569 !important;
    border-color: #64748b !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .btn-primary {
    background-color: #2563eb !important;
    border-color: #1d4ed8 !important;
}

.reader-annotated-text {
    display: inline;
    line-height: 1.15;
    vertical-align: top;
}

html[data-theme="dark"] .chapter-controls,
html[data-theme="dark"] .translation-chip,
html[data-theme="dark"] .verse-stack-summary,
html[data-theme="dark"] .verse-stack-headings > div,
html[data-theme="dark"] .vocabulary-panel,
html[data-theme="dark"] .vocabulary-table th,
html[data-theme="dark"] .practice-question,
html[data-theme="dark"] .statistics-grid div {
    background: #172033 !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .translation-selector,
html[data-theme="dark"] .chapter-reader,
html[data-theme="dark"] .parallel-chapter-header,
html[data-theme="dark"] .parallel-heading-cell,
html[data-theme="dark"] .parallel-verse-cell,
html[data-theme="dark"] .verse-stack-reader,
html[data-theme="dark"] .verse-stack-summary span,
html[data-theme="dark"] .home-link,
html[data-theme="dark"] .vocabulary-empty,
html[data-theme="dark"] .vocabulary-table-wrap,
html[data-theme="dark"] .practice-card,
html[data-theme="dark"] .vocabulary-dialog,
html[data-theme="dark"] .options-button,
html[data-theme="dark"] .options-dialog,
html[data-theme="dark"] .options-tab.active,
html[data-theme="dark"] .cache-metrics > div,
html[data-theme="dark"] .cache-empty,
html[data-theme="dark"] .cache-translation-panel,
html[data-theme="dark"] .cache-table,
html[data-theme="dark"] .dictionary-popup {
    background: #111827 !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .home-link,
html[data-theme="dark"] .chapter-reader,
html[data-theme="dark"] .chapter-reader h4,
html[data-theme="dark"] .chapter-reader p,
html[data-theme="dark"] .translation-chip,
html[data-theme="dark"] .translation-chip button:hover:not(:disabled),
html[data-theme="dark"] .parallel-chapter-header h3,
html[data-theme="dark"] .parallel-chapter-header p,
html[data-theme="dark"] .parallel-heading-cell h4,
html[data-theme="dark"] .parallel-verse-cell p,
html[data-theme="dark"] .parallel-verse-cell .verse-text-line,
html[data-theme="dark"] .verse-stack-summary strong,
html[data-theme="dark"] .verse-stack-headings h4,
html[data-theme="dark"] .verse-stack-translation p,
html[data-theme="dark"] .verse-stack-translation .verse-text-line,
html[data-theme="dark"] .segmented-chinese-text,
html[data-theme="dark"] .reader-annotated-text .hanzi,
html[data-theme="dark"] .reader-annotated-text .pinyin,
html[data-theme="dark"] .vocabulary-table th,
html[data-theme="dark"] .vocabulary-table td,
html[data-theme="dark"] .practice-question,
html[data-theme="dark"] .practice-answer dd,
html[data-theme="dark"] .vocabulary-dialog h2,
html[data-theme="dark"] .options-button,
html[data-theme="dark"] .options-dialog,
html[data-theme="dark"] .options-dialog h2,
html[data-theme="dark"] .options-version dd,
html[data-theme="dark"] .cache-header h1,
html[data-theme="dark"] .metric-value,
html[data-theme="dark"] .cache-table,
html[data-theme="dark"] .cache-table th,
html[data-theme="dark"] .cache-table td,
html[data-theme="dark"] .statistics-grid dd,
html[data-theme="dark"] .dictionary-popup,
html[data-theme="dark"] .dictionary-popup h2,
html[data-theme="dark"] .dictionary-popup dd {
    color: #e5e7eb !important;
}

html[data-theme="dark"] .translation-chip button,
html[data-theme="dark"] .cache-book-row small,
html[data-theme="dark"] .dictionary-popup dt {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .options-tabs,
html[data-theme="dark"] .options-dialog header,
html[data-theme="dark"] .options-dialog footer,
html[data-theme="dark"] .cache-table-wrap,
html[data-theme="dark"] .cache-table th,
html[data-theme="dark"] .cache-table td {
    border-color: #334155 !important;
}

html[data-theme="dark"] .options-tab:hover,
html[data-theme="dark"] .options-tab:focus-visible,
html[data-theme="dark"] .cache-table th {
    background: #172033 !important;
}

html[data-theme="dark"] .options-tab.active,
html[data-theme="dark"] .cache-translation-toggle,
html[data-theme="dark"] .cache-translation-toggle code {
    color: #93c5fd !important;
}

html[data-theme="dark"] .cache-expand-icon {
    border-left-color: #93c5fd !important;
}

html[data-theme="dark"] .cache-bar {
    background: #263244 !important;
}

html[data-theme="dark"] .translation-chip button:hover:not(:disabled) {
    background: #263244 !important;
}

html[data-theme="dark"] .verse-read-start {
    color: #93c5fd !important;
}

html[data-theme="dark"] .verse-read-start:hover,
html[data-theme="dark"] .verse-read-start:focus-visible {
    background: #1e3a5f !important;
}

html[data-theme="dark"] .current-speech-verse {
    background: #3a2f13 !important;
    box-shadow: inset 0.25rem 0 0 #f59e0b !important;
}

html[data-theme="dark"] .parallel-verse-cell,
html[data-theme="dark"] .verse-stack-row + .verse-stack-row,
html[data-theme="dark"] .verse-stack-summary,
html[data-theme="dark"] .vocabulary-table th,
html[data-theme="dark"] .vocabulary-table td,
html[data-theme="dark"] .statistics-grid div {
    border-color: #334155 !important;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0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gMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Shared layout styles are global so every host renders the main content. */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

.page > main {
    flex: 1;
    min-width: 0;
    position: relative;
}

@media (max-width: 640.98px) {
    .ui-settings {
        align-items: stretch;
        flex-direction: column;
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }
}

@media (min-width: 641px) {
    .page > main > article {
        padding-left: 0.45rem !important;
        padding-right: 0.45rem !important;
    }
}
