/* ============================================================
   ericstrains.com — "glance pad" theme
   Black page, cream panels, red outlines and accents: the colours of the
   Collection page's glance pad, carried across the whole public site.

   This file is LAYERED OVER style.css (the "clean theme", which it does not
   change). It only loads, and body only gets .theme-pad, when SITE_THEME in
   includes/config.php is 'pad'. Set SITE_THEME to 'clean' to switch it off.
   /admin/ pages always stay on the clean theme.

   How it works: style.css is written with --c-* variables, so the theme
   mostly re-points those. On the black page they mean "lettering on black";
   inside a panel (the long selector list below) they go back to dark ink.
   ============================================================ */

body.theme-pad {
  /* The palette. Change a colour here. */
  --tp-black:       #000000;   /* the page */
  --tp-panel:       #f9f1dd;   /* panels */
  --tp-panel-2:     #f1e5c4;   /* a panel within a panel; hover on a panel */
  --tp-field:       #fffaf0;   /* text boxes */
  --tp-track:       #e4d7b3;   /* hairlines on a panel */
  --tp-ink:         #1c1917;   /* lettering on a panel */
  --tp-ink-soft:    #5f563f;
  --tp-ink-mute:    #7d7357;
  --tp-red:         #b3261e;   /* outlines, buttons, bars */
  --tp-red-dark:    #8a1c16;
  --tp-red-on-black:#e5493e;   /* red lettering on black (the plain red is too dim there) */

  /* What style.css's variables mean on the black page. */
  --c-bg:            var(--tp-black);
  --c-surface:       var(--tp-panel);
  --c-soft:          var(--tp-panel);
  --c-text:          #f9f1dd;
  --c-text-soft:     #d8cdae;
  --c-text-mute:     #a99d7c;
  --c-border:        #3b3424;
  --c-border-strong: #5a5038;
  --c-red:           var(--tp-red-on-black);
  --c-red-dark:      #ff6a5e;
  --c-red-soft:      #33110e;
  --shadow-card: none;
  --shadow-lift: none;

  background: var(--tp-black);
  color: var(--c-text);
}
body.theme-pad a { text-decoration-color: rgba(229, 73, 62, 0.45); }

/* Header, menu and footer stay on the black. */
body.theme-pad .site-header,
body.theme-pad .main-nav,
body.theme-pad .site-footer { background: var(--tp-black); }

/* ---- Panels ---------------------------------------------------------
   Everything the clean theme paints white or light grey is a cream panel
   here, and inside one, lettering and hairlines go back to dark ink.
   This list mirrors the rules in style.css that set a light background, so
   a NEW light-background component needs adding to it (three places below).
   The rules are wrapped in :where() so they carry no weight of their own:
   a component's own colours in style.css still win. */
:where(body.theme-pad) :where(
  #ge-search, .account-actions .btn.is-locked, .account-avatar, .account-card, .account-form
  input, .account-form select, .account-form textarea, .admin-menu, .admin-pill,
  .admin-pill.is-current .admin-pill-badge, .admin-pill:hover, .admin-quickstats,
  .admin-social-tile, .admin-stat, .admin-tool-badge, .admin-toolbar, .avatar-current,
  .bv-price-tag, .bv-writein, .bv-writein-add input[type="text"], .bv-writein-field input,
  .bv-writein-field select, .bv-writein-tag, .cai-summary, .card, .card-media
  .card-brand-badge, .card-media.square, .cat-hit, .cat-modal-body, .cat-modal-box,
  .cat-pg:hover, .cat-thumb-btn, .cat-tool, .cat-tool:hover:not(:disabled),
  .collection-stats, .comms-chip, .comms-chip.is-active .comms-chip-badge,
  .comms-chip:hover, .comms-setup-note, .contact-aside, .contact-form, .contact-form input,
  .contact-form textarea, .cstat-card, .cstat-mini-card, .cstat-recent, .cstat-recent-thumb,
  .csw-guide, .csw-stage, .ctc-answer input[type=number], .ctc-ask-box, .ctc-cell,
  .ctc-panel, .ctc-rules, .ctc-select, .ctc-stage, .discord-embed, .discord-panel,
  .eid-admin-add, .eid-admin-add-row input[type="text"], .eid-admin-filter
  input[type="search"], .eid-admin-select, .eid-admin-table :target td, .eid-clear,
  .eid-engine.is-match, .eid-search, .eid-search input[type="search"], .eid-slot,
  .eid-slot.is-open .eid-num, .etrains, .etrains-art, .etrains-video, .faq-item,
  .faq-q:hover, .featured-carousel, .flash.error, .flash.success, .game-card, .ge-cell,
  .ge-lb-row:nth-child(odd), .ge-no, .ge-option:hover, .ge-options, .ge-result-inner,
  .glance-panel, .hl-card, .hl-photo, .ipb-btn, .ipb-btn-unblock:focus-visible,
  .ipb-btn-unblock:hover, .is-live-row, .la-current, .la-item:has(input:checked),
  .la-item:hover, .la-preview-img, .la-section, .layout-live-offline, .mc-badge, .mc-cat,
  .mc-item a:hover, .mc-msg-admin, .newest-loco, .newest-loco-card, .newest-loco-media,
  .pager-btn, .pager-btn.is-disabled, .pir-card, .pir-gamebar, .pir-picker-item:hover,
  .pir-picker-results, .pir-result, .pir-result.is-win, .pir-round-card, .pir-round-head,
  .playlist-card__close:hover, .pr-chart, .pr-chart-tab, .pr-chart-tab:hover,
  .pr-modal-card, .pr-modal-photo, .pr-row.pr-top:first-child, .pr-row:hover, .pr-stat,
  .pr-year-item:hover, .pr-year-thumb, .rightofway-launch, .rn-modal-box,
  .row-access-summary, .row-access-summary.is-flagged, .row-card, .row-chart-svg, .row-table
  tr.row-disabled td, .row-table tr.row-flagged td, .sc-row-link, .sc-thumb, .sh-cell,
  .sh-search, .sl-badge-off, .sl-badge-on, .sl-field input[type="text"], .sl-field
  input[type="url"], .sl-field textarea, .sl-item, .sq-item, .sq-tag-patron, .sq-tag-status,
  .stat-bar, .stats-chart-svg, .stats-eye:focus-visible, .stats-eye:hover, .stats-kind-ai,
  .stats-kind-keyword, .stats-kind-pr-chart, .stats-kind-pr-engine, .stats-kind-pr-filter,
  .stats-kind-pr-jump, .stats-kind-pr-list, .stats-kind-pr-page, .stats-kind-pr-range,
  .stats-kind-pr-view, .stats-kind-pr-year, .stats-map-svg, .stats-pr-bar, .stats-pr-panel,
  .stats-search-field input[type="search"], .stats-sort-field select, .stats-tab,
  .stats-viz-tab, .stats-viz-tab:hover, .tag, .ti-json, .trivia-ai-panel, .trivia-card,
  .trivia-form input[type="number"], .trivia-form input[type="text"], .trivia-form select,
  .trivia-form textarea, .trivia-lb-row, .trivia-lb-thumb, .trivia-live, .trivia-live-ended,
  .trivia-result.is-correct, .trivia-result.is-wrong, .trivia-thumb, .trivia-wait,
  .trivia-winner, .tv-account-bar, .tv-admin-create input[type="datetime-local"],
  .tv-admin-create input[type="text"], .tv-admin-create input[type="url"], .tv-admin-edit
  input[type="datetime-local"], .tv-admin-edit input[type="text"], .tv-admin-edit
  input[type="url"], .tv-ballot-breakdown, .tv-brand-filter, .tv-pick, .tv-picks,
  .tv-picks-clear, .tv-result-bar, .tv-result-row, .tv-result-thumb, .tv-status-closed,
  .tv-status-draft, .tv-status-open, .tv-step, .tv-tab, .tv-type-btn,
  .tv-vote-state.is-closed, .tv-vote-state.is-open, .tv-vote-state.is-soon, .vai-box,
  .vai-status, .vai-status-error, .vai-status-limited, .vai-status-refused, .vai-thumb,
  .vc-desc pre, .verify-gate, .vg-evidence, .vg-idea, .vg-panel, .vg-running, .vg-state-btn,
  .vg-state-btn:hover, .vg-status-error, .vg-status-running, .vg-tag, .vg-tag-conf-high,
  .vg-tag-conf-low, .vg-tag-conf-medium, .wl-btn, .wl-drop, .wl-drop.is-dragover, .wl-heart,
  .wl-item-media, .wl-share-url input, .zr-result-inner, .zr-viewport,
  a.cstat-mini-card.is-active, a.rightofway-launch:focus-visible, a.rightofway-launch:hover
) {
  --c-bg:            var(--tp-field);
  --c-surface:       var(--tp-panel);
  --c-soft:          var(--tp-panel-2);
  --c-text:          var(--tp-ink);
  --c-text-soft:     var(--tp-ink-soft);
  --c-text-mute:     var(--tp-ink-mute);
  --c-border:        var(--tp-track);
  --c-border-strong: #cbbd94;
  --c-red:           var(--tp-red);
  --c-red-dark:      var(--tp-red-dark);
  --c-red-soft:      #f3ddc8;
  color: var(--tp-ink);
}

/* A panel sitting on the black is plain cream, even where the clean theme
   made it "soft" grey; soft areas INSIDE a panel get the darker cream. */
:where(body.theme-pad) :where(
  #ge-search, .account-actions .btn.is-locked, .account-avatar, .account-card, .account-form
  input, .account-form select, .account-form textarea, .admin-menu, .admin-pill,
  .admin-pill.is-current .admin-pill-badge, .admin-pill:hover, .admin-quickstats,
  .admin-social-tile, .admin-stat, .admin-tool-badge, .admin-toolbar, .avatar-current,
  .bv-price-tag, .bv-writein, .bv-writein-add input[type="text"], .bv-writein-field input,
  .bv-writein-field select, .bv-writein-tag, .cai-summary, .card, .card-media
  .card-brand-badge, .card-media.square, .cat-hit, .cat-modal-body, .cat-modal-box,
  .cat-pg:hover, .cat-thumb-btn, .cat-tool, .cat-tool:hover:not(:disabled),
  .collection-stats, .comms-chip, .comms-chip.is-active .comms-chip-badge,
  .comms-chip:hover, .comms-setup-note, .contact-aside, .contact-form, .contact-form input,
  .contact-form textarea, .cstat-card, .cstat-mini-card, .cstat-recent, .cstat-recent-thumb,
  .csw-guide, .csw-stage, .ctc-answer input[type=number], .ctc-ask-box, .ctc-cell,
  .ctc-panel, .ctc-rules, .ctc-select, .ctc-stage, .discord-embed, .discord-panel,
  .eid-admin-add, .eid-admin-add-row input[type="text"], .eid-admin-filter
  input[type="search"], .eid-admin-select, .eid-admin-table :target td, .eid-clear,
  .eid-engine.is-match, .eid-search, .eid-search input[type="search"], .eid-slot,
  .eid-slot.is-open .eid-num, .etrains, .etrains-art, .etrains-video, .faq-item,
  .faq-q:hover, .featured-carousel, .flash.error, .flash.success, .game-card, .ge-cell,
  .ge-lb-row:nth-child(odd), .ge-no, .ge-option:hover, .ge-options, .ge-result-inner,
  .glance-panel, .hl-card, .hl-photo, .ipb-btn, .ipb-btn-unblock:focus-visible,
  .ipb-btn-unblock:hover, .is-live-row, .la-current, .la-item:has(input:checked),
  .la-item:hover, .la-preview-img, .la-section, .layout-live-offline, .mc-badge, .mc-cat,
  .mc-item a:hover, .mc-msg-admin, .newest-loco, .newest-loco-card, .newest-loco-media,
  .pager-btn, .pager-btn.is-disabled, .pir-card, .pir-gamebar, .pir-picker-item:hover,
  .pir-picker-results, .pir-result, .pir-result.is-win, .pir-round-card, .pir-round-head,
  .playlist-card__close:hover, .pr-chart, .pr-chart-tab, .pr-chart-tab:hover,
  .pr-modal-card, .pr-modal-photo, .pr-row.pr-top:first-child, .pr-row:hover, .pr-stat,
  .pr-year-item:hover, .pr-year-thumb, .rightofway-launch, .rn-modal-box,
  .row-access-summary, .row-access-summary.is-flagged, .row-card, .row-chart-svg, .row-table
  tr.row-disabled td, .row-table tr.row-flagged td, .sc-row-link, .sc-thumb, .sh-cell,
  .sh-search, .sl-badge-off, .sl-badge-on, .sl-field input[type="text"], .sl-field
  input[type="url"], .sl-field textarea, .sl-item, .sq-item, .sq-tag-patron, .sq-tag-status,
  .stat-bar, .stats-chart-svg, .stats-eye:focus-visible, .stats-eye:hover, .stats-kind-ai,
  .stats-kind-keyword, .stats-kind-pr-chart, .stats-kind-pr-engine, .stats-kind-pr-filter,
  .stats-kind-pr-jump, .stats-kind-pr-list, .stats-kind-pr-page, .stats-kind-pr-range,
  .stats-kind-pr-view, .stats-kind-pr-year, .stats-map-svg, .stats-pr-bar, .stats-pr-panel,
  .stats-search-field input[type="search"], .stats-sort-field select, .stats-tab,
  .stats-viz-tab, .stats-viz-tab:hover, .tag, .ti-json, .trivia-ai-panel, .trivia-card,
  .trivia-form input[type="number"], .trivia-form input[type="text"], .trivia-form select,
  .trivia-form textarea, .trivia-lb-row, .trivia-lb-thumb, .trivia-live, .trivia-live-ended,
  .trivia-result.is-correct, .trivia-result.is-wrong, .trivia-thumb, .trivia-wait,
  .trivia-winner, .tv-account-bar, .tv-admin-create input[type="datetime-local"],
  .tv-admin-create input[type="text"], .tv-admin-create input[type="url"], .tv-admin-edit
  input[type="datetime-local"], .tv-admin-edit input[type="text"], .tv-admin-edit
  input[type="url"], .tv-ballot-breakdown, .tv-brand-filter, .tv-pick, .tv-picks,
  .tv-picks-clear, .tv-result-bar, .tv-result-row, .tv-result-thumb, .tv-status-closed,
  .tv-status-draft, .tv-status-open, .tv-step, .tv-tab, .tv-type-btn,
  .tv-vote-state.is-closed, .tv-vote-state.is-open, .tv-vote-state.is-soon, .vai-box,
  .vai-status, .vai-status-error, .vai-status-limited, .vai-status-refused, .vai-thumb,
  .vc-desc pre, .verify-gate, .vg-evidence, .vg-idea, .vg-panel, .vg-running, .vg-state-btn,
  .vg-state-btn:hover, .vg-status-error, .vg-status-running, .vg-tag, .vg-tag-conf-high,
  .vg-tag-conf-low, .vg-tag-conf-medium, .wl-btn, .wl-drop, .wl-drop.is-dragover, .wl-heart,
  .wl-item-media, .wl-share-url input, .zr-result-inner, .zr-viewport,
  a.cstat-mini-card.is-active, a.rightofway-launch:focus-visible, a.rightofway-launch:hover
) { --c-soft: var(--tp-panel); }
:where(body.theme-pad) :where(
  #ge-search, .account-actions .btn.is-locked, .account-avatar, .account-card, .account-form
  input, .account-form select, .account-form textarea, .admin-menu, .admin-pill,
  .admin-pill.is-current .admin-pill-badge, .admin-pill:hover, .admin-quickstats,
  .admin-social-tile, .admin-stat, .admin-tool-badge, .admin-toolbar, .avatar-current,
  .bv-price-tag, .bv-writein, .bv-writein-add input[type="text"], .bv-writein-field input,
  .bv-writein-field select, .bv-writein-tag, .cai-summary, .card, .card-media
  .card-brand-badge, .card-media.square, .cat-hit, .cat-modal-body, .cat-modal-box,
  .cat-pg:hover, .cat-thumb-btn, .cat-tool, .cat-tool:hover:not(:disabled),
  .collection-stats, .comms-chip, .comms-chip.is-active .comms-chip-badge,
  .comms-chip:hover, .comms-setup-note, .contact-aside, .contact-form, .contact-form input,
  .contact-form textarea, .cstat-card, .cstat-mini-card, .cstat-recent, .cstat-recent-thumb,
  .csw-guide, .csw-stage, .ctc-answer input[type=number], .ctc-ask-box, .ctc-cell,
  .ctc-panel, .ctc-rules, .ctc-select, .ctc-stage, .discord-embed, .discord-panel,
  .eid-admin-add, .eid-admin-add-row input[type="text"], .eid-admin-filter
  input[type="search"], .eid-admin-select, .eid-admin-table :target td, .eid-clear,
  .eid-engine.is-match, .eid-search, .eid-search input[type="search"], .eid-slot,
  .eid-slot.is-open .eid-num, .etrains, .etrains-art, .etrains-video, .faq-item,
  .faq-q:hover, .featured-carousel, .flash.error, .flash.success, .game-card, .ge-cell,
  .ge-lb-row:nth-child(odd), .ge-no, .ge-option:hover, .ge-options, .ge-result-inner,
  .glance-panel, .hl-card, .hl-photo, .ipb-btn, .ipb-btn-unblock:focus-visible,
  .ipb-btn-unblock:hover, .is-live-row, .la-current, .la-item:has(input:checked),
  .la-item:hover, .la-preview-img, .la-section, .layout-live-offline, .mc-badge, .mc-cat,
  .mc-item a:hover, .mc-msg-admin, .newest-loco, .newest-loco-card, .newest-loco-media,
  .pager-btn, .pager-btn.is-disabled, .pir-card, .pir-gamebar, .pir-picker-item:hover,
  .pir-picker-results, .pir-result, .pir-result.is-win, .pir-round-card, .pir-round-head,
  .playlist-card__close:hover, .pr-chart, .pr-chart-tab, .pr-chart-tab:hover,
  .pr-modal-card, .pr-modal-photo, .pr-row.pr-top:first-child, .pr-row:hover, .pr-stat,
  .pr-year-item:hover, .pr-year-thumb, .rightofway-launch, .rn-modal-box,
  .row-access-summary, .row-access-summary.is-flagged, .row-card, .row-chart-svg, .row-table
  tr.row-disabled td, .row-table tr.row-flagged td, .sc-row-link, .sc-thumb, .sh-cell,
  .sh-search, .sl-badge-off, .sl-badge-on, .sl-field input[type="text"], .sl-field
  input[type="url"], .sl-field textarea, .sl-item, .sq-item, .sq-tag-patron, .sq-tag-status,
  .stat-bar, .stats-chart-svg, .stats-eye:focus-visible, .stats-eye:hover, .stats-kind-ai,
  .stats-kind-keyword, .stats-kind-pr-chart, .stats-kind-pr-engine, .stats-kind-pr-filter,
  .stats-kind-pr-jump, .stats-kind-pr-list, .stats-kind-pr-page, .stats-kind-pr-range,
  .stats-kind-pr-view, .stats-kind-pr-year, .stats-map-svg, .stats-pr-bar, .stats-pr-panel,
  .stats-search-field input[type="search"], .stats-sort-field select, .stats-tab,
  .stats-viz-tab, .stats-viz-tab:hover, .tag, .ti-json, .trivia-ai-panel, .trivia-card,
  .trivia-form input[type="number"], .trivia-form input[type="text"], .trivia-form select,
  .trivia-form textarea, .trivia-lb-row, .trivia-lb-thumb, .trivia-live, .trivia-live-ended,
  .trivia-result.is-correct, .trivia-result.is-wrong, .trivia-thumb, .trivia-wait,
  .trivia-winner, .tv-account-bar, .tv-admin-create input[type="datetime-local"],
  .tv-admin-create input[type="text"], .tv-admin-create input[type="url"], .tv-admin-edit
  input[type="datetime-local"], .tv-admin-edit input[type="text"], .tv-admin-edit
  input[type="url"], .tv-ballot-breakdown, .tv-brand-filter, .tv-pick, .tv-picks,
  .tv-picks-clear, .tv-result-bar, .tv-result-row, .tv-result-thumb, .tv-status-closed,
  .tv-status-draft, .tv-status-open, .tv-step, .tv-tab, .tv-type-btn,
  .tv-vote-state.is-closed, .tv-vote-state.is-open, .tv-vote-state.is-soon, .vai-box,
  .vai-status, .vai-status-error, .vai-status-limited, .vai-status-refused, .vai-thumb,
  .vc-desc pre, .verify-gate, .vg-evidence, .vg-idea, .vg-panel, .vg-running, .vg-state-btn,
  .vg-state-btn:hover, .vg-status-error, .vg-status-running, .vg-tag, .vg-tag-conf-high,
  .vg-tag-conf-low, .vg-tag-conf-medium, .wl-btn, .wl-drop, .wl-drop.is-dragover, .wl-heart,
  .wl-item-media, .wl-share-url input, .zr-result-inner, .zr-viewport,
  a.cstat-mini-card.is-active, a.rightofway-launch:focus-visible, a.rightofway-launch:hover
) > * { --c-soft: var(--tp-panel-2); }

/* These were hard-coded white or near-white in style.css. */
body.theme-pad :is(
  .csw-guide, .csw-stage, .ctc-answer input[type=number], .ctc-ask-box, .ctc-cell,
  .ctc-panel, .ctc-rules, .ctc-select, .ctc-stage, .eid-admin-add, .eid-admin-add-row
  input[type="text"], .eid-admin-filter input[type="search"], .eid-admin-select, .ipb-btn,
  .layout-live-offline, .pir-card, .pir-picker-results, .pir-round-card, .rightofway-launch,
  .row-access-summary, .row-card, .row-chart-svg, .row-table tr.row-disabled td,
  .stats-chart-svg, .stats-map-svg, .stats-pr-panel, .vai-box, .vc-desc pre, .vg-idea,
  .vg-panel, .vg-state-btn
) { background-color: var(--tp-panel); }

/* A few panels take their text colour from their parent ("color: inherit"),
   which on the black page would be cream on cream. */
body.theme-pad :is(a.card, .sc-row-link, .game-card) { color: var(--tp-ink); }

/* ---- Red fills ---------------------------------------------------------
   Buttons, badges and bars keep the deep red; only red LETTERING on black
   uses the brighter red. (Every rule in style.css that fills with red.) */
:where(body.theme-pad) :where(
  .admin-pill-badge, .admin-pill.is-current, .admin-pill.is-current:hover, .btn-ghost:hover,
  .btn-primary, .btn-primary:hover, .cat-year, .comms-chip-badge, .cr-order-badge,
  .eid-clear:focus-visible, .eid-clear:hover, .eid-num, .fv-arrow:focus-visible,
  .fv-arrow:hover, .fv-dot.is-active, .ipb-btn-unblock, .layout-live-badge.is-on, .mc-dot,
  .member-bell-badge, .pager-btn:focus-visible, .pager-btn:hover, .pr-chart-tab.is-active,
  .pr-modal-close:focus-visible, .pr-modal-close:hover, .pr-modal-rank, .pr-top .pr-rank,
  .row-flag, .site-footer .social a:hover, .sq-tabs a.is-active, .stats-blocked-tag,
  .stats-key-human, .stats-pill.is-active, .stats-pr-bar span, .stats-tab.is-active,
  .stats-viz-tab.is-active, .trivia-ai-tag, .tv-pick-qty, .tv-pick-remove:focus-visible,
  .tv-pick-remove:hover, .tv-picks-clear:focus-visible, .tv-picks-clear:hover,
  .tv-plus:not(:disabled), .tv-qty-badge, .tv-result-fill, .tv-tab.is-active,
  .tv-type-btn.is-active, .vc-pager-num.is-current, .vg-idea-num, .wl-btn-danger:hover,
  .wl-count
) { --c-red: var(--tp-red); --c-red-dark: var(--tp-red-dark); }

/* ---- Back on the black ----
   Full-width bands and wrappers that the clean theme paints white or grey
   but that are really just "the page" here; their own cards stay panels. */
body.theme-pad :is(.etrains, .newest-loco, .collection-stats--pad) {
  background: var(--tp-black);
  --c-bg:            var(--tp-black);
  --c-surface:       var(--tp-panel);
  --c-soft:          var(--tp-panel);
  --c-text:          #f9f1dd;
  --c-text-soft:     #d8cdae;
  --c-text-mute:     #a99d7c;
  --c-border:        #3b3424;
  --c-border-strong: #5a5038;
  --c-red:           var(--tp-red-on-black);
  --c-red-dark:      #ff6a5e;
  --c-red-soft:      #33110e;
  color: #f9f1dd;
}

/* Text boxes and drop-downs are always light, wherever they sit. */
body.theme-pad :is(input[type="text"], input[type="search"], input[type="email"],
    input[type="password"], input[type="number"], input[type="url"], input[type="tel"],
    input:not([type]), select, textarea) {
  background-color: var(--tp-field);
  color: var(--tp-ink);
}

/* The glance pad keeps its own red (it is the pad the theme is named for). */
body.theme-pad .glance-pad { --gp-red: var(--tp-red); }

/* The rules under the header and over the footer are the deep red too. */
body.theme-pad .site-header,
body.theme-pad .site-footer { border-color: var(--tp-red); }

/* The ITRAINDB icon among the social links is a black PNG (the others are
   drawn in the text colour). On the black header and footer, show its cream
   twin so it matches them; on a cream panel (Contact page) it stays black. */
body.theme-pad :is(.site-social, .site-footer) img[src*="itdb_logo2.png"] {
  content: url("/assets/images/itdb_logo2_light.png");
}
