/* ==========================================================================
   PlugStack — tokens
   Colour and type borrowed from the WisdmLabs design system document.
   ========================================================================== */
:root {
  --ps-red: #C02026;
  --ps-red-dark: #8B1D21;
  --ps-red-wash: rgba(192, 32, 38, .18);
  --ps-red-tint: #FCECED;              /* red text on this = 5.28:1 */
  --ps-red-line: rgba(192, 32, 38, .28);
  --ps-ink: #1A1A1A;
  --ps-white: #FFFFFF;
  --ps-soft: #F5F5F5;
  --ps-slate: #E2E8F0;
  --ps-muted: #666666;
  --ps-light: #6E757E;            /* 4.66:1 on white — AA at any size */
  --ps-free-bg: #DCFCE7;
  --ps-free-ink: #15803D;

  --ps-radius-sm: 4px;
  --ps-radius-md: 14px;
  --ps-radius-lg: 16px;
  --ps-radius-pill: 999px;

  --ps-shadow-card: 0 8px 24px rgba(26, 26, 26, .09);
  --ps-shadow-search: 0 1px 2px rgba(26, 26, 26, .04);

  --ps-font-display: 'Montserrat', sans-serif;
  --ps-font-body: 'Inter', sans-serif;

  /* 14px top gap + the 54px compressed capsule: what sticky children clear. */
  --ps-nav-stuck: 74px;

  --ps-container: 1520px;
  --ps-gutter: clamp(20px, 3.6vw, 56px);
}

/* ==========================================================================
   Escape Astra's 1240px container so full-bleed sections reach the viewport
   edges. Scoped to our own templates — Woo/account pages keep Astra's layout.
   ========================================================================== */
.home .site-content > .ast-container,
.tax-plugin_category .site-content > .ast-container,
.search-results .site-content > .ast-container,
.single-plugin .site-content > .ast-container {
  max-width: 100%;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  margin-left: 0;
  margin-right: 0;
}

/* ==========================================================================
   Base
   ========================================================================== */
.plugstack-main, .plugstack-single {
  font-family: var(--ps-font-body);
  color: var(--ps-ink);
}

.plugstack-main *, .plugstack-single * { box-sizing: border-box; }

.plugstack-wrap {
  max-width: var(--ps-container);
  margin: 0 auto;
  padding-left: var(--ps-gutter);
  padding-right: var(--ps-gutter);
}

.plugstack-main h1, .plugstack-main h2, .plugstack-main h3, .plugstack-main h4,
.plugstack-single h1 {
  font-family: var(--ps-font-display);
  letter-spacing: -0.01em;
}

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

.plugstack-skip-link.screen-reader-text:focus {
  position: fixed !important;
  width: auto; height: auto;
  clip: auto;
  top: 12px; left: 12px;
  z-index: 9999;
  background: var(--ps-ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--ps-radius-sm);
  font-weight: 600;
}

.plugstack-main a:focus-visible,
.plugstack-main button:focus-visible,
.plugstack-main input:focus-visible,
.plugstack-single a:focus-visible,
.plugstack-single button:focus-visible {
  outline: 2px solid var(--ps-red);
  outline-offset: 2px;
}

/* ==========================================================================
   Header logo
   ========================================================================== */
.plugstack-branding { display: flex; align-items: center; }
.plugstack-branding a { text-decoration: none; display: inline-flex; }
.plugstack-logo { display: inline-flex; align-items: center; gap: 9px; }
.plugstack-logo__word {
  font-family: var(--ps-font-display);
  font-weight: 700;
  /* Sized against the 22px mark so the lockup reads as one unit. */
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.plugstack-hero {
  position: relative;
  isolation: isolate;            /* own stacking context so the wash can sit behind text */
  overflow: clip;                /* clips the wash without the old overflow:hidden text-cut bug */
  border-bottom: 1px solid var(--ps-slate);
  background:
    /* warm light from behind the stack, top right */
    radial-gradient(96% 86% at 92% 12%, rgba(192, 32, 38, .055), transparent 60%),
    radial-gradient(circle at 1px 1px, var(--ps-slate) 1px, transparent 0) 0 0/24px 24px,
    var(--ps-white);
}

.plugstack-hero::before {
  content: "";
  position: absolute;
  left: -10vw;
  bottom: -60%;
  width: min(720px, 65vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 32, 38, .10), transparent 68%);
  pointer-events: none;
  z-index: -1;
}

/* Backdrop: exploded isometric plate stack (assets/img/hero-stack.svg),
   anchored right and bleeding off the edge. Masked so it fades out before it
   reaches the headline column — the copy keeps a flat near-white ground and
   its contrast is unchanged. The frosted category tiles sit over it. */
.plugstack-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: 0;
  /* auto 100% scales the drawing to the hero's height, so it is never cropped
     vertically however tall the hero gets. */
  background: url("../img/hero-stack.svg?v=1785227229") right center / auto 100% no-repeat;
  -webkit-mask-image: linear-gradient(to left, #000 64%, transparent 100%);
          mask-image: linear-gradient(to left, #000 64%, transparent 100%);
}

.plugstack-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;            /* shared top edge instead of optical drift */
  padding-top: clamp(48px, 6.5vw, 88px);
  padding-bottom: clamp(48px, 6.5vw, 88px);
}

/* Grid children must be free to shrink below min-content. */
.plugstack-hero__copy,
.plugstack-hero__tiles { min-width: 0; }

.plugstack-hero__title {
  font-size: clamp(30px, 3.3vw, 46px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ps-ink);
  text-wrap: balance;
}

.plugstack-hero__line1,
.plugstack-hero__line2 { display: block; }
.plugstack-hero__line2 { color: var(--ps-light); font-weight: 400; }

/* Highlight drawn as a background gradient so it survives line wraps and
   needs no negative z-index (the old ::after painted behind the hero). */
.plugstack-hero__mark {
  background-image: linear-gradient(to top, transparent 0.04em, var(--ps-red-wash) 0.04em, var(--ps-red-wash) 0.34em, transparent 0.34em);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.plugstack-hero__sub {
  font-size: clamp(15px, 1vw, 17px);
  color: #4f4f4f;
  margin: 22px 0 0;
  max-width: 48ch;
  line-height: 1.6;
}

/* --- Search: soft filled field, no hard outline box --- */
.plugstack-search {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ps-soft);
  border: 1px solid transparent;
  border-radius: var(--ps-radius-pill);
  padding: 8px 8px 8px 22px;
  box-shadow: var(--ps-shadow-search);
  max-width: 620px;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.plugstack-search:focus-within {
  background: var(--ps-white);
  border-color: var(--ps-red);
  box-shadow: 0 0 0 4px rgba(192, 32, 38, .12);
}

.plugstack-search__icon {
  display: inline-flex;
  color: var(--ps-light);
  flex: none;
}

.plugstack-search__input {
  flex: 1 1 auto;
  min-width: 0;                  /* lets the field shrink instead of truncating */
  border: 0;
  background: transparent;
  font-family: var(--ps-font-body);
  font-size: 16px;
  color: var(--ps-ink);
  padding: 8px 0;
}

/* --ps-light is 4.27:1 on the --ps-soft field, under AA for normal text;
   --ps-muted is 5.27:1 on the same fill. */
.plugstack-search__input::placeholder { color: var(--ps-muted); opacity: 1; }
.plugstack-search__input:focus { outline: none; }
.plugstack-search__input::-webkit-search-cancel-button { cursor: pointer; }

.plugstack-search__submit { flex: none; padding: 13px 26px; }

/* --- Category tiles --- */
.plugstack-hero__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.plugstack-tile {
  border: 1px solid var(--ps-slate);
  border-radius: var(--ps-radius-md);
  padding: 20px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.plugstack-tile:hover, .plugstack-tile:focus-visible {
  border-color: var(--ps-red);
  box-shadow: var(--ps-shadow-card);
  transform: translateY(-2px);
}

.plugstack-tile b {
  font-family: var(--ps-font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.plugstack-tile__icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: #FDECEC;
  color: var(--ps-red);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}

.plugstack-tile__icon--ink { background: var(--ps-soft); color: var(--ps-ink); }

.plugstack-tile--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}

.plugstack-tile__arrow { color: var(--ps-red); font-weight: 700; font-size: 16px; margin-left: auto; }

@media (max-width: 900px) {
  .plugstack-hero__inner { grid-template-columns: 1fr; }
  .plugstack-hero__sub { max-width: none; }

  /* Stacked layout leaves no clear right column, so the drawing retreats to
     the bottom corner instead of sitting under the tiles. */
  .plugstack-hero::after {
    background-size: auto 62%;
    background-position: right bottom;
    -webkit-mask-image: linear-gradient(to left, #000 30%, transparent 92%);
            mask-image: linear-gradient(to left, #000 30%, transparent 92%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .plugstack-tile, .plugstack-search { transition: none; }
  .plugstack-tile:hover { transform: none; }
}


/* Astra styles input[type="search"] globally; the field must stay flush
   inside the pill, so these need to win on specificity. */
.plugstack-search input.plugstack-search__input[type="search"] {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 8px 0;
  margin: 0;
  height: auto;
  line-height: 1.5;
  color: var(--ps-ink);
}

.plugstack-search input.plugstack-search__input[type="search"]:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}
@media (max-width: 560px) {
  .plugstack-search { padding-left: 16px; gap: 8px; }
  .plugstack-search__submit { padding: 12px 18px; }
}
/* ==========================================================================
   Compact page head (category archive / search results)
   ========================================================================== */
.plugstack-pagehead {
  border-bottom: 1px solid var(--ps-slate);
  padding: clamp(32px, 4vw, 56px) 0 clamp(24px, 3vw, 36px);
  background: var(--ps-white);
}
.plugstack-pagehead__back { color: var(--ps-muted); text-decoration: none; font-size: 14px; }
.plugstack-pagehead__back:hover { color: var(--ps-red); }
.plugstack-pagehead__title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  margin: 14px 0 0;
  letter-spacing: -0.02em;
}
.plugstack-pagehead__note { color: var(--ps-muted); margin: 10px 0 0; }

/* ==========================================================================
   Filter rail
   ========================================================================== */
.plugstack-rail {
  position: sticky;
  top: var(--ps-nav-stuck);
  z-index: 5;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ps-slate);
  padding: 14px 0;
}

.plugstack-rail__inner {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.plugstack-rail__inner::-webkit-scrollbar { display: none; }

@media (min-width: 1100px) {
  .plugstack-rail__inner {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: center;
  }
}

.plugstack-pill {
  border: 1px solid var(--ps-slate);
  border-radius: var(--ps-radius-pill);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #444;
  white-space: nowrap;
  text-decoration: none;
  flex: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.plugstack-pill:hover { border-color: var(--ps-red); color: var(--ps-red); }

.plugstack-pill.is-active {
  background: var(--ps-red);
  border-color: var(--ps-red);
  color: #fff;
}
.plugstack-pill.is-active:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .plugstack-pill { transition: none; }
}

/* Keep the sticky rail clear of the logged-in admin bar. */
.admin-bar .plugstack-rail { top: calc(var(--ps-nav-stuck) + 32px); }
@media screen and (max-width: 782px) {
  .admin-bar .plugstack-rail { top: calc(var(--ps-nav-stuck) + 46px); }
}
/* ==========================================================================
   Catalogue grid
   ========================================================================== */
.plugstack-catalogue { padding: clamp(32px, 4vw, 48px) 0 clamp(56px, 7vw, 88px); }

.plugstack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.plugstack-card {
  border: 1px solid var(--ps-slate);
  border-radius: var(--ps-radius-lg);
  padding: 24px;
  background: var(--ps-white);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: box-shadow .18s ease;
}

.plugstack-card[hidden] { display: none; }

.plugstack-card::before {
  content: "";
  position: absolute;
  top: -1px; left: 24px; right: 24px;
  height: 3px;
  background: var(--ps-red);
  border-radius: 0 0 3px 3px;
  opacity: 0;
  transition: opacity .18s ease;
}

.plugstack-card:hover, .plugstack-card:focus-within { box-shadow: var(--ps-shadow-card); }
.plugstack-card:hover::before, .plugstack-card:focus-within::before { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .plugstack-card, .plugstack-card::before { transition: none; }
}

.plugstack-card__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Free badge keeps the right edge now that the logo holds the left. */
.plugstack-card__top .plugstack-card__free { margin-left: auto; }

.plugstack-card__logo {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ps-slate);
  border-radius: 11px;
  background: var(--ps-white);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.plugstack-card__logo-img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 5px;
  box-sizing: border-box;
  object-fit: contain;
}

/* No logo yet: initials, so ten pending plugins still read as ten products. */
.plugstack-card__logo--mono { background: var(--ps-soft); }

.plugstack-card__logo-mono {
  font-family: var(--ps-font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ps-muted);
}

.plugstack-card__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ps-red);
}

.plugstack-card__free {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ps-free-ink);
  background: var(--ps-free-bg);
  border-radius: var(--ps-radius-sm);
  padding: 3px 8px;
  white-space: nowrap;
}

/* Plain text — the card's only link is the Visit plugin CTA in the footer. */
.plugstack-card__title {
  font-size: 18px;
  font-weight: 600;
  margin: 12px 0 8px;
  line-height: 1.3;
  color: var(--ps-ink);
}

.plugstack-card__desc {
  font-size: 14.5px;
  color: #5a5a5a;
  line-height: 1.6;
  flex: 1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plugstack-card__tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 18px; }

.plugstack-tag {
  background: var(--ps-soft);
  border-radius: var(--ps-radius-sm);
  padding: 4px 9px;
  font-size: 12px;
  color: #555;
}

/* min-height carries the CTA's 44px tap target and keeps the rule at the
   same height on every card in a row, CTA or "Coming soon". */
.plugstack-card__foot {
  border-top: 1px solid var(--ps-slate);
  padding-top: 10px;
  margin-top: auto;
  display: flex;
  align-items: center;
  min-height: 54px;
}

.plugstack-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ps-red-line);
  border-radius: var(--ps-radius-pill);
  background: var(--ps-red-tint);
  color: var(--ps-red);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* Fill inverts on hover — a shape change, not a colour-only cue. */
.plugstack-card__cta:hover,
.plugstack-card__cta:focus-visible {
  background: var(--ps-red);
  border-color: var(--ps-red);
  color: var(--ps-white);
  text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
  .plugstack-card__cta { transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
}

.plugstack-card__cta-arrow { font-size: 13px; }
.plugstack-card__cta:hover .plugstack-card__cta-arrow { transform: translate(1px, -1px); }

@media (prefers-reduced-motion: no-preference) {
  .plugstack-card__cta-arrow { transition: transform .18s ease; }
}

/* Status, not a control. Same pill family as the CTA but shorter and
   unsaturated, so it never reads as a button waiting to be pressed. */
.plugstack-card__soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--ps-slate);
  border-radius: var(--ps-radius-pill);
  background: var(--ps-soft);
  color: var(--ps-muted);
  font-size: 13px;
  font-weight: 500;
}

.plugstack-card__soon-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ps-light);
  flex: 0 0 auto;
}

/* ==========================================================================
   Empty state
   ========================================================================== */
.plugstack-empty[hidden] { display: none; }

.plugstack-empty__inner {
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--ps-slate);
  border-radius: var(--ps-radius-lg);
}

.plugstack-empty__inner h3 { margin: 0 0 8px; font-family: var(--ps-font-display); font-size: 20px; font-weight: 600; }
.plugstack-empty__inner p { margin: 0 0 20px; color: var(--ps-muted); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.plugstack-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--ps-radius-pill);
  padding: 14px 28px;
  font-family: var(--ps-font-body);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  min-height: 44px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.plugstack-btn--primary { background: var(--ps-red); color: #fff; border-color: var(--ps-red); }
.plugstack-btn--primary:hover { background: var(--ps-red-dark); border-color: var(--ps-red-dark); color: #fff; }

.plugstack-btn--ghost { background: transparent; color: var(--ps-ink); border-color: var(--ps-ink); }
.plugstack-btn--ghost:hover { background: var(--ps-ink); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .plugstack-btn { transition: none; }
}

/* ==========================================================================
   Single plugin page
   ========================================================================== */
/* Astra paints a pale site background; every PlugStack template is white. */
body.single-plugin,
body.home,
body.tax-plugin_category,
body.search-results { background: var(--ps-white); }

/* Astra reserves vertical space above the content area; our templates own
   their own top spacing, so remove it on PlugStack pages. */
.home .site-content,
.tax-plugin_category .site-content,
.search-results .site-content { margin-top: 0; padding-top: 0; }

.plugstack-single__inner { max-width: 780px; padding-top: 56px; padding-bottom: 80px; }
.plugstack-single__back { color: var(--ps-muted); text-decoration: none; font-size: 14px; }
.plugstack-single__back:hover { color: var(--ps-red); }
.plugstack-single__top { display: flex; gap: 10px; align-items: center; margin-top: 24px; }
.plugstack-single__title { font-size: clamp(28px, 4vw, 44px); font-weight: 700; margin: 14px 0 24px; letter-spacing: -0.02em; }
.plugstack-single__content { font-size: 16px; line-height: 1.7; color: #333; }
.plugstack-single__content p { margin: 0 0 16px; }
.plugstack-single__actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.plugstack-single__soon { color: var(--ps-muted); font-size: 14px; margin: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.plugstack-footer {
  border-top: 4px solid var(--ps-ink);
  background: var(--ps-white);
  font-family: var(--ps-font-body);
  color: var(--ps-ink);
  padding: clamp(40px, 5vw, 64px) 0 28px;
}

.plugstack-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.plugstack-footer__logo { display: inline-flex; text-decoration: none; }

.plugstack-footer__tagline {
  color: var(--ps-muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 14px 0 0;
  max-width: 34ch;
}

.plugstack-footer__heading {
  font-family: var(--ps-font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ps-ink);
  margin: 0 0 16px;
}

.plugstack-footer__col ul { list-style: none; margin: 0; padding: 0; }
.plugstack-footer__col li { margin: 0 0 11px; }

.plugstack-footer__col a {
  color: #555;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  transition: color .15s ease;
}

.plugstack-footer__col a:hover { color: var(--ps-red); }

/* A free plugin whose page isn't live yet: same rhythm as the links, no target. */
.plugstack-footer__pending {
  display: inline-block;
  color: #555;
  font-size: 14px;
  line-height: 1.5;
}

.plugstack-footer__pending-note { color: var(--ps-light); }

.plugstack-footer__col a:focus-visible,
.plugstack-footer__logo:focus-visible {
  outline: 2px solid var(--ps-red);
  outline-offset: 2px;
}

.plugstack-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(32px, 4vw, 52px);
  padding-top: 22px;
  border-top: 1px solid var(--ps-slate);
}

.plugstack-footer__bottom p { margin: 0; font-size: 13px; color: var(--ps-muted); }
.plugstack-footer__meta { color: var(--ps-light); }

@media (max-width: 900px) {
  .plugstack-footer__grid { grid-template-columns: 1fr 1fr; }
  .plugstack-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .plugstack-footer__grid { grid-template-columns: 1fr; }
  .plugstack-footer__bottom { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .plugstack-footer__col a { transition: none; }
}

/* ==========================================================================
   Astra chrome adjustments
   Astra generates these in inline CSS; the selectors below match its
   specificity and load later, so no !important is needed.
   ========================================================================== */

/* Astra gives #primary a 60px top margin above 1200px, which opens a gap
   between the header and the hero. Our templates own their own top spacing. */
.home #primary.site-main,
.tax-plugin_category #primary.site-main,
.search-results #primary.site-main,
.single-plugin #primary.site-main {
  margin-top: 0;
}

/* Astra paints its scroll-to-top button with the theme colour; PlugStack
   allows exactly one accent, so it comes back to red. */
#ast-scroll-top {
  background-color: var(--ps-red);
  color: #fff;
}

#ast-scroll-top:hover {
  background-color: var(--ps-red-dark);
}

/* ==========================================================================
   Header capsule

   A detached pill that stays put while the page scrolls beneath it. Uses
   position: sticky rather than fixed so the header keeps its box in normal
   flow — no body padding to compensate for, and nothing to re-sync when the
   capsule compresses.

   The bar carries the brand and the account link only, so it needs no
   breakpoint behaviour beyond a slightly shorter capsule on phones: there is
   nothing to collapse into a menu.
   ========================================================================== */

.ps-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
}

/* Zero-height probe: once it leaves the viewport the capsule is "stuck".
   Cheaper than a scroll listener (see assets/js/nav.js). */
.ps-nav__sentinel {
  height: 0;
  margin: 0;
  padding: 0;
}

.ps-nav__capsule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 10px 0 22px;
  border: 1px solid var(--ps-slate);
  border-radius: var(--ps-radius-pill);
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
          backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: 0 2px 10px rgba(26, 26, 26, .05);
}

/* Scrolled: tighter, more opaque, lifted off the page. */
.ps-nav.is-stuck .ps-nav__capsule {
  height: 54px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 10px 30px rgba(26, 26, 26, .10);
}

@media (prefers-reduced-motion: no-preference) {
  .ps-nav__capsule {
    transition: height .2s ease, background-color .2s ease, box-shadow .2s ease;
  }
}

.ps-nav__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: none;
}

.ps-nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.ps-nav__account {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--ps-slate);
  border-radius: var(--ps-radius-pill);
  background: var(--ps-white);
  font-family: var(--ps-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ps-ink);
  text-decoration: none;
  white-space: nowrap;
}

.ps-nav__account:hover {
  border-color: var(--ps-red);
  color: var(--ps-red);
}

.ps-nav__account:focus-visible,
.ps-nav__brand:focus-visible {
  outline: 2px solid var(--ps-red);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .ps-nav__capsule { height: 58px; padding: 0 10px 0 18px; }
  .ps-nav.is-stuck .ps-nav__capsule { height: 54px; }
}

/* Keep the capsule clear of the logged-in admin bar. */
.admin-bar .ps-nav { top: 32px; }

@media (max-width: 782px) {
  .admin-bar .ps-nav { top: 46px; }
}
