/* =============================================================================
   Bluefin Design System - Layout primitives  (Phase 2 / Workstream 1)
   -----------------------------------------------------------------------------
   Page-structure primitives consumed by the layout partials in bluefin/layout/.
   All bf- prefixed, tokens-only, additive. They express column structure with
   CSS (flex), NOT with the STORE_TYPE-driven BOX_WIDTH / LEFT_WIDTH / RIGHT_WIDTH
   math in application_top.php - retiring that branching is WS2. Breakpoints are
   fixed constants here (custom properties cannot be used in @media conditions),
   aligned to Bootstrap 3's grid (md >=768).

   No em dash (U+2014) anywhere (CI style guard).
   ============================================================================= */

/* Page shell: the outermost wrapper a rebuilt page opts into. */
.bf-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* Match the Open Market main canvas (home-open-market.css redefines
     --bf-color-surface-alt to #f5f7fa inside .bf-om). The footer wave rises out of
     the page by revealing the shell through its transparent top; if the shell kept
     the base surface-alt (#f2f3f4) it would peek through a hair cooler than the
     .bf-om main above and leave a faint seam. Keep this in sync with that redefine. */
  background-color: #f5f7fa;
  color: var(--bf-color-text);
  font-family: var(--bf-font-body);
}

.bf-shell__main {
  flex: 1 0 auto;
}

/* Centered content container with a max width and gutters. */
.bf-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--bf-space-4);
}

.bf-container--narrow {
  max-width: 720px;
}

/* Page heading for redesigned content pages (the .bf-scope h1 carries the type;
   this only adds vertical rhythm). */
.bf-page-head {
  padding: var(--bf-space-5) 0 var(--bf-space-2);
}

.bf-page-head h1,
.bf-page-head h2 {
  margin: 0;
  font-family: var(--bf-font-display);
}

/* Region: main content + optional sidebar. Single column on small screens,
   two columns from md up. The sidebar side is chosen by a modifier. */
.bf-region {
  display: flex;
  /* Force full width: in some page contexts the flex container was landing in a
     shrink-to-fit sizing context and collapsing to its content width (which
     starved the flex-1 main column down to a few px). width:100% pins it to its
     parent regardless. */
  width: 100%;
  flex-direction: column;
  gap: var(--bf-space-5);
  padding: var(--bf-space-5) 0;
}

.bf-region__main {
  min-width: 0;
}

.bf-region__sidebar {
  min-width: 0;
}

@media (min-width: 768px) {
  .bf-region {
    flex-direction: row;
  }

  .bf-region__main {
    flex: 1 1 auto;
  }

  /* 360px (not the original 280px) so the legacy rail widgets fit: the
     previously-viewed / featured-results fragments carry hard-coded fixed widths
     (e.g. a width:360px carousel + min-width:300px cards) built for the old
     ~380px col-md-4 column; a narrower rail makes them overflow off-screen to the
     right. Revisit (narrow this back) when those sidebar widgets are restyled. */
  .bf-region__sidebar {
    flex: 0 0 360px;
  }

  /* Sidebar-first variant places the aside on the left. */
  .bf-region--sidebar-left {
    flex-direction: row-reverse;
  }
}

/* Stack: vertical rhythm helper for a column of elements. */
.bf-stack {
  display: flex;
  flex-direction: column;
  gap: var(--bf-space-4);
}

/* Header / footer shells. The header is the editorial masthead: a light "paper"
   surface with charcoal ink, framed by a brand-color accent rule on the top edge
   and a hairline base. The brand color is used as an ACCENT (the top rule, the
   active-link underline, the CTA) rather than filling the bar, so it recolors
   safely for any storefront hue. The footer is the secondary (charcoal) bar. */
.bf-header {
  position: sticky;
  top: 0;
  z-index: var(--bf-z-sticky);
  color: var(--bf-color-text);
  /* Aurora "Lantern" masthead: the light white surface (same as the homepage cards)
     lifts off the page with a soft borderless drop shadow, dressed with a faint brand
     BLOOM - a soft primary glow from the top-left and an accent glow from the bottom-right
     (the footer's aurora, transposed and kept low-alpha so the bar still reads white).
     The crisp gradient EDGE lives in ::after; the buttons carry a matching inner glow. */
  background-color: var(--bf-color-surface);
  /* Three brand glows so the bloom carries ALL the storefront's colors, not just the
     warm ones: primary from the left, secondary through the center, accent from the
     right (a storefront usually configures primary + secondary, with accent falling
     back to the default, so primary->accent alone can read monochrome). Centered
     vertically on the short bar so the glow actually lands on it. */
  background-image:
    radial-gradient(600px 240px at 0% 50%,
        color-mix(in srgb, var(--bf-brand-primary) 22%, transparent), transparent 72%),
    radial-gradient(560px 220px at 50% 116%,
        color-mix(in srgb, var(--bf-brand-secondary) 24%, transparent), transparent 68%),
    radial-gradient(640px 240px at 100% 50%,
        color-mix(in srgb, var(--bf-brand-accent) 20%, transparent), transparent 72%);
  box-shadow: 0 6px 20px -10px rgba(0, 0, 0, 0.16);
}

/* Aurora "edge" signature on the light masthead: a thin brand primary-to-accent rule
   along the bottom of the bar. Brand as an EDGE, not a fill - the same flare the
   footer/CTA use, kept light. Rides the bottom edge over the soft drop shadow. */
.bf-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bf-brand-primary), var(--bf-brand-secondary), var(--bf-brand-accent));
}

.bf-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--bf-space-3) var(--bf-space-4);
  padding: var(--bf-space-3) 0;
}

/* Header chrome (WS3): a masthead brand, the account-avatar trigger, and a
   responsive nav - inline from md up, a CSS-only hamburger drawer below md (a
   visually-hidden checkbox toggles .bf-header__nav; no JS, works JS-off). */
.bf-header__brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
}

.bf-header__logo {
  display: block;
  max-width: 280px;
  max-height: 54px;
  width: auto;
  height: auto;
}

/* SVG masthead logos: a viewBox-only SVG carries no intrinsic pixel size, so
   width/height:auto collapses it to nothing (the image simply does not appear).
   Give SVG logos a definite height and use object-fit so wide newspaper
   wordmarks scale down to the bar without distortion. Matches the .svg src that
   hozi.main.js sets on the masthead from the storefront's portal image. */
.bf-header__logo[src*=".svg"] {
  width: auto;
  height: 54px;
  max-width: 280px;
  max-height: 54px;
  object-fit: contain;
  object-position: left center;
}

/* Inlined SVG masthead: hozi.main.js inlines an SVG logo (instead of using <img>)
   so it inherits the storefront brand tokens and recolors. Size the inline <svg>
   like the logo; its viewBox preserves the aspect ratio. */
.bf-masthead-svg {
  display: inline-flex;
  align-items: center;
}
.bf-masthead-svg svg {
  display: block;
  width: auto;
  height: 54px;
  max-width: 280px;
  max-height: 54px;
}

.bf-header__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--bf-space-1);
  padding: var(--bf-space-1) var(--bf-space-2);
  color: var(--bf-color-text);
  cursor: pointer;
}

.bf-header__toggle-icon {
  font-size: var(--bf-text-2xl);
  line-height: 1;
}

.bf-header__nav {
  display: none;
  flex-basis: 100%;
}

.bf-header__toggle-input:checked ~ .bf-header__nav {
  display: block;
}

.bf-header__nav .bf-nav--inline {
  flex-direction: column;
  align-items: stretch;
  gap: var(--bf-space-1);
}

.bf-header__nav .bf-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--bf-space-1);
  padding-bottom: var(--bf-space-1);
  color: var(--bf-color-text);
  font-family: "Inter", var(--bf-font-body);
  font-weight: var(--bf-weight-medium);
  font-size: var(--bf-text-sm);
  text-transform: none;
  font-variant: normal;
  letter-spacing: 0.01em;
  text-decoration: none;
}

/* Animated underline on hover/active (skipped for the CTA button), in the
   storefront brand color (the accent against the paper masthead). */
.bf-header__nav .bf-nav__link:not(.bf-header__cta)::after {
  content: "";
  position: absolute;
  left: var(--bf-space-2);
  right: var(--bf-space-2);
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bf-brand-primary), var(--bf-brand-secondary), var(--bf-brand-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--bf-transition-fast);
}

.bf-header__nav .bf-nav__link:hover {
  background-color: transparent;
  color: var(--bf-color-text);
  text-decoration: none;
}

.bf-header__nav .bf-nav__link:not(.bf-header__cta):hover::after,
.bf-header__nav .bf-nav__link.is-active:not(.bf-header__cta)::after {
  transform: scaleX(1);
}

/* "Place an Ad" CTA (Aurora edge): a LIGHT pill whose border is the brand
   primary-to-accent gradient (the double-background trick - a surface fill clipped to
   the padding box, over the gradient clipped to the border box), with dark ink and
   a small brand "+". It reads as the primary action through the gradient EDGE, not
   a heavy secondary-color fill; hover lifts it with a soft brand glow. */
.bf-header__nav .bf-nav__link.bf-header__cta {
  color: var(--bf-color-text);
  font-weight: var(--bf-weight-bold);
  border-radius: var(--bf-radius-pill);
  padding: var(--bf-space-2) var(--bf-space-4);
  border: 1.6px solid transparent;
  background-image:
    linear-gradient(var(--bf-color-surface), var(--bf-color-surface)),
    linear-gradient(90deg, var(--bf-brand-primary), var(--bf-brand-secondary), var(--bf-brand-accent));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  /* Lantern: a faint brand inner glow so the pill reads as lit from within. */
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--bf-brand-primary) 15%, transparent);
  transition: var(--bf-transition-lift);
}

.bf-header__nav .bf-nav__link.bf-header__cta::before {
  content: "+";
  font-weight: 800;
  color: var(--bf-brand-primary);
}

.bf-header__nav .bf-nav__link.bf-header__cta:hover {
  transform: translateY(var(--bf-lift-1));
  box-shadow: inset 0 0 16px color-mix(in srgb, var(--bf-brand-primary) 22%, transparent),
    0 6px 16px color-mix(in srgb, var(--bf-brand-primary) 22%, transparent);
}

.bf-header__actions {
  display: inline-flex;
  align-items: center;
}

/* Account trigger. The link is the focus target, so its focus ring is round
   (matching the avatar) instead of the browser's square outline; focus-visible
   means a mouse click shows no ring at all, only keyboard focus does. */
.bf-header__account {
  display: inline-flex;
  border-radius: var(--bf-radius-pill);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Avatar chip on the paper masthead: a hairline ring on a surface fill, framing
   either the default (charcoal) glyph or, when logged in, the customer photo. */
.bf-header__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--bf-radius-pill);
  object-fit: cover;
  /* The account pill carries the brand gradient edge, so the avatar stays a clean
     disc with a light hairline (no competing ring). Lantern: a soft brand-tinted
     disc shows behind the default marker glyph (a real photo covers it). */
  background: radial-gradient(circle at 32% 30%,
      color-mix(in srgb, var(--bf-brand-primary) 16%, var(--bf-color-surface)),
      var(--bf-color-surface-alt));
  box-shadow: inset 0 0 0 1px var(--bf-color-border);
  transition: box-shadow var(--bf-transition-fast);
}

.bf-header__account:hover .bf-header__avatar {
  box-shadow: inset 0 0 0 1px var(--bf-color-border-strong);
}

.bf-header__account:focus-visible .bf-header__avatar {
  box-shadow: inset 0 0 0 1px var(--bf-color-border-strong),
    0 0 0 3px var(--bf-color-focus-ring);
}

/* WS4: state-aware account trigger. Signed out = a brand-plate "Sign in" pill
   (figure glyph + label); signed in = avatar + first name + caret. The
   #customer-profile-thumb <img> stays in the DOM in both states so the login JS
   can swap its src; on in-place (place_ad) login the script flips --out to --in. */
.bf-header__account--out {
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  color: var(--bf-color-text);
  font-family: "Inter", var(--bf-font-body);
  font-weight: var(--bf-weight-bold);
  font-size: var(--bf-text-sm);
  text-decoration: none;
  /* Light gradient-edge pill matching the CTA (was a solid secondary-color block) */
  border: 1.6px solid transparent;
  background-image:
    linear-gradient(var(--bf-color-surface), var(--bf-color-surface)),
    linear-gradient(90deg, var(--bf-brand-primary), var(--bf-brand-secondary), var(--bf-brand-accent));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--bf-brand-primary) 15%, transparent);
  transition: var(--bf-transition-lift);
}
.bf-header__account--out:hover {
  transform: translateY(var(--bf-lift-1));
  box-shadow: inset 0 0 16px color-mix(in srgb, var(--bf-brand-primary) 22%, transparent),
    0 6px 16px color-mix(in srgb, var(--bf-brand-primary) 22%, transparent);
}
.bf-header__account--out:focus-visible {
  outline: 3px solid var(--bf-color-focus-ring);
  outline-offset: 2px;
}
.bf-header__account-figure {
  width: 17px;
  height: 17px;
  fill: currentColor;
  color: var(--bf-brand-primary);
}
.bf-header__account-label {
  line-height: 1;
}
.bf-header__account--out .bf-header__avatar {
  display: none;
}

.bf-header__account--in {
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 6px;
  color: var(--bf-color-text);
  font-family: "Inter", var(--bf-font-body);
  font-weight: var(--bf-weight-bold);
  font-size: var(--bf-text-sm);
  text-decoration: none;
  /* Same light gradient-edge pill as the CTA / Sign-in trigger (was a flat gray
     border, which read as out of place next to the aurora edges). */
  border: 1.6px solid transparent;
  background-image:
    linear-gradient(var(--bf-color-surface), var(--bf-color-surface)),
    linear-gradient(90deg, var(--bf-brand-primary), var(--bf-brand-secondary), var(--bf-brand-accent));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--bf-brand-primary) 15%, transparent);
  transition: var(--bf-transition-lift);
}
.bf-header__account--in:hover {
  transform: translateY(var(--bf-lift-1));
  box-shadow: inset 0 0 16px color-mix(in srgb, var(--bf-brand-primary) 22%, transparent),
    0 6px 16px color-mix(in srgb, var(--bf-brand-primary) 22%, transparent);
}
.bf-header__account--in:focus-visible {
  outline: 3px solid var(--bf-color-focus-ring);
  outline-offset: 2px;
}
.bf-header__account--in .bf-header__avatar {
  width: 30px;
  height: 30px;
}
.bf-header__account-name {
  max-width: 9ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bf-header__account-caret {
  color: var(--bf-color-text-muted);
  font-size: 13px;
}
.bf-header__account--in .bf-header__account-figure,
.bf-header__account--in .bf-header__account-label {
  display: none;
}

/* The base `.bf-scope a { color: teal }` (0,1,1) outranks a single trigger class,
   which tinted the trigger label/name teal. Pin the trigger text with a .bf-scope
   compound (0,2,0) so it wins in every state (including :hover). */
.bf-scope .bf-header__account--out {
  color: var(--bf-color-text);
}
.bf-scope .bf-header__account--in {
  color: var(--bf-color-text);
}

/* Click feedback on the masthead: kill the ugly default dark tap/click highlight
   box on the logo + nav links + hamburger, and show a clean press (a quick dim)
   instead. Keyboard focus still gets the bf-scope focus-visible ring, so
   accessibility is preserved. */
.bf-header a,
.bf-header__toggle {
  -webkit-tap-highlight-color: transparent;
}

.bf-header a:focus:not(:focus-visible),
.bf-header__toggle:focus:not(:focus-visible) {
  outline: none;
}

.bf-header a:active,
.bf-header__toggle:active {
  opacity: 0.6;
}

@media (min-width: 768px) {
  /* Condensed single-row chrome (Open Market): logo on the left, the inline nav
     and the account avatar pushed to the right. The avatar takes layout width on
     this row (no absolute float), so the bar stays a compact single line on every
     page. */
  .bf-header__inner {
    position: relative;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--bf-space-4);
  }

  .bf-header__brand {
    margin-right: auto;
    padding-bottom: 0;
  }

  .bf-header__actions {
    position: static;
    margin-left: var(--bf-space-2);
  }

  .bf-header__toggle {
    display: none;
  }

  .bf-header__nav,
  .bf-header__toggle-input:checked ~ .bf-header__nav {
    display: flex;
    flex-basis: auto;
    justify-content: flex-end;
    width: auto;
    padding-top: 0;
    border-top: 0;
  }

  .bf-header__nav .bf-nav--inline {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: var(--bf-space-4);
  }
}

.bf-footer {
  /* Aurora footer band: a GUARANTEED-DARK neutral base (derived from the text token,
     never the raw brand) so white text is legible on ANY storefront brand - the same
     neutral-housing + brand-accent convention the Open Market dark consoles use. Static
     fallback first, then the text-derived charcoal where color-mix is supported. Depth
     comes from three soft brand "aurora" glows (primary + secondary + accent, low alpha);
     brand shows only as ACCENTS (wordmark rule, column titles, link hovers, crest rim). */
  --bf-footer-base: #14161a;
  --bf-footer-base: color-mix(in srgb, var(--bf-color-text) 86%, #000);
  --bf-footer-wave-h: 96px;
  /* The page tone the wave is carved from. MUST match the shell / .bf-om main canvas
     above the footer (see .bf-shell, #f5f7fa) so the cutout is invisible against it. */
  --bf-footer-canvas: #f5f7fa;
  position: relative;
  overflow: hidden;
  margin-top: var(--bf-space-5);
  /* Padding clears the wave; content sits above it via .bf-footer__inner. Entirely in
     flow: the wave SVG (top:0 inside the footer) carves the page color out of the band's
     TOP (a cutout), so nothing overlays the previous section (the csr_home regression),
     and the only edge is the wave crest (page meeting band). */
  padding: calc(var(--bf-footer-wave-h) + var(--bf-space-6)) 0 0;
  color: #ffffff;
  background-color: var(--bf-footer-base);
  /* Two broad brand glows blooming in from opposite corners (primary high-left, accent
     low-right) for the aurora depth. Large + soft so they read as atmospheric washes
     across the band, not tight spotlights; their peaks sit in the corners and fade
     toward the middle, so the surface stays a calm dark and no hard-edged wrong-color
     band forms under the wave (that was the old parallax ribbon, now removed). */
  background-image:
    radial-gradient(1200px 640px at 0% 2%,
        color-mix(in srgb, var(--bf-brand-primary) 24%, transparent), transparent 68%),
    radial-gradient(1200px 660px at 100% 116%,
        color-mix(in srgb, var(--bf-brand-accent) 20%, transparent), transparent 66%);
}

/* Sculpted divider: a SINGLE clean crest. The SVG carves the wave from the top of the
   band by painting the page color above the curve (.bf-footer__wave-fill); below the
   curve it is transparent so the dark band shows through with no seam. A soft lit rim
   (.bf-footer__wave-edge) traces the crest. There is deliberately NO second filled
   layer: an earlier brand-tinted "parallax" band had a straight bottom edge inside the
   SVG that read as a hard horizontal line under the wave. preserveAspectRatio="none"
   stretches it full width; the edge uses vector-effect:non-scaling-stroke so it stays an
   even hairline at any width. */
.bf-footer__wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--bf-footer-wave-h);
  display: block;
  pointer-events: none;
}

.bf-footer__wave-fill {
  /* the page-colored cutout above the crest (NOT the dark band) */
  fill: var(--bf-footer-canvas);
}

.bf-footer__wave-edge {
  fill: none;
  /* soft, brand-independent lit crest rim; a low-alpha white keeps it subtle on any
     palette (warm or cool) rather than reading as a hard colored line. */
  stroke: color-mix(in srgb, #ffffff 22%, transparent);
  stroke-width: 1.5;
}

.bf-footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 3fr;
  gap: 40px var(--bf-space-6);
  padding-bottom: var(--bf-space-6);
}

.bf-footer__brand {
  max-width: 34ch;
}

/* NOTE on specificity: every text element below is prefixed with `.bf-footer ` so it
   reaches (0,2,0)/(0,3,0) and beats the light-surface base rules `.bf-scope a` and
   `.bf-scope h1..h6` (both 0,1,1). Without the prefix the anchors inherited the deep
   "readable-on-paper" teal (#00737f) and the h3 titles inherited charcoal (#222222) -
   both unreadable on this dark band. Text is white / translucent-white; brand shows
   only as accents (wordmark underline, hovers). */
.bf-footer .bf-footer__mark {
  display: inline-block;
  font-family: var(--bf-font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-decoration: none;
  padding-bottom: 10px;
  position: relative;
}

.bf-footer__mark::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 52px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--bf-brand-primary), var(--bf-brand-accent));
}

.bf-footer__tagline {
  margin: var(--bf-space-4) 0 0;
  font-family: "Inter", var(--bf-font-body);
  font-size: var(--bf-text-sm);
  line-height: 1.6;
  color: color-mix(in srgb, #ffffff 74%, transparent);
}

.bf-footer__glowdot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--bf-brand-primary);
  box-shadow: 0 0 12px 2px color-mix(in srgb, var(--bf-brand-primary) 70%, transparent);
}

.bf-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--bf-space-6);
}

.bf-footer .bf-footer__coltitle {
  margin: 0 0 var(--bf-space-4);
  font-family: "Inter", var(--bf-font-body);
  font-size: var(--bf-text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* mostly-white label with a light brand tint: legible on the dark band, still on-brand */
  color: color-mix(in srgb, #ffffff 68%, var(--bf-brand-primary));
}

.bf-footer__collist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.bf-footer .bf-footer__link {
  font-family: "Inter", var(--bf-font-body);
  font-size: var(--bf-text-sm);
  font-weight: var(--bf-weight-medium);
  color: color-mix(in srgb, #ffffff 82%, transparent);
  text-decoration: none;
  display: inline-block;
  transition: color var(--bf-transition-fast), transform var(--bf-transition-base);
}

.bf-footer .bf-footer__link:hover,
.bf-footer .bf-footer__link:focus-visible {
  color: #ffffff;
  transform: translateX(3px);
  text-decoration: none;
}

.bf-footer__baseline {
  position: relative;
  z-index: 1;
}

.bf-footer__baseinner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--bf-space-3);
  padding-top: var(--bf-space-4);
  padding-bottom: var(--bf-space-5);
}

.bf-footer__copyright {
  margin: 0;
  font-family: "Inter", var(--bf-font-body);
  font-size: var(--bf-text-sm);
  color: color-mix(in srgb, #ffffff 60%, transparent);
}

.bf-footer .bf-footer__copyright a {
  color: color-mix(in srgb, #ffffff 78%, transparent);
}

.bf-footer .bf-footer__copyright a:hover,
.bf-footer .bf-footer__copyright a:focus-visible {
  color: #ffffff;
}

.bf-footer .bf-footer__toplink {
  font-family: "Inter", var(--bf-font-body);
  font-size: var(--bf-text-xs);
  font-weight: var(--bf-weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, #ffffff 72%, transparent);
  text-decoration: none;
}

.bf-footer .bf-footer__toplink:hover,
.bf-footer .bf-footer__toplink:focus-visible {
  color: #ffffff;
}

@media (max-width: 760px) {
  .bf-footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .bf-footer__cols {
    grid-template-columns: 1fr 1fr;
  }
}

/* =============================================================================
   Account rail (WS4 Open Market "Split Concierge"): the two-pane content of the
   #panel-my-account slide-out (bluefin/layout/site_account_panel.php). A charcoal
   brand / identity pane beside a light form / actions pane. The panel GEOMETRY
   (fixed position, widened width, off-screen rest, backdrop) is a scoped override
   in sandbox/css/override.main.css; this file styles the CONTENT. It is NOT scoped
   to .bf-om (the panel is body-level chrome), so all colors come straight from the
   :root brand tokens. The Bootstrap password modals keep their own light frame;
   .bf-account-panel__error (kept at the end) still styles their inline errors.
   ============================================================================= */
.bf-account {
  height: 100%;
  font-family: "Inter", var(--bf-font-body);
}

.bf-account__grid {
  display: grid;
  grid-template-columns: 244px 1fr;
  height: 100%;
}
.bf-account__grid--in {
  grid-template-columns: 268px 1fr;
}

/* ---- charcoal brand / identity pane ---- */
.bf-account__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--bf-space-5);
  color: var(--bf-brand-primary-ink);
  background:
    radial-gradient(120% 80% at 15% 0%, color-mix(in srgb, var(--bf-brand-primary) 22%, transparent), transparent 55%),
    linear-gradient(155deg, color-mix(in srgb, var(--bf-brand-secondary) 88%, #000), var(--bf-brand-secondary) 60%);
  overflow-y: auto;
}
.bf-account__brand::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(color-mix(in srgb, var(--bf-brand-primary-ink) 9%, transparent) 1px, transparent 1.3px);
  background-size: 13px 13px;
}
.bf-account__brand > * {
  position: relative;
}

.bf-account__mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--bf-font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--bf-brand-primary-ink);
}
.bf-account__mark b {
  color: var(--bf-brand-primary);
}
.bf-account__figure {
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  color: var(--bf-brand-primary);
}

.bf-account__welcome {
  font-family: var(--bf-font-display);
  font-weight: 700;
  font-size: var(--bf-text-2xl);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: var(--bf-space-6) 0 var(--bf-space-3);
  color: var(--bf-brand-primary-ink);
}
.bf-account__welcome-sub {
  font-size: var(--bf-text-sm);
  line-height: 1.55;
  color: color-mix(in srgb, var(--bf-brand-primary-ink) 74%, transparent);
  margin: 0 0 var(--bf-space-6);
}
.bf-account__trust {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
}
.bf-account__trust li {
  display: flex;
  gap: var(--bf-space-3);
  align-items: center;
  font-size: var(--bf-text-sm);
  color: color-mix(in srgb, var(--bf-brand-primary-ink) 88%, transparent);
  margin-bottom: var(--bf-space-4);
}
.bf-account__chip {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: var(--bf-radius-pill);
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bf-brand-primary) 18%, transparent);
  color: var(--bf-brand-primary);
  font-size: 14px;
}

/* identity (signed in) */
.bf-account__avatar {
  display: inline-grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: var(--bf-radius-pill);
  background: var(--bf-color-surface);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin: var(--bf-space-5) 0 var(--bf-space-3);
  overflow: hidden;
}
.bf-account__avatar a {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.bf-account__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  border-radius: var(--bf-radius-pill);
}
.bf-account__idname {
  font-family: var(--bf-font-display);
  font-weight: 700;
  font-size: var(--bf-text-xl);
  margin: 0;
  color: var(--bf-brand-primary-ink);
}
.bf-account__idrole {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: var(--bf-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 3px 9px;
  border-radius: var(--bf-radius-pill);
  background: color-mix(in srgb, var(--bf-brand-primary) 20%, transparent);
  color: var(--bf-brand-primary-ink);
}
.bf-account__photolink {
  display: inline-block;
  margin-top: 10px;
  font-size: var(--bf-text-xs);
  color: var(--bf-brand-primary);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.bf-account__photo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bf-space-3);
  margin-top: 10px;
}
.bf-account__photo-controls .bf-account__photolink {
  margin-top: 0;
}
.bf-account__photolink--danger {
  color: color-mix(in srgb, var(--bf-color-danger) 55%, #fff);
}

/* Profile photo crop dialog (Cropper.js). Bootstrap modal frame; cropper.css is
   lazy-loaded on first use, so the .cropper-* rules only take effect once present. */
.bf-cropmodal .modal-dialog {
  max-width: 460px;
}
.bf-cropmodal__hint {
  margin: 0 0 var(--bf-space-4);
  text-align: center;
  font-size: var(--bf-text-sm);
  color: var(--bf-color-text-muted);
}
.bf-cropmodal__stage {
  background: var(--bf-color-surface-sunken);
  border-radius: var(--bf-radius-md);
  overflow: hidden;
}
.bf-cropmodal__stage .img-container {
  max-height: 58vh;
}
.bf-cropmodal__stage .img-container > img {
  display: block;
  max-width: 100%;
}
.bf-cropmodal__toolbar {
  display: flex;
  justify-content: center;
  gap: var(--bf-space-2);
  margin-top: var(--bf-space-4);
}
/* Preview the circular avatar: round the crop view while the crop box stays square. */
.bf-cropmodal .cropper-view-box,
.bf-cropmodal .cropper-face {
  border-radius: 50%;
}
.bf-account #upload-profile-pic {
  display: block;
  margin: var(--bf-space-3) 0 0;
  padding: var(--bf-space-3);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--bf-radius-md);
  background: color-mix(in srgb, var(--bf-brand-primary-ink) 6%, transparent);
  color: var(--bf-brand-primary-ink);
  font-size: var(--bf-text-sm);
}
.bf-account #upload-profile-pic-text {
  display: block;
  font-size: var(--bf-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--bf-brand-primary-ink) 72%, transparent);
  margin-bottom: var(--bf-space-2);
}
.bf-account #upload-profile-pic-file {
  margin: 0;
}
.bf-account #profileUpload {
  width: 100%;
  font-size: var(--bf-text-xs);
  color: color-mix(in srgb, var(--bf-brand-primary-ink) 82%, transparent);
}
.bf-account #profileUpload::file-selector-button {
  margin-right: var(--bf-space-2);
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--bf-radius-sm);
  background: transparent;
  color: var(--bf-brand-primary-ink);
  font-weight: var(--bf-weight-bold);
  font-size: var(--bf-text-xs);
  cursor: pointer;
}
.bf-account #upload-profile-pic-actions {
  display: flex;
  gap: var(--bf-space-2);
  margin-top: var(--bf-space-3);
}
.bf-account #upload-profile-pic-actions .bf-btn {
  flex: 1;
}
.bf-account__stats {
  list-style: none;
  margin: var(--bf-space-6) 0 0;
  padding: 0;
}
.bf-account__stats a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--bf-space-3) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-decoration: none;
  color: inherit;
  transition: padding-left var(--bf-transition-fast);
}
.bf-account__stats li:last-child a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.bf-account__stats a:hover {
  padding-left: 4px;
}
.bf-account__stat-k {
  font-size: var(--bf-text-sm);
  color: color-mix(in srgb, var(--bf-brand-primary-ink) 74%, transparent);
}
.bf-account__stat-v {
  font-family: var(--bf-font-display);
  font-weight: 700;
  font-size: var(--bf-text-lg);
  color: var(--bf-brand-primary-ink);
}

/* ---- light form / actions pane ---- */
.bf-account__form {
  position: relative;
  padding: var(--bf-space-6) var(--bf-space-5) var(--bf-space-5);
  background: var(--bf-color-surface);
  overflow-y: auto;
}
.bf-account__close {
  position: absolute;
  top: var(--bf-space-4);
  right: var(--bf-space-4);
  width: 36px;
  height: 36px;
  border-radius: var(--bf-radius-pill);
  border: 1px solid var(--bf-color-border);
  background: var(--bf-color-surface);
  color: var(--bf-color-text-muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--bf-transition-fast), color var(--bf-transition-fast), transform var(--bf-transition-fast);
}
.bf-account__close:hover {
  background: var(--bf-color-surface-alt);
  color: var(--bf-color-text);
  transform: rotate(90deg);
}
.bf-account__close:focus-visible {
  outline: 3px solid var(--bf-color-focus-ring);
  outline-offset: 2px;
}

.bf-account__reminder {
  margin-bottom: var(--bf-space-4);
  padding: var(--bf-space-3) var(--bf-space-4);
  border-radius: var(--bf-radius-md);
  background: color-mix(in srgb, var(--bf-color-warning) 12%, #fff);
  color: var(--bf-color-text);
  font-size: var(--bf-text-sm);
}
.bf-account__reminder p {
  margin: 0;
}

.bf-account__formhead {
  font-family: var(--bf-font-display);
  font-weight: 700;
  font-size: var(--bf-text-xl);
  letter-spacing: -0.01em;
  margin: 0 0 var(--bf-space-4);
  color: var(--bf-color-text);
}

.bf-account__tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  gap: 4px;
  border-radius: var(--bf-radius-pill);
  background: var(--bf-color-surface-sunken);
  margin: 0 0 var(--bf-space-5);
}
.bf-account__tab {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 9px 0;
  border-radius: var(--bf-radius-pill);
  font-family: "Inter", var(--bf-font-body);
  font-size: var(--bf-text-sm);
  font-weight: var(--bf-weight-bold);
  color: var(--bf-color-text-muted);
  transition: color var(--bf-transition-base);
}
.bf-account__tab[aria-selected="true"] {
  color: var(--bf-color-text);
}
.bf-account__tab:focus-visible {
  outline: 3px solid var(--bf-color-focus-ring);
  outline-offset: 1px;
}
.bf-account__glider {
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 6px);
  border-radius: var(--bf-radius-pill);
  background: var(--bf-color-surface);
  box-shadow: var(--bf-shadow-sm);
  transition: transform var(--bf-transition-base);
}
.bf-account__form[data-tab="register"] .bf-account__glider {
  transform: translateX(calc(100% + 4px));
}

.bf-account__tabpane {
  display: none;
}
.bf-account__form[data-tab="login"] .bf-account__pane-login,
.bf-account__form[data-tab="register"] .bf-account__pane-register {
  display: block;
  animation: bf-account-fade var(--bf-transition-base) both;
}

.bf-account__label {
  display: block;
  font-size: var(--bf-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--bf-color-text-muted);
  margin-bottom: 6px;
  font-weight: var(--bf-weight-medium);
}
.bf-account__grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--bf-space-3);
}
.bf-account__inputwrap {
  position: relative;
}
.bf-account__input--pw {
  padding-right: 44px;
}
.bf-account__reveal {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 42px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--bf-color-text-muted);
  font-size: 14px;
  border-radius: 0 var(--bf-radius-md) var(--bf-radius-md) 0;
}
.bf-account__reveal:hover {
  color: var(--bf-color-primary-text);
}
.bf-account__reveal:focus-visible {
  outline: 3px solid var(--bf-color-focus-ring);
  outline-offset: -3px;
}

.bf-account__error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 var(--bf-space-3);
  padding: 9px 12px;
  border-radius: var(--bf-radius-md);
  font-size: var(--bf-text-sm);
  background: var(--bf-color-danger-bg);
  color: var(--bf-color-danger);
}
.bf-account__check {
  display: flex;
  gap: var(--bf-space-2);
  align-items: flex-start;
  font-size: var(--bf-text-sm);
  color: var(--bf-color-text);
}

.bf-account__rowend {
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 var(--bf-space-4);
}
.bf-account__link {
  font-size: var(--bf-text-sm);
  color: var(--bf-color-primary-text);
  text-decoration: none;
}
.bf-account__link:hover {
  text-decoration: underline;
}

.bf-account__cta {
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: var(--bf-radius-md);
  cursor: pointer;
  font-family: "Inter", var(--bf-font-body);
  font-weight: var(--bf-weight-bold);
  font-size: var(--bf-text-base);
  background: var(--bf-brand-secondary);
  color: var(--bf-brand-primary-ink);
  transition: background var(--bf-transition-fast), box-shadow var(--bf-transition-fast), transform var(--bf-transition-fast);
}
.bf-account__cta:hover {
  background: color-mix(in srgb, var(--bf-brand-secondary) 82%, #000);
  box-shadow: var(--bf-shadow-md);
}
.bf-account__cta:active {
  transform: translateY(1px);
}
.bf-account__cta:focus-visible {
  outline: 3px solid var(--bf-color-focus-ring);
  outline-offset: 2px;
}
.bf-account__cta--ghost {
  background: transparent;
  border: 1px solid var(--bf-color-border-strong);
  color: var(--bf-color-text);
}
.bf-account__cta--ghost:hover {
  background: var(--bf-color-surface-alt);
  box-shadow: none;
}

.bf-account__or {
  display: flex;
  align-items: center;
  gap: var(--bf-space-3);
  margin: var(--bf-space-5) 0;
  color: var(--bf-color-text-muted);
  font-size: var(--bf-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.bf-account__or::before,
.bf-account__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bf-color-border);
}

/* Facebook button uses Facebook's own brand blue (a third-party brand, not a
   storefront brand), so it intentionally does not recolor with the tokens. */
.bf-account__social {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bf-space-2);
  padding: 12px 16px;
  border-radius: var(--bf-radius-md);
  border: 0;
  cursor: pointer;
  background: #1877f2;
  color: #fff;
  font-weight: var(--bf-weight-bold);
  font-size: var(--bf-text-base);
  transition: background var(--bf-transition-fast);
}
.bf-account__social:hover {
  background: #1465d8;
}
.bf-account__social:focus-visible {
  outline: 3px solid var(--bf-color-focus-ring);
  outline-offset: 2px;
}
.bf-account__social .fa {
  font-size: 18px;
}

.bf-account__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: var(--bf-space-4) 0 0;
  font-size: var(--bf-text-xs);
  color: var(--bf-color-text-muted);
}
.bf-account__secure .fa {
  color: var(--bf-color-success);
}
.bf-account__notice {
  margin: var(--bf-space-4) 0 0;
  padding-top: var(--bf-space-4);
  border-top: 1px solid var(--bf-color-border);
  font-size: var(--bf-text-xs);
  color: var(--bf-color-text-muted);
  line-height: 1.6;
}

/* actions list (signed in) */
.bf-account__actions {
  list-style: none;
  margin: 0 0 var(--bf-space-4);
  padding: 0;
}
.bf-account__actions li {
  border-bottom: 1px solid var(--bf-color-border);
}
.bf-account__actions li:first-child {
  border-top: 1px solid var(--bf-color-border);
}
.bf-account__actions a,
.bf-account__actions button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--bf-space-3);
  padding: 15px 6px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: var(--bf-color-text);
  font-size: var(--bf-text-base);
  font-weight: var(--bf-weight-medium);
  transition: padding-left var(--bf-transition-fast), color var(--bf-transition-fast);
}
.bf-account__actions a:hover,
.bf-account__actions button:hover {
  padding-left: 12px;
  color: var(--bf-color-primary-text);
}
.bf-account__lead {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--bf-radius-md);
  display: grid;
  place-items: center;
  background: var(--bf-color-surface-alt);
  color: var(--bf-color-primary-text);
  font-size: 15px;
  transition: background var(--bf-transition-fast);
}
.bf-account__actions a:hover .bf-account__lead,
.bf-account__actions button:hover .bf-account__lead,
.bf-account__disclosure button:hover .bf-account__lead {
  background: color-mix(in srgb, var(--bf-brand-primary) 12%, transparent);
}
.bf-account__chev {
  margin-left: auto;
  color: var(--bf-color-border-strong);
}
.bf-account__count {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--bf-radius-pill);
  background: var(--bf-brand-accent);
  color: #fff;
  font-size: var(--bf-text-xs);
  font-weight: var(--bf-weight-bold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bf-account__disclosure button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--bf-space-3);
  padding: 15px 6px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: var(--bf-color-text);
  font-size: var(--bf-text-base);
  font-weight: var(--bf-weight-medium);
}
.bf-account__editform {
  padding: var(--bf-space-4) 6px 0;
}
.bf-account__logout {
  margin-top: var(--bf-space-5);
}

@keyframes bf-account-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 660px) {
  .bf-account__grid,
  .bf-account__grid--in {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bf-account__glider,
  .bf-account__close,
  .bf-account__cta,
  .bf-account__actions a,
  .bf-account__actions button,
  .bf-account__stats a,
  .bf-account__form[data-tab] .bf-account__tabpane {
    transition: none;
    animation: none;
  }
}

/* Password-reset / change modals keep their light Bootstrap frame; this still
   styles their inline error text. */
.bf-account-panel__error {
  display: block;
  margin: var(--bf-space-2) 0;
  color: var(--bf-color-danger);
  font-size: var(--bf-text-sm);
  font-weight: var(--bf-weight-medium);
}

/* Cookie-consent banner (WS3 chrome). Reuses the .bf-alert--warning visuals;
   these rules pin it to the bottom and drop the alert's rounding/edges. Loaded
   after components.css, so it wins where it overlaps .bf-alert. Visibility is
   driven by the legacy .hide class (sandbox/js/hozi.main.js toggles it). */
.bf-cookie-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--bf-z-toast);
  margin: 0;
  border-radius: 0;
  align-items: center;
  justify-content: center;
  gap: var(--bf-space-4);
  text-align: center;
}

/* Payment page (WS3 chunk-3): centered sheet + mobile button stack. */
.bf-scope #payment-form {
  float: none;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 599px) {
  .bf-scope .place-ad_button-row .col-xs-12 {
    display: flex;
    flex-direction: column;
    gap: var(--bf-space-2);
  }

  .bf-scope .place-ad_button-row .bf-btn {
    float: none;
    width: 100%;
    margin-right: 0 !important; /* overrides the inline margin-right:10px */
  }

  .bf-scope .place-ad_button-row #next-button-payment {
    order: -1; /* primary action first */
  }

  .bf-scope .place-ad_button-row #payment-validation-error {
    float: none;
    width: 100%;
  }
}
