/**
 * WooNinja — modernisation layer for Flatsome (child theme: flatsome-generic)
 * ---------------------------------------------------------------------------
 * Drop-in stylesheet. Loads AFTER flatsome.css and after Flatsome's inline
 * `#custom-css` theme-mod block, so it wins on equal specificity.
 *
 * Accessible palette + type scale + component layer.
 * Every text/background pairing below is verified at or above WCAG AA (4.5:1)
 * for normal-size text, and AA (3:1) for UI boundaries and large text.
 *
 * PHASE 0 (do this in the admin, not here):
 *   Theme Options → Style → Colors
 *     color_primary   = #d92d3a    (was #ff5359 — fails AA with white text)
 *     color_secondary = #101828    (was unset → leaked Flatsome's #d26e4b)
 *     color_success   = #13795b    (was unset)
 *     color_alert     = #9f1239    (was unset)
 *   Theme Options → Style → Typography
 *     Global font scale: 80% → 100%
 *     Headings: Manrope 700/800 · Body: Lato 400 · Nav: Manrope 700
 *   Theme Options → Style → Colors → Links = #c92836
 * ---------------------------------------------------------------------------
 */

/* ==========================================================================
   1. TOKENS
   ========================================================================== */

:root {
  color-scheme: light;

  /* Brand coral ramp — 500 is the logo colour, kept for brand assets only */
  --wn-brand-50:  #fff1f1;
  --wn-brand-100: #ffe0e1;
  --wn-brand-200: #ffc2c5;
  --wn-brand-300: #ff969b;
  --wn-brand-400: #ff737a;
  --wn-brand-500: #ff5359; /* decorative / logo only — never behind white text */
  --wn-brand-600: #d92d3a; /* primary button fill — 4.79:1 with white */
  --wn-brand-700: #c92836; /* links, secondary labels — 5.47:1 on white */
  --wn-brand-800: #a71e2d;
  --wn-brand-900: #701c28;

  /* Neutrals */
  --wn-neutral-0:   #ffffff;
  --wn-neutral-50:  #f8f9fb;
  --wn-neutral-100: #f2f4f7;
  --wn-neutral-200: #e4e7ec;
  --wn-neutral-300: #d0d5dd;
  --wn-neutral-400: #98a2b3;
  --wn-neutral-500: #667085;
  --wn-neutral-600: #475467;
  --wn-neutral-700: #344054;
  --wn-neutral-800: #1d2939;
  --wn-neutral-900: #101828;

  /* Semantics */
  --wn-success-50:  #ecfdf3;
  --wn-success-700: #13795b;
  --wn-warning-50:  #fffaeb;
  --wn-warning-700: #8a4b0f;
  --wn-danger-50:   #fff1f2;
  --wn-danger-700:  #9f1239;

  /* Product-family accents (colour + written label, never colour alone) */
  --wn-thinkific-50:   #eef2ff;
  --wn-thinkific-700:  #4338ca;
  --wn-groundhogg-50:  #f0fdfa;
  --wn-groundhogg-700: #0f766e;

  /* Functional aliases */
  --wn-page-bg:       var(--wn-neutral-0);
  --wn-surface-muted: var(--wn-neutral-50);
  --wn-border:        var(--wn-neutral-200);
  --wn-border-strong: var(--wn-neutral-300);

  --wn-heading: var(--wn-neutral-900);
  --wn-body:    var(--wn-neutral-700);
  --wn-muted:   var(--wn-neutral-500);

  --wn-action:        var(--wn-brand-600);
  --wn-action-hover:  var(--wn-brand-700);
  --wn-action-active: var(--wn-brand-800);
  --wn-link:          var(--wn-brand-700);
  --wn-focus:         var(--wn-neutral-900);

  /* Type */
  --wn-font-display: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --wn-font-body:    "Lato", "Helvetica Neue", Arial, sans-serif;
  --wn-text-small:   0.875rem;

  --wn-step--1: 0.8rem;
  --wn-step-0:  1rem;
  --wn-step-1:  1.25rem;
  --wn-step-2:  1.563rem;
  --wn-step-3:  1.953rem;
  --wn-step-4:  2.441rem;
  --wn-step-5:  3.052rem;
  --wn-step-6:  3.815rem;

  /* Space */
  --wn-space-1:  0.25rem;
  --wn-space-2:  0.5rem;
  --wn-space-3:  0.75rem;
  --wn-space-4:  1rem;
  --wn-space-6:  1.5rem;
  --wn-space-8:  2rem;
  --wn-space-12: 3rem;
  --wn-space-16: 4rem;
  --wn-space-20: 5rem;
  --wn-space-24: 6rem;

  /* Elevation / radius */
  --wn-radius-card: 1rem;
  --wn-radius-btn:  0.75rem;
  --wn-shadow-card: 0 1px 2px rgb(16 24 40 / 5%);
  --wn-shadow-card-hover: 0 16px 32px -16px rgb(16 24 40 / 22%);

  /* NOTE: --fs-color-* are generated by Flatsome from Theme Options and are
     printed AFTER this stylesheet, so they are owned there, not here.
     See README.md for the required Theme Options values. */
}

/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */

html { font-size: 100%; }

body {
  font-family: var(--wn-font-body);
  font-size: var(--wn-step-0);
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--wn-body);
  background: var(--wn-page-bg);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--wn-font-display);
  color: var(--wn-heading);
  font-weight: 700;
  text-transform: none;   /* removes Flatsome's uppercase headings */
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1, .h1 { font-size: var(--wn-step-6); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 1.5rem; }
h2, .h2 { font-size: var(--wn-step-4); font-weight: 800; line-height: 1.15; margin: 0 0 1rem; }
h3, .h3 { font-size: var(--wn-step-3); line-height: 1.2; margin: 0 0 0.75rem; }
h4, .h4 { font-size: var(--wn-step-2); line-height: 1.25; letter-spacing: -0.01em; }
h5, .h5 { font-size: var(--wn-step-1); line-height: 1.3; letter-spacing: 0; }
h6, .h6 { font-size: var(--wn-step-0); line-height: 1.4; letter-spacing: 0; }

p { margin: 0 0 1rem; }

.wn-lead  { font-size: var(--wn-step-1); line-height: 1.5; color: var(--wn-neutral-600); }
.wn-small { font-size: var(--wn-text-small); line-height: 1.5; }

@media (max-width: 767px) {
  h1, .h1 { font-size: var(--wn-step-4); line-height: 1.08; }
  h2, .h2 { font-size: var(--wn-step-3); }
  h3, .h3 { font-size: var(--wn-step-2); }
}

/* Product headings must outrank body copy (currently 25.6px vs 16px) */
.wn-product-card__title { font-size: var(--wn-step-3); line-height: 1.2; }
@media (max-width: 767px) { .wn-product-card__title { font-size: var(--wn-step-2); } }

/* ==========================================================================
   3. BUTTONS
   ========================================================================== */

body .button,
body button.button,
body input[type="submit"].button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid var(--wn-action);
  border-radius: var(--wn-radius-btn) !important;
  background: var(--wn-action);
  color: #fff;
  font-family: var(--wn-font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  text-decoration: none;
  white-space: normal;
  transition: background-color 160ms ease, border-color 160ms ease,
              color 160ms ease, box-shadow 160ms ease;
}

body .button:hover  { background: var(--wn-action-hover);  border-color: var(--wn-action-hover);  color: #fff; }
body .button:active { background: var(--wn-action-active); border-color: var(--wn-action-active); }

body .button.secondary,
body .button.outline {
  background: #fff;
  border-color: var(--wn-brand-700);
  color: var(--wn-brand-700);
}
body .button.secondary:hover,
body .button.outline:hover { background: var(--wn-brand-50); border-color: var(--wn-brand-700); color: var(--wn-brand-700); }
body .button.secondary:active,
body .button.outline:active { background: var(--wn-brand-100); color: var(--wn-brand-900); }

body .button.tertiary {
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
  border-color: transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--wn-brand-700);
}
body .button.tertiary:hover { background: var(--wn-brand-50); color: var(--wn-brand-700); }

body .button:focus-visible,
body a:focus-visible { outline: 3px solid var(--wn-focus); outline-offset: 3px; }

body .button:disabled,
body .button.disabled {
  background: var(--wn-neutral-200);
  border-color: var(--wn-neutral-200);
  color: var(--wn-neutral-600);
  opacity: 1;
  cursor: not-allowed;
}

/* Flatsome's LOGIN button was #777 on #ff5359 (1.41:1) — force a real label */
.header .header-button,
.nav-right .button,
.header-main .button {
  color: #fff;
}

/* ==========================================================================
   4. LAYOUT / SECTIONS
   ========================================================================== */

.wn-container { width: min(69.375rem, calc(100% - 3rem)); margin-inline: auto; }
.wn-section   { padding-block: 4.5rem; } /* 72px — 96px read as too loose
                                  against Flatsome's uniform grey bands */
.wn-section--compact { padding-block: var(--wn-space-16); }
.wn-section--muted   { background: var(--wn-surface-muted); }

@media (max-width: 1023px) { .wn-section { padding-block: 4.5rem; } }
@media (max-width: 767px)  {
  .wn-container { width: min(100% - 2.5rem, 69.375rem); }
  .wn-section   { padding-block: 3.5rem; }
  .wn-section--compact { padding-block: 3rem; }
}

/* UX Builder writes per-section IDs like #section_1479269782{padding:60px}
   An ID beats a class, so a !important is required to globalise rhythm. */
main .section:not(.wn-section) {
  padding-block: 4.5rem !important;
}
@media (max-width: 767px) {
  main .section:not(.wn-section) { padding-block: 3.5rem !important; }
}

/* ==========================================================================
   5. PRODUCT CARDS
   ========================================================================== */

.wn-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--wn-space-6);
  align-items: stretch;
}

.wn-product-card {
  --wn-family-accent:  var(--wn-thinkific-700);
  --wn-family-surface: var(--wn-thinkific-50);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius-card);
  box-shadow: var(--wn-shadow-card);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.wn-product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 4px;
  background: var(--wn-family-accent);
}

.wn-product-card--groundhogg {
  --wn-family-accent:  var(--wn-groundhogg-700);
  --wn-family-surface: var(--wn-groundhogg-50);
}

.wn-product-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--wn-neutral-50);
  border-bottom: 1px solid var(--wn-border);
}
.wn-product-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.wn-product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--wn-space-4);
  padding: var(--wn-space-6);
}

.wn-product-card__topline { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--wn-space-4); }

.wn-family-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--wn-family-surface);
  color: var(--wn-family-accent);
  font-size: var(--wn-text-small);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

.wn-product-card__price {
  margin: 0;
  color: var(--wn-neutral-900);
  font-family: var(--wn-font-display);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.wn-product-card__title    { margin: 0; color: var(--wn-neutral-900); }
.wn-product-card__outcome  { margin: 0; color: var(--wn-neutral-700); font-size: 1rem; line-height: 1.6; }
.wn-product-card__action   { margin-top: auto; padding-top: var(--wn-space-2); }
.wn-product-card__action .button { width: 100%; }

@media (hover: hover) {
  .wn-product-card:hover {
    transform: translateY(-4px);
    border-color: var(--wn-border-strong);
    box-shadow: var(--wn-shadow-card-hover);
  }
}

@media (max-width: 767px) { .wn-product-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .wn-product-card { transition: none; }
  .wn-product-card:hover { transform: none; }
}

/* ==========================================================================
   6. MEGA MENU
   ========================================================================== */

.wn-mega-menu {
  box-sizing: border-box;
  width: min(69.375rem, calc(100vw - 3rem));
  padding: var(--wn-space-6);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--wn-space-6);
  background: #fff;
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius-card);
  box-shadow: 0 20px 40px -16px rgb(16 24 40 / 20%);
}

.wn-mega-menu__group-title {
  margin: 0 0 var(--wn-space-2);
  color: var(--wn-neutral-700);
  font-family: var(--wn-font-display);
  font-size: var(--wn-text-small);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}

.wn-mega-menu a {
  display: block;
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--wn-neutral-900);
  text-decoration: none;
}
.wn-mega-menu a:hover { background: var(--wn-neutral-50); color: var(--wn-neutral-900); }

.wn-mega-menu__description {
  display: block;
  margin-top: 0.125rem;
  color: var(--wn-neutral-500);
  font-size: var(--wn-text-small);
  line-height: 1.4;
}

@media (max-width: 1023px) { .wn-mega-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Opaque mobile drawer — was translucent, letting the hero ghost through */
.off-canvas .mfp-content,
.nav-drawer,
#main-menu .off-canvas {
  background: #fff !important;
  backdrop-filter: none !important;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */

.wn-footer,
.footer-wrapper {
  padding: var(--wn-space-16) 0 var(--wn-space-8);
  background: var(--wn-neutral-900);
  color: var(--wn-neutral-300);
}

.wn-footer a,
.footer-wrapper a { color: var(--wn-neutral-300); text-decoration: none; }
.wn-footer a:hover,
.footer-wrapper a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.2em; }
.wn-footer a:focus-visible,
.footer-wrapper a:focus-visible { outline-color: #fff; }

.wn-footer__title,
.footer-wrapper .widget-title {
  color: #fff;
  font-family: var(--wn-font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.wn-footer__legal {
  margin-top: var(--wn-space-8);
  padding-top: var(--wn-space-6);
  border-top: 1px solid var(--wn-neutral-700);
  color: var(--wn-neutral-400);
  font-size: var(--wn-text-small);
  line-height: 1.5;
}

/* ==========================================================================
   8. HERO
   ========================================================================== */

.wn-hero { padding-block: 4.5rem 5rem; background: var(--wn-surface-muted); }
.wn-hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: var(--wn-space-12); }
.wn-hero__copy { max-width: 36rem; }

.wn-hero__featured {
  display: inline-flex;
  margin-bottom: var(--wn-space-4);
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: var(--wn-thinkific-50);
  color: var(--wn-thinkific-700);
  font-size: var(--wn-text-small);
  font-weight: 700;
  line-height: 1.4;
}
.wn-hero__featured--groundhogg { background: var(--wn-groundhogg-50); color: var(--wn-groundhogg-700); }

.wn-hero h1 { max-width: 12ch; }
.wn-hero__lead { max-width: 48ch; margin-bottom: var(--wn-space-6); color: var(--wn-neutral-600); font-size: var(--wn-step-1); line-height: 1.5; }
.wn-hero__actions { display: flex; flex-wrap: wrap; gap: var(--wn-space-3); }
.wn-hero__actions .button { min-width: 12rem; }

.wn-hero__media {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius-card);
  box-shadow: 0 24px 48px -24px rgb(16 24 40 / 28%);
}
.wn-hero__media img { display: block; width: 100%; aspect-ratio: 16 / 11; object-fit: cover; object-position: top; }

@media (max-width: 767px) {
  .wn-hero { padding-block: 2rem 3rem; }
  .wn-hero__grid { grid-template-columns: 1fr; gap: var(--wn-space-8); }
  .wn-hero__lead { font-size: 1.125rem; }
  .wn-hero__actions { flex-direction: column; }
  .wn-hero__actions .button { width: 100%; }
}

/* ==========================================================================
   9. FLATSOME 3.19 / 3.20 COMPATIBILITY
   --------------------------------------------------------------------------
   The production update to 3.20.13 changes three pieces of markup that this
   stylesheet has to account for. Each rule below is a no-op on 3.18.4, so
   this file can ship BEFORE or AFTER the theme update.
   ========================================================================== */

/* 3.19.0 — "Banner & Section backgrounds now use an img tag."
   Backgrounds are no longer CSS background-image, so they need to be told to
   behave like one: fill the container, crop from the same origin, and never
   be treated as content. */
.banner .bg > img,
.section .section-bg > img,
.bg .bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
}

/* Keep the hero image as the LCP candidate. Flatsome handles the `loading`
   attribute itself — enable Theme Options → Performance → Lazy Load Images,
   and Flatsome skips the banner/LCP image. If you need to force it, set
   `loading="eager"` and `fetchpriority="high"` on the banner's image in UX
   Builder (these are HTML attributes, not CSS). */

/* 3.19.0 — "Builder does not wrap text element content with paragraph anymore."
   Restore the vertical rhythm that <p> used to provide inside text blocks. */
.text-box .text-inner > * + *,
.ux-text > * + * {
  margin-top: 0.75rem;
}

/* 3.20.0 — "Updated login/register form headings from h3 to h2."
   Those headings must not inherit the display H2 scale (39px) inside a modal. */
.mfp-content h2,
.off-canvas h2,
.lightbox-content h2,
.account-container h2,
form.login h2,
form.register h2 {
  font-family: var(--wn-font-display);
  font-size: var(--wn-step-2);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}

/* 3.20.0 — WCAG pass adds focus rings and ARIA; make sure ours wins and is
   never clipped by a card's overflow:hidden. */
.wn-product-card:has(:focus-visible),
.card:has(:focus-visible) {
  outline: 3px solid var(--wn-focus);
  outline-offset: 3px;
}

/* ==========================================================================
   10. OVERRIDING FLATSOME'S ELEMENT-SCOPED TYPOGRAPHY
   --------------------------------------------------------------------------
   Flatsome scopes heading sizes to containers — `.banner h1{font-size:3.5em}`
   (0,1,1) — and its .uppercase utility (0,1,0) adds text-transform:uppercase
   plus 0.05em letter-spacing. Both outrank a bare `h1` selector, so the hero
   heading kept Flatsome's 56px uppercase treatment until matched here.
   Equal specificity + this sheet loading later is what makes these win; no
   !important required.
   ========================================================================== */

.banner h1,
.text-box h1,
.text-inner h1 {
  font-size: var(--wn-step-6);
  line-height: 1.05;
}

.banner h2,
.text-box h2,
.text-inner h2 {
  font-size: var(--wn-step-4);
  line-height: 1.15;
}

.banner h3,
.text-box h3,
.text-inner h3 {
  font-size: var(--wn-step-3);
  line-height: 1.2;
}

/* The .uppercase utility is used on headings in UX Builder content
   (e.g. <h1 class="uppercase">). Sentence case is part of the new type system. */
h1.uppercase,
h2.uppercase,
h3.uppercase,
h4.uppercase,
.h1.uppercase,
.h2.uppercase,
.h3.uppercase {
  text-transform: none;
  letter-spacing: -0.02em;
}

h1.uppercase,
.h1.uppercase {
  letter-spacing: -0.03em;
}

@media (max-width: 767px) {
  .banner h1,
  .text-box h1,
  .text-inner h1 {
    font-size: var(--wn-step-4);
  }

  .banner h2,
  .text-box h2,
  .text-inner h2 {
    font-size: var(--wn-step-3);
  }
}

/* ==========================================================================
   11. EDD COMMERCE BUTTONS
   --------------------------------------------------------------------------
   EDD's own .edd-submit carries a .blue utility (#428bca) which outranks
   .button on specificity. White on #428bca is 3.63:1 — it fails AA and is
   Bootstrap's blue, not the brand.
   ========================================================================== */

body .edd-submit,
body .button.edd-submit,
body .button.blue,
body .button.edd-add-to-cart,
body .edd-add-to-cart,
body .edd-submit.button.blue {
  background: var(--wn-action);
  border-color: var(--wn-action);
  color: #fff;
}

body .edd-submit:hover,
body .button.edd-submit:hover,
body .button.blue:hover,
body .button.edd-add-to-cart:hover,
body .edd-add-to-cart:hover,
body .edd-submit.button.blue:hover {
  background: var(--wn-action-hover);
  border-color: var(--wn-action-hover);
  color: #fff;
}

/* Bare <input class="edd-submit"> carries none of Flatsome's .button
   geometry, so it rendered 134x35px, uppercase, 4px radius. */
body input[type="submit"].edd-submit,
body input[type="submit"].edd_submit,
body .edd-submit {
  box-sizing: border-box;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid var(--wn-action);
  border-radius: var(--wn-radius-btn);
  background: var(--wn-action);
  color: #fff;
  font-family: var(--wn-font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

body input[type="submit"].edd-submit:hover,
body input[type="submit"].edd_submit:hover,
body .edd-submit:hover {
  background: var(--wn-action-hover);
  border-color: var(--wn-action-hover);
  color: #fff;
}

/* EDD's price/label spans inherit text colour; keep them white on the fill. */
body .edd-submit .edd-add-to-cart-label,
body .edd-submit .edd-loading-ajax {
  color: inherit;
}

/* ==========================================================================
   12. BUTTON STATES
   --------------------------------------------------------------------------
   Every variant gets a distinct hover (fill darkens one step), a visible
   :active, and a :focus-visible ring. All state pairs verified >= 4.5:1 for
   the label.
   ========================================================================== */

body .button.primary:hover,
body .button.primary:focus-visible {
  background: var(--wn-action-hover);
  border-color: var(--wn-action-hover);
  color: #fff;
}

body .button.primary:active {
  background: var(--wn-action-active);
  border-color: var(--wn-action-active);
}

/* Header account button (Login). Flatsome ships
   .header-button .plain.is-outline:not(:hover){color:#999} = 2.85:1.
   Matching its specificity is required; the sheet loading later wins. */
.header-button .plain.is-outline:not(:hover) {
  color: var(--wn-neutral-700);
}

.nav-dark .header-button .plain.is-outline:not(:hover) {
  color: #fff;
}

/* Flatsome fills this variant with the primary colour on hover, so the label
   must stay light or the pairing drops to ~1.1:1. */
.header-button .plain.is-outline:hover,
.header-button .plain.is-outline:focus-visible {
  background: var(--wn-brand-50);
  border-color: var(--wn-brand-200);
  color: var(--wn-brand-700);
}

/* .white buttons sit on photographs/coloured bands; keep the label dark. */
body .button.white {
  color: var(--wn-neutral-700);
  background: #fff;
}

body .button.white:hover,
body .button.white:focus-visible {
  background: #fff;
  color: var(--wn-brand-700);
}

/* ==========================================================================
   13. ACCOUNT — ORDER TABLES
   ========================================================================== */

.wn-orders {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 1rem;
}

.wn-orders thead th {
  padding: 0.75rem;
  background: var(--wn-neutral-50);
  border-bottom: 1px solid var(--wn-border);
  color: var(--wn-neutral-700);
  font-size: var(--wn-text-small);
  font-weight: 700;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.wn-orders tbody td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--wn-border);
  color: var(--wn-neutral-700);
  vertical-align: top;
}

.wn-orders tbody tr:hover {
  background: var(--wn-neutral-50);
}

.wn-orders__name {
  display: block;
  color: var(--wn-neutral-900);
  font-weight: 700;
  line-height: 1.35;
}

.wn-orders__meta {
  display: block;
  margin-top: 0.125rem;
  color: var(--wn-neutral-500);
  font-size: var(--wn-text-small);
}

.wn-orders__date {
  white-space: nowrap;
}

.wn-orders__amount {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--wn-neutral-900);
}

.wn-orders__link {
  color: var(--wn-brand-700);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.wn-orders__link:hover,
.wn-orders__link:focus-visible {
  color: var(--wn-brand-800);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.wn-orders__muted {
  color: var(--wn-neutral-400);
}

/* Status badges — colour + dot + written label, never colour alone. */
.wn-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.wn-status::before {
  content: "";
  flex: 0 0 auto;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: currentColor;
}

.wn-status--success { background: var(--wn-success-50); color: var(--wn-success-700); }
.wn-status--warning { background: var(--wn-warning-50); color: var(--wn-warning-700); }
.wn-status--danger  { background: var(--wn-danger-50);  color: var(--wn-danger-700); }
.wn-status--neutral { background: var(--wn-neutral-100); color: var(--wn-neutral-600); }

/* Mobile: collapse the table into stacked cards. */
@media (max-width: 767px) {
  .wn-orders,
  .wn-orders tbody,
  .wn-orders tr,
  .wn-orders td {
    display: block;
    width: 100%;
  }

  .wn-orders thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .wn-orders tbody tr {
    margin-bottom: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--wn-border);
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: var(--wn-shadow-card);
  }

  .wn-orders tbody td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0;
    border: 0;
    text-align: left;
  }

  .wn-orders tbody td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--wn-neutral-500);
    font-size: var(--wn-text-small);
  }

  /* Product cell is the card title, so it spans and drops its label. */
  .wn-orders tbody td.wn-orders__product {
    display: block;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--wn-border);
  }

  .wn-orders tbody td.wn-orders__product::before {
    content: none;
  }

  .wn-orders tbody td.wn-orders__amount {
    text-align: right;
  }

  /* License Keys column comes from EDD Software Licensing (no data-label). */
  .wn-orders tbody td.edd_license_key::before {
    content: "License keys";
  }
}

/* ==========================================================================
   14. ACCOUNT — PROFILE EDITOR FORM
   --------------------------------------------------------------------------
   EDD renders each field as <p id="edd_profile_*_wrap"> inside a <fieldset>.
   Desktop inputs were 1046x39px — full content width and under the 44px
   touch minimum.
   ========================================================================== */

#edd_profile_editor_form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin: 0 0 2.5rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

#edd_profile_editor_form legend {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0 0 0.25rem;
  padding: 0;
  color: var(--wn-neutral-900);
  font-family: var(--wn-font-display);
  font-size: var(--wn-step-2);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
}

#edd_profile_editor_form p[id$="_wrap"] {
  margin: 0;
  min-width: 0;
}

/* Address lines are long-form: give them the full row.
   Real IDs come from EDD's profile editor markup. */
#edd_profile_billing_address_line_1_wrap,
#edd_profile_billing_address_line_2_wrap {
  grid-column: 1 / -1;
}

/* Password pair reads better stacked than half-width side by side.
   Needs the parent ID to outrank the generic fieldset grid rule. */
#edd_profile_editor_form #edd_profile_password_fieldset {
  grid-template-columns: 1fr;
}

#edd_profile_submit_fieldset {
  grid-template-columns: 1fr;
  margin-bottom: 0;
}

#edd_profile_editor_form label {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--wn-neutral-700);
  font-size: var(--wn-text-small);
  font-weight: 700;
}

#edd_profile_editor_form input[type="text"],
#edd_profile_editor_form input[type="email"],
#edd_profile_editor_form input[type="password"],
#edd_profile_editor_form input[type="tel"],
#edd_profile_editor_form select,
#edd_profile_editor_form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--wn-border-strong);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--wn-neutral-900);
  font-size: 1rem;
  line-height: 1.4;
}

#edd_profile_editor_form input:focus,
#edd_profile_editor_form select:focus,
#edd_profile_editor_form textarea:focus {
  outline: 3px solid var(--wn-focus);
  outline-offset: 1px;
  border-color: var(--wn-neutral-900);
}

@media (max-width: 767px) {
  #edd_profile_editor_form fieldset {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   15. ACCOUNT — TABS (Flatsome tabgroup)
   --------------------------------------------------------------------------
   Active state was a colour shift only: rgba(74,74,74,.85) -> rgba(18,18,18,.85),
   with no underline or background, so the current tab was hard to find.
   ========================================================================== */

.tabbed-content > h4.uppercase,
.tabbed-content > .uppercase {
  margin: 0 0 1rem;
  color: var(--wn-neutral-900);
  font-family: var(--wn-font-display);
  font-size: var(--wn-step-4);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
}

.tabbed-content .nav-simple {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0 0 2rem;
  padding: 0;
  border-bottom: 1px solid var(--wn-border);
  list-style: none;
}

.tabbed-content .nav-simple > li {
  margin: 0;
}

.tabbed-content .nav-simple > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  color: var(--wn-neutral-600);
  font-family: var(--wn-font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}

.tabbed-content .nav-simple > li > a:hover {
  color: var(--wn-brand-700);
}

.tabbed-content .nav-simple > li.active > a,
.tabbed-content .nav-simple > li > a[aria-selected="true"] {
  color: var(--wn-neutral-900);
  border-bottom-color: var(--wn-brand-600);
}

/* ==========================================================================
   16. TEXT OVER IMAGES
   --------------------------------------------------------------------------
   The hero tagline measured 4.24:1 as #f1f1f1 over the banner photograph —
   marginal, and it varies with the image underneath. White plus a soft shadow
   holds up across the full width. Raise the banner overlay opacity in UX
   Builder (bg_overlay) if you want to remove the dependency on the shadow.
   ========================================================================== */

.banner .text-box p,
.text-box.dark p {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.banner .text-box h1,
.banner .text-box h2 {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* Outline buttons placed on banner photography have no guaranteed background,
   so their contrast varies with the image underneath (WCAG 1.4.3). Flatsome
   forces `background:transparent !important` here; a translucent scrim makes
   the pairing deterministic instead of image-dependent.
   White on the resulting scrim stays above 8:1 over any mid-tone photo. */
.banner .button.is-outline,
.text-box .button.is-outline {
  background: rgba(16, 24, 40, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
  color: #fff !important;
}

.banner .button.is-outline:hover,
.banner .button.is-outline:focus-visible,
.text-box .button.is-outline:hover,
.text-box .button.is-outline:focus-visible {
  background: rgba(16, 24, 40, 0.78) !important;
  color: #fff !important;
}

/* Accordion/table toggle buttons sit at 43px — nudge to the 44px minimum. */
.toggle,
button.toggle {
  min-height: 44px;
  min-width: 44px;
}

/* ==========================================================================
   17. MOBILE TAB SCROLL
   --------------------------------------------------------------------------
   At 390px the four account tabs wrapped to two rows, pushing "Downloads"
   onto its own line. A single scrollable row keeps the tab bar recognisable.
   ========================================================================== */

@media (max-width: 767px) {
  .tabbed-content .nav-simple {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabbed-content .nav-simple::-webkit-scrollbar {
    display: none;
  }

  .tabbed-content .nav-simple > li {
    flex: 0 0 auto;
  }
}

/* ==========================================================================
   18. BUTTON WIDTH CONSISTENCY
   --------------------------------------------------------------------------
   Flatsome's `expand` attribute stretches a button to the full container, so
   sibling CTAs in the same product row measured 185px / 245px / 495px. A
   shared min-width gives desktop rows one button size; mobile keeps full
   width, which is better for tapping.
   ========================================================================== */

body .button.expand {
  /* These buttons sit in a flex column whose default align-items:stretch
     overrides width:auto, so explicitly opt out of the stretch. */
  /* Flatsome declares .expand{width:100% !important}, so this needs
     !important as well. Box-sizing and min-width stay unforced. */
  width: fit-content !important;
  min-width: 14rem;
  max-width: 100%;
  align-self: flex-start;
}

@media (max-width: 767px) {
  body .button.expand {
    width: 100% !important;
    min-width: 0;
  }
}

/* ==========================================================================
   19. HEADER NAVIGATION
   --------------------------------------------------------------------------
   Nav was Lato 700 at 12.8px, UPPERCASE with tracking — the last surface still
   on the old type system. Family and casing now come from the theme mods
   (type_nav = Manrope, nav_uppercase = false); size and spacing are set here.
   ========================================================================== */

.header-nav > li > a,
.header-nav > li > button,
.nav > li > a,
.nav > li > button {
  font-family: var(--wn-font-display);
  font-size: 0.9375rem; /* 15px */
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--wn-neutral-700);
}

.header-nav > li > a:hover,
.header-nav > li > a:focus-visible,
.nav > li > a:hover {
  color: var(--wn-brand-700);
}

/* ==========================================================================
   20. FOOTER
   --------------------------------------------------------------------------
   Flatsome ships `.absolute-footer,html{background:#4d4d4d}` — a grey band that
   sat under the new navy footer and left a grey field below short pages.
   Footer links were 12.24px UPPERCASE with 0.6px tracking.
   ========================================================================== */

html,
.footer-wrapper,
.absolute-footer {
  background-color: var(--wn-neutral-900);
}

.absolute-footer {
  border-top: 1px solid var(--wn-neutral-700);
  color: var(--wn-neutral-400);
}

.absolute-footer a,
.footer-wrapper .nav a,
.footer-wrapper .menu a,
.footer-wrapper .widget_nav_menu a {
  color: var(--wn-neutral-300);
  font-family: var(--wn-font-body);
  font-size: 0.9375rem;
  letter-spacing: 0;
  text-transform: none;
}

.absolute-footer a:hover,
.absolute-footer a:focus-visible,
.footer-wrapper .nav a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ==========================================================================
   21. LICENSE MANAGEMENT VIEW
   --------------------------------------------------------------------------
   EDD Software Licensing renders this view straight into .content-area with no
   container, so the table started at x=0 and spanned the full viewport.
   ========================================================================== */

.content-area:has(> .edd_sl_table) {
  max-width: 69.375rem;
  margin-inline: auto;
  padding: 2.5rem 1.5rem 3rem;
}

.edd_sl_table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.edd_sl_table thead th {
  padding: 0.75rem;
  background: var(--wn-neutral-50);
  border-bottom: 1px solid var(--wn-border);
  color: var(--wn-neutral-700);
  font-size: var(--wn-text-small);
  font-weight: 700;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}

.edd_sl_table tbody td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--wn-border);
  color: var(--wn-neutral-700);
  vertical-align: middle;
}

.edd_sl_table tbody tr:hover {
  background: var(--wn-neutral-50);
}

/* The "show key" control was a bare 16px icon, so the KEY column read as an
   empty cell. Give it a visible label; the anchor and its behaviour are
   untouched. */
.edd_sl_show_key {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--wn-border-strong);
  border-radius: 0.375rem;
  color: var(--wn-brand-700);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.edd_sl_show_key img {
  display: none;
}

.edd_sl_show_key::after {
  content: "Show key";
}

.edd_sl_show_key:hover,
.edd_sl_show_key:focus-visible {
  background: var(--wn-brand-50);
  border-color: var(--wn-brand-200);
  color: var(--wn-brand-800);
}

/* Seven columns will not fit a phone; scroll the table rather than crush it. */
@media (max-width: 767px) {
  .content-area:has(> .edd_sl_table) {
    padding: 1.5rem 1rem 2rem;
  }

  .edd_sl_table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

/* ==========================================================================
   22. NAVIGATION DROPDOWNS
   --------------------------------------------------------------------------
   Dropdown panels were a square white box with `0 0 15px rgba(0,0,0,.15)`,
   Lato 16px links, and the Groundhogg menu ran 753px tall — taller than a
   1366x768 laptop viewport, with no scroll affordance.
   ========================================================================== */

.header-nav .nav-dropdown,
.nav-dropdown {
  padding: 0.5rem;
  border: 1px solid var(--wn-border);
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px -16px rgba(16, 24, 40, 0.24);
  max-height: 70vh;
  overflow-y: auto;
}

.nav-dropdown > li > a,
.nav-dropdown .nav-column > li > a {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--wn-neutral-700);
  font-family: var(--wn-font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.nav-dropdown > li > a:hover,
.nav-dropdown > li > a:focus-visible,
.nav-dropdown .nav-column > li > a:hover {
  background: var(--wn-neutral-50);
  color: var(--wn-brand-700);
}

/* ==========================================================================
   23. CHECKOUT
   --------------------------------------------------------------------------
   Single-column form at 1050px with 703px inputs left a 350px dead strip to
   the right of every field; the disabled Purchase button was the brand red at
   50% opacity (a washed-out pink that reads as broken); and the renewal toggle
   was styled as a primary CTA competing with Purchase.
   ========================================================================== */

/* Comfortable reading measure for the whole checkout column. */
.content-area:has(#edd_purchase_form) .row > .col {
  max-width: 46rem;
  margin-inline: auto;
}

/* Fields fill the column instead of stopping short of their card. */
/* EDD declares #edd_checkout_form_wrap input.edd-input{width:70%}, so the
   selector has to match it exactly to win on source order. */
#edd_checkout_form_wrap input.edd-input,
#edd_checkout_form_wrap select,
#edd_checkout_form_wrap textarea,
#edd_purchase_form input.edd-input,
#edd_purchase_form select,
#edd_purchase_form textarea {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  border-radius: 0.5rem;
  border-color: var(--wn-border-strong);
}

#edd_purchase_form .edd-input:focus,
#edd_purchase_form select:focus {
  outline: 3px solid var(--wn-focus);
  outline-offset: 1px;
  border-color: var(--wn-neutral-900);
}

/* Disabled Purchase: a neutral state, not semi-transparent brand red.
   EDD applies opacity:.5, which cannot reach AA over the page background. */
/* EDD sets opacity:.5 via a 3-ID selector and Stripe re-applies it inline,
   so opacity is the one property here that genuinely needs !important. */
body #edd-purchase-button:disabled,
body #edd-purchase-button[disabled],
body .edd-submit:disabled,
body .edd-submit[disabled] {
  opacity: 1 !important;
  background: var(--wn-neutral-200);
  border-color: var(--wn-neutral-200);
  color: var(--wn-neutral-600);
  cursor: not-allowed;
}

/* The renewal form toggle is a disclosure control, not the page's main action. */
body #edd_sl_show_renewal_form {
  background: transparent;
  border-color: var(--wn-border-strong);
  color: var(--wn-neutral-700);
}

body #edd_sl_show_renewal_form:hover,
body #edd_sl_show_renewal_form:focus-visible {
  background: var(--wn-neutral-50);
  border-color: var(--wn-neutral-400);
  color: var(--wn-neutral-900);
}

/* Accepted-card icons were floating with no label, directly above Personal
   Info, so they read as part of that section. */
.edd-payment-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.edd-payment-icons::before {
  content: "We accept";
  color: var(--wn-neutral-500);
  font-size: 0.875rem;
  font-weight: 700;
}

/* Cancelling a renewal is a dismiss action, but EDD renders it with the same
   .edd-submit primary styling as Purchase — so the checkout shows two red CTAs
   with opposite outcomes. Demote it to a danger outline. */
body input.edd-submit[value="Cancel License Renewal"],
body #edd-cancel-license-renewal {
  background: #fff;
  border-color: var(--wn-border-strong);
  color: var(--wn-danger-700);
}

body input.edd-submit[value="Cancel License Renewal"]:hover,
body input.edd-submit[value="Cancel License Renewal"]:focus-visible,
body #edd-cancel-license-renewal:hover {
  background: var(--wn-danger-50);
  border-color: var(--wn-danger-700);
  color: var(--wn-danger-700);
}

/* ==========================================================================
   24. CONTENT TABLES
   --------------------------------------------------------------------------
   Tables written in page/post content had no width guard, so a wide table
   pushed past the container. Wrap them in a scroll region rather than
   shrinking the text.
   ========================================================================== */

.entry-content table,
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 1rem;
}

.entry-content th,
.entry-content td,
.page-content th,
.page-content td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--wn-border);
  text-align: left;
  vertical-align: top;
}

.entry-content thead th,
.page-content thead th {
  background: var(--wn-neutral-50);
  color: var(--wn-neutral-900);
  font-size: var(--wn-text-small);
  font-weight: 700;
}

@media (max-width: 767px) {
  .entry-content table,
  .page-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ==========================================================================
   25. SECTION TITLES ([title] shortcode)
   --------------------------------------------------------------------------
   Flatsome renders [title] as an h3 with .section-title span clipped to
   uppercase + tracking, which reads as a different design language to the
   rest of the type system.
   ========================================================================== */

.section-title {
  font-family: var(--wn-font-display);
}

.section-title span {
  text-transform: none;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.section-title small {
  text-transform: none;
  letter-spacing: 0;
}

/* ==========================================================================
   26. CONTEXTUAL RELATED LINKS (blog posts)
   --------------------------------------------------------------------------
   Appended by inc/related.php at template level, so no post content is edited.
   ========================================================================== */

.wn-related {
  margin: 2.5rem 0 0;
  padding: 1.5rem;
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius-card);
  background: var(--wn-neutral-50);
}

.wn-related__title {
  margin: 0 0 1rem;
  font-size: var(--wn-step-1);
  font-weight: 700;
  color: var(--wn-neutral-900);
}

.wn-related__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .wn-related__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.wn-related__item {
  margin: 0;
}

.wn-related__link {
  display: inline-block;
  margin-bottom: 0.25rem;
  color: var(--wn-brand-700);
  font-family: var(--wn-font-display);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.wn-related__link:hover,
.wn-related__link:focus-visible {
  color: var(--wn-brand-800);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.wn-related__blurb {
  display: block;
  color: var(--wn-neutral-600);
  font-size: var(--wn-text-small);
  line-height: 1.5;
}
