/* BinauraWave / Blocksy Child 261025-3. Additional CSS remains the common baseline.
   No global button, form, Gutenberg-column or app-interface overrides. */
body.bw-site-skin {
  --bw-site-surface: linear-gradient(180deg, rgba(17, 26, 39, .95), rgba(13, 21, 33, .95));
  --bw-site-border: rgba(73, 90, 114, .58);
  --bw-site-radius: 28px;
  --bw-site-shadow: 0 24px 80px rgba(0, 0, 0, .38);
  --bw-site-pad: clamp(16px, 2.2vw, 32px);
  --bw-site-gutter: clamp(8px, 2vw, 24px);
  background: #07101b;
  isolation: isolate;
}

/* This layer has no input handling, document height or scroll-container effect. */
body.bw-site-skin::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #07101b url("../images/binaurawave-gold-wave.png?v=261025-1") center / cover no-repeat;
}

/* Keep the real article/content widths, sidebar grid and Gutenberg alignment
   variables. The surface supplies visual gutters without shrinking the content. */
body.bw-site-skin:not(.bw-site-owned-panels):is(.page, .single-post) #main > :is(.ct-container-full, .ct-container, .ct-container-narrow) > article {
  position: relative;
  isolation: isolate;
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  padding-block: var(--bw-site-pad);
}

body.bw-site-skin:not(.bw-site-owned-panels):is(.page, .single-post) #main > :is(.ct-container-full, .ct-container, .ct-container-narrow) > article::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--bw-site-article-surface-width, min(calc(100% - var(--bw-site-gutter) * 2), calc(var(--theme-container-width, 90vw) + var(--bw-site-pad) * 2)));
  max-width: var(--bw-site-article-surface-max, calc(var(--theme-normal-container-max-width, 1290px) + var(--bw-site-pad) * 2));
  background: var(--bw-site-surface);
  border: 1px solid var(--bw-site-border);
  border-radius: var(--bw-site-radius);
  box-shadow: var(--bw-site-shadow);
  pointer-events: none;
  z-index: -1;
}

/* Grid-constrained and narrow articles already have bounded content widths. */
body.bw-site-skin.single-post #main > [data-sidebar] > article::before,
body.bw-site-skin #main > .ct-container-narrow > article::before {
  /* Set dedicated values rather than compete with the more specific base width
     selector. Its :not()/:is() specificity previously defeated this override. */
  --bw-site-article-surface-width: calc(100% + min(var(--bw-site-pad), 16px) * 2);
  --bw-site-article-surface-max: calc(100vw - var(--bw-site-gutter) * 2);
}

/* One continuous sidebar card on single posts. Blocksy already positions this
   wrapper; do not override its relative/sticky position or the sidebar grid. */
body.bw-site-skin.single-post #main > [data-sidebar] > aside > .ct-sidebar {
  isolation: isolate;
  padding-block: var(--bw-site-pad);
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}

body.bw-site-skin.single-post #main > [data-sidebar] > aside > .ct-sidebar::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% + min(var(--bw-site-pad), 16px) * 2);
  max-width: calc(100vw - var(--bw-site-gutter) * 2);
  background: var(--bw-site-surface);
  border: 1px solid var(--bw-site-border);
  border-radius: var(--bw-site-radius);
  box-shadow: var(--bw-site-shadow);
  pointer-events: none;
  z-index: -1;
}

/* Existing card padding, grids, featured borders and form controls are retained. */
body.bw-site-skin #main :is(.entry-card, .bw-account-card, .bw-membership-card) {
  background: var(--bw-site-surface);
  border: 1px solid var(--bw-site-border);
  border-radius: var(--bw-site-radius);
  box-shadow: var(--bw-site-shadow);
  --theme-text-color: #f5f1e8;
  --theme-headings-color: #f5f1e8;
  --theme-link-initial-color: #f5f1e8;
  color: #f5f1e8;
}

body.bw-site-skin.error404 #main > .ct-container {
  position: relative;
  isolation: isolate;
}

body.bw-site-skin.error404 #main > .ct-container::before {
  content: "";
  position: absolute;
  inset-block: calc(var(--theme-content-vertical-spacing, 60px) / 2);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% + var(--bw-site-pad) * 2);
  max-width: calc(100vw - var(--bw-site-gutter) * 2);
  background: var(--bw-site-surface);
  border: 1px solid var(--bw-site-border);
  border-radius: var(--bw-site-radius);
  box-shadow: var(--bw-site-shadow);
  pointer-events: none;
  z-index: -1;
}

/* Preserve the existing header/footer row styling and mobile drawer. Remove only
   the pale footer backing behind those rows so gaps reveal the navy backdrop. */
body.bw-site-skin #footer.ct-footer { background-color: transparent; }

@media (max-width: 689.98px) {
  body.bw-site-skin { --bw-site-radius: 24px; }
}
