/**
 * nw_dark.css — Forum (SMF) dark-mode overlay.
 *
 * Loaded directly (not through SMF's CSS minifier) by
 * forum/Themes/nukeworker21/nukeworker_header_smf.php, immediately after the
 * shared site-chrome assets (includes/nw_assets.php :: nw_head_assets()).
 * Because it is linked AFTER forum/Themes/nukeworker21/css/index.css and the
 * header's inline <style> block, its rules win on source order (plus, in a
 * few spots, higher specificity) without needing !important everywhere.
 *
 * Activation: the site-wide dark-mode toggle (#nw-theme-toggle in nwmenu.js)
 * sets data-theme="dark" on <html> and persists it to
 * localStorage['nw-theme']. A pre-paint snippet in nw_head_assets() applies
 * the attribute before first paint to avoid a flash of light theme. This
 * file does NOT add a toggle, a script, or new tokens — it only makes the
 * FORUM'S OWN chrome (SMF's index.css + the header's inline <style>) respond
 * to the attribute that already exists.
 *
 * Base body/.wrapper/link-color overrides are already handled site-wide by
 * includes/nw-components.css (html[data-theme="dark"] body / .wrapper / a).
 * This file covers everything specific to the SMF board UI: category and
 * title bars, message/board rows, posting areas, forms, buttons, quotes,
 * code blocks, tables, pagination, and info/error boxes.
 *
 * SMF core is untouched — this is a pure CSS overlay. Keep it that way:
 * do not copy whole rules out of index.css, only the properties that need
 * to change for dark mode.
 *
 * Palette (matches the rest of the site's dark theme / nw-components.css):
 *   page bg      #0f1720
 *   surface      #1a2430
 *   elevated/hov #202b36
 *   border       #2c3a4a
 *   text (main)  #d8dde3
 *   text (muted) #9fb0c0
 *   links        #8fbce6 (hover #FFD700)
 *   inputs/code  #131b24
 *
 * Brand-blue surfaces that are ALREADY dark-friendly (white text on the
 * #346699 -> #1e3c72 gradient family) are intentionally left alone:
 * .cat_bar, .section-header, h3.catbg, #footer. Avatars, user-posted
 * images, smileys, and membergroup star icons are never recolored.
 */

/* --------------------------------------------------------------------
   Page / outer chrome (SMF-specific; body/.wrapper/a base already done
   by includes/nw-components.css)
   -------------------------------------------------------------------- */
html[data-theme="dark"] html,
html[data-theme="dark"] {
	background: #0f1720;
}
html[data-theme="dark"] .optional-navigation {
	background-color: #0f1720;
}

/* Header inline <style> overrides (nukeworker_header_smf.php ~lines 19-217).
   These are low-specificity selectors in a plain <style> block, so
   html[data-theme="dark"] + the same selector beats them on specificity
   alone -- no !important needed here. */
html[data-theme="dark"] body {
	background-color: #0f1720;
}
html[data-theme="dark"] .optional-navigation,
html[data-theme="dark"] body .optional-navigation {
	background-color: #0f1720;
}
html[data-theme="dark"] .SmallWhite,
html[data-theme="dark"] .RegularWhite,
html[data-theme="dark"] .center,
html[data-theme="dark"] .align-right,
html[data-theme="dark"] .color-white {
	color: #d8dde3;
}
/* .section-header / .cat_bar keep the brand-blue gradient + white text
   on purpose -- already dark-friendly, no override needed. */

/* --------------------------------------------------------------------
   Global text/link/form base from SMF's own index.css (html/body reset,
   strong/headings default colors, disabled state, hr)
   -------------------------------------------------------------------- */
html[data-theme="dark"] strong,
html[data-theme="dark"] .strong,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
	color: #d8dde3;
}
html[data-theme="dark"] fieldset {
	border-color: #2c3a4a;
}
html[data-theme="dark"] fieldset legend {
	color: #9fb0c0;
}
html[data-theme="dark"] hr {
	background: #2c3a4a;
	box-shadow: 0 1px 0 #0f1720 inset;
}
html[data-theme="dark"] a.bbc_link {
	border-bottom-color: #3f5163;
}
html[data-theme="dark"] a.bbc_link:hover {
	border-bottom-color: #FFD700;
}

/* Forms: inputs, selects, textareas, buttons */
html[data-theme="dark"] input,
html[data-theme="dark"] button,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
	background: #131b24;
	color: #d8dde3;
	border-color: #2c3a4a;
	box-shadow: none;
}
html[data-theme="dark"] select option {
	background: #131b24;
	color: #d8dde3;
}
html[data-theme="dark"] input:hover,
html[data-theme="dark"] textarea:hover,
html[data-theme="dark"] button:hover,
html[data-theme="dark"] select:hover {
	border-color: #3f5163;
}
html[data-theme="dark"] textarea:hover {
	background: #182129;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] button:focus,
html[data-theme="dark"] select:focus {
	border-color: #6aa5db;
	background: #131b24;
}
html[data-theme="dark"] input[disabled],
html[data-theme="dark"] textarea[disabled],
html[data-theme="dark"] select[disabled],
html[data-theme="dark"] .button.disabled,
html[data-theme="dark"] .button[disabled]:hover {
	background: #182129;
	color: #6b7d8f;
	border-color: #2c3a4a;
}

/* --------------------------------------------------------------------
   Category / Title / Sub bars, Roundframe (board index & section chrome)
   -------------------------------------------------------------------- */
/* .cat_bar / h3.catbg keep the brand-blue gradient (already dark-friendly). */
html[data-theme="dark"] .title_bar {
	background: #202b36;
	color: #d8dde3;
	border-color: #2c3a4a;
	border-top-color: #ff9400;
	border-bottom-color: #bf6900;
}
html[data-theme="dark"] .sub_bar {
	background: none;
	border-bottom-color: #2c3a4a;
	box-shadow: 0 -1px 0 #3f5163 inset;
}
html[data-theme="dark"] h3.titlebg,
html[data-theme="dark"] h4.titlebg,
html[data-theme="dark"] .titlebg,
html[data-theme="dark"] h3.subbg,
html[data-theme="dark"] h4.subbg,
html[data-theme="dark"] .subbg {
	color: #d8dde3;
}
html[data-theme="dark"] .titlebg a,
html[data-theme="dark"] .subbg a {
	color: #d8dde3;
}
html[data-theme="dark"] .roundframe {
	background: #1a2430;
	border-color: #2c3a4a;
	box-shadow: none;
}

/* --------------------------------------------------------------------
   Board index / topic listing rows (windowbg family)
   -------------------------------------------------------------------- */
html[data-theme="dark"] .generic_list_wrapper,
html[data-theme="dark"] .windowbg,
html[data-theme="dark"] .approvebg,
html[data-theme="dark"] .approvebg2 {
	background: #1a2430;
	border-color: #2c3a4a;
	box-shadow: none;
	color: #d8dde3;
}
html[data-theme="dark"] .windowbg:nth-of-type(even),
html[data-theme="dark"] .bg.even {
	background: #1a2430;
}
html[data-theme="dark"] .windowbg:nth-of-type(odd),
html[data-theme="dark"] .bg.odd {
	background: #202b36;
}
html[data-theme="dark"] .windowbg:target {
	background: #3f3a1a;
}
html[data-theme="dark"] tr.windowbg:hover {
	background: #24313f;
}
html[data-theme="dark"] .windowbg.locked {
	background: #232b33;
}
html[data-theme="dark"] .windowbg.sticky {
	background: #1c3346;
}
html[data-theme="dark"] .windowbg.sticky.locked {
	background: #33291f;
}
html[data-theme="dark"] .windowbg.approvetopic {
	background: #5a3a24;
}
html[data-theme="dark"] .windowbg.approvepost {
	background: #4a2323;
}
html[data-theme="dark"] .subject_title a {
	color: #d8dde3;
}
html[data-theme="dark"] .page_number,
html[data-theme="dark"] .current_page {
	color: #d9a441;
}

/* --------------------------------------------------------------------
   Message view: post area, key info, inner message body, quotes, code
   -------------------------------------------------------------------- */
html[data-theme="dark"] .post {
	color: #d8dde3;
}
html[data-theme="dark"] .keyinfo .postinfo a,
html[data-theme="dark"] .keyinfo .postinfo a strong {
	color: #e0ae5f;
}
html[data-theme="dark"] .keyinfo .postinfo .modified {
	color: #9fb0c0;
}
html[data-theme="dark"] .inner {
	border-top-color: #2c3a4a;
	box-shadow: 0 1px 0 #0f1720 inset;
	color: #d8dde3;
}
html[data-theme="dark"] .postbg {
	border-left-color: #3f5163;
	border-right-color: #3f5163;
}
html[data-theme="dark"] .bbc_standard_quote {
	background-color: #1c2a3d;
}
html[data-theme="dark"] .bbc_alternate_quote {
	background-color: #182233;
}
html[data-theme="dark"] .codeheader,
html[data-theme="dark"] .quoteheader {
	color: #9fb0c0;
}
html[data-theme="dark"] .bbc_code {
	background: #131b24;
	border-color: #2c3a4a;
	border-top-color: #3f5163;
	border-bottom-color: #2c3a4a;
	color: #d8dde3;
}

/* --------------------------------------------------------------------
   Buttons, button lists, pagination
   -------------------------------------------------------------------- */
html[data-theme="dark"] .button,
html[data-theme="dark"] .quickbuttons > li > a,
html[data-theme="dark"] .inline_mod_check {
	color: #d3dde6;
	border-color: #3f5163 #2c3a4a #2c3a4a #3f5163;
	box-shadow: none;
}
html[data-theme="dark"] .pagesection .button {
	color: #8fbce6;
}
html[data-theme="dark"] .button:hover,
html[data-theme="dark"] .button:focus,
html[data-theme="dark"] .quickbuttons > li:hover > a,
html[data-theme="dark"] .quickbuttons > li > a:focus {
	color: #FFD700;
	border-color: #2c3a4a #3f5163 #3f5163 #2c3a4a;
	box-shadow: none;
}
html[data-theme="dark"] .button.active {
	background: #24547f;
	color: #fff;
	border-color: #2c5f5f;
}
html[data-theme="dark"] .button.active:hover,
html[data-theme="dark"] .button.active:focus {
	color: #FFD700;
	background: #24547f;
}
html[data-theme="dark"] .quickbuttons > li > a {
	color: #d3dde6;
}
html[data-theme="dark"] .post_options ul {
	background: #202b36;
	border-color: #3f5163 #2c3a4a #2c3a4a;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .post_options ul a:hover,
html[data-theme="dark"] .post_options ul a:focus {
	border-color: #3f5163;
}

/* --------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------- */
html[data-theme="dark"] table.table_grid {
	color: #d8dde3;
}
html[data-theme="dark"] .generic_list_wrapper table.table_grid {
	border-bottom-color: #2c3a4a;
}

/* --------------------------------------------------------------------
   Info / error / notice / desc boxes
   -------------------------------------------------------------------- */
html[data-theme="dark"] .information {
	background: #1a2430;
	border-color: #2c3a4a;
	color: #d8dde3;
}
html[data-theme="dark"] .errorbox {
	background-color: #3a1a1f;
	color: #f3d3d3;
	border-top-color: #a83c48;
	border-bottom-color: #a83c48;
}
html[data-theme="dark"] .noticebox {
	background: #3a331a;
	color: #e6d98f;
	border-top-color: #8f7a1f;
	border-bottom-color: #8f7a1f;
}
html[data-theme="dark"] .infobox {
	background: #1a3322;
	color: #bfe6c8;
	border-top-color: #2f7a45;
	border-bottom-color: #2f7a45;
}
html[data-theme="dark"] .descbox {
	border-color: #2c3a4a;
	color: #9fb0c0;
}

/* --------------------------------------------------------------------
   Popups (login/help/generic popup windows -- #smf_popup itself already
   gets z-index handling in the header's inline <style>; this covers colors)
   -------------------------------------------------------------------- */
html[data-theme="dark"] .popup_window {
	background: #1a2430;
	border-color: #2c3a4a;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
}
html[data-theme="dark"] .popup_heading {
	color: #d9a441;
}
html[data-theme="dark"] .popup_content {
	background: #1a2430;
	color: #d8dde3;
	border-color: #2c3a4a;
	box-shadow: none;
}
html[data-theme="dark"] .popup_container {
	background: rgba(5, 10, 15, 0.65);
}

/* --------------------------------------------------------------------
   Dropmenu / #top_info (SMF's own board-level dropdowns, distinct from
   the site's T1 #nwmenu -- covers hover states that reveal white bg)
   -------------------------------------------------------------------- */
html[data-theme="dark"] .auto_suggest_div {
	background: #1a2430;
	border-color: #2c3a4a;
}
html[data-theme="dark"] .auto_suggest_item {
	background: #202b36;
	color: #d8dde3;
}
html[data-theme="dark"] .auto_suggest_item_hover {
	background: #2c3a4a;
	color: #d8dde3;
}

/* --------------------------------------------------------------------
   NOTE / follow-up: the profile area, personal messages folder chrome,
   and calendar month-grid backgrounds share most of the above classes
   (.windowbg, .title_bar, .roundframe, .information, table.table_grid)
   and inherit these overrides for free. Calendar event/holiday text
   colors (.birthday/.event/.holiday) and membergroup star icons are left
   as-is per instructions (small color accents, not backgrounds, still
   legible on the new dark surfaces). If a specific profile/PM sub-view
   is found to still show a light panel after this pass, extend this
   file rather than editing index.css.
   -------------------------------------------------------------------- */

/* ======================================================================
   PHASE 2 — secondary views
   Profile, Personal Messages, Calendar, Memberlist/Search, Help.
   index.css (this theme) does not use several of the class names from
   the generic SMF/phase-1 brief (no .profileview, .profile_* blocks,
   .custom_fields_above_name, .detailed-info, .profileblock, or a
   calendar-grid stylesheet in THIS theme -- the calendar month grid and
   memberlist/search rows render through the same .windowbg / .roundframe
   / table.table_grid / .title_bar / .sub_bar surfaces already overridden
   above and need no new rules). What follows are the light surfaces
   verified still hard-coded in index.css after grepping it for every
   class named in the brief.
   ====================================================================== */

/* Profile: stat/activity + warning-level bars (.generic_bar/.progress_bar
   are white boxes with dark text in index.css ~2176-2243; used directly
   by the profile "View posts" counter-less bars and by .warning_level
   ~2516, and by #personal_messages .capacity_bar below). */
html[data-theme="dark"] .generic_bar,
html[data-theme="dark"] .progress_bar {
	background: #131b24;
	border-color: #2c3a4a;
	color: #d3dde6;
}
html[data-theme="dark"] .generic_bar span,
html[data-theme="dark"] .progress_bar span {
	text-shadow: none;
}

/* Profile: basic/detailed info panels (#basicinfo, #detailedinfo,
   #tracking -- index.css ~2298-2321 hard-codes a #ccc bottom border and
   #444 label text). */
html[data-theme="dark"] #detailedinfo dl,
html[data-theme="dark"] #tracking dl {
	border-bottom-color: #2c3a4a;
}
html[data-theme="dark"] #detailedinfo dt,
html[data-theme="dark"] #tracking dt {
	color: #9fb0c0;
}

/* Profile: activity-by-time bars (.activity_stats li span ~2356 is a
   light-grey #eee block with a #666 border, independent of .generic_bar). */
html[data-theme="dark"] .activity_stats li span {
	background: #131b24;
	border-color: #3f5163;
}

/* Profile: "View posts" / "View attachments" list separators and the
   big post-count numeral (.list_posts ~2401 has a white inset shadow;
   .counter ~2388 is dark grey text, invisible on the new dark surface). */
html[data-theme="dark"] .list_posts {
	border-top-color: #2c3a4a;
	box-shadow: 0 1px 0 #0f1720 inset;
}
html[data-theme="dark"] .counter {
	color: #d8dde3;
}

/* Signature block under each post (.signature ~3621 hard-codes a #bfbfbf
   top border + white inset shadow; shared by profile signature preview). */
html[data-theme="dark"] .signature,
html[data-theme="dark"] .custom_fields_above_signature,
html[data-theme="dark"] .custom_fields_below_signature {
	border-top-color: #2c3a4a;
	box-shadow: 0 1px 0 #0f1720 inset;
}

/* Personal Messages: capacity bar (#personal_messages .capacity_bar
   ~2596 is a light #f0f4f7 track with #adadad borders; .empty/.filled/
   .full fill colors are status accents and are left alone). */
html[data-theme="dark"] #personal_messages .capacity_bar {
	background: #131b24;
	border-color: #2c3a4a;
}
html[data-theme="dark"] #personal_messages .capacity_bar span {
	border-right-color: #2c3a4a;
}

/* Search: the plain (non-.roundframe) results wrapper and the advanced
   search alt panel border (#searchform .alt ~2721 sets only a border,
   inheriting whatever background is already dark via .windowbg/.roundframe
   above -- only the border needs correcting here). */
html[data-theme="dark"] #searchform .alt {
	border-top-color: #2c3a4a;
}

/* Help (?action=help): #helpmain ~2760 is a bordered panel with a white
   drop-shadow and no explicit background (so it already shows the dark
   page bg through), but the light #ddd border and white shadow remain. */
html[data-theme="dark"] #helpmain {
	border-color: #2c3a4a;
	box-shadow: 0 -2px 2px rgba(0, 0, 0, 0.5);
}

/* Boardslist link separators used on the help index and board-list style
   pages (.boardslist a ~2454 hard-codes a #c4c4c4 border). */
html[data-theme="dark"] .boardslist a {
	border-bottom-color: #2c3a4a;
}
html[data-theme="dark"] .boardslist a:hover {
	border-bottom-color: #8fbce6;
}

/* Confirmed already dark-friendly, intentionally NOT touched:
   - #footer (index.css ~1306): background:#3e5a78 (brand blue) with
     #fff text on li/p/a -- reads fine in dark mode as-is.
   - table.table_grid, .generic_list_wrapper, .windowbg, .roundframe,
     .title_bar, .sub_bar, .information/.errorbox/.noticebox/.infobox:
     memberlist rows, search result rows, PM folder/label lists, ban and
     warning notices, and the calendar month grid all render through
     these and inherit the phase-1 overrides with no dedicated markup of
     their own in this theme's index.css. */

/* ======================================================================
   PASS 3 -- comprehensive gray-on-gray sweep.
   Verified against DEV markup (board index, board,10.0 message index,
   topic,12812.0 display, ?action=login, ?action=search, ?action=mlist)
   fetched 2026-07-05. index.css re-grepped end to end for every
   background/color hex left over from passes 1-2. Sections below follow
   the brief's order: page chrome, board index, message index, topic
   display, quick reply/editor chrome, forms/controls, pagination/
   breadcrumbs, search/login/profile/PM, notices.
   ====================================================================== */

/* --------------------------------------------------------------------
   Page chrome: #wrapper / #top_section were still white (index.css
   ~1082/~1100), plus the "shared gradient" block (index.css ~3935-3953)
   that paints .dropmenu li ul/.top_menu/.button/#top_section/
   .popup_window/#inner_section/.post_options ul/.navigate_section ul/
   .popup_content/.up_contain with a light #e2e9f3->#fff gradient. That
   one block is the single biggest source of "light gray everywhere"
   left in the theme -- most of its selectors are already re-themed
   individually above/below, this just kills the shared gradient itself
   so nothing slips through on a selector we haven't named. */
html[data-theme="dark"] #wrapper {
	background: #1a2430;
	border-color: #2c3a4a;
	box-shadow: none;
}
html[data-theme="dark"] #top_section {
	background: #0f1720;
	border-bottom-color: #2c3a4a;
	box-shadow: none;
}
html[data-theme="dark"] #inner_section {
	background: #0f1720;
	background-image: none;
}
html[data-theme="dark"] .dropmenu li ul,
html[data-theme="dark"] .top_menu,
html[data-theme="dark"] .dropmenu li li:hover,
html[data-theme="dark"] .button,
html[data-theme="dark"] .dropmenu li li:hover > a,
html[data-theme="dark"] .dropmenu li li a:focus,
html[data-theme="dark"] .dropmenu li li a:hover,
html[data-theme="dark"] .quickbuttons > li,
html[data-theme="dark"] .quickbuttons li ul,
html[data-theme="dark"] .quickbuttons li ul li a:hover,
html[data-theme="dark"] .quickbuttons ul li a:focus,
html[data-theme="dark"] .inline_mod_check,
html[data-theme="dark"] .popup_window,
html[data-theme="dark"] .post_options ul,
html[data-theme="dark"] .post_options ul a:hover,
html[data-theme="dark"] .post_options ul a:focus,
html[data-theme="dark"] .notify_dropdown a:hover,
html[data-theme="dark"] .notify_dropdown a:focus {
	background: #202b36 !important;
	background-image: none !important;
}
html[data-theme="dark"] .button:hover,
html[data-theme="dark"] #search_form .button:hover,
html[data-theme="dark"] .quickbuttons li:hover {
	background: #24313f !important;
	background-image: none !important;
}
html[data-theme="dark"] .navigate_section ul,
html[data-theme="dark"] .popup_content,
html[data-theme="dark"] .up_contain {
	background: #1a2430 !important;
	background-image: none !important;
}

/* --------------------------------------------------------------------
   Breadcrumbs (.navigate_section -- the "Home > Board > Topic" bar).
   index.css ~1258-1279 gives it a white gradient bg (killed above),
   #444 link-adjacent text, a white text-shadow (invisible-on-dark
   halo), and a #ddd border. */
html[data-theme="dark"] .navigate_section ul {
	border-color: #2c3a4a;
	box-shadow: none;
}
html[data-theme="dark"] .navigate_section ul li {
	color: #9fb0c0;
	text-shadow: none;
}
html[data-theme="dark"] .navigate_section ul li .dividers {
	color: #6aa5db;
}
html[data-theme="dark"] .navigate_section a {
	color: #8fbce6;
}

/* --------------------------------------------------------------------
   Buttons / button text colors not yet covered (index.css ~1009-1049,
   ~1027, ~3335-3356): base button text #444, .pagesection .button #346,
   hover #222/#af6700, .button.active text shadow. quickbuttons hover.
   -------------------------------------------------------------------- */
html[data-theme="dark"] .button {
	color: #d3dde6;
}
html[data-theme="dark"] .pagesection .button {
	color: #8fbce6;
}
html[data-theme="dark"] .button:hover,
html[data-theme="dark"] .button:focus {
	color: #FFD700;
}
html[data-theme="dark"] .button.active {
	text-shadow: none;
}

/* --------------------------------------------------------------------
   Board index: category/board rows, board descriptions, last-post
   columns, toggle icon boxes, boardslist link separators (see also
   Phase-2 .boardslist rule further up -- this adds the missing hover
   affordance context + toggle icon box).
   -------------------------------------------------------------------- */
html[data-theme="dark"] .toggle_up::before,
html[data-theme="dark"] .toggle_down::before {
	background-color: #202b36;
	border-color: #3f5163;
	box-shadow: none;
}
html[data-theme="dark"] .toggle_up:hover::before,
html[data-theme="dark"] .toggle_down:hover::before {
	background-color: #2c3a4a;
}
html[data-theme="dark"] .up_contain {
	border-color: #2c3a4a;
}
html[data-theme="dark"] .children {
	border-top-color: #2c3a4a;
}
html[data-theme="dark"] .boardindex_table .board_stats p {
	border-left-color: #2c3a4a;
	border-right-color: #2c3a4a;
}
html[data-theme="dark"] .info .subject {
	color: #e0ae5f;
}

/* Info Center (stats + users online, board index footer). */
html[data-theme="dark"] #info_center .sub_bar {
	border-top-color: #2c3a4a;
}
html[data-theme="dark"] #ic_recentposts td {
	border-top-color: #2c3a4a;
}
html[data-theme="dark"] #ic_recentposts .recenttime strong {
	color: #9fb0c0;
}

/* --------------------------------------------------------------------
   Message index (topic lists): pagination page-number links, "sticky"
   background already handled above; add the missing striping variants
   that reuse the generic .stripes/.alternative utility classes (shared
   by memberlist/PM folder rows per index.css ~4028-4039).
   -------------------------------------------------------------------- */
html[data-theme="dark"] .stripes:nth-of-type(even),
html[data-theme="dark"] .alternative {
	background-color: #202b36;
}
html[data-theme="dark"] .stripes:nth-of-type(odd),
html[data-theme="dark"] .alternative2 {
	background-color: #1a2430;
}

/* --------------------------------------------------------------------
   Topic display: quote-block cite marker, generic/progress stat bars
   (profile + attachment-progress + #personal_messages capacity bar all
   share these), activity-by-time bars, list separators, signature and
   under_message dividers, poster's colored links stay as accent colors
   (already legible), draft-options panel, tooltip.
   -------------------------------------------------------------------- */
html[data-theme="dark"] blockquote cite {
	border-bottom-color: #2c3a4a;
}
html[data-theme="dark"] blockquote cite::before {
	color: #6b7d8f;
}
html[data-theme="dark"] .generic_bar,
html[data-theme="dark"] .progress_bar {
	color: #d3dde6;
}
html[data-theme="dark"] .generic_bar span,
html[data-theme="dark"] .progress_bar span {
	text-shadow: none;
}
html[data-theme="dark"] .post_draft_options,
html[data-theme="dark"] #post_draft_options {
	background: #1a2430;
	border-color: #3f5163 #2c3a4a #2c3a4a;
}
html[data-theme="dark"] #post_draft_options .settings dd,
html[data-theme="dark"] #post_draft_options .settings dt {
	border-top-color: #2c3a4a;
}
html[data-theme="dark"] #post_draft_options .settings strong {
	color: #9fb0c0;
}
html[data-theme="dark"] .tooltip {
	background: #202b36;
	color: #d8dde3;
	border-color: #3f5163;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------
   Forms / controls: fieldset legend already covered (base section);
   two-factor auth code box, coppa contact box, "pick theme" selected
   swatch, register-form valid/invalid input highlight.
   -------------------------------------------------------------------- */
html[data-theme="dark"] .tfacode {
	background: #1c2a3d;
	color: #d8dde3;
}
html[data-theme="dark"] .coppa_contact {
	background: #1a2430;
	color: #d8dde3;
	border-color: #3f5163;
}
html[data-theme="dark"] #pick_theme .selected {
	background: #24547f;
}
html[data-theme="dark"] .valid_input {
	background: #16321c;
}
html[data-theme="dark"] .invalid_input {
	background: #3a1a1f;
}

/* --------------------------------------------------------------------
   Personal Messages / Profile / rules list: addrules label color,
   file-error table (admin, low traffic but cheap to fix).
   -------------------------------------------------------------------- */
html[data-theme="dark"] dl.addrules dt.floatleft {
	color: #9fb0c0;
}
html[data-theme="dark"] .errorfile_table td {
	background: #131b24;
	color: #d8dde3;
}
html[data-theme="dark"] .errorfile_table .file_line {
	background: #1a2430;
}
html[data-theme="dark"] .errorfile_table .current {
	background: #4a2323;
}
html[data-theme="dark"] .errorfile_table .file_line.current {
	background: #5a2a2a;
}

/* --------------------------------------------------------------------
   Mentions/@who autocomplete popup (.atwho-view -- appears while typing
   a username in the post editor; white box otherwise untouched).
   -------------------------------------------------------------------- */
html[data-theme="dark"] .atwho-view {
	background: #202b36;
	border-color: #3f5163;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .atwho-view ul li {
	border-bottom-color: #2c3a4a;
}
html[data-theme="dark"] .atwho-view small {
	color: #9fb0c0;
}

/* --------------------------------------------------------------------
   Misc small text left gray on the new dark surfaces: "on X replies"
   style headers (#display_head p, index.css ~3979: hard #959595).
   -------------------------------------------------------------------- */
html[data-theme="dark"] #display_head p {
	color: #9fb0c0;
}

/* --------------------------------------------------------------------
   Known limitation (documented, not fixed): the SCEditor WYSIWYG
   post-editor body renders inside an <iframe> with its own internal
   stylesheet/inline styles written by SMF's default-theme JS
   (Themes/default/scripts/jquery.sceditor*.js + Themes/default/css/
   jquery.sceditor*.css). No selector in this file (which only affects
   the parent document) can reach into that iframe's document without
   patching SMF core, which is out of scope. The editor's OWN chrome --
   toolbar buttons, dropdowns, the textarea fallback, and the surrounding
   #post_header/#postmodify panel -- are covered by the base input/
   button/select/textarea rules plus .post_options/.atwho-view/tooltip
   rules above.
   -------------------------------------------------------------------- */

/* ====================================================================
   PASS 4 (2026-07-05): SCEditor toolbar chrome (Quick Reply / full post
   editor). The toolbar strip lives in the PARENT document (only the
   WYSIWYG typing area is an unreachable iframe — see the note above),
   so it IS themeable. Source of the light strip: Themes/default/css/
   jquery.sceditor.css — div.sceditor-toolbar { background:#f7f7f7;
   border-bottom:#c0c0c0 } on a white .sceditor-container.
   UPDATE (2026-07-18): the button chips are now themed too. The earlier
   pass left div.sceditor-group / .sceditor-button as light #ddd chips
   because the button icons are dark sprite glyphs (editor_sprite.png)
   that vanish on a dark chip. Those light patches read as broken in dark
   mode, so we darken the chips AND filter:invert() the sprite glyphs so
   they flip to light and stay legible. Text-label buttons (e.g. "More")
   and the colored smiley <img>s carry no sprite, so they are excluded
   from the invert.
   -------------------------------------------------------------------- */
html[data-theme="dark"] .sceditor-container {
    background: #1a2430;
    border-color: #2c3a4a;
}
html[data-theme="dark"] div.sceditor-toolbar {
    background: #16202b;
    border-bottom-color: #2c3a4a;
}
/* Button group chips: dark surface instead of the light #ddd. */
html[data-theme="dark"] div.sceditor-group {
    background: #243441;
    border-bottom-color: #45596c;
}
/* Sprite glyphs are dark — invert to light so they show on dark chips.
   Also covers the resize grip, which shares the same sprite. */
html[data-theme="dark"] .sceditor-button div,
html[data-theme="dark"] div.sceditor-grip {
    filter: invert(1);
}
/* Text-label buttons ("More", etc.) have no sprite — their div holds
   real text, so don't invert it. */
html[data-theme="dark"] .sceditor-button.text div,
html[data-theme="dark"] .text .sceditor-button div {
    filter: none;
}
/* SVG-icon builds (fallback path): light fill instead of #111. */
html[data-theme="dark"] .sceditor-button svg {
    fill: #d8dde3;
}
/* Hover / active: replace the bright white flash with a dark highlight. */
html[data-theme="dark"] .sceditor-button:hover,
html[data-theme="dark"] .sceditor-button:active,
html[data-theme="dark"] .sceditor-button.active {
    background: #33475b;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
/* Floating panels the toolbar opens (font/color pickers, link dialogs,
   the "MORE" smiley popup): dark surface + readable text; inputs inside
   are already themed by the base form rules in pass 1. */
html[data-theme="dark"] div.sceditor-dropdown,
html[data-theme="dark"] div.sceditor-smileyPopup {
    background: #1a2430;
    border-color: #2c3a4a;
    color: #d8dde3;
}
html[data-theme="dark"] div.sceditor-dropdown a,
html[data-theme="dark"] div.sceditor-dropdown label {
    color: #d8dde3;
}

/* ====================================================================
   PASS 5 (2026-07-06): recrawl for leftovers.
   Crawled logged-out (board index, board,10.0, topic,12812.0, recent,
   help, login, the guest error page for search/profile, printpage) --
   mlist/stats/who/calendar are login-gated for guests and render the
   login template, so their logged-in surfaces are covered statically
   below from index.css/calendar.css definitions. Print page assessed
   and intentionally left light (standalone template with its own
   black-on-white <style>; loads neither this file nor the theme toggle).
   ==================================================================== */

/* --------------------------------------------------------------------
   Topic display: generic blockquote frame (index.css ~332-339 gives all
   quote blocks a light #d6dfe2 border with 2px #aaa side rails -- the
   quote BACKGROUNDS were re-themed in pass 1, the frame was not).
   -------------------------------------------------------------------- */
html[data-theme="dark"] blockquote {
	border-color: #2c3a4a;
	border-left-color: #3f5163;
	border-right-color: #3f5163;
}

/* Poster column: author name links (.poster h4/h4 a and the online
   indicator, index.css ~3340/~3363, hard #c06002 -- too dim on the dark
   post surface; brightened to the same amber used for .keyinfo
   .postinfo links in pass 1). */
html[data-theme="dark"] .poster h4,
html[data-theme="dark"] .poster h4 a,
html[data-theme="dark"] .poster li:hover h4 a,
html[data-theme="dark"] .poster li h4 a,
html[data-theme="dark"] .poster h4 a:focus,
html[data-theme="dark"] .poster li.poster_online a {
	color: #e0ae5f;
}

/* Message index / topic icons legend: the .information strips inside
   #topic_icons and #messageindex re-set border-top to #ddd with ID
   specificity (index.css ~2966), which beats the generic .information
   override from pass 1 -- needs the same IDs here. */
html[data-theme="dark"] #topic_icons .information,
html[data-theme="dark"] #messageindex .information {
	border-top-color: #2c3a4a;
}

/* --------------------------------------------------------------------
   SMF dropmenu / #top_info dropdowns (profile, PM, alerts menus; the
   pass-3 gradient kill darkened their SURFACES but left index.css's
   light borders (~899: #999/#bbb/#ccc) and dark link text (~748 #333
   strong, ~800 #346 links, hover #333) untouched -- dark-on-dark).
   -------------------------------------------------------------------- */
html[data-theme="dark"] .dropmenu li ul,
html[data-theme="dark"] .top_menu {
	border-color: #2c3a4a;
}
html[data-theme="dark"] .dropmenu li strong {
	color: #d8dde3;
}
html[data-theme="dark"] .dropmenu li:hover li a,
html[data-theme="dark"] .dropmenu li li a {
	color: #8fbce6;
}
html[data-theme="dark"] .dropmenu li li:hover > a,
html[data-theme="dark"] .dropmenu li li a:focus,
html[data-theme="dark"] .dropmenu li li a:hover {
	color: #FFD700;
	border-color: #3f5163;
}

/* --------------------------------------------------------------------
   Page chrome stragglers: #inner_wrap (user strip under the top bar,
   renders on every page) keeps a #bbb bottom border (index.css ~1194);
   #ajax_in_progress is the JS-injected "Loading" banner (index.css
   ~584, white bg -- its orange border/text accents stay as-is).
   -------------------------------------------------------------------- */
html[data-theme="dark"] #inner_wrap {
	border-bottom-color: #2c3a4a;
}
html[data-theme="dark"] #ajax_in_progress {
	background: #1a2430;
}

/* --------------------------------------------------------------------
   Error template extras: .backtrace separators (shown to admins under
   fatal errors) and the .errorfile_table base surface (its td/.file_line
   cells were themed in pass 3, the table's own #f0f4f7 was not).
   -------------------------------------------------------------------- */
html[data-theme="dark"] .backtrace:not(:last-child) {
	border-bottom-color: #2c3a4a;
}
html[data-theme="dark"] .errorfile_table {
	background: #131b24;
}

/* --------------------------------------------------------------------
   Mobile (responsive.css <=720px): last-post block inside .up_contain
   keeps a #ddd top border.
   -------------------------------------------------------------------- */
@media screen and (max-width: 720px) {
	html[data-theme="dark"] .up_contain .lastpost {
		border-top-color: #2c3a4a;
	}
}

/* ====================================================================
   PASS 5 -- logged-in surfaces, covered STATICALLY from index.css /
   calendar.css (guests are redirected to login for these actions, so
   the selectors below are verified against the stylesheets + SMF 2.1
   default template structure, not against rendered dev markup).
   ==================================================================== */

/* Alerts / PM dropdowns in #top_info (index.css ~833-850): light #ddd
   separators and a #eee hover wash on the notification rows. Row text
   inherits the dark base; only borders/hover need re-theming. */
html[data-theme="dark"] .pm_unread,
html[data-theme="dark"] .alerts_unread {
	border-top-color: #2c3a4a;
}
html[data-theme="dark"] .unread_notify {
	border-bottom-color: #2c3a4a;
}
html[data-theme="dark"] .unread_notify:hover {
	background: #24313f;
}

/* PM folder: unread-message rows (index.css .unread_pm is the same
   light green as .infobox -- dark green tint keeps the semantic). */
html[data-theme="dark"] .unread_pm {
	background: #1a3322;
}

/* Post attachments footer strip (.attachments shares the .signature
   rule at index.css ~3629 -- #bfbfbf top border + white inset shadow --
   but was missed when .signature was themed in pass 2; .under_message
   removes its own border/shadow and needs nothing). */
html[data-theme="dark"] .attachments {
	border-top-color: #2c3a4a;
	box-shadow: 0 1px 0 #0f1720 inset;
}

/* --------------------------------------------------------------------
   Calendar (calendar.css, loaded only on ?action=calendar -- login-
   gated on this board). Month/week grids are hard light: #f0f4f7
   tables, #e7eaef header/week cells, #eee disabled days, #ddd cell
   borders, white "today"/hover cells, #555 week-view links.
   Semantic accents (.birthday/.event/.holiday text colors) are left
   as-is per pass-1 policy.
   -------------------------------------------------------------------- */
html[data-theme="dark"] #month_grid table,
html[data-theme="dark"] #main_grid table {
	background: #1a2430;
	border-color: #2c3a4a;
}
html[data-theme="dark"] #month_grid th:first-child,
html[data-theme="dark"] #month_grid th.days,
html[data-theme="dark"] #month_grid td.weeks,
html[data-theme="dark"] #main_grid th:first-child,
html[data-theme="dark"] #main_grid th.days,
html[data-theme="dark"] #main_grid td.weeks {
	background: #202b36;
}
html[data-theme="dark"] #main_grid td.disabled,
html[data-theme="dark"] #month_grid td.disabled {
	background: #131b24;
	border-color: #2c3a4a;
}
html[data-theme="dark"] #main_grid td.days,
html[data-theme="dark"] #month_grid td.days {
	border-right-color: #2c3a4a;
	border-bottom-color: #2c3a4a;
}
html[data-theme="dark"] #main_grid tbody tr:nth-child(2) td.days,
html[data-theme="dark"] #month_grid tbody tr:nth-child(2) {
	border-top-color: #2c3a4a;
}
html[data-theme="dark"] #main_grid tbody tr.days_wrapper > td:nth-child(2),
html[data-theme="dark"] #month_grid tr.days_wrapper > td:nth-child(2) {
	border-left-color: #2c3a4a;
}
html[data-theme="dark"] #main_grid tr.days_wrapper:nth-child(2) > td.weeks {
	border-top-color: #2c3a4a;
}
html[data-theme="dark"] #main_grid table:last-child td.weeks {
	border-bottom-color: #2c3a4a;
}
html[data-theme="dark"] .calendar_today {
	background: #1c3346;
}
html[data-theme="dark"] td.days:hover {
	background: #24313f;
}
html[data-theme="dark"] div.week_month_title a {
	color: #9fb0c0;
}
html[data-theme="dark"] div.week_add_event > a:hover {
	color: #FFD700;
}
html[data-theme="dark"] .event_wrapper:not(:last-child) {
	border-bottom-color: #2c3a4a;
}
@media (max-width: 665px) {
	html[data-theme="dark"] #main_grid .calendar_week tr {
		border-color: #2c3a4a !important;
	}
}
