/*
Theme Name: MAQ.BIO
Theme URI: https://www.maq.bio/
Author: MAQ.BIO
Author URI: https://www.maq.bio/
Description: Lightweight MAQ.BIO editorial discovery with optional self-hosted member Passport and community integration. Native WordPress content preserved.
Version: 2.2.1
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: maqbio
Tags: blog, news, photography, portfolio, grid-layout, custom-logo, custom-menu, featured-images, block-styles, wide-blocks
*/

/* =========================================================
   MAQ.BIO — EASY DESIGN SETTINGS
   Change only these variables first. More instructions in
   CUSTOMIZATION-GUIDE.md. Only the optional clickable tag strip moves; all other UI avoids decorative animation.
   ========================================================= */
:root {
  --maq-background: #fff;
  --maq-text: #22221f;
  --maq-muted: #757570;
  --maq-accent: #77764c;
  --maq-border: #e7e7e2;
  --maq-soft: #f3f2ed;
  --maq-grid-gap: 15px;         /* Space between cards; try 12px-20px. */
  --maq-max-width: 1680px;     /* Max width for header/footer and wide media; Discover ignores this cap. */
  --maq-reading-width: 740px;  /* Comfortable article text width. */
  --maq-wide-width: 1100px;    /* Width of wide post images. */
  --maq-edge: clamp(18px, 1.5vw, 32px); /* Breathing room at both sides. */
  --maq-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --maq-cols: 7;               /* Maximum desktop columns; responsive overrides below. */
}

/* Base and screen-reader accessibility */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-wrap: break-word; }
body { margin: 0; min-width: 280px; color: var(--maq-text); background: var(--maq-background); font: 400 16px/1.6 var(--maq-font); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--maq-accent); outline-offset: 3px; }
img, svg, video { max-width: 100%; }
img { height: auto; }
button, input { font: inherit; }
button { cursor: pointer; }
::selection { background: #dedfc1; color: #202020; }
.screen-reader-text, .maq-skip-link:not(:focus) { position: absolute !important; overflow: hidden; width: 1px; height: 1px; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; clip-path: inset(50%); }
.maq-skip-link:focus { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 16px; color: #fff; background: #222; }
.maq-container { width: min(calc(100% - var(--maq-edge) * 2), var(--maq-max-width)); margin-inline: auto; }

/* Header — logo, menu and native search only. */
.maq-site-header { border-bottom: 1px solid var(--maq-border); }
.maq-header-inner { display: flex; align-items: center; min-height: 79px; gap: clamp(15px, 2.8vw, 47px); }
.maq-brand { flex: 0 0 auto; line-height: 1; }
.maq-brand-name { display: inline-block; font-size: 25px; font-weight: 800; letter-spacing: -.055em; white-space: nowrap; }
.maq-brand .custom-logo { display: block; width: auto; max-height: 52px; max-width: 190px; object-fit: contain; }
.maq-site-nav { flex: 1 1 auto; min-width: 0; }
.maq-menu, .maq-footer-menu { display: flex; gap: clamp(12px, 1.5vw, 26px); align-items: center; list-style: none; margin: 0; padding: 0; }
.maq-menu { overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.maq-menu li { margin: 0; padding: 0; }
.maq-menu a { display: inline-block; padding-block: 9px; color: #44443e; font-size: 12px; font-weight: 650; }
.maq-menu a:hover, .maq-menu .current-menu-item a, .maq-menu .current-cat a { color: var(--maq-accent); text-decoration: underline; text-underline-offset: 5px; }
.maq-header-search { flex: 0 0 160px; min-width: 0; }
.maq-search { display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--maq-border); padding: 5px 0; }
.maq-search svg { flex: none; color: var(--maq-muted); }
.maq-search input { width: 100%; min-width: 0; border: 0; outline-offset: 3px; background: transparent; font-size: 12px; color: var(--maq-text); }
.maq-search input::placeholder { color: var(--maq-muted); }

/* Feed / category / tag / search pages. */
.maq-main { padding-top: 30px; padding-bottom: 70px; }
/* MAQ.BIO v1.0.3 — FULL-WIDTH DISCOVER / ARCHIVES
   Only listing grids expand to the browser width. Reading pages stay comfortably narrow.
   Change --maq-edge (above) to control the small outer gutter.
   Remove this override to restore the old centered/max-width listing layout. */
main.maq-main.maq-container {
  width: calc(100% - (var(--maq-edge) * 2));
  max-width: none;
  margin-inline: var(--maq-edge);
}

.maq-list-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin: 0 0 25px; }
.maq-list-heading h1 { font-size: 13px; letter-spacing: .15em; font-weight: 750; text-transform: uppercase; margin: 0; }
.maq-archive-description { color: var(--maq-muted); font-size: 13px; }
.maq-archive-description p { margin: 0; }

/*
 * No-JS masonry: CSS columns. With JS, site.js enhances it to a true
 * CSS Grid whose row spans fit every card's natural height. No visual motion.
 */
.maq-grid { column-count: var(--maq-cols); column-gap: var(--maq-grid-gap); }
.maq-grid .maq-card { break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 var(--maq-grid-gap); vertical-align: top; }
.maq-grid.is-measured { display: grid; column-count: initial; grid-template-columns: repeat(var(--maq-cols), minmax(0, 1fr)); grid-auto-rows: 8px; gap: var(--maq-grid-gap); align-items: start; }
.maq-grid.is-measured .maq-card { display: block; margin: 0; min-width: 0; }
/* FEATURE CATEGORY: add the WordPress category "Feature" (slug: feature) to any Post.
   The entire card occupies TWO grid columns, including image, title, and hook.
   The fallback CSS-columns view uses normal one-column cards if JS is unavailable.
   Don't use grid-auto-flow: dense here; keeping reading/focus order is important. */
.maq-grid.is-measured .maq-card--featured { grid-column: span 2; }
.maq-card { min-width: 0; }
.maq-card-link { display: block; outline-offset: 4px; }
.maq-card-media, .maq-card-placeholder { overflow: hidden; background: var(--maq-soft); }
.maq-card-image { display: block; width: 100%; height: auto; }
.maq-card-caption { padding: 11px 2px 0; }
.maq-card-kicker { display: block; color: var(--maq-muted); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; font-weight: 680; line-height: 1.5; }
/* HOME CARD HOOK: font and spacing can be adjusted here. No animations. */
.maq-card-hook { margin: 5px 0 0; color: var(--maq-muted); font-size: clamp(11px, .83vw, 13px); line-height: 1.5; overflow-wrap: anywhere; }
body.home .maq-card-title { margin-top: 0; }
.maq-card-title { font-size: clamp(12px, .94vw, 15px); line-height: 1.45; margin: 4px 0 0; font-weight: 610; letter-spacing: -.012em; }
.maq-card-link:hover .maq-card-title { color: var(--maq-accent); text-decoration: underline; text-underline-offset: 3px; }
.maq-card-placeholder { min-height: 140px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 4/5; }
.maq-card-placeholder span { color: #6f6e66; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.maq-card-placeholder strong { font: 500 clamp(18px, 1.6vw, 29px)/1.14 Georgia, serif; letter-spacing: -.025em; }
.maq-empty { column-span: all; font-size: 14px; color: var(--maq-muted); }
.maq-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 20px; min-height: 60px; margin-top: 27px; font-size: 12px; color: var(--maq-muted); }
.maq-pagination a { display: inline-block; padding: 10px 14px; color: var(--maq-text); border: 1px solid var(--maq-border); }
.maq-pagination a:hover { background: var(--maq-soft); }
.maq-load-status { font-size: 12px; color: var(--maq-muted); }

/* Article / standalone Pages: readable editorial typography. */
.maq-entry { width: min(calc(100% - var(--maq-edge) * 2), var(--maq-wide-width)); margin: 0 auto; }
.maq-entry-header { margin-inline: auto; max-width: var(--maq-wide-width); }
.maq-entry-kicker { margin: 0 0 15px; color: var(--maq-accent); font-size: 11px; text-transform: uppercase; font-weight: 700; letter-spacing: .16em; }
.maq-entry-title { max-width: 940px; margin: 0 0 13px; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(34px, 5.3vw, 78px); line-height: 1.095; letter-spacing: -.044em; font-weight: 400; overflow-wrap: break-word; }
.maq-entry-meta { display: flex; gap: 10px; align-items: center; margin: 0 0 30px; color: var(--maq-muted); font-size: 12px; }
.maq-entry-meta a:hover { text-decoration: underline; }
.maq-entry-cover { margin: 22px 0 0; }
.maq-hero-image { display: block; height: auto; width: 100%; }
.maq-entry-cover figcaption { padding-top: 9px; font-size: 12px; color: var(--maq-muted); }
.maq-entry-content { width: min(100%, var(--maq-reading-width)); margin: 44px auto 0; font-size: clamp(16px, 1.15vw, 18px); line-height: 1.85; overflow-wrap: break-word; }
.maq-entry-content > :first-child { margin-top: 0; }
.maq-entry-content p { margin: 0 0 1.45em; }
.maq-entry-content h2, .maq-entry-content h3, .maq-entry-content h4 { line-height: 1.23; letter-spacing: -.025em; margin: 1.8em 0 .65em; }
.maq-entry-content h2 { font-size: clamp(26px, 3vw, 37px); }
.maq-entry-content h3 { font-size: clamp(21px, 2.3vw, 27px); }
.maq-entry-content h4 { font-size: 19px; }
.maq-entry-content a:not(.wp-block-button__link) { color: var(--maq-accent); text-decoration: underline; text-underline-offset: 3px; }
.maq-entry-content a:hover { color: var(--maq-text); }
.maq-entry-content figure { margin-top: 1.6em; margin-bottom: 1.8em; max-width: 100%; }
.maq-entry-content img { max-width: 100%; height: auto; }
.maq-entry-content figcaption { color: var(--maq-muted); font-size: 12px; line-height: 1.5; margin-top: 8px; }
.maq-entry-content blockquote { margin: 1.7em 0; padding: 0 0 0 22px; border-left: 3px solid var(--maq-accent); font: italic 400 1.25em/1.55 Georgia, serif; }
.maq-entry-content blockquote p { margin-bottom: .6em; }
.maq-entry-content ul, .maq-entry-content ol { padding-left: 1.5em; margin: 0 0 1.4em; }
.maq-entry-content li { margin-bottom: .4em; }
.maq-entry-content table { width: 100%; border-collapse: collapse; font-size: .9em; display: block; overflow-x: auto; }
.maq-entry-content th, .maq-entry-content td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--maq-border); }
.maq-entry-content pre { max-width: 100%; overflow-x: auto; padding: 15px; background: var(--maq-soft); font-size: 14px; }
.maq-entry-content iframe { max-width: 100%; }
.maq-entry-content .alignwide { max-width: none; width: min(calc(100vw - var(--maq-edge) * 2), var(--maq-wide-width)); position: relative; left: 50%; transform: translateX(-50%); }
.maq-entry-content .alignfull { max-width: none; width: min(calc(100vw - var(--maq-edge) * 2), var(--maq-max-width)); position: relative; left: 50%; transform: translateX(-50%); }
.maq-entry-content .wp-block-image img { display: block; }
.maq-entry-content .wp-block-cover { min-height: 260px; }
.maq-entry-content .wp-block-columns { gap: 24px; }
.maq-entry-tags { width: min(100%, var(--maq-reading-width)); margin: 38px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
.maq-entry-tags a { font-size: 12px; border: 1px solid var(--maq-border); padding: 5px 10px; }
.maq-entry-tags a:hover { border-color: var(--maq-accent); }
.maq-page-entry .maq-entry-title { font-size: clamp(36px, 5vw, 65px); }
.maq-page-entry .maq-entry-content { margin-top: 35px; }
.maq-recommendations { margin-top: clamp(55px, 7vw, 115px); padding-top: 25px; border-top: 1px solid var(--maq-border); }
.maq-recommendations > h2 { margin: 0 0 29px; font: 680 13px/1.4 var(--maq-font); letter-spacing: .13em; text-transform: uppercase; }
.maq-not-found { max-width: 720px; min-height: 55vh; }
.maq-not-found h1 { margin: 8px 0; font: 400 clamp(38px, 6vw, 68px)/1.15 Georgia, serif; }
.maq-not-found > p { color: var(--maq-muted); }
.maq-not-found .maq-search { max-width: 330px; }

/* Footer */
.maq-site-footer { border-top: 1px solid var(--maq-border); color: var(--maq-muted); font-size: 11px; }
.maq-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 77px; }
.maq-footer-inner p { margin: 0; }
.maq-footer-menu { gap: 17px; }
.maq-footer-menu a:hover { text-decoration: underline; }

/* =========================================================
   RESPONSIVE MASONRY COLUMNS — MAQ.BIO v1.0.5
   Never more than SEVEN columns, even on ultra-wide monitors.
   "Feature" cards can use TWO of those columns; on two-column
   mobile layouts, a featured card spans the entire row.
   Change --maq-cols here; JS masonry and no-JS columns agree.
   ========================================================= */
@media (min-width: 1780px) { :root { --maq-cols: 7; } }
@media (min-width: 1550px) and (max-width: 1779px) { :root { --maq-cols: 7; } }
@media (min-width: 1360px) and (max-width: 1549px) { :root { --maq-cols: 7; } }
@media (min-width: 1150px) and (max-width: 1359px) { :root { --maq-cols: 6; } }
@media (min-width: 980px) and (max-width: 1149px) { :root { --maq-cols: 5; } }
@media (min-width: 741px) and (max-width: 979px) { :root { --maq-cols: 4; --maq-grid-gap: 14px; } }
@media (max-width: 740px) {
  :root { --maq-cols: 2; --maq-edge: 15px; --maq-grid-gap: 12px; }
  .maq-header-inner { min-height: 65px; flex-wrap: wrap; row-gap: 0; padding-top: 11px; padding-bottom: 8px; }
  .maq-brand-name { font-size: 23px; }
  .maq-brand .custom-logo { max-height: 37px; max-width: 170px; }
  .maq-site-nav { order: 3; flex-basis: 100%; }
  .maq-menu { gap: 21px; }
  .maq-menu a { padding: 9px 0; font-size: 12px; }
  .maq-header-search { margin-left: auto; flex-basis: min(37%, 140px); }
  .maq-main { padding-top: 21px; padding-bottom: 50px; }
  .maq-list-heading { margin-bottom: 17px; }
  .maq-card-caption { padding-top: 8px; }
  .maq-card-kicker { font-size: 9px; }
  .maq-card-title { font-size: 12px; line-height: 1.38; }
  .maq-entry-title { font-size: clamp(33px, 7.8vw, 50px); }
  .maq-entry-content { margin-top: 27px; font-size: 16px; }
  .maq-recommendations { margin-top: 58px; }
  .maq-footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 20px; }
}
@media (max-width: 370px) { :root { --maq-cols: 1; } .maq-card-title { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Narrowest one-column screens cannot span two columns. */
@media (max-width: 370px) {
  .maq-grid.is-measured .maq-card--featured { grid-column: span 1; }
}

/* =========================================================
   MAQ.BIO v1.0.7 — SEARCH LOGO / PINTEREST CARDS / ADS / TAGS
   These overrides keep older layouts compatible with this ZIP.
   Notes and options: CUSTOMIZATION-GUIDE.md
   ========================================================= */

/* Header and topics remain accessible at the top while reading the feed. */
.maq-site-header { position: sticky; top: 0; z-index: 60; background: #fff; }
body.admin-bar .maq-site-header { top: 32px; }
.maq-header-inner { justify-content: flex-start; gap: clamp(15px, 2.4vw, 34px); min-height: 68px; }
.maq-brand { flex: none; }
.maq-logo-search-button { appearance: none; border: 0; padding: 0; background: transparent; display: flex; align-items: center; cursor: pointer; border-radius: 2px; }
.maq-logo-search-button:active { outline: 3px solid var(--maq-accent); outline-offset: 3px; }
.maq-brand .custom-logo { max-height: 46px; max-width: 190px; }
.maq-site-nav { flex: none; display: flex; gap: 20px; align-items: center; min-width: 0; justify-content: flex-start; }
.maq-site-nav .maq-discover-link { font-size: 12px; font-weight: 650; white-space: nowrap; }
.maq-site-nav .maq-discover-link:hover { color: var(--maq-accent); text-decoration: underline; }
.maq-menu { gap: clamp(12px, 1.4vw, 25px); overflow-x: auto; }
.maq-header-search { display: none !important; }

/* Popup search is the only visible search box. Logo triggers it. */
.maq-search-dialog { width: min(92vw, 640px); max-width: 640px; border: 1px solid var(--maq-border); padding: 26px; border-radius: 9px; box-shadow: 0 12px 42px #0002; }
.maq-search-dialog::backdrop { background: rgb(0 0 0 / .4); }
.maq-search-dialog-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 19px; }
.maq-search-dialog h2 { margin: 0; font-size: 20px; font-weight: 650; }
.maq-search-close { background: transparent; border: 0; font-size: 31px; line-height: 1; padding: 3px 9px; }
.maq-search-dialog .maq-search { width: 100%; padding: 10px 0; }
.maq-search-dialog .maq-search input { font-size: 17px; }

/* Clickable tags run below the header; hover/focus pauses for accessibility. */
.maq-tag-strip { border-top: 1px solid var(--maq-border); overflow: hidden; white-space: nowrap; background: #fff; }
.maq-tag-scroll { display: flex; width: max-content; gap: 22px; animation: maq-tag-run 45s linear infinite; }
.maq-tag-group { display: flex; gap: 22px; align-items: center; flex: none; min-height: 35px; }
.maq-tag-group a { display: inline-block; padding: 6px 2px; font-size: 11px; color: #4c4c47; }
.maq-tag-group a:focus-visible, .maq-tag-group a:hover { color: var(--maq-accent); text-decoration: underline; }
.maq-tag-strip:hover .maq-tag-scroll, .maq-tag-strip:focus-within .maq-tag-scroll { animation-play-state: paused; }
@keyframes maq-tag-run { to { transform: translateX(calc(-50% - 11px)); } }

/* Make card UI feel responsive to clicks without decorating it with hover animation. */
.maq-card-inner { width: 100%; min-width: 0; }
.maq-card-inner a:active, .maq-gallery-prev:active, .maq-gallery-next:active { outline: 2px solid var(--maq-accent); outline-offset: 2px; background-color: rgb(90 90 90 / .07); }
.maq-card-media-link { display: block; }
.maq-card-link { display: block; }
.maq-card-caption { overflow-wrap: break-word; }
.maq-grid.is-measured .maq-card { align-self: start; }
.maq-grid.is-measured { grid-auto-flow: row dense; }

/* Brand category: a standalone logo tile, or clean text mark if no logo selected. */
.maq-brand-card { display: grid; place-items: center; min-height: 130px; padding: 16px 12px; background: #f9f9f8; border: 1px solid var(--maq-border); }
.maq-brand-card .maq-brand-logo-image { display: block; max-width: 100%; width: auto; max-height: 140px; height: auto; object-fit: contain; }
.maq-brand-wordmark { font-size: clamp(16px, 1.4vw, 24px); letter-spacing: -.02em; text-align: center; overflow-wrap: anywhere; }
.maq-card--featured .maq-brand-card { min-height: 180px; }

/* Swipeable card galleries: consistent frame prevents card jumping as slides change. */
.maq-card-gallery { position: relative; overflow: hidden; aspect-ratio: var(--maq-gallery-ratio, 4/5); }
.maq-gallery-slide { display: block; width: 100%; height: 100%; }
.maq-gallery-slide[hidden] { display: none !important; }
.maq-gallery-prev, .maq-gallery-next { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 36px; background: rgb(255 255 255 / .93); border: 0; border-radius: 4px; font: 28px/1 var(--maq-font); display: none; }
.maq-gallery-prev { left: 4px; }
.maq-gallery-next { right: 4px; }
.js .maq-gallery-prev, .js .maq-gallery-next { display: block; }
.maq-gallery-count { position: absolute; bottom: 7px; right: 7px; background: rgb(0 0 0 / .7); color: white; border-radius: 4px; padding: 2px 6px; font-size: 10px; pointer-events: none; }
.maq-gallery-slide img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* Advertisements always identified; do not disguise commercial links. */
.maq-sponsored-label { display: inline-block; color: var(--maq-muted); text-transform: uppercase; font-weight: 700; font-size: 10px; letter-spacing: .08em; }
.maq-card--manual-ad .maq-card-caption { border-top: 1px solid var(--maq-border); }
.maq-ad-card .maq-card-inner { min-height: 160px; border: 1px solid var(--maq-border); background: #fafafa; padding: 8px; }
.maq-ad-card .adsbygoogle { min-height: 125px; width: 100%; }

/* Mobile: tighter, left-aligned navigation, two-column masonry; avoid huge holes. */
@media (max-width: 740px) {
  .maq-header-inner { align-items: flex-start; min-height: 0; padding-top: 12px; padding-bottom: 9px; flex-direction: column; flex-wrap: nowrap; gap: 5px; }
  .maq-brand .custom-logo { max-height: 38px; max-width: 170px; }
  .maq-site-nav { order: 0; flex: none; width: 100%; gap: 17px; justify-content: flex-start; }
  .maq-menu { gap: 18px; }
  .maq-site-nav .maq-discover-link, .maq-menu a { font-size: 12px; padding-block: 5px; }
  .maq-tag-group { min-height: 33px; }
  .maq-grid.is-measured .maq-card--featured { grid-column: span 1; }
  .maq-gallery-prev, .maq-gallery-next { width: 28px; height: 30px; font-size: 23px; }
  .maq-brand-card { min-height: 115px; padding: 12px; }
  .maq-brand-logo-image { max-height: 105px !important; }
}
@media (max-width: 782px) { body.admin-bar .maq-site-header { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .maq-site-header { top: 0; } }
@media (max-width: 370px) { .maq-grid.is-measured .maq-card--featured { grid-column: span 1; } }
@media (prefers-reduced-motion: reduce) {
  .maq-tag-scroll { animation: none; }
  .maq-tag-strip { overflow-x: auto; }
  .maq-tag-clone { display: none; }
}

/* MAQ.BIO 2.0: member-navigation integration (companion plugin optional) */
.maq-member-nav{display:flex;align-items:center;gap:12px;flex:0 0 auto;font-size:12px;font-weight:650;white-space:nowrap}
.maq-member-nav a{padding:8px 10px;border:1px solid var(--maq-border);border-radius:6px}
.maq-member-nav a:hover{background:var(--maq-soft);color:var(--maq-accent)}
@media(max-width:950px){.maq-header-inner{flex-wrap:wrap}.maq-member-nav{margin-left:auto}}
@media(max-width:580px){.maq-member-nav{order:2;margin-left:auto}.maq-member-nav a{font-size:11px;padding:6px 8px}}
/* App shortcodes on custom wide page template: editorial pages unchanged. */
.maq-main--app{padding-top:16px}.maq-main--app .maqexp-shell{max-width:1180px}

/* MAQ Experience Passport refinement — isolated from Discover and editorial Posts. */
body:has(.maqexp-shell--passport) { background: #f8f7f4; }
body:has(.maqexp-shell--passport) .maq-site-header { background: #fff; }
body:has(.maqexp-shell--passport) .maq-main--app { padding-top: 18px; }
body:has(.maqexp-shell--passport) .maq-member-nav a[aria-current="page"] { color: #bd3d36; border-color: #e5c7c1; background: #fff7f4; }

/* MAQ.BIO v2.2 — editorial navigation, centered instant search and premium commerce. */
/* Important: responsive --maq-cols media queries above must remain authoritative. */
.maq-header-inner { display:flex; align-items:center; gap:clamp(12px,1.7vw,26px); min-height:72px; }
.maq-site-nav { flex:1 1 auto; min-width:0; }
.maq-member-nav { flex:0 0 auto; margin-left:0; }
.maq-open-search { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; gap:8px; background:none; color:var(--maq-text); border:0; padding:10px 8px; font-size:12px; font-weight:650; border-radius:6px; }
.maq-open-search:hover { background:#f5f4f1; }
.maq-open-search svg { width:19px; height:19px; }
.maq-brand { order:9; margin-left:auto; }
.maq-logo-home { display:block; border-radius:3px; }
.maq-logo-home:focus-visible { outline:3px solid var(--maq-accent); }
.maq-tag-group { gap:25px; min-height:46px; }
.maq-tag-group a { font-size:22px; line-height:1.2; font-weight:500; letter-spacing:-.028em; padding:11px 2px; }
.maq-tag-scroll { gap:25px; animation-duration:65s; }
@keyframes maq-tag-run { to { transform:translateX(calc(-50% - 12.5px)); } }
/* Native dialog is top layer: true viewport centering independent of the sticky header. */
.maq-search-dialog { position:fixed; inset:0; width:100vw; max-width:none; height:100dvh; max-height:none; margin:0; padding:0 24px; border:0; background:transparent; color:#1f201e; box-shadow:none; overflow:auto; }
.maq-search-dialog[open] { display:grid; place-items:center; }
.maq-search-dialog::backdrop { background:rgb(23 25 26 / .27); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); animation:maq-search-backdrop-in .16s ease-out both; }
.maq-search-dialog[open] .maq-search-dialog-inner { animation:maq-search-in .18s ease-out both; }
.maq-search-dialog-inner { position:relative; width:min(90vw,880px); max-width:100%; padding:clamp(26px,3.8vw,52px); background:rgb(255 255 255 / .96); border:1px solid rgb(255 255 255 / .64); box-shadow:0 20px 85px rgb(24 24 23 / .14); border-radius:20px; }
.maq-search-eyebrow { margin:0 0 14px; font-size:11px; letter-spacing:.18em; font-weight:750; color:#99918b; }
.maq-search-dialog .maq-search { border-bottom:2px solid #222; padding:9px 0 18px; gap:14px; }
.maq-search-dialog .maq-search svg { width:27px; height:27px; color:#47453e; }
.maq-search-dialog .maq-search input { flex:1; min-width:0; font-size:clamp(28px,5.5vw,67px); font-weight:500; letter-spacing:-.055em; line-height:1.2; border:0; padding:0; box-shadow:none; }
.maq-search-dialog .maq-search input::placeholder { color:#b6b4ad; }
.maq-search-dialog .maq-search .maq-search-submit { flex:0 0 auto; padding:8px 12px; border:1px solid #242420; background:#242420; color:#fff; border-radius:6px; font-size:12px; }
.maq-search-help { color:#807d75; margin:16px 0 0; font-size:12px; }
.maq-search-close { position:fixed; right:clamp(15px,4vw,60px); top:clamp(16px,3vw,55px); z-index:2; color:#272724; background:#fff; border:1px solid #eeece8; border-radius:50%; width:49px; height:49px; display:grid; place-items:center; padding:0; font-size:27px; }
.maq-search-close:hover { background:#f1efeb; }
@keyframes maq-search-backdrop-in { from { opacity:0; backdrop-filter:blur(0); } to { opacity:1; backdrop-filter:blur(8px); } }
@keyframes maq-search-in { from { opacity:0; transform:translateY(8px) scale(.99); } to { opacity:1; transform:translateY(0) scale(1); } }
/* Woo shop, categories and individual products share a readable design. */
.maq-commerce { padding:clamp(22px,3.2vw,52px) 0 90px; }
.maq-commerce .woocommerce { width:100%; }
.maq-commerce .woocommerce-products-header__title { font:400 clamp(38px,5vw,72px)/1.08 Georgia,serif; letter-spacing:-.045em; margin:0 0 20px; }
.maq-commerce .woocommerce .products { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:28px 17px; margin:24px 0!important; padding:0; list-style:none; }
.maq-commerce .woocommerce .products::before,.maq-commerce .woocommerce .products::after { display:none; }
.maq-commerce .woocommerce ul.products li.product { float:none; clear:none; margin:0; width:auto; min-width:0; padding:0; text-align:left; }
.maq-commerce .woocommerce ul.products li.product img { aspect-ratio:4/5; width:100%; object-fit:contain; background:#f7f6f2; border-radius:7px; margin:0 0 10px; }
.maq-commerce .woocommerce ul.products li.product h2 { font-size:15px; font-weight:600; line-height:1.4; padding:0; margin:0 0 5px; }
.maq-commerce .woocommerce ul.products li.product .price { color:#5a5d40; font-size:14px; }
.maq-commerce .woocommerce ul.products li.product .button { background:#252521; color:#fff; font-size:12px; font-weight:600; padding:11px 13px; border-radius:5px; margin-top:9px; }
.maq-commerce .woocommerce .woocommerce-result-count,.maq-commerce .woocommerce .woocommerce-ordering { font-size:12px; margin-bottom:22px; }
.maq-commerce .woocommerce select { border:1px solid #deddd7; border-radius:5px; background:#fff; padding:9px; }
.maq-commerce .woocommerce div.product { max-width:1200px; margin:0 auto; }
.maq-commerce .woocommerce div.product .product_title { font:400 clamp(37px,5vw,65px)/1.1 Georgia,serif; letter-spacing:-.04em; }
.maq-commerce .woocommerce div.product p.price,.maq-commerce .woocommerce div.product span.price { color:#585d3e; }
.maq-woo-brand-ref { margin:5px 0 14px; font-size:13px; color:#716e64; }
.maq-woo-brand-ref a { color:#53573c; text-decoration:underline; text-underline-offset:3px; }
.maq-woo-brand-ref a:hover { color:#222; }
.maq-woo-brand-collection { margin:65px auto 0; max-width:1100px; padding:34px 0 10px; border-top:1px solid #e8e7e0; }
.maq-woo-brand-collection h2 { font:400 clamp(27px,3vw,39px)/1.2 Georgia,serif; margin:0 0 20px; }
.maq-woo-brand-collection .maq-woo-brand-products { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:22px; }
.maq-woo-product { display:block; min-width:0; }
.maq-woo-product img { aspect-ratio:4/5; object-fit:contain; width:100%; height:auto; background:#f5f5f2; border-radius:6px; }
.maq-woo-product strong { display:block; margin-top:9px; font-size:14px; font-weight:600; }
.maq-woo-product .price { font-size:13px; color:#6c6c59; }
@media(max-width:1100px) {
  .maq-commerce .woocommerce .products { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .maq-header-inner { flex-wrap:wrap; }
}
@media(max-width:800px) {
  .maq-commerce .woocommerce .products { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .maq-site-nav { order:3; flex:1 1 100%; }
  .maq-member-nav { margin-left:auto; }
  .maq-brand { order:2; margin-left:0; }
  .maq-open-search { margin-left:auto; }
  .maq-header-inner { gap:8px 14px; }
}
@media(max-width:580px) {
  .maq-header-inner { flex-direction:row; align-items:center; padding:12px 0 8px; gap:5px 11px; }
  .maq-brand { order:0; flex:0 0 auto; margin-left:auto; }
  .maq-brand .custom-logo { max-height:35px; max-width:130px; }
  .maq-open-search { order:1; margin-left:0; padding:9px 5px; }
  .maq-open-search span { display:none; }
  .maq-member-nav { order:2; margin-left:0; }
  .maq-site-nav { order:3; width:100%; overflow:auto; }
  .maq-tag-group { min-height:40px; gap:17px; }
  .maq-tag-group a { font-size:17px; padding:9px 1px; }
  .maq-tag-scroll { gap:17px; }
  .maq-search-dialog { padding:0 14px; }
  .maq-search-dialog-inner { padding:29px 23px; border-radius:13px; width:100%; }
  .maq-search-dialog .maq-search input { font-size:clamp(26px,8vw,39px); }
  .maq-search-dialog .maq-search-submit { font-size:11px; padding:8px 9px; }
  .maq-search-close { width:40px; height:40px; right:14px; top:16px; }
  .maq-commerce .woocommerce .products { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 11px; }
  .maq-woo-brand-collection .maq-woo-brand-products { grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
}
@media(prefers-reduced-motion:reduce) {
  .maq-search-dialog[open] .maq-search-dialog-inner,.maq-search-dialog::backdrop { animation:none!important; }
}
/* Keep the logo at the far right of the first row on every viewport. */
@media(max-width:800px){
 .maq-member-nav{order:1;margin-left:0}
 .maq-open-search{order:2;margin-left:0}
 .maq-brand{order:3;margin-left:auto}
 .maq-site-nav{order:4}
}
@media(max-width:580px){
 .maq-member-nav{order:1;margin-left:0}
 .maq-open-search{order:2;margin-left:0}
 .maq-brand{order:3;margin-left:auto}
 .maq-site-nav{order:4}
}

/* The search interface is intentionally only one large, centered input. */
.maq-search-dialog-inner { padding:clamp(24px,3.3vw,45px); }
.maq-search-dialog .maq-search { border-bottom:2px solid #252521; padding:8px 0 14px; }
.maq-search-dialog .maq-search:focus-within { border-bottom-color:#c43c37; }
.maq-search-dialog .maq-search input:focus-visible { outline:none; box-shadow:none; }
.maq-search-dialog .maq-search input { font-size:clamp(28px,5vw,64px); }
@media(max-width:580px) {
 .maq-search-dialog-inner { padding:32px 24px; }
 .maq-search-dialog .maq-search input { font-size:clamp(23px,7vw,32px); }
 .maq-search-dialog .maq-search svg { width:23px; height:23px; }
}

/* ===============================================================
   MAQ.BIO v2.2.1 — MOBILE FIX / LOGO SEARCH / SEAMLESS TOPICS
   Do not re-declare --maq-cols: 7 below the mobile breakpoints:
   doing so forced all phones into 7 tiny columns in v2.2.0.
   =============================================================== */

/* Clearly readable cards, never letter-by-letter titles. */
.maq-card-title,
.maq-card-hook,
.maq-card-placeholder strong,
.maq-brand-wordmark {
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}
.maq-grid.is-measured > .maq-card { min-width: 0; }
.maq-logo-search-button {
  appearance: none;
  display: inline-flex;
  border: 0;
  padding: 6px 0 6px 8px;
  background: transparent;
  color: inherit;
  line-height: 1;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  border-radius: 5px;
}
.maq-logo-search-button:hover { opacity: .86; }
.maq-logo-search-button:focus-visible { outline: 3px solid var(--maq-accent); outline-offset: 4px; }
.maq-logo-search-button .custom-logo { pointer-events: none; }

/* Truly seamless loop: each identical group includes its own end gap,
   there is NO gap between the two groups. Moving half the 2-group track
   aligns the duplicate perfectly with the starting frame. */
.maq-tag-strip {
  max-width: 100%;
  overflow: hidden;
  contain: paint;
}
.maq-tag-scroll {
  display: flex;
  gap: 0;
  width: max-content;
  animation: maq-tag-run 66s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}
.maq-tag-group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: max-content;
  min-height: 48px;
  gap: clamp(18px, 2vw, 32px);
  padding-right: clamp(18px, 2vw, 32px);
}
.maq-tag-group a {
  flex: 0 0 auto;
  display: inline-block;
  padding: 10px 1px;
  font-size: clamp(18px, 1.55vw, 23px);
  font-weight: 780;
  line-height: 1.3;
  letter-spacing: -.035em;
  white-space: nowrap;
  text-decoration: none;
}
.maq-tag-group a:nth-child(8n + 1) { color: #b23541; }
.maq-tag-group a:nth-child(8n + 2) { color: #285f80; }
.maq-tag-group a:nth-child(8n + 3) { color: #70508e; }
.maq-tag-group a:nth-child(8n + 4) { color: #ad572c; }
.maq-tag-group a:nth-child(8n + 5) { color: #237455; }
.maq-tag-group a:nth-child(8n + 6) { color: #81582e; }
.maq-tag-group a:nth-child(8n + 7) { color: #a43c7e; }
.maq-tag-group a:nth-child(8n + 8) { color: #425e9d; }
.maq-tag-group a:hover { text-decoration: underline; text-underline-offset: 4px; filter: brightness(.85); }
/* Hover should not jolt scrolling to a stop; keyboard focus still pauses. */
.maq-tag-strip:hover .maq-tag-scroll { animation-play-state: running; }
.maq-tag-strip:focus-within .maq-tag-scroll { animation-play-state: paused; }
@keyframes maq-tag-run {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* Tablet and phone: separate account/logo row from navigation. */
@media (max-width: 800px) {
  .maq-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "member brand" "nav nav";
    align-items: center;
    gap: 6px 12px;
    min-height: 0;
    padding-top: 14px;
    padding-bottom: 10px;
  }
  .maq-member-nav {
    grid-area: member;
    justify-self: start;
    order: initial;
    margin: 0;
  }
  .maq-brand {
    grid-area: brand;
    justify-self: end;
    order: initial;
    margin: 0;
    min-width: 0;
  }
  .maq-site-nav {
    grid-area: nav;
    justify-self: stretch;
    order: initial;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .maq-site-nav::-webkit-scrollbar { display: none; }
  .maq-menu { max-width: 100%; }
  .maq-logo-search-button { padding: 4px 0 4px 10px; }
}
/* Keep the theme's 4-column tablet breakpoint intact. */
@media (max-width: 740px) {
  .maq-grid { column-count: 2; }
  .maq-grid.is-measured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  .maq-header-inner { padding-top: 11px; padding-bottom: 9px; }
  .maq-brand .custom-logo { max-width: 145px; max-height: 39px; }
  .maq-menu { gap: 20px; }
  .maq-site-nav .maq-discover-link, .maq-menu a { font-size: 14px; }
  .maq-tag-group { min-height: 43px; gap: 21px; padding-right: 21px; }
  .maq-tag-group a { font-size: 18px; padding: 9px 0; }
  .maq-tag-scroll { animation-duration: 55s; }
  .maq-card-title { font-size: 14px; line-height: 1.38; }
  .maq-card-hook { font-size: 12px; line-height: 1.5; }
  .maq-card-placeholder { min-height: 125px; padding: 12px; }
  .maq-card-placeholder strong { font-size: clamp(17px, 4.7vw, 23px); }
  .maq-search-dialog { padding-inline: 12px; }
  .maq-search-dialog-inner { border-radius: 16px; padding: 27px 21px; }
  .maq-search-dialog .maq-search input { font-size: clamp(23px, 7vw, 37px); }
}
@media (max-width: 370px) {
  .maq-grid { column-count: 1; }
  .maq-grid.is-measured { grid-template-columns: minmax(0, 1fr); }
  .maq-grid.is-measured .maq-card--featured { grid-column: span 1; }
}
@media (prefers-reduced-motion: reduce) {
  .maq-tag-scroll { animation: none; will-change: auto; }
  .maq-tag-strip { overflow-x: auto; contain: none; }
  .maq-tag-clone { display: none; }
}
