.theme-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 8px; border: 1px solid #dce5f1; border-radius: 12px; background: #f7faff; color: #52647a; cursor: pointer; }
.theme-toggle[hidden] { display: none; }
.header-preferences { display: flex; align-items: center; flex-shrink: 0; gap: 3px; padding: 3px; border: 1px solid #dce5f1; border-radius: 12px; background: #fff; }
.header-preferences .theme-toggle { border: 0; background: transparent; border-radius: 8px; }
.header-preferences .language-menu { margin: 0; }
.header-preferences .language-menu > summary { border: 0; border-inline-start: 1px solid #e1e8f2; border-radius: 0; background: transparent; padding-block: 6px; }
[data-theme="dark"] .header-preferences { background: #1c2b40; border-color: #35465e; }
[data-theme="dark"] .header-preferences .theme-toggle, [data-theme="dark"] .header-preferences .language-menu > summary { background: transparent; }
[data-theme="dark"] .header-preferences .language-menu > summary { border-color: #35465e; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle:hover { color: #0055cc; border-color: #adc8f1; }
.theme-toggle:focus-visible { outline: 2px solid #3185ff; outline-offset: 3px; }
.theme-sun, [data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
/* A textarea wraps long addresses on phones while keeping native form submission. */
.input-row textarea#video-url { height: 56px; min-height: 56px; padding-block: 15px; line-height: 24px; resize: none; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 600px) {
 .input-row textarea#video-url { height: 136px; min-height: 136px; font-size: 16px; line-height: 24px; padding-block: 15px; padding-inline: 38px; }
 #parse-form .url-input-wrap .link-icon { top: 19px; transform: none; }
 #parse-form .url-input-wrap .clear-button { top: 11px; transform: none; }
 .header-inner { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 8px; }
 .header-inner > nav { order: 3; flex-basis: 100%; height: 34px; margin-inline-start: 0; }
 .header-inner .brand { margin-inline-end: auto; }
 .platform-menu .platform-options { top: var(--mobile-menu-top, 112px); max-height: calc(100dvh - var(--mobile-menu-top, 112px) - 16px); }
 .theme-toggle { width: 36px; height: 36px; flex-basis: 36px; padding: 7px; }
}
@media (max-width: 420px) { .header-inner .brand-logo { width: 130px; } }
html[data-theme="dark"] { color-scheme: dark; --tk-ink: #e3eaf5; --tk-muted: #a5b4ca; --tk-line: #304057; --tblr-body-bg: #0e1624; --tblr-body-color: #e3eaf5; --tblr-border-color: #304057; }
[data-theme="dark"] body { background: radial-gradient(ellipse 80% 450px at 20% 0, #182d4d, transparent), #0e1624; color: #e3eaf5; }
[data-theme="dark"] .site-header, [data-theme="dark"] .content-header { background: #111d2e; border-color: #2b3b52; }
[data-theme="dark"] .brand-logo { filter: brightness(0) invert(1); }
[data-theme="dark"] .theme-toggle { background: #1c2b40; border-color: #35465e; color: #e5c875; }
[data-theme="dark"] :is(.header-inner nav a, .platform-menu>summary, .language-menu summary, .content-header a) { color: #dce6f6; }
[data-theme="dark"] :is(.language-menu summary, .language-menu nav, .platform-menu .platform-options) { background: #18253a; border-color: #35465e; }
[data-theme="dark"] :is(.header-inner nav .platform-options a, .language-menu nav a) { color: #c9d6e9; }
[data-theme="dark"] :is(.header-inner nav .platform-options a:hover, .header-inner nav .platform-options a[aria-current], .language-menu nav a:hover, .language-menu nav a[aria-current]) { background: #233b5d; color: #94c4ff; box-shadow: none; }
[data-theme="dark"] .platform-current-icon { background: #eef4fc; border-radius: 5px; padding: 3px; box-sizing: content-box; }
[data-theme="dark"] .hero-kicker { background: #1b3352; color: #9bcbff; border-color: #2f527b; }
[data-theme="dark"] :is(.hero h1, .hero h1>span, .section-caption h2, .summary-text h2, .download-title h2, .panel-heading h3, .faq-grid summary, .steps-grid h3, .benefits-grid h3, .site-footer h2, .content-heading h1, .content-copy h2) { color: #e5edf9; }
[data-theme="dark"] :is(.hero-description, .input-meta, .parse-card .form-label, .section-caption>p, .benefits-grid p, .steps-grid p, .faq-grid p, .panel-heading p, .summary-text p, .download-title p, .result-heading>span, .feature-strip, .text-secondary) { color: #acbbd0 !important; }
[data-theme="dark"] :is(.card, .parse-card, .benefits-grid article, .steps-grid article, .faq-grid details, .resource-item, .resource-download, .site-share-options) { background: #18253a; border-color: #30425c; color: #dce6f6; }
[data-theme="dark"] :is(.video-summary, .summary-foot span, .direct-notice, .subtitle-notice, .empty-resources, .section-number, .step-number, .benefit-symbol) { background: #1d2d44; border-color: #30425c; color: #acbbd0; }
[data-theme="dark"] :is(.form-control, .form-select, .filter-label select, .share-content, .link-details textarea) { background: #101c2e; border-color: #3a4e69; color: #e0eafa; }
[data-theme="dark"] .form-control::placeholder { color: #8b9db6; }
[data-theme="dark"] .form-control:focus { border-color: #6ba9ff; box-shadow: 0 0 0 3px #3185ff26; }
[data-theme="dark"] :is(.paste-button, .resource-pagination .btn, .resource-actions .btn) { background: #23344c; color: #bdd6f7; border-color: #3a4e69; }
[data-theme="dark"] :is(.clear-button, .link-icon, .resource-meta, .cover-size-status, .link-details summary, .filter-label, .codec-line) { color: #a6b8cf; }
[data-theme="dark"] :is(.resource-tabs, .summary-foot, .link-details, .site-footer-bottom, .share-url) { border-color: #30425c; }
[data-theme="dark"] .resource-tab { color: #a9bbd4; }
[data-theme="dark"] :is(.resource-tab.active, .resource-tab:hover, .resource-download:hover) { background: #233e62; color: #9dccff; border-color: #4774a9; }
[data-theme="dark"] .tab-count { background: #2d405d; color: #d8e7fb; }
[data-theme="dark"] .site-footer { background: #111e30; border-color: #2a3b53; color: #b0bfd4; }
[data-theme="dark"] :is(.site-footer-links a, .site-footer-language-grid a, .site-footer-brand p, .copyright-line, .copyright-notice, .share-preview p, .share-url, .share-status) { color: #aebfd6 !important; }
[data-theme="dark"] :is(.site-share summary, .site-share .share-action) { background: #1d2e46; border-color: #3b5271; color: #bfd7f7; }
[data-theme="dark"] :is(.site-share summary:hover, .site-share .share-action:hover) { background: #284365; color: #e0efff; }
[data-theme="dark"] :is(.share-preview strong, .content-copy) { color: #e0eafa; }
[data-theme="dark"] :is(.share-brand, .section-caption>span, .source-label, .content-site a:not(.btn), .summary-text a) { color: #89bfff; }
[data-theme="dark"] .content-heading { background: linear-gradient(135deg,#1c3050,#18253a); border-color: #30425c; }
[data-theme="dark"] .copy-toast { background: #dbeafe; color: #14223a; }
[data-theme="dark"] :is(.result-heading h2, .cover-grid .resource-item-top strong) { color: #dce6f6; }
[data-theme="dark"] .source-label { background: #233e62; }
