/**
 * Custom HTML table / card chrome — theme-aware (light + dark).
 *
 * Ownership: presentation only. Colors from tokens-nettoge.css
 * (--surface-table-*, --border-table-*, --swl-table-modern-*, --color_text).
 *
 * Beats post-embedded <style> hardcodes (#fff / #f8f8f8 / …) via tokens + !important.
 * Does NOT override intentional meaning colors:
 *   - dye / rarity cells with inline style="background:…"
 *   - .arcwpn .stat-bar-fill gradients
 *   - .arcwpn .tier / .effects accents
 */

/* -------------------------------------------------------------------------- */
/* 0) Shared scope helpers (post content + editor canvas)                      */
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/* 1) Generic post-content table chrome (no intentional cell dye)              */
/*    Complements table-override.css / wp-blocks-nettoge.css.                  */
/* -------------------------------------------------------------------------- */

.editor-styles-wrapper table:not(.etb-table):not(.custom-table-1407):not(.wp-calendar-table):not(.sparkingzerocharacterunlock):not(.sparkingzeroepisode-table):not(.ff14d)
  :is(th, td):not([style*="background"]):not([style*="BACKGROUND"]):not([class*="-background-color"]),
body :is(.post_content, .entry-content, .wp-block-post-content)
  table:not(.etb-table):not(.custom-table-1407):not(.wp-calendar-table):not(.sparkingzerocharacterunlock):not(.sparkingzeroepisode-table):not(.ff14d)
  :is(th, td):not([style*="background"]):not([style*="BACKGROUND"]):not([class*="-background-color"]) {
  background: var(--surface-table-row-odd, var(--swl-table-modern-cell-bg)) !important;
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
  border-color: var(--border-table-row, var(--swl-table-modern-row-border)) !important;
}

.editor-styles-wrapper table:not(.etb-table):not(.custom-table-1407):not(.wp-calendar-table):not(.sparkingzerocharacterunlock):not(.sparkingzeroepisode-table):not(.ff14d)
  thead :is(th, td):not([style*="background"]):not([style*="BACKGROUND"]):not([class*="-background-color"]),
body :is(.post_content, .entry-content, .wp-block-post-content)
  table:not(.etb-table):not(.custom-table-1407):not(.wp-calendar-table):not(.sparkingzerocharacterunlock):not(.sparkingzeroepisode-table):not(.ff14d)
  thead :is(th, td):not([style*="background"]):not([style*="BACKGROUND"]):not([class*="-background-color"]) {
  background: var(--surface-table-header, var(--swl-table-modern-header-bg)) !important;
  color: var(--swl-table-modern-header-text, var(--color_text)) !important;
  border-color: var(--border-table-header-divider, var(--swl-table-modern-bottom-border)) !important;
}

.editor-styles-wrapper table:not(.etb-table):not(.custom-table-1407):not(.wp-calendar-table):not(.sparkingzerocharacterunlock):not(.sparkingzeroepisode-table):not(.ff14d)
  tbody tr:nth-child(even) > :is(th, td):not([style*="background"]):not([style*="BACKGROUND"]):not([class*="-background-color"]),
body :is(.post_content, .entry-content, .wp-block-post-content)
  table:not(.etb-table):not(.custom-table-1407):not(.wp-calendar-table):not(.sparkingzerocharacterunlock):not(.sparkingzeroepisode-table):not(.ff14d)
  tbody tr:nth-child(even) > :is(th, td):not([style*="background"]):not([style*="BACKGROUND"]):not([class*="-background-color"]) {
  background: var(--surface-table-row-even, var(--swl-table-modern-cell-bg)) !important;
}

.editor-styles-wrapper table:not(.etb-table):not(.custom-table-1407):not(.wp-calendar-table):not(.sparkingzerocharacterunlock):not(.sparkingzeroepisode-table):not(.ff14d)
  tbody tr:hover > :is(th, td):not([style*="background"]):not([style*="BACKGROUND"]):not([class*="-background-color"]),
body :is(.post_content, .entry-content, .wp-block-post-content)
  table:not(.etb-table):not(.custom-table-1407):not(.wp-calendar-table):not(.sparkingzerocharacterunlock):not(.sparkingzeroepisode-table):not(.ff14d)
  tbody tr:hover > :is(th, td):not([style*="background"]):not([style*="BACKGROUND"]):not([class*="-background-color"]) {
  background: var(--swl-table-modern-hover-bg, var(--nettoge-retro-table-hover)) !important;
}

/* Bootstrap-like class="table" in custom HTML (when not nested under .arcwpn — see §3) */
.editor-styles-wrapper table.table:not(.etb-table):not(.ff14d),
body :is(.post_content, .entry-content, .wp-block-post-content) table.table:not(.etb-table):not(.ff14d) {
  background: var(--surface-table-row-odd, var(--swl-table-modern-cell-bg)) !important;
  border-color: var(--border-table-row, var(--swl-table-modern-row-border)) !important;
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
}

/* -------------------------------------------------------------------------- */
/* 2) FF14 dye guide — .ff14d chrome (keep inline dye swatches / name cells)   */
/* -------------------------------------------------------------------------- */

.editor-styles-wrapper #ff14-dye-table-wrap,
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap {
  color: var(--nettoge-retro-table-cell-fg, var(--color_text)) !important;
  background: transparent !important;
}

.editor-styles-wrapper #ff14-dye-table-wrap h3.ff14d-sub,
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap h3.ff14d-sub {
  color: var(--color_htag, var(--color_text)) !important;
}

.editor-styles-wrapper #ff14-dye-table-wrap p.ff14d-note,
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap p.ff14d-note {
  color: var(--text-comment-muted, var(--nettoge-heading-muted)) !important;
}

.editor-styles-wrapper #ff14-dye-table-wrap table.ff14d,
.editor-styles-wrapper table.ff14d,
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d,
body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d {
  background: var(--surface-table-row-odd, var(--swl-table-modern-cell-bg)) !important;
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
  border-color: var(--border-table-row) !important;
}

.editor-styles-wrapper #ff14-dye-table-wrap table.ff14d th,
.editor-styles-wrapper table.ff14d th,
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d th,
body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d th {
  background: var(--surface-table-header, var(--swl-table-modern-header-bg)) !important;
  color: var(--swl-table-modern-header-text, var(--text-on-accent, #fff)) !important;
  border-color: var(--border-table-header-divider) !important;
}

.editor-styles-wrapper #ff14-dye-table-wrap table.ff14d td:not([style*="background"]):not([style*="BACKGROUND"]),
.editor-styles-wrapper table.ff14d td:not([style*="background"]):not([style*="BACKGROUND"]),
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d td:not([style*="background"]):not([style*="BACKGROUND"]),
body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d td:not([style*="background"]):not([style*="BACKGROUND"]) {
  background: var(--surface-table-row-odd, var(--swl-table-modern-cell-bg)) !important;
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
  border-bottom-color: var(--border-table-row, var(--swl-table-modern-row-border)) !important;
}

.editor-styles-wrapper #ff14-dye-table-wrap table.ff14d td[style*="background"],
.editor-styles-wrapper #ff14-dye-table-wrap table.ff14d td[style*="BACKGROUND"],
.editor-styles-wrapper table.ff14d td[style*="background"],
.editor-styles-wrapper table.ff14d td[style*="BACKGROUND"],
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d td[style*="background"],
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d td[style*="BACKGROUND"],
body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d td[style*="background"],
body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d td[style*="BACKGROUND"] {
  /* Keep dye fill/text; theme only the row divider */
  border-bottom-color: var(--border-table-row, var(--swl-table-modern-row-border)) !important;
}

.editor-styles-wrapper #ff14-dye-table-wrap table.ff14d tbody tr:last-child td,
.editor-styles-wrapper table.ff14d tbody tr:last-child td,
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d tbody tr:last-child td,
body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d tbody tr:last-child td {
  border-bottom-color: var(--border-table-header-divider, var(--swl-table-modern-bottom-border)) !important;
}

.editor-styles-wrapper #ff14-dye-table-wrap table.ff14d tr:hover td:not([style*="background"]):not([style*="BACKGROUND"]),
.editor-styles-wrapper table.ff14d tr:hover td:not([style*="background"]):not([style*="BACKGROUND"]),
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d tr:hover td:not([style*="background"]):not([style*="BACKGROUND"]),
body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d tr:hover td:not([style*="background"]):not([style*="BACKGROUND"]) {
  background: var(--swl-table-modern-hover-bg, var(--nettoge-retro-table-hover)) !important;
}

.editor-styles-wrapper #ff14-dye-table-wrap table.ff14d tr:hover td[style*="background"],
.editor-styles-wrapper #ff14-dye-table-wrap table.ff14d tr:hover td[style*="BACKGROUND"],
.editor-styles-wrapper table.ff14d tr:hover td[style*="background"],
.editor-styles-wrapper table.ff14d tr:hover td[style*="BACKGROUND"],
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d tr:hover td[style*="background"],
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d tr:hover td[style*="BACKGROUND"],
body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d tr:hover td[style*="background"],
body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d tr:hover td[style*="BACKGROUND"] {
  filter: brightness(1.04);
}

.editor-styles-wrapper #ff14-dye-table-wrap table.ff14d td.ff14d-num,
.editor-styles-wrapper table.ff14d td.ff14d-num,
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d td.ff14d-num,
body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d td.ff14d-num {
  color: var(--text-comment-muted, var(--nettoge-heading-muted)) !important;
}

.editor-styles-wrapper #ff14-dye-table-wrap table.ff14d td.ff14d-code,
.editor-styles-wrapper table.ff14d td.ff14d-code,
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d td.ff14d-code,
body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d td.ff14d-code {
  color: var(--text-comment-muted, var(--nettoge-heading-muted)) !important;
  font-family: var(--font-mono, ui-monospace, Menlo, Consolas, monospace);
}

/* Dye swatch chrome only — keep inline background; soften inset ring for dark */
.editor-styles-wrapper #ff14-dye-table-wrap table.ff14d td.ff14d-sw,
.editor-styles-wrapper table.ff14d td.ff14d-sw,
body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d td.ff14d-sw,
body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d td.ff14d-sw {
  box-shadow: inset 0 0 0 1px var(--border-table-row, rgba(0, 0, 0, 0.1));
}

/* -------------------------------------------------------------------------- */
/* 3) Arc Raiders weapons guide — .arcwpn table + card chrome                  */
/*    Preserve .stat-bar-fill gradients and .tier / .effects accents.          */
/* -------------------------------------------------------------------------- */

.editor-styles-wrapper .arcwpn,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn {
  color: var(--color_text) !important;
  background: transparent !important;
}

.editor-styles-wrapper .arcwpn .section-title,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .section-title {
  color: var(--color_htag, var(--color_text)) !important;
  background: var(--surface-table-header, var(--ntg-surface-2, var(--surface-table-row-even))) !important;
  border-bottom-color: var(--border-table-header-divider, var(--border-table-row)) !important;
}

.editor-styles-wrapper .arcwpn .stat-card,
.editor-styles-wrapper .arcwpn .recipe-card,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .stat-card,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .recipe-card {
  background: var(--surface-table-row-even, var(--ntg-surface-2, var(--swl-table-modern-cell-bg))) !important;
  border-color: var(--border-table-row, var(--swl-table-modern-row-border)) !important;
}

.editor-styles-wrapper .arcwpn .stat-card:hover,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .stat-card:hover {
  background: var(--surface-table-row-odd, var(--swl-table-modern-cell-bg)) !important;
  border-color: var(--ntg-crimson, var(--color_main, #c40000)) !important;
}

.editor-styles-wrapper .arcwpn .stat-label,
.editor-styles-wrapper .arcwpn .recipe-label,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .stat-label,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .recipe-label {
  color: var(--text-comment-muted, var(--nettoge-heading-muted)) !important;
}

.editor-styles-wrapper .arcwpn .stat-value,
.editor-styles-wrapper .arcwpn .recipe-header,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .stat-value,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .recipe-header {
  color: var(--color_htag, var(--color_text)) !important;
}

.editor-styles-wrapper .arcwpn .recipe-header,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .recipe-header {
  background: var(--surface-table-header, var(--ntg-surface-3, var(--surface-table-row-even))) !important;
  border-bottom-color: var(--border-table-header-divider, var(--border-table-row)) !important;
}

.editor-styles-wrapper .arcwpn .recipe-item,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .recipe-item {
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
  background: var(--surface-table-row-odd, var(--swl-table-modern-cell-bg)) !important;
}

.editor-styles-wrapper .arcwpn .stat-bar,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .stat-bar {
  background: var(--surface-table-row-even, var(--ntg-surface-3, #f0f0f0)) !important;
}

.editor-styles-wrapper .arcwpn .list li,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .list li {
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
  background: var(--surface-table-row-even, var(--ntg-surface-2, var(--swl-table-modern-cell-bg))) !important;
  border-color: var(--border-table-row, var(--swl-table-modern-row-border)) !important;
}

.editor-styles-wrapper .arcwpn .table,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .table,
.editor-styles-wrapper .etb-wrapper .arcwpn .table,
body :is(.post_content, .entry-content, .wp-block-post-content) .etb-wrapper .arcwpn .table {
  background: var(--surface-table-row-odd, var(--swl-table-modern-cell-bg)) !important;
  border-color: var(--border-table-row, var(--swl-table-modern-row-border)) !important;
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
}

.editor-styles-wrapper .arcwpn .table thead,
.editor-styles-wrapper .arcwpn .table th,
.editor-styles-wrapper .etb-wrapper .arcwpn .table th,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .table thead,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .table th,
body :is(.post_content, .entry-content, .wp-block-post-content) .etb-wrapper .arcwpn .table th {
  background: var(--surface-table-header, var(--swl-table-modern-header-bg)) !important;
  color: var(--swl-table-modern-header-text, var(--color_text)) !important;
  border-bottom-color: var(--border-table-header-divider, var(--swl-table-modern-bottom-border)) !important;
}

.editor-styles-wrapper .arcwpn .table td,
.editor-styles-wrapper .etb-wrapper .arcwpn .table td,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .table td,
body :is(.post_content, .entry-content, .wp-block-post-content) .etb-wrapper .arcwpn .table td {
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
  border-bottom-color: var(--border-table-row, var(--swl-table-modern-row-border)) !important;
  background: transparent !important;
}

.editor-styles-wrapper .arcwpn .table tbody tr:hover,
body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .table tbody tr:hover {
  background: var(--swl-table-modern-hover-bg, var(--nettoge-retro-table-hover)) !important;
}

/* -------------------------------------------------------------------------- */
/* 4) Dark mode — re-assert under html[data-nettoge-theme="dark"]             */
/*    Token values already remap in tokens-nettoge.css; selector raises        */
/*    cascade priority over post-embedded light-only hardcodes.                */
/* -------------------------------------------------------------------------- */

html[data-nettoge-theme="dark"] .editor-styles-wrapper #ff14-dye-table-wrap,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap {
  color: var(--color_text) !important;
  background: var(--surface-table-row-odd, var(--nettoge-retro-table-cell-bg)) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper #ff14-dye-table-wrap table.ff14d,
html[data-nettoge-theme="dark"] .editor-styles-wrapper table.ff14d,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d {
  background: var(--surface-table-row-odd, var(--nettoge-retro-table-cell-bg)) !important;
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper #ff14-dye-table-wrap table.ff14d th,
html[data-nettoge-theme="dark"] .editor-styles-wrapper table.ff14d th,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d th,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d th {
  background: var(--surface-table-header, var(--nettoge-retro-table-header-bg)) !important;
  color: var(--swl-table-modern-header-text, var(--nettoge-retro-table-header-fg)) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper #ff14-dye-table-wrap table.ff14d td:not([style*="background"]):not([style*="BACKGROUND"]),
html[data-nettoge-theme="dark"] .editor-styles-wrapper table.ff14d td:not([style*="background"]):not([style*="BACKGROUND"]),
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d td:not([style*="background"]):not([style*="BACKGROUND"]),
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d td:not([style*="background"]):not([style*="BACKGROUND"]) {
  background: var(--surface-table-row-odd, var(--nettoge-retro-table-cell-bg)) !important;
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
  border-bottom-color: var(--border-table-row, var(--nettoge-retro-table-border)) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper #ff14-dye-table-wrap table.ff14d td[style*="background"],
html[data-nettoge-theme="dark"] .editor-styles-wrapper #ff14-dye-table-wrap table.ff14d td[style*="BACKGROUND"],
html[data-nettoge-theme="dark"] .editor-styles-wrapper table.ff14d td[style*="background"],
html[data-nettoge-theme="dark"] .editor-styles-wrapper table.ff14d td[style*="BACKGROUND"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d td[style*="background"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d td[style*="BACKGROUND"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d td[style*="background"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d td[style*="BACKGROUND"] {
  border-bottom-color: var(--border-table-row, var(--nettoge-retro-table-border)) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper #ff14-dye-table-wrap table.ff14d tbody tr:last-child td,
html[data-nettoge-theme="dark"] .editor-styles-wrapper table.ff14d tbody tr:last-child td,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #ff14-dye-table-wrap table.ff14d tbody tr:last-child td,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) table.ff14d tbody tr:last-child td {
  border-bottom-color: var(--border-table-header-divider, var(--nettoge-retro-table-header-border)) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn {
  color: var(--color_text) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .table,
html[data-nettoge-theme="dark"] .editor-styles-wrapper .etb-wrapper .arcwpn .table,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .table,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .etb-wrapper .arcwpn .table {
  background: var(--surface-table-row-odd, var(--nettoge-retro-table-cell-bg)) !important;
  border-color: var(--border-table-row, var(--nettoge-retro-table-border)) !important;
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .table thead,
html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .table th,
html[data-nettoge-theme="dark"] .editor-styles-wrapper .etb-wrapper .arcwpn .table th,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .table thead,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .table th,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .etb-wrapper .arcwpn .table th {
  background: var(--surface-table-header, var(--nettoge-retro-table-header-bg)) !important;
  color: var(--swl-table-modern-header-text, var(--nettoge-retro-table-header-fg)) !important;
  border-bottom-color: var(--border-table-header-divider, var(--nettoge-retro-table-header-border)) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .table td,
html[data-nettoge-theme="dark"] .editor-styles-wrapper .etb-wrapper .arcwpn .table td,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .table td,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .etb-wrapper .arcwpn .table td {
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
  border-bottom-color: var(--border-table-row, var(--nettoge-retro-table-border)) !important;
  background: transparent !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .table tbody tr:hover,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .table tbody tr:hover {
  background: var(--swl-table-modern-hover-bg, var(--nettoge-retro-table-hover)) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .section-title,
html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .stat-card,
html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .recipe-card,
html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .recipe-header,
html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .recipe-item,
html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .list li,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .section-title,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .stat-card,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .recipe-card,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .recipe-header,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .recipe-item,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .list li {
  background: var(--surface-table-row-even, var(--nettoge-retro-table-stripe)) !important;
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
  border-color: var(--border-table-row, var(--nettoge-retro-table-border)) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .section-title,
html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .recipe-header,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .section-title,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .recipe-header {
  background: var(--surface-table-header, var(--nettoge-retro-table-header-bg)) !important;
  color: var(--swl-table-modern-header-text, var(--color_htag, var(--color_text))) !important;
  border-bottom-color: var(--border-table-header-divider, var(--nettoge-retro-table-header-border)) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .recipe-item,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .recipe-item {
  background: var(--surface-table-row-odd, var(--nettoge-retro-table-cell-bg)) !important;
}

html[data-nettoge-theme="dark"] .editor-styles-wrapper .arcwpn .stat-bar,
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn .stat-bar {
  background: var(--surface-table-row-even, var(--ntg-surface-3)) !important;
}

/*
 * Arc guide: dark remap for leftover inline light chrome.
 * - .arcwpn detail panels
 * - PvE/PvP tier ranking cards (outside .arcwpn; border-left + white bg)
 * Does not touch rarity gradients (linear-gradient … #ffffff) or colored rank badges.
 */
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) [style*="background-color: #f0f8ff"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) [style*="background-color:#f0f8ff"] {
  background-color: color-mix(in srgb, var(--color_text) 6%, var(--surface-table-row-odd, var(--nettoge-page-bg))) !important;
}

html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn [style*="background: #fff;"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn [style*="background:#fff;"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn [style*="background: #ffffff;"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn [style*="background:#ffffff;"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) [style*="border-left: 4px solid"][style*="background: #fff"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) [style*="border-left: 4px solid"][style*="background:#fff"] {
  background: var(--surface-table-row-odd, var(--nettoge-retro-table-cell-bg)) !important;
}

html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn [style*="color: #333"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn [style*="color:#333"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn [style*="color: #555"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn [style*="color:#555"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn [style*="color: #666"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn [style*="color:#666"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) [style*="border-left: 4px solid"] [style*="color: #333"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) [style*="border-left: 4px solid"] [style*="color:#333"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) [style*="border-left: 4px solid"] [style*="color: #555"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) [style*="border-left: 4px solid"] [style*="color:#555"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) [style*="border-left: 4px solid"] [style*="color: #666"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) [style*="border-left: 4px solid"] [style*="color:#666"] {
  color: var(--color_text) !important;
}

html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn [style*="border-top: 1px solid #f0f0f0"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) .arcwpn [style*="border-top:1px solid #f0f0f0"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) [style*="border-left: 4px solid"] [style*="border-top: 1px solid #f0f0f0"],
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) [style*="border-left: 4px solid"] [style*="border-top:1px solid #f0f0f0"] {
  border-top-color: var(--border-table-row, var(--nettoge-border-muted)) !important;
}

/* -------------------------------------------------------------------------- */
/* 5) Other post-embedded custom HTML chrome                                   */
/*    Keep meaning colors (skill dyes, rarity cells, stage hues, badges).      */
/* -------------------------------------------------------------------------- */

/* ARC materials / expedition tables (#arc-scope) */
.editor-styles-wrapper #arc-scope .arc-table,
body :is(.post_content, .entry-content, .wp-block-post-content) #arc-scope .arc-table {
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
  background: var(--surface-table-row-odd, var(--swl-table-modern-cell-bg)) !important;
}

.editor-styles-wrapper #arc-scope .arc-table th,
.editor-styles-wrapper #arc-scope .arc-table td,
body :is(.post_content, .entry-content, .wp-block-post-content) #arc-scope .arc-table th,
body :is(.post_content, .entry-content, .wp-block-post-content) #arc-scope .arc-table td {
  border-bottom-color: var(--border-table-row, var(--swl-table-modern-row-border)) !important;
}

.editor-styles-wrapper #arc-scope .arc-table thead th,
body :is(.post_content, .entry-content, .wp-block-post-content) #arc-scope .arc-table thead th {
  /* Keep blue header band — intentional UI accent */
  color: #fff !important;
}

html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #arc-scope .stage-1 td {
  background: color-mix(in srgb, #3b82f6 18%, var(--surface-table-row-odd)) !important;
}
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #arc-scope .stage-2 td {
  background: color-mix(in srgb, #10b981 18%, var(--surface-table-row-odd)) !important;
}
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #arc-scope .stage-3 td {
  background: color-mix(in srgb, #eab308 16%, var(--surface-table-row-odd)) !important;
}
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #arc-scope .stage-4 td {
  background: color-mix(in srgb, #a855f7 16%, var(--surface-table-row-odd)) !important;
}
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #arc-scope .stage-5 td {
  background: color-mix(in srgb, #f97316 16%, var(--surface-table-row-odd)) !important;
}
html[data-nettoge-theme="dark"] body :is(.post_content, .entry-content, .wp-block-post-content) #arc-scope .stage-6 td {
  background: color-mix(in srgb, #94a3b8 14%, var(--surface-table-row-odd)) !important;
}

/* MHWilds skill/amulet simulator — chrome only (keep .s*-g* / rarity-cell-*) */
.editor-styles-wrapper .custom-skill-table-wrapper,
body :is(.post_content, .entry-content, .wp-block-post-content) .custom-skill-table-wrapper {
  color: var(--color_text) !important;
}

.editor-styles-wrapper .custom-skill-table-wrapper .legend-box,
body :is(.post_content, .entry-content, .wp-block-post-content) .custom-skill-table-wrapper .legend-box {
  background-color: var(--surface-table-row-even, var(--nettoge-retro-table-stripe)) !important;
  border-color: var(--border-table-row, var(--nettoge-border-muted)) !important;
}

.editor-styles-wrapper .custom-skill-table-wrapper .legend-title,
.editor-styles-wrapper .custom-skill-table-wrapper .legend-text,
body :is(.post_content, .entry-content, .wp-block-post-content) .custom-skill-table-wrapper .legend-title,
body :is(.post_content, .entry-content, .wp-block-post-content) .custom-skill-table-wrapper .legend-text {
  color: var(--color_text) !important;
  border-top-color: var(--border-table-row, var(--nettoge-border-muted)) !important;
}

.editor-styles-wrapper .custom-skill-table-wrapper table,
body :is(.post_content, .entry-content, .wp-block-post-content) .custom-skill-table-wrapper table {
  border-color: var(--border-table-header-divider, var(--color_text)) !important;
}

.editor-styles-wrapper .custom-skill-table-wrapper th,
.editor-styles-wrapper .custom-skill-table-wrapper td,
body :is(.post_content, .entry-content, .wp-block-post-content) .custom-skill-table-wrapper th,
body :is(.post_content, .entry-content, .wp-block-post-content) .custom-skill-table-wrapper td {
  border-color: var(--border-table-row, var(--nettoge-border-muted)) !important;
}

.editor-styles-wrapper .custom-skill-table-wrapper td:not([class*="rarity-cell"]):not([class*="s1-"]):not([class*="s2-"]):not([class*="s3-"]):not(.colored-cell),
body :is(.post_content, .entry-content, .wp-block-post-content) .custom-skill-table-wrapper td:not([class*="rarity-cell"]):not([class*="s1-"]):not([class*="s2-"]):not([class*="s3-"]):not(.colored-cell) {
  background-color: var(--surface-table-row-odd, var(--swl-table-modern-cell-bg)) !important;
  color: var(--swl-table-modern-cell-text, var(--color_text)) !important;
}

.editor-styles-wrapper .custom-skill-table-wrapper th,
body :is(.post_content, .entry-content, .wp-block-post-content) .custom-skill-table-wrapper th {
  background-color: var(--surface-table-header, var(--nettoge-retro-table-header-bg)) !important;
  color: var(--swl-table-modern-header-text, var(--text-on-accent, #fff)) !important;
}

.editor-styles-wrapper .custom-skill-table-wrapper .slot-group,
body :is(.post_content, .entry-content, .wp-block-post-content) .custom-skill-table-wrapper .slot-group {
  background: var(--surface-table-row-odd, var(--swl-table-modern-cell-bg)) !important;
  border-color: var(--border-table-row, var(--nettoge-border-muted)) !important;
}

/* XIVLauncher FAQ accordion */
.editor-styles-wrapper .xivlauncher-faq-item,
body :is(.post_content, .entry-content, .wp-block-post-content) .xivlauncher-faq-item {
  background-color: var(--surface-table-row-odd, var(--surface-widget, #fff)) !important;
  border-color: var(--border-table-row, var(--nettoge-border-muted)) !important;
  color: var(--color_text) !important;
}

.editor-styles-wrapper .xivlauncher-faq-item summary,
body :is(.post_content, .entry-content, .wp-block-post-content) .xivlauncher-faq-item summary {
  background-color: var(--surface-table-row-even, var(--nettoge-retro-table-stripe)) !important;
  color: var(--color_text) !important;
}

.editor-styles-wrapper .xivlauncher-faq-content,
body :is(.post_content, .entry-content, .wp-block-post-content) .xivlauncher-faq-content {
  border-top-color: var(--border-table-row, var(--nettoge-border-muted)) !important;
}

.editor-styles-wrapper .xivlauncher-faq-content h5,
body :is(.post_content, .entry-content, .wp-block-post-content) .xivlauncher-faq-content h5 {
  color: var(--color_htag, var(--color_text)) !important;
}

/* Project Zomboid B42 skill nodes */
.editor-styles-wrapper .b42-skill-node,
body :is(.post_content, .entry-content, .wp-block-post-content) .b42-skill-node {
  background: var(--surface-table-row-odd, var(--surface-widget, #fff)) !important;
  color: var(--color_text) !important;
  border-color: var(--border-table-row, var(--nettoge-border-muted)) !important;
}

.editor-styles-wrapper .b42-skill-tree-title,
.editor-styles-wrapper .b42-skill-col-title,
.editor-styles-wrapper .b42-skill-node-desc,
body :is(.post_content, .entry-content, .wp-block-post-content) .b42-skill-tree-title,
body :is(.post_content, .entry-content, .wp-block-post-content) .b42-skill-col-title,
body :is(.post_content, .entry-content, .wp-block-post-content) .b42-skill-node-desc {
  color: var(--color_text) !important;
}

/* BG3 / Anamnesis / Brio light text hardcodes on table chrome */
.editor-styles-wrapper .bg3,
body :is(.post_content, .entry-content, .wp-block-post-content) .bg3 {
  color: var(--color_text) !important;
}

.editor-styles-wrapper .bg3 th,
body :is(.post_content, .entry-content, .wp-block-post-content) .bg3 th {
  background: var(--surface-table-header, var(--nettoge-retro-table-header-bg)) !important;
  color: var(--swl-table-modern-header-text, var(--text-on-accent, #fff)) !important;
}

.editor-styles-wrapper .anamnesis-card-title,
.editor-styles-wrapper .anamnesis-label,
.editor-styles-wrapper .brioicon1-table,
body :is(.post_content, .entry-content, .wp-block-post-content) .anamnesis-card-title,
body :is(.post_content, .entry-content, .wp-block-post-content) .anamnesis-label,
body :is(.post_content, .entry-content, .wp-block-post-content) .brioicon1-table {
  color: var(--color_text) !important;
}

.editor-styles-wrapper .stalker2-table tr:hover,
body :is(.post_content, .entry-content, .wp-block-post-content) .stalker2-table tr:hover {
  background: var(--swl-table-modern-hover-bg, var(--nettoge-retro-table-hover)) !important;
}

.editor-styles-wrapper .item-name,
body :is(.post_content, .entry-content, .wp-block-post-content) .item-name {
  color: var(--color_text) !important;
  background: var(--surface-table-row-odd, var(--surface-widget, #fff)) !important;
}

/* MH badges — chrome white only; keep .mh-badge.white rarity meaning */
.editor-styles-wrapper .mh-badge:not(.white),
.editor-styles-wrapper .mh-skill-badge,
body :is(.post_content, .entry-content, .wp-block-post-content) .mh-badge:not(.white),
body :is(.post_content, .entry-content, .wp-block-post-content) .mh-skill-badge {
  background: var(--surface-table-row-odd, var(--surface-widget, #fff)) !important;
  color: var(--color_text) !important;
  border-color: var(--border-table-row, var(--nettoge-border-muted)) !important;
}
