html[data-theme="dark"] {
	color-scheme: dark;
	--dark-page-start: #16212d;
	--dark-page-mid: #0f1721;
	--dark-page-end: #090d14;
	--dark-panel: #121923;
	--dark-panel-elevated: #182332;
	--dark-panel-edge: #27364a;
	--dark-panel-edge-strong: #35506f;
	--dark-header-start: #2a3b52;
	--dark-header-end: #1a2737;
	--dark-copy: #d4dde7;
	--dark-copy-soft: #9fb0c3;
	--dark-copy-strong: #eff5fb;
	--dark-link: #84c5f4;
	--dark-link-hover: #c3e6ff;
	--dark-code: #0d131c;
	--dark-shadow: rgba(0, 0, 0, 0.42);
	--dark-accent: #4e85b8;
	--dark-accent-strong: #6ba5da;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
	background: var(--dark-page-mid);
	color: var(--dark-copy);
}

html[data-theme="dark"] body {
	background-image: radial-gradient(circle at top, var(--dark-page-start) 0%, var(--dark-page-mid) 54%, var(--dark-page-end) 100%);
}

html[data-theme="dark"] a,
html[data-theme="dark"] .postlink,
html[data-theme="dark"] .postlink:visited {
	color: var(--dark-link);
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] .postlink:hover,
html[data-theme="dark"] .forumbg .header a:hover,
html[data-theme="dark"] .forabg .header a:hover,
html[data-theme="dark"] th a:hover {
	color: var(--dark-link-hover);
}

html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] .content h2,
html[data-theme="dark"] .panel h2,
html[data-theme="dark"] .forum-title,
html[data-theme="dark"] .topic-title {
	color: var(--dark-copy-strong);
}

html[data-theme="dark"] hr {
	border-color: var(--dark-panel-edge);
	border-top-color: var(--dark-panel-edge);
}

html[data-theme="dark"] .wrap {
	background: rgba(8, 13, 20, 0.9);
	border-color: #1d2836;
	box-shadow: 0 20px 54px var(--dark-shadow);
}

html[data-theme="dark"] .headerbar,
html[data-theme="dark"] .forumbg,
html[data-theme="dark"] .forabg,
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .cp-main .panel-container,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .post,
html[data-theme="dark"] .bg1,
html[data-theme="dark"] .bg2,
html[data-theme="dark"] .bg3 {
	background-color: var(--dark-panel);
	background-image: none;
	color: var(--dark-copy);
}

html[data-theme="dark"] .headerbar,
html[data-theme="dark"] .forumbg,
html[data-theme="dark"] .forabg {
	background: linear-gradient(180deg, var(--dark-header-start) 0%, var(--dark-header-end) 100%);
	border-color: var(--dark-panel-edge-strong);
}

html[data-theme="dark"] .navbar {
	background: rgba(15, 22, 31, 0.96);
	border-color: #202d3f;
}

html[data-theme="dark"] .navlinks,
html[data-theme="dark"] .action-bar.bar-top,
html[data-theme="dark"] .action-bar.bar-bottom,
html[data-theme="dark"] .jumpbox-cat-link,
html[data-theme="dark"] .stat-block {
	border-color: var(--dark-panel-edge);
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .post,
html[data-theme="dark"] fieldset,
html[data-theme="dark"] .cp-main .panel,
html[data-theme="dark"] .cp-menu,
html[data-theme="dark"] .dropdown,
html[data-theme="dark"] .dropdown-extended ul li,
html[data-theme="dark"] .search-box .inputbox,
html[data-theme="dark"] .inputbox,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
	background-color: var(--dark-panel);
	border-color: #2d3a4c;
	color: var(--dark-copy);
}

html[data-theme="dark"] .row-item,
html[data-theme="dark"] li.row,
html[data-theme="dark"] li.header dt,
html[data-theme="dark"] li.header dd,
html[data-theme="dark"] table.table1 tbody tr,
html[data-theme="dark"] .bg1,
html[data-theme="dark"] .bg2,
html[data-theme="dark"] .bg3 {
	border-color: #1f2b3a;
}

html[data-theme="dark"] li.row:hover,
html[data-theme="dark"] table.table1 tbody tr:hover,
html[data-theme="dark"] .bg1:hover,
html[data-theme="dark"] .bg2:hover,
html[data-theme="dark"] .bg3:hover {
	background-color: var(--dark-panel-elevated);
}

html[data-theme="dark"] .site-description h1,
html[data-theme="dark"] .site-description p,
html[data-theme="dark"] .headerbar a,
html[data-theme="dark"] .forumbg .header,
html[data-theme="dark"] .forabg .header,
html[data-theme="dark"] th {
	color: var(--dark-copy-strong);
}

html[data-theme="dark"] .row-item,
html[data-theme="dark"] .row-item dt,
html[data-theme="dark"] .row-item dd,
html[data-theme="dark"] .row-item .list-inner,
html[data-theme="dark"] dl.row-item dt,
html[data-theme="dark"] dl.row-item dd,
html[data-theme="dark"] .forum-description,
html[data-theme="dark"] .forum-description li,
html[data-theme="dark"] .forum-description div,
html[data-theme="dark"] .lastpost,
html[data-theme="dark"] .topic-poster,
html[data-theme="dark"] .topic-time,
html[data-theme="dark"] .list-inner,
html[data-theme="dark"] .responsive-hide,
html[data-theme="dark"] .responsive-hide a {
	color: #dbe6f2;
}

html[data-theme="dark"] a.forumtitle,
html[data-theme="dark"] a.topictitle,
html[data-theme="dark"] a.lastsubject,
html[data-theme="dark"] .forum-title a,
html[data-theme="dark"] .topic-title a,
html[data-theme="dark"] .row-item a.forumtitle,
html[data-theme="dark"] .row-item a.topictitle,
html[data-theme="dark"] .row-item a.lastsubject {
	color: #f5f9ff;
	font-weight: 600;
}

html[data-theme="dark"] a.forumtitle:hover,
html[data-theme="dark"] a.topictitle:hover,
html[data-theme="dark"] a.lastsubject:hover,
html[data-theme="dark"] .forum-title a:hover,
html[data-theme="dark"] .topic-title a:hover,
html[data-theme="dark"] .row-item a.forumtitle:hover,
html[data-theme="dark"] .row-item a.topictitle:hover,
html[data-theme="dark"] .row-item a.lastsubject:hover {
	color: #ffffff;
}

html[data-theme="dark"] .postbody,
html[data-theme="dark"] .postbody .content,
html[data-theme="dark"] .content,
html[data-theme="dark"] .content p,
html[data-theme="dark"] .content li,
html[data-theme="dark"] .postbody p,
html[data-theme="dark"] .postbody li,
html[data-theme="dark"] .postbody dd,
html[data-theme="dark"] .postbody dt,
html[data-theme="dark"] .author,
html[data-theme="dark"] .postprofile .avatar-container + div {
	color: #e6edf6;
}

html[data-theme="dark"] .postbody h3,
html[data-theme="dark"] .postbody h3 a,
html[data-theme="dark"] .postbody .author a,
html[data-theme="dark"] .postbody .content a {
	color: #f5f9ff;
}

html[data-theme="dark"] .postbody .author,
html[data-theme="dark"] .postbody .author strong,
html[data-theme="dark"] .postbody .ignore,
html[data-theme="dark"] .topic-status,
html[data-theme="dark"] .forum-description,
html[data-theme="dark"] .search .author,
html[data-theme="dark"] .search .postbody {
	color: #cfdceb;
}

html[data-theme="dark"] .breadcrumbs .crumb,
html[data-theme="dark"] .breadcrumbs .crumb a,
html[data-theme="dark"] .navlinks a,
html[data-theme="dark"] .subforum.read,
html[data-theme="dark"] .subforum.unread,
html[data-theme="dark"] .icon.icon-black,
html[data-theme="dark"] .icon.icon-gray {
	color: #c3d1e0;
}

html[data-theme="dark"] .username,
html[data-theme="dark"] .username-coloured,
html[data-theme="dark"] .responsive-show a,
html[data-theme="dark"] .top i,
html[data-theme="dark"] .time,
html[data-theme="dark"] .search-box .inputbox::placeholder {
	color: var(--dark-copy-soft);
}

html[data-theme="dark"] .button,
html[data-theme="dark"] button,
html[data-theme="dark"] input.button1,
html[data-theme="dark"] input.button2,
html[data-theme="dark"] a.button1,
html[data-theme="dark"] a.button2 {
	background: linear-gradient(180deg, #345e89 0%, #274567 100%);
	border-color: #4a719d;
	color: #f4f8fc;
	text-shadow: none;
	box-shadow: none;
}

html[data-theme="dark"] .button:hover,
html[data-theme="dark"] button:hover,
html[data-theme="dark"] input.button1:hover,
html[data-theme="dark"] input.button2:hover,
html[data-theme="dark"] a.button1:hover,
html[data-theme="dark"] a.button2:hover {
	background: linear-gradient(180deg, #4171a0 0%, #31567d 100%);
	border-color: #5c88bb;
	color: #ffffff;
}

html[data-theme="dark"] .inputbox:hover,
html[data-theme="dark"] .inputbox:focus,
html[data-theme="dark"] select:hover,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:hover,
html[data-theme="dark"] textarea:focus {
	border-color: var(--dark-accent-strong);
	box-shadow: 0 0 0 2px rgba(107, 165, 218, 0.14);
	color: var(--dark-copy-strong);
}

html[data-theme="dark"] .tabs .tab > a,
html[data-theme="dark"] .tabs .activetab > a,
html[data-theme="dark"] .navigation a,
html[data-theme="dark"] .navigation .active-subsection a,
html[data-theme="dark"] .sub-panels ul li a,
html[data-theme="dark"] .sub-panels ul li.activetab a {
	background: var(--dark-panel);
	border-color: var(--dark-panel-edge);
	color: var(--dark-copy);
}

html[data-theme="dark"] .tabs .activetab > a,
html[data-theme="dark"] .navigation .active-subsection a,
html[data-theme="dark"] .sub-panels ul li.activetab a {
	background: var(--dark-panel-elevated);
	color: var(--dark-copy-strong);
}

html[data-theme="dark"] .dropdown,
html[data-theme="dark"] .dropdown-extended ul li,
html[data-theme="dark"] .dropdown-extended .header,
html[data-theme="dark"] .dropdown .pointer,
html[data-theme="dark"] .jumpbox .dropdown li,
html[data-theme="dark"] .jumpbox .dropdown li:hover {
	background: var(--dark-panel);
	color: var(--dark-copy);
}

html[data-theme="dark"] .dropdown .pointer-inner {
	border-bottom-color: var(--dark-panel);
}

html[data-theme="dark"] .dropdown .pointer {
	border-bottom-color: #2d3a4c;
}

html[data-theme="dark"] blockquote,
html[data-theme="dark"] code,
html[data-theme="dark"] pre {
	background: var(--dark-code);
	border-color: var(--dark-panel-edge);
	color: var(--dark-copy);
}

html[data-theme="dark"] .signature,
html[data-theme="dark"] .notice,
html[data-theme="dark"] .rules,
html[data-theme="dark"] .postprofile,
html[data-theme="dark"] .search .postbody,
html[data-theme="dark"] .stat-block,
html[data-theme="dark"] .footer-row,
html[data-theme="dark"] .copyright,
html[data-theme="dark"] .responsive-hide,
html[data-theme="dark"] .pagination li a,
html[data-theme="dark"] .pagination li span,
html[data-theme="dark"] .attachbox,
html[data-theme="dark"] .polls dl {
	border-color: var(--dark-panel-edge);
	color: #c8d4df;
}

html[data-theme="dark"] .pagination li.active span,
html[data-theme="dark"] .pagination li a:hover,
html[data-theme="dark"] .jumpbox-cat-link:hover {
	background: #213349;
	border-color: var(--dark-accent);
	color: var(--dark-copy-strong);
}

html[data-theme="dark"] .online,
html[data-theme="dark"] .bg-online {
	background-image: linear-gradient(90deg, rgba(92, 148, 205, 0.18), rgba(92, 148, 205, 0));
}

.theme-toggle {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 4px 10px;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

html[data-theme="dark"] .theme-toggle {
	background: rgba(9, 14, 22, 0.36);
	border-color: rgba(195, 230, 255, 0.14);
	color: var(--dark-copy-strong);
}

html[data-theme="dark"] .theme-toggle:hover {
	background: rgba(23, 35, 50, 0.92);
	border-color: rgba(195, 230, 255, 0.24);
	color: #ffffff;
	text-decoration: none;
}

html[data-theme="dark"] .site_logo {
	filter: brightness(0) invert(1) opacity(0.9) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.3));
}

html[data-theme="dark"] .forum_read,
html[data-theme="dark"] .forum_read_locked,
html[data-theme="dark"] .forum_read_subforum,
html[data-theme="dark"] .topic_read,
html[data-theme="dark"] .topic_read_mine,
html[data-theme="dark"] .topic_read_hot,
html[data-theme="dark"] .topic_read_hot_mine,
html[data-theme="dark"] .topic_read_locked,
html[data-theme="dark"] .topic_read_locked_mine,
html[data-theme="dark"] .sticky_read,
html[data-theme="dark"] .sticky_read_mine,
html[data-theme="dark"] .sticky_read_locked,
html[data-theme="dark"] .sticky_read_locked_mine,
html[data-theme="dark"] .global_read,
html[data-theme="dark"] .global_read_mine,
html[data-theme="dark"] .global_read_locked,
html[data-theme="dark"] .global_read_locked_mine,
html[data-theme="dark"] .pm_read {
	filter: saturate(0.5) brightness(0.72) contrast(1.05);
	opacity: 0.9;
}

html[data-theme="dark"] .forum_unread,
html[data-theme="dark"] .forum_unread_locked,
html[data-theme="dark"] .forum_unread_subforum,
html[data-theme="dark"] .topic_unread,
html[data-theme="dark"] .topic_unread_mine,
html[data-theme="dark"] .topic_unread_hot,
html[data-theme="dark"] .topic_unread_hot_mine,
html[data-theme="dark"] .topic_unread_locked,
html[data-theme="dark"] .topic_unread_locked_mine,
html[data-theme="dark"] .sticky_unread,
html[data-theme="dark"] .sticky_unread_mine,
html[data-theme="dark"] .sticky_unread_locked,
html[data-theme="dark"] .sticky_unread_locked_mine,
html[data-theme="dark"] .global_unread,
html[data-theme="dark"] .global_unread_mine,
html[data-theme="dark"] .global_unread_locked,
html[data-theme="dark"] .global_unread_locked_mine,
html[data-theme="dark"] .pm_unread {
	filter: saturate(0.85) brightness(1.05) contrast(1.08);
}

html[data-theme="dark"] .icon.fa-file-o,
html[data-theme="dark"] .icon.fa-file,
html[data-theme="dark"] .icon-red,
html[data-theme="dark"] .icon-blue {
	color: #9ccbf1;
}