/* BootHack Tailwind Bridge
 * Structural overrides, component shorthand classes, and typography
 * baseline for the Tailwind CSS Play CDN adapter.
 *
 * Play CDN generates utility class CSS at runtime by scanning the DOM.
 * This file handles:
 *   - CSS custom property bridge (--bh-* → --bs-* aliases for button colours)
 *   - WP body_class collision guards (Tailwind tags <body> with utility-like classes)
 *   - Tailwind preflight heading scale restoration (body hN rules beat Preflight's single-element reset)
 *   - Tailwind preflight content compensations (.bh-singular-content prose override)
 *   - SVG mask icon system (bh-ui-icon*, bh-social-icon*)
 *   - bh-btn* button components
 *   - bh-tw-card / bh-tw-card-body card components (no overflow:hidden)
 *   - bh-badge badge components
 *   - bh-tw-input form controls
 *   - bh-tw-alert alert component
 *   - bh-container layout container
 *   - Offcanvas system (Bootstrap-named; interaction-kit.js)
 *   - Navbar chrome for .bh-tw-nav
 *   - Search form bridge
 *   - Breadcrumbs
 *   - Post grid, pagination, post navigation, featured post
 *   - Hero, standard header, comment module
 *   - Footer dark surface (identical to Bulma / Foundation)
 *   - Social links, responsive rules
 */

/* =============================================================================
   CSS CUSTOM PROPERTY BRIDGE
   Forward canonical --bh-* vars to the --bs-* aliases this bridge reads for
   body text and button colours.  css-vars.php gates --bs-* to Bootstrap only,
   so we re-establish them here from the always-emitted --bh-* canonical set.
============================================================================= */

:root {
  --bs-body-color:             var(--bh-body-color, #1a1a1a);
  --bs-body-bg:                var(--bh-body-bg, #fff);
  --bs-primary:                var(--bh-primary, #2563eb);
  /*
   * content.css underline RGB resolves through --bs-primary-rgb, which
   * css-vars.php gates to Bootstrap only (UIkit 4.0.63 / Foundation 4.0.71 parity).
   */
  --bs-primary-rgb:            var(--bh-primary-rgb, 37, 99, 235);
  /*
   * content.css hover fallback reads --bs-primary-dark; wire to button-hover mod.
   */
  --bs-primary-dark:           var(--bh-button-bg-hover, var(--bh-button-bg-color, #1d4ed8));
  --bs-btn-bg:                 var(--bh-button-bg-color, var(--bh-primary, #2563eb));
  --bs-btn-color:              var(--bh-button-text-color, #ffffff);
  --bs-btn-border-color:       var(--bh-button-border-color, var(--bh-button-bg-color, var(--bh-primary, #2563eb)));
  --bs-btn-hover-bg:           var(--bh-button-bg-hover, var(--bh-button-bg-color, #1d4ed8));
  --bs-btn-hover-color:        var(--bh-button-text-hover, #ffffff);
  --bs-btn-hover-border-color: var(--bh-button-border-hover, var(--bh-button-bg-hover, #1d4ed8));
  /*
   * breadcrumbs.css (loaded for all frameworks) uses this variable for the
   * bottom border of .bh-breadcrumbs.  Bootstrap defines it via Reboot;
   * Tailwind Preflight does not.  Without this, var() fails → border-bottom
   * is treated as initial (border-style: none) and the bar border vanishes.
   * The inline style from the render template (border-color:#e5e5e5) only
   * sets colour, not style, so it cannot rescue the invisible border alone.
   */
  --bs-border-color:           rgba(0, 0, 0, .175);
}

body {
  color: var(--bs-body-color, #1a1a1a);
  /*
   * Tailwind Preflight does not normalise body font-size or line-height;
   * browser defaults vary.  1rem / 1.5 matches Bootstrap 5, Bulma, and
   * Pico's body baselines so layout metrics are consistent across frameworks.
   */
  font-size: 1rem;
  line-height: 1.5;
}

/*
 * Dark-mode deference — release Customizer body text/background in dark
 * scheme so Tailwind Preflight / system dark surfaces are not forced light.
 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) body {
    color: #e5e5e5;
  }

  :root:not([data-theme=light]) body.custom-background {
    background-color: #171717;
  }
}

[data-theme=dark] body {
  color: #e5e5e5;
}

[data-theme=dark] body.custom-background {
  background-color: #171717;
}

/* =============================================================================
   WP BODY_CLASS COLLISION GUARDS
   Tailwind's global tag rules can collide with WordPress body classes that
   share utility-like names.
============================================================================= */

body.tag {
  display: block !important;
}

body.archive.tag {
  align-items: normal !important;
  justify-content: normal !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
}

body.category {
  display: block !important;
}

body.archive.category {
  align-items: normal !important;
  justify-content: normal !important;
  height: auto !important;
  min-height: 0 !important;
}

/* =============================================================================
   PREFLIGHT HEADING SCALE RESTORATION
   Tailwind Preflight (injected by the Play CDN at runtime) resets:
     h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
   Bootstrap / Bulma / Pico / Foundation all preserve UA heading hierarchy
   through their own base layer.  The Play CDN injects its <style> tag after
   this stylesheet's <link> tag, so same-specificity rules here would lose to
   Preflight in cascade order.

   Fix: use a `body` ancestor selector ([0,0,2]) which beats Preflight's bare
   element rule ([0,0,1]) regardless of source order.  The Typography plugin's
   `.prose hN` rules sit at [0,1,1] and correctly override these inside WP
   content areas.  Component-level class rules (.bh-header__title, etc.) at
   [0,1,0] also override these for specific contexts.
============================================================================= */

body h1 { font-size: 2rem;    font-weight: 700; line-height: 1.2;  margin-top: 0; margin-bottom: 0.5rem; }
body h2 { font-size: 1.5rem;  font-weight: 700; line-height: 1.25; margin-top: 0; margin-bottom: 0.5rem; }
body h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3;  margin-top: 0; margin-bottom: 0.5rem; }
body h4 { font-size: 1.125rem; font-weight: 600; line-height: 1.35; margin-top: 0; margin-bottom: 0.5rem; }
body h5 { font-size: 1rem;    font-weight: 600; margin-top: 0; margin-bottom: 0.5rem; }
body h6 { font-size: 0.875rem; font-weight: 600; margin-top: 0; margin-bottom: 0.5rem; }

/* =============================================================================
   TYPOGRAPHY MODULE BRIDGE
   Wire inc/modules/typography --bh-body-font / --bh-heading-font CSS variables
   into the elements that need them.

   The typography module (render/typography.php) outputs --bh-body-font and
   --bh-heading-font on :root plus `body` and `h1-h6` font-family rules ONLY
   when a font is active in the Customizer.  These bridge rules serve two roles:

   1. Provide a predictable system font stack when no custom font is selected
      (module inactive, no inline CSS output).
   2. Extend heading-font coverage to named heading class selectors used by
      BootHack modules (.bh-card-title, .bh-featured-title, etc.) which are
      not covered by the module's bare h1-h6 selector.

   Specificity: all selectors below sit at [0,0,1] (element) or [0,1,0]
   (class).  When the typography module IS active, its inline CSS carries the
   same or matching specificity but loads later in source order (enqueued at
   priority 20 vs bridge at priority 10), so the inline rules win — the
   selected Google / custom font is applied correctly.

   Matches the pattern used in the Bulma, Pico, and Materialize bridges.
============================================================================= */

/*
 * Body font cascade.  Tailwind Forms plugin sets `font-family: inherit` on
 * form controls so they already inherit from body.  The explicit element list
 * here is the defensive standard used by every other BootHack adapter: it
 * ensures the system-stack fallback reaches form controls even if the Forms
 * plugin is unavailable, and provides a named anchor for the typography module
 * to override via same-specificity / later-source-order inline CSS.
 */
body,
button,
input,
optgroup,
select,
textarea {
  font-family: var(--bh-body-font, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/*
 * Heading font cascade.  Includes bare hN elements AND the named heading-class
 * selectors used by BootHack modules.  The module's h1-h6 rule covers bare
 * heading elements when active; these class selectors extend that coverage to
 * component headings regardless of whether the module is active.
 */
h1, h2, h3, h4, h5, h6,
.bh-header__title,
.bh-standard-page-title,
.bh-card-title,
.bh-card-title-h4,
.bh-featured-title,
.bh-comments-title,
.bh-comments-reply-title {
  font-family: var(--bh-heading-font, var(--bh-body-font, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif));
}

/* =============================================================================
   SVG MASK ICON SYSTEM
   Identical to Bulma / Pico / Foundation bridges.
============================================================================= */

.bh-ui-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
}

.bh-ui-icon--search {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.099zm-5.242 1.656a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.099zm-5.242 1.656a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11z'/%3E%3C/svg%3E");
}

.bh-ui-icon--tag {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm-1 0a.5.5 0 1 0-1 0 .5.5 0 0 0 1 0z'/%3E%3Cpath d='M2 1h4.586a1 1 0 0 1 .707.293l7 7a1 1 0 0 1 0 1.414l-4.586 4.586a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 1 6.586V2a1 1 0 0 1 1-1zm0 5.586 7 7L13.586 9l-7-7H2v4.586z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm-1 0a.5.5 0 1 0-1 0 .5.5 0 0 0 1 0z'/%3E%3Cpath d='M2 1h4.586a1 1 0 0 1 .707.293l7 7a1 1 0 0 1 0 1.414l-4.586 4.586a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 1 6.586V2a1 1 0 0 1 1-1zm0 5.586 7 7L13.586 9l-7-7H2v4.586z'/%3E%3C/svg%3E");
}

.bh-ui-icon--arrow-right {
  -webkit-mask-image: 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 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z'/%3E%3C/svg%3E");
  mask-image: 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 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z'/%3E%3C/svg%3E");
}

.bh-ui-icon--chevron-up {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z'/%3E%3C/svg%3E");
}

.bh-ui-icon--comment-chat {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.678 11.894a1 1 0 0 1 .287.801 10.97 10.97 0 0 1-.398 2c1.395-.323 2.247-.697 2.634-.893a1 1 0 0 1 .71-.074A8.06 8.06 0 0 0 8 14c3.996 0 7-2.807 7-6 0-3.192-3.004-6-7-6S1 4.808 1 8c0 1.468.617 2.83 1.678 3.894zm-.493 3.905a21.682 21.682 0 0 1-.713.129c-.2.032-.352-.176-.273-.362a9.68 9.68 0 0 0 .244-.637l.003-.01c.248-.72.45-1.548.524-2.319C.743 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7-3.582 7-8 7a9.06 9.06 0 0 1-2.347-.306c-.52.263-1.639.742-3.468 1.105z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.678 11.894a1 1 0 0 1 .287.801 10.97 10.97 0 0 1-.398 2c1.395-.323 2.247-.697 2.634-.893a1 1 0 0 1 .71-.074A8.06 8.06 0 0 0 8 14c3.996 0 7-2.807 7-6 0-3.192-3.004-6-7-6S1 4.808 1 8c0 1.468.617 2.83 1.678 3.894zm-.493 3.905a21.682 21.682 0 0 1-.713.129c-.2.032-.352-.176-.273-.362a9.68 9.68 0 0 0 .244-.637l.003-.01c.248-.72.45-1.548.524-2.319C.743 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7-3.582 7-8 7a9.06 9.06 0 0 1-2.347-.306c-.52.263-1.639.742-3.468 1.105z'/%3E%3C/svg%3E");
}

.bh-ui-icon--comment-reply {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.598 5.013a.144.144 0 0 1 .202.134V6.3a.5.5 0 0 0 .5.5c.667 0 2.013.005 3.3.822.984.624 1.99 1.76 2.595 3.876-1.02-.983-2.185-1.516-3.205-1.799a8.74 8.74 0 0 0-1.921-.306 7.404 7.404 0 0 0-.798.008h-.013l-.005.001h-.001L8.5 9.9l-.05-.498a.5.5 0 0 0-.5.498v1.153c0 .108-.11.176-.202.134L5.614 9.886a.5.5 0 0 0-.024-.033l-.002-.002L5.58 9.84a.5.5 0 0 0-.008-.01L5.57 9.823a.5.5 0 0 0-.006-.01l-.003-.005a.5.5 0 0 0-.004-.008l-.009-.018.005.009L5.543 9.78a.5.5 0 0 0-.007-.013L5.536 9.767 5.53 9.758 5.52 9.74 5.508 9.716 5.496 9.69 5.483 9.66l-.016-.039-.019-.047L5.43 9.534l-.025-.065L5.38 9.41l-.03-.085L5.32 9.25l-.034-.107L5.25 9.065l-.037-.126L5.178 8.87l-.04-.143L5.104 8.6l-.042-.155L5.03 8.32 4.991 8.14 4.954 7.954 4.921 7.76 4.89 7.56 4.863 7.354l-.017-.21-.01-.216-.006-.22-.002-.225.002-.229.007-.232.013-.235.021-.237.03-.238.04-.238.05-.236.063-.234.076-.23.09-.226.104-.22.118-.212.133-.204.148-.194.163-.183.178-.172.192-.16.207-.148.22-.134.234-.12L6.598 5.013z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.598 5.013a.144.144 0 0 1 .202.134V6.3a.5.5 0 0 0 .5.5c.667 0 2.013.005 3.3.822.984.624 1.99 1.76 2.595 3.876-1.02-.983-2.185-1.516-3.205-1.799a8.74 8.74 0 0 0-1.921-.306 7.404 7.404 0 0 0-.798.008h-.013l-.005.001h-.001L8.5 9.9l-.05-.498a.5.5 0 0 0-.5.498v1.153c0 .108-.11.176-.202.134L5.614 9.886a.5.5 0 0 0-.024-.033l-.002-.002L5.58 9.84a.5.5 0 0 0-.008-.01L5.57 9.823a.5.5 0 0 0-.006-.01l-.003-.005a.5.5 0 0 0-.004-.008l-.009-.018.005.009L5.543 9.78a.5.5 0 0 0-.007-.013L5.536 9.767 5.53 9.758 5.52 9.74 5.508 9.716 5.496 9.69 5.483 9.66l-.016-.039-.019-.047L5.43 9.534l-.025-.065L5.38 9.41l-.03-.085L5.32 9.25l-.034-.107L5.25 9.065l-.037-.126L5.178 8.87l-.04-.143L5.104 8.6l-.042-.155L5.03 8.32 4.991 8.14 4.954 7.954 4.921 7.76 4.89 7.56 4.863 7.354l-.017-.21-.01-.216-.006-.22-.002-.225.002-.229.007-.232.013-.235.021-.237.03-.238.04-.238.05-.236.063-.234.076-.23.09-.226.104-.22.118-.212.133-.204.148-.194.163-.183.178-.172.192-.16.207-.148.22-.134.234-.12L6.598 5.013z'/%3E%3C/svg%3E");
}

.bh-ui-icon--comment-edit {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z'/%3E%3C/svg%3E");
}

/* --- Social icon masks ----------------------------------------------------- */

.bh-social-icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  background-color: var(--bh-social-brand, currentColor);
}

.bh-social-icon--x {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z'/%3E%3C/svg%3E");
}

.bh-social-icon--facebook {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951z'/%3E%3C/svg%3E");
}

.bh-social-icon--instagram {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z'/%3E%3C/svg%3E");
}

.bh-social-icon--linkedin,
.bh-social-icon--github,
.bh-social-icon--youtube,
.bh-social-icon--discord,
.bh-social-icon--mastodon,
.bh-social-icon--bluesky,
.bh-social-icon--reddit,
.bh-social-icon--whatsapp,
.bh-social-icon--dribbble,
.bh-social-icon--tiktok,
.bh-social-icon--twitch,
.bh-social-icon--pinterest,
.bh-social-icon--wordpress,
.bh-social-icon--medium,
.bh-social-icon--behance,
.bh-social-icon--snapchat,
.bh-social-icon--lemmy,
.bh-social-icon--matrix,
.bh-social-icon--peertube,
.bh-social-icon--pixelfed {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7'/%3E%3C/svg%3E");
}

/* =============================================================================
   BUTTON COMPONENTS
   bh-btn* component shorthand classes used in adapter.php token values.
   Colour variables forward through the CSS custom property bridge above.
============================================================================= */

.bh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.bh-btn:focus-visible {
  outline: 2px solid var(--bh-button-bg-color, #2563eb);
  outline-offset: 2px;
}

.bh-btn-primary,
a.bh-btn-primary,
.bh-site-content #bh-load-more-btn {
  background-color: var(--bh-content-btn-bg, var(--bs-btn-bg, #2563eb));
  color: var(--bh-content-btn-text, var(--bs-btn-color, #fff));
  border-color: var(--bh-content-btn-border, var(--bs-btn-border-color, #2563eb));
}

.bh-btn-primary:hover,
.bh-btn-primary:focus,
a.bh-btn-primary:hover,
a.bh-btn-primary:focus,
.bh-site-content #bh-load-more-btn:hover,
.bh-site-content #bh-load-more-btn:focus {
  background-color: var(--bh-content-btn-bg-hover, var(--bs-btn-hover-bg, #1d4ed8));
  color: var(--bh-content-btn-text-hover, var(--bs-btn-hover-color, #fff));
  border-color: var(
    --bh-content-btn-border-hover,
    var(--bs-btn-hover-border-color, #1d4ed8)
  );
}

.bh-btn-outline {
  background-color: transparent;
  color: var(--bh-content-btn-bg, var(--bs-btn-bg, #2563eb));
  border-color: var(--bh-content-btn-border, var(--bs-btn-border-color, #2563eb));
}

.bh-btn-outline:hover,
.bh-btn-outline:focus {
  background-color: color-mix(in srgb, var(--bh-content-btn-bg, var(--bs-btn-bg, #2563eb)) 8%, transparent);
  color: var(--bh-content-btn-bg-hover, var(--bs-btn-hover-bg, #1d4ed8));
  border-color: var(
    --bh-content-btn-border-hover,
    var(--bs-btn-hover-border-color, #1d4ed8)
  );
}

.bh-btn-secondary {
  background-color: #6b7280;
  color: #fff;
  border-color: #6b7280;
}

.bh-btn-secondary:hover,
.bh-btn-secondary:focus {
  background-color: #4b5563;
  color: #fff;
  border-color: #4b5563;
}

.bh-btn-outline-light {
  background-color: transparent;
  color: #f9fafb;
  border-color: rgba(255, 255, 255, 0.5);
}

.bh-btn-outline-light:hover,
.bh-btn-outline-light:focus {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.bh-btn-sm {
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
}

.bh-btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.0625rem;
}

.bh-btn-search-submit {
  border-radius: 0 0.375rem 0.375rem 0;
}

/* =============================================================================
   BADGE COMPONENTS
   bh-badge + modifier used in adapter.php token values.
============================================================================= */

.bh-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.55em;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 0.25rem;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: baseline;
}

.bh-badge-secondary {
  background-color: #6b7280;
  color: #fff;
}

.bh-hero-category-chip {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(4px);
}

/* =============================================================================
   FORM CONTROLS
   bh-tw-input / bh-tw-label — Tailwind forms plugin enhances these further.
============================================================================= */

.bh-tw-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.bh-tw-input {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #111827;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bh-tw-input:focus {
  outline: none;
  border-color: var(--bh-button-bg-color, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.bh-tw-input--search {
  border-radius: 0.375rem 0 0 0.375rem;
  border-right: 0;
}

/* =============================================================================
   ALERT COMPONENT
============================================================================= */

.bh-tw-alert {
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.bh-tw-alert-info {
  background-color: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* =============================================================================
   SEARCH FORM BRIDGE
============================================================================= */

.boothack-search-form,
.bh-search-form {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0;
}

/*
 * Search form geometry — input grows, submit pins to content width (Pico parity).
 * Prevents 50/50 splits when Play CDN or Preflight sets full width on both
 * flex children.
 */
.boothack-search-form > .bh-tw-input,
.boothack-search-form > input[type="search"],
.boothack-search-form > input[type="text"] {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  margin: 0;
}

.boothack-search-form > .bh-btn-search-submit,
.boothack-search-form > button[type="submit"] {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

/*
 * Gutenberg Search block — does not use get_search_form(); mirror sidebar
 * flex row so block widget matches BootHack search chrome.
 */
.bh-sidebar .widget .wp-block-search .wp-block-search__inside-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.bh-sidebar .widget .wp-block-search__input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  margin: 0;
}

.bh-sidebar .widget .wp-block-search__button {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

.bh-sidebar .widget .wp-block-search__input {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #111827;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem 0 0 0.375rem;
  border-right: 0;
}

.bh-sidebar .widget .wp-block-search__button {
  padding: 0.5rem 1.125rem;
  border-radius: 0 0.375rem 0.375rem 0;
}

/* =============================================================================
   BREADCRUMBS
============================================================================= */

.bh-breadcrumbs {
  font-size: 0.875rem;
}

/*
 * breadcrumbs.css flex-centres `.bh-breadcrumbs .container` (Bootstrap token).
 * Tailwind maps breadcrumbs_container → bh-container; mirror Foundation's
 * grid-container fix without height:100% (parent uses min-height, not height).
 */
.bh-breadcrumbs .bh-container {
  display: flex;
  align-items: center;
}

.bh-breadcrumbs-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
}

.bh-breadcrumbs-item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.bh-breadcrumbs-item + .bh-breadcrumbs-item::before {
  content: "/";
  margin-right: 0.25rem;
  color: #9ca3af;
}

.bh-breadcrumbs-link {
  color: var(--bh-button-bg-color, #2563eb);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: text-decoration-color 0.2s ease;
}

.bh-breadcrumbs-link:visited {
  color: var(--bh-button-bg-color, #2563eb);
}

.bh-breadcrumbs-link:hover,
.bh-breadcrumbs-link:focus {
  text-decoration-color: currentColor;
}

.bh-breadcrumbs-link:focus-visible {
  outline: 2px solid var(--bh-button-bg-color, #2563eb);
  outline-offset: 2px;
}

.bh-breadcrumbs-active {
  color: #6b7280;
}

/* Sticky breadcrumbs. */
.bh-sticky-top {
  position: sticky;
  top: 0;
  z-index: 900;
}

.bh-breadcrumbs-light .bh-breadcrumbs-link,
.bh-breadcrumbs-light .bh-breadcrumbs-link:visited { color: rgba(255, 255, 255, 0.85); }
.bh-breadcrumbs-light .bh-breadcrumbs-active { color: rgba(255, 255, 255, 0.6); }
.bh-breadcrumbs-light .bh-breadcrumbs-item + .bh-breadcrumbs-item::before { color: rgba(255, 255, 255, 0.5); }

.bh-breadcrumbs-dark .bh-breadcrumbs-link,
.bh-breadcrumbs-dark .bh-breadcrumbs-link:visited { color: #1d4ed8; }
.bh-breadcrumbs-dark .bh-breadcrumbs-active { color: #374151; }

/* =============================================================================
   OFFCANVAS
   Bootstrap-named hooks required by interaction-kit.js.
   Identical implementation to Foundation / Bulma / Pico bridges.
============================================================================= */

.offcanvas {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(86vw, 360px);
  background: var(--bh-offcanvas-bg, #fff);
  color: var(--bh-offcanvas-fg, inherit);
  z-index: 1050;
  transform: translateX(-100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  pointer-events: none;
}

.offcanvas.offcanvas-start { border-right: 1px solid var(--bh-offcanvas-border, rgba(0,0,0,.08)); }
.offcanvas.offcanvas-end   { border-left:  1px solid var(--bh-offcanvas-border, rgba(0,0,0,.08)); }

.bh-offcanvas-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 1020;
  display: none;
  cursor: default;
}

.bh-offcanvas-backdrop.is-active { display: block; }

/* Prevent body scroll while an offcanvas panel is open. */
body.bh-offcanvas-open { overflow: hidden; }

.offcanvas[data-bs-theme="dark"]  { --bh-offcanvas-fg: #f9fafb; }
.offcanvas[data-bs-theme="light"] { --bh-offcanvas-fg: #111827; }

.offcanvas.offcanvas-end {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

.offcanvas.is-active {
  transform: translateX(0);
  pointer-events: auto;
}

.offcanvas.offcanvas-top,
.offcanvas.offcanvas-bottom {
  left: 0;
  right: 0;
  width: 100%;
  height: min(60vh, 520px);
  max-height: 100vh;
}

.offcanvas.offcanvas-top    { top: 0;    bottom: auto; transform: translateY(-100%); }
.offcanvas.offcanvas-bottom { top: auto; bottom: 0;    transform: translateY(100%);  }
.offcanvas.offcanvas-top.is-active,
.offcanvas.offcanvas-bottom.is-active { transform: translateY(0); }

.offcanvas-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 1rem;
  border-bottom: 1px solid var(--bh-offcanvas-border, rgba(0,0,0,.08));
}

.offcanvas-title { margin: 0; }
.offcanvas-body  { padding: 1rem; }

.offcanvas .btn-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 1.4rem;
  line-height: 1;
  margin-left: auto;
  cursor: pointer;
}

.offcanvas .btn-close::before { content: "×"; }

/*
 * Mobile offcanvas panel — stack nav items vertically and flush-left.
 * Scoped to max-width:991px so the global ID-selector specificity
 * (0,1,2,0) does not beat the desktop .offcanvas.offcanvas-lg .navbar-end
 * rule (0,0,3,0) at wider viewports.
 */
@media (max-width: 991px) {
  .offcanvas #bh-offcanvas-nav .navbar-end {
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
  }
}

/*
 * Non-expanding offcanvas (no offcanvas-lg) is always a drawer at every
 * breakpoint, so nav items must stack vertically everywhere — not just at
 * mobile.  Written outside any media query with :not(.offcanvas-lg) so it
 * never touches the desktop-unrolled offcanvas-lg panel (which intentionally
 * renders as a horizontal row at ≥992px).
 */
.offcanvas:not(.offcanvas-lg) #bh-offcanvas-nav .navbar-end {
  flex-direction: column;
  align-items: stretch;
  margin-left: 0;
}

/*
 * Inside the non-expanding offcanvas drawer, submenus expand inline (accordion)
 * rather than as absolute flyout popups.  Overrides the position:absolute,
 * top:100%, opacity:0, and flyout transition that the desktop @media block sets,
 * so the JS accordion (max-height + visibility inline styles) has full control.
 * overflow:hidden lets max-height:0 fully clip the content when closed.
 * transition:max-height lets the transitionend handler fire to set
 * visibility:hidden after close (required — no transitionend without a
 * transition property that actually changes).
 * color:inherit overrides the desktop @media block's color:#374151 on
 * .bh-submenu so descendant links inherit the panel foreground, not dark text.
 */
.offcanvas:not(.offcanvas-lg) .bh-nav-item > .bh-submenu {
  position: static;
  top: auto;
  left: auto;
  margin-top: 0;
  min-width: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  z-index: auto;
  transition: max-height 0.22s ease;
  overflow: hidden;
  opacity: 1;
  pointer-events: auto;
  color: inherit;
}

/*
 * Non-expanding offcanvas: make the body an explicit flex column from the
 * top so nav, search, and social always stack without vertical centering.
 * !important guards against Bootstrap's .offcanvas-body { flex-grow:1 } (or
 * any other external rule) growing the body to panel height and then leaving
 * the block-level children free to float to the middle.
 */
.offcanvas:not(.offcanvas-lg) .offcanvas-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  overflow-y: auto;
}

/*
 * Non-expanding offcanvas: the nav element carries the bh-nav-container class
 * which is display:flex on the outer navbar.  Override to block inside the
 * drawer so the flex-row centering (align-items:center) cannot create an
 * unexpected vertical gap between the panel header and the first menu item.
 */
.offcanvas:not(.offcanvas-lg) #bh-offcanvas-nav {
  display: block;
}

/*
 * Non-expanding offcanvas: give top-level links comfortable left padding and a
 * subtle separator so the menu feels structured rather than flush to the panel
 * edge.  The right-pad trims towards the close-button side.
 */
.offcanvas:not(.offcanvas-lg) .bh-nav-link {
  padding-left: 1.25rem;
  padding-right: 1rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 8%, transparent);
}

/*
 * Non-expanding offcanvas: submenu links inherit the panel's colour scheme
 * (overrides global color:#374151 which is correct for white desktop popups but
 * wrong inside a themed drawer).  Extra left indent shows the hierarchy.
 */
.offcanvas:not(.offcanvas-lg) .bh-submenu .bh-submenu-link {
  padding-left: 2rem;
  color: inherit;
  background: transparent;
  border-bottom: 1px solid color-mix(in srgb, currentColor 6%, transparent);
}

.offcanvas:not(.offcanvas-lg) .bh-submenu .bh-submenu-link:hover,
.offcanvas:not(.offcanvas-lg) .bh-submenu .bh-submenu-link:focus {
  background: rgba(128, 128, 128, 0.15);
}

/*
 * Social icon rendering inside the offcanvas drawer.
 * The button circle carries the brand colour; the Bootstrap Icons glyph inside
 * is forced white so it reads against every brand background (including dark
 * brands like X and TikTok that would vanish on a dark-panel button).
 * Falls back to a neutral translucent tint when --bh-social-brand is absent.
 */
.offcanvas .bh-social-link {
  background-color: var(--bh-social-brand, rgba(128, 128, 128, 0.25));
}

.offcanvas .bh-social-link i {
  color: #fff;
  font-size: 1rem;
  line-height: 1;
}

.offcanvas .navbar-item,
.offcanvas .bh-nav-link { cursor: pointer; }

.offcanvas .bh-offcanvas-search-wrapper {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

/*
 * Search inputs inside the offcanvas panel.
 * !important guards against the Tailwind CDN forms plugin, which normalises
 * <input> elements with attribute selectors that share the same specificity as
 * our component selector.  rgba(255,255,255,0.1) gives a clearly visible
 * lighter fill against the dark panel without blowing out to pure white.
 */
.offcanvas .boothack-search-form .bh-tw-input {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #f9fafb !important;
}

.offcanvas .boothack-search-form .bh-tw-input::placeholder {
  color: rgba(249, 250, 251, 0.55);
}

.offcanvas .boothack-search-form .bh-tw-input:focus {
  background-color: rgba(255, 255, 255, 0.15) !important;
  border-color: var(--bh-button-bg-color, #2563eb) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  color: #f9fafb !important;
}

.offcanvas .boothack-search-form .bh-btn-search-submit {
  border-color: var(--bh-button-border-color, var(--bh-button-bg-color, #2563eb));
}

.offcanvas .boothack-search-form .bh-btn-search-submit:focus-visible {
  outline: 2px solid #f9fafb;
  outline-offset: 2px;
}

/*
 * Social icons in the offcanvas panel — same rules as Bulma / Pico /
 * Foundation bridges.
 */
.offcanvas .bh-offcanvas-social-wrapper {
  margin-top: 1.65rem;
}

.offcanvas .bh-offcanvas-social-wrapper .bh-social-links {
  width: 100%;
  justify-content: flex-end;
}

/* =============================================================================
   NAVBAR CHROME
   .bh-tw-nav is the scoping hook set on nav_wrapper in adapter.php.
============================================================================= */

.bh-tw-nav {
  background-color: var(--bh-navbar-bg, #fff);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  /*
   * Default vertical rhythm — mirrors Bootstrap's navbar padding (0.5 rem top/bottom).
   * The nav_height_medium (py-3) and nav_height_large (py-5) Tailwind utility
   * classes override this when the Customizer height setting is non-default,
   * because the Play CDN injects utilities after this stylesheet.
   */
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/*
 * Flex row — keeps brand, toggler, and menu/offcanvas panel on a single line.
 * Without this, margin-left:auto on the toggler has no effect (auto margins
 * only work in flex/grid contexts), so the hamburger button sits immediately
 * after the brand text instead of being pushed to the far edge.  At desktop,
 * flex:1 on the offcanvas-lg panel also requires a flex parent to fill the
 * remaining nav width.
 */
.bh-tw-nav .bh-container {
  display: flex;
  flex-wrap: wrap;   /* lets the collapse menu wrap to a second row at mobile */
  align-items: center;
}

/* Brand link. */
.bh-tw-nav .bh-brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 0.5rem 0;
  color: inherit;
}

.bh-tw-nav .bh-brand-link:hover,
.bh-tw-nav .bh-brand-link:focus { opacity: 0.85; }

.bh-brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
}

/* Toggler button. */
.navbar-toggler {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.375rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  color: inherit;
}

.navbar-dark .navbar-toggler { border-color: rgba(255, 255, 255, 0.25); }

.navbar-toggler-icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%280,0,0,.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.navbar-dark .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%28255,255,255,.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Dark/light scheme modifiers. */
.bh-tw-nav.navbar-dark  { background-color: var(--bh-navbar-bg, #111827); color: #f9fafb; }
.bh-tw-nav.navbar-light { background-color: var(--bh-navbar-bg, #fff);    color: #111827; }

/*
 * Background gradient — layered on top of the solid background-color when the
 * 'boothack_navbar_gradient' theme mod is enabled (adapter maps nav_gradient
 * token to the bg-gradient class).  The generic rule works for any colour via
 * overlay blend mode; the dark/light variants use var(--bh-nav-bg) — the
 * custom-colour variable written by navbar.php — for a scheme-matched tint.
 */
.bh-tw-nav.bg-gradient {
  background-image: linear-gradient(
    180deg,
    color-mix(in srgb, #ffffff 14%, transparent) 0%,
    color-mix(in srgb, #000000 10%, transparent) 100%
  );
  background-blend-mode: overlay;
}

.bh-tw-nav.navbar-dark.bg-gradient {
  background-image: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bh-nav-bg, #111827) 94%, #ffffff 6%) 0%,
    color-mix(in srgb, var(--bh-nav-bg, #111827) 88%, #000000 12%) 100%
  );
  background-blend-mode: normal;
}

.bh-tw-nav.navbar-light.bg-gradient {
  background-image: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bh-nav-bg, #ffffff) 96%, #000000 4%) 0%,
    color-mix(in srgb, var(--bh-nav-bg, #f8fafc) 92%, #000000 8%) 100%
  );
  background-blend-mode: normal;
}

/* Offcanvas brand link in dark panels. */
.offcanvas[data-bs-theme="dark"] .bh-brand-link  { color: #f9fafb; }
.offcanvas[data-bs-theme="light"] .bh-brand-link { color: #111827; }

.offcanvas .bh-brand-link:hover,
.offcanvas .bh-brand-link:focus { opacity: 0.85; }

.offcanvas .bh-brand-link,
.offcanvas .bh-brand-link .bh-brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

/* Nav item list reset. */
.bh-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Nav items — position:relative so the absolute submenu positions against the
 * nearest <li> ancestor rather than the nav bar edge. */
.bh-nav-item {
  list-style: none;
  position: relative;
}

/* Top-level nav links. */
.bh-nav-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.bh-nav-link:hover,
.bh-nav-link:focus { opacity: 0.8; }

.bh-nav-link[aria-current="page"] { font-weight: 600; }

/*
 * Dropdown caret — bh-ui-icon--chevron-up is rotated 180° so it points down
 * by default.  nav-controller.js sets aria-expanded="true" on the toggle link
 * when the submenu opens; the rotation reverses back to pointing up.
 */
.bh-nav-caret {
  transform: rotate(180deg);
  transition: transform 0.2s ease;
  font-size: 0.7em;
}

.bh-nav-link[aria-expanded="true"] .bh-nav-caret {
  transform: rotate(0deg);
}

/* Submenu links (depth > 0 in walker output). */
.bh-submenu-link {
  display: block;
  padding: 0.4rem 1rem;
  text-decoration: none;
  color: #374151;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.bh-submenu-link:hover,
.bh-submenu-link:focus {
  background-color: #f3f4f6;
  color: #111827;
}

/* =============================================================================
   LAYOUT / CONTAINERS
============================================================================= */

/*
 * bh-container — used for all layout_container / content_container / hero /
 * breadcrumbs / footer tokens.  Equivalent to Tailwind `container mx-auto px-4`
 * with a fixed max-width of 80 rem (1280 px).
 */
.bh-container {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.bh-content-spacing-y { margin-block: 3rem; }

.bh-layout-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.bh-layout-main {
  flex: 1 1 0;
  min-width: 0;
}

.bh-layout-main--full { flex: 1 1 100%; }

.bh-layout-sidebar {
  flex: 0 0 min(340px, 100%);
  margin-top: 3rem;
}

@media (max-width: 991px) {
  .bh-site-content > .bh-container > .bh-layout-row:not(#bh-index-grid) {
    display: block;
  }

  .bh-site-content > .bh-container > .bh-layout-row:not(#bh-index-grid) > .bh-layout-main,
  .bh-site-content > .bh-container > .bh-layout-row:not(#bh-index-grid) > .bh-layout-sidebar {
    width: 100%;
    max-width: 100%;
  }

  .bh-site-content > .bh-container > .bh-layout-row:not(#bh-index-grid) > .bh-layout-sidebar {
    margin-top: 2rem;
  }
}

@media (min-width: 992px) {
  .bh-site-content > .bh-container > .bh-layout-row:not(#bh-index-grid) {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    column-gap: 2rem;
    align-items: start;
  }

  /*
   * No sidebar present: collapse the singular row to a single full-width
   * track so the article reclaims the space, instead of leaving an empty
   * 1fr column where the sidebar would have been.
   */
  .bh-site-content > .bh-container > .bh-layout-row:not(#bh-index-grid):not(:has(> .bh-layout-sidebar)) {
    grid-template-columns: minmax(0, 1fr);
  }

  .bh-layout-main,
  .bh-layout-sidebar {
    min-width: 0;
    max-width: none;
    padding: 0;
    margin: 0;
  }
}

.bh-site-content { --bh-post-grid-gutter: 1.5rem; }

.bh-site-content .bh-featured-post-wrapper { margin-bottom: var(--bh-post-grid-gutter); }

/* Singular content widths — 10/12 wide, 8/12 narrow, responsive from 992px. */
.bh-content-width-wide,
.bh-content-width-narrow {
  width: 100%;
  margin-inline: auto;
}

@media (min-width: 992px) {
  .bh-content-width-wide   { width: calc(10 / 12 * 100%); max-width: calc(10 / 12 * 100%); }
  .bh-content-width-narrow { width: calc(8 / 12 * 100%);  max-width: calc(8 / 12 * 100%); }
}

/* Sidebar stack spacing (content_margin_* / layout_margin_* tokens). */
.bh-content-sidebar-mt { margin-top: 3rem; }

@media (min-width: 992px) {
  .bh-content-sidebar-mt-reset { margin-top: 0; }
}

/* =============================================================================
   UTILITY ALIASES
   Bootstrap / bh-* spacing utilities consumed by token values.
============================================================================= */

.d-lg-none  { /* handled by @media below */ }
.is-flex    { display: flex; }
.w-full     { width: 100%; }
.ms-auto    { margin-left: auto; }
.bh-text-center { text-align: center; }
.bh-text-white  { color: #fff; }
.bh-position-relative { position: relative; }
.bh-card-flex-col {
  display: flex;
  flex-direction: column;
}

.bh-card-body-flex-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

/*
 * Equal-height index cards (Customizer arrangement: equal_height).
 * Tokens: card_arrange_equal → bh-card-flex-col on <article> and inner
 * .bh-tw-card; card_equal_body → bh-card-body-flex-col on .bh-tw-card-body.
 *
 * Do not set height:100% on the <article> — the post grid is a flex-wrap
 * row with content-sized height, so percentage heights never resolve and
 * stretch is skipped. Let align-items:stretch size each row, then grow the
 * inner card/body with flex.
 */
article.bh-card-flex-col {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

article.bh-card-flex-col > .bh-tw-card.bh-card-flex-col {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

article.bh-card-flex-col > .bh-tw-card.bh-card-flex-col > a:first-child {
  display: block;
  flex-shrink: 0;
}

article.bh-card-flex-col .bh-tw-card-body.bh-card-body-flex-col {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

article.bh-card-flex-col .bh-card-button-wrap {
  margin-top: auto;
}

.bh-mt-auto { margin-top: auto !important; }

.bh-content-counter {
  text-align: center;
  margin-top: 3rem;
}

.bh-hero-text-center { text-align: center; }

.bh-hero-text-light { color: #fff; }

.bh-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.bh-mt-5    { margin-top: 3rem; }
.bh-mt-4    { margin-top: 1.5rem; }
.bh-mt-3    { margin-top: 1rem; }
.bh-mb-5    { margin-bottom: 3rem; }
.bh-mb-4    { margin-bottom: 1.5rem; }
.bh-mb-3    { margin-bottom: 1rem; }
.bh-pb-4    { padding-bottom: 1.5rem; }
.bh-pt-3    { padding-top: 1rem; }

.shadow-none { box-shadow: none !important; }
.shadow-sm   { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.shadow      { box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); }
.shadow-lg   { box-shadow: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05); }

.py-3 { padding-block: 1.25rem; }
.py-5 { padding-block: 3.25rem; }

/* =============================================================================
   CARD COMPONENTS
   bh-tw-card has no overflow:hidden — avoids clipping nested comment threads,
   tag-cloud widgets, and any content with box-shadows.
============================================================================= */

.bh-tw-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
}

.bh-tw-card-body {
  padding: 1.25rem;
}

/*
 * Card top image — full bleed, 2:1 aspect ratio, top-rounded corners.
 * aspect-ratio + object-fit mirror the canonical content.css rule
 * `.card .wp-post-image { aspect-ratio: 2/1 }` which targets `.card`-
 * scoped images; Tailwind uses `.bh-tw-card` (not `.card`) so that rule
 * does not fire here. Featured card uses `.bh-featured-img` (a different
 * token) and is intentionally untouched.
 */
.bh-tw-card-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 0.5rem 0.5rem 0 0;
}

/* --- Card shadow / border tiers ------------------------------------------- */

.bh-card-border-default { border: 1px solid rgba(0, 0, 0, 0.08); }
.bh-card-border-none    { border: 0; }
.bh-card-shadow         { box-shadow: 0 1px 3px rgba(10,10,10,.1); }
.bh-card-shadow-none    { box-shadow: none; }
.bh-card-shadow-small   { box-shadow: 0 1px 3px rgba(10,10,10,.08); }
.bh-card-shadow-medium  { box-shadow: 0 4px 12px rgba(10,10,10,.1); }
.bh-card-shadow-large   { box-shadow: 0 10px 28px rgba(10,10,10,.14); }
.bh-card-shadow-xlarge  { box-shadow: 0 16px 36px rgba(10,10,10,.18); }

/*
 * Post-grid card title (<h2 class="bh-card-title">).
 * The global body h2 restoration above sets 1.5rem; a card grid heading
 * should be tighter.  Class specificity ([0,1,0]) overrides the body rule.
 */
.bh-card-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

/*
 * Compact card / comment-section heading variant.
 * Maps to the `card_title_h4` token — used for comment section headings
 * and any card layout where a smaller title hierarchy is appropriate.
 */
.bh-card-title-h4 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.bh-card-title-link,
.bh-card-title-link:hover,
.bh-card-title-link:focus,
.bh-featured-link,
.bh-featured-link:hover,
.bh-featured-link:focus {
  text-decoration: none;
  color: #111827;
}

.bh-card-title-link:visited,
.bh-featured-link:visited { color: #111827; }

.bh-card-title-link:focus-visible,
.bh-featured-link:focus-visible {
  outline: 2px solid var(--bh-button-bg-color, #2563eb);
  outline-offset: 2px;
  border-radius: 2px;
}

.bh-card-meta {
  font-size: .875rem;
  color: #6b7280;
  margin-bottom: .25rem;
}

.bh-card-excerpt { margin: 0 0 1rem; }

/*
 * Card button wrap and featured button align — must sit above the
 * .bh-stretched-link::after overlay (z-index:1) so hover states fire
 * and clicks reach the button rather than routing through the overlay
 * to the post permalink. position:relative establishes a stacking
 * context; z-index:3 matches the Bulma / Foundation bridge values.
 */
.bh-card-button-wrap,
.bh-featured-btn-align {
  position: relative;
  z-index: 3;
  align-self: flex-start;
}

/* Stretched link. */
.bh-stretched-link::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
}

/* =============================================================================
   FEATURED POST COMPONENT
============================================================================= */

.bh-featured-card {
  height: 100%;
}

.bh-featured-row {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bh-featured-img-col,
.bh-featured-content-col { flex: 1 1 auto; }

.bh-featured-content-col--full { flex: 1 1 100%; }

/*
 * The featured_img_link token (→ bh-featured-img-link) is defined in
 * adapter.php but the render template's <a> link uses no class.  Add a
 * structural selector so the link is block-level regardless: an inline <a>
 * inside the column creates a gap below the image (inline baseline space)
 * and prevents height:100% on the <img> from referencing a block ancestor.
 */
.bh-featured-img-col > a,
.bh-featured-img-link {
  display: block;
  height: 100%;
}

.bh-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem 0.5rem 0 0;
}

@media (min-width: 992px) {
  .bh-featured-row {
    flex-direction: row;
  }

  .bh-featured-img-col {
    flex: 0 0 58.333%;
    max-width: 58.333%;
  }

  .bh-featured-content-col {
    flex: 0 0 41.667%;
    max-width: 41.667%;
    display: flex;
    flex-direction: column;
  }

  .bh-featured-content-col--full {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .bh-featured-img-col > a > img,
  .bh-featured-post-wrapper .bh-featured-img-col img.wp-post-image {
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem 0 0 0.5rem;
  }
}

.bh-featured-meta {
  font-size: .875rem;
  color: #6b7280;
  margin-bottom: .75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  row-gap: .35rem;
}

.bh-featured-title {
  margin-bottom: .75rem;
  font-size: 1.5rem;
  line-height: 1.3;
}

.bh-featured-text { margin-bottom: 1rem; }

/*
 * Featured-post card body — flex column fill.
 * bh-featured-content-col is display:flex flex-direction:column at desktop;
 * for margin-top:auto on the "Read more" button to push it to the foot of
 * the column, the card body (direct flex child) must itself be a flex column
 * that fills the available height.  Scoped to avoid changing bh-tw-card-body
 * globally (other card usages must not become flex).
 * Mirrors Pico's bh-featured-body { display:flex; flex-direction:column; flex:1 }.
 */
.bh-featured-content-col .bh-tw-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

/*
 * Featured-post "Read more" button — margin-top:auto only.
 * position/z-index/align-self are handled by the shared .bh-card-button-wrap,
 * .bh-featured-btn-align rule above; this rule adds only the push-to-bottom
 * behaviour needed when the card body is a flex column (equal-height layout).
 */
.bh-featured-btn-align {
  margin-top: auto;
}

/*
 * Featured-post badge on Tailwind.
 *
 * The adapter wraps the badge in `.bh-badge.bh-featured-badge` so it inherits
 * the bridge badge primitive — but `.bh-badge` padding / font-size /
 * border-radius load after content.css and would dwarf the series pill
 * (`.bh-series-badge` only) in the meta row. Reset the primitive geometry
 * so the shared pill metrics from content.css drive sizing; keep explicit
 * white text because the template sets background-color inline from the
 * Customizer (matches Bootstrap's `text-white` token addition).
 */
.bh-badge.bh-featured-badge {
  display: inline-block;
  height: auto;
  min-height: 0;
  padding: 0.35em 0.7em;
  font-size: 0.75em;
  line-height: 1.2;
  border-radius: 0.375rem;
  margin-right: 0.5rem;
  color: #fff;
}

/* =============================================================================
   WIDGET SIDEBAR
============================================================================= */

.bh-widget { margin-bottom: 1.5rem; }
.bh-widget:last-child { margin-bottom: 0; }

/*
 * Uniform padding — matches Bulma/Pico (1.25rem on all sides).
 * Previous value (1rem 1.25rem) left less vertical breathing room than
 * the other adapters and caused the title underline to sit too close to
 * the card top edge.
 */
.bh-widget-body { padding: 1.25rem; }

.bh-widget-title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 600;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/*
 * Tailwind Preflight sets img { display: block; max-width: 100% } globally,
 * but `height` is not reset — natural image height can overflow the widget
 * card.  Explicit `height: auto` mirrors the Bulma bridge overflow guard.
 */
.bh-sidebar .widget img {
  height: auto;
  max-width: 100%;
}

/*
 * Widget tables (WP Calendar, custom table widgets) — Preflight does not
 * reset table layout; without explicit width/collapse the calendar table
 * overflows the widget card on narrow sidebars.
 */
.bh-sidebar .widget table {
  width: 100%;
  border-collapse: collapse;
}

.bh-sidebar .widget .wp-calendar-table {
  font-size: 0.875rem;
}

.bh-sidebar .widget .wp-calendar-table th,
.bh-sidebar .widget .wp-calendar-table td {
  padding: 0.35rem;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.bh-sidebar .widget .wp-calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

/*
 * Navigation menu widget — Preflight strips list-style from `ul` globally,
 * but does NOT reset padding-left/margin-left (UA default is ~40 px).
 * Without a reset the nested nav menu indents far to the right and can
 * overflow the widget card.
 */
.bh-sidebar .widget_nav_menu ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.bh-sidebar .widget_nav_menu ul ul {
  margin-top: 0.35rem;
  margin-bottom: 0;
  padding-left: 1rem;
}

/*
 * Nav menu items — aside.css flush list borders apply to all widget `ul li`;
 * reset here so tier-1 menu links do not inherit post-list dividers.
 */
.bh-sidebar .widget_nav_menu ul li {
  border-bottom: none;
  padding: 0.35rem 0;
}

.bh-sidebar .widget_nav_menu ul li:last-child {
  padding-bottom: 0;
}

/*
 * Sidebar widget links — explicit states for Preflight + UA visited purple.
 * aside.css supplies hover colour; bridge locks :visited and keyboard focus.
 */
.bh-sidebar .widget a,
.bh-sidebar .widget a:link {
  color: #374151;
}

.bh-sidebar .widget a:visited {
  color: #374151;
}

.bh-sidebar .widget a:focus-visible {
  outline: 2px solid var(--bh-button-bg-color, #2563eb);
  outline-offset: 2px;
  border-radius: 2px;
}

/*
 * Tag cloud widget — WP renders a flat list of `<a>` links; without flex
 * wrap each tag is inline and line-breaks unpredictably across the widget
 * card width.  Matches Bulma/Pico bridge pattern.
 */
.bh-sidebar .widget .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.bh-sidebar .widget .tagcloud a {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.75rem !important;
  line-height: 1.3;
  background: rgba(17, 24, 39, 0.08);
  color: var(--bh-content-link-color, var(--bh-button-bg-color, #2563eb));
}

.bh-sidebar .widget .tagcloud a:visited {
  color: var(--bh-content-link-color, var(--bh-button-bg-color, #2563eb));
}

.bh-sidebar .widget .tagcloud a:hover,
.bh-sidebar .widget .tagcloud a:focus {
  text-decoration: none;
  background: color-mix(in srgb, var(--bh-content-link-color, var(--bh-button-bg-color, #2563eb)) 14%, transparent);
}

.bh-sidebar .widget .tagcloud a:focus-visible {
  outline: 2px solid var(--bh-button-bg-color, #2563eb);
  outline-offset: 2px;
}

/* =============================================================================
   BACK-TO-TOP BUTTON
============================================================================= */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: none;
}

.back-to-top.is-visible { display: flex; align-items: center; justify-content: center; }

/* =============================================================================
   SEARCH HIGHLIGHT
============================================================================= */

.bh-search-highlight {
  background: #fef08a;
  color: #111827;
  padding: 0;
}

/* =============================================================================
   NO-RESULTS / EMPTY INDEX
============================================================================= */

.bh-no-results {
  text-align: center;
}

.bh-no-results-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.bh-no-results-text {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.bh-no-results .boothack-search-form {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 28rem;
  margin-inline: auto;
  justify-content: center;
}

@media screen and (max-width: 768px) {
  .bh-no-results .boothack-search-form {
    flex-direction: column;
  }

  .bh-no-results .boothack-search-form .bh-tw-input--search,
  .bh-no-results .boothack-search-form > input[type="search"] {
    border-radius: 0.375rem;
    border-right: 1px solid #d1d5db;
  }

  .bh-no-results .boothack-search-form button[type="submit"] {
    width: 100%;
    border-radius: 0.375rem;
  }
}

/* =============================================================================
   SERIES CHIP / CATEGORY CHIPS
   bh-* co-classes ensure content.css :not() exclusions work and link colour/
   decoration is locked on all states.
============================================================================= */

.bh-series-chip { display: inline-block; margin-right: .5rem; vertical-align: middle; }

a.bh-standard-category-chip,
a.bh-standard-category-chip:link,
a.bh-standard-category-chip:visited,
a.bh-category-chip,
a.bh-category-chip:link,
a.bh-category-chip:visited {
  text-decoration: none;
  cursor: pointer;
  color: #fff;
}

a.bh-standard-category-chip:hover,
a.bh-standard-category-chip:focus,
a.bh-standard-category-chip:active,
a.bh-category-chip:hover,
a.bh-category-chip:focus,
a.bh-category-chip:active {
  text-decoration: none;
  opacity: 0.9;
}

a.bh-standard-category-chip:focus-visible,
a.bh-category-chip:focus-visible,
.bh-header__tag-link:focus-visible {
  outline: 2px solid var(--bh-button-bg-color, #2563eb);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* =============================================================================
   STANDARD HEADER (archive / singular title area)
============================================================================= */

.bh-standard-header {
  text-align: left;
}

.bh-standard-header-border {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/*
 * Hero/standard header primary title (<h1 class="bh-header__title">).
 * Preflight resets the bare h1 element; this class rule ([0,1,0]) wins over
 * both Preflight ([0,0,1]) and the body h1 restoration above ([0,0,2]).
 * clamp() provides fluid scaling between 768 px and 1400 px viewports.
 */
.bh-header__title {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: 0;
}

.bh-standard-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.bh-standard-meta {
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.bh-standard-archive-tagline {
  font-size: 1rem;
  color: #6b7280;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/*
 * Standard header post thumbnail.
 * header_standard_thumb token → "bh-standard-thumb rounded-md shadow-sm";
 * rounded-md and shadow-sm are Play CDN utilities.  bh-standard-thumb itself
 * needs display:block and width:100% so the image doesn't sit inline (leaving
 * a 4 px baseline gap below it) and doesn't overflow its container.
 */
.bh-standard-thumb {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bh-header__tags,
.bh-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.bh-standard-meta-row {
  display: flex;
  align-items: center;
  margin-top: 1.5rem;
}

/*
 * The author name/meta stack sits as the last flex child in the meta row.
 * Without min-width:0 the child does not shrink below its max-content width
 * in a flex container, so long author names overflow the row instead of
 * wrapping.  Bulma bridge applies the same guard.
 */
.bh-standard-meta-row > div:last-child { min-width: 0; }

.bh-standard-avatar-link {
  flex-shrink: 0;
  text-decoration: none;
}

.bh-standard-avatar {
  flex-shrink: 0;
  border-radius: 9999px;
  margin-right: 0.75rem;
}

.bh-meta-name-wrap { font-weight: 700; margin-bottom: .2rem; }

.bh-standard-author-link {
  text-decoration: none;
  color: #111827;
}

.bh-standard-author-link:visited {
  color: #111827;
}

.bh-standard-author-link:hover,
.bh-standard-author-link:focus {
  color: inherit;
  text-decoration: underline;
}

.bh-standard-author-link:focus-visible {
  outline: 2px solid var(--bh-button-bg-color, #2563eb);
  outline-offset: 2px;
  border-radius: 2px;
}

.bh-meta-muted-small {
  font-size: 0.8125rem;
  color: #6b7280;
  min-width: 0;
  overflow-wrap: anywhere;
}

.bh-meta-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.bh-meta-social-link {
  color: #6b7280;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.bh-meta-social-link:visited {
  color: #6b7280;
}

.bh-meta-social-link:hover,
.bh-meta-social-link:focus {
  opacity: 1;
  color: #374151;
}

.bh-meta-social-link:focus-visible {
  outline: 2px solid var(--bh-button-bg-color, #2563eb);
  outline-offset: 2px;
  border-radius: 2px;
}

/*
 * Standard header colour — singular + archive.
 * `prose` belongs on `.entry-content` only (`singular_entry_content` token).
 * Guards archive headers and any legacy markup where Typography would paint
 * byline / series anchors with Customizer content-link mods.
 */
.bh-site-content .bh-standard-header .bh-standard-page-title,
.bh-singular-content > header.bh-standard-header .bh-standard-page-title {
  color: inherit;
}

.bh-site-content .bh-standard-header .bh-header__part-title,
.bh-singular-content > header.bh-standard-header .bh-header__part-title {
  color: inherit;
}

.bh-site-content .bh-standard-header .bh-standard-meta,
.bh-singular-content > header.bh-standard-header .bh-standard-meta,
.bh-site-content .bh-standard-header .bh-meta-muted-small,
.bh-singular-content > header.bh-standard-header .bh-meta-muted-small {
  color: inherit;
}

.bh-site-content .bh-standard-header .bh-standard-archive-tagline,
.bh-singular-content > header.bh-standard-header .bh-standard-archive-tagline {
  color: inherit;
}

.bh-site-content .bh-standard-header .bh-standard-archive-tagline a,
.bh-singular-content > header.bh-standard-header .bh-standard-archive-tagline a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.125em;
}

.bh-site-content .bh-standard-header .bh-standard-archive-tagline a:hover,
.bh-site-content .bh-standard-header .bh-standard-archive-tagline a:focus,
.bh-singular-content > header.bh-standard-header .bh-standard-archive-tagline a:hover,
.bh-singular-content > header.bh-standard-header .bh-standard-archive-tagline a:focus {
  color: inherit;
}

.bh-site-content .bh-standard-header :is(.bh-standard-author-link, .bh-header__series-link, .bh-meta-name-wrap a),
.bh-singular-content > header.bh-standard-header :is(.bh-standard-author-link, .bh-header__series-link, .bh-meta-name-wrap a),
.bh-site-content .bh-standard-header :is(.bh-standard-author-link, .bh-header__series-link, .bh-meta-name-wrap a):visited,
.bh-singular-content > header.bh-standard-header :is(.bh-standard-author-link, .bh-header__series-link, .bh-meta-name-wrap a):visited {
  color: inherit !important;
  text-decoration: none;
  text-underline-offset: 0.125em;
}

.bh-site-content .bh-standard-header :is(.bh-standard-author-link, .bh-header__series-link, .bh-meta-name-wrap a):hover,
.bh-site-content .bh-standard-header :is(.bh-standard-author-link, .bh-header__series-link, .bh-meta-name-wrap a):focus,
.bh-singular-content > header.bh-standard-header :is(.bh-standard-author-link, .bh-header__series-link, .bh-meta-name-wrap a):hover,
.bh-singular-content > header.bh-standard-header :is(.bh-standard-author-link, .bh-header__series-link, .bh-meta-name-wrap a):focus {
  color: inherit !important;
  text-decoration: underline;
}

.bh-site-content .bh-standard-header .bh-meta-social-link,
.bh-singular-content > header.bh-standard-header .bh-meta-social-link,
.bh-site-content .bh-standard-header .bh-meta-social-link:visited,
.bh-singular-content > header.bh-standard-header .bh-meta-social-link:visited {
  color: inherit !important;
  opacity: 0.75;
  text-decoration: none;
}

.bh-site-content .bh-standard-header .bh-meta-social-link:hover,
.bh-site-content .bh-standard-header .bh-meta-social-link:focus,
.bh-singular-content > header.bh-standard-header .bh-meta-social-link:hover,
.bh-singular-content > header.bh-standard-header .bh-meta-social-link:focus {
  color: inherit !important;
  opacity: 1;
}

/* =============================================================================
   HERO BYLINE & SOCIAL LINKS
============================================================================= */

.bh-hero-meta-avatar-link {
  display: block;
  text-decoration: none;
}

.bh-hero-byline-content { text-align: left; }

.bh-hero-author-link {
  color: inherit;
  text-decoration: none;
}

/*
 * Scoped under the hero byline so bridge hover/focus rules win over the
 * canonical hero.css `.bh-byline__author a:hover { opacity: .75 }` rule.
 */
.bh-header--hero .bh-byline .bh-hero-author-link:visited {
  color: inherit;
}

.bh-header--hero .bh-byline .bh-hero-author-link:hover,
.bh-header--hero .bh-byline .bh-hero-author-link:focus {
  opacity: 0.88;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bh-header--hero .bh-byline .bh-hero-author-link:focus-visible {
  outline: 2px dashed currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

.bh-hero-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.bh-hero-social-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
}

.bh-hero-social-link:hover,
.bh-hero-social-link:focus { opacity: 1; }

.bh-hero-social-link:focus-visible {
  outline: 2px dashed currentColor;
  outline-offset: 2px;
  border-radius: 2px;
}

.bh-hero-category-wrap { margin-top: 1.25rem; }
.bh-hero-cta-wrap      { margin-top: 1.5rem; }

/*
 * hero_text_dark token: force dark text on hero elements with a light
 * background image. Tailwind has no built-in .text-dark utility class
 * (unlike Bootstrap), so this bridge rule is required.
 */
.bh-text-dark { color: #1f2937; }

/* =============================================================================
   META MODULE (byline)
============================================================================= */

.bh-meta-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.bh-meta-author-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.bh-meta-avatar {
  border-radius: 9999px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

.bh-meta-byline-avatar-wrap { flex-shrink: 0; }

.bh-meta-byline-avatar-link {
  display: block;
  flex-shrink: 0;
  text-decoration: none;
}

.bh-meta-link {
  text-decoration: none;
  color: #111827;
  font-weight: 600;
}

.bh-meta-link:visited {
  color: #111827;
}

.bh-meta-link:hover,
.bh-meta-link:focus {
  text-decoration: underline;
}

.bh-meta-link:focus-visible {
  outline: 2px solid var(--bh-button-bg-color, #2563eb);
  outline-offset: 2px;
  border-radius: 2px;
}

.bh-meta-divider { opacity: 0.5; }

.bh-meta-sep { margin: 0 .5rem; }

.bh-meta-byline-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
}

.bh-meta-inline-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* =============================================================================
   POST NAVIGATION
   Layout, column sizing, chevron icons, and meta/title typography are all
   defined in content.css (loaded for every framework). This section adds only
   what is Tailwind-specific: card chrome overrides, colour locks, hover lift,
   focus ring, and the card-body padding that content.css deliberately omits.
============================================================================= */

/*
 * Colour lock for all link states — Tailwind Preflight resets `a { color:
 * inherit }` for the :link state but cannot override the browser's default
 * :visited colour.  Without explicit :visited the card may render in
 * browser-default visited-link purple/maroon over the white card surface.
 */
a.boothack-post-nav.bh-post-nav-card,
a.boothack-post-nav.bh-post-nav-card:link,
a.boothack-post-nav.bh-post-nav-card:visited,
a.boothack-post-nav.bh-post-nav-card:active {
  display: block;
  text-decoration: none;
  height: 100%;
  color: inherit;
  transition: box-shadow 0.15s ease;
}

a.boothack-post-nav.bh-post-nav-card:hover,
a.boothack-post-nav.bh-post-nav-card:focus {
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/*
 * Focus ring for keyboard navigation.  Scoped to :focus-visible so mouse
 * clicks do not trigger the outline.  Matches the button variable so the
 * ring colour follows the Customizer brand colour.
 */
a.boothack-post-nav.bh-post-nav-card:focus-visible {
  outline: 2px solid var(--bh-button-bg-color, #2563eb);
  outline-offset: 2px;
}

/*
 * Card body padding — content.css provides display:flex / align-items /
 * gap / flex:1 1 auto; bridges supply only the padding since the value
 * differs per framework.
 */
.bh-post-nav-card-body { padding: 1rem 1.25rem; }

.bh-post-nav-meta { color: #6b7280; }

/*
 * Bridge previously redefined .bh-post-nav-row as display:grid which
 * overrode content.css's responsive flex layout and broke mobile stacking
 * (cards remained 50/50 wide instead of stacking to full-width on small
 * screens). Removed — content.css handles the complete responsive layout.
 *
 * Bridge previously redefined .bh-post-nav-chevron at 0.6rem which
 * overrode content.css's canonical 0.5rem. Removed — content.css owns
 * chevron sizing and rotation for all frameworks.
 *
 * Rules removed as exact duplicates of content.css:
 *   .bh-post-nav-col { min-width: 0 }
 *   .bh-post-nav-col--next { text-align: right }
 *   .bh-post-nav-card-body--next { justify-content: flex-end }
 *   .bh-post-nav--text-end { text-align: right }
 *   .bh-post-nav-title { font-weight: 600 }
 */

/* =============================================================================
   PAGINATION
============================================================================= */

.bh-tw-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.bh-pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .625rem;
  font-size: .875rem;
  border: 1px solid #d1d5db;
  border-radius: .375rem;
  text-decoration: none;
  color: var(--bh-content-pagination-color, var(--bs-btn-bg, #2563eb));
  background: #fff;
  transition: background-color .15s, border-color .15s;
}

.bh-pagination-btn:visited {
  color: var(--bh-content-pagination-color, var(--bs-btn-bg, #2563eb));
}

.bh-pagination-btn:hover,
.bh-pagination-btn:focus {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: var(--bh-content-pagination-hover-color, var(--bs-btn-hover-bg, #1d4ed8));
  text-decoration: none;
}

a.bh-pagination-btn:focus-visible,
button.bh-pagination-btn:focus-visible {
  outline: 2px solid var(--bh-button-bg-color, #2563eb);
  outline-offset: 2px;
}

.is-current .bh-pagination-btn,
.bh-pagination-item.is-current .bh-pagination-btn {
  background-color: var(--bh-content-pagination-color, var(--bs-btn-bg, #2563eb));
  border-color: var(--bh-content-pagination-color, var(--bs-btn-bg, #2563eb));
  color: #fff;
}

.is-current .bh-pagination-btn:visited,
.bh-pagination-item.is-current .bh-pagination-btn:visited {
  color: #fff;
}

/* =============================================================================
   COMMENT MODULE
============================================================================= */

/*
 * Comments section spacing.
 * comments_wrapper token → "bh-comments-wrapper bh-comments-after-content".
 * Without this rule the comments section renders flush against the bottom of
 * the article with no breathing room.  Matches Bulma / Pico bridge value.
 */
.bh-comments-after-content {
  margin-top: 3rem;
}

/*
 * h5-equivalent display utility for non-heading elements that need h5 sizing
 * (e.g. the "Leave a reply" <span> in comments/render/form.php).
 * Preflight has no effect on <span>, so this class rule is the only source.
 */
.bh-h5 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.bh-comments-section { margin-bottom: 3rem; }

/*
 * Comments section heading + Reply button: flex row with button pushed right.
 * The h2 inside (card_title_h4 → .bh-card-title-h4) has margin-bottom from the
 * card-title rule; zero it out here so the flex alignment is clean.
 */
.bh-comments-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bh-comments-header h2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

/*
 * Comment list reset. Thread indent and connector lines live in
 * content.css (.boothack-comments .children) for all frameworks.
 */
.bh-comment-list { list-style: none; padding-left: 0; }

.bh-comment-list .children,
.comment-list .children {
  list-style: none;
}

.bh-comment-card { margin-bottom: 1.5rem; }

.bh-comment-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: .75rem;
}

.bh-comment-avatar { flex-shrink: 0; }

.bh-comment-avatar img,
.bh-comment-avatar-img,
img.bh-comment-avatar-img {
  display: block;
  border-radius: 9999px;
}

/*
 * Author body fills remaining space in the flex row and constrains long
 * author names / meta lines so they wrap rather than push the avatar off-screen.
 */
.bh-comment-author-body {
  flex: 1 1 auto;
  min-width: 0;
}

.bh-comment-author-name { font-weight: 700; }
.bh-comment-author-meta { font-size: .875rem; color: #6b7280; }

.bh-comment-author-name a,
.bh-comment-author-name a:visited,
.bh-comment-author-meta a,
.bh-comment-author-meta a:visited {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}

.bh-comment-author-meta a:hover,
.bh-comment-author-meta a:focus {
  text-decoration: underline;
}

.bh-comment-author-name a:focus-visible,
.bh-comment-author-meta a:focus-visible {
  outline: 2px solid var(--bh-button-bg-color, #2563eb);
  outline-offset: 2px;
  border-radius: 2px;
}

/*
 * Actions row — wrap on narrow comment cards; centre-align button baselines.
 * Edit/reply tokens map bh-btn* onto <span> wrappers (bh-comment-*-wrap co-
 * classes) around WP's comment-edit-link / comment-reply-link anchors.
 */
.bh-comment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
}

.bh-comment-actions .bh-comment-edit-wrap,
.bh-comment-actions .bh-comment-reply-wrap,
.bh-comment-actions > .bh-btn {
  display: inline-flex;
  align-items: center;
}

/*
 * Inner links inherit button foreground; inline-flex + gap align icons.
 */
.bh-comment-actions .bh-btn a,
.bh-comment-actions .bh-btn a:visited,
.bh-comment-actions .bh-btn a:hover,
.bh-comment-actions .bh-btn a:focus {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  text-decoration: none;
}

/*
 * Comment form chrome — WP emits `<h3 class="comment-reply-title">` for the
 * "Leave a Reply" heading and `<p class="form-submit">` wrapping the submit
 * button. Neither has any spacing in the Tailwind context without explicit rules.
 */
.boothack-comments .comment-reply-title {
  margin: 0 0 1rem;
  font-weight: 600;
  line-height: 1.25;
}

.boothack-comments .comment-notes,
.boothack-comments .comment-form .logged-in-as {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.boothack-comments .form-submit {
  margin-top: 1rem;
  margin-bottom: 0;
}

.boothack-comments #cancel-comment-reply-link {
  font-weight: 400;
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

/*
 * Cookie consent — WP emits `<p class="comment-form-cookies-consent">` with
 * a checkbox + label. Flex keeps the checkbox aligned to the label cap-height
 * on all viewports.
 */
.boothack-comments .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.boothack-comments .comment-form-cookies-consent input[type="checkbox"] {
  flex: 0 0 auto;
  margin-block-start: 0.2em;
}

/* Required asterisk — content-scoped button colour chain (BR-042). */
.boothack-comments .comment-form .required {
  color: var(--bh-content-btn-bg, var(--bs-btn-bg, #2563eb));
}

/*
 * Prose link locks — Tailwind Typography plugin paints `.prose a` with default
 * blue utilities injected after this bridge. Lock to Customizer content-link mods.
 * Scoped to `.entry-content` only so the standard header is never inside prose.
 */
.bh-site-content .entry-content .bh-prose-link,
.bh-site-content .entry-content .bh-prose-link:visited,
.entry-content.prose .bh-prose-link,
.entry-content.prose .bh-prose-link:visited {
  color: var(--bh-content-link-color, var(--bh-button-bg-color, #2563eb)) !important;
  text-decoration-color: color-mix(
    in srgb,
    var(--bh-content-link-color, var(--bh-button-bg-color, #2563eb)) 35%,
    transparent
  ) !important;
}

.bh-site-content .entry-content .bh-prose-link:hover,
.bh-site-content .entry-content .bh-prose-link:focus,
.bh-site-content .entry-content .bh-prose-link:focus-visible,
.entry-content.prose .bh-prose-link:hover,
.entry-content.prose .bh-prose-link:focus,
.entry-content.prose .bh-prose-link:focus-visible {
  color: var(
    --bh-content-link-hover-color,
    var(--bs-primary-dark, var(--bh-button-bg-hover, var(--bh-button-bg-color, #1d4ed8)))
  ) !important;
  text-decoration-color: var(
    --bh-content-link-hover-color,
    var(--bs-primary-dark, var(--bh-button-bg-hover, var(--bh-button-bg-color, #1d4ed8)))
  ) !important;
}

/* =============================================================================
   FOOTNOTES PLUGIN (Supertext / markcheret) — UIkit 4.0.60 / Foundation 4.0.71 parity
   Referrer markers use `<a role="button">`; prose rules exclude `[role="button"]`
   so Tailwind Preflight / Typography link styling would stick without this block.
============================================================================= */

.bh-site-content .footnote_referrer [role="button"],
.bh-singular-content .footnote_referrer [role="button"] {
  display: inline;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  color: var(--bh-content-link-color, var(--bh-button-bg-color, #2563eb)) !important;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: inherit;
  text-decoration: none !important;
  vertical-align: baseline;
  user-select: text;
  -webkit-user-select: text;
  cursor: pointer;
}

.bh-site-content .footnote_referrer [role="button"]:hover,
.bh-site-content .footnote_referrer [role="button"]:focus,
.bh-site-content .footnote_referrer [role="button"]:active,
.bh-singular-content .footnote_referrer [role="button"]:hover,
.bh-singular-content .footnote_referrer [role="button"]:focus,
.bh-singular-content .footnote_referrer [role="button"]:active {
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(
    --bh-content-link-hover-color,
    var(--bs-primary-dark, var(--bh-button-bg-hover, var(--bh-button-bg-color, #1d4ed8)))
  ) !important;
  text-decoration: none !important;
}

.bh-site-content .footnote_referrer [role="button"]:focus-visible,
.bh-singular-content .footnote_referrer [role="button"]:focus-visible {
  outline: 2px dashed var(--bh-content-link-color, var(--bh-button-bg-color, #2563eb));
  outline-offset: 2px;
  box-shadow: none;
}

.bh-site-content .footnotes_reference_container span[role="button"],
.bh-singular-content .footnotes_reference_container span[role="button"] {
  display: inline;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  color: var(--bs-body-color, #1a1a1a);
  font: inherit;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: inherit;
  text-decoration: none;
  vertical-align: baseline;
  user-select: text;
  -webkit-user-select: text;
  cursor: pointer;
}

.bh-site-content .footnotes_reference_container span[role="button"]:hover,
.bh-site-content .footnotes_reference_container span[role="button"]:focus,
.bh-site-content .footnotes_reference_container span[role="button"]:active,
.bh-singular-content .footnotes_reference_container span[role="button"]:hover,
.bh-singular-content .footnotes_reference_container span[role="button"]:focus,
.bh-singular-content .footnotes_reference_container span[role="button"]:active {
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--bh-content-link-color, var(--bh-button-bg-color, #2563eb)) !important;
  text-decoration: none;
}

.bh-site-content .footnotes_reference_container span[role="button"]:focus-visible,
.bh-singular-content .footnotes_reference_container span[role="button"]:focus-visible {
  outline: 2px dashed var(--bh-content-link-color, var(--bh-button-bg-color, #2563eb));
  outline-offset: 2px;
  box-shadow: none;
}

.bh-site-content .footnotes_reference_container .footnote_reference_container_collapse_button a,
.bh-singular-content .footnotes_reference_container .footnote_reference_container_collapse_button a,
.bh-site-content .footnotes_reference_container a.footnote_backlink,
.bh-site-content .footnotes_reference_container a.footnote_hard_back_link,
.bh-singular-content .footnotes_reference_container a.footnote_backlink,
.bh-singular-content .footnotes_reference_container a.footnote_hard_back_link {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  font: inherit;
  font-weight: inherit;
  color: var(--bh-content-link-color, var(--bh-button-bg-color, #2563eb)) !important;
  text-decoration: none !important;
}

.bh-site-content .footnotes_reference_container .footnote_reference_container_collapse_button a:hover,
.bh-site-content .footnotes_reference_container .footnote_reference_container_collapse_button a:focus,
.bh-singular-content .footnotes_reference_container .footnote_reference_container_collapse_button a:hover,
.bh-singular-content .footnotes_reference_container .footnote_reference_container_collapse_button a:focus,
.bh-site-content .footnotes_reference_container a.footnote_backlink:hover,
.bh-site-content .footnotes_reference_container a.footnote_backlink:focus,
.bh-site-content .footnotes_reference_container a.footnote_hard_back_link:hover,
.bh-site-content .footnotes_reference_container a.footnote_hard_back_link:focus,
.bh-singular-content .footnotes_reference_container a.footnote_backlink:hover,
.bh-singular-content .footnotes_reference_container a.footnote_backlink:focus,
.bh-singular-content .footnotes_reference_container a.footnote_hard_back_link:hover,
.bh-singular-content .footnotes_reference_container a.footnote_hard_back_link:focus {
  text-decoration: none !important;
  color: var(
    --bh-content-link-hover-color,
    var(--bs-primary-dark, var(--bh-button-bg-hover, var(--bh-button-bg-color, #1d4ed8)))
  ) !important;
}

.bh-site-content .footnotes_reference_container,
.bh-singular-content .footnotes_reference_container,
.bh-site-content .footnotes_reference_container.speaker-mute,
.bh-singular-content .footnotes_reference_container.speaker-mute {
  color: var(--bs-body-color, #1a1a1a);
  background-color: transparent;
}

.bh-site-content .footnotes_reference_container .footnote_container_prepare,
.bh-site-content .footnotes_reference_container .footnote_container_prepare p,
.bh-singular-content .footnotes_reference_container .footnote_container_prepare,
.bh-singular-content .footnotes_reference_container .footnote_container_prepare p,
.bh-site-content .footnotes_reference_container .footnote_plugin_text,
.bh-singular-content .footnotes_reference_container .footnote_plugin_text {
  color: inherit;
}

.bh-site-content .footnotes_reference_container .footnote_container_prepare > p > span.footnote_reference_container_label,
.bh-site-content .footnotes_reference_container .footnote_container_prepare > p > span.footnote_reference_container_collapse_button,
.bh-singular-content .footnotes_reference_container .footnote_container_prepare > p > span.footnote_reference_container_label,
.bh-singular-content .footnotes_reference_container .footnote_container_prepare > p > span.footnote_reference_container_collapse_button,
.bh-site-content .footnotes_reference_container .footnote_reference_container_label,
.bh-singular-content .footnotes_reference_container .footnote_reference_container_label {
  color: var(--bs-body-color, #1a1a1a);
}

.bh-site-content .footnotes_reference_container caption,
.bh-site-content .footnotes_reference_container caption.accessibility,
.bh-singular-content .footnotes_reference_container caption,
.bh-singular-content .footnotes_reference_container caption.accessibility {
  color: var(--bs-body-color, #1a1a1a);
}

.bh-site-content .footnotes_reference_container table.footnotes_table,
.bh-site-content .footnotes_reference_container table.footnote-reference-container,
.bh-singular-content .footnotes_reference_container table.footnotes_table,
.bh-singular-content .footnotes_reference_container table.footnote-reference-container {
  width: 100%;
  border-collapse: collapse;
  background-color: transparent;
}

.bh-site-content .footnotes_reference_container table.footnotes_table td,
.bh-site-content .footnotes_reference_container table.footnotes_table th,
.bh-site-content .footnotes_reference_container table.footnote-reference-container td,
.bh-site-content .footnotes_reference_container table.footnote-reference-container th,
.bh-singular-content .footnotes_reference_container table.footnotes_table td,
.bh-singular-content .footnotes_reference_container table.footnotes_table th,
.bh-singular-content .footnotes_reference_container table.footnote-reference-container td,
.bh-singular-content .footnotes_reference_container table.footnote-reference-container th {
  background-color: transparent;
  color: var(--bs-body-color, #1a1a1a);
  border-color: rgba(0, 0, 0, 0.08);
}

.bh-site-content .entry-content :is(em, cite, i),
.bh-site-content .footnotes_reference_container :is(em, cite, i),
.bh-singular-content .entry-content :is(em, cite, i),
.bh-singular-content .footnotes_reference_container :is(em, cite, i) {
  color: inherit;
  font-style: italic;
}

/* =============================================================================
   FOOTER CHROME (dark surface — identical to Bulma / Foundation)
============================================================================= */

.bh-footer-container {
  padding: 2.25rem 1rem 0;
}

.bh-footer {
  padding-top: 1rem;
  padding-bottom: 1.25rem;
}

.bh-footer-widgets {
  display: grid;
  gap: 1.75rem;
  align-items: start;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .bh-footer-widgets {
    grid-template-columns: repeat(var(--bh-footer-cols, 3), minmax(0, 1fr));
  }
}

.bh-footer-widget-col { min-width: 0; }

.bh-footer-divider {
  margin: 1.5rem 0 0.85rem;
  opacity: 0.48;
  /*
   * Tailwind Preflight gives <hr> border-top-width:1px, not border-bottom.
   * border-top-color colours the correct side; border-bottom-color would
   * target a non-existent border side and render nothing.
   */
  border-top-color: rgba(248, 250, 252, 0.35);
}

.bh-footer-bottom-section { padding: 0.5rem 0 1rem; }

.bh-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: 0.5rem;
}

.bh-footer-copy,
.bh-footer-social { width: auto; }

.bh-footer-copy {
  flex: 1 1 auto;
  text-align: left;
}

.bh-footer-social {
  flex: 0 0 auto;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

@media (max-width: 991px) {
  .bh-footer-bottom {
    flex-wrap: wrap;
    padding-inline: 0;
  }

  .bh-footer-copy,
  .bh-footer-social {
    flex: 1 1 100%;
    text-align: center;
  }

  .bh-footer .bh-social-links { justify-content: center; }
}

/*
 * footer_tone token → "bh-footer-tone".  Applied alongside bh-footer on the
 * <footer> element; sets light text for the dark surface so copyright text,
 * widget headings, and widget body copy are readable over the Customizer
 * background colour.  Without this the body foreground (#1a1a1a) is
 * inherited, producing dark-on-dark text.
 * Matches Foundation / Pico bridge: color: #f8fafc.
 */
.bh-footer-tone { color: #f8fafc; }

.bh-footer-copy-inner {
  padding: 0.6rem 0;
  line-height: 1.6;
}

/*
 * Lock copyright link to the surrounding footer text colour for all link
 * states. Including :link and :visited in the selector group raises
 * specificity to 0,2,0 — enough to beat Tailwind Preflight's a:link and
 * UA :visited rules.
 */
.bh-footer-link,
.bh-footer-link:link,
.bh-footer-link:visited { color: #f8fafc; /* Underlined: WCAG 1.4.1 non-colour cue — same colour as surrounding copy (axe link-in-text-block; dark scheme, 4.4.022). */ text-decoration: underline; }
.bh-footer-link:hover,
.bh-footer-link:focus { color: #fff; text-decoration: underline; }

.bh-footer-link:focus-visible {
  outline: 2px solid rgba(248, 250, 252, 0.85);
  outline-offset: 2px;
  border-radius: 2px;
}

/* =============================================================================
   FOOTER WIDGET AREA (dark surface)
   Dark-surface colour cascade for footer widgets.  Third-party widget CSS can
   break the color:inherit chain; explicit rules on every likely element ensure
   light text (#f8fafc) over the dark Customizer background.
============================================================================= */

/*
 * Zero out bh-widget margin-bottom inside the footer: the grid gap on
 * .bh-footer-widgets already provides column spacing; keeping both values
 * would double-space the widget columns.
 */
.bh-footer .bh-widget,
.bh-footer .widget { margin-bottom: 0; }

/*
 * Widget title — inherit existing bh-widget-title geometry (from the sidebar
 * section above) but override the border-bottom colour to a light tone that
 * reads against the dark footer surface.
 */
.bh-footer .bh-widget-title,
.bh-footer .widget-title {
  color: #f8fafc;
  border-bottom-color: rgba(248, 250, 252, 0.2);
}

/* Cascade light text to the most common inline elements in widget bodies. */
.bh-footer p,
.bh-footer li,
.bh-footer .widget p,
.bh-footer .widget li { color: #f8fafc; }

/* Widget links — explicit colour; :visited lock prevents browser-UA purple. */
.bh-footer .widget a,
.bh-footer .widget a:link { color: #f8fafc; text-decoration: none; }
.bh-footer .widget a:visited { color: rgba(248, 250, 252, 0.85); text-decoration: none; }
.bh-footer .widget a:hover,
.bh-footer .widget a:focus { color: #f8fafc; text-decoration: underline; }

/* Prevent Preflight's `img { max-width:100% }` missing `height:auto` from
   distorting widget images (Preflight omits height:auto). */
.bh-footer .widget img { height: auto; max-width: 100%; }

/*
 * List resets — Tailwind Preflight strips list-style but leaves padding-left
 * intact on <ul>/<ol>; explicitly zero both for clean widget list layout.
 * Sibling-selector spacing replaces margin-bottom on individual <li> elements.
 */
.bh-footer .widget ul,
.bh-footer .widget ol { list-style: none; padding-left: 0; margin-left: 0; }
.bh-footer .widget ul li + li,
.bh-footer .widget ol li + li { margin-top: 0.45rem; }

/*
 * Nav menu widget — reset inherited sidebar indent rules (.bh-sidebar scoping
 * means they do not cascade here); keep sub-menu indentation for hierarchy.
 */
.bh-footer .widget_nav_menu ul { list-style: none; padding-left: 0; margin-left: 0; }
.bh-footer .widget_nav_menu ul ul { margin-top: 0.35rem; padding-left: 1rem; }

/*
 * Dark-surface form controls — Tailwind Forms plugin normalises inputs to
 * transparent backgrounds; on the dark footer explicit dark fills and light
 * borders/text are required for legibility.
 */
.bh-footer .widget input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.bh-footer .widget textarea,
.bh-footer .widget select {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(248, 250, 252, 0.28);
  color: #f8fafc;
}

.bh-footer .widget input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):focus,
.bh-footer .widget textarea:focus,
.bh-footer .widget select:focus {
  border-color: rgba(248, 250, 252, 0.6);
  outline: none;
}

/*
 * Tag cloud — flex wrap on the container; link chips match sidebar bridge.
 */
.bh-footer .widget .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.bh-footer .widget .tagcloud a,
.bh-footer .widget .tagcloud a:link,
.bh-footer .widget .tagcloud a:visited {
  color: #f8fafc;
  border-color: rgba(248, 250, 252, 0.35);
}

.bh-footer .widget .tagcloud a:hover,
.bh-footer .widget .tagcloud a:focus {
  background-color: rgba(248, 250, 252, 0.1);
  color: #f8fafc;
}

/*
 * Search widget + Gutenberg Search block on the dark footer surface.
 */
.bh-footer .boothack-search-form,
.bh-footer .bh-search-form {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.bh-footer .boothack-search-form > .bh-tw-input,
.bh-footer .boothack-search-form > input[type="search"],
.bh-footer .boothack-search-form > input[type="text"],
.bh-footer .widget .wp-block-search__input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(248, 250, 252, 0.28);
  color: #f8fafc;
}

.bh-footer .boothack-search-form > .bh-btn-search-submit,
.bh-footer .boothack-search-form > button[type="submit"],
.bh-footer .widget .wp-block-search__button {
  flex: 0 0 auto;
  width: auto;
}

.bh-footer .widget .wp-block-search .wp-block-search__inside-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.bh-footer .widget .wp-block-search__input {
  border-radius: 0.375rem 0 0 0.375rem;
  border-right: 0;
}

.bh-footer .widget .wp-block-search__button {
  padding: 0.5rem 1.125rem;
  border-radius: 0 0.375rem 0.375rem 0;
}

.bh-footer .widget button[type="submit"],
.bh-footer .widget input[type="submit"] {
  color: #1f2937;
  background-color: #f8fafc;
  border-color: rgba(248, 250, 252, 0.35);
}

/*
 * Calendar, tables, and Contact Form 7 — parity with Bulma footer widget rules.
 */
.bh-footer .widget table {
  width: 100%;
  border-collapse: collapse;
  color: #f8fafc;
}

.bh-footer .widget table th,
.bh-footer .widget table td {
  border: 1px solid rgba(248, 250, 252, 0.22);
  padding: 0.35rem;
}

.bh-footer .widget .wp-calendar-table {
  font-size: 0.875rem;
}

.bh-footer .widget .wp-calendar-table th,
.bh-footer .widget .wp-calendar-table td {
  padding: 0.35rem;
  text-align: center;
  border: 1px solid rgba(248, 250, 252, 0.22);
  color: #f8fafc;
}

.bh-footer .widget .wp-calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.bh-footer .widget .wpcf7-form {
  max-width: 100%;
}

.bh-footer .widget .wpcf7-form-control-wrap {
  display: block;
  margin-bottom: 0.75rem;
}

.bh-footer .widget .wpcf7-form-control:not(.wpcf7-submit) {
  max-width: 100%;
  box-sizing: border-box;
}

.bh-footer .widget .wpcf7-response-output {
  margin: 0.75rem 0 0;
  padding: 0.5rem 0.65rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  border: 1px solid rgba(248, 250, 252, 0.25);
  background: rgba(248, 250, 252, 0.08);
  color: #f8fafc;
}

.bh-footer .widget input.wpcf7-submit {
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  border: 1px solid rgba(248, 250, 252, 0.35);
  background-color: #f8fafc;
  color: #1f2937;
}

.bh-footer .widget input.wpcf7-submit:hover,
.bh-footer .widget input.wpcf7-submit:focus {
  filter: brightness(0.97);
}

/*
 * .bh-social-links emitted by boothack_social_render() — right-align in
 * footer at desktop; mobile centering handled in the @media block above.
 */
.bh-footer .bh-social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .5rem;
}

.bh-footer .bh-social-link,
.bh-footer .bh-social-link:visited,
.bh-footer .bh-social-link:hover,
.bh-footer .bh-social-link:focus { color: #f8fafc; }

/*
 * Footer dark surface: neutralise the per-link brand colour so dark brand
 * hexes (x/medium/tiktok #000, github #333) stay legible at rest and on hover.
 * `--bh-social-brand` is set inline on each <a>, so only an !important custom
 * property declaration can override it.  This also recolours the .bi <i> glyph,
 * which reads `color: var(--bh-social-brand)` below.
 */
.bh-site-footer .bh-social-link {
  --bh-social-brand: #f8fafc !important;
}

.bh-footer .bh-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  text-decoration: none;
  /*
   * Subtle border on the dark surface gives the circular button a defined edge
   * without a filled background — matches Bulma / Pico bridge treatment.
   */
  border: 1px solid rgba(248, 250, 252, 0.32);
  box-sizing: border-box;
  transition: opacity .2s ease;
}

.bh-footer .bh-social-link:hover { opacity: .95; }

/*
 * Focus-visible scoped to the footer: generic .bh-social-link:focus-visible
 * (in the non-footer section below) uses `outline: 2px dashed currentColor`
 * which renders adequately on light surfaces but needs no override here —
 * currentColor resolves to #f8fafc in the footer context, giving a visible
 * dashed ring against the dark background.
 */
.bh-footer .bh-social-link:focus-visible {
  outline: 2px dashed currentColor;
  outline-offset: 2px;
}

/* =============================================================================
   SOCIAL LINKS MODULE (non-footer)
============================================================================= */

.bh-social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.bh-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  line-height: 1;
  transition: opacity .2s ease, transform .2s ease;
}

.bh-social-link:hover { opacity: .85; transform: translateY(-1px); }
.bh-social-link:focus-visible { outline: 2px dashed currentColor; outline-offset: 2px; }

/*
 * Bootstrap Icons font glyphs inside social buttons: use the per-link brand
 * colour set via `style="--bh-social-brand: ..."` on the <a> element.
 * Falls back to currentColor so the icon inherits the surrounding text colour
 * in any context where --bh-social-brand is unset.
 */
.bh-social-link i { color: var(--bh-social-brand, currentColor); font-size: 1rem; line-height: 1; }

/* =============================================================================
   NAV INNER CONTAINER
   Global flex row — brand on the left, menu/toggler fills remaining space.
   Applies at all viewport widths; mobile and desktop @media rules below only
   toggle visibility of individual children (toggler, menu, offcanvas panel).
============================================================================= */

.bh-nav-container {
  display: flex;
  align-items: center;
  width: 100%;
}

/* =============================================================================
   RESPONSIVE NAVBAR RULES
============================================================================= */

@media (max-width: 991px) {
  .navbar-toggler,
  .navbar-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  /* Collapse menu: hidden by default, shown when JS adds .is-active. */
  .navbar-menu { display: none; }
  .navbar-menu.is-active {
    display: block;
    /*
     * flex-basis:100% forces this item onto its own row in the wrapping
     * .bh-container flex layout — brand + toggler stay on row 1, the
     * open menu drops to row 2.  width:100% is NOT used here because a
     * flex item with width:100% competes with its siblings for the same
     * row and crushes them.
     *
     * Background is transparent: the parent .bh-tw-nav background (inline
     * style or CSS) shows through, so the panel always matches the navbar
     * colour without needing to replicate the CSS-variable chain here.
     * Text colour inherits from the .navbar-dark / .navbar-light rule on
     * the outer <nav>, so links are automatically readable on either scheme.
     */
    flex-basis: 100%;
    order: 99;
    background: transparent;
    border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent);
    padding-bottom: 0.5rem;
  }

  /*
   * Mobile collapse submenu links — inherit colour from the parent nav item
   * so they render identically to non-dropdown menu items on both dark and
   * light schemes.  This overrides the global .bh-submenu-link { color:#374151 }
   * rule which is correct for the white desktop popup but wrong inside a
   * dark navbar's collapse panel.
   */
  .navbar-menu .bh-submenu-link {
    color: inherit;
    background: transparent;
  }
  .navbar-menu .bh-submenu-link:hover,
  .navbar-menu .bh-submenu-link:focus {
    background: rgba(128, 128, 128, 0.15);
  }

  /* Stack collapse-mode nav items vertically at mobile. */
  .navbar-menu #bh-offcanvas-nav .navbar-end {
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
  }

  .navbar-menu .bh-nav-link,
  .navbar-menu .bh-submenu-link {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .d-lg-none { display: block; }
}

@media (min-width: 992px) {
  .navbar-toggler { display: none; }

  .bh-offcanvas-toggle-desktop { display: inline-flex; }

  .navbar-menu {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
  }

  .d-lg-none { display: none !important; }

  /*
   * Desktop offcanvas-lg: menu and search/social inline in the navbar bar;
   * offcanvas panel only slides in on mobile.
   */
  .offcanvas.offcanvas-lg {
    position: static;
    width: auto;
    height: auto;
    transform: none;
    background: transparent;
    border: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 1;
    pointer-events: auto;
    overflow: visible;
    transition: none;
  }

  .offcanvas.offcanvas-lg .offcanvas-header { display: none; }
  .offcanvas.offcanvas-lg .offcanvas-body   {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    justify-content: flex-end; /* push #bh-offcanvas-nav to the right edge */
    padding: 0;
    overflow: visible;
  }

  .offcanvas.offcanvas-lg .bh-offcanvas-search,
  .offcanvas.offcanvas-lg .bh-offcanvas-social-wrapper { display: none !important; }

  /*
   * Nav inner element — covers both offcanvas-lg (panel unrolled inline) and
   * collapse mode (.navbar-menu visible).
   *
   * width:auto overrides the global .bh-nav-container width:100% and the
   * Tailwind w-full class on the element.  Making the nav naturally-sized
   * (content width) lets the parent justify-content:flex-end on .navbar-menu
   * / .offcanvas-body push it to the right edge.  flex-grow:0 (default) keeps
   * it at its intrinsic width; flex-shrink:1 (default) allows it to compress
   * on very narrow viewports.
   */
  .offcanvas.offcanvas-lg #bh-offcanvas-nav,
  .navbar-menu #bh-offcanvas-nav {
    display: flex;
    align-items: center;
    width: auto;
    min-width: 0;
  }

  /*
   * Desktop menu list — reset list chrome; flex row is inherited from the
   * parent bh-nav-container / #bh-offcanvas-nav flex context above.
   */
  .offcanvas.offcanvas-lg .navbar-end,
  .navbar-menu .navbar-end {
    display: flex;
    flex-direction: row;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  /* Submenus at desktop — white popup card. */
  .bh-submenu {
    position: absolute;
    min-width: 12rem;
    background: #fff;
    /*
     * Explicit colour reset: the parent .bh-tw-nav.navbar-dark sets
     * color:#f9fafb which would cascade into this white popup and make
     * the text invisible.  Set it to a dark neutral here so every child
     * (links, carets, any future text nodes) starts from dark-on-white.
     */
    color: #374151;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: .5rem;
    box-shadow: 0 10px 24px rgba(0,0,0,.1);
    padding: .5rem 0;
    list-style: none;
    margin: 0;
    z-index: 1000;
  }

  /*
   * Desktop flyout positioning and show/hide.
   *
   * top:100%/left:0 drops the panel directly below the triggering nav item.
   * visibility:hidden suppresses interaction without removing the element from
   * layout — required because nav-controller.js in flyout mode clears all
   * inline visibility/maxHeight styles and relies exclusively on the
   * bh-submenu-open class (added to the parent .bh-nav-item <li> by the
   * controller) for show/hide signalling.
   *
   * bh-submenu--flip-inline / bh-submenu--flip-block are added by
   * syncViewportFlipForMenu() when the panel would overflow the viewport;
   * they shift placement to the opposite edge.
   */
  .bh-nav-item > .bh-submenu {
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, visibility 0.15s ease;
  }

  .bh-nav-item.bh-submenu-open > .bh-submenu {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
  }

  .bh-nav-item > .bh-submenu.bh-submenu--flip-inline {
    left: auto;
    right: 0;
  }

  .bh-nav-item > .bh-submenu.bh-submenu--flip-block {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 0.25rem;
  }
}

/* Fixed-top/bottom nav body padding. */
.navbar.fixed-top,
.bh-tw-nav.fixed-top    { position: fixed; top: 0; left: 0; right: 0; z-index: 1030; }
.navbar.fixed-bottom,
.bh-tw-nav.fixed-bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; }

/*
 * Post grid — flexbox with item-level width classes.
 *
 * column tokens (bh-grid-col-two / bh-grid-col-three) are applied to each
 * <article> by card.php, matching the Bootstrap / Bulma pattern where each
 * item carries its own column-width class.
 *
 * Items use `width` (not `flex-basis`) because Masonry.js sets
 * `position: absolute` on items during layout. Once absolute, flex-basis
 * is ignored; `width` persists and Masonry.js reads the correct
 * `offsetWidth` value on every re-layout (imagesLoaded, resize, etc.).
 *
 * Non-masonry rows / equal-height use `.bh-grid-gap` on the container.
 * Plain `width: 50%` plus flex `gap` overflows (50% + 50% + gap > 100%),
 * forcing every item onto its own row — the single-column bug after leaving
 * masonry. Gap-aware `calc()` widths apply only on `:not(.masonry)` grids;
 * masonry keeps percentage widths and padding-based gutters.
 *
 * MasonryController listens for aos:in and imagesLoaded; load-more-controller
 * calls Masonry.data().appended() and AOS.refresh() after AJAX inserts.
 */
#bh-index-grid,
#bh-index-grid.bh-layout-row,
.bh-post-grid,
.post-grid {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  align-items: stretch;
}

.bh-post-grid.bh-grid-gap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bh-post-grid-gutter, 1.5rem);
  row-gap: var(--bh-post-grid-gutter, 1.5rem);
  padding-bottom: var(--bh-post-grid-gutter, 1.5rem);
}

/* Masonry reads offsetWidth from these widths (percentPosition). */
.bh-grid-col-two,
.bh-grid-col-three {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .bh-grid-col-two,
  .bh-grid-col-three {
    width: 50%;
  }
}

@media (min-width: 1024px) {
  .bh-grid-col-three {
    width: 33.3333%;
  }
}

/*
 * Non-masonry: subtract inter-column gap from item width so two/three cards
 * fit per row when the container uses flex gap (`.bh-grid-gap`).
 */
#bh-index-grid:not(.masonry) > article.bh-grid-col-two,
#bh-index-grid:not(.masonry) > article.bh-grid-col-three {
  position: static;
  left: auto;
  top: auto;
  transform: none;
}

@media (min-width: 640px) {
  #bh-index-grid:not(.masonry) > article.bh-grid-col-two,
  #bh-index-grid:not(.masonry) > article.bh-grid-col-three {
    width: calc((100% - var(--bh-post-grid-gutter, 1.5rem)) / 2);
    flex: 0 0 calc((100% - var(--bh-post-grid-gutter, 1.5rem)) / 2);
    max-width: calc((100% - var(--bh-post-grid-gutter, 1.5rem)) / 2);
  }
}

@media (min-width: 1024px) {
  #bh-index-grid:not(.masonry) > article.bh-grid-col-three {
    width: calc((100% - 2 * var(--bh-post-grid-gutter, 1.5rem)) / 3);
    flex: 0 0 calc((100% - 2 * var(--bh-post-grid-gutter, 1.5rem)) / 3);
    max-width: calc((100% - 2 * var(--bh-post-grid-gutter, 1.5rem)) / 3);
  }
}

/*
 * Equal-height arrangement on the index grid — reinforce stretch + flex
 * fill after gap-aware width rules (equal_height adds bh-card-flex-col).
 */
#bh-index-grid:not(.masonry) > article.bh-card-flex-col {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

#bh-index-grid:not(.masonry) > article.bh-card-flex-col > .bh-tw-card.bh-card-flex-col {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#bh-index-grid:not(.masonry) > article.bh-card-flex-col .bh-tw-card-body.bh-card-body-flex-col {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#bh-index-grid:not(.masonry) > article.bh-card-flex-col .bh-card-button-wrap {
  margin-top: auto;
}

/*
 * Masonry layout — card_arrange_masonry token → "masonry-item" on each
 * article; wrapper-index.php adds class="masonry" + data-bh-component="masonry"
 * to #bh-index-grid when the arrangement Customizer setting is "masonry".
 * interaction-kit.js reads data-bh-component="masonry" and runs the JS
 * column-packing algorithm; these rules provide the CSS column scaffold.
 * Identical to Bulma / Foundation / Pico bridge implementations.
 */
#bh-index-grid.masonry {
  width: calc(100% + var(--bh-post-grid-gutter));
  margin-left: calc(-1 * var(--bh-post-grid-gutter));
  margin-right: 0;
}

#bh-index-grid.masonry .masonry-item {
  box-sizing: border-box;
  padding: 0 0 var(--bh-post-grid-gutter) var(--bh-post-grid-gutter);
  margin-bottom: 0;
}
