@charset "UTF-8";
/* ===========================================================================
   Site palette - dark and light themes

   Stage black  #22252A   background
   Neon teal    #2EAFC7   buttons, links
   Whiskey tan  #A08563   headings, rules
   Parchment    #F3ECDF   text, light sections
   Amp grille   #2F333A   cards
   Rust red     #C8553D   sparing accent (sale, sold out, errors)

   NOTHING HERE APPLIES until <html> carries data-theme="dark" or
   data-theme="light". includes/head.inc sets that from ?theme=dark|light (and
   remembers it in this browser; ?theme=off clears it), so both themes can be
   previewed on the live site while visitors still see the current look.
   To go live with one, have head.inc set it unconditionally - see the note
   there.

   HOW THE OVERRIDES WIN
   Every rule is prefixed :where([data-theme]). :where() adds no specificity,
   so each override has exactly the specificity of the main.css / custom.css
   rule it replaces and wins only by loading later. That keeps this file from
   accidentally beating rules it does not mention. The exceptions are the
   few page-level <style> blocks (advertise page, featured listings): those
   come after this file in the document, so their overrides use
   :root[data-theme] to out-rank them.

   DARK ISLANDS
   The header, footer, and .bg-dark / .bg-secondary sections stay dark in the
   light theme too. They get the dark token set redefined on the element, so
   everything inside them - headings, links, accordions - picks up dark-theme
   colours without a single extra rule.

   Light-theme values that differ from the swatches are the swatch darkened
   just enough to clear WCAG AA (4.5:1) as text on the light backgrounds:
   teal #2EAFC7 on parchment is only 2.4:1, so links there use #146F80; tan
   headings use #7D6245. Fills (buttons, badges) keep the exact swatch.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   Tokens
   --------------------------------------------------------------------------- */

:root[data-theme="dark"],
:root[data-theme="light"] :is(.footer, .bg-dark[class*="bg-opacity"]) {
  color-scheme: dark;

  --pal-bg: #22252A;
  --pal-surface: #2F333A;          /* cards, menus, modals */
  --pal-surface-hover: #3A3E45;
  --pal-section: #2F333A;          /* .bg-light, blockquotes, tabs */
  --pal-tint: rgba(243, 236, 223, 0.04);
  --pal-text: #F3ECDF;
  --pal-text-muted: #B4B0A9;
  --pal-heading-display: #F3ECDF;  /* h1 and .display-* */
  --pal-heading: #A08563;          /* h2-h6 */
  --pal-rule: #A08563;
  --pal-border: #4E473E;
  --pal-link: #2EAFC7;
  --pal-link-hover: #6DC7D8;
  --pal-accent: #2EAFC7;
  --pal-accent-hover: #4DBBCF;
  --pal-accent-active: #2795A9;
  --pal-on-accent: #FFFFFF;        /* white on teal is 2.6:1 - a design choice, below AA */
  --pal-secondary: #454A52;
  --pal-secondary-hover: #50555E;
  --pal-on-secondary: #F3ECDF;
  --pal-rust: #C8553D;
  --pal-rust-text: #E07A62;
  --pal-focus-ring: rgba(46, 175, 199, 0.5);
  --pal-footer-bg: #2F333A;

  /* Bootstrap's own tokens. The -rgb forms are what the bg-* / text-*
     utilities read. */
  --bs-body-bg: #22252A;
  --bs-body-bg-rgb: 34, 37, 42;
  --bs-body-color: #F3ECDF;
  --bs-body-color-rgb: 243, 236, 223;
  --bs-light: #2F333A;
  --bs-light-rgb: 47, 51, 58;
  --bs-secondary: #B4B0A9;
  --bs-secondary-rgb: 180, 176, 169;
  --bs-success: #2EAFC7;
  --bs-success-rgb: 46, 175, 199;
}

:root[data-theme="light"] {
  color-scheme: light;

  --pal-bg: #FBF8F2;
  --pal-surface: #FFFFFF;
  --pal-surface-hover: #F4F3F0;
  --pal-section: #EDEDEB;          /* slight gray: sections, former dark blocks */
  --pal-tint: rgba(34, 37, 42, 0.03);
  --pal-text: #22252A;
  --pal-text-muted: #5E5A53;
  --pal-heading-display: #22252A;
  --pal-heading: #7D6245;
  --pal-rule: #A08563;
  --pal-border: #DCCFBC;
  --pal-link: #146F80;
  --pal-link-hover: #0E5563;
  --pal-accent: #2EAFC7;
  --pal-accent-hover: #2A9EB3;
  --pal-accent-active: #2795A9;
  --pal-on-accent: #FFFFFF;        /* white on teal is 2.6:1 - a design choice, below AA */
  --pal-secondary: #22252A;
  --pal-secondary-hover: #3A3E45;
  --pal-on-secondary: #F3ECDF;
  --pal-rust: #C8553D;
  --pal-rust-text: #B04A33;
  --pal-focus-ring: rgba(46, 175, 199, 0.5);
  --pal-footer-bg: #22252A;

  --bs-body-bg: #FBF8F2;
  --bs-body-bg-rgb: 251, 248, 242;
  --bs-body-color: #22252A;
  --bs-body-color-rgb: 34, 37, 42;
  --bs-light: #EDEDEB;
  --bs-light-rgb: 237, 237, 235;
  --bs-secondary: #5E5A53;
  --bs-secondary-rgb: 94, 90, 83;
  --bs-success: #146F80;
  --bs-success-rgb: 20, 111, 128;
}

/* Same in both themes. */
:root[data-theme] {
  --bs-primary: #2EAFC7;
  --bs-primary-rgb: 46, 175, 199;
  --bs-dark: #22252A;
  --bs-dark-rgb: 34, 37, 42;
  --bs-danger: #C8553D;
  --bs-danger-rgb: 200, 85, 61;
  --bs-teal: #2EAFC7;
}

/* ---------------------------------------------------------------------------
   Base type and links
   --------------------------------------------------------------------------- */

:where([data-theme]) h1, :where([data-theme]) .h1,
:where([data-theme]) .display-1, :where([data-theme]) .display-2,
:where([data-theme]) .display-3, :where([data-theme]) .display-4,
:where([data-theme]) .display-5, :where([data-theme]) .display-6 {
  color: var(--pal-heading-display);
}

:where([data-theme]) h2, :where([data-theme]) .h2,
:where([data-theme]) h3, :where([data-theme]) .h3,
:where([data-theme]) h4, :where([data-theme]) .h4,
:where([data-theme]) h5, :where([data-theme]) .h5,
:where([data-theme]) h6, :where([data-theme]) .h6 {
  color: var(--pal-heading);
}

:where([data-theme]) a { color: var(--pal-link); }
:where([data-theme]) a:hover { color: var(--pal-link-hover); }

:where([data-theme]) hr {
  color: var(--pal-rule);
  opacity: 0.6;
}

:where([data-theme]) caption,
:where([data-theme]) .blockquote-footer,
:where([data-theme]) .figure-caption,
:where([data-theme]) .form-text {
  color: var(--pal-text-muted);
}

/* Dark sections: give them body text in their own (dark) token set. */
:where([data-theme]) .bg-dark,
:where([data-theme]) .bg-secondary {
  color: var(--pal-text);
}

/* ---------------------------------------------------------------------------
   Utilities (these are !important in Bootstrap, so they must be here too)
   --------------------------------------------------------------------------- */

:where([data-theme]) .text-muted { color: var(--pal-text-muted) !important; }
:where([data-theme]) .text-primary { color: var(--pal-link) !important; }
:where([data-theme]) .text-white,
:where([data-theme]) .text-light { color: #F3ECDF !important; }

:where([data-theme]) .bg-secondary { background-color: #2F333A !important; }
:where([data-theme]) .bg-white { background-color: var(--pal-surface) !important; }

:where([data-theme]) .border,
:where([data-theme]) .border-top,
:where([data-theme]) .border-end,
:where([data-theme]) .border-bottom,
:where([data-theme]) .border-start,
:where([data-theme]) .border-light {
  border-color: var(--pal-border) !important;
}
:where([data-theme]) .border-primary { border-color: var(--pal-accent) !important; }

/* ---------------------------------------------------------------------------
   Buttons

   Filled buttons have no visible border: it is transparent, so the fill
   shows through it and the button keeps the same 2px-border size as an
   outline button. Outline buttons stay outlines on hover - the border and
   label change colour, the inside never fills.

   No outline or ring on mouse focus. Keyboard focus (:focus-visible) gets a
   teal outline, which the main.css theme layer used to draw on every click.
   --------------------------------------------------------------------------- */

:where([data-theme]) .btn,
:where([data-theme]) .btn:hover {
  color: var(--pal-text);
}

/* All-caps labels, slightly tracked so the capitals don't crowd. Text-style
   .btn-link buttons stay in sentence case - they read as links. */
:where([data-theme]) .btn:not(.btn-link),
:where([data-theme]) .quick-product__btn {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Primary - filled teal */
:where([data-theme]) .btn-primary,
:where([data-theme]) .btn-primary:disabled,
:where([data-theme]) .btn-primary.disabled {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent);
  border-color: transparent;
}
:where([data-theme]) .btn-primary:hover,
:where([data-theme]) .btn-check:focus + .btn-primary,
:where([data-theme]) .btn-primary:focus {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent-hover);
  border-color: transparent;
}
:where([data-theme]) .btn-check:checked + .btn-primary,
:where([data-theme]) .btn-check:active + .btn-primary,
:where([data-theme]) .btn-primary:active,
:where([data-theme]) .btn-primary.active,
:where([data-theme]) .show > .btn-primary.dropdown-toggle {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent-active);
  border-color: transparent;
}

/* Secondary - filled grille (dark) / stage black (light) */
:where([data-theme]) .btn-secondary,
:where([data-theme]) .btn-secondary:disabled,
:where([data-theme]) .btn-secondary.disabled {
  color: var(--pal-on-secondary);
  background-color: var(--pal-secondary);
  border-color: transparent;
}
:where([data-theme]) .btn-secondary:hover,
:where([data-theme]) .btn-secondary:focus,
:where([data-theme]) .btn-check:focus + .btn-secondary,
:where([data-theme]) .btn-check:checked + .btn-secondary,
:where([data-theme]) .btn-check:active + .btn-secondary,
:where([data-theme]) .btn-secondary:active,
:where([data-theme]) .btn-secondary.active,
:where([data-theme]) .show > .btn-secondary.dropdown-toggle {
  color: var(--pal-on-secondary);
  background-color: var(--pal-secondary-hover);
  border-color: transparent;
}

/* Light - parchment fill (the Nav Top Bar's button) */
:where([data-theme]) .btn-light,
:where([data-theme]) .btn-light:hover,
:where([data-theme]) .btn-light:focus,
:where([data-theme]) .btn-light:active {
  color: #22252A;
  background-color: #F3ECDF;
  border-color: transparent;
}
:where([data-theme]) .btn-light:hover,
:where([data-theme]) .btn-light:active { background-color: #E6DCCA; }

/* Outline primary - tan outline, text-colour label; teal on hover */
:where([data-theme]) .btn-outline-primary {
  color: var(--pal-text);
  background-color: transparent;
  border-color: var(--pal-rule);
}
:where([data-theme]) .btn-outline-primary:hover,
:where([data-theme]) .btn-outline-primary:focus,
:where([data-theme]) .btn-check:checked + .btn-outline-primary,
:where([data-theme]) .btn-check:active + .btn-outline-primary,
:where([data-theme]) .btn-outline-primary:active,
:where([data-theme]) .btn-outline-primary.active,
:where([data-theme]) .show > .btn-outline-primary.dropdown-toggle {
  color: var(--pal-link);
  background-color: transparent;
  border-color: var(--pal-accent);
}
:where([data-theme]) .btn-outline-primary:disabled,
:where([data-theme]) .btn-outline-primary.disabled {
  color: var(--pal-text-muted);
  background-color: transparent;
}

/* Outline secondary - quieter outline */
:where([data-theme]) .btn-outline-secondary {
  color: var(--pal-text-muted);
  background-color: transparent;
  border-color: var(--pal-text-muted);
}
:where([data-theme]) .btn-outline-secondary:hover,
:where([data-theme]) .btn-outline-secondary:focus,
:where([data-theme]) .btn-check:checked + .btn-outline-secondary,
:where([data-theme]) .btn-check:active + .btn-outline-secondary,
:where([data-theme]) .btn-outline-secondary:active,
:where([data-theme]) .btn-outline-secondary.active,
:where([data-theme]) .show > .btn-outline-secondary.dropdown-toggle {
  color: var(--pal-text);
  background-color: transparent;
  border-color: var(--pal-text);
}

/* Outline danger - rust */
:where([data-theme]) .btn-outline-danger {
  color: var(--pal-rust-text);
  background-color: transparent;
  border-color: var(--pal-rust);
}
:where([data-theme]) .btn-outline-danger:hover,
:where([data-theme]) .btn-outline-danger:focus,
:where([data-theme]) .btn-check:checked + .btn-outline-danger,
:where([data-theme]) .btn-check:active + .btn-outline-danger,
:where([data-theme]) .btn-outline-danger:active,
:where([data-theme]) .btn-outline-danger.active {
  color: var(--pal-rust-text);
  background-color: transparent;
  border-color: var(--pal-rust-text);
}

/* The theme layer's search button and the catalog quick-view button */
:where([data-theme]) .btn.search { color: var(--pal-link); }
:where([data-theme]) .btn.search:hover { color: var(--pal-text); }

:where([data-theme]) .quick-product__btn {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent);
  border-color: transparent;
}

/* Focus: drop the old maroon/green rings and outlines... */
:where([data-theme]) .btn:focus,
:where([data-theme]) .btn-check:focus + .btn,
:where([data-theme]) .btn-primary:focus,
:where([data-theme]) .btn-secondary:focus,
:where([data-theme]) .btn-check:focus + .btn-primary,
:where([data-theme]) .btn-check:checked + .btn-primary:focus,
:where([data-theme]) .btn-check:active + .btn-primary:focus,
:where([data-theme]) .btn-primary:active:focus,
:where([data-theme]) .btn-primary.active:focus,
:where([data-theme]) .show > .btn-primary.dropdown-toggle:focus,
:where([data-theme]) .btn-primary.focus,
:where([data-theme]) .btn-outline-primary:focus,
:where([data-theme]) .btn-outline-primary.focus,
:where([data-theme]) .btn-check:focus + .btn-outline-primary,
:where([data-theme]) .btn-check:checked + .btn-outline-primary:focus,
:where([data-theme]) .btn-check:active + .btn-outline-primary:focus,
:where([data-theme]) .btn-outline-primary:active:focus,
:where([data-theme]) .btn-outline-primary.active:focus,
:where([data-theme]) .btn-outline-primary.dropdown-toggle.show:focus {
  outline: 0;
  box-shadow: none;
}
/* ...and show focus only to keyboard users. */
:where([data-theme]) .btn:focus-visible {
  outline: 2px solid var(--pal-accent);
  outline-offset: 2px;
  box-shadow: none;
}

/* ---------------------------------------------------------------------------
   Light theme: the site's dark blocks go light

   The markup paints the header, the home page's Featured and About sections
   and a few cards with .bg-dark / .bg-secondary and hardcodes .text-white
   inside them. In the light theme those become slight gray with dark text,
   and the header becomes white. Translucent overlays (.bg-opacity-*, used
   over photos in the popup) stay dark - they are in the dark-island list at
   the top. The footer stays dark too.
   --------------------------------------------------------------------------- */

:where([data-theme="light"]) :is(.bg-dark, .bg-secondary):not([class*="bg-opacity"]) {
  color: var(--pal-text);
  background-color: var(--pal-section) !important;
}
:where([data-theme="light"]) :is(.bg-dark, .bg-secondary):not([class*="bg-opacity"]).text-white,
:where([data-theme="light"]) :is(.bg-dark, .bg-secondary):not([class*="bg-opacity"]) .text-white {
  color: var(--pal-text) !important;
}

/* White, not gray: the dark-on-light logo (ngj_logo.svg, swapped in by
   includes/head.inc) is drawn on a white box. */
:where([data-theme="light"]) .header .navbar.bg-dark {
  background-color: #FFFFFF !important;
}

/* The faint white rule between featured slots (inline in home.html) */
:root[data-theme="light"] [data-feature-pick]:not([hidden]) ~ [data-feature-pick]:not([hidden]) {
  border-top-color: var(--pal-border);
}

/* ---------------------------------------------------------------------------
   Header and navigation

   The header is a dark island in both themes (the logo is drawn for a dark
   bar). Nav links are tan; hover goes to text colour, the current page teal.
   --------------------------------------------------------------------------- */

:where([data-theme]) .header .navbar {
  /* A tan rule along the bottom, drawn inset so the header's height - and
     the 166px the listing filter bar is parked at - does not change. */
  box-shadow: inset 0 -1px 0 var(--pal-rule);
}

:where([data-theme]) .navbar-nav a,
:where([data-theme]) .navbar-dark .navbar-nav .nav-link {
  color: var(--pal-heading);
}
:where([data-theme]) .navbar-nav a:hover,
:where([data-theme]) .navbar-dark .navbar-nav .nav-link:hover,
:where([data-theme]) .navbar-dark .navbar-nav .nav-link:focus {
  color: var(--pal-text);
}
:where([data-theme]) .navbar-nav .selected .nav-link,
:where([data-theme]) .navbar-dark .navbar-nav .show > .nav-link,
:where([data-theme]) .navbar-dark .navbar-nav .nav-link.active {
  color: var(--pal-link);
}
:where([data-theme]) .navbar-nav a:hover::before { background-color: var(--pal-accent); }

/* Submenu items are <a>s inside .navbar-nav too; keep them text-coloured on
   their menu surface (tan on grille is only 3.6:1). */
:where([data-theme]) .navbar-nav .dropdown-item { color: var(--pal-text); }

:where([data-theme]) .icon-block a { color: var(--pal-text); }
:where([data-theme]) .icon-block a:hover { color: var(--pal-link); }

:where([data-theme]) .navbar-toggler-icon,
:where([data-theme]) .navbar-toggler-icon::before,
:where([data-theme]) .navbar-toggler-icon::after {
  background-color: var(--pal-heading);
  box-shadow: none;
}

/* Dropdown menus (nav submenus included) */
:where([data-theme]) .dropdown-menu {
  color: var(--pal-text);
  background-color: var(--pal-surface);
  border-color: var(--pal-border);
}
:where([data-theme]) .dropdown-item,
:where([data-theme]) .dropdown-item-text { color: var(--pal-text); }
:where([data-theme]) .dropdown-item:hover,
:where([data-theme]) .dropdown-item:focus {
  color: var(--pal-text);
  background-color: var(--pal-surface-hover);
}
:where([data-theme]) .dropdown-menu .dropdown-item:hover,
:where([data-theme]) .dropdown-menu .dropdown-item.selected,
:where([data-theme]) .dropdown-item.active,
:where([data-theme]) .dropdown-item:active {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent);
}
:where([data-theme]) .dropdown-header,
:where([data-theme]) .dropdown-item.disabled,
:where([data-theme]) .dropdown-item:disabled { color: var(--pal-text-muted); }
:where([data-theme]) .dropdown-divider { border-top-color: var(--pal-border); }

/* Nav, tabs, pills */
:where([data-theme]) .nav-link { color: var(--pal-link); }
:where([data-theme]) .nav-link:hover,
:where([data-theme]) .nav-link:focus { color: var(--pal-link-hover); }
:where([data-theme]) .nav-link.disabled { color: var(--pal-text-muted); }

:where([data-theme]) .nav-tabs { border-bottom-color: var(--pal-border); }
:where([data-theme]) .nav-tabs .nav-link:hover,
:where([data-theme]) .nav-tabs .nav-link:focus { border-color: var(--pal-border) var(--pal-border) var(--pal-border); }
:where([data-theme]) .nav-tabs .nav-link.active,
:where([data-theme]) .nav-tabs .nav-item.show .nav-link {
  color: var(--pal-text);
  background-color: var(--pal-bg);
  border-color: var(--pal-border) var(--pal-border) var(--pal-bg);
}
:where([data-theme]) .nav-pills .nav-link.active,
:where([data-theme]) .nav-pills .show > .nav-link {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent);
}

/* Breadcrumbs */
:where([data-theme]) .breadcrumb a { color: var(--pal-text); }
:where([data-theme]) .breadcrumb a:hover { color: var(--pal-link); }
:where([data-theme]) .breadcrumb li.active,
:where([data-theme]) .breadcrumb.tag::before { color: var(--pal-heading); }
:where([data-theme]) .breadcrumb-item + .breadcrumb-item::before,
:where([data-theme]) .breadcrumb-item.active { color: var(--pal-text-muted); }

/* ---------------------------------------------------------------------------
   Forms

   The site's fields are underline-only. The underline is tan (4.4:1 on
   stage black, enough for a field boundary); focus turns it teal.
   --------------------------------------------------------------------------- */

:where([data-theme]) .form-control,
:where([data-theme]) .form-select,
:where([data-theme]) .form-control-plaintext {
  color: var(--pal-text);
}
:where([data-theme]) .form-control,
:where([data-theme]) .form-select {
  background-color: transparent;
  border-color: var(--pal-rule);
}
:where([data-theme]) .form-control:focus,
:where([data-theme]) .form-select:focus {
  color: var(--pal-text);
  background-color: transparent;
  border-color: var(--pal-accent);
  box-shadow: none;
}
:where([data-theme]) .form-select:disabled,
:where([data-theme]) .form-control:disabled { background-color: var(--pal-surface-hover); }
:where([data-theme]) .form-select:-moz-focusring { text-shadow: 0 0 0 var(--pal-text); }

/* Native dropdown lists take their colours from color-scheme, but say it
   explicitly for browsers that only half-honour it. */
:where([data-theme]) .form-select option {
  color: var(--pal-text);
  background-color: var(--pal-surface);
}

/* The select arrow is an SVG data URI, which cannot read a CSS variable -
   one per theme. */
:where([data-theme="dark"]) .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F3ECDF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}
:where([data-theme="light"]) .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2322252A' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

:where([data-theme]) .form-control::placeholder { color: var(--pal-text-muted); }
:where([data-theme]) .form-control::-webkit-input-placeholder { color: var(--pal-text-muted); }

:where([data-theme]) .form-control::file-selector-button {
  color: var(--pal-text);
  background-color: var(--pal-surface-hover);
}
:where([data-theme]) .form-control::-webkit-file-upload-button {
  color: var(--pal-text);
  background-color: var(--pal-surface-hover);
}

:where([data-theme]) .input-group-text {
  color: var(--pal-text);
  background-color: var(--pal-surface-hover);
  border-color: var(--pal-border);
}

/* Checkboxes and radios: teal when on, with a stage-black mark - white on
   teal is 2.6:1, under the 3:1 a control's state needs. */
:where([data-theme]) .form-check-input {
  background-color: var(--pal-surface);
  border-color: var(--pal-rule);
}
:where([data-theme]) .form-check-input:focus {
  border-color: var(--pal-accent);
  box-shadow: 0 0 0 0.25rem var(--pal-focus-ring);
}
:where([data-theme]) .form-check-input:checked,
:where([data-theme]) .form-check-input[type=checkbox]:indeterminate {
  background-color: var(--pal-accent);
  border-color: var(--pal-accent);
}
:where([data-theme]) .form-check-input:checked[type=checkbox] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2322252A' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}
:where([data-theme]) .form-check-input:checked[type=radio] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%2322252A'/%3e%3c/svg%3e");
}
:where([data-theme]) .form-check-input[type=checkbox]:indeterminate {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2322252A' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

:where([data-theme]) .form-range::-webkit-slider-thumb { background-color: var(--pal-accent); }
:where([data-theme]) .form-range::-moz-range-thumb { background-color: var(--pal-accent); }
:where([data-theme]) .form-range::-webkit-slider-runnable-track { background-color: var(--pal-border); }
:where([data-theme]) .form-range::-moz-range-track { background-color: var(--pal-border); }

/* Validation: rust */
:where([data-theme]) .form-control.error,
:where([data-theme]) .form-control select.error,
:where([data-theme]) .form-control .form-select.error {
  border-color: var(--pal-rust) !important;
  color: var(--pal-rust-text);
}
:where([data-theme]) .form-control.error::placeholder,
:where([data-theme]) .form-control select.error { color: var(--pal-rust-text); }

/* Theme-layer form bits */
:where([data-theme]) .form-block { background-color: var(--pal-surface); }
:where([data-theme]) .form-data .icon { color: var(--pal-link); }
:where([data-theme]) .form-control.time .icon { background-color: var(--pal-bg); }
:where([data-theme]) .form-check.color label { border-color: var(--pal-border); }
:where([data-theme]) .form-check.color input:checked + label { border-color: var(--pal-accent); }

:where([data-theme]) .range-block .inputs-holder:after { background: var(--pal-text-muted); }
:where([data-theme]) .range-block .ui-widget.ui-widget-content { background-color: var(--pal-border); }
:where([data-theme]) .range-block .ui-widget-header {
  background: var(--pal-accent);
  border-color: var(--pal-accent);
}
:where([data-theme]) .range-block .ui-slider-handle {
  background: var(--pal-surface);
  border-color: var(--pal-accent);
}

/* reCAPTCHA note (custom.css) */
:where([data-theme]) .recapv3 { color: var(--pal-text-muted); }
:where([data-theme]) .recapv3 label a { color: var(--pal-link); }

/* ---------------------------------------------------------------------------
   Cards, accordions, lists
   --------------------------------------------------------------------------- */

:where([data-theme]) .card {
  background-color: var(--pal-surface);
  border-color: var(--pal-border);
}
:where([data-theme]) .card-header,
:where([data-theme]) .card-footer {
  background-color: var(--pal-tint);
  border-color: var(--pal-border);
}

:where([data-theme]) .img-thumbnail {
  background-color: var(--pal-surface);
  border-color: var(--pal-border);
}

/* Linked titles read in text colour and go teal on hover; plain headings
   stay tan. That split is the main.css theme's own - it only swaps colours. */
:where([data-theme]) .card.recent,
:where([data-theme]) .card.favorites a,
:where([data-theme]) .card.catalog-list a,
:where([data-theme]) .card.catalog a,
:where([data-theme]) .card.catalog-list a .strike,
:where([data-theme]) .section.blog a h3,
:where([data-theme]) .section.blog a .h3,
:where([data-theme]) article a h3,
:where([data-theme]) article a .h3,
:where([data-theme]) .contact-card a,
:where([data-theme]) .list-group-flush .list-group-item a,
:where([data-theme]) .category a::after {
  color: var(--pal-text);
}
:where([data-theme]) .card.recent:hover span,
:where([data-theme]) .card.catalog-list:hover,
:where([data-theme]) .card.catalog-list:hover a h3,
:where([data-theme]) .card.catalog-list:hover a .h3,
:where([data-theme]) .card.catalog h3 a:hover,
:where([data-theme]) .card.catalog .h3 a:hover,
:where([data-theme]) .card.favorites a:hover,
:where([data-theme]) article a:hover h3,
:where([data-theme]) article a:hover .h3,
:where([data-theme]) .contact-card a:hover,
:where([data-theme]) .list-group-flush .list-group-item a:hover {
  color: var(--pal-link);
}
:where([data-theme]) .card.recent .time,
:where([data-theme]) .pagination-img time { color: var(--pal-text-muted); }

/* main.css forces white text on any .btn in these cards; keep that for the
   filled teal button only. */
:where([data-theme]) .card.favorites .btn,
:where([data-theme]) .card.catalog-list .btn,
:where([data-theme]) .card.catalog .btn { color: var(--pal-text); }
:where([data-theme]) .card.favorites .btn-primary,
:where([data-theme]) .card.catalog-list .btn-primary,
:where([data-theme]) .card.catalog .btn-primary { color: var(--pal-on-accent); }

/* Sale is a rust moment; "new" is quiet. */
:where([data-theme]) .card.favorites .sale,
:where([data-theme]) .card.catalog-list .sale {
  color: #F3ECDF;
  background-color: var(--pal-rust);
}
:where([data-theme]) .card.favorites .new,
:where([data-theme]) .card.catalog-list .new {
  color: var(--pal-on-secondary);
  background-color: var(--pal-secondary);
}
:where([data-theme]) .card.favorites .close::before,
:where([data-theme]) .card.favorites .close::after { background-color: var(--pal-text); }
:where([data-theme]) .card.favorites .close:hover::before,
:where([data-theme]) .card.favorites .close:hover::after { background-color: var(--pal-accent); }

:where([data-theme]) .card-client,
:where([data-theme]) .card-client.img-overlay::before { background-color: var(--pal-surface); }
:where([data-theme]) .card-client .card-body::before { background-color: var(--pal-section); }
:where([data-theme]) .card-about .icon,
:where([data-theme]) .contact-card .icon { color: var(--pal-link); }

/* Accordion. The chevron is drawn as a mask filled with currentColor, so it
   follows the button's text colour in either theme and inside dark islands -
   a background-image SVG would need one copy per colour. */
:where([data-theme]) .accordion-item {
  background-color: var(--pal-surface);
  border-color: var(--pal-border);
}
:where([data-theme]) .accordion-button {
  color: var(--pal-text);
  background-color: var(--pal-surface);
}
:where([data-theme]) .accordion-button:not(.collapsed) {
  color: var(--pal-link);
  background-color: var(--pal-surface-hover);
  box-shadow: inset 0 -1px 0 var(--pal-border);
}
:where([data-theme]) .accordion-button:focus {
  border-color: var(--pal-accent);
  box-shadow: 0 0 0 0.25rem var(--pal-focus-ring);
}
:where([data-theme]) .accordion-button::after,
:where([data-theme]) .accordion-button:not(.collapsed)::after {
  background-image: none;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") center / 1.25rem no-repeat;
          mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") center / 1.25rem no-repeat;
}
/* FeaturedList.html inverts its chevrons for its dark block; with the mask
   they are already the right colour, and inverting would blacken them. Its
   <style> sits after this file, hence :root rather than :where. */
:root[data-theme] .featured-listing .accordion-button::after { filter: none; }
:root[data-theme] .featured-listing .accordion-item { border-color: var(--pal-border); }
:root[data-theme] .featured-listing .list-group-item.is-today {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent);
}

/* List groups */
:where([data-theme]) .list-group-item {
  color: var(--pal-text);
  background-color: var(--pal-surface);
  border-color: var(--pal-border);
}
:where([data-theme]) .list-group-item-action,
:where([data-theme]) .list-group-item-action:hover,
:where([data-theme]) .list-group-item-action:focus { color: var(--pal-text); }
:where([data-theme]) .list-group-item-action:hover,
:where([data-theme]) .list-group-item-action:focus,
:where([data-theme]) .list-group-item-action:active { background-color: var(--pal-surface-hover); }
:where([data-theme]) .list-group-item.disabled,
:where([data-theme]) .list-group-item:disabled {
  color: var(--pal-text-muted);
  background-color: var(--pal-surface);
}
:where([data-theme]) .list-group-item.active {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent);
  border-color: var(--pal-accent);
}

/* Tables */
:where([data-theme]) .table {
  --bs-table-striped-color: var(--pal-text);
  --bs-table-striped-bg: var(--pal-tint);
  --bs-table-active-color: var(--pal-text);
  --bs-table-active-bg: var(--pal-surface-hover);
  --bs-table-hover-color: var(--pal-text);
  --bs-table-hover-bg: var(--pal-tint);
  color: var(--pal-text);
  border-color: var(--pal-border);
}
:where([data-theme]) .products-table table,
:where([data-theme]) .products-table thead th,
:where([data-theme]) .products-table .tbody tr,
:where([data-theme]) .products-table .tbody tr:not(:last-child),
:where([data-theme]) .summary-table .tfoot { border-color: var(--pal-border); }
:where([data-theme]) .products-table .tbody td:first-child:after,
:where([data-theme]) .products-table .tbody td:last-child:after { background: var(--pal-bg); }
:where([data-theme]) .products-table a:hover svg { fill: var(--pal-accent); }

/* ---------------------------------------------------------------------------
   Pagination
   --------------------------------------------------------------------------- */

:where([data-theme]) .pagination a { color: var(--pal-text); }
:where([data-theme]) .pagination .prev:hover,
:where([data-theme]) .pagination .next:hover,
:where([data-theme]) .pagination li:hover,
:where([data-theme]) .pagination li.active { background-color: var(--pal-accent); }
:where([data-theme]) .pagination .active a,
:where([data-theme]) .pagination a:hover { color: var(--pal-on-accent); }

:where([data-theme]) .page-link {
  color: var(--pal-link);
  background-color: var(--pal-surface);
  border-color: var(--pal-border);
}
:where([data-theme]) .page-link:hover,
:where([data-theme]) .page-link:focus {
  color: var(--pal-link-hover);
  background-color: var(--pal-surface-hover);
  border-color: var(--pal-border);
}
:where([data-theme]) .page-link:focus { box-shadow: 0 0 0 0.25rem var(--pal-focus-ring); }
:where([data-theme]) .page-item.active .page-link {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent);
  border-color: var(--pal-accent);
}
:where([data-theme]) .page-item.disabled .page-link {
  color: var(--pal-text-muted);
  background-color: var(--pal-surface);
  border-color: var(--pal-border);
}

:where([data-theme]) .pagination-img { border-color: var(--pal-border); }
:where([data-theme]) .pagination-img .card-pagination:first-child::before,
:where([data-theme]) .pagination-img .card-pagination:last-child::before { color: var(--pal-border); }
:where([data-theme]) .pagination-img .card-pagination span { color: var(--pal-text); }
:where([data-theme]) .pagination-img .card-pagination:hover span { color: var(--pal-link); }

/* ---------------------------------------------------------------------------
   Overlays: modals, popovers, toasts, offcanvas
   --------------------------------------------------------------------------- */

:where([data-theme]) .modal-content,
:where([data-theme]) .offcanvas,
:where([data-theme]) .popover,
:where([data-theme]) .toast {
  color: var(--pal-text);
  background-color: var(--pal-surface);
  border-color: var(--pal-border);
}
:where([data-theme]) .modal-header,
:where([data-theme]) .modal-footer,
:where([data-theme]) .popover-header,
:where([data-theme]) .toast-header { border-color: var(--pal-border); }
:where([data-theme]) .popover-header,
:where([data-theme]) .toast-header {
  color: var(--pal-text-muted);
  background-color: var(--pal-surface-hover);
}
:where([data-theme]) .popover-body { color: var(--pal-text); }
:where([data-theme]) .bs-popover-top > .popover-arrow::after,
:where([data-theme]) .bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after { border-top-color: var(--pal-surface); }
:where([data-theme]) .bs-popover-end > .popover-arrow::after,
:where([data-theme]) .bs-popover-auto[data-popper-placement^=right] > .popover-arrow::after { border-right-color: var(--pal-surface); }
:where([data-theme]) .bs-popover-bottom > .popover-arrow::after,
:where([data-theme]) .bs-popover-auto[data-popper-placement^=bottom] > .popover-arrow::after { border-bottom-color: var(--pal-surface); }
:where([data-theme]) .bs-popover-start > .popover-arrow::after,
:where([data-theme]) .bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after { border-left-color: var(--pal-surface); }

:where([data-theme]) .modal .close::before,
:where([data-theme]) .modal .close::after { background-color: var(--pal-text); }
:where([data-theme]) .modal .close:hover::before,
:where([data-theme]) .modal .close:hover::after { background-color: var(--pal-accent); }

/* Bootstrap's close X is a black SVG. On dark surfaces, flip it the way
   Bootstrap's own .btn-close-white does. */
:where([data-theme="dark"]) .btn-close,
:where([data-theme="light"]) :is(.footer, .bg-dark[class*="bg-opacity"]) .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}
:where([data-theme]) .btn-close:focus { box-shadow: 0 0 0 0.25rem var(--pal-focus-ring); }

:where([data-theme]) .progress { background-color: var(--pal-surface-hover); }
:where([data-theme]) .progress-bar {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent);
}

/* ---------------------------------------------------------------------------
   Theme-layer sections and odds and ends (main.css, after jQuery UI)
   --------------------------------------------------------------------------- */

:where([data-theme]) .price { color: var(--pal-text); }
:where([data-theme]) .strike + .price { color: var(--pal-text-muted); }
:where([data-theme]) .price-block .price,
:where([data-theme]) .rent-list .price,
:where([data-theme]) .rent-sidebar .price { color: var(--pal-link); }
:where([data-theme]) .sale-price-block .sale-price + .price { color: var(--pal-rust-text); }

:where([data-theme]) blockquote { background: var(--pal-section); }
:where([data-theme]) blockquote::after { background-color: var(--pal-rule); }
:where([data-theme]) blockquote::before { color: var(--pal-rule); }

:where([data-theme]) .main-img .time {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent);
}
:where([data-theme]) .background-color::before,
:where([data-theme]) .section.inform { background-color: var(--pal-section); }
:where([data-theme]) .section.inform .icon {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent);
}

:where([data-theme]) .article { border-bottom-color: var(--pal-border); }
:where([data-theme]) .article h2,
:where([data-theme]) .article .h2 { color: var(--pal-heading); }

:where([data-theme]) .custom-list li::before { background-color: var(--pal-rule); }

:where([data-theme]) .social a { color: var(--pal-text-muted); }
:where([data-theme]) .social a:hover { color: var(--pal-link); }

:where([data-theme]) #loading-mask { background: var(--pal-bg); }
:where([data-theme]) #loading-mask .c-three-dots-loader { color: var(--pal-accent); }

:where([data-theme]) .shopping-cart.active::before { background-color: var(--pal-accent); }

/* Tabs */
:where([data-theme]) .tabs li::before,
:where([data-theme]) .tabs li:first-child::before { border-bottom-color: var(--pal-border); }
:where([data-theme]) .tabs .nav-link,
:where([data-theme]) .product-tabs .nav-link {
  color: var(--pal-text);
  background-color: var(--pal-section);
}
:where([data-theme]) .tabs .nav-link.active,
:where([data-theme]) .tabs .nav-link:hover,
:where([data-theme]) .product-tabs .nav-link.active {
  color: var(--pal-on-accent);
  background-color: var(--pal-accent);
}
:where([data-theme]) .product-tabs::before { background-color: var(--pal-section); }

/* FAQ */
:where([data-theme]) .faq,
:where([data-theme]) .faq .nav-link { color: var(--pal-text); }
:where([data-theme]) .faq .nav-link:hover,
:where([data-theme]) .faq .nav-link.active { color: var(--pal-link); }

/* Rentals and spec lists */
:where([data-theme]) .rent-list .list-group-item:last-child,
:where([data-theme]) .rent-sidebar .list-group-item:last-child { border-bottom-color: var(--pal-border); }
:where([data-theme]) .rent hr { background-color: var(--pal-border); }
:where([data-theme]) .disabled-container .name { color: var(--pal-text-muted); }
:where([data-theme]) .disabled-container .value { color: var(--pal-text); }

/* Sliders */
:where([data-theme]) .button-slide .slick-current img { border-color: var(--pal-accent); }
:where([data-theme]) .button-slide .slick-arrow::before { color: var(--pal-text-muted); }
:where([data-theme]) .button-slide .slick-arrow:hover::before { color: var(--pal-link); }

/* ---------------------------------------------------------------------------
   Footer - a dark island in both themes
   --------------------------------------------------------------------------- */

:where([data-theme]) .footer {
  color: var(--pal-text-muted);
  background-color: var(--pal-footer-bg);
}
:where([data-theme]) .footer .list-group a,
:where([data-theme]) .main-links .list-group-item::before,
:where([data-theme]) .contacts i,
:where([data-theme]) .contacts address { color: var(--pal-text); }
:where([data-theme]) .footer .list-group a:hover { color: var(--pal-link); }
:where([data-theme]) .footer-at-bottom { border-top-color: var(--pal-border); }

/* ---------------------------------------------------------------------------
   custom.css components
   --------------------------------------------------------------------------- */

/* Nav Top Bar: whiskey tan with stage-black text (5.3:1; white on tan was
   3.4:1). */
:where([data-theme]) .nav-top-bar {
  color: #22252A;
  background-color: #A08563;
}

/* Reverb embeds - their button keeps Reverb orange on purpose. */
:where([data-theme]) .reverb-embedded-listing-info { border-top-color: var(--pal-border); }
:where([data-theme]) .reverb-embedded-listing-title { color: var(--pal-text); }

/* ---------------------------------------------------------------------------
   Page-level <style> blocks (they load after this file, so :root[data-theme])
   --------------------------------------------------------------------------- */

/* Advertise with us - the plan picker was bright blue */
:root[data-theme] .ad-picker .ad-card { border-color: var(--pal-border); }
:root[data-theme] .ad-picker .ad-card:hover { border-color: var(--pal-rule); }
:root[data-theme] .ad-picker .ad-card.is-selected {
  border-color: var(--pal-accent);
  box-shadow: 0 0 0 3px var(--pal-focus-ring);
}
:root[data-theme] .ad-picker .ad-card:focus-within { outline-color: var(--pal-accent); }
:root[data-theme] .ad-picker .ad-card .card-img-top { background: var(--pal-section); }
:root[data-theme] .ad-picker .ad-card .ad-check {
  color: var(--pal-on-accent);
  background: var(--pal-accent);
}
