/* === PortalCMS Dark Theme === */
:root {
    --brand-color: #8B5CF6;
    --brand-dark: #7C3AED;
    --brand-secondary: #A78BFA;
    --brand-accent: #10B981;
    --bg-dark: #1a1a2e;
    --bg-darker: #12121f;
    --bg-card: #1e1e32;
    --text-light: #e2e2ef;
    --text-muted: #9595aa;
    --link-color: #A78BFA;
    --link-hover: #C4B5FD;
    --white: #FFFFFF;
    --charcoal: #2d2d44;
    --black: #000000;
    --border-color: #2d2d44;
    --btn-radius: 8px;
    --container-width: 1200px;
    --section-padding: 60px;
    --font-main: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-accent: 'Inter', Georgia, serif;
    --transition: 0.3s ease;
    /* Legacy compat */
    --brand-red: var(--brand-color);
    --dark-red: var(--brand-dark);
    --very-dark-red: var(--brand-dark);

    /* === Stacking scale ===
       The header used to sit at 1000 while the builder lets any section be
       given a z-index up to 9999, so a single section set above 1000 painted
       straight over the site header. These tiers keep that from happening by
       construction: page content can never reach the header, and the header
       can never reach a full-screen overlay.

       content  0 – 9999   page sections (the builder's Z-Index control caps here)
       header   10000      site header and its sticky variants
       overlay  11000+     things that must cover the header: lightbox,
                           full-screen search, scroll progress
       system   99999+     admin bar, cursor follower, page transition */
    --pcms-z-content-max: 9999;
    --pcms-z-header: 10000;
    --pcms-z-overlay: 11000;
}

/* === Admin Bar (frontend, logged-in users) === */
.pcms-admin-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #1e1e2e;
    border-bottom: 1px solid #334155;
    z-index: 99999;
    font-family: -apple-system, 'Segoe UI', sans-serif;
    font-size: 13px;
}

.pcms-admin-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    max-width: 100%;
}

.pcms-admin-bar-left,
.pcms-admin-bar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pcms-admin-bar a {
    color: #94a3b8;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.15s;
    white-space: nowrap;
}

.pcms-admin-bar a:hover {
    color: #e2e8f0;
    background: rgba(255,255,255,0.08);
}

.pcms-admin-bar-logo {
    font-weight: 700 !important;
    color: #8B5CF6 !important;
    margin-right: 8px;
}

.pcms-admin-bar-edit {
    display: flex !important;
    align-items: center;
    gap: 6px;
    background: #8B5CF6 !important;
    color: #fff !important;
    font-weight: 600;
    padding: 5px 14px !important;
    border-radius: 6px !important;
}

.pcms-admin-bar-edit:hover {
    background: #7C3AED !important;
    color: #fff !important;
}

body.admin-bar-active {
    padding-top: 40px;
}

body.admin-bar-active .site-header {
    top: 40px;
}

@media (max-width: 768px) {
    .pcms-admin-bar-left a:not(.pcms-admin-bar-logo),
    .pcms-admin-bar-right a:not(.pcms-admin-bar-edit) {
        display: none;
    }
}

/* === Reset === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-darker);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--brand-red);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
}

/* === Layout === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    flex: 1;
}

/* === Builder-rendered header shell ===
   Wraps the GrapesJS-built header HTML so it always forms a stacking context
   above page content — regardless of what z-index the page sections use.
   overflow:visible lets submenus/mega-menus extend below the header bar. */
.pcms-site-header-shell {
    position: sticky;
    top: 0;
    z-index: var(--pcms-z-header, 10000);
    overflow: visible;
}

/* ...but sticky was unconditional, and the shell wraps EVERY builder header —
   so nothing a header said about itself could unpin it. The unified header's
   "Sticky Behavior: None" is its shipped default and did nothing; the
   theme-preset headers have no sticky control at all. Either way there was no
   route to a header that scrolls away with the page.

   Two ways to say "don't pin me", because the two header trees say it
   differently:
     · the unified header already has the setting — data-sticky="none";
     · the presets get data-stick="off" from the Behaviour section of their
       panel. Absent means sticky, so an already-installed preset header keeps
       the behaviour it has.

   position: relative rather than static, so the shell still forms the stacking
   context the rest of this block relies on.

   Matched at any depth but qualified by the header's own class, not as a bare
   `> [data-sticky]`. A header is usually the direct child, but it does not have
   to be — drop the header block inside a Section and it is a grandchild — and a
   bare attribute match would also be fooled by the other things that carry
   data-sticky, like a Table of Contents block sitting in the header. */
.pcms-site-header-shell:has(.pcms-header-unified[data-sticky="none"]),
.pcms-site-header-shell:has(.pcms-h[data-stick="off"]) {
    position: relative;
    top: auto;
}
/* The presets carry their own `position:sticky` in builder_css, which is
   injected after this stylesheet — so equal specificity would lose on order.
   (0,2,0) plus !important is what it takes to out-rank `.pcms-h--gr`. */
.pcms-h[data-stick="off"] {
    position: relative !important;
    top: auto !important;
}

/* A site header is not a scroll container.
   The builder's FX · Scroll Snap trait used to add `overflow: auto` and never
   take it away, so a header that had snap switched on once kept it for good —
   including after snap was switched back off. The trait is fixed
   (builder/components.js), but the leftover declaration is already saved into
   existing headers' builder_css under an `#id` selector, which outranks
   anything a class selector here can say — hence !important.

   One overflow causes all three symptoms, which is why they always appear
   together:
     · a scrollbar down the side of the bar;
     · nav items scrolling inside the bar instead of sitting still;
     · dropdowns trapped inside the header instead of opening over the page —
       an ancestor with overflow != visible clips a descendant no matter what
       its z-index says.
   The scrollable overflow is often only a few pixels and nothing to do with
   the nav fitting: .pcms-w-has-sub::before is a 16px hover bridge hanging
   below each parent item, and .pcms-w-submenu adds a 6px top margin. Inside a
   clipping ancestor that alone is enough to make the bar scroll.

   Every structural container of the unified header is listed, because the
   declaration can land on any of them and each one is between a nav item and
   the page. Named containers rather than a blanket `*`, so the things that
   legitimately scroll inside a header — the mobile menu overlay, search
   suggestions, an off-canvas panel, the announcement marquee — keep their
   overflow.

   The animated presets are excluded: .pcms-h--* clips its background layer
   with overflow:hidden on purpose. That `:not()` holds a single simple
   selector deliberately — a complex one would invalidate the whole rule on
   browsers without Selectors 4 support.

   Shorthand rather than overflow-y alone: `overflow-y: visible` sitting next
   to a hidden/auto overflow-x computes back to `auto`, which would put the
   scrollbar straight back. */
/* Confirmed against the live site: the header bar carries
     #i3aza { overflow-x:auto; overflow-y:auto; overflow:auto }
   in its saved builder_css, with clientHeight 65 against scrollHeight 110 —
   45px of scrollable overflow, which is both the scrollbar and the box that
   was trapping the dropdown. */
.pcms-site-header-shell > *:not([class*="pcms-h--"]),
.pcms-site-header-shell .pcms-header-topbar,
.pcms-site-header-shell .pcms-header-main,
.pcms-site-header-shell .pcms-header-inner,
.pcms-site-header-shell .pcms-header-logo,
.pcms-site-header-shell .pcms-header-nav,
.pcms-site-header-shell .pcms-header-actions,
.pcms-site-header-shell .pcms-w,
.pcms-site-header-shell .pcms-w--menu .pcms-w-body,
.pcms-site-header-shell .pcms-w-menu:not(.pcms-w-menu-open) {
    overflow: visible !important;
}
/* If the builder already placed a sticky pcms-header-unified inside,
   don't double-stack — let the shell's position handle it. */
.pcms-site-header-shell .pcms-header-unified[data-sticky="sticky"],
.pcms-site-header-shell .pcms-header-unified[data-sticky="shrink"],
.pcms-site-header-shell .pcms-header-unified[data-sticky="auto-hide"] {
    position: relative;
    top: auto;
}

/* === Header row has to fit a phone ===
   Measured on the live site at 375px: padding 40 + logo 178 + widget burger 34
   + "Get Started" 112 + block burger 36 + gaps 80 = well past the viewport, and
   the header's stray overflow:auto was hiding it by making the bar scroll
   sideways. With that overflow removed the row would push the whole page
   instead, so the row has to be able to shrink.

   The logo and the actions zone both ship flex-shrink:0, which is what stops
   the row collapsing — a flex item cannot shrink below its content unless
   min-width is released as well. */
@media (max-width: 768px) {
    .pcms-site-header-shell .pcms-header-inner {
        gap: 10px;
        padding-left: 14px;
        padding-right: 14px;
    }
    /* !important because the flex-shrink:0 these carry is declared later in
       this same file at equal specificity, so source order would win. Scoped
       to the mobile query, where shrinking is the only sane behaviour. */
    .pcms-site-header-shell .pcms-header-logo,
    .pcms-site-header-shell .pcms-header-actions {
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    /* Releasing min-width on the zone is not enough on its own — the link
       inside it is the thing with the intrinsic width, so it has to be told
       it may shrink too. */
    .pcms-site-header-shell .pcms-header-logo a,
    .pcms-site-header-shell .pcms-header-logo > *,
    .pcms-site-header-shell .pcms-header-actions > * {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* The header block ships its own .pcms-hamburger and the menu widget renders
   its own .pcms-w-ham, so two burgers were rendering side by side on mobile —
   and the block's one is visible at desktop widths too (measured at 1265px:
   display:flex, 36px, hard against the right edge of the bar).
   It is also dead: it drives .pcms-header-nav and the block's own drawer, both
   of which are empty whenever the nav comes from a menu widget instead. All
   pressing it achieves is a full-viewport rgba(0,0,0,0.5) scrim at z-index
   10999 — above the header — with an off-screen empty drawer behind it, and
   the scrim then swallows the click that would dismiss it.
   Hidden at every width when a menu widget is supplying the navigation.
   :has() is unsupported in older browsers, where the rule is dropped and both
   burgers show — which is today's behaviour, so it fails safe. */
.pcms-site-header-shell .pcms-header-inner:has(.pcms-w--menu) .pcms-hamburger {
    display: none !important;
}

/* === Builder blocks must not outgrow a narrow screen ===
   Resizing a block on the builder canvas writes a pixel width into its saved
   CSS with no matching max-width. Measured on the live site at a 375px
   viewport: section 631px, card 450px, paragraphs 402px each — the document
   scrolled to 651px, so the page slid sideways and the left edge of the card
   was cut off.

   Only below the mobile breakpoint, and only there, is `max-width: 100%`
   forced. Above it the pixel widths are left exactly as designed. !important
   is needed because the widths come from `#id` rules, and it is safe here
   precisely because it is inside the media query: the boxed cap it overrides
   (max-width: 1200px) is irrelevant on a viewport this narrow, so nothing
   about the desktop layout can change.

   This is a guard, not a cure — the widths are still in the saved CSS. The
   fix at source is to clear the width on those blocks in the builder so they
   size to their container. */
@media (max-width: 768px) {
    .main-content .pcms-section,
    .main-content .pcms-row,
    .main-content .pcms-col,
    .main-content .pcms-inner,
    .main-content .pcms-card,
    .main-content .pcms-section p,
    .main-content .pcms-section h1,
    .main-content .pcms-section h2,
    .main-content .pcms-section h3,
    .main-content .pcms-section h4,
    .main-content .pcms-section h5,
    .main-content .pcms-section h6 {
        max-width: 100% !important;
    }
}

/* === Builder columns (.pcms-row > .pcms-col) ===
   Whether columns sat side by side or stacked was decided by a leftover:
   every column block ships a min-width (200px, 150px for three), and a row
   stacked only when those no longer fitted. That broke it both ways:
   - Columns inside a column (2 / 3 Columns dropped into a section's
     column, or into a nested section) stacked on DESKTOP whenever the
     parent was narrower than 2 × 200px — every column of a 3-column
     section. Dragging the divider also stopped dead at 200px.
   - Resizing a column clears its min-width so it can get narrower, and
     that row then never stacked on a phone (measured: 222px + 74px side
     by side at 375px).
   So it is decided here instead. Nested columns always share their row
   above phone width; on a phone, page columns take a line each. A row with
   Wrap Columns switched off still squeezes instead of stacking, and one
   set to stack only under 480 / 600px keeps that choice. !important
   because the min-widths and flex values live in #id rules; each rule sits
   inside a width query, so neither can change the other side's layout. */
@media (min-width: 769px) {
    :is(.pcms-col, .pcms-inner) .pcms-row > .pcms-col { min-width: 0 !important; }
}
@media (max-width: 768px) {
    .main-content .pcms-row:not([data-mobile-bp="480"]):not([data-mobile-bp="600"]) > .pcms-col { flex-basis: 100% !important; }
}

/* ---- Phones: form fields at 16px ----
   iOS zooms the whole page into any text field whose font is under 16px the moment
   it is tapped, and leaves it zoomed after, so a visitor typing an email into a
   footer signup ends up scrolling sideways around a magnified page. Fields across
   the site were 13-15px. !important because builder forms style their fields with
   #id rules; inside a phone-only query it cannot touch a desktop layout. Checkboxes,
   radios, ranges, colours, files and buttons are not typed into, so they are left. */
@media (max-width: 768px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]):not([type="hidden"]),
    select,
    textarea { font-size: max(16px, 1em) !important; }
}

/* === Header === */
.site-header {
    background: var(--dark-red);
    position: sticky;
    top: 0;
    z-index: var(--pcms-z-header, 10000);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    min-height: 90px;
    max-width: 1400px;
    margin: 0 auto;
}

.site-logo img {
    height: 50px;
    width: auto;
    transition: transform var(--transition);
}

.site-logo img:hover {
    transform: scale(1.05);
}

/* === Navigation === */
.nav-bar {
    display: flex;
    align-items: center;
    min-height: 75px;
    border: 3px solid var(--dark-red);
    border-radius: 26px;
    box-shadow: 4px 4px 16px rgba(0,0,0,0.5);
    margin: 10px;
    padding: 0;
    flex-wrap: nowrap;
    justify-content: space-around;
    flex: 1;
    max-width: 1250px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    justify-content: center;
}

.site-nav > ul {
    display: flex;
    list-style: none;
    gap: 0;
    align-items: center;
}

.site-nav li {
    position: relative;
}

.site-nav > ul > li > a {
    display: block;
    padding: 0 20px;
    color: var(--white);
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 700;
    line-height: 60px;
    border-radius: 55px;
    transition: all var(--transition);
    white-space: nowrap;
}

.site-nav > ul > li > a:hover,
.site-nav > ul > li.active > a {
    color: var(--brand-red);
    background: #3A3A3A;
}

/* Dropdown indicator */
.site-nav li.has-children > a::after {
    content: '\25BE';
    margin-left: 5px;
    font-size: 12px;
}

/* Dropdown menu */
.site-nav .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dark-red);
    border: 3px solid var(--dark-red);
    border-radius: 15px;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    list-style: none;
    z-index: 1001;
    padding: 5px 0;
}

.site-nav li.has-children:hover .dropdown {
    display: block;
}

.site-nav .dropdown a {
    display: block;
    padding: 0 20px;
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    line-height: 45px;
    transition: all var(--transition);
}

.site-nav .dropdown a:hover {
    background: rgba(0,0,0,0.2);
    color: var(--white);
}

/* Discord button */
.discord-btn {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 11px;
    background: #5865F2;
    color: var(--white) !important;
    border-radius: 40px;
    font-weight: 700;
    font-size: 15px;
    transition: all var(--transition);
    box-shadow: 3px 3px 10px rgba(0,0,0,0.5);
    animation: discord-bounce 2s ease-in-out infinite;
}

.discord-btn:hover {
    background: var(--dark-red);
    color: var(--white) !important;
    box-shadow: 0 4px 15px rgba(195,11,11,0.4);
}

@keyframes discord-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 10px;
    z-index: 1002;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: slideshow-fade var(--slide-duration, 45s) infinite;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(126,6,6,0.7));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 40px 20px;
}

.hero-logo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin-bottom: 30px;
    animation: bounce-slow 3s ease-in-out infinite;
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.hero-headline {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero-rotating {
    font-size: 1.8rem;
    color: var(--brand-red);
    min-height: 2.5rem;
    font-weight: 600;
}

.hero-rotating .rotating-text {
    display: inline-block;
    opacity: 0;
    animation: fade-rotate 3s ease-in-out infinite;
}

@keyframes fade-rotate {
    0%, 100% { opacity: 0; transform: translateY(10px); }
    10%, 90% { opacity: 1; transform: translateY(0); }
}

.hero-cta {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 40px;
    background: var(--dark-red);
    color: var(--white) !important;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.hero-cta:hover {
    background: var(--charcoal);
    border-color: var(--brand-red);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(195,11,11,0.4);
}

/* Shape Divider */
.shape-divider {
    position: absolute;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 3;
}

.shape-divider.top {
    top: 0;
}

.shape-divider.bottom {
    bottom: 0;
    transform: rotate(180deg);
}

.shape-divider svg {
    display: block;
    width: calc(100% + 1px);
    height: 60px;
}

.shape-divider svg path {
    fill: var(--dark-red);
}

/* === Footer === */
.site-footer {
    background: var(--dark-red);
    padding: 80px 0 20px;
    margin-top: auto;
    position: relative;
}

.site-footer .shape-divider {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    transform: rotate(180deg);
    line-height: 0;
    overflow: hidden;
}

.site-footer .shape-divider svg {
    display: block;
    width: calc(100% + 1px);
    height: 60px;
}

.site-footer .shape-divider svg path {
    fill: var(--bg-darker);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-tagline {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    transition: all var(--transition);
}

.footer-social a:hover {
    color: var(--white);
    transform: translateY(-3px);
    opacity: 0.8;
}

.footer-social svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--white);
    margin: 0 10px;
    font-size: 14px;
    opacity: 0.9;
}

.footer-links a:hover {
    color: var(--white);
    opacity: 1;
}

.footer-contact {
    color: var(--white);
    font-size: 13px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.footer-copyright {
    color: var(--white);
    font-size: 12px;
    opacity: 0.8;
}

/* === Page Content === */
.page-header {
    background: var(--bg-dark);
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--brand-red);
}

.page-body {
    padding: 40px 0;
}

.page-body h2 {
    color: var(--brand-red);
    font-size: 1.8rem;
    margin: 30px 0 15px;
}

.page-body h3 {
    color: var(--text-light);
    font-size: 1.4rem;
    margin: 25px 0 10px;
}

.page-body p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.page-body ul, .page-body ol {
    margin: 10px 0 20px 30px;
}

.page-body li {
    margin-bottom: 5px;
}

.page-body img {
    border-radius: 8px;
    margin: 15px 0;
}

.page-body a {
    color: var(--brand-red);
    text-decoration: underline;
}

.page-body a:hover {
    color: var(--white);
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-align: center;
    color: var(--white);
}

.btn-primary {
    background: var(--dark-red);
}

.btn-primary:hover {
    background: var(--charcoal);
    color: var(--white);
}

.btn-secondary {
    background: var(--charcoal);
}

.btn-secondary:hover {
    background: var(--brand-red);
    color: var(--white);
}

/* === Posts === */
.post-list {
    list-style: none;
}

.post-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 20px;
    border-left: 4px solid var(--brand-red);
    transition: transform var(--transition);
}

.post-card:hover {
    transform: translateX(5px);
}

.post-card h2 {
    margin-bottom: 8px;
}

.post-card h2 a {
    color: var(--white);
}

.post-card h2 a:hover {
    color: var(--brand-red);
}

.post-meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.post-excerpt {
    color: var(--text-light);
    font-size: 15px;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
    list-style: none;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 14px;
    background: var(--bg-card);
    color: var(--text-light);
    border-radius: 4px;
    font-size: 14px;
    transition: all var(--transition);
}

.pagination a:hover {
    background: var(--brand-red);
    color: var(--white);
}

.pagination .active {
    background: var(--brand-red);
    color: var(--white);
}

/* === Embed === */
.embed-responsive {
    position: relative;
    width: 100%;
    max-width: 1500px;
    padding-bottom: 56.25%;
    margin: 14px auto;
    background: var(--dark-red);
    border: 10px solid var(--dark-red);
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.82);
}

.embed-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* === Two Column Layout === */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.col-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 30px;
}

.col-card h2 {
    color: var(--brand-red);
    margin-bottom: 15px;
}

.server-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.server-card .server-ip {
    font-family: monospace;
    color: var(--brand-red);
}

/* === 404 === */
.error-page {
    text-align: center;
    padding: 100px 20px;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--brand-red);
    margin-bottom: 10px;
}

.error-page p {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .embed-responsive {
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-bar {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        border: none;
        border-radius: 0;
        box-shadow: -5px 0 20px rgba(0,0,0,0.5);
        background: var(--dark-red);
        flex-direction: column;
        padding: 70px 0 20px;
        overflow-y: auto;
        z-index: 1001;
        margin: 0;
    }

    .nav-bar.open {
        display: flex;
    }

    .site-nav {
        flex-direction: column;
        width: 100%;
    }

    .site-nav > ul {
        flex-direction: column;
        width: 100%;
    }

    .site-nav > ul > li > a {
        padding: 12px 20px;
        line-height: 1.4;
        border-radius: 0;
    }

    .site-nav .dropdown {
        position: static;
        display: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding-left: 15px;
        background: rgba(0,0,0,0.2);
    }

    .site-nav li.has-children.open .dropdown {
        display: block;
    }

    .discord-btn {
        margin: 15px 20px;
        justify-content: center;
    }

    .header-inner {
        min-height: 70px;
    }

    .hero-headline {
        font-size: 2rem;
    }

    .hero-rotating {
        font-size: 1.2rem;
    }

    .hero-logo {
        width: 130px;
        height: 130px;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .embed-responsive {
        max-width: 600px;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 1.5rem;
    }

    .hero-rotating {
        font-size: 1rem;
    }

    .header-inner {
        padding: 8px 15px;
    }

    .container {
        padding: 0 15px;
    }
}

/* ============================================
   FANCY TEXT EFFECTS
   ============================================ */

/* Logo carousel scroll */
@keyframes pcmsLogoScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
/* Logo carousel options (driven by data-* on .pcms-logo-carousel) */
.pcms-logo-carousel[data-pause-hover="1"]:hover .pcms-logo-track { animation-play-state: paused; }
.pcms-logo-carousel[data-grayscale="1"] .pcms-logo-track > * {
    filter: grayscale(1);
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.pcms-logo-carousel[data-grayscale="1"] .pcms-logo-track > *:hover { filter: grayscale(0); }

/* Carousel hide scrollbar */
.pcms-post-carousel div::-webkit-scrollbar,
.pcms-carousel-track::-webkit-scrollbar { display: none; }

/* Content ticker scroll */
@keyframes pcmsTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Typing cursor blink */
@keyframes pcms-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Glitch effect */
.pcms-glitch {
    position: relative;
}
.pcms-glitch::before,
.pcms-glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}
.pcms-glitch::before {
    animation: pcms-glitch-1 0.3s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
    color: #ff006e;
}
.pcms-glitch::after {
    animation: pcms-glitch-2 0.3s infinite linear alternate-reverse;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
    color: #00f5ff;
}
@keyframes pcms-glitch-1 {
    0% { transform: translate(2px, -1px); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(1px, 2px); }
    75% { transform: translate(-1px, -2px); }
    100% { transform: translate(2px, 1px); }
}
@keyframes pcms-glitch-2 {
    0% { transform: translate(-2px, 1px); }
    25% { transform: translate(2px, -1px); }
    50% { transform: translate(-1px, -2px); }
    75% { transform: translate(1px, 2px); }
    100% { transform: translate(-2px, -1px); }
}

/* Gradient text */
.pcms-gradient-text {
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent;
}

/* Hover scale effect for cards */
.pcms-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* Flip box 3D hover effect */
.pcms-flip-box:hover .pcms-flip-inner {
    transform: rotateY(180deg);
}

/* Animated underline on links */
.pcms-animated-link {
    position: relative;
    text-decoration: none;
}
.pcms-animated-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-color);
    transition: width 0.3s ease;
}
.pcms-animated-link:hover::after {
    width: 100%;
}

/* Float/glow animation for decorative elements */
@keyframes pcms-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.pcms-float { animation: pcms-float 3s ease-in-out infinite; }

@keyframes pcms-glow {
    0%, 100% { box-shadow: 0 0 5px var(--brand-color); }
    50% { box-shadow: 0 0 20px var(--brand-color), 0 0 40px var(--brand-color); }
}
.pcms-glow { animation: pcms-glow 2s ease-in-out infinite; }

/* ===== Continuous text animations =====
   Wrap text in a .pcms-anim-* class. Each letter is wrapped in <span> at
   render time by widgets.js so per-letter delays work — for non-letter
   variants the whole element animates together. */

@keyframes pcms-text-wave {
    0%, 60%, 100% { transform: translateY(0); }
    30%           { transform: translateY(-12px); }
}
.pcms-anim-wave > span {
    display: inline-block;
    animation: pcms-text-wave 1.6s ease-in-out infinite;
}

@keyframes pcms-text-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}
.pcms-anim-pulse {
    display: inline-block;
    animation: pcms-text-pulse 1.6s ease-in-out infinite;
}

@keyframes pcms-text-gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.pcms-anim-gradient-shift {
    background: linear-gradient(90deg, var(--brand-color, #8B5CF6), var(--brand-secondary, #A78BFA), var(--brand-accent, #10B981), var(--brand-color, #8B5CF6));
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: pcms-text-gradient-shift 5s linear infinite;
}

@keyframes pcms-text-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40%           { transform: translateY(-14px); }
}
.pcms-anim-bounce > span {
    display: inline-block;
    animation: pcms-text-bounce 1.8s ease-in-out infinite;
}

@keyframes pcms-text-fade-pulse {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1; }
}
.pcms-anim-fade-pulse {
    animation: pcms-text-fade-pulse 2.2s ease-in-out infinite;
}

/* ===== Lottery / slot-machine text =====
   Static prefix span + animated rolling drum cycling through a word list.
   widgets.js (initLotteryText) builds the track and drives the animation. */
.pcms-lottery-text {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.pcms-lt-drum {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    /* Height matches one line of the parent font-size */
}
.pcms-lt-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    will-change: transform;
}
.pcms-lt-track span {
    /* Each word span sized to match drum height — set by JS at runtime */
    box-sizing: border-box;
    display: flex;
    align-items: center;
}
/* Reduced-motion: stop all lottery animation */
@media (prefers-reduced-motion: reduce) {
    .pcms-lt-track { transition: none !important; }
}

@keyframes pcms-text-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.pcms-anim-shimmer {
    background: linear-gradient(90deg, currentColor 0%, currentColor 35%, #fff 50%, currentColor 65%, currentColor 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: pcms-text-shimmer 3s linear infinite;
}

/* ===== Background slideshow section =====
   Section with cycling background images, crossfaded. widgets.js renders
   the slides as absolutely-positioned divs and rotates the .active class. */
.pcms-bg-slideshow {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.pcms-bg-slideshow > .pcms-bg-slide {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 0;
}
.pcms-bg-slideshow > .pcms-bg-slide.active { opacity: 1; }
.pcms-bg-slideshow > .pcms-bg-effect-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}
.pcms-bg-slideshow > .pcms-bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2;
}
.pcms-bg-slideshow > *:not(.pcms-bg-slide):not(.pcms-bg-overlay):not(.pcms-bg-effect-layer) {
    position: relative;
    z-index: 3;
}

/* ============================================================
   CARD HOVER — the default lift, plus the card side of the
   data-pcms-hover-fx choices. The lift only applies while no Hover
   choice has been made: once the card panel (or Advanced → Motion)
   sets data-pcms-hover-fx, that decides, and "none" means none.
   Cards saved before the look presets carry their own
   `transition: transform .2s, box-shadow .2s` and box-shadow in an
   #id rule, which outranks this file: the lift was a quick jerk, the
   shadow never deepened, and Glow / Ring / Lift + glow did nothing.
   So the timing here is !important, and the hover shadow lives on a
   ::after layer that fades in. It adds to whatever resting shadow the
   card has instead of fighting it, and fading a layer is much cheaper
   than repainting a big shadow on every frame. Ring is an outline
   for the same reason.
   ============================================================ */
.pcms-card {
    position: relative;
    transition: transform var(--pcms-hover-dur, .35s) cubic-bezier(.22, 1, .36, 1),
                box-shadow var(--pcms-hover-dur, .35s) ease,
                border-color var(--pcms-hover-dur, .35s) ease,
                outline-color var(--pcms-hover-dur, .35s) ease,
                filter var(--pcms-hover-dur, .35s) ease !important;
}
.pcms-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 calc(14px * var(--pcms-hover-amp, 1)) calc(30px * var(--pcms-hover-amp, 1)) -10px rgba(0, 0, 0, 0.5);
    transition: opacity var(--pcms-hover-dur, .35s) ease;
}
.pcms-card[data-pcms-hover-fx="glow"]::after {
    box-shadow: 0 0 calc(18px * var(--pcms-hover-amp, 1)) var(--pcms-hover-color, var(--brand-color, #8B5CF6));
}
.pcms-card[data-pcms-hover-fx="lift-glow"]::after {
    box-shadow: 0 calc(14px * var(--pcms-hover-amp, 1)) calc(30px * var(--pcms-hover-amp, 1)) -10px rgba(0, 0, 0, 0.5),
                0 0 calc(16px * var(--pcms-hover-amp, 1)) var(--pcms-hover-color, var(--brand-color, #8B5CF6));
}
.pcms-card:not([data-pcms-hover-fx]):hover { transform: translateY(-4px); }
.pcms-card:is(:not([data-pcms-hover-fx]), [data-pcms-hover-fx="lift"], [data-pcms-hover-fx="lift-glow"], [data-pcms-hover-fx="glow"]):hover::after { opacity: 1; }
.pcms-card[data-pcms-hover-fx="ring"] { outline: calc(2px * var(--pcms-hover-amp, 1)) solid transparent; outline-offset: 0; }
.pcms-card[data-pcms-hover-fx="ring"]:hover { outline-color: var(--pcms-hover-color, var(--brand-color, #8B5CF6)); }
/* The effect is on ::after / the outline now, so the card keeps its own
   resting shadow on hover (a look's, via --card-rest-shadow). */
.pcms-card[data-pcms-hover-fx]:hover { box-shadow: var(--card-rest-shadow, none); }
/* A lifted card rises out from under a cursor resting on its bottom
   edge, drops back, and rises again. This strip under it, present only
   while hovered, keeps the hover until the cursor really leaves. */
.pcms-card:hover::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
}

/* ============================================================
   CARD — looks, inner layout, header strip
   All driven by data-card-* attributes from the builder's Card panel.
   Plain attribute selectors, so anything set in the Style tab (an #id
   rule) still overrides them: a preset is a starting point.
   Each look's shadow goes through --card-rest-shadow so a hover effect
   can keep it (CARD HOVER above) instead of swapping it out.
   ============================================================ */
.pcms-card[data-card-look] {
    --card-accent-c: var(--card-accent, var(--brand-color, #8B5CF6));
    border-radius: 14px;
    box-shadow: var(--card-rest-shadow, none);
}
.pcms-card[data-card-look="solid"] {
    background: var(--bg-card, #1e1e32);
    border: 1px solid var(--border-color, #2d2d44);
    --card-rest-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
/* The top highlight is a 1px background line rather than an inset
   shadow: an inset entry can't animate against a hover glow's outer
   one, so the whole shadow used to snap. */
.pcms-card[data-card-look="glass"] {
    background: linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06)) top / 100% 1px no-repeat,
                rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    --card-rest-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.pcms-card[data-card-look="outline"] {
    background: transparent;
    border: 1px solid var(--border-color, #2d2d44);
    --card-rest-shadow: none;
}
/* Two backgrounds: the card colour clipped to the padding box, and the
   gradient behind it showing only through the transparent border. */
.pcms-card[data-card-look="gradient"] {
    border: 1.5px solid transparent;
    background:
        linear-gradient(var(--bg-card, #1e1e32), var(--bg-card, #1e1e32)) padding-box,
        linear-gradient(135deg, var(--card-accent-c), var(--card-accent-2, #EC4899)) border-box;
    --card-rest-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.pcms-card[data-card-look="elevated"] {
    background: var(--bg-card, #1e1e32);
    border: 1px solid rgba(255, 255, 255, 0.06);
    --card-rest-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -12px rgba(0, 0, 0, 0.55);
}
.pcms-card[data-card-look="accent"] {
    background: var(--bg-card, #1e1e32);
    border: 1px solid var(--border-color, #2d2d44);
    border-top: 3px solid var(--card-accent-c);
    --card-rest-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.pcms-card[data-card-look="accent"][data-card-stripe="left"] {
    border-top: 1px solid var(--border-color, #2d2d44);
    border-left: 4px solid var(--card-accent-c);
}

/* ---- Inside the card (data-card-flow / -gap / -align / -justify) ----
   A gap instead of each child's own margins: with mixed blocks inside, the
   margins were all different and the spacing never looked deliberate. */
.pcms-card[data-card-flow] { display: flex; gap: var(--card-gap, 14px); }
.pcms-card[data-card-flow="stack"],
.pcms-card[data-card-flow="center"] { flex-direction: column; }
.pcms-card[data-card-flow="row"] { flex-direction: row; flex-wrap: wrap; align-items: center; }
.pcms-card[data-card-flow="center"] { align-items: center; justify-content: center; text-align: center; }
.pcms-card[data-card-flow] > * { min-width: 0; margin-top: 0; margin-bottom: 0; }
.pcms-card[data-card-gap="none"] { --card-gap: 0; }
.pcms-card[data-card-gap="sm"]   { --card-gap: 8px; }
.pcms-card[data-card-gap="lg"]   { --card-gap: 22px; }
.pcms-card[data-card-gap="xl"]   { --card-gap: 32px; }
.pcms-card[data-card-flow][data-card-align="start"]  { align-items: flex-start; }
.pcms-card[data-card-flow][data-card-align="center"] { align-items: center; }
.pcms-card[data-card-flow][data-card-align="end"]    { align-items: flex-end; }
.pcms-card[data-card-flow][data-card-justify="center"]  { justify-content: center; }
.pcms-card[data-card-flow][data-card-justify="end"]     { justify-content: flex-end; }
.pcms-card[data-card-flow][data-card-justify="between"] { justify-content: space-between; }

/* ---- Header strip (data-card-header) ---- */
.pcms-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}
.pcms-card-header-icon { flex: 0 0 auto; display: inline-flex; font-size: 1.25em; line-height: 1; }
.pcms-card-header-icon svg { width: 1.1em; height: 1.1em; }
.pcms-card-header-icon:empty { display: none; }
.pcms-card-header-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-light, #e2e2ef);
}
.pcms-card[data-card-header="tinted"] > .pcms-card-header {
    padding: 10px 14px;
    border-bottom: 0;
    border-radius: 10px;
    background: color-mix(in srgb, var(--card-accent, var(--brand-color, #8B5CF6)) 14%, transparent);
}
.pcms-card[data-card-header="plain"] > .pcms-card-header { padding-bottom: 0; border-bottom: 0; }
/* In a flex card the gap already spaces it; on its own line in a row. */
.pcms-card[data-card-flow] > .pcms-card-header { margin-bottom: 0; align-self: stretch; }
.pcms-card[data-card-flow="row"] > .pcms-card-header { flex: 0 0 100%; }
.pcms-card[data-card-flow="center"] > .pcms-card-header { justify-content: center; }

/* A linked card is a click target. */
[data-wrapper-link-enabled="1"][data-wrapper-link]:not([data-wrapper-link=""]) { cursor: pointer; }

/* ============================================================
   IMAGE ACCORDION (port of Essential Addons Image_Accordion).
   Hover trigger uses :hover so the panels expand on mouseover
   without JS. Click trigger is wired in widgets.js — it adds
   the .is-open class which the CSS below promotes to flex:3.
   ============================================================ */
.pcms-image-accordion[data-trigger="hover"]:hover .pcms-img-acc-item { flex: 1; }
.pcms-image-accordion[data-trigger="hover"] .pcms-img-acc-item:hover { flex: 3 !important; }

.pcms-image-accordion[data-trigger="click"] .pcms-img-acc-item.is-open { flex: 3 !important; }
.pcms-image-accordion[data-trigger="click"] .pcms-img-acc-item:not(.is-open) { flex: 1 !important; }

/* Vertical orientation — items stack and grow in height. */
.pcms-image-accordion[data-direction="vertical"] {
    flex-direction: column !important;
}
.pcms-image-accordion[data-direction="vertical"] .pcms-img-acc-item {
    min-height: 60px;
}

/* Smooth title/desc fade-in when an item expands so the text
   doesn't read as "spilling out" of a narrow strip. */
.pcms-img-acc-item .pcms-img-acc-overlay {
    transition: opacity 0.3s ease;
}
.pcms-image-accordion[data-trigger="hover"] .pcms-img-acc-item:not(:hover) .pcms-img-acc-overlay {
    opacity: 0.4;
}
.pcms-image-accordion[data-trigger="click"] .pcms-img-acc-item:not(.is-open) .pcms-img-acc-overlay {
    opacity: 0.4;
}

/* ============================================================
   TOOLTIP EXTENSION (port of Essential Addons Tooltip).
   Pure-CSS hover tooltip — any element with data-tooltip-enabled="1"
   and a non-empty data-tooltip gets a floating label on mouseover.
   Position controlled by data-tooltip-pos (top/bottom/left/right).
   ============================================================ */
[data-tooltip-enabled="1"][data-tooltip] {
    position: relative;
}
[data-tooltip-enabled="1"][data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    background: rgba(15, 15, 35, 0.95);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    z-index: 999;
    transition: opacity 0.18s ease, transform 0.18s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
/* Default position: top */
[data-tooltip-enabled="1"][data-tooltip]::after,
[data-tooltip-enabled="1"][data-tooltip][data-tooltip-pos="top"]::after {
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
}
[data-tooltip-enabled="1"][data-tooltip][data-tooltip-pos="bottom"]::after {
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    bottom: auto;
}
[data-tooltip-enabled="1"][data-tooltip][data-tooltip-pos="left"]::after {
    right: calc(100% + 8px);
    top: 50%;
    transform: translate(4px, -50%);
    left: auto;
    bottom: auto;
}
[data-tooltip-enabled="1"][data-tooltip][data-tooltip-pos="right"]::after {
    left: calc(100% + 8px);
    top: 50%;
    transform: translate(-4px, -50%);
    bottom: auto;
}
/* Reveal on hover */
[data-tooltip-enabled="1"][data-tooltip]:hover::after {
    opacity: 1;
}
[data-tooltip-enabled="1"][data-tooltip][data-tooltip-pos="top"]:hover::after,
[data-tooltip-enabled="1"][data-tooltip]:not([data-tooltip-pos]):hover::after {
    transform: translateX(-50%) translateY(0);
}
[data-tooltip-enabled="1"][data-tooltip][data-tooltip-pos="bottom"]:hover::after {
    transform: translateX(-50%) translateY(0);
}
[data-tooltip-enabled="1"][data-tooltip][data-tooltip-pos="left"]:hover::after {
    transform: translate(0, -50%);
}
[data-tooltip-enabled="1"][data-tooltip][data-tooltip-pos="right"]:hover::after {
    transform: translate(0, -50%);
}

/* ============================================================
   IMAGE MASKING (port of EA Image_Masking extension).
   Apply a clip-path shape to any element via data-mask-shape.
   ============================================================ */
[data-mask-shape="circle"] { clip-path: circle(50% at 50% 50%); }
[data-mask-shape="rounded"] { border-radius: 24px; overflow: hidden; }
[data-mask-shape="diamond"] { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
[data-mask-shape="hexagon"] { clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); }
[data-mask-shape="star"] {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
[data-mask-shape="blob"] {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

/* Wrapper link cursor (set inline by trait control too, kept here for
   late-binding cases like content imported from older revisions). */
[data-wrapper-link-enabled="1"][data-wrapper-link]:not([data-wrapper-link=""]) {
    cursor: pointer;
}

/* Vertical text writing modes — these properties don't have a "default"
   value that resets; the trait sets writing-mode directly when chosen. */
[data-writing-mode="vertical-rl"],
[data-writing-mode="vertical-lr"],
[data-writing-mode="sideways-lr"] {
    /* Provide a sensible min-height so vertical text doesn't collapse. */
    min-height: 200px;
    display: inline-block;
}

/* ============================================================
   STICKY VIDEO (port of EA Sticky_Video).
   When .is-stuck is added by the runtime, the video detaches
   to a fixed corner. Position controlled by data-sticky-position.
   ============================================================ */
.pcms-sticky-video.is-stuck {
    position: fixed !important;
    width: 360px !important;
    max-width: 40vw;
    z-index: 1000;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}
.pcms-sticky-video.is-stuck[data-sticky-position="bottom-right"],
.pcms-sticky-video.is-stuck:not([data-sticky-position]) {
    bottom: 24px;
    right: 24px;
    top: auto;
    left: auto;
}
.pcms-sticky-video.is-stuck[data-sticky-position="bottom-left"] {
    bottom: 24px;
    left: 24px;
    top: auto;
    right: auto;
}
.pcms-sticky-video.is-stuck[data-sticky-position="top-right"] {
    top: 24px;
    right: 24px;
    bottom: auto;
    left: auto;
}
.pcms-sticky-video.is-stuck[data-sticky-position="top-left"] {
    top: 24px;
    left: 24px;
    bottom: auto;
    right: auto;
}

/* ============================================================
   ONE PAGE NAVIGATION (port of EA One_Page_Navigation).
   Floating dot column. Active state pulled in via .is-active.
   ============================================================ */
.pcms-one-page-nav-item .pcms-one-page-nav-label {
    transition: opacity 0.2s, max-width 0.2s;
    overflow: hidden;
    white-space: nowrap;
}
.pcms-one-page-nav[data-show-labels="0"] .pcms-one-page-nav-label {
    opacity: 0;
    max-width: 0;
}
.pcms-one-page-nav-item:hover .pcms-one-page-nav-dot,
.pcms-one-page-nav-item.is-active .pcms-one-page-nav-dot {
    transform: scale(1.3);
    background: var(--brand-color, #8B5CF6) !important;
}
.pcms-one-page-nav-item:hover,
.pcms-one-page-nav-item.is-active {
    color: #fff !important;
}
.pcms-one-page-nav[data-position="left"] {
    right: auto !important;
    left: 24px;
}

/* ============================================================
   OFF-CANVAS DRAWER (port of EA Offcanvas / Elementor Pro).
   Backdrop dims the page; panel slides in from the chosen edge.
   ============================================================ */
.pcms-off-canvas-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.pcms-off-canvas-panel {
    display: none;
    position: fixed;
    top: 0;
    width: min(360px, 90vw);
    height: 100vh;
    background: #1a1a2e;
    color: #e2e2ef;
    z-index: 999;
    box-shadow: -6px 0 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.28s ease;
    overflow-y: auto;
}
.pcms-off-canvas[data-position="right"] .pcms-off-canvas-panel {
    right: 0;
    transform: translateX(100%);
}
.pcms-off-canvas[data-position="left"] .pcms-off-canvas-panel {
    left: 0;
    transform: translateX(-100%);
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.5);
}
.pcms-off-canvas[data-position="top"] .pcms-off-canvas-panel {
    left: 0;
    width: 100%;
    height: auto;
    max-height: 70vh;
    transform: translateY(-100%);
}
.pcms-off-canvas[data-position="bottom"] .pcms-off-canvas-panel {
    bottom: 0;
    top: auto;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 70vh;
    transform: translateY(100%);
}
.pcms-off-canvas.is-open .pcms-off-canvas-backdrop {
    display: block;
    opacity: 1;
}
.pcms-off-canvas[data-overlay="0"] .pcms-off-canvas-backdrop { display: none !important; }
.pcms-off-canvas.is-open .pcms-off-canvas-panel {
    display: block;
    transform: translate(0, 0);
}

/* ============================================================
   INTERACTIVE CARD (port of EA Interactive_Card).
   Front overlay slides out, back overlay slides in on hover.
   data-effect controls direction (slide-up / fade / zoom).
   ============================================================ */
.pcms-interactive-card:hover .pcms-ic-bg {
    transform: scale(1.05);
}
.pcms-interactive-card:hover .pcms-ic-front { opacity: 0; }
.pcms-interactive-card:hover .pcms-ic-back { transform: translateY(0); }
.pcms-interactive-card[data-effect="fade"] .pcms-ic-back { transform: none; opacity: 0; transition: opacity 0.4s ease; }
.pcms-interactive-card[data-effect="fade"]:hover .pcms-ic-back { opacity: 1; }
.pcms-interactive-card[data-effect="zoom"] .pcms-ic-back { transform: scale(1.2); opacity: 0; transition: transform 0.4s ease, opacity 0.4s ease; }
.pcms-interactive-card[data-effect="zoom"]:hover .pcms-ic-back { transform: scale(1); opacity: 1; }

/* ============================================================
   UNIFIED HEADER — replaces 4 legacy header variants. Layout
   controlled via data-layout: 3col (default), 2col (no actions
   zone), or centered (logo above nav). Top bar toggled via
   data-show-topbar="1".
   ============================================================ */
.pcms-header-unified[data-layout="2col"] .pcms-header-actions {
    display: none !important;
}
.pcms-header-unified[data-layout="centered"] .pcms-header-inner {
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 16px;
    min-height: 0 !important;
}
.pcms-header-unified[data-layout="centered"] .pcms-header-actions {
    display: none !important;
}
.pcms-header-unified[data-layout="centered"] .pcms-header-logo,
.pcms-header-unified[data-layout="centered"] .pcms-header-nav {
    justify-content: center;
}
/* When search / account / secondary CTA / social are injected into the
   actions zone, force it visible even in the layouts that normally hide it. */
.pcms-header-unified.pcms-force-actions[data-layout="2col"] .pcms-header-actions,
.pcms-header-unified.pcms-force-actions[data-layout="centered"] .pcms-header-actions {
    display: flex !important;
}
/* Override the inline display:none on the topbar markup so the
   toggle in the trait panel takes effect immediately. */
.pcms-header-unified[data-show-topbar="1"] .pcms-header-topbar {
    display: block !important;
}

/* ---- Sticky / scroll shrink ---- */
/* Matches the shell tier: a builder header used on its own (outside
   .pcms-site-header-shell) has to out-rank page sections too. */
.pcms-header-unified[data-sticky="sticky"],
.pcms-header-unified[data-sticky="shrink"] {
    position: sticky;
    top: 0;
    z-index: var(--pcms-z-header, 10000);
}
.pcms-header-unified[data-sticky="shrink"] .pcms-header-inner {
    transition: min-height 0.3s ease;
}
/* Scrolled state. widgets.js has always toggled this class, but the only
   thing it did was drop a fixed shadow — nothing in the panel could style
   it, so "transparent at top" had no way to say what the header becomes
   once you scroll. These custom properties give it background, shadow and
   blur, each falling back to the previous hard-coded behaviour. */
.pcms-header-unified.pcms-header-scrolled .pcms-header-main {
    background: var(--pcms-hdr-scrolled-bg, inherit);
    box-shadow: var(--pcms-hdr-scrolled-shadow, 0 2px 16px rgba(0, 0, 0, 0.25));
    backdrop-filter: var(--pcms-hdr-scrolled-blur, none);
    -webkit-backdrop-filter: var(--pcms-hdr-scrolled-blur, none);
    border-bottom-color: var(--pcms-hdr-scrolled-border, inherit);
}
/* Always transition, not only in transparent mode — otherwise a scrolled
   background change snapped in. */
.pcms-header-unified .pcms-header-main {
    transition: background 0.3s ease, box-shadow 0.3s ease,
                backdrop-filter 0.3s ease, border-color 0.3s ease;
}
/* Transparent-at-top — header bar fades in on scroll */
.pcms-header-unified[data-transparent="1"] .pcms-header-main {
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* ---- Active link indicators ---- */
.pcms-header-unified[data-active-indicator="underline"] .pcms-header-nav a.pcms-nav-active {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.pcms-header-unified[data-active-indicator="dot"] .pcms-header-nav a.pcms-nav-active {
    position: relative;
}
.pcms-header-unified[data-active-indicator="dot"] .pcms-header-nav a.pcms-nav-active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
}
.pcms-header-unified[data-active-indicator="border-left"] .pcms-header-nav a.pcms-nav-active {
    border-left: 3px solid currentColor;
    padding-left: 9px;
}

/* ---- Hamburger mobile button — JS manages show/hide via inline style ---- */
.pcms-hamburger { display: none; }

/* ---- No-show site name ---- */
.pcms-header-unified[data-show-sitename="0"] .pcms-header-logo a { display: none !important; }

/* ---- Auto-hide on scroll-down, reveal on scroll-up ---- */
.pcms-header-unified[data-sticky="auto-hide"] {
    position: sticky;
    top: 0;
    /* Was a bare 500 while the other two sticky modes used the header tier, so
       switching to auto-hide silently dropped the header below any page
       section with a z-index above 500. */
    z-index: var(--pcms-z-header, 10000);
    transition: transform 0.3s ease;
}
.pcms-header-unified[data-sticky="auto-hide"].pcms-header-hidden {
    transform: translateY(-100%);
}

/* ---- Injected Search + Account actions ---- */
.pcms-header-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #e2e2ef;
    cursor: pointer;
    padding: 6px;
}
.pcms-header-search-form { display: flex; }
.pcms-header-search-form[hidden] { display: none; }
.pcms-header-search-form input {
    background: rgba(255,255,255,0.08);
    border: 1px solid #2d2d44;
    border-radius: 6px;
    color: #e2e2ef;
    padding: 7px 12px;
    font-size: 14px;
    min-width: 180px;
    outline: none;
}
.pcms-header-search-form input:focus { border-color: var(--brand-color, #8B5CF6); }
.pcms-header-account {
    color: #e2e2ef;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
}
.pcms-header-account:hover { background: rgba(255,255,255,0.06); }

/* ---- Full-screen search overlay ---- */
.pcms-search-overlay {
    position: fixed;
    inset: 0;
    /* +1 so it keeps the edge it had over the lightbox before the header
       tier moved underneath both of them. */
    z-index: calc(var(--pcms-z-overlay, 11000) + 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(10, 10, 20, 0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: pcms-search-fade 0.2s ease;
}
@keyframes pcms-search-fade { from { opacity: 0; } to { opacity: 1; } }
.pcms-search-overlay-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: min(680px, 90vw);
}
.pcms-search-overlay-form input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: clamp(22px, 5vw, 40px);
    padding: 12px 4px;
    outline: none;
    text-align: center;
}
.pcms-search-overlay-form input:focus { border-bottom-color: var(--brand-color, #8B5CF6); }
.pcms-search-hint { color: rgba(255,255,255,0.45); font-size: 13px; }
.pcms-search-close {
    position: absolute;
    top: 24px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
}
.pcms-search-close:hover { opacity: 1; }

/* ---- Live search suggestions ---- */
.pcms-header-search-form { position: relative; }
.pcms-search-suggest {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: min(340px, 80vw);
    background: var(--bg-card, #1e1e32);
    border: 1px solid var(--border-color, #2d2d44);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
    padding: 6px;
    z-index: 1001;
    max-height: 60vh;
    overflow-y: auto;
}
.pcms-search-suggest[hidden] { display: none; }
.pcms-search-suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-light, #e2e2ef);
    font-size: 13px;
}
.pcms-search-suggest-item:hover,
.pcms-search-suggest-item.is-active { background: rgba(255,255,255,0.06); }
.pcms-search-suggest-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcms-search-suggest-type {
    flex-shrink: 0;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #fff;
    background: var(--brand-color, #8B5CF6);
    padding: 2px 7px;
    border-radius: 10px;
}
/* Overlay variant — full-width block list under the big input */
.pcms-search-suggest-overlay {
    position: static;
    width: 100%;
    margin-top: 14px;
    background: rgba(30, 30, 50, 0.85);
}

/* ============================================================
   UNIFIED HEADER — Elementor-style nav extras: menu alignment,
   hover pointer effects, dropdown styling, submenu indicator.
   ============================================================ */

/* ---- Menu alignment ---- */
.pcms-header-unified[data-nav-align="left"]   .pcms-header-nav { justify-content: flex-start; }
.pcms-header-unified[data-nav-align="center"] .pcms-header-nav { justify-content: center;     flex: 1 1 auto; }
.pcms-header-unified[data-nav-align="right"]  .pcms-header-nav { justify-content: flex-end;   flex: 1 1 auto; }
.pcms-header-unified[data-nav-align="justified"] .pcms-header-nav { justify-content: space-between; flex: 1 1 auto; }

/* ---- Submenu indicator arrow (the inline span in the trigger) ---- */
.pcms-header-unified[data-dropdown-arrows="0"] .pcms-menu-dropdown > a > .pcms-menu-arrow { display: none; }
.pcms-header-unified[data-submenu-rotate="1"] .pcms-menu-dropdown > a > .pcms-menu-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}
.pcms-header-unified[data-submenu-rotate="1"] .pcms-menu-dropdown.pcms-dd-open > a > .pcms-menu-arrow { transform: rotate(180deg); }
.pcms-header-unified[data-submenu-icon="plus"][data-submenu-rotate="1"] .pcms-menu-dropdown.pcms-dd-open > a > .pcms-menu-arrow { transform: rotate(45deg); }

/* ---- Dropdown / submenu styling (driven by CSS vars on the header;
        !important beats the inline styles the menu API emits) ---- */
.pcms-header-unified .pcms-dropdown-menu {
    background: var(--pcms-dd-bg, var(--bg-card, #1e1e32)) !important;
    border-radius: var(--pcms-dd-radius, 8px) !important;
    min-width: var(--pcms-dd-width, 180px) !important;
    margin-top: var(--pcms-dd-distance, 0px);
}
/* Invisible bridge so a non-zero Distance doesn't break hover-out */
.pcms-header-unified .pcms-dropdown-menu::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    top: calc(-1 * var(--pcms-dd-distance, 0px));
    height: var(--pcms-dd-distance, 0px);
}
.pcms-header-unified .pcms-dropdown-menu > a {
    color: var(--pcms-dd-text, var(--text-muted, #9595aa)) !important;
    padding: var(--pcms-dd-pad-y, 8px) var(--pcms-dd-pad-x, 16px) !important;
    border-bottom: 1px solid var(--pcms-dd-divider, transparent);
}
.pcms-header-unified .pcms-dropdown-menu > a:last-child { border-bottom: none; }
.pcms-header-unified .pcms-dropdown-menu > a:hover {
    background: var(--pcms-dd-hover-bg, rgba(255,255,255,0.05)) !important;
    color: var(--pcms-dd-hover-text, var(--text-light, #e2e2ef)) !important;
}

/* ============================================================
   HOVER POINTERS — animated nav-link hover effects, keyed off
   data-pointer + data-pointer-anim. Color/thickness via the
   --pcms-pointer-color / --pcms-pointer-weight vars.
   Targets top-level links (including dropdown triggers).
   ============================================================ */
.pcms-header-unified[data-pointer]:not([data-pointer="none"]) .pcms-header-nav > a,
.pcms-header-unified[data-pointer]:not([data-pointer="none"]) .pcms-header-nav > .pcms-menu-dropdown > a {
    position: relative;
    overflow: hidden;
}
/* Line pointers (underline / overline / double-line) share a pseudo line */
.pcms-header-unified[data-pointer="underline"] .pcms-header-nav > a::after,
.pcms-header-unified[data-pointer="underline"] .pcms-header-nav > .pcms-menu-dropdown > a::after,
.pcms-header-unified[data-pointer="overline"] .pcms-header-nav > a::after,
.pcms-header-unified[data-pointer="overline"] .pcms-header-nav > .pcms-menu-dropdown > a::after,
.pcms-header-unified[data-pointer="double-line"] .pcms-header-nav > a::after,
.pcms-header-unified[data-pointer="double-line"] .pcms-header-nav > .pcms-menu-dropdown > a::after,
.pcms-header-unified[data-pointer="double-line"] .pcms-header-nav > a::before,
.pcms-header-unified[data-pointer="double-line"] .pcms-header-nav > .pcms-menu-dropdown > a::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: var(--pcms-pointer-weight, 2px);
    background: var(--pcms-pointer-color, var(--brand-color, #8B5CF6));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.pcms-header-unified[data-pointer="underline"]   .pcms-header-nav > a::after,
.pcms-header-unified[data-pointer="underline"]   .pcms-header-nav > .pcms-menu-dropdown > a::after,
.pcms-header-unified[data-pointer="double-line"] .pcms-header-nav > a::after,
.pcms-header-unified[data-pointer="double-line"] .pcms-header-nav > .pcms-menu-dropdown > a::after { bottom: 0; }
.pcms-header-unified[data-pointer="overline"]    .pcms-header-nav > a::after,
.pcms-header-unified[data-pointer="overline"]    .pcms-header-nav > .pcms-menu-dropdown > a::after,
.pcms-header-unified[data-pointer="double-line"] .pcms-header-nav > a::before,
.pcms-header-unified[data-pointer="double-line"] .pcms-header-nav > .pcms-menu-dropdown > a::before { top: 0; }

/* Line animation: slide (translate in from left) */
.pcms-header-unified[data-pointer-anim="slide"][data-pointer="underline"] .pcms-header-nav > a::after,
.pcms-header-unified[data-pointer-anim="slide"][data-pointer="overline"] .pcms-header-nav > a::after,
.pcms-header-unified[data-pointer-anim="slide"][data-pointer="double-line"] .pcms-header-nav > a::after,
.pcms-header-unified[data-pointer-anim="slide"][data-pointer="double-line"] .pcms-header-nav > a::before { transform: translateX(-101%); opacity: 1; }
/* Line animation: grow (scale from center) / draw (scale from left) */
.pcms-header-unified[data-pointer-anim="grow"] .pcms-header-nav > a::after,
.pcms-header-unified[data-pointer-anim="grow"] .pcms-header-nav > a::before { transform: scaleX(0); transform-origin: center; opacity: 1; }
.pcms-header-unified[data-pointer-anim="draw"] .pcms-header-nav > a::after,
.pcms-header-unified[data-pointer-anim="draw"] .pcms-header-nav > a::before { transform: scaleX(0); transform-origin: left; opacity: 1; }
/* Line hover states */
.pcms-header-unified[data-pointer="underline"] .pcms-header-nav > a:hover::after,
.pcms-header-unified[data-pointer="underline"] .pcms-header-nav > .pcms-menu-dropdown > a:hover::after,
.pcms-header-unified[data-pointer="overline"] .pcms-header-nav > a:hover::after,
.pcms-header-unified[data-pointer="overline"] .pcms-header-nav > .pcms-menu-dropdown > a:hover::after,
.pcms-header-unified[data-pointer="double-line"] .pcms-header-nav > a:hover::after,
.pcms-header-unified[data-pointer="double-line"] .pcms-header-nav > .pcms-menu-dropdown > a:hover::after,
.pcms-header-unified[data-pointer="double-line"] .pcms-header-nav > a:hover::before,
.pcms-header-unified[data-pointer="double-line"] .pcms-header-nav > .pcms-menu-dropdown > a:hover::before {
    opacity: 1;
    transform: translateX(0) scaleX(1);
}

/* Framed pointer — a box outline that animates in */
.pcms-header-unified[data-pointer="framed"] .pcms-header-nav > a::before,
.pcms-header-unified[data-pointer="framed"] .pcms-header-nav > .pcms-menu-dropdown > a::before {
    content: '';
    position: absolute;
    inset: 0;
    border: var(--pcms-pointer-weight, 2px) solid var(--pcms-pointer-color, var(--brand-color, #8B5CF6));
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.pcms-header-unified[data-pointer="framed"][data-pointer-anim="grow"] .pcms-header-nav > a::before { transform: scale(0.8); }
.pcms-header-unified[data-pointer="framed"][data-pointer-anim="corners"] .pcms-header-nav > a::before { clip-path: polygon(0 0, 30% 0, 30% 30%, 0 30%, 0 70%, 30% 70%, 30% 100%, 0 100%, 100% 100%, 70% 100%, 70% 70%, 100% 70%, 100% 30%, 70% 30%, 70% 0, 100% 0); }
.pcms-header-unified[data-pointer="framed"] .pcms-header-nav > a:hover::before,
.pcms-header-unified[data-pointer="framed"] .pcms-header-nav > .pcms-menu-dropdown > a:hover::before { opacity: 1; transform: scale(1); }

/* Background pointer — fill that sweeps/fades in behind the text */
.pcms-header-unified[data-pointer="background"] .pcms-header-nav > a,
.pcms-header-unified[data-pointer="background"] .pcms-header-nav > .pcms-menu-dropdown > a { z-index: 0; }
.pcms-header-unified[data-pointer="background"] .pcms-header-nav > a::before,
.pcms-header-unified[data-pointer="background"] .pcms-header-nav > .pcms-menu-dropdown > a::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--pcms-pointer-color, var(--brand-color, #8B5CF6));
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.pcms-header-unified[data-pointer="background"][data-pointer-anim="grow"] .pcms-header-nav > a::before { transform: scale(0); }
.pcms-header-unified[data-pointer="background"][data-pointer-anim="sweep-left"] .pcms-header-nav > a::before { transform: scaleX(0); transform-origin: right; opacity: 1; }
.pcms-header-unified[data-pointer="background"][data-pointer-anim="sweep-right"] .pcms-header-nav > a::before { transform: scaleX(0); transform-origin: left; opacity: 1; }
.pcms-header-unified[data-pointer="background"] .pcms-header-nav > a:hover::before,
.pcms-header-unified[data-pointer="background"] .pcms-header-nav > .pcms-menu-dropdown > a:hover::before { opacity: 1; transform: scale(1) scaleX(1); }

/* Text pointer — transforms the label itself on hover */
.pcms-header-unified[data-pointer="text"] .pcms-header-nav > a,
.pcms-header-unified[data-pointer="text"] .pcms-header-nav > .pcms-menu-dropdown > a { transition: transform 0.3s ease, color 0.3s ease; overflow: visible; }
.pcms-header-unified[data-pointer="text"][data-pointer-anim="grow"]   .pcms-header-nav > a:hover { transform: scale(1.12); }
.pcms-header-unified[data-pointer="text"][data-pointer-anim="skew"]   .pcms-header-nav > a:hover { transform: skewX(-12deg); }
.pcms-header-unified[data-pointer="text"][data-pointer-anim="rotate"] .pcms-header-nav > a:hover { transform: rotate(-4deg); }
.pcms-header-unified[data-pointer="text"] .pcms-header-nav > a:hover,
.pcms-header-unified[data-pointer="text"] .pcms-header-nav > .pcms-menu-dropdown > a:hover { color: var(--pcms-pointer-color, var(--brand-color, #8B5CF6)); }

/* Mobile drawer accordion (submenu groups built by widgets.js) */
.pcms-drawer-group-toggle {
    background: none; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 10px 8px; font-size: 15px; border-radius: 6px;
}
.pcms-drawer-group-toggle span:last-child { transition: transform 0.2s ease; }
.pcms-drawer-group.is-open .pcms-drawer-group-toggle span:last-child { transform: rotate(180deg); }
.pcms-drawer-sub { display: none; flex-direction: column; padding-left: 12px; }
.pcms-drawer-group.is-open .pcms-drawer-sub { display: flex; }

/* Drawer footer — search + CTA(s) + account + social cloned into the drawer */
.pcms-drawer-extras {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.pcms-drawer-search input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    color: inherit;
    font-size: 15px;
    outline: none;
}
.pcms-drawer-btn { display: block !important; width: 100%; box-sizing: border-box; text-align: center; }
.pcms-drawer-extras .pcms-header-account {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 10px;
}
.pcms-drawer-social { align-self: center; margin-top: 4px; }

/* ============================================================
   UNIFIED HEADER — extra features: announcement bar, social
   icons, secondary CTA, scroll progress, glassmorphism.
   ============================================================ */

/* ---- Announcement bar (injected before the header) ---- */
.pcms-announce-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 9px 44px;
    font-size: 14px;
    text-align: center;
}
.pcms-announce-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.pcms-announce-link {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}
.pcms-announce-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.8;
}
.pcms-announce-close:hover { opacity: 1; }

/* ---- Social icon row ---- */
.pcms-header-social { display: inline-flex; align-items: center; gap: 12px; }
.pcms-header-social a {
    display: inline-flex;
    color: inherit;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.pcms-header-social a:hover { opacity: 1; transform: translateY(-1px); }

/* ---- Secondary CTA button ---- */
.pcms-header-cta2 {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: var(--btn-radius, 6px);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}
.pcms-header-cta2.pcms-cta2-solid {
    background: var(--brand-color, #8B5CF6);
    color: #fff;
}
.pcms-header-cta2.pcms-cta2-solid:hover { background: var(--brand-dark, #7c3aed); }
.pcms-header-cta2.pcms-cta2-outline {
    background: transparent;
    color: var(--brand-color, #8B5CF6);
    border: 1px solid var(--brand-color, #8B5CF6);
}
.pcms-header-cta2.pcms-cta2-outline:hover {
    background: var(--brand-color, #8B5CF6);
    color: #fff;
}
.pcms-header-cta2.pcms-cta2-ghost {
    background: transparent;
    color: var(--text-light, #e2e2ef);
}
.pcms-header-cta2.pcms-cta2-ghost:hover { color: var(--brand-color, #8B5CF6); }

/* ---- Scroll progress bar ---- */
.pcms-header-main { position: relative; }
.pcms-header-progress {
    position: absolute;
    left: 0; bottom: 0;
    height: 3px;
    width: 0;
    background: var(--pcms-progress-color, var(--brand-color, #8B5CF6));
    transition: width 0.1s linear;
    z-index: 2;
    pointer-events: none;
}

/* ---- Glassmorphism (frosted, translucent header) ---- */
.pcms-header-unified[data-glass="1"] .pcms-header-main {
    background: var(--pcms-glass-tint, rgba(20,20,35,0.55)) !important;
    -webkit-backdrop-filter: blur(var(--pcms-glass-blur, 12px));
    backdrop-filter: blur(var(--pcms-glass-blur, 12px));
}

/* ---- Per-menu-item icons + badges (from Admin → Menus) ---- */
.pcms-header-nav a, .pcms-dropdown-menu a { align-items: center; }
.pcms-menu-icon { display: inline-flex; align-items: center; font-size: 1.05em; line-height: 1; }
.pcms-menu-badge {
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #ef4444;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: 2px;
    white-space: nowrap;
}

/* ============================================================
   UNIFIED FOOTER — replaces 3 legacy footer variants. Layout
   controlled via data-layout: simple (just copyright), columns
   (link groups + social), or newsletter (subscribe form on top
   of columns).
   ============================================================ */
.pcms-footer-unified[data-layout="simple"] .pcms-footer-newsletter,
.pcms-footer-unified[data-layout="simple"] .pcms-footer-columns {
    display: none !important;
}
.pcms-footer-unified[data-layout="simple"] {
    padding: 30px 20px !important;
}
.pcms-footer-unified[data-layout="simple"] .pcms-footer-copyright {
    border-top: none;
    padding-top: 0;
}
.pcms-footer-unified[data-layout="newsletter"] .pcms-footer-newsletter {
    display: block !important;
}
.pcms-footer-unified[data-layout="newsletter"] .pcms-footer-columns {
    /* Newsletter layout shows columns BELOW the newsletter signup. */
    display: grid;
}

/* ============================================================
   UNIFIED HERO — replaces 3 legacy hero variants. Style
   controlled via data-style: gradient (default centered text),
   image (background image with overlay), split (text + visual).
   ============================================================ */
.pcms-hero-unified[data-style="image"] {
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.55)), var(--pcms-hero-bg, none) !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
.pcms-hero-unified[data-style="image"] .pcms-hero-content {
    text-shadow: 1px 1px 6px rgba(0,0,0,0.4);
}

/* Split style — text on one half, visual block on the other */
.pcms-hero-unified[data-style="split"] {
    align-items: stretch;
    padding: 0 !important;
}
.pcms-hero-unified[data-style="split"] .pcms-hero-content {
    flex: 1;
    min-width: 300px;
    text-align: left;
    margin: 0;
    padding: 60px 40px;
    align-self: center;
}
.pcms-hero-unified[data-style="split"] .pcms-hero-cta {
    justify-content: flex-start;
}
.pcms-hero-unified[data-style="split"] .pcms-hero-visual {
    display: flex !important;
}

/* (Unified-header rules consolidated into the block above — the
   duplicate definitions that lived here were removed 2026-06-03.) */

/* ============================================================
   UNIFIED CARD INTERACTIVE — replaces both Interactive Card and
   Interactive Promo with a single widget. data-effect controls
   the hover behavior:
   - slide-up: reveal panel slides up from bottom
   - fade:     reveal panel fades in
   - zoom:     reveal panel settles in from slightly oversized
   - reveal:   no panel — the front overlay darkens
   A saved card keeps the block's starting styles in #id rules
   (GrapesJS moves inline styles there) and an id beats every
   selector here, so none of these hover states used to apply: the
   title faded out and the panel stayed parked below the card. The
   moving parts (opacity, transform, transition) are !important for
   that reason; colours, padding and radius stay with the saved
   rules so the panel's pickers still win.
   ============================================================ */
.pcms-card-interactive {
    --pcms-ci-ease: cubic-bezier(.22, 1, .36, 1);
    isolation: isolate; /* Safari: keeps the rounded corners clipping the zooming image */
}
/* The scrim's top edge fades into the photo instead of stopping on a line. */
.pcms-card-interactive .pcms-ci-front {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20px);
            mask-image: linear-gradient(to bottom, transparent, #000 20px);
}
.pcms-card-interactive .pcms-ci-reveal {
    opacity: 0 !important;
    transform: translateY(100%) !important;
    pointer-events: none;
}
.pcms-card-interactive[data-effect="fade"] .pcms-ci-reveal { transform: none !important; }
.pcms-card-interactive[data-effect="zoom"] .pcms-ci-reveal { transform: scale(1.08) !important; }
.pcms-card-interactive[data-effect="reveal"] .pcms-ci-reveal { display: none !important; }

.pcms-card-interactive:not([data-effect="reveal"]):is(:hover, :focus-within) .pcms-ci-front { opacity: 0 !important; }
.pcms-card-interactive:is(:hover, :focus-within) .pcms-ci-reveal {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto;
}
/* Reveal mode darkens with a layer that fades in behind the text —
   swapping the gradient itself can't be animated, so it snapped. */
.pcms-card-interactive[data-effect="reveal"] .pcms-ci-front::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.4) 60%, rgba(0,0,0,0));
    opacity: 0;
    pointer-events: none;
}
.pcms-card-interactive[data-effect="reveal"]:is(:hover, :focus-within) .pcms-ci-front::before { opacity: 1; }

/* In: the front clears fast, the panel glides in, then its lines
   settle one after another. Out: the lines go first and the front
   fades back as the panel clears — the two sets of text never sit
   on top of each other at full strength. */
@media (prefers-reduced-motion: no-preference) {
    .pcms-card-interactive .pcms-ci-bg {
        transition: transform .9s var(--pcms-ci-ease) !important;
        will-change: transform;
        backface-visibility: hidden;
    }
    .pcms-card-interactive:is(:hover, :focus-within) .pcms-ci-bg { transform: scale(1.06) !important; }

    .pcms-card-interactive .pcms-ci-front { transition: opacity .35s ease .1s !important; }
    .pcms-card-interactive:is(:hover, :focus-within) .pcms-ci-front { transition: opacity .2s ease !important; }

    .pcms-card-interactive .pcms-ci-reveal { transition: transform .45s cubic-bezier(.65, 0, .35, 1), opacity .25s ease .05s !important; }
    .pcms-card-interactive:is(:hover, :focus-within) .pcms-ci-reveal { transition: transform .6s var(--pcms-ci-ease), opacity .35s ease !important; }

    .pcms-card-interactive .pcms-ci-reveal > * {
        opacity: 0;
        transform: translateY(12px);
        transition: opacity .15s ease, transform .15s ease;
    }
    .pcms-card-interactive:is(:hover, :focus-within) .pcms-ci-reveal > * {
        opacity: 1;
        transform: none;
        transition: opacity .45s ease, transform .6s var(--pcms-ci-ease);
    }
    .pcms-card-interactive:is(:hover, :focus-within) .pcms-ci-reveal > :nth-child(1) { transition-delay: .12s; }
    .pcms-card-interactive:is(:hover, :focus-within) .pcms-ci-reveal > :nth-child(2) { transition-delay: .18s; }
    .pcms-card-interactive:is(:hover, :focus-within) .pcms-ci-reveal > :nth-child(n+3) { transition-delay: .24s; }

    .pcms-card-interactive[data-effect="reveal"] .pcms-ci-front::before { transition: opacity .5s var(--pcms-ci-ease); }
}
@media (prefers-reduced-motion: reduce) {
    .pcms-card-interactive .pcms-ci-bg,
    .pcms-card-interactive .pcms-ci-front,
    .pcms-card-interactive .pcms-ci-reveal { transition: none !important; }
}

/* ============================================================
   STACKED CARDS (port of EA Stacked_Cards).
   Cards animate in as they reach the viewport. JS toggles
   .is-visible via IntersectionObserver.
   ============================================================ */
.pcms-stacked-card.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
/* Sticky variant — give each card a sticky scroll-stop so they
   physically stack when scrolled past. Activated via data-mode.
   In sticky mode we OVERRIDE the inline reveal styles set by the
   block (opacity:0 + translateY(60px)) since sticky mode is about
   stacking, not popping in from below. The translateZ(0) + will-
   change promote each card to its own compositor layer, which kills
   jitter on slower scrollbars (especially Safari). */
.pcms-stacked-cards[data-mode="sticky"] .pcms-stacked-card {
    position: sticky;
    top: 80px;
    opacity: 1 !important;
    transform: translateZ(0) !important;
    will-change: transform;
    backface-visibility: hidden;
}

/* ============================================================
   REDUCED MOTION — respect the user's OS preference. Applies to
   every widget animation that's purely decorative. We don't kill
   functional animations (e.g. accordion expand) — those stay so
   users can still see what changed.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    /* Particle drift, fancy text effects, hover-zoom backgrounds. */
    .pcms-particle-bg span,
    .pcms-fancy-chart-canvas,
    .pcms-ic-bg,
    .pcms-ip-bg,
    .pcms-img-acc-item,
    .pcms-stacked-card,
    .pcms-slides-track,
    .pcms-carousel-track,
    .pcms-image-scroller .pcms-scroller-img,
    .pcms-counter-icon,
    [data-fade-in],
    [data-parallax="1"] {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    /* Restore functional sticky positioning that the transform reset
       above might have undone. */
    .pcms-stacked-cards[data-mode="sticky"] .pcms-stacked-card {
        position: sticky;
        top: 80px;
    }
    /* Fade-in elements should be visible immediately — don't trap
       them in opacity:0. */
    [data-fade-in] {
        opacity: 1 !important;
    }
    /* Hover-pulse on hotspots etc. — make them static. */
    [data-pulse="1"] .pcms-hotspot {
        animation: none !important;
    }
}

/* ============================================================
   LIQUID GLASS EFFECT (port of EA Liquid_Glass_Effect).
   Backdrop-filter blur + translucent fill. Custom properties
   set by trait control let users tune blur + opacity inline.
   ============================================================ */
[data-glass="1"] {
    background-color: rgba(255, 255, 255, var(--pcms-glass-opacity, 0.25)) !important;
    backdrop-filter: blur(var(--pcms-glass-blur, 12px));
    -webkit-backdrop-filter: blur(var(--pcms-glass-blur, 12px));
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ============================================================
   MEGA MENU (port of EA Advanced_Menu / Elementor Pro Mega_Menu).
   Hover/active link styling. Dropdown visibility is toggled by
   inline display:block/none from the runtime — these styles only
   handle the link/hover polish.
   ============================================================ */
.pcms-mega-menu .pcms-mm-link:hover {
    background: rgba(139, 92, 246, 0.12);
    color: var(--brand-color, #C4B5FD);
}
.pcms-mega-menu .pcms-mm-dropdown a:hover {
    background: rgba(139, 92, 246, 0.12);
    color: var(--brand-color, #C4B5FD);
}

/* ============================================================
   PAGE BACKGROUND — fixed full-viewport layer, z-index:-1.
   Drop a Page BG block anywhere on a page; it renders behind
   all content on the live site. position:fixed is overridden
   to position:relative inside the builder canvas via frameStyle.
   ============================================================ */
.pcms-page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    min-height: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* ============================================================
   PARTICLE SECTION (port of EA Particle_Section extension).
   Pure CSS keyframe animation; particles spawn from below and
   drift up + fade out. JS just creates the spans with random
   left positions and durations.
   ============================================================ */
@keyframes pcms-particle-float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% { opacity: 1; }
    50% {
        transform: translateY(-50vh) translateX(20px);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-110vh) translateX(-20px);
        opacity: 0;
    }
}

/* ============================================================
   BOUNCING BALLS — gravity-style up/down loop + slow horizontal
   drift, layered so each ball traces a Lissajous path. Inline
   styles in widgets.js stagger duration + delay per ball so the
   swarm looks organic rather than synchronized.
   ============================================================ */
@keyframes pcms-ball-bounce {
    0%   { transform: translateY(0) scaleY(1); }
    8%   { transform: translateY(-4px) scaleY(0.92); }
    50%  { transform: translateY(-50vh) scaleY(1.02); }
    92%  { transform: translateY(-4px) scaleY(0.92); }
    100% { transform: translateY(0) scaleY(1); }
}
@keyframes pcms-ball-drift {
    0%   { margin-left: 0; }
    100% { margin-left: 18vw; }
}
@media (prefers-reduced-motion: reduce) {
    .pcms-balls-bg > span { animation: none !important; }
}

/* ============================================================
   MATRIX RAIN — falling glyph columns. Each column has its own
   duration + delay set inline by widgets.js so cascades stagger.
   The top-and-bottom mask gradient is also inline so we don't
   need per-column CSS overrides.
   ============================================================ */
@keyframes pcms-matrix-fall {
    0%   { transform: translateY(0); }
    100% { transform: translateY(150%); }
}

/* ============================================================
   SNOW — straight fall (top → past bottom) + slow horizontal sway.
   Two separate animations layer to give the snowflake a wobble.
   ============================================================ */
@keyframes pcms-snow-fall {
    0%   { transform: translateY(0); opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { transform: translateY(120vh); opacity: 0; }
}
@keyframes pcms-snow-sway {
    0%   { margin-left: -8px; }
    100% { margin-left: 8px; }
}

/* ============================================================
   LEAVES — fall + slow spin. The leaf shape (border-radius
   50% 0 50% 0) is set inline; only motion lives here.
   ============================================================ */
@keyframes pcms-leaf-fall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(125vh) rotate(360deg); opacity: 0; }
}
@keyframes pcms-leaf-spin {
    0%   { margin-left: -20px; }
    100% { margin-left: 20px; }
}

/* ============================================================
   RAIN — short, fast, repeating streaks at a slight angle.
   Inline transform:rotate(12deg) on the span handles the slant.
   ============================================================ */
@keyframes pcms-rain-fall {
    0%   { transform: translateY(-20vh) rotate(12deg); opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translateY(110vh) rotate(12deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .pcms-matrix-bg > div,
    .pcms-snow-bg > span,
    .pcms-leaves-bg > span,
    .pcms-rain-bg > span {
        animation: none !important;
    }
}

/* ============================================================
   AURORA — three blurry layers that slowly translate across the
   section. The .pcms-aurora-bg wrapper applies the blur; layers
   only need movement.
   ============================================================ */
@keyframes pcms-aurora-1 {
    0%   { transform: translate(-15%, -10%) scale(1); }
    100% { transform: translate(25%, 15%) scale(1.4); }
}
@keyframes pcms-aurora-2 {
    0%   { transform: translate(50%, -10%) scale(1.2); }
    100% { transform: translate(20%, 30%) scale(0.9); }
}
@keyframes pcms-aurora-3 {
    0%   { transform: translate(20%, 40%) scale(1.1); }
    100% { transform: translate(-10%, 10%) scale(1.3); }
}

/* ============================================================
   MESH GRADIENT — 5 blurry blobs drift through one of three
   per-blob keyframe paths so neighbors don't move in lockstep.
   ============================================================ */
@keyframes pcms-mesh-drift-1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20%, 15%) scale(1.3); }
}
@keyframes pcms-mesh-drift-2 {
    0%   { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-15%, 25%) scale(0.9); }
}
@keyframes pcms-mesh-drift-3 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(25%, -15%) scale(1.2); }
}

/* ============================================================
   STARFIELD — twinkle is the only animation; positions are
   static (set inline by the runtime). Each star gets its own
   duration + delay so the field shimmers organically.
   ============================================================ */
@keyframes pcms-star-twinkle {
    0%, 100% { opacity: 0.2; }
    50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .pcms-aurora-bg > div,
    .pcms-mesh-bg > div,
    .pcms-starfield-bg > span {
        animation: none !important;
    }
}

/* ============================================================
   SCROLL-TRIGGERED ENTRANCE ANIMATIONS
   Elements get data-pcms-entrance="fade-up" (or any variant).
   widgets.js adds .pcms-entrance-ready immediately (sets the
   initial offstage state) then .pcms-entrance-in when the
   IntersectionObserver fires, triggering the keyframe-driven
   transition into final position.
   ============================================================ */
.pcms-entrance-ready { opacity: 0; will-change: transform, opacity; }
.pcms-entrance-ready[data-pcms-entrance="fade-up"]    { transform: translateY(40px); }
.pcms-entrance-ready[data-pcms-entrance="fade-down"]  { transform: translateY(-40px); }
.pcms-entrance-ready[data-pcms-entrance="fade-left"]  { transform: translateX(40px); }
.pcms-entrance-ready[data-pcms-entrance="fade-right"] { transform: translateX(-40px); }
.pcms-entrance-ready[data-pcms-entrance="zoom-in"]    { transform: scale(0.85); }
.pcms-entrance-ready[data-pcms-entrance="zoom-out"]   { transform: scale(1.12); }
.pcms-entrance-ready[data-pcms-entrance="flip-up"]    { transform: perspective(800px) rotateX(-30deg); transform-origin: bottom; }
.pcms-entrance-ready[data-pcms-entrance="fade-in"]    { transform: none; }
/* Added 2026-07-26 — the original eight covered fade/zoom/flip only, so any
   entrance with a bit more character meant reaching for animate.css and its
   fixed timing. These ride the same ready/in machinery. */
.pcms-entrance-ready[data-pcms-entrance="slide-up-far"]   { transform: translateY(110px); }
.pcms-entrance-ready[data-pcms-entrance="slide-left-far"] { transform: translateX(120px); }
.pcms-entrance-ready[data-pcms-entrance="slide-right-far"]{ transform: translateX(-120px); }
.pcms-entrance-ready[data-pcms-entrance="blur-in"]        { filter: blur(14px); transform: none; }
.pcms-entrance-ready[data-pcms-entrance="skew-in"]        { transform: skewY(6deg) translateY(34px); }
.pcms-entrance-ready[data-pcms-entrance="rotate-in"]      { transform: rotate(-8deg) scale(0.92); }
.pcms-entrance-ready[data-pcms-entrance="flip-down"]      { transform: perspective(800px) rotateX(30deg); transform-origin: top; }
.pcms-entrance-ready[data-pcms-entrance="flip-left"]      { transform: perspective(800px) rotateY(-35deg); transform-origin: left; }
.pcms-entrance-ready[data-pcms-entrance="flip-right"]     { transform: perspective(800px) rotateY(35deg); transform-origin: right; }
.pcms-entrance-ready[data-pcms-entrance="unfold"]         { transform: perspective(800px) rotateX(-70deg) scale(0.9); transform-origin: top; }
.pcms-entrance-ready[data-pcms-entrance="drop-in"]        { transform: translateY(-70px) scale(1.06); }
/* Duration and easing are custom properties so the panel's Duration slider and
   Easing picker can drive them per element. The fallbacks reproduce exactly
   what was hard-coded here before, so existing pages are unchanged. */
/* The timing is !important for as long as the entrance runs: an element's
   own transition (a saved #id rule, or the Card's hover timing) used to win,
   so the fade snapped and the slide ran at the hover's speed. widgets.js
   removes both classes once the entrance has played, which hands transform
   back for hover effects. Staging itself must not animate. */
.pcms-entrance-ready:not(.pcms-entrance-in) { transition: none !important; }
.pcms-entrance-in {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: opacity var(--pcms-entrance-dur, 0.8s) var(--pcms-ease, cubic-bezier(.16,.84,.44,1)),
                transform var(--pcms-entrance-dur, 0.8s) var(--pcms-ease, cubic-bezier(.16,.84,.44,1)),
                filter var(--pcms-entrance-dur, 0.8s) var(--pcms-ease, cubic-bezier(.16,.84,.44,1)) !important;
}

/* ============================================================
   IDLE / LOOP ANIMATIONS — data-pcms-loop
   Continuous motion that runs for as long as the element is on
   screen, as opposed to the one-shot entrance animations above.
   There was no way to express "this badge should keep floating"
   before; repeat:infinite on an ENTRANCE animation is the wrong
   tool, because entrances start offstage.
   Amplitude rides on --pcms-loop-amp (a unitless multiplier) and
   speed on --pcms-loop-dur, both set by the panel.
   ============================================================ */
[data-pcms-loop] {
    animation-duration: var(--pcms-loop-dur, 3s);
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    will-change: transform;
}
[data-pcms-loop="float"]     { animation-name: pcms-loop-float; }
[data-pcms-loop="bob"]       { animation-name: pcms-loop-bob; }
[data-pcms-loop="drift"]     { animation-name: pcms-loop-drift; }
[data-pcms-loop="pulse"]     { animation-name: pcms-loop-pulse; }
[data-pcms-loop="breathe"]   { animation-name: pcms-loop-breathe; }
[data-pcms-loop="swing"]     { animation-name: pcms-loop-swing; transform-origin: top center; }
[data-pcms-loop="wobble"]    { animation-name: pcms-loop-wobble; }
[data-pcms-loop="shake"]     { animation-name: pcms-loop-shake; }
[data-pcms-loop="heartbeat"] { animation-name: pcms-loop-heartbeat; }
[data-pcms-loop="spin"]      { animation-name: pcms-loop-spin; animation-timing-function: linear; }
[data-pcms-loop="flip"]      { animation-name: pcms-loop-flip; animation-timing-function: linear; }
[data-pcms-loop="glow"]      { animation-name: pcms-loop-glow; }
[data-pcms-loop="hue"]       { animation-name: pcms-loop-hue; animation-timing-function: linear; }

/* ============================================================
   GLOW  —  data-pcms-glow

   The widget-level Edge glow, available to any element on the
   page. Drawn with drop-shadow rather than box-shadow for two
   reasons: box-shadow is already owned by the Style tab's shadow
   control, and drop-shadow follows the element's actual silhouette
   — so it lights the edge of a rounded card, a cut-out PNG or an
   icon rather than the rectangle around it.

   Colour follows --pcms-glow-color, falling back to the site brand
   so a glow matches without being told.

   Worth knowing: filter creates a containing block, so a glow on an
   ancestor of a position:fixed child will pin that child to the
   glowing element instead of the viewport.
   ============================================================ */
[data-pcms-glow] {
    /* Author strength times the hover boost, resolved once so each filter
       below reads as a shape rather than repeating the arithmetic. */
    --pcms-glow-x: calc(var(--pcms-glow-amp, 1) * var(--pcms-glow-boost, 1));
    --pcms-glow-c: var(--pcms-glow-color, var(--brand-color, #8B5CF6));
    filter: var(--pcms-glow-filter);
    transition: filter 0.28s ease;
}
[data-pcms-glow="soft"] {
    --pcms-glow-filter: drop-shadow(0 0 calc(6px * var(--pcms-glow-x)) color-mix(in srgb, var(--pcms-glow-c) 60%, transparent));
}
[data-pcms-glow="medium"] {
    --pcms-glow-filter: drop-shadow(0 0 calc(12px * var(--pcms-glow-x)) var(--pcms-glow-c));
}
[data-pcms-glow="strong"] {
    --pcms-glow-filter: drop-shadow(0 0 calc(10px * var(--pcms-glow-x)) var(--pcms-glow-c))
                        drop-shadow(0 0 calc(26px * var(--pcms-glow-x)) color-mix(in srgb, var(--pcms-glow-c) 55%, transparent));
}
/* Neon is the strong glow with a tight inner core, which is what stops a big
   blur reading as fog rather than as light. */
[data-pcms-glow="neon"] {
    --pcms-glow-filter: drop-shadow(0 0 calc(2px * var(--pcms-glow-x)) var(--pcms-glow-c))
                        drop-shadow(0 0 calc(10px * var(--pcms-glow-x)) var(--pcms-glow-c))
                        drop-shadow(0 0 calc(30px * var(--pcms-glow-x)) color-mix(in srgb, var(--pcms-glow-c) 50%, transparent));
}
/* Grows on hover, for the same reason the widget rim does: the one moment it
   most wants to respond. Opt-in, so a glow that should sit still can. The
   boost multiplies whatever strength the author set rather than replacing it. */
[data-pcms-glow][data-pcms-glow-hover="1"]:hover { --pcms-glow-boost: 1.8; }

/* ============================================================
   HOVER ANIMATION  —  data-pcms-hover-fx

   The third kind of motion an element can have, next to the
   one-shot entrance above and the continuous loop below it.
   There was no way to say "this card should rise when you point
   at it": Magnetic Cursor and 3D Tilt both track the pointer's
   POSITION, which is a different and much busier idea, and the
   hover state in the Style tab changes colours rather than moving
   anything.

   Amplitude rides on --pcms-hover-amp (a unitless multiplier) and
   speed on --pcms-hover-dur, both written by the panel, matching
   how the loop animations take their amplitude and duration.

   transform and filter are transitioned rather than animated, so
   an interrupted hover returns smoothly instead of snapping.
   ============================================================ */
[data-pcms-hover-fx] {
    transition: transform var(--pcms-hover-dur, 0.28s) cubic-bezier(.2, .7, .3, 1),
                box-shadow var(--pcms-hover-dur, 0.28s) ease,
                filter var(--pcms-hover-dur, 0.28s) ease;
}
[data-pcms-hover-fx="lift"]:hover {
    transform: translateY(calc(-4px * var(--pcms-hover-amp, 1)));
    box-shadow: 0 calc(10px * var(--pcms-hover-amp, 1)) calc(24px * var(--pcms-hover-amp, 1)) -8px rgba(0, 0, 0, 0.45);
}
[data-pcms-hover-fx="float"]:hover {
    transform: translateY(calc(-8px * var(--pcms-hover-amp, 1)));
}
[data-pcms-hover-fx="grow"]:hover   { transform: scale(calc(1 + 0.04 * var(--pcms-hover-amp, 1))); }
[data-pcms-hover-fx="shrink"]:hover { transform: scale(calc(1 - 0.04 * var(--pcms-hover-amp, 1))); }
[data-pcms-hover-fx="press"]:hover  { transform: translateY(calc(2px * var(--pcms-hover-amp, 1))) scale(0.99); }
[data-pcms-hover-fx="tilt"]:hover   { transform: rotate(calc(-1.5deg * var(--pcms-hover-amp, 1))); }
[data-pcms-hover-fx="skew"]:hover   { transform: skewX(calc(-4deg * var(--pcms-hover-amp, 1))); }
/* Colour-based ones. --pcms-hover-color falls back to the site brand, so a
   glow matches without being told; brighten needs no colour at all. */
[data-pcms-hover-fx="glow"]:hover {
    box-shadow: 0 0 calc(18px * var(--pcms-hover-amp, 1))
                var(--pcms-hover-color, var(--brand-color, #8B5CF6));
}
[data-pcms-hover-fx="ring"]:hover {
    box-shadow: 0 0 0 calc(2px * var(--pcms-hover-amp, 1))
                var(--pcms-hover-color, var(--brand-color, #8B5CF6));
}
[data-pcms-hover-fx="brighten"]:hover {
    /* Carries the resting glow through — an element that glows would otherwise
       lose it the moment you pointed at it, because filter replaces. */
    filter: var(--pcms-glow-filter, ) brightness(calc(1 + 0.18 * var(--pcms-hover-amp, 1)));
}
/* Lift plus glow, because "raised AND lit" is the combination people
   actually reach for and expressing it needed two controls. */
[data-pcms-hover-fx="lift-glow"]:hover {
    transform: translateY(calc(-4px * var(--pcms-hover-amp, 1)));
    box-shadow: 0 calc(10px * var(--pcms-hover-amp, 1)) calc(24px * var(--pcms-hover-amp, 1)) -8px rgba(0, 0, 0, 0.45),
                0 0 calc(16px * var(--pcms-hover-amp, 1)) var(--pcms-hover-color, var(--brand-color, #8B5CF6));
}

@keyframes pcms-loop-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(calc(-12px * var(--pcms-loop-amp, 1))); }
}
@keyframes pcms-loop-bob {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(calc(-8px * var(--pcms-loop-amp, 1))) scale(calc(1 + 0.02 * var(--pcms-loop-amp, 1))); }
}
@keyframes pcms-loop-drift {
    0%, 100% { transform: translate(0, 0); }
    25%      { transform: translate(calc(9px * var(--pcms-loop-amp, 1)), calc(-6px * var(--pcms-loop-amp, 1))); }
    50%      { transform: translate(0, calc(-11px * var(--pcms-loop-amp, 1))); }
    75%      { transform: translate(calc(-9px * var(--pcms-loop-amp, 1)), calc(-6px * var(--pcms-loop-amp, 1))); }
}
@keyframes pcms-loop-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(calc(1 + 0.06 * var(--pcms-loop-amp, 1))); }
}
@keyframes pcms-loop-breathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(calc(1 + 0.03 * var(--pcms-loop-amp, 1))); opacity: 0.72; }
}
@keyframes pcms-loop-swing {
    0%, 100% { transform: rotate(calc(-3deg * var(--pcms-loop-amp, 1))); }
    50%      { transform: rotate(calc(3deg * var(--pcms-loop-amp, 1))); }
}
@keyframes pcms-loop-wobble {
    0%, 100% { transform: translateX(0) rotate(0); }
    25%      { transform: translateX(calc(-6px * var(--pcms-loop-amp, 1))) rotate(calc(-2deg * var(--pcms-loop-amp, 1))); }
    75%      { transform: translateX(calc(6px * var(--pcms-loop-amp, 1))) rotate(calc(2deg * var(--pcms-loop-amp, 1))); }
}
@keyframes pcms-loop-shake {
    0%, 100%      { transform: translateX(0); }
    20%, 60%      { transform: translateX(calc(-4px * var(--pcms-loop-amp, 1))); }
    40%, 80%      { transform: translateX(calc(4px * var(--pcms-loop-amp, 1))); }
}
@keyframes pcms-loop-heartbeat {
    0%, 28%, 100% { transform: scale(1); }
    14%           { transform: scale(calc(1 + 0.11 * var(--pcms-loop-amp, 1))); }
    21%           { transform: scale(calc(1 + 0.04 * var(--pcms-loop-amp, 1))); }
}
@keyframes pcms-loop-spin {
    to { transform: rotate(360deg); }
}
@keyframes pcms-loop-flip {
    to { transform: perspective(700px) rotateY(360deg); }
}
@keyframes pcms-loop-glow {
    0%, 100% { filter: drop-shadow(0 0 calc(3px * var(--pcms-loop-amp, 1)) var(--pcms-loop-color, var(--brand-color, #8B5CF6))); }
    50%      { filter: drop-shadow(0 0 calc(14px * var(--pcms-loop-amp, 1)) var(--pcms-loop-color, var(--brand-color, #8B5CF6))); }
}
@keyframes pcms-loop-hue {
    to { filter: hue-rotate(360deg); }
}

/* ============================================================
   ANIMATED GRADIENT — data-pcms-gradient-anim
   Slides an oversized gradient behind the element (or its text).
   Works with whatever gradient the Background control already
   wrote; we only oversize it and move the position.
   ============================================================ */
[data-pcms-gradient-anim="1"] {
    background-size: 300% 300% !important;
    animation: pcms-gradient-shift var(--pcms-gradient-dur, 8s) ease infinite;
}
[data-pcms-gradient-anim="1"][data-pcms-gradient-dir="horizontal"] { animation-name: pcms-gradient-shift-x; }
[data-pcms-gradient-anim="1"][data-pcms-gradient-dir="vertical"]   { animation-name: pcms-gradient-shift-y; }
@keyframes pcms-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
@keyframes pcms-gradient-shift-x {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
@keyframes pcms-gradient-shift-y {
    0%   { background-position: 50% 0%; }
    100% { background-position: 50% 300%; }
}

/* ============================================================
   STAGGERED CHILDREN — data-pcms-stagger
   The container carries the setting; widgets.js copies the chosen
   entrance onto each child and sets an incremental delay. Before
   this, a row of six cards meant opening six panels and typing six
   delays by hand.
   ============================================================ */
[data-pcms-stagger] > * { will-change: transform, opacity; }

/* ============================================================
   TEXT REVEAL BY WORD / LINE — data-pcms-text-reveal
   The existing split-letter reveal is lovely on a three-word
   headline and unreadable on a paragraph. widgets.js wraps each
   word (or line) in a span; these stage and release them.
   ============================================================ */
.pcms-tr-part {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.6em);
    transition: opacity 0.5s var(--pcms-ease, cubic-bezier(.16,.84,.44,1)),
                transform 0.5s var(--pcms-ease, cubic-bezier(.16,.84,.44,1));
}
/* Line wrappers are marked with their own class rather than selected via the
   parent's mode attribute. Keying off the parent made the block display apply
   to the WORD spans too — which is what the runtime measures to find the real
   line breaks, so every word landed on its own line and "line mode" produced
   one line per word. */
.pcms-tr-line { display: block; }
.pcms-tr-in .pcms-tr-part { opacity: 1; transform: none; }
/* Words keep their spacing: the wrapper is inline-block, so the
   whitespace between wrappers must survive collapsing. */
.pcms-tr-space { display: inline; white-space: pre; }

/* ============================================================
   KEN BURNS — data-pcms-kenburns
   Slow drift across a background image. A hero staple with no
   equivalent here before: the only way to get motion behind
   text was a video or one of the particle canvases.
   Applied to the element's own background, so it needs no extra
   markup — just background-size room to move into.
   ============================================================ */
[data-pcms-kenburns] {
    overflow: hidden;
    background-size: cover;
    animation-duration: var(--pcms-kb-dur, 20s);
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
    will-change: background-position, background-size;
}
[data-pcms-kenburns="zoom-in"]     { animation-name: pcms-kb-zoom-in; }
[data-pcms-kenburns="zoom-out"]    { animation-name: pcms-kb-zoom-out; }
[data-pcms-kenburns="pan-left"]    { animation-name: pcms-kb-pan-left; }
[data-pcms-kenburns="pan-right"]   { animation-name: pcms-kb-pan-right; }
[data-pcms-kenburns="pan-up"]      { animation-name: pcms-kb-pan-up; }
[data-pcms-kenburns="pan-down"]    { animation-name: pcms-kb-pan-down; }
[data-pcms-kenburns="zoom-pan"]    { animation-name: pcms-kb-zoom-pan; }

@keyframes pcms-kb-zoom-in {
    from { background-size: 100%; }
    to   { background-size: calc(100% + 18% * var(--pcms-kb-amp, 1)); }
}
@keyframes pcms-kb-zoom-out {
    from { background-size: calc(100% + 18% * var(--pcms-kb-amp, 1)); }
    to   { background-size: 100%; }
}
/* Panning needs the image oversized first, or there is nothing
   either side of the frame to pan into. */
@keyframes pcms-kb-pan-left {
    from { background-size: 120%; background-position: 100% 50%; }
    to   { background-size: 120%; background-position: 0% 50%; }
}
@keyframes pcms-kb-pan-right {
    from { background-size: 120%; background-position: 0% 50%; }
    to   { background-size: 120%; background-position: 100% 50%; }
}
@keyframes pcms-kb-pan-up {
    from { background-size: 120%; background-position: 50% 100%; }
    to   { background-size: 120%; background-position: 50% 0%; }
}
@keyframes pcms-kb-pan-down {
    from { background-size: 120%; background-position: 50% 0%; }
    to   { background-size: 120%; background-position: 50% 100%; }
}
@keyframes pcms-kb-zoom-pan {
    from { background-size: 110%; background-position: 30% 40%; }
    to   { background-size: calc(120% + 10% * var(--pcms-kb-amp, 1)); background-position: 70% 60%; }
}

/* ============================================================
   FILM GRAIN / NOISE — data-pcms-grain
   A tiny inline SVG turbulence tile, repeated. Self-contained on
   purpose: no image asset to upload, lose, or serve, and it works
   offline and inside the builder canvas identically.
   ============================================================ */
[data-pcms-grain] { position: relative; isolation: isolate; }
[data-pcms-grain]::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: var(--pcms-grain-opacity, 0.12);
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: var(--pcms-grain-scale, 120px) var(--pcms-grain-scale, 120px);
}
/* Animated grain jitters the tile so it reads as film rather than
   a static texture sitting on top of the page. */
[data-pcms-grain="animated"]::after {
    animation: pcms-grain-jitter 0.6s steps(4) infinite;
}
@keyframes pcms-grain-jitter {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-2%, 1%); }
    50%  { transform: translate(1%, -2%); }
    75%  { transform: translate(-1%, -1%); }
    100% { transform: translate(2%, 1%); }
}

/* ============================================================
   NATIVE SCROLL-DRIVEN ANIMATION — data-pcms-scroll-native
   animation-timeline: view() ties an animation to the element's
   own progress through the viewport, evaluated off the main
   thread. Where it is supported this is smoother than any
   scroll-listener can be; where it is not, the element simply
   sits at its resting state and the JS scroll FX still work.
   Guarded by @supports so unsupporting browsers never see the
   offstage start state and get stuck showing it.
   ============================================================ */
@supports (animation-timeline: view()) {
    [data-pcms-scroll-native] {
        animation-timeline: view();
        animation-fill-mode: both;
        animation-timing-function: linear;
        /* Default: play across the middle of the pass. */
        animation-range: var(--pcms-sn-start, entry 10%) var(--pcms-sn-end, cover 45%);
    }
    [data-pcms-scroll-native="reveal"]    { animation-name: pcms-sn-reveal; }
    [data-pcms-scroll-native="rise"]      { animation-name: pcms-sn-rise; }
    [data-pcms-scroll-native="zoom"]      { animation-name: pcms-sn-zoom; }
    [data-pcms-scroll-native="parallax"]  { animation-name: pcms-sn-parallax; animation-range: cover 0% cover 100%; }
    [data-pcms-scroll-native="rotate"]    { animation-name: pcms-sn-rotate; animation-range: cover 0% cover 100%; }
    [data-pcms-scroll-native="grow-line"] { animation-name: pcms-sn-grow-line; animation-range: entry 0% cover 40%; }

    @keyframes pcms-sn-reveal {
        from { opacity: 0; }
        to   { opacity: 1; }
    }
    @keyframes pcms-sn-rise {
        from { opacity: 0; transform: translateY(calc(60px * var(--pcms-sn-amp, 1))); }
        to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes pcms-sn-zoom {
        from { opacity: 0; transform: scale(calc(1 - 0.2 * var(--pcms-sn-amp, 1))); }
        to   { opacity: 1; transform: scale(1); }
    }
    @keyframes pcms-sn-parallax {
        from { transform: translateY(calc(-40px * var(--pcms-sn-amp, 1))); }
        to   { transform: translateY(calc(40px * var(--pcms-sn-amp, 1))); }
    }
    @keyframes pcms-sn-rotate {
        from { transform: rotate(calc(-8deg * var(--pcms-sn-amp, 1))); }
        to   { transform: rotate(calc(8deg * var(--pcms-sn-amp, 1))); }
    }
    @keyframes pcms-sn-grow-line {
        from { transform: scaleX(0); transform-origin: left; }
        to   { transform: scaleX(1); transform-origin: left; }
    }
}

/* ============================================================
   MOUSE-PARALLAX DEPTH — data-pcms-mouse-parallax
   Sibling of magnetic (pulls toward the cursor) and tilt (rotates
   toward it). This one shifts on a depth axis so several elements
   at different depths read as layers.
   ============================================================ */
[data-pcms-mouse-parallax] { will-change: transform; transition: transform 0.25s cubic-bezier(.2,.8,.2,1); }
[data-pcms-mouse-parallax].pcms-mp-active { transition: transform 0.08s linear; }

/* ============================================================
   CLICK RIPPLE — opt-in via data-pcms-ripple on any element.
   widgets.js spawns a <span class="pcms-ripple-wave"> at click
   coordinates; the keyframe fades + scales it.
   ============================================================ */
[data-pcms-ripple] { position: relative; overflow: hidden; }
.pcms-ripple-wave {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    pointer-events: none;
    animation: pcms-ripple 0.6s ease-out;
}
@keyframes pcms-ripple {
    to { transform: scale(4); opacity: 0; }
}

/* ============================================================
   MARQUEE — horizontal infinite scroll. The runtime clones the
   content track once so the loop is seamless. Speed via inline
   --pcms-marquee-speed (seconds for one cycle).
   ============================================================ */
.pcms-marquee {
    position: relative;
    overflow: hidden;
    width: 100%;
    --pcms-marquee-speed: 30s;
}
.pcms-marquee-track {
    display: flex;
    width: max-content;
    gap: 40px;
    animation: pcms-marquee-scroll var(--pcms-marquee-speed) linear infinite;
}
.pcms-marquee[data-direction="right"] .pcms-marquee-track { animation-direction: reverse; }
.pcms-marquee[data-paused="1"] .pcms-marquee-track { animation-play-state: paused; }
@keyframes pcms-marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================================
   SCROLL PROGRESS BAR — fixed-position thin bar at top of page.
   Width is animated in JS (rAF) — CSS just gives it the shape
   and lets the user tweak color/height inline.
   ============================================================ */
.pcms-scroll-progress {
    position: fixed; top: 0; left: 0;
    width: 0%; height: 3px;
    background: var(--brand-color, #8B5CF6);
    /* Must stay above the header — it's a hairline across the very top. */
    z-index: var(--pcms-z-overlay, 11000);
    transition: width 0.05s linear;
    pointer-events: none;
}

/* ============================================================
   SPLIT-LETTER REVEAL — runtime wraps each letter in a <span>
   with a stagger delay set inline. Letters slide + fade up.
   ============================================================ */
.pcms-split-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(24px);
    will-change: transform, opacity;
}
.pcms-split-letter.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(.16,.84,.44,1);
}

/* ============================================================
   CURSOR FOLLOWER — opt-in via body[data-pcms-cursor-follow="1"].
   The follower div trails the actual cursor with a slight delay
   (rAF-driven lerp). Pure visual; doesn't change pointer behavior.
   ============================================================ */
.pcms-cursor-follower {
    position: fixed; top: 0; left: 0;
    width: 24px; height: 24px;
    border: 2px solid var(--brand-color, #8B5CF6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 99999;
    transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
    mix-blend-mode: difference;
}
.pcms-cursor-follower.is-active {
    width: 48px; height: 48px;
    border-color: #fff;
}

/* ============================================================
   IMAGE REVEAL MASK — clip-path inset that retracts on scroll-in.
   data-pcms-reveal-direction sets which edge the mask sweeps from.
   ============================================================ */
[data-pcms-reveal] {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1.2s cubic-bezier(.7,.05,.3,1);
}
[data-pcms-reveal][data-pcms-reveal-direction="right"]  { clip-path: inset(0 0 0 100%); }
[data-pcms-reveal][data-pcms-reveal-direction="bottom"] { clip-path: inset(0 0 100% 0); }
[data-pcms-reveal][data-pcms-reveal-direction="top"]    { clip-path: inset(100% 0 0 0); }
[data-pcms-reveal].is-revealed { clip-path: inset(0 0 0 0) !important; }

/* ============================================================
   PAGE TRANSITION — full-screen overlay fades in on navigation,
   then the new page fades it out on DOMContentLoaded.
   ============================================================ */
.pcms-page-transition {
    position: fixed; inset: 0;
    background: var(--bg-dark, #0f0f23);
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.pcms-page-transition.is-leaving { opacity: 1; pointer-events: auto; }

/* Disable everything that moves under reduced-motion. */
@media (prefers-reduced-motion: reduce) {
    .pcms-entrance-ready,
    .pcms-entrance-in,
    .pcms-split-letter,
    .pcms-marquee-track,
    .pcms-scroll-progress,
    [data-pcms-loop],
    [data-pcms-hover-fx],
    .pcms-card,
    [data-pcms-gradient-anim],
    [data-pcms-mouse-parallax],
    [data-pcms-kenburns],
    [data-pcms-scroll-native],
    .pcms-tr-part,
    [data-pcms-reveal],
    .pcms-cursor-follower {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }
    /* Grain is deliberately NOT in the list above. That block forces
       opacity:1, which on a translucent noise overlay is the opposite of
       help — a subtle texture would become a solid wall of static. Reduced
       motion means stop moving, so only the jitter is dropped and the
       texture keeps whatever strength the author chose. */
    [data-pcms-grain]::after {
        animation: none !important;
        transform: none !important;
    }

    /* A glow is light, not movement, so it is kept for the same reason the
       grain is: the list above forces opacity:1 and transform:none, which
       would flatten an element that merely happens to be lit. What DOES go is
       the part that moves — easing between two sizes, and growing on hover. */
    [data-pcms-glow] { transition: none !important; }
    [data-pcms-glow][data-pcms-glow-hover="1"]:hover { --pcms-glow-boost: 1; }
}

/* ============================================================
   IMAGE HOTSPOTS — pulse animation when data-pulse="1"
   ============================================================ */
[data-pulse="1"] .pcms-hotspot {
    animation: pcms-hotspot-pulse 2s ease-in-out infinite;
}
@keyframes pcms-hotspot-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(139, 92, 246, 0.0);
    }
}

/* ============================================================
   GOOGLE MAP — placeholder shadow + responsive iframe (already
   handled by the inline style on the block, but normalize here
   in case users override styles).
   ============================================================ */
.pcms-google-map iframe { display: block; }

/* ============================================================
   NEWSLETTER SIGNUP — focus state for input
   ============================================================ */
.pcms-newsletter input[type="email"]:focus {
    outline: none;
    border-color: var(--brand-color, #8B5CF6);
}
.pcms-newsletter-submit:hover {
    filter: brightness(1.15);
}

/* ============================================================
   FLOATING BUTTONS — corner stack of action buttons
   ============================================================ */
.pcms-floating-buttons[data-position="bottom-left"] {
    right: auto !important;
    left: 24px;
}
.pcms-floating-buttons[data-position="top-right"] {
    bottom: auto !important;
    top: 24px;
}
.pcms-floating-buttons[data-position="top-left"] {
    bottom: auto !important;
    top: 24px;
    right: auto !important;
    left: 24px;
}
.pcms-fb-btn:hover {
    transform: scale(1.1);
}

/* ============================================================
   SLIDES — full-screen slider arrows + dots
   ============================================================ */
.pcms-slides-prev:hover,
.pcms-slides-next:hover {
    background: rgba(0, 0, 0, 0.75) !important;
}
.pcms-slides-dot.is-active {
    transform: scale(1.3);
}

/* ============================================================
   LIGHTBOX OVERLAY — full-screen image viewer
   ============================================================ */
.pcms-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    /* A full-screen viewer covers the header, not the other way round. */
    z-index: var(--pcms-z-overlay, 11000);
    align-items: center;
    justify-content: center;
}
.pcms-lightbox-overlay.is-open { display: flex; }
.pcms-lb-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.pcms-lb-close,
.pcms-lb-prev,
.pcms-lb-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.18s;
}
.pcms-lb-close {
    top: 24px; right: 24px;
    width: 48px; height: 48px;
    border-radius: 50%;
    font-size: 28px; line-height: 1;
}
.pcms-lb-prev,
.pcms-lb-next {
    top: 50%; transform: translateY(-50%);
    width: 56px; height: 56px;
    border-radius: 50%;
    font-size: 32px; line-height: 1;
}
.pcms-lb-prev { left: 24px; }
.pcms-lb-next { right: 24px; }
.pcms-lb-close:hover,
.pcms-lb-prev:hover,
.pcms-lb-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pcms-lightbox-item img:hover {
    transform: scale(1.04);
}

/* ============================================================
   CAROUSEL BASE — used by Testimonial Slider, Team Carousel, etc.
   Active dot is enlarged via runtime, but here's the hover.
   ============================================================ */
.pcms-carousel-dot:hover {
    transform: scale(1.2);
}

/* ============================================================
   INTERACTIVE PROMO — image zooms on hover and the caption's shade
   deepens (Darken mode dims the photo instead). The deeper shade is
   a layer that fades in: the old rule swapped the overlay's
   gradient, which can't be animated and lost to the saved #id
   background anyway. The easing is !important because the saved
   transition lives in an #id rule too (see Card Interactive).
   ============================================================ */
.pcms-interactive-promo { isolation: isolate; }
.pcms-interactive-promo .pcms-ip-overlay { isolation: isolate; }
.pcms-interactive-promo .pcms-ip-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.25));
    opacity: 0;
    pointer-events: none;
}
.pcms-interactive-promo:is(:hover, :focus-within) .pcms-ip-bg { transform: scale(1.06); }
.pcms-interactive-promo[data-effect="darken"]:is(:hover, :focus-within) .pcms-ip-bg { filter: brightness(0.6); }
.pcms-interactive-promo[data-effect="zoom"]:is(:hover, :focus-within) .pcms-ip-overlay::before { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
    .pcms-interactive-promo .pcms-ip-bg {
        transition: transform .9s cubic-bezier(.22, 1, .36, 1), filter .5s ease !important;
        will-change: transform;
        backface-visibility: hidden;
    }
    .pcms-interactive-promo .pcms-ip-overlay::before { transition: opacity .5s cubic-bezier(.22, 1, .36, 1); }
}

/* ============================================================
   INTERACTIVE CIRCLE — items highlight on hover
   ============================================================ */
.pcms-ic-item:hover {
    background: var(--brand-color, #8B5CF6) !important;
    transform-origin: center;
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.5);
}

/* ============================================================
   CHECKLIST — completed item row
   ============================================================ */
.pcms-checklist-item:hover {
    background: rgba(139, 92, 246, 0.04);
}
.pcms-checklist-item.is-complete .pcms-checklist-text {
    text-decoration: line-through;
    opacity: 0.6;
}

/* ============================================================
   TABLE OF CONTENTS — sticky variant
   ============================================================ */
.pcms-toc[data-sticky="1"] {
    position: sticky;
    top: 80px;
}
.pcms-toc-list a:hover {
    color: var(--brand-color, #C4B5FD) !important;
}



/* ============================================================
   FX SUITE (2026-05-10) — universal customization extensions
   that work on any element via data-* attributes. CSS-only
   effects render instantly; tilt / spotlight / magnetic are
   driven by widgets.js runtime helpers.
   ============================================================ */

/* ---- Glow / Neon ---- */
[data-glow="1"] {
    box-shadow: 0 0 var(--pcms-glow-intensity, 16px) var(--pcms-glow-color, #8B5CF6),
                0 0 calc(var(--pcms-glow-intensity, 16px) * 2) var(--pcms-glow-color, #8B5CF6);
    transition: box-shadow 0.3s ease;
}
[data-glow="1"][data-glow-trigger="hover"] {
    box-shadow: none;
}
[data-glow="1"][data-glow-trigger="hover"]:hover {
    box-shadow: 0 0 var(--pcms-glow-intensity, 16px) var(--pcms-glow-color, #8B5CF6),
                0 0 calc(var(--pcms-glow-intensity, 16px) * 2) var(--pcms-glow-color, #8B5CF6);
}
[data-glow="1"][data-glow-trigger="pulse"] {
    animation: pcms-glow-pulse 2.4s ease-in-out infinite;
}
@keyframes pcms-glow-pulse {
    0%, 100% { box-shadow: 0 0 calc(var(--pcms-glow-intensity, 16px) * 0.5) var(--pcms-glow-color, #8B5CF6),
                           0 0 var(--pcms-glow-intensity, 16px) var(--pcms-glow-color, #8B5CF6); }
    50% { box-shadow: 0 0 var(--pcms-glow-intensity, 16px) var(--pcms-glow-color, #8B5CF6),
                      0 0 calc(var(--pcms-glow-intensity, 16px) * 2.5) var(--pcms-glow-color, #8B5CF6); }
}

/* ---- Animated Gradient Border ----
   Two-layer technique: a conic-gradient pseudo-element behind the
   element, masked to just the border via padding + the element's
   own background painting over the center. Rotates infinitely. */
[data-anim-border="1"] {
    position: relative;
    z-index: 0;
}
[data-anim-border="1"]::before {
    content: "";
    position: absolute;
    inset: calc(var(--pcms-ab-thickness, 2px) * -1);
    z-index: -1;
    border-radius: inherit;
    background: conic-gradient(from var(--pcms-ab-angle, 0deg),
        var(--pcms-ab-c1, #8B5CF6),
        var(--pcms-ab-c2, #EC4899),
        var(--pcms-ab-c3, #3B82F6),
        var(--pcms-ab-c1, #8B5CF6));
    animation: pcms-ab-spin var(--pcms-ab-speed, 4s) linear infinite;
}
@property --pcms-ab-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}
@keyframes pcms-ab-spin {
    to { --pcms-ab-angle: 360deg; }
}
/* Fallback for browsers that don't support @property — rotate the
   pseudo-element itself. Less precise but still gives motion. */
@supports not (background: paint(something)) {
    [data-anim-border="1"]::before {
        animation: pcms-ab-spin-fallback var(--pcms-ab-speed, 4s) linear infinite;
    }
    @keyframes pcms-ab-spin-fallback {
        from { transform: rotate(0); }
        to { transform: rotate(360deg); }
    }
}

/* ---- Hover Transform ---- */
[data-hover-fx="1"] {
    transition: transform var(--pcms-hfx-duration, 0.3s) cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: center;
    will-change: transform;
}
[data-hover-fx="1"]:hover {
    transform: translateY(var(--pcms-hfx-lift, 0))
               scale(var(--pcms-hfx-scale, 1.05))
               rotate(var(--pcms-hfx-rotate, 0deg));
}

/* ---- Cursor Spotlight ---- */
[data-spotlight="1"] {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
[data-spotlight="1"]::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(
        var(--pcms-spot-size, 280px) circle at var(--pcms-spot-x, 50%) var(--pcms-spot-y, 50%),
        var(--pcms-spot-color, rgba(139,92,246,0.18)),
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}
[data-spotlight="1"]:hover::after {
    opacity: 1;
}

/* ---- Tilt 3D ---- */
[data-tilt="1"] {
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
    will-change: transform;
}
[data-tilt="1"][data-tilt-glare="1"] {
    position: relative;
    overflow: hidden;
}
[data-tilt="1"][data-tilt-glare="1"]::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(
        var(--pcms-tilt-glare-angle, 0deg),
        rgba(255,255,255,0) 30%,
        rgba(255,255,255,var(--pcms-tilt-glare-opacity, 0)) 50%,
        rgba(255,255,255,0) 70%
    );
    transition: opacity 0.15s ease-out;
}

/* ---- Magnetic ---- */
[data-magnetic="1"] {
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}


/* ---- Holographic Shimmer ---- */
[data-holo="1"] {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
[data-holo="1"]::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    /* Iridescent rainbow that shifts with the --pcms-holo-x/y CSS vars
       set by the runtime. Mix-blend-mode "color-dodge" makes the layer
       additive so it looks like real reflective holographic foil. */
    background: linear-gradient(
        var(--pcms-holo-angle, 105deg),
        transparent 30%,
        rgba(255,0,255, calc(0.4 * var(--pcms-holo-intensity, 0.6))) 38%,
        rgba(0,255,255, calc(0.4 * var(--pcms-holo-intensity, 0.6))) 50%,
        rgba(255,255,0, calc(0.4 * var(--pcms-holo-intensity, 0.6))) 62%,
        transparent 70%
    );
    mix-blend-mode: color-dodge;
    transform: translate(var(--pcms-holo-x, 0%), var(--pcms-holo-y, 0%));
    transition: opacity 0.3s ease;
}
[data-holo="1"][data-holo-trigger="hover"]::before { opacity: 0; }
[data-holo="1"][data-holo-trigger="hover"]:hover::before { opacity: 1; }

/* ---- Click Ripple ---- */
[data-ripple="1"] {
    position: relative;
    overflow: hidden;
}
[data-ripple="1"] .pcms-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transform: scale(0);
    animation: pcms-ripple-anim var(--pcms-ripple-duration, 0.6s) ease-out forwards;
    background: var(--pcms-ripple-color, rgba(255,255,255,0.4));
    mix-blend-mode: screen;
}
@keyframes pcms-ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ---- Scroll-Driven Transform ---- */
[data-scroll-fx="1"] {
    will-change: transform, opacity;
    transition: transform 0.05s linear, opacity 0.05s linear;
}

/* ============================================================
   SECTION CONTROLS (2026-05-10) — Shape Dividers + Mobile Stack
   ============================================================ */

/* Flat section content boxing (2026-06-18) — replaces the old, separately-
   selectable .pcms-container wrapper. The .pcms-section is the full-bleed band;
   its direct content holder gets .pcms-section-boxed so the content is centered
   and width-capped to --container-width. This gives boxed content WITHOUT an
   extra DOM/selection layer (Elementor-style). The Section's "Content Width"
   control overrides max-width inline on this element; legacy pages that still
   use .pcms-container keep working via their own inline max-width. */
.pcms-section-boxed {
    max-width: var(--container-width, 1200px);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Shape divider safe-zone: ensure the section can host the absolutely-
   positioned ::before/::after layers without clipping. Set in trait
   config but added here as a fallback. */
.pcms-section,
section.pcms-section,
.pcms-shape-top,
.pcms-shape-bottom {
    /* Position relative so absolute children anchor correctly. */
}
.pcms-shape-top,
.pcms-shape-bottom {
    /* Inline styles handle layout; this rule only ensures pointer-events
       are off so dividers don't block clicks on content beneath. */
    pointer-events: none;
}

/* Stack on Mobile — flex container becomes column under a breakpoint.
   Reverse Order flips the visual order without swapping the DOM, so source
   order stays semantically correct; when both are set, reverse wins.

   A media query can't read a CSS custom property, so the breakpoint can't be
   a free number — the panel offers a fixed set and each one gets its own
   query below. Elements with no data-mobile-bp (everything saved before the
   control worked) fall into the 768px block, which is what they already had. */
@media (max-width: 480px) {
    .pcms-stack-mobile[data-mobile-bp="480"] { flex-direction: column !important; }
    .pcms-stack-mobile[data-mobile-bp="480"] > * { width: 100% !important; flex: 1 1 100% !important; }
    .pcms-reverse-mobile[data-mobile-bp="480"] { flex-direction: column-reverse !important; }
}
@media (max-width: 600px) {
    .pcms-stack-mobile[data-mobile-bp="600"] { flex-direction: column !important; }
    .pcms-stack-mobile[data-mobile-bp="600"] > * { width: 100% !important; flex: 1 1 100% !important; }
    .pcms-reverse-mobile[data-mobile-bp="600"] { flex-direction: column-reverse !important; }
}
@media (max-width: 768px) {
    .pcms-stack-mobile:not([data-mobile-bp]),
    .pcms-stack-mobile[data-mobile-bp="768"] { flex-direction: column !important; }
    .pcms-stack-mobile:not([data-mobile-bp]) > *,
    .pcms-stack-mobile[data-mobile-bp="768"] > * { width: 100% !important; flex: 1 1 100% !important; }
    .pcms-reverse-mobile:not([data-mobile-bp]),
    .pcms-reverse-mobile[data-mobile-bp="768"] { flex-direction: column-reverse !important; }
}
@media (max-width: 900px) {
    .pcms-stack-mobile[data-mobile-bp="900"] { flex-direction: column !important; }
    .pcms-stack-mobile[data-mobile-bp="900"] > * { width: 100% !important; flex: 1 1 100% !important; }
    .pcms-reverse-mobile[data-mobile-bp="900"] { flex-direction: column-reverse !important; }
}
@media (max-width: 1024px) {
    .pcms-stack-mobile[data-mobile-bp="1024"] { flex-direction: column !important; }
    .pcms-stack-mobile[data-mobile-bp="1024"] > * { width: 100% !important; flex: 1 1 100% !important; }
    .pcms-reverse-mobile[data-mobile-bp="1024"] { flex-direction: column-reverse !important; }
}

/* ============================================================
   BUTTON DEEP CONTROLS (2026-05-10) — icon animations + press
   feedback. Driven by classes the trait config sets via
   syncButtonIcon() and the data-btn-press attribute.
   ============================================================ */

.pcms-btn-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Slide right on hover — works for both before/after position because
   we always animate translateX positive; visually it leans toward the
   side where the icon lives. */
.pcms-btn:hover .pcms-btn-icon-slide,
[data-btn-icon-anim="pcms-btn-icon-slide"]:hover .pcms-btn-icon {
    transform: translateX(4px);
}

/* Bounce — quick up-down on hover */
.pcms-btn:hover .pcms-btn-icon-bounce,
[data-btn-icon-anim="pcms-btn-icon-bounce"]:hover .pcms-btn-icon {
    animation: pcms-btn-icon-bounce 0.6s ease;
}
@keyframes pcms-btn-icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Spin 360° on hover */
.pcms-btn:hover .pcms-btn-icon-spin,
[data-btn-icon-anim="pcms-btn-icon-spin"]:hover .pcms-btn-icon {
    animation: pcms-btn-icon-spin 0.6s ease;
}
@keyframes pcms-btn-icon-spin {
    from { transform: rotate(0); }
    to   { transform: rotate(360deg); }
}

/* Pulse — scale up briefly */
.pcms-btn:hover .pcms-btn-icon-pulse,
[data-btn-icon-anim="pcms-btn-icon-pulse"]:hover .pcms-btn-icon {
    animation: pcms-btn-icon-pulse 0.6s ease;
}
@keyframes pcms-btn-icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Click feedback — press-down on :active. Subtle scale + shadow squish. */
[data-btn-press="1"] {
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}
[data-btn-press="1"]:active {
    transform: scale(0.96);
}

/* ============================================================
   FX SUITE EXPANSION (2026-05-10) — Custom Cursor / Glitch
   Hover / Scroll Snap. Pure CSS where possible.
   ============================================================ */

/* ---- Custom Cursor (brand-colored SVG dot / ring) ----
   Fallback only. The colour lives inside a data: URI, and a CSS custom
   property cannot be substituted inside a url() token — so these rules can
   only ever draw the default brand purple. The trait panel now writes the
   whole `cursor:` declaration with the chosen colour baked in
   (buildCustomCursor in components.js), and that inline style wins over
   these. They stay for pages saved before the panel started doing that. */
[data-cursor="custom-dot"] {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><circle cx='12' cy='12' r='8' fill='%238B5CF6' fill-opacity='0.85'/></svg>") 12 12, pointer;
}
[data-cursor="custom-ring"] {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9' fill='none' stroke='%238B5CF6' stroke-width='2'/></svg>") 12 12, pointer;
}

/* ---- Glitch Hover ---- 
   Two duplicated text layers via ::before and ::after, each clipped and
   shifted to fake an RGB-channel split. Triggered on :hover. */
[data-glitch-hover="1"] {
    position: relative;
    --pcms-glitch-intensity: 4px;
    --pcms-glitch-speed: 0.4s;
}
[data-glitch-hover="1"]::before,
[data-glitch-hover="1"]::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s ease;
    /* Inherit typography from the host so the glitched text matches. */
    font: inherit;
    color: inherit;
    text-align: inherit;
    padding: inherit;
    background: inherit;
    border: inherit;
    border-radius: inherit;
    box-sizing: inherit;
    display: inherit;
    align-items: inherit;
    justify-content: inherit;
}
[data-glitch-hover="1"]:hover::before {
    opacity: 0.85;
    color: #ff0070;
    transform: translate(calc(var(--pcms-glitch-intensity) * -1), 0);
    clip-path: inset(0 0 50% 0);
    mix-blend-mode: screen;
    animation: pcms-glitch-shift var(--pcms-glitch-speed, 0.4s) infinite linear;
}
[data-glitch-hover="1"]:hover::after {
    opacity: 0.85;
    color: #00f0ff;
    transform: translate(var(--pcms-glitch-intensity), 0);
    clip-path: inset(50% 0 0 0);
    mix-blend-mode: screen;
    animation: pcms-glitch-shift var(--pcms-glitch-speed, 0.4s) infinite linear reverse;
}
@keyframes pcms-glitch-shift {
    0%, 100% { transform: translate(var(--pcms-glitch-intensity, 4px), 0); }
    20% { transform: translate(calc(var(--pcms-glitch-intensity, 4px) * -1), 1px); }
    40% { transform: translate(0, calc(var(--pcms-glitch-intensity, 4px) * -1)); }
    60% { transform: translate(var(--pcms-glitch-intensity, 4px), -1px); }
    80% { transform: translate(calc(var(--pcms-glitch-intensity, 4px) * -1), 0); }
}

/* ---- Scroll Snap ---- */
.pcms-snap-child {
    scroll-snap-align: var(--pcms-snap-align, start);
    scroll-snap-stop: always;
}

/* ============================================================
   NEW WIDGETS
   ============================================================ */

/* ---- Flip Box ---- */
.pcms-flip-box { perspective: 1000px; display: inline-block; }
.pcms-flip-box .pcms-flip-inner {
    position: relative; width: 100%; height: 100%;
    transform-style: preserve-3d; transition: transform 0.6s ease;
}
.pcms-flip-box:hover .pcms-flip-inner,
.pcms-flip-box.pcms-flipped .pcms-flip-inner { transform: rotateY(180deg); }
.pcms-flip-box[data-flip-direction="x"]:hover .pcms-flip-inner,
.pcms-flip-box[data-flip-direction="x"].pcms-flipped .pcms-flip-inner { transform: rotateX(180deg); }
.pcms-flip-front, .pcms-flip-back {
    position: absolute; inset: 0;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.pcms-flip-back { transform: rotateY(180deg); }
.pcms-flip-box[data-flip-direction="x"] .pcms-flip-back { transform: rotateX(180deg); }

/* ---- Business Hours ---- */
.pcms-business-hours .pcms-bh-table tr { transition: background .15s; }
.pcms-business-hours .pcms-bh-table tr:last-child td { border-bottom: none !important; }
.pcms-business-hours .pcms-bh-table tr.pcms-bh-today td {
    font-weight: 600;
    background: rgba(108, 99, 255, 0.1);
    color: var(--brand-color, #6c63ff) !important;
}

/* ---- PDF Viewer ---- */
.pcms-pdf-viewer { overflow: hidden; }
.pcms-pdf-viewer iframe { display: block; width: 100%; border: none; }

/* ---- Video Lightbox ---- */
.pcms-vlb-btn { transition: opacity .2s, transform .15s; }
.pcms-vlb-btn:hover { opacity: 0.85; transform: scale(1.02); }

/* ---- Post Navigation ---- */
.pcms-post-nav { display: block; width: 100%; }
.pcms-post-nav-inner { display: flex; gap: 16px; }
.pcms-pn-prev, .pcms-pn-next { transition: background .2s, border-color .2s; }
.pcms-pn-prev:hover, .pcms-pn-next:hover { border-color: var(--brand-color, #6c63ff) !important; }
@media (max-width: 600px) { .pcms-post-nav-inner { flex-direction: column; } }

/* ---- Post Info ---- */
.pcms-post-info { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.pcms-post-info a { transition: color .15s; }
.pcms-post-info a:hover { color: var(--brand-light, #9d97f7) !important; }

/* ---- Pinterest & TikTok ---- */
.pcms-pinterest-feed { overflow: hidden; }
.pcms-tiktok-embed { display: inline-block; max-width: 100%; }

/* ---- Magic Section ---- */
.pcms-magic-section { position: relative; overflow: hidden; }
.pcms-magic-overlay { transition: opacity 0.3s ease; }
.pcms-magic-toggle:hover { opacity: 0.8; }

/* ---- Text Path ---- */
.pcms-text-path { display: inline-block; overflow: visible; }
.pcms-text-path svg { overflow: visible; }

/* ---- Panoramic Image ---- */
.pcms-panoramic { overflow: hidden; }
.pcms-panoramic .pnlm-container { border-radius: inherit; }

/* ---- Slides — fade / zoom transition modes ---- */
.pcms-slides[data-transition="fade"] .pcms-slides-track,
.pcms-slides[data-transition="zoom"] .pcms-slides-track {
    transform: none !important;
    transition: none !important;
    position: relative;
}

/* Fireworks canvas must stay transparent so section background shows through */
canvas.pcms-fireworks-bg { background: transparent !important; }

/* Floating Buttons — entrance animations */
@keyframes pcms-fb-bounce   { 0%,20%,50%,80%,100%{transform:translateY(0)} 40%{transform:translateY(-16px)} 60%{transform:translateY(-8px)} }
@keyframes pcms-fb-pulse    { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1)} }
@keyframes pcms-fb-fade-in  { from{opacity:0} to{opacity:1} }
@keyframes pcms-fb-slide-up { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

/* Icon Box — position variants */
.pcms-icon-box { display: flex; flex-direction: column; align-items: center; }
.pcms-icon-box[data-icon-pos="left"]  { flex-direction: row; align-items: flex-start; }
.pcms-icon-box[data-icon-pos="right"] { flex-direction: row-reverse; align-items: flex-start; }
.pcms-icon-box[data-icon-pos="left"]  .pcms-icon-box-icon,
.pcms-icon-box[data-icon-pos="right"] .pcms-icon-box-icon { margin: 4px 12px 0 0; }
.pcms-icon-box[data-icon-pos="right"] .pcms-icon-box-icon { margin: 4px 0 0 12px; }

/* Pricing Table Ribbon */
.pcms-pricing-ribbon {
    position: absolute;
    top: 14px;
    right: -28px;
    background: var(--brand-color, #8B5CF6);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 32px;
    transform: rotate(45deg);
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 1;
}

/* Carousel arrows + dots */
.pcms-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s;
    padding: 0;
}
.pcms-carousel-arrow:hover { background: rgba(0,0,0,0.8); }
.pcms-carousel-arrow-prev { left: 10px; }
.pcms-carousel-arrow-next { right: 10px; }
.pcms-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 4px;
}
.pcms-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    border: none;
    padding: 0;
}
.pcms-carousel-dot.active { background: #fff; transform: scale(1.3); }

/* Gallery caption */
.pcms-gallery-item { position: relative; overflow: hidden; }
.pcms-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    opacity: 0;
    transition: opacity 0.25s;
}
.pcms-gallery-item:hover .pcms-gallery-caption { opacity: 1; }

/* ============================================================
   Elementor / Essential-Addons port — new widget styles (2026-06-24)
   ============================================================ */

/* Animated button hover effects — keyed on [data-effect]. Shared by the main
   Button (.pcms-btn) and the legacy Creative Button (.pcms-creative-btn).
   (Creative Button merged into Button 2026-06-24.) */
.pcms-creative-btn,
.pcms-btn[data-effect]:not([data-effect="none"]) { position:relative; overflow:hidden; }
.pcms-creative-btn { display:inline-block; text-decoration:none; font-weight:600; cursor:pointer; transition:all 0.3s ease; }
.pcms-creative-btn[data-effect="grow"]:hover,   .pcms-btn[data-effect="grow"]:hover   { transform:scale(1.1); }
.pcms-creative-btn[data-effect="shrink"]:hover, .pcms-btn[data-effect="shrink"]:hover { transform:scale(0.95); }
.pcms-creative-btn[data-effect="bounce"]:hover, .pcms-btn[data-effect="bounce"]:hover { transform:translateY(-5px); }
.pcms-creative-btn[data-effect="pulse"]:hover,  .pcms-btn[data-effect="pulse"]:hover  { transform:scale(1.05); box-shadow:0 0 15px rgba(139,92,246,0.5); }
.pcms-creative-btn[data-effect="shadow"]:hover, .pcms-btn[data-effect="shadow"]:hover { box-shadow:0 10px 30px rgba(0,0,0,0.4); }
.pcms-creative-btn[data-effect="glow"]:hover,   .pcms-btn[data-effect="glow"]:hover   { box-shadow:0 0 20px rgba(139,92,246,0.7); }
.pcms-creative-btn[data-effect^="sweep"],       .pcms-btn[data-effect^="sweep"]       { background-size:200% 100%; background-position:left center; }
.pcms-creative-btn[data-effect="sweep-right"]:hover, .pcms-btn[data-effect="sweep-right"]:hover { background-position:right center; }
.pcms-creative-btn[data-effect="sweep-left"]:hover,  .pcms-btn[data-effect="sweep-left"]:hover  { background-position:left center; }
.pcms-creative-btn[data-effect="sweep-up"],          .pcms-btn[data-effect="sweep-up"]          { background-size:100% 200%; background-position:center bottom; }
.pcms-creative-btn[data-effect="sweep-up"]:hover,    .pcms-btn[data-effect="sweep-up"]:hover    { background-position:center top; }
.pcms-creative-btn[data-effect="sweep-down"],        .pcms-btn[data-effect="sweep-down"]        { background-size:100% 200%; background-position:center top; }
.pcms-creative-btn[data-effect="sweep-down"]:hover,  .pcms-btn[data-effect="sweep-down"]:hover  { background-position:center bottom; }
.pcms-creative-btn[data-effect="ripple"]::after,     .pcms-btn[data-effect="ripple"]::after { content:""; position:absolute; top:50%; left:50%; width:0; height:0; border-radius:50%; background:rgba(255,255,255,0.4); transform:translate(-50%,-50%); transition:width 0.5s ease, height 0.5s ease; pointer-events:none; }
.pcms-creative-btn[data-effect="ripple"]:hover::after, .pcms-btn[data-effect="ripple"]:hover::after { width:300px; height:300px; }

/* Interactive Promo hover rules live with its section above. */

/* Content Timeline — vertical line + dots; alternating zig-zag variant. */
.pcms-content-timeline { position:relative; }
.pcms-content-timeline .pcms-ct-item { position:relative; padding:0 0 26px 34px; }
.pcms-content-timeline.pcms-ct-vertical::before { content:""; position:absolute; left:7px; top:6px; bottom:6px; width:3px; background:var(--pcms-ct-line,var(--brand-color,#8B5CF6)); border-radius:2px; }
.pcms-content-timeline .pcms-ct-dot { position:absolute; left:0; top:4px; width:16px; height:16px; border-radius:50%; background:var(--pcms-ct-line,var(--brand-color,#8B5CF6)); border:3px solid var(--bg-dark,#1a1a2e); box-sizing:border-box; }
.pcms-content-timeline .pcms-ct-date { color:var(--pcms-ct-line,var(--brand-color,#8B5CF6)); font-size:13px; font-weight:700; margin-bottom:6px; }
.pcms-content-timeline .pcms-ct-card { background:var(--pcms-ct-card,var(--bg-card,#1e1e32)); border:1px solid var(--border-color,#2d2d44); border-radius:10px; padding:14px 16px; }
.pcms-content-timeline .pcms-ct-title { color:var(--text-light,#e2e2ef); margin:0 0 6px; font-size:16px; }
.pcms-content-timeline .pcms-ct-body { color:var(--text-muted,#94a3b8); margin:0; font-size:14px; line-height:1.5; }
/* Alternating layout (desktop): zig-zag around a centered line. */
@media (min-width:720px) {
  .pcms-content-timeline.pcms-ct-alternating::before { content:""; position:absolute; left:50%; top:6px; bottom:6px; width:3px; transform:translateX(-50%); background:var(--pcms-ct-line,var(--brand-color,#8B5CF6)); border-radius:2px; }
  .pcms-content-timeline.pcms-ct-alternating .pcms-ct-item { width:50%; padding:0 0 26px 0; }
  .pcms-content-timeline.pcms-ct-alternating .pcms-ct-item:nth-child(odd)  { margin-left:0; padding-right:40px; text-align:right; }
  .pcms-content-timeline.pcms-ct-alternating .pcms-ct-item:nth-child(even) { margin-left:50%; padding-left:40px; }
  .pcms-content-timeline.pcms-ct-alternating .pcms-ct-item:nth-child(odd)  .pcms-ct-dot { left:auto; right:-8px; }
  .pcms-content-timeline.pcms-ct-alternating .pcms-ct-item:nth-child(even) .pcms-ct-dot { left:-8px; }
}

/* (Standalone Tooltip widget CSS removed 2026-06-24 — the universal
   data-tooltip extension provides hover tooltips on any widget.) */

/* Link in Bio — link hover lift. */
.pcms-lib-link:hover { transform:translateY(-2px); border-color:var(--brand-color,#8B5CF6) !important; }

/* Progress Tracker / Stepper. */
.pcms-stepper { display:flex; gap:0; }
.pcms-stepper-horizontal { flex-direction:row; }
.pcms-stepper-vertical   { flex-direction:column; }
.pcms-stepper .pcms-step { position:relative; flex:1; display:flex; flex-direction:column; align-items:center; text-align:center; }
.pcms-stepper-vertical .pcms-step { flex-direction:row; align-items:flex-start; gap:12px; text-align:left; padding-bottom:26px; }
.pcms-step-marker { width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:15px; background:var(--bg-card,#1e1e32); color:var(--text-muted,#94a3b8); border:2px solid var(--border-color,#2d2d44); position:relative; z-index:1; flex-shrink:0; }
.pcms-step-label { margin-top:8px; font-size:13px; color:var(--text-muted,#94a3b8); }
.pcms-stepper-vertical .pcms-step-label { margin-top:7px; }
/* Connector lines between markers. */
.pcms-stepper-horizontal .pcms-step:not(:last-child)::before { content:""; position:absolute; top:19px; left:50%; width:100%; height:3px; background:var(--border-color,#2d2d44); }
.pcms-stepper-vertical .pcms-step:not(:last-child)::before   { content:""; position:absolute; left:18px; top:38px; bottom:0; width:3px; background:var(--border-color,#2d2d44); }
/* Done + active states use the accent var. */
.pcms-step.is-done .pcms-step-marker,
.pcms-step.is-active .pcms-step-marker { background:var(--pcms-step-accent,var(--brand-color,#8B5CF6)); color:#fff; border-color:var(--pcms-step-accent,var(--brand-color,#8B5CF6)); }
.pcms-step.is-active .pcms-step-label,
.pcms-step.is-done .pcms-step-label { color:var(--text-light,#e2e2ef); }
.pcms-step.is-done::before { background:var(--pcms-step-accent,var(--brand-color,#8B5CF6)) !important; }

/* Reviews / NFT / Careers — hover affordance + responsive collapse. */
.pcms-nft-card { transition:transform 0.18s, border-color 0.18s; }
.pcms-nft-card:hover { transform:translateY(-4px); border-color:var(--brand-color,#8B5CF6); }
.pcms-job-apply:hover { filter:brightness(1.08); }
@media (max-width:640px) {
  .pcms-reviews, .pcms-nft-gallery { grid-template-columns:1fr !important; }
}

/* SVG Draw — loop keyframe (one-shot draw is done inline by widgets.js). */
@keyframes pcmsSvgLoop { 0% { stroke-dashoffset:var(--pcms-svg-len,1000); } 50% { stroke-dashoffset:0; } 100% { stroke-dashoffset:var(--pcms-svg-len,1000); } }

/* Event Calendar. */
.pcms-cal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.pcms-cal-title { color:var(--text-light,#e2e2ef); font-weight:700; font-size:16px; }
.pcms-cal-prev, .pcms-cal-next { background:transparent; border:1px solid var(--border-color,#2d2d44); color:var(--text-light,#e2e2ef); width:30px; height:30px; border-radius:6px; cursor:pointer; font-size:16px; line-height:1; }
.pcms-cal-prev:hover, .pcms-cal-next:hover { border-color:var(--pcms-cal-accent,var(--brand-color,#8B5CF6)); }
.pcms-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.pcms-cal-dow { text-align:center; color:var(--text-muted,#94a3b8); font-size:11px; font-weight:700; padding:4px 0; }
.pcms-cal-cell { position:relative; aspect-ratio:1/1; display:flex; align-items:center; justify-content:center; border-radius:6px; font-size:13px; color:var(--text-light,#e2e2ef); background:var(--bg-dark,#1a1a2e); }
.pcms-cal-cell.pcms-cal-empty { background:transparent; }
.pcms-cal-cell.has-event { outline:1px solid var(--pcms-cal-accent,var(--brand-color,#8B5CF6)); font-weight:700; }
.pcms-cal-dot { position:absolute; bottom:5px; left:50%; transform:translateX(-50%); width:5px; height:5px; border-radius:50%; background:var(--pcms-cal-accent,var(--brand-color,#8B5CF6)); }
.pcms-cal-list { list-style:none; padding:12px 0 0; margin:14px 0 0; border-top:1px solid var(--border-color,#2d2d44); }
.pcms-cal-list li { font-size:13px; color:var(--text-muted,#94a3b8); margin:6px 0; }
.pcms-cal-list strong { color:var(--pcms-cal-accent,var(--brand-color,#8B5CF6)); margin-right:6px; }

/* Sitemap — link hover. */
.pcms-sitemap-links a:hover { color:var(--brand-color,#8B5CF6) !important; }

/* ============================================================
   TEXT WIDGET SPACING
   Paragraph spacing can't be set as a style on the widget itself — it is the
   gap BETWEEN the widget's children. The builder's Text Spacing control (and
   the inline toolbar's spacing popover) writes a --pcms-para-gap custom
   property plus this data attribute onto the widget; the rules below turn
   that into real margins. The canvas loads this same stylesheet, so what the
   author sees while editing is what the page ships.
   ============================================================ */
[data-pcms-text-spacing] > p,
[data-pcms-text-spacing] > ul,
[data-pcms-text-spacing] > ol,
[data-pcms-text-spacing] > h1,
[data-pcms-text-spacing] > h2,
[data-pcms-text-spacing] > h3,
[data-pcms-text-spacing] > h4,
[data-pcms-text-spacing] > h5,
[data-pcms-text-spacing] > h6,
[data-pcms-text-spacing] > blockquote,
[data-pcms-text-spacing] > pre,
[data-pcms-text-spacing] > table,
[data-pcms-text-spacing] > div {
    margin-top: 0;
    margin-bottom: var(--pcms-para-gap, 1em);
}
/* No trailing gap — otherwise every text widget carries invisible padding at
   the bottom that fights whatever margin the author set on the widget. */
[data-pcms-text-spacing] > *:last-child { margin-bottom: 0; }
[data-pcms-text-spacing] li + li { margin-top: calc(var(--pcms-para-gap, 0px) * 0.5); }

/* Text Editor widget — a block-level rich-text region. Unlike the single-<p>
   Text widget it holds real paragraphs, lists and headings, so pasted copy
   keeps its structure. Everything inherits from the widget, which is what
   makes stripped-formatting pastes look right straight away. */
.pcms-text-editor > :first-child { margin-top: 0; }
.pcms-text-editor > :last-child { margin-bottom: 0; }
.pcms-text-editor h1, .pcms-text-editor h2, .pcms-text-editor h3,
.pcms-text-editor h4, .pcms-text-editor h5, .pcms-text-editor h6 {
    color: inherit;
    line-height: 1.25;
}
.pcms-text-editor ul, .pcms-text-editor ol { padding-left: 1.4em; }
.pcms-text-editor li { margin: 0; }
.pcms-text-editor a { color: var(--link-color, #A78BFA); }
.pcms-text-editor blockquote {
    margin-left: 0;
    padding-left: 1em;
    border-left: 3px solid var(--brand-color, #8B5CF6);
    color: var(--text-muted, #94a3b8);
}
.pcms-text-editor code {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-size: 0.92em;
}
/* Code blocks and tables can now be produced from inside the text — by the
   format dropdown, the ``` markdown rule and the insert menu — so they need a
   resting look here rather than the browser default. */
.pcms-text-editor pre {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border-color, #2d2d44);
    border-radius: 6px;
    padding: 12px 14px;
    overflow-x: auto;
    font-size: 0.9em;
    line-height: 1.5;
    white-space: pre-wrap;
}
.pcms-text-editor pre code { background: none; padding: 0; }
.pcms-text-editor table { width: 100%; border-collapse: collapse; }
.pcms-text-editor th, .pcms-text-editor td {
    border: 1px solid var(--border-color, #2d2d44);
    padding: 8px 12px;
    text-align: left;
}
.pcms-text-editor th { background: rgba(255, 255, 255, 0.04); font-weight: 600; }
/* Tab-nesting inside lists is a supported action now; distinct markers make
   the level obvious without the author having to count indents. */
.pcms-text-editor ul ul { list-style-type: circle; }
.pcms-text-editor ul ul ul { list-style-type: square; }
.pcms-text-editor ol ol { list-style-type: lower-alpha; }
.pcms-text-editor ol ol ol { list-style-type: lower-roman; }
.pcms-text-editor mark { background: rgba(253, 224, 71, 0.45); color: inherit; }
.pcms-text-editor hr { border: 0; border-top: 1px solid var(--border-color, #2d2d44); margin: 18px 0; }

/* ============================================================
   FOOTER WIDGETS (2026-07-30)
   ============================================================
   Styles for the footer widget family registered in blocks.js. Every visual
   knob is a CSS custom property set on the widget ROOT by its trait panel, so
   the panel needs exactly one addStyle() per control — and hover states, which
   a panel cannot express as a selector, become possible at all. The defaults
   below are the same values the panels show, so an untouched widget on canvas
   matches what its settings say.
   ------------------------------------------------------------ */

/* ---- Brand Column ---- */
.pcms-footer-brand { display: flex; flex-direction: column; gap: 14px; }
.pcms-footer-brand[data-align="center"] { align-items: center; text-align: center; }
.pcms-footer-brand[data-align="right"]  { align-items: flex-end; text-align: right; }
.pcms-fb-logo { display: flex; align-items: center; gap: 10px; }
.pcms-fb-logo-img {
    width: var(--fb-logo-size, 36px);
    height: var(--fb-logo-size, 36px);
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}
.pcms-fb-name {
    font-size: var(--fb-name-size, 18px);
    font-weight: 700;
    color: var(--fb-name-color, #e2e2ef);
    line-height: 1.2;
}
.pcms-fb-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--fb-desc-color, #9595aa);
    max-width: 34ch;
}
.pcms-footer-brand[data-align="center"] .pcms-fb-desc { margin-inline: auto; }
.pcms-fb-social { display: flex; flex-wrap: wrap; gap: 10px; }
.pcms-fb-social-link {
    width: var(--fb-social-size, 36px);
    height: var(--fb-social-size, 36px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fb-social-color, #9595aa);
    background: var(--fb-social-bg, #2d2d44);
    border-radius: 50%;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.pcms-fb-social-link svg { width: 48%; height: 48%; display: block; }
.pcms-fb-social-link:hover {
    color: var(--fb-social-hover, #fff);
    background: var(--fb-social-hover-bg, var(--brand-color, #8B5CF6));
    transform: translateY(-2px);
}
.pcms-footer-brand[data-social-shape="rounded"] .pcms-fb-social-link { border-radius: 8px; }
.pcms-footer-brand[data-social-shape="square"]  .pcms-fb-social-link { border-radius: 0; }
.pcms-footer-brand[data-social-shape="plain"]   .pcms-fb-social-link {
    background: none;
    width: auto;
    height: auto;
}
.pcms-footer-brand[data-social-shape="plain"] .pcms-fb-social-link svg {
    width: var(--fb-social-size, 20px);
    height: var(--fb-social-size, 20px);
}
.pcms-footer-brand[data-social-shape="plain"] .pcms-fb-social-link:hover { background: none; }

/* ---- Contact Info ---- */
.pcms-footer-contact { display: flex; flex-direction: column; gap: 14px; }
.pcms-fc-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fc-title-color, #e2e2ef);
}
.pcms-fc-list { display: flex; flex-direction: column; gap: var(--fc-gap, 12px); }
.pcms-footer-contact[data-layout="inline"] .pcms-fc-list {
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: calc(var(--fc-gap, 12px) * 2);
}
.pcms-fc-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--fc-text-color, #9595aa);
    font-size: var(--fc-text-size, 13px);
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.2s ease;
}
/* Rows without an href are informational (an address, opening hours) and must
   not read as clickable. */
.pcms-fc-item[href]:hover { color: var(--fc-hover-color, #fff); }
.pcms-fc-item:not([href]) { cursor: default; }
.pcms-fc-icon {
    flex-shrink: 0;
    color: var(--fc-icon-color, var(--brand-color, #8B5CF6));
    display: inline-flex;
    margin-top: 1px;
}
.pcms-fc-icon svg {
    width: var(--fc-icon-size, 17px);
    height: var(--fc-icon-size, 17px);
    display: block;
}

/* ---- Subscribe Row ---- */
.pcms-footer-subscribe { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.pcms-footer-subscribe[data-layout="stacked"] { flex-direction: column; align-items: stretch; }
.pcms-fs-copy { flex: 1 1 220px; min-width: 0; }
.pcms-fs-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
    color: var(--fs-title-color, #e2e2ef);
}
.pcms-fs-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--fs-text-color, #9595aa);
}
.pcms-fs-form { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 300px; }
.pcms-fs-input {
    flex: 1 1 var(--fs-input-width, 200px);
    min-width: min(100%, var(--fs-input-width, 200px));
    padding: 10px 14px;
    font-size: 14px;
    color: var(--fs-input-color, #e2e2ef);
    background: var(--fs-input-bg, #1e1e32);
    border: 1px solid var(--fs-input-border, #2d2d44);
    border-radius: var(--fs-radius, 8px);
}
.pcms-fs-input::placeholder { color: var(--fs-placeholder-color, #64748b); }
.pcms-fs-input:focus {
    outline: 2px solid var(--fs-btn-bg, var(--brand-color, #8B5CF6));
    outline-offset: 1px;
}
.pcms-fs-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--fs-btn-color, #fff);
    background: var(--fs-btn-bg, var(--brand-color, #8B5CF6));
    border: none;
    border-radius: var(--fs-radius, 8px);
    transition: background-color 0.2s ease, filter 0.2s ease;
}
.pcms-fs-btn:hover {
    background: var(--fs-btn-hover-bg, var(--fs-btn-bg, var(--brand-color, #8B5CF6)));
    filter: brightness(1.1);
}
.pcms-fs-status {
    display: none;
    flex-basis: 100%;
    margin: 0;
    font-size: 12px;
    color: var(--fs-text-color, #9595aa);
}

/* ---- Bottom Bar ---- */
.pcms-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px var(--fbar-gap, 20px);
    padding: 20px 0 0;
    font-size: var(--fbar-size, 12px);
}
.pcms-footer-bar[data-divider="1"] { border-top: 1px solid var(--fbar-divider, #2d2d44); }
.pcms-footer-bar[data-layout="centered"] { justify-content: center; text-align: center; }
.pcms-footer-bar[data-layout="stacked"] { flex-direction: column-reverse; text-align: center; }
.pcms-fbar-copy { margin: 0; color: var(--fbar-copy-color, #64748b); }
.pcms-fbar-links { display: flex; flex-wrap: wrap; gap: var(--fbar-gap, 20px); }
.pcms-fbar-link {
    color: var(--fbar-link-color, #9595aa);
    text-decoration: none;
    transition: color 0.2s ease;
}
.pcms-fbar-link:hover { color: var(--fbar-link-hover, #fff); }

/* ---- Back to Top ---- */
.pcms-back-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: var(--btt-font-size, 13px);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    color: var(--btt-color, #fff);
    background: var(--btt-bg, var(--brand-color, #8B5CF6));
    border: 1px solid var(--btt-border, transparent);
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.25s ease;
}
.pcms-back-to-top:hover {
    color: var(--btt-hover-color, var(--btt-color, #fff));
    background: var(--btt-hover-bg, var(--btt-bg, var(--brand-color, #8B5CF6)));
    transform: translateY(-2px);
}
.pcms-btt-icon { display: inline-flex; }
.pcms-btt-icon svg {
    width: var(--btt-icon-size, 18px);
    height: var(--btt-icon-size, 18px);
    display: block;
}
.pcms-back-to-top[data-btt-shape="rounded"] { border-radius: 10px; }
.pcms-back-to-top[data-btt-shape="circle"] {
    width: calc(var(--btt-icon-size, 18px) + 26px);
    height: calc(var(--btt-icon-size, 18px) + 26px);
    padding: 0;
    border-radius: 50%;
}
.pcms-back-to-top[data-btt-shape="circle"] .pcms-btt-label { display: none; }
.pcms-back-to-top[data-btt-shape="plain"] {
    padding: 0;
    background: none;
    border: none;
    color: var(--btt-color, #9595aa);
}
.pcms-back-to-top[data-btt-shape="plain"]:hover {
    background: none;
    color: var(--btt-hover-color, #fff);
}
/* Floating mode: pinned to the viewport, hidden until the runtime adds
   .is-visible past the configured scroll offset. */
.pcms-back-to-top[data-btt-mode="float"] {
    position: fixed;
    bottom: 24px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.pcms-back-to-top[data-btt-mode="float"].is-visible { opacity: 1; pointer-events: auto; }
.pcms-back-to-top[data-btt-mode="float"][data-btt-position="right"]  { right: 24px; }
.pcms-back-to-top[data-btt-mode="float"][data-btt-position="left"]   { left: 24px; }
.pcms-back-to-top[data-btt-mode="float"][data-btt-position="center"] { left: 50%; transform: translateX(-50%); }
.pcms-back-to-top[data-btt-mode="float"][data-btt-position="center"]:hover { transform: translateX(-50%) translateY(-2px); }

/* ---- Site back-to-top button (#pcms-back-to-top) ----
   The one assets/js/main.js adds to every page. Its whole look used to be
   written inline by the script, so nothing could restyle it — it was the
   Primary colour and that was that. Settings → Appearance → Back-to-top
   button now drives it: colours as --pcms-btt-* (core/ThemeCss.php), the rest
   as data-pcms-btt-* on <body> (views/layouts/main.php). Unset, every value
   below is what the inline style was. */
#pcms-back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--pcms-btt-bg, var(--brand-color, #8B5CF6));
    color: var(--pcms-btt-fg, #fff);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s, visibility 0.3s, background-color 0.2s, transform 0.2s;
    --pcms-attn-color: var(--pcms-btt-bg, var(--brand-color, #8B5CF6));
}
#pcms-back-to-top.is-visible { opacity: 1; visibility: visible; }
#pcms-back-to-top:hover { background: var(--pcms-btt-hover, var(--pcms-btt-bg, var(--brand-color, #8B5CF6))); }
#pcms-back-to-top:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
body[data-pcms-btt-pos="left"] #pcms-back-to-top { right: auto; left: 24px; }
body[data-pcms-btt-shape="rounded"] #pcms-back-to-top { border-radius: 12px; }
body[data-pcms-btt-shape="square"] #pcms-back-to-top { border-radius: 4px; }
body[data-pcms-btt-hover="lift"] #pcms-back-to-top:hover { transform: translateY(-3px); }
body[data-pcms-btt-hover="grow"] #pcms-back-to-top:hover { transform: scale(1.1); }

/* ============================================================
   ATTENTION — data-pcms-attn
   A repeating "over here" for the floating buttons: the Support
   launcher (its "Attention animation" setting) and the site
   back-to-top button (Settings → Appearance).

   Not data-pcms-loop, on purpose. That vocabulary's reduced-motion
   rule also forces opacity:1 and transform:none, which would pin a
   hidden back-to-top button visible at the top of every page; and
   the ripple ring needs a pseudo-element on an element that is
   already positioned, which an attribute any element can carry
   cannot assume. The motion reuses the loop keyframes where one fits.

   Stops while the pointer is on the button — a moving target is
   harder to click — and while its panel is open. Never runs for a
   visitor who asked their device for reduced motion.
   ============================================================ */
[data-pcms-attn] {
    animation-duration: var(--pcms-attn-dur, 2.4s);
    animation-iteration-count: var(--pcms-attn-count, infinite);
    animation-timing-function: ease-in-out;
}
[data-pcms-attn-speed="slow"] { --pcms-attn-dur: 3.6s; }
[data-pcms-attn-speed="fast"] { --pcms-attn-dur: 1.4s; }
[data-pcms-attn-repeat="3"]   { --pcms-attn-count: 3; }
[data-pcms-attn-repeat="1"]   { --pcms-attn-count: 1; }
[data-pcms-attn="pulse"]      { animation-name: pcms-loop-pulse; }
[data-pcms-attn="heartbeat"]  { animation-name: pcms-loop-heartbeat; }
[data-pcms-attn="bounce"]     { animation-name: pcms-attn-bounce; }
/* Mostly still, then a quick wiggle — a long cycle reads as a nudge. */
[data-pcms-attn="nudge"]      { animation-name: pcms-attn-nudge; animation-duration: calc(var(--pcms-attn-dur, 2.4s) * 1.6); }
[data-pcms-attn="glow"]       { animation-name: pcms-loop-glow; --pcms-loop-color: var(--pcms-attn-color, var(--brand-color, #8B5CF6)); }
[data-pcms-attn="ring"]::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    animation: pcms-attn-ring var(--pcms-attn-dur, 2.4s) ease-out var(--pcms-attn-count, infinite);
}
[data-pcms-attn]:hover,
[data-pcms-attn]:hover::after,
[data-pcms-attn][aria-expanded="true"],
[data-pcms-attn][aria-expanded="true"]::after,
#pcms-back-to-top:not(.is-visible)[data-pcms-attn],
#pcms-back-to-top:not(.is-visible)[data-pcms-attn]::after { animation: none; }
/* The ring and the glow take the button's own colour. */
.pcms-chat-launcher { --pcms-attn-color: var(--pcms-chat-launcher-bg); }

@keyframes pcms-attn-bounce {
    0%, 55%, 100% { transform: translateY(0); }
    20%           { transform: translateY(-9px); }
    35%           { transform: translateY(0); }
    45%           { transform: translateY(-4px); }
}
@keyframes pcms-attn-nudge {
    0%, 66%, 100% { transform: rotate(0) scale(1); }
    70%           { transform: rotate(-9deg) scale(1.05); }
    75%           { transform: rotate(8deg) scale(1.05); }
    80%           { transform: rotate(-6deg) scale(1.04); }
    85%           { transform: rotate(4deg) scale(1.02); }
    90%           { transform: rotate(0) scale(1); }
}
@keyframes pcms-attn-ring {
    0%        { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pcms-attn-color, var(--brand-color, #8B5CF6)) 60%, transparent); }
    75%, 100% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--pcms-attn-color, var(--brand-color, #8B5CF6)) 0%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
    [data-pcms-attn],
    [data-pcms-attn]::after { animation: none !important; }
    #pcms-back-to-top:hover { transform: none; }
}

/* ---- Payment Methods ---- */
.pcms-payment-methods {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px var(--pay-gap, 8px);
}
.pcms-pay-label {
    font-size: 12px;
    color: var(--pay-label-color, #64748b);
    margin-right: 4px;
}
.pcms-pay-list { display: flex; flex-wrap: wrap; gap: var(--pay-gap, 8px); align-items: center; }
.pcms-pay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--pay-size, 34px);
    padding: 0 8px;
    color: var(--pay-color, #9595aa);
    background: var(--pay-bg, transparent);
    border: 1px solid var(--pay-border, #2d2d44);
    border-radius: var(--pay-radius, 6px);
}
.pcms-pay-mark,
.pcms-pay-img {
    height: calc(var(--pay-size, 34px) - 10px);
    width: auto;
    max-width: 64px;
    display: block;
    object-fit: contain;
}
.pcms-payment-methods[data-badge-style="solid"] .pcms-pay-badge {
    border-color: transparent;
    background: var(--pay-bg, rgba(255, 255, 255, 0.06));
}
.pcms-payment-methods[data-badge-style="plain"] .pcms-pay-badge {
    border-color: transparent;
    background: none;
    padding: 0;
}
/* Brand mode reads the per-badge --pcms-pay-brand written into the markup. */
.pcms-payment-methods[data-color-mode="brand"] .pcms-pay-badge {
    color: var(--pcms-pay-brand, var(--pay-color, #9595aa));
}

/* ---- App Store Badges ---- */
.pcms-app-badges { display: flex; flex-wrap: wrap; align-items: center; gap: var(--app-gap, 10px); }
.pcms-app-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: var(--app-size, 44px);
    padding: 0 14px;
    text-decoration: none;
    color: var(--app-color, #fff);
    background: var(--app-bg, #101018);
    border: 1px solid var(--app-border, rgba(255, 255, 255, 0.22));
    border-radius: var(--app-radius, 8px);
    transition: transform 0.2s ease, filter 0.2s ease;
}
.pcms-app-badge:hover { transform: translateY(-2px); filter: brightness(1.12); }
.pcms-app-glyph svg {
    width: calc(var(--app-size, 44px) * 0.5);
    height: calc(var(--app-size, 44px) * 0.58);
    display: block;
}
.pcms-app-text { display: flex; flex-direction: column; line-height: 1.1; }
.pcms-app-small { font-size: calc(var(--app-size, 44px) * 0.19); opacity: 0.75; letter-spacing: 0.02em; }
.pcms-app-big { font-size: calc(var(--app-size, 44px) * 0.31); font-weight: 600; }
.pcms-app-badges[data-badge-theme="light"] .pcms-app-badge {
    color: var(--app-color, #101018);
    background: var(--app-bg, #fff);
    border-color: var(--app-border, rgba(0, 0, 0, 0.15));
}
.pcms-app-badges[data-badge-theme="outline"] .pcms-app-badge {
    color: var(--app-color, #e2e2ef);
    background: var(--app-bg, transparent);
    border-color: var(--app-border, #2d2d44);
}

/* ---- Trust Badges ---- */
.pcms-trust-badges {
    display: grid;
    grid-template-columns: repeat(var(--trust-cols, 3), minmax(0, 1fr));
    gap: var(--trust-gap, 20px);
}
.pcms-trust-badges[data-columns="1"] { --trust-cols: 1; }
.pcms-trust-badges[data-columns="2"] { --trust-cols: 2; }
.pcms-trust-badges[data-columns="3"] { --trust-cols: 3; }
.pcms-trust-badges[data-columns="4"] { --trust-cols: 4; }
.pcms-trust-badges[data-columns="5"] { --trust-cols: 5; }
.pcms-trust-badges[data-columns="6"] { --trust-cols: 6; }
.pcms-trust-item { display: flex; align-items: center; gap: 12px; }
.pcms-trust-icon {
    flex-shrink: 0;
    color: var(--trust-icon-color, var(--brand-color, #8B5CF6));
    display: inline-flex;
}
.pcms-trust-icon svg {
    width: var(--trust-icon-size, 24px);
    height: var(--trust-icon-size, 24px);
    display: block;
}
.pcms-trust-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pcms-trust-title { font-size: 13px; font-weight: 600; color: var(--trust-title-color, #e2e2ef); }
.pcms-trust-sub { font-size: 12px; color: var(--trust-sub-color, #9595aa); }
.pcms-trust-badges[data-style="card"] .pcms-trust-item {
    padding: 16px;
    background: var(--trust-card-bg, #1a1a2e);
    border: 1px solid var(--trust-card-border, #2d2d44);
    border-radius: 10px;
}
.pcms-trust-badges[data-style="stacked"] .pcms-trust-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ---- Language Switcher ---- */
.pcms-lang-switcher { position: relative; display: inline-block; font-size: var(--lang-size, 13px); }
.pcms-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font: inherit;
    cursor: pointer;
    color: var(--lang-color, #9595aa);
    background: var(--lang-bg, transparent);
    border: 1px solid var(--lang-border, #2d2d44);
    border-radius: var(--lang-radius, 8px);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.pcms-lang-toggle:hover { color: var(--lang-hover-color, #fff); }
.pcms-lang-caret svg { width: 14px; height: 14px; display: block; transition: transform 0.2s ease; }
/* The caret points toward wherever the menu will open, then flips once open. */
.pcms-lang-switcher[data-direction="up"] .pcms-lang-caret svg { transform: rotate(180deg); }
.pcms-lang-switcher[data-direction="up"].is-open .pcms-lang-caret svg { transform: rotate(0deg); }
.pcms-lang-switcher[data-direction="down"].is-open .pcms-lang-caret svg { transform: rotate(180deg); }
.pcms-lang-menu {
    position: absolute;
    left: 0;
    min-width: 100%;
    display: none;
    flex-direction: column;
    padding: 6px;
    background: var(--lang-menu-bg, #1a1a2e);
    border: 1px solid var(--lang-border, #2d2d44);
    border-radius: var(--lang-radius, 8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 60;
}
.pcms-lang-switcher[data-direction="up"]   .pcms-lang-menu { bottom: calc(100% + 6px); }
.pcms-lang-switcher[data-direction="down"] .pcms-lang-menu { top: calc(100% + 6px); }
.pcms-lang-switcher.is-open .pcms-lang-menu { display: flex; }
.pcms-lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    white-space: nowrap;
    text-decoration: none;
    color: var(--lang-color, #9595aa);
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.pcms-lang-option:hover {
    background: var(--lang-item-hover, rgba(255, 255, 255, 0.08));
    color: var(--lang-hover-color, #fff);
}
/* Inline mode: no dropdown at all, every language always on show. */
.pcms-lang-switcher[data-display="inline"] .pcms-lang-toggle { display: none; }
.pcms-lang-switcher[data-display="inline"] .pcms-lang-menu {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}
.pcms-lang-switcher[data-show-flag="0"] .pcms-lang-flag,
.pcms-lang-switcher[data-show-flag="0"] .pcms-lang-opt-flag { display: none; }

/* ---- Footer CTA Strip ---- */
.pcms-footer-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px 32px;
    padding: 32px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}
.pcms-footer-cta[data-layout="centered"] {
    flex-direction: column;
    text-align: center;
    justify-content: center;
}
.pcms-fcta-title { margin: 0 0 6px; font-size: 1.4rem; color: var(--fcta-title-color, #e2e2ef); }
.pcms-fcta-text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--fcta-text-color, #9595aa); }
.pcms-fcta-btn {
    flex-shrink: 0;
    display: inline-block;
    padding: 13px 30px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: var(--fcta-btn-color, #fff);
    background: var(--fcta-btn-bg, var(--brand-color, #8B5CF6));
    border-radius: var(--btn-radius, 8px);
    transition: background-color 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}
.pcms-fcta-btn:hover {
    background: var(--fcta-btn-hover-bg, var(--fcta-btn-bg, var(--brand-color, #8B5CF6)));
    transform: translateY(-2px);
    filter: brightness(1.08);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .pcms-footer-bar,
    .pcms-footer-cta { flex-direction: column; text-align: center; }
    .pcms-footer-bar[data-layout="split"] { align-items: center; }
    .pcms-footer-subscribe { flex-direction: column; align-items: stretch; }
    .pcms-trust-badges[data-columns="2"],
    .pcms-trust-badges[data-columns="3"],
    .pcms-trust-badges[data-columns="4"],
    .pcms-trust-badges[data-columns="5"],
    .pcms-trust-badges[data-columns="6"] { grid-template-columns: minmax(0, 1fr); }
    .pcms-footer-brand[data-align="right"] { align-items: flex-start; text-align: left; }
}

/* Reduced motion: keep the colour transitions, drop the hover lifts. */
@media (prefers-reduced-motion: reduce) {
    .pcms-fb-social-link:hover,
    .pcms-back-to-top:hover,
    .pcms-app-badge:hover,
    .pcms-fcta-btn:hover { transform: none; }
    .pcms-back-to-top[data-btt-mode="float"][data-btt-position="center"]:hover { transform: translateX(-50%); }
}

/* ============================================================
   DISCORD COMMUNITY WIDGETS
   Leaderboard / member roster (.pcms-bot-leaderboard) and server stat tiles
   (.pcms-bot-stats), both rendered by initBotWidgets() in widgets.js from the
   bot's export feed.

   The custom properties are the customisation surface: the trait panel and the
   widget's Appearance settings write them onto the widget (botStyleVars() in
   widgets.js turns the data-* attributes into them), so an author's accent
   colour, row gap or avatar size wins over everything here without any of these
   rules needing !important. Unset, each falls back to the site theme.

   Every declaration below that could reasonably be an author's decision reads a
   variable. That is the whole point: the markup is generated at runtime, so the
   builder's generic style tools can only reach the outer box — these are how the
   inside gets styled.

   Structural choices that aren't a single value — the skin, the density, the
   shape of an avatar — are data-attributes instead, and mostly just re-set a
   group of these variables further down.
   ============================================================ */
.pcms-bot-leaderboard,
.pcms-bot-stats,
.pcms-bot-activity {
    /* ---- Palette ---- */
    --pcms-bot-accent: var(--brand-color, #8B5CF6);
    /* The second series (voice, beside messages) and anything else that wants to
       be distinguishable from the accent. Defaults to the accent, so one colour
       still styles the whole widget. */
    --pcms-bot-accent-2: var(--pcms-bot-accent);
    --pcms-bot-text: var(--text-light, #e2e2ef);
    --pcms-bot-muted: var(--text-muted, #94a3b8);
    --pcms-bot-border: var(--border-color, #2d2d44);
    --pcms-bot-border-width: 1px;
    --pcms-bot-shadow: none;

    /* ---- Heading ---- */
    --pcms-bot-title-color: var(--pcms-bot-text);
    --pcms-bot-title-size: 1.15rem;
    --pcms-bot-title-weight: 700;
    --pcms-bot-title-align: left;
    --pcms-bot-title-gap: 14px;

    /* ---- Leaderboard rows ---- */
    --pcms-bot-row-bg: var(--bg-dark, #1a1a2e);
    /* Only the linked variant is interactive, so this is only ever seen there. */
    --pcms-bot-row-hover-bg: var(--pcms-bot-row-bg);
    --pcms-bot-row-gap: 8px;
    --pcms-bot-row-radius: 8px;
    --pcms-bot-row-pad-y: 10px;
    --pcms-bot-row-pad-x: 14px;
    --pcms-bot-avatar: 34px;
    --pcms-bot-avatar-radius: 50%;
    --pcms-bot-rank-color: var(--pcms-bot-muted);
    --pcms-bot-rank-size: 13px;
    --pcms-bot-name-color: var(--pcms-bot-text);
    --pcms-bot-name-size: 14px;
    --pcms-bot-name-weight: 600;
    --pcms-bot-value-color: var(--pcms-bot-accent);
    --pcms-bot-row-value-size: 14px;
    --pcms-bot-sub-color: var(--pcms-bot-muted);
    --pcms-bot-card-min: 220px;

    /* ---- Podium ---- */
    --pcms-bot-gold: #FFD700;
    --pcms-bot-silver: #C0C7D0;
    --pcms-bot-bronze: #CD7F32;

    /* ---- Stat tiles ---- */
    --pcms-bot-tile-bg: var(--bg-card, #1e1e32);
    --pcms-bot-tile-gap: 16px;
    --pcms-bot-tile-radius: 12px;
    --pcms-bot-tile-pad-y: 22px;
    --pcms-bot-tile-pad-x: 16px;
    --pcms-bot-tile-align: center;
    --pcms-bot-value-size: 30px;
    --pcms-bot-tile-value-color: var(--pcms-bot-accent);
    --pcms-bot-label-color: var(--pcms-bot-muted);
    --pcms-bot-label-size: 12px;
    --pcms-bot-label-transform: uppercase;
    --pcms-bot-icon-size: 24px;
    --pcms-bot-cols: 3;

    /* ---- Activity charts ---- */
    --pcms-bot-chart-h: 120px;
    --pcms-bot-bar-radius: 0px;
    --pcms-bot-bar-opacity: 0.8;
    --pcms-bot-area-opacity: 0.16;
    --pcms-bot-total-color: var(--pcms-bot-text);
    --pcms-bot-total-size: 1.35rem;
    /* Follows the tile background unless it is set on its own, which is what the
       channel bars did before they had a variable of their own — so a widget
       that only recolours its surfaces still recolours these. */
    --pcms-bot-channel-track: var(--pcms-bot-tile-bg);
    --pcms-bot-channel-h: 6px;
}

.pcms-bot-title {
    /* Fallbacks on every one of these: the header/footer widget renders its
       heading as a SIBLING of the .pcms-bot-* element rather than inside it, so
       it sits outside the block that declares them and inherits only whatever
       the wrapper was given. */
    margin: 0 0 var(--pcms-bot-title-gap, 14px);
    color: var(--pcms-bot-title-color, var(--text-light, #e2e2ef));
    font-size: var(--pcms-bot-title-size, 1.15rem);
    font-weight: var(--pcms-bot-title-weight, 700);
    text-align: var(--pcms-bot-title-align, left);
}

/* ---- Rows (list + cards) ---- */
.pcms-bot-rows { display: flex; flex-direction: column; gap: var(--pcms-bot-row-gap); }
.pcms-bot-leaderboard[data-layout="cards"] .pcms-bot-rows {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--pcms-bot-card-min, 220px), 1fr));
}

.pcms-bot-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--pcms-bot-row-pad-y, 10px) var(--pcms-bot-row-pad-x, 14px);
    background: var(--pcms-bot-row-bg);
    border: var(--pcms-bot-border-width, 1px) solid var(--pcms-bot-border, var(--border-color, #2d2d44));
    border-radius: var(--pcms-bot-row-radius, 8px);
    box-shadow: var(--pcms-bot-shadow, none);
    color: var(--pcms-bot-text, var(--text-light, #e2e2ef));
    text-decoration: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}
/* Only the linked variant is interactive, so only it gets the affordance. */
a.pcms-bot-row:hover {
    border-color: var(--pcms-bot-accent);
    background: var(--pcms-bot-row-hover-bg, var(--pcms-bot-row-bg));
    transform: translateY(-1px);
}

.pcms-bot-leaderboard[data-layout="cards"] .pcms-bot-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: calc(var(--pcms-bot-row-pad-y, 10px) + 6px) calc(var(--pcms-bot-row-pad-x, 14px) + 2px);
}

.pcms-bot-rank {
    flex-shrink: 0;
    min-width: 1.6em;
    color: var(--pcms-bot-rank-color, var(--text-muted, #94a3b8));
    font-size: var(--pcms-bot-rank-size, 13px);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pcms-bot-avatar {
    flex-shrink: 0;
    width: var(--pcms-bot-avatar);
    height: var(--pcms-bot-avatar);
    border-radius: var(--pcms-bot-avatar-radius, 50%);
    object-fit: cover;
    background: var(--bg-card, #1e1e32);
}
.pcms-bot-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pcms-bot-muted, var(--text-muted, #94a3b8));
    font-size: calc(var(--pcms-bot-avatar) * 0.42);
    font-weight: 700;
    border: 1px solid var(--pcms-bot-border, var(--border-color, #2d2d44));
}

.pcms-bot-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--pcms-bot-name-color, inherit);
    font-size: var(--pcms-bot-name-size, 14px);
    font-weight: var(--pcms-bot-name-weight, 600);
}
.pcms-bot-name a { color: inherit; text-decoration: none; }
.pcms-bot-name a:hover { color: var(--pcms-bot-accent); }

.pcms-bot-value {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--pcms-bot-value-color, var(--pcms-bot-accent));
    font-size: var(--pcms-bot-row-value-size, 14px);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.pcms-bot-leaderboard[data-layout="cards"] .pcms-bot-value { align-items: flex-start; }
.pcms-bot-sub {
    color: var(--pcms-bot-sub-color, var(--text-muted, #94a3b8));
    font-size: 11px;
    font-weight: 500;
}

/* Podium colours. Applied as a left edge rather than a full tint so a long
   board doesn't turn into three differently-coloured blocks. */
.pcms-bot-row.is-top,
.pcms-bot-table tr.is-top td:first-child { border-left: 3px solid var(--pcms-bot-place, var(--pcms-bot-accent)); }
/* Scoped to the widget's own rows. A bare [data-place="1"] is a site-wide selector, and
   data-place is a generic enough attribute name that some other widget or a hand-written
   block could reasonably use it. */
.pcms-bot-row[data-place="1"], .pcms-bot-table tr[data-place="1"] { --pcms-bot-place: var(--pcms-bot-gold, #FFD700); }
.pcms-bot-row[data-place="2"], .pcms-bot-table tr[data-place="2"] { --pcms-bot-place: var(--pcms-bot-silver, #C0C7D0); }
.pcms-bot-row[data-place="3"], .pcms-bot-table tr[data-place="3"] { --pcms-bot-place: var(--pcms-bot-bronze, #CD7F32); }
.pcms-bot-row.is-top .pcms-bot-rank { color: var(--pcms-bot-place, inherit); }

/* ---- Table layout ---- */
/* Scrolls inside its own box: a long member name plus a wide value shouldn't be
   what makes the whole page scroll sideways on a phone. */
.pcms-bot-leaderboard[data-layout="table"] { overflow-x: auto; }
.pcms-bot-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--pcms-bot-name-size, 14px);
    color: var(--pcms-bot-text, var(--text-light, #e2e2ef));
}
.pcms-bot-table th {
    padding: 8px 12px;
    text-align: left;
    color: var(--pcms-bot-muted, var(--text-muted, #94a3b8));
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--pcms-bot-border, var(--border-color, #2d2d44));
}
.pcms-bot-table td {
    padding: var(--pcms-bot-row-pad-y, 10px) 12px;
    background: var(--pcms-bot-table-row-bg, transparent);
    border-bottom: 1px solid var(--pcms-bot-border, var(--border-color, #2d2d44));
}
.pcms-bot-table tr:last-child td { border-bottom: 0; }
/* Zebra striping, off unless an author picks a stripe colour. Second-child so
   the first data row is the plain one. */
.pcms-bot-table tbody tr:nth-child(even) td { background: var(--pcms-bot-stripe-bg, var(--pcms-bot-table-row-bg, transparent)); }
.pcms-bot-cell-name { display: flex; align-items: center; gap: 10px; }
.pcms-bot-table .pcms-bot-num {
    text-align: right;
    color: var(--pcms-bot-value-color, var(--pcms-bot-accent));
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.pcms-bot-table .pcms-bot-num .pcms-bot-sub { display: block; }

/* ---- Server stat tiles ---- */
.pcms-bot-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pcms-bot-guild-icon { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.pcms-bot-guild-name {
    color: var(--pcms-bot-title-color, var(--text-light, #e2e2ef));
    font-size: var(--pcms-bot-title-size, 1.15rem);
    font-weight: var(--pcms-bot-title-weight, 700);
}

.pcms-bot-tiles {
    display: grid;
    grid-template-columns: repeat(var(--pcms-bot-cols), minmax(0, 1fr));
    gap: var(--pcms-bot-tile-gap);
}
.pcms-bot-tile {
    display: flex;
    flex-direction: column;
    /* `center` and `flex-start` are the two useful answers, and the variable
       carries the text-align word — so the flex axis is derived from it rather
       than being a second setting that can disagree with the first. */
    align-items: var(--pcms-bot-tile-items, center);
    gap: 4px;
    padding: var(--pcms-bot-tile-pad-y, 22px) var(--pcms-bot-tile-pad-x, 16px);
    text-align: var(--pcms-bot-tile-align, center);
    background: var(--pcms-bot-tile-bg);
    border: var(--pcms-bot-border-width, 1px) solid var(--pcms-bot-border, var(--border-color, #2d2d44));
    border-radius: var(--pcms-bot-tile-radius, 12px);
    box-shadow: var(--pcms-bot-shadow, none);
    /* A grid item's default min-width is auto, which is its CONTENT width — so a long
       value pushes the track wider than its 1fr share instead of being constrained by
       it, and the row spills past the widget. */
    min-width: 0;
}
.pcms-bot-tile-icon { font-size: var(--pcms-bot-icon-size, 24px); line-height: 1; margin-bottom: 4px; }
.pcms-bot-tile-value {
    color: var(--pcms-bot-tile-value-color, var(--pcms-bot-accent));
    font-size: var(--pcms-bot-value-size);
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    max-width: 100%;
}
/* Sized for a count. The activity tiles introduced values that aren't counts —
   "62h 14m", and "1,204h 30m" on a server with a busy year behind it — which are far
   wider at the same weight. Stepped down by length (marked in initBotStats) rather than
   wrapped, because a duration broken across two lines stops reading as one figure. */
.pcms-bot-tile-value.is-long  { font-size: calc(var(--pcms-bot-value-size) * 0.72); }
.pcms-bot-tile-value.is-xlong { font-size: calc(var(--pcms-bot-value-size) * 0.56); }
.pcms-bot-tile-label {
    color: var(--pcms-bot-label-color, var(--text-muted, #94a3b8));
    font-size: var(--pcms-bot-label-size, 12px);
    text-transform: var(--pcms-bot-label-transform, uppercase);
    letter-spacing: 0.06em;
    /* "credits in circulation" and "Messages / day" are longer than the one-word labels
       this started with; let them wrap instead of widening the track. */
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* ---- Ticket chat launcher (.pcms-ticket-chat) ----
   A floating bubble that opens the bot's member ticket portal in a panel. The panel
   content is an iframe of the bot itself, so nothing in here styles the conversation —
   only the shell around it. */
.pcms-ticket-chat {
    --pcms-chat-accent: var(--brand-color, #8B5CF6);
    /* Every surface below falls back to the accent, which falls back to the site
       brand colour. That chain is what lets the widget expose ten colour pickers
       without making anyone use them: set nothing and it matches the site, set
       only the accent and it behaves exactly as it did before these existed. */
    --pcms-chat-launcher-bg: var(--pcms-chat-accent);
    --pcms-chat-launcher-fg: #fff;
    --pcms-chat-header-bg: var(--pcms-chat-accent);
    --pcms-chat-header-fg: #fff;
    --pcms-chat-panel-bg: var(--bg-card, #1e1e32);
    --pcms-chat-mine-bg: var(--pcms-chat-accent);
    --pcms-chat-mine-fg: #fff;
    --pcms-chat-staff-bg: var(--bg-dark, #1a1a2e);
    --pcms-chat-staff-fg: var(--text-light, #e2e2ef);
    --pcms-chat-w: 380px;
    --pcms-chat-h: 560px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    /* Above ordinary page content but below the site header's own layer, so a sticky
       header still wins when they overlap. */
    z-index: calc(var(--pcms-z-header, 10000) - 1);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}
.pcms-ticket-chat[data-position="bottom-left"] {
    right: auto;
    left: 20px;
    align-items: flex-start;
}

/* Inside the builder canvas only (see initTicketChat). Fixed positioning makes
   the launcher unselectable there, so it sits in the flow like any other block
   and can be clicked to open its settings. Never applies on a live page. */
.pcms-ticket-chat.is-editor {
    position: relative;
    bottom: auto;
    right: auto;
    left: auto;
    align-items: flex-start;
    z-index: auto;
    padding: 8px 0;
}
.pcms-ticket-chat.is-editor .pcms-chat-panel,
.pcms-ticket-chat.is-editor .pcms-chat-scrim { display: none; }

.pcms-chat-launcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--pcms-chat-launcher-bg);
    color: var(--pcms-chat-launcher-fg);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease, padding 0.32s cubic-bezier(.4, 0, .2, 1);
    -webkit-tap-highlight-color: transparent;
}
/* Pointer devices only: on a touch screen :hover sticks after a tap, and the lift stayed
   on until the next tap somewhere else. */
@media (hover: hover) {
    .pcms-chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
}
.pcms-chat-launcher:active { transform: scale(0.94); }
.pcms-chat-launcher:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pcms-chat-icon { font-size: 17px; line-height: 1; }

/* The icon and a close mark share one 20px slot. While the panel is open the icon turns
   away and the x turns in (with a little overshoot), and the label folds up, so the pill
   closes down into a round button — which is now what closes the chat. */
.pcms-chat-glyph {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}
.pcms-chat-glyph > * {
    grid-area: 1 / 1;
    transition: transform 0.4s cubic-bezier(.34, 1.56, .64, 1), opacity 0.2s ease;
}
.pcms-chat-x {
    font-size: 26px;
    line-height: 1;
    font-weight: 400;
    opacity: 0;
    transform: rotate(-90deg) scale(0.3);
}
.pcms-ticket-chat[data-open="1"] .pcms-chat-icon,
.pcms-ticket-chat[data-open="1"] .pcms-chat-launcher-img { opacity: 0; transform: rotate(90deg) scale(0.3); }
.pcms-ticket-chat[data-open="1"] .pcms-chat-x { opacity: 1; transform: none; }
.pcms-ticket-chat[data-open="1"] .pcms-chat-launcher { padding: 12px; }

/* The label is the first thing to go on a narrow screen — the icon alone still reads as
   "chat", and a full-width pill next to a phone's edge does not. The negative margin when
   folded cancels the launcher's gap, so the open button is a true circle. */
.pcms-chat-label {
    display: inline-block;
    max-width: 12em;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.32s cubic-bezier(.4, 0, .2, 1), opacity 0.18s ease, margin 0.32s cubic-bezier(.4, 0, .2, 1);
}
.pcms-ticket-chat[data-open="1"] .pcms-chat-label { max-width: 0; opacity: 0; margin-left: -8px; }

.pcms-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #EF4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg-dark, #12121f);
}

.pcms-chat-panel {
    width: min(var(--pcms-chat-w), calc(100vw - 32px));
    height: min(var(--pcms-chat-h), calc(100vh - 130px));
    display: flex;
    flex-direction: column;
    background: var(--pcms-chat-panel-bg);
    border: 1px solid var(--border-color, #2d2d44);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    /* Where the launcher's centre sits, measured from the panel: the open and close
       animations grow out of and back into this point. */
    --pcms-chat-from: calc(100% - 22px) calc(100% + 34px);
    transform-origin: var(--pcms-chat-from);
}
.pcms-ticket-chat[data-position="bottom-left"] .pcms-chat-panel { --pcms-chat-from: 22px calc(100% + 34px); }
.pcms-chat-panel[hidden] { display: none; }

.pcms-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: var(--pcms-chat-header-bg);
    color: var(--pcms-chat-header-fg);
    flex-shrink: 0;
}
/* The heading column takes the free space so the close button stays hard right
   whether or not a logo and greeting are present. min-width:0 is what lets a
   long greeting ellipsize instead of pushing the button out of the panel. */
.pcms-chat-heading {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.pcms-chat-title { font-weight: 700; font-size: 14px; }
.pcms-chat-greeting {
    font-size: 11.5px;
    line-height: 1.35;
    opacity: 0.8;
    /* Inherits the header text colour rather than setting its own, so one
       header_fg setting covers both lines. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pcms-chat-logo {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    object-fit: cover;
    flex: 0 0 auto;
}
/* Sized to match the emoji it replaces, so swapping one for the other doesn't
   change the launcher's height. */
.pcms-chat-launcher-img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}
.pcms-chat-close {
    background: none;
    border: 0;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    padding: 0 2px;
}
.pcms-chat-close:hover { opacity: 1; }

.pcms-chat-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    /* Reaching the end of the conversation must not start scrolling the page behind. */
    overscroll-behavior: contain;
}

/* Messages. Staff and visitor lean to opposite sides so a thread reads as a
   conversation rather than a log. */
.pcms-chat-msg {
    max-width: 85%;
    padding: 8px 11px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.45;
    /* A pasted URL must not widen the panel into a horizontal scroll. */
    overflow-wrap: anywhere;
}
.pcms-chat-msg.is-mine {
    align-self: flex-end;
    background: var(--pcms-chat-mine-bg);
    color: var(--pcms-chat-mine-fg);
    border-bottom-right-radius: 4px;
}
.pcms-chat-msg.is-staff {
    align-self: flex-start;
    background: var(--pcms-chat-staff-bg);
    color: var(--pcms-chat-staff-fg);
    border-bottom-left-radius: 4px;
}
.pcms-chat-who {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.65;
    margin-bottom: 2px;
}
.pcms-chat-text { display: block; white-space: pre-wrap; }

.pcms-chat-note {
    margin: auto;
    text-align: center;
    padding: 18px 14px;
    color: var(--text-muted, #94a3b8);
    font-size: 13px;
    line-height: 1.55;
}
.pcms-chat-note p { margin: 0 0 12px; }
.pcms-chat-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--pcms-chat-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

/* ---- Ticket list ---- */
.pcms-chat-list { display: flex; flex-direction: column; gap: 6px; }
.pcms-chat-row {
    width: 100%;
    text-align: left;
    background: var(--pcms-chat-staff-bg);
    color: var(--pcms-chat-staff-fg);
    border: 1px solid var(--border-color, #2d2d44);
    border-radius: 10px;
    padding: 9px 11px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.pcms-chat-row:hover { border-color: var(--pcms-chat-accent); }
.pcms-chat-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcms-chat-row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcms-chat-row-cat { font-size: 11px; opacity: 0.7; }
.pcms-chat-chip {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 999px;
}
.pcms-chat-chip.is-open   { background: rgba(16,185,129,0.16); color: #6ee7b7; }
.pcms-chat-chip.is-closed { background: rgba(148,163,184,0.16); color: #94a3b8; }

.pcms-chat-new { margin-top: 10px; width: 100%; border: 0; cursor: pointer; font: inherit; }
.pcms-chat-back {
    align-self: flex-start;
    background: none;
    border: 0;
    color: var(--text-muted, #94a3b8);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    padding: 0 0 6px;
}

/* ---- New conversation form ---- */
.pcms-chat-newform { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.pcms-chat-newform label { display: flex; flex-direction: column; gap: 4px; color: var(--text-muted, #94a3b8); font-size: 12px; }
.pcms-chat-newform input,
.pcms-chat-newform select,
.pcms-chat-newform textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #2d2d44);
    background: var(--bg-input, #16162a);
    color: var(--text-light, #e2e2ef);
    font: inherit;
    font-size: 13px;
    resize: vertical;
}
.pcms-chat-newform .pcms-chat-btn { border: 0; cursor: pointer; font: inherit; }

/* ---- Attachments ---- */
/* Chosen-but-unsent files, above the compose box. */
.pcms-chat-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px 0;
    flex-shrink: 0;
}
.pcms-chat-files[hidden] { display: none; }
.pcms-chat-file {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 150px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--pcms-chat-staff-bg);
    color: var(--pcms-chat-staff-fg);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pcms-chat-file button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; padding: 0; opacity: 0.7; }
.pcms-chat-file button:hover { opacity: 1; }

/* Images inside a message. Capped so a screenshot cannot stretch the panel. */
.pcms-chat-atts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.pcms-chat-atts img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    display: block;
    object-fit: cover;
}

.pcms-chat-attach {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    align-self: flex-end;
    border-radius: 9px;
    border: 1px solid var(--border-color, #2d2d44);
    color: var(--text-muted, #94a3b8);
    font-size: 18px;
    cursor: pointer;
    user-select: none;
}
.pcms-chat-attach:hover { color: var(--text-light, #e2e2ef); border-color: var(--pcms-chat-accent); }

.pcms-chat-compose {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--border-color, #2d2d44);
    flex-shrink: 0;
}
.pcms-chat-compose[hidden] { display: none; }
.pcms-chat-compose textarea {
    flex: 1;
    resize: none;
    min-height: 38px;
    max-height: 110px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #2d2d44);
    background: var(--bg-dark, #1a1a2e);
    color: var(--text-light, #e2e2ef);
    font: inherit;
    font-size: 13.5px;
    line-height: 1.4;
}
.pcms-chat-compose textarea:focus { outline: 2px solid var(--pcms-chat-accent); outline-offset: -1px; }
.pcms-chat-compose textarea:disabled,
.pcms-chat-compose textarea[readonly] { opacity: 0.6; }
.pcms-chat-compose button {
    flex-shrink: 0;
    width: 38px;
    border: 0;
    border-radius: 10px;
    background: var(--pcms-chat-accent);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}
.pcms-chat-compose button:hover { filter: brightness(1.1); }

/* ---- Opening and closing ----
   is-opening / is-closing are set by initTicketChat(). On a wide screen the panel grows
   out of the launcher: a circle opening from the button's centre, with a small scale-up
   and a springy finish, while the header, conversation and composer rise in just behind
   it. Closing runs the circle back into the button, quicker. The end radius is 200%
   rather than "just enough" so the shadow is inside the circle too and does not pop in
   when the clip comes off. */
.pcms-chat-panel.is-opening { animation: pcms-chat-open 0.52s cubic-bezier(.2, .9, .25, 1.06) backwards; }
.pcms-chat-panel.is-closing { animation: pcms-chat-close 0.26s cubic-bezier(.5, 0, .75, 0) forwards; pointer-events: none; }
.pcms-chat-panel.is-opening .pcms-chat-head > *,
.pcms-chat-panel.is-opening .pcms-chat-body,
.pcms-chat-panel.is-opening .pcms-chat-compose {
    animation: pcms-chat-rise 0.42s cubic-bezier(.2, .8, .2, 1) backwards;
}
.pcms-chat-panel.is-opening .pcms-chat-head > * { animation-delay: 0.08s; }
.pcms-chat-panel.is-opening .pcms-chat-body     { animation-delay: 0.15s; }
.pcms-chat-panel.is-opening .pcms-chat-compose  { animation-delay: 0.22s; }

@keyframes pcms-chat-open {
    0%   { opacity: 0; transform: translateY(14px) scale(0.55); clip-path: circle(0 at var(--pcms-chat-from)); }
    30%  { opacity: 1; }
    100% { opacity: 1; transform: none; clip-path: circle(200% at var(--pcms-chat-from)); }
}
@keyframes pcms-chat-close {
    0%   { opacity: 1; transform: none; clip-path: circle(200% at var(--pcms-chat-from)); }
    100% { opacity: 0; transform: translateY(10px) scale(0.6); clip-path: circle(0 at var(--pcms-chat-from)); }
}
@keyframes pcms-chat-rise { from { opacity: 0; transform: translateY(10px); } }

/* A message that arrived while the conversation was on screen pops in from its own
   side; opening a thread draws its history still. */
.pcms-chat-msg.is-new { animation: pcms-chat-pop 0.34s cubic-bezier(.34, 1.56, .64, 1) backwards; }
.pcms-chat-msg.is-mine.is-new  { transform-origin: 100% 100%; }
.pcms-chat-msg.is-staff.is-new { transform-origin: 0 100%; }
@keyframes pcms-chat-pop { from { opacity: 0; transform: translateY(8px) scale(0.6); } }

/* Only the phone sheet uses these two. */
.pcms-chat-scrim,
.pcms-chat-grip { display: none; }

/* ---- Phones: a full-height sheet ----
   A 380px popover inset from both edges left a conversation about 300px wide, sat
   partly under the browser's toolbar (100vh counts the toolbar), and had its message
   box covered by the keyboard. On a phone the panel is a sheet instead: full width,
   sized to the visible viewport, sliding up over a dimmed page. */
@media (max-width: 600px) {
    .pcms-ticket-chat {
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        right: 14px;
    }
    .pcms-ticket-chat[data-position="bottom-left"] { left: 14px; }
    /* Above the site header while the sheet is up — otherwise a sticky header covers
       the sheet's own header and its close button. */
    .pcms-ticket-chat[data-open="1"] { z-index: calc(var(--pcms-z-header, 10000) + 10); }

    .pcms-chat-label { display: none; }
    .pcms-chat-launcher { padding: 14px; }
    /* The sheet has its own close and covers the corner; the round button would only
       sit on top of the composer. */
    .pcms-ticket-chat[data-open="1"] .pcms-chat-launcher {
        opacity: 0;
        transform: scale(0.5);
        pointer-events: none;
        transition: opacity 0.15s ease, transform 0.2s ease;
    }

    .pcms-chat-scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .pcms-ticket-chat[data-open="1"] .pcms-chat-scrim { opacity: 1; pointer-events: auto; }

    /* Sized to the VISIBLE viewport. initTicketChat() sets the two variables from
       visualViewport while the sheet is open, which is what keeps the message box above
       the on-screen keyboard on iOS; 100dvh is the fallback without it. The 12px left
       at the top shows the page behind, so it reads as a sheet over the page. */
    .pcms-chat-panel {
        position: fixed;
        left: 0;
        right: 0;
        top: calc(var(--pcms-chat-top, 0px) + 12px);
        width: auto;
        height: calc(var(--pcms-chat-vh, 100dvh) - 12px);
        border-width: 1px 0 0;
        border-radius: 18px 18px 0 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        transform-origin: 50% 100%;
    }
    .pcms-chat-panel.is-opening { animation: pcms-chat-sheet-in 0.44s cubic-bezier(.2, .9, .25, 1) backwards; }
    .pcms-chat-panel.is-closing { animation: pcms-chat-sheet-out 0.24s cubic-bezier(.5, 0, .75, 0) forwards; }
    /* While a finger is dragging it down, the finger is the only thing moving it. */
    .pcms-chat-panel.is-dragging { animation: none !important; transition: none !important; }

    /* The header is the drag handle: the grip says so, and touch-action keeps the
       browser from treating the drag as a page scroll or pull-to-refresh. */
    .pcms-chat-head { position: relative; padding: 20px 10px 12px 16px; touch-action: none; }
    .pcms-chat-grip {
        display: block;
        position: absolute;
        top: 7px;
        left: 50%;
        width: 38px;
        height: 4px;
        margin-left: -19px;
        border-radius: 999px;
        background: currentColor;
        opacity: 0.35;
    }
    .pcms-chat-title { font-size: 16px; }
    .pcms-chat-greeting { font-size: 12.5px; }
    .pcms-chat-close {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 30px;
        flex: 0 0 auto;
    }

    /* Thumb-sized targets. */
    .pcms-chat-body { padding: 14px 12px; }
    .pcms-chat-msg { font-size: 15px; max-width: 88%; }
    .pcms-chat-row { padding: 12px 14px; font-size: 14.5px; }
    .pcms-chat-back { padding: 6px 0 10px; font-size: 14px; }
    .pcms-chat-btn { padding: 12px 22px; font-size: 15px; }
    .pcms-chat-compose { padding: 10px; }
    .pcms-chat-attach { width: 44px; height: 44px; font-size: 20px; }
    .pcms-chat-compose button { width: 46px; }
    /* 16px or more: iOS zooms the whole page into any field smaller than that the
       moment it is tapped, and leaves it zoomed. */
    .pcms-chat-compose textarea,
    .pcms-chat-newform input,
    .pcms-chat-newform select,
    .pcms-chat-newform textarea { font-size: 16px; }
    .pcms-chat-compose textarea { min-height: 44px; padding: 11px 13px; }

    html.pcms-chat-locked,
    html.pcms-chat-locked body { overflow: hidden; }
}
@keyframes pcms-chat-sheet-in { from { transform: translateY(100%); } }
@keyframes pcms-chat-sheet-out { to { transform: translateY(100%); } }

/* Motion turned down on the device: no growing, sliding or popping — the panel and the
   sheet simply fade, and the launcher swaps state without turning. */
@media (prefers-reduced-motion: reduce) {
    .pcms-chat-panel.is-opening { animation: pcms-chat-fade-in 0.15s ease backwards !important; }
    .pcms-chat-panel.is-closing { animation: pcms-chat-fade-out 0.12s ease forwards !important; }
    .pcms-chat-panel.is-opening .pcms-chat-head > *,
    .pcms-chat-panel.is-opening .pcms-chat-body,
    .pcms-chat-panel.is-opening .pcms-chat-compose,
    .pcms-chat-msg.is-new { animation: none !important; }
    .pcms-chat-glyph > *,
    .pcms-chat-label,
    .pcms-chat-launcher { transition: none !important; }
}
@keyframes pcms-chat-fade-in { from { opacity: 0; } }
@keyframes pcms-chat-fade-out { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .pcms-chat-launcher { transition: none; }
    .pcms-chat-launcher:hover { transform: none; }
}

/* ---- Activity chart (.pcms-bot-activity) ----
   The daily series and channel breakdown behind the stat tiles. The chart is inline
   SVG stretched to the widget's width (preserveAspectRatio="none"), so the height is
   set here rather than baked into the markup. */
.pcms-bot-activity {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.pcms-bot-activity-part { min-width: 0; }
/* The voice half gets the second accent so the two series are told apart at a
   glance. It defaults to the first accent, so a widget that sets only one
   colour still looks deliberate rather than half-styled. */
.pcms-bot-activity-part[data-metric="voice"] { --pcms-bot-accent: var(--pcms-bot-accent-2); }
.pcms-bot-activity-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.pcms-bot-activity-total {
    color: var(--pcms-bot-total-color, var(--text-light, #e2e2ef));
    font-size: var(--pcms-bot-total-size, 1.35rem);
    font-weight: 800;
    line-height: 1.2;
}
.pcms-bot-activity-window {
    color: var(--pcms-bot-muted, var(--text-muted, #94a3b8));
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pcms-bot-chart { width: 100%; height: var(--pcms-bot-chart-h); }
.pcms-bot-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pcms-bot-chart-bar {
    fill: var(--pcms-bot-accent);
    /* Bars are drawn from a scale whose peak is the tallest day, so the quiet ones are
       genuinely short. Fading them slightly keeps the peak legible without redrawing. */
    opacity: var(--pcms-bot-bar-opacity, 0.8);
    /* `rx` as a CSS property is SVG2, and the bars are stretched horizontally by
       preserveAspectRatio="none", so a rounded corner ends up elliptical. Both are
       fine here: it defaults to 0, and a browser that ignores it draws the square
       bars this always had. */
    rx: var(--pcms-bot-bar-radius, 0px);
}
.pcms-bot-chart-bar:hover { opacity: 1; }
.pcms-bot-chart-line { fill: none; stroke: var(--pcms-bot-accent); stroke-width: var(--pcms-bot-line-width, 2); stroke-linejoin: round; }
.pcms-bot-chart-fill { fill: var(--pcms-bot-accent); opacity: var(--pcms-bot-area-opacity, 0.16); }
.pcms-bot-chart-axis {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    color: var(--pcms-bot-muted, var(--text-muted, #94a3b8));
    font-size: 11px;
}
/* The peak sits between the two dates, so it needs to stay centred even when the date
   labels are different widths. */
.pcms-bot-chart-axis span:nth-child(2) { text-align: center; }

.pcms-bot-channels { margin-top: 16px; }
.pcms-bot-channels-title {
    margin: 0 0 8px;
    color: var(--pcms-bot-muted, var(--text-muted, #94a3b8));
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.pcms-bot-channel {
    display: grid;
    /* Name column caps out so one long channel name can't squeeze every bar to nothing. */
    grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}
.pcms-bot-channel-name {
    color: var(--pcms-bot-text, var(--text-light, #e2e2ef));
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pcms-bot-channel-name[data-unknown] { color: var(--pcms-bot-muted, var(--text-muted, #94a3b8)); font-style: italic; }
.pcms-bot-channel-bar {
    display: block;
    height: var(--pcms-bot-channel-h, 6px);
    border-radius: calc(var(--pcms-bot-channel-h, 6px) / 2);
    background: var(--pcms-bot-channel-track, var(--pcms-bot-tile-bg));
    overflow: hidden;
}
.pcms-bot-channel-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--pcms-bot-accent);
    /* Proportional to the leader, so the smallest entries can round to nothing — a
       visible minimum keeps a real channel from looking like an empty row. */
    min-width: 3px;
}
.pcms-bot-channel-value {
    color: var(--pcms-bot-muted, var(--text-muted, #94a3b8));
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ============================================================
   VARIANTS
   The things an author picks that aren't a single value. Each one is a
   data-attribute on the widget root, and nearly all of them work by re-setting
   the variables above — which is what keeps an explicit colour or size winning
   over a skin, since those arrive as inline custom properties and inline beats
   a stylesheet rule.

   Written out per root class rather than as a bare [data-skin="…"]: these are
   attribute names generic enough that some other block could reasonably use
   them, and a site-wide selector would reach it.
   ============================================================ */

/* ---- Skins ---- */

/* No card at all — rows and tiles sit straight on the page. */
.pcms-bot-leaderboard[data-skin="flat"],
.pcms-bot-stats[data-skin="flat"],
.pcms-bot-activity[data-skin="flat"] {
    --pcms-bot-row-bg: transparent;
    --pcms-bot-tile-bg: transparent;
    --pcms-bot-border-width: 0px;
    --pcms-bot-shadow: none;
}

/* The border does the work and nothing is filled in. */
.pcms-bot-leaderboard[data-skin="outline"],
.pcms-bot-stats[data-skin="outline"],
.pcms-bot-activity[data-skin="outline"] {
    --pcms-bot-row-bg: transparent;
    --pcms-bot-tile-bg: transparent;
    --pcms-bot-border-width: 1px;
    --pcms-bot-shadow: none;
}

/* A faint lift off whatever it is sitting on, with no hard edge. Deliberately a
   translucent white rather than a fixed grey, so it works on a dark card and on
   a light section without being told which it is on. */
.pcms-bot-leaderboard[data-skin="soft"],
.pcms-bot-stats[data-skin="soft"],
.pcms-bot-activity[data-skin="soft"] {
    --pcms-bot-row-bg: rgba(255, 255, 255, 0.045);
    --pcms-bot-row-hover-bg: rgba(255, 255, 255, 0.08);
    --pcms-bot-tile-bg: rgba(255, 255, 255, 0.045);
    --pcms-bot-border-width: 0px;
}

.pcms-bot-leaderboard[data-skin="glass"],
.pcms-bot-stats[data-skin="glass"],
.pcms-bot-activity[data-skin="glass"] {
    --pcms-bot-row-bg: rgba(255, 255, 255, 0.06);
    --pcms-bot-row-hover-bg: rgba(255, 255, 255, 0.1);
    --pcms-bot-tile-bg: rgba(255, 255, 255, 0.06);
    --pcms-bot-border: rgba(255, 255, 255, 0.14);
    --pcms-bot-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
}
.pcms-bot-leaderboard[data-skin="glass"] .pcms-bot-row,
.pcms-bot-stats[data-skin="glass"] .pcms-bot-tile {
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
}

/* A plain divided list — the shape a "top 10" usually wants when it is sitting
   inside a card that already has its own border. */
.pcms-bot-leaderboard[data-skin="divided"],
.pcms-bot-stats[data-skin="divided"],
.pcms-bot-activity[data-skin="divided"] {
    --pcms-bot-row-bg: transparent;
    --pcms-bot-tile-bg: transparent;
    --pcms-bot-border-width: 0px;
    --pcms-bot-row-gap: 0px;
    --pcms-bot-row-radius: 0px;
    --pcms-bot-row-pad-x: 2px;
    --pcms-bot-shadow: none;
}
.pcms-bot-leaderboard[data-skin="divided"] .pcms-bot-row {
    border-bottom: 1px solid var(--pcms-bot-border, var(--border-color, #2d2d44));
}
.pcms-bot-leaderboard[data-skin="divided"] .pcms-bot-rows > :last-child { border-bottom: 0; }
/* The lift would move a row against its neighbours' shared edges. */
.pcms-bot-leaderboard[data-skin="divided"] a.pcms-bot-row:hover { transform: none; }

/* ---- Density ---- */
.pcms-bot-leaderboard[data-density="compact"],
.pcms-bot-stats[data-density="compact"],
.pcms-bot-activity[data-density="compact"] {
    --pcms-bot-row-gap: 4px;
    --pcms-bot-row-pad-y: 6px;
    --pcms-bot-row-pad-x: 10px;
    --pcms-bot-avatar: 26px;
    --pcms-bot-tile-gap: 10px;
    --pcms-bot-tile-pad-y: 14px;
    --pcms-bot-tile-pad-x: 12px;
    --pcms-bot-value-size: 24px;
}
.pcms-bot-leaderboard[data-density="roomy"],
.pcms-bot-stats[data-density="roomy"],
.pcms-bot-activity[data-density="roomy"] {
    --pcms-bot-row-gap: 12px;
    --pcms-bot-row-pad-y: 16px;
    --pcms-bot-row-pad-x: 20px;
    --pcms-bot-avatar: 44px;
    --pcms-bot-tile-gap: 22px;
    --pcms-bot-tile-pad-y: 30px;
    --pcms-bot-tile-pad-x: 22px;
    --pcms-bot-value-size: 36px;
}

/* ---- Avatar shape ---- */
.pcms-bot-leaderboard[data-avatar-shape="rounded"] { --pcms-bot-avatar-radius: 8px; }
.pcms-bot-leaderboard[data-avatar-shape="square"]  { --pcms-bot-avatar-radius: 0px; }

/* ---- Rank style ----
   The number becomes a chip. Sized in ems off its own font-size so bumping the
   rank size scales the chip with it rather than cropping the digits. */
.pcms-bot-leaderboard[data-rank-style="circle"] .pcms-bot-rank,
.pcms-bot-leaderboard[data-rank-style="pill"] .pcms-bot-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2em;
    height: 2em;
    padding: 0 0.5em;
    background: var(--pcms-bot-rank-bg, rgba(255, 255, 255, 0.07));
    border-radius: 999px;
}
.pcms-bot-leaderboard[data-rank-style="circle"] .pcms-bot-rank { padding: 0; }
/* The podium rows tint their chip instead of only recolouring the digit, which
   at chip size reads as a missing background rather than a highlight. */
.pcms-bot-leaderboard[data-rank-style="circle"] .pcms-bot-row.is-top .pcms-bot-rank,
.pcms-bot-leaderboard[data-rank-style="pill"] .pcms-bot-row.is-top .pcms-bot-rank {
    background: var(--pcms-bot-place, var(--pcms-bot-accent));
    color: #10101c;
}

/* ---- Stat tile alignment ---- */
.pcms-bot-stats[data-tile-align="left"] {
    --pcms-bot-tile-align: left;
    --pcms-bot-tile-items: flex-start;
}

@media (max-width: 640px) {
    /* Four tiles at 90px each is unreadable; two rows of two is not. Keyed off the
       author's column choice rather than clamping --pcms-bot-cols, because repeat()
       needs a literal integer — a min() in that slot makes the whole rule invalid, so
       it silently did nothing and four tiles stayed four tiles wide.
       1 and 2 columns are left alone: those were deliberate and already fit. */
    .pcms-bot-stats[data-columns="3"] .pcms-bot-tiles,
    .pcms-bot-stats[data-columns="4"] .pcms-bot-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Two to a row leaves an odd tile out on its own in the left column — three
       tiles read as two plus a straggler. The odd one takes the whole row instead. */
    .pcms-bot-stats[data-columns="3"] .pcms-bot-tile:last-child:nth-child(odd),
    .pcms-bot-stats[data-columns="4"] .pcms-bot-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .pcms-bot-leaderboard[data-layout="cards"] .pcms-bot-rows { grid-template-columns: minmax(0, 1fr); }
    /* A 9rem name column plus a bar plus a value is too much for a phone; the name
       gets its own line and the bar takes the width. */
    .pcms-bot-channel { grid-template-columns: minmax(0, 1fr) auto; }
    .pcms-bot-channel-name { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
    .pcms-bot-chart-bar { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
    a.pcms-bot-row:hover { transform: none; }
}

/* =========================================================
   Blog archive + single post
   Shared by views/posts/index.php and the string-built list
   in PostController::renderPostList, so the two paths look
   identical to a reader.
   ========================================================= */

.pcms-post-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.pcms-post-card {
    background: var(--bg-card, #1e1e32);
    border: 1px solid var(--border-color, #2d2d44);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color var(--transition, 0.3s ease), transform var(--transition, 0.3s ease);
}

.pcms-post-card:hover {
    border-color: var(--brand-color, #8B5CF6);
    transform: translateY(-2px);
}

/* With a thumbnail the card becomes two columns on desktop and stacks
   on phones — see the media query at the bottom of this block. */
.pcms-post-card.has-thumb {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
}

.pcms-post-card-thumb {
    display: block;
    overflow: hidden;
    background: var(--bg-darker, #12121f);
}

.pcms-post-card-thumb img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    display: block;
}

.pcms-post-card-body {
    padding: 26px 28px;
    min-width: 0;
}

.pcms-post-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--text-muted, #9595aa);
    font-size: 13px;
    margin-bottom: 12px;
}

.pcms-post-card-title {
    margin: 0 0 10px;
    font-size: 1.35rem;
    line-height: 1.3;
}

.pcms-post-card-title a {
    color: var(--text-light, #e2e2ef);
    text-decoration: none;
    font-weight: 600;
}

.pcms-post-card-title a:hover {
    color: var(--brand-color, #8B5CF6);
}

.pcms-post-card-excerpt {
    color: var(--text-muted, #9595aa);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 14px;
}

.pcms-post-card-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.pcms-post-card-more {
    color: var(--brand-color, var(--link-color));
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.pcms-post-card-more:hover {
    text-decoration: underline;
}

/* ---- Category / tag pills ---- */
.pcms-term-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 30px;
}

.pcms-term-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color, #2d2d44);
    background: var(--bg-card, #1e1e32);
    color: var(--text-muted, #9595aa);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.6;
    transition: color var(--transition, 0.3s ease), border-color var(--transition, 0.3s ease);
}

.pcms-term-pill:hover {
    color: var(--text-light, #e2e2ef);
    border-color: var(--brand-color, #8B5CF6);
}

.pcms-term-pill.is-active {
    background: var(--brand-color, #8B5CF6);
    border-color: var(--brand-color, #8B5CF6);
    color: #fff;
}

.pcms-term-pill-count {
    opacity: 0.7;
    font-size: 11px;
}

/* ---- Pagination ---- */
.pcms-post-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pcms-post-pagination a,
.pcms-post-pagination .is-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
}

.pcms-post-pagination a {
    background: var(--bg-card, #1e1e32);
    color: var(--text-muted, #9595aa);
    border: 1px solid var(--border-color, #2d2d44);
}

.pcms-post-pagination a:hover {
    color: var(--text-light, #e2e2ef);
    border-color: var(--brand-color, #8B5CF6);
}

.pcms-post-pagination .is-current {
    background: var(--brand-color, #8B5CF6);
    color: #fff;
    font-weight: 600;
}

/* ---- Featured (cover) image on the single post ---- */
.pcms-post-featured {
    margin: 0 0 32px;
}

.pcms-post-featured img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 1px solid var(--border-color, #2d2d44);
}

/* ---- Draft preview banner ---- */
.pcms-preview-banner {
    background: rgba(251, 191, 36, 0.12);
    border-bottom: 1px solid rgba(251, 191, 36, 0.4);
    color: #fbbf24;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
}

.pcms-preview-banner a {
    color: inherit;
    text-decoration: underline;
    margin-left: 8px;
}

/* =========================================================
   Attached post gallery (models/Gallery.php)
   .pcms-gallery-item is intentional: widgets.js already binds
   its lightbox to `.pcms-gallery-item img`, so these get
   click-to-enlarge without any extra script.
   ========================================================= */

.pcms-post-gallery {
    margin: 44px 0 0;
}

.pcms-post-gallery-title {
    font-size: 1.15rem;
    margin: 0 0 16px;
    color: var(--text-light, #e2e2ef);
}

.pcms-post-gallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--pcms-gallery-cols, 3), minmax(0, 1fr));
    gap: 12px;
}

.pcms-post-gallery .pcms-gallery-item {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-darker, #12121f);
    border: 1px solid var(--border-color, #2d2d44);
}

.pcms-post-gallery .pcms-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: transform var(--transition, 0.3s ease);
}

.pcms-post-gallery .pcms-gallery-item:hover img {
    transform: scale(1.04);
}

.pcms-post-gallery .pcms-gallery-item figcaption {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--text-muted, #9595aa);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .pcms-post-card.has-thumb {
        grid-template-columns: minmax(0, 1fr);
    }
    .pcms-post-card-thumb img {
        height: 200px;
        min-height: 0;
    }
    .pcms-post-card-body {
        padding: 20px;
    }
    /* Three or four across is unreadable on a phone; two is. */
    .pcms-post-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .pcms-post-gallery .pcms-gallery-item img {
        height: 130px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pcms-post-card,
    .pcms-post-gallery .pcms-gallery-item img {
        transition: none;
    }
    .pcms-post-card:hover,
    .pcms-post-gallery .pcms-gallery-item:hover img {
        transform: none;
    }
}

/* =========================================================
   Content blocks â€” inserted from the "Add a block" bar on the
   post editor. Styled here rather than with inline styles so
   they inherit the site theme and stay restyleable. The same
   rules are mirrored into the TinyMCE content_style in
   admin.js so a block looks the same while you are editing it.
   ========================================================= */

/* ---- Blank space ---- */
.pcms-spacer {
    display: block;
    width: 100%;
    height: 40px;
    line-height: 0;
    font-size: 0;
}

.pcms-spacer[data-size="sm"] { height: 20px; }
.pcms-spacer[data-size="lg"] { height: 70px; }

/* ---- Side-by-side columns ---- */
.pcms-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.pcms-cols[data-cols="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pcms-col {
    min-width: 0;
}

.pcms-col > :first-child { margin-top: 0; }
.pcms-col > :last-child  { margin-bottom: 0; }

/* ---- Note / callout box ---- */
.pcms-callout {
    margin: 24px 0;
    padding: 16px 20px;
    background: color-mix(in srgb, var(--brand-color, #8B5CF6) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand-color, #8B5CF6) 35%, transparent);
    border-left: 3px solid var(--brand-color, #8B5CF6);
    border-radius: 8px;
}

.pcms-callout > :first-child { margin-top: 0; }
.pcms-callout > :last-child  { margin-bottom: 0; }

/* ---- Button link ---- */
.pcms-btn-wrap {
    margin: 24px 0;
}

.pcms-btn-link {
    display: inline-block;
    padding: 12px 26px;
    background: var(--brand-color, #8B5CF6);
    color: #fff !important;
    border-radius: var(--btn-radius, 8px);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none !important;
    transition: filter var(--transition, 0.3s ease), transform var(--transition, 0.3s ease);
}

.pcms-btn-link:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

/* ---- Blog list: grid layout option ---- */
.pcms-post-list.is-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

/* In grid mode the thumbnail sits on top of the text rather than
   beside it â€” a 260px image column inside a 320px card leaves no
   room for the words. */
.pcms-post-list.is-grid .pcms-post-card.has-thumb {
    grid-template-columns: minmax(0, 1fr);
}

.pcms-post-list.is-grid .pcms-post-card-thumb img {
    height: 180px;
    min-height: 0;
}

.pcms-post-list.is-grid .pcms-post-card-body {
    padding: 20px 22px;
}

@media (max-width: 700px) {
    .pcms-cols,
    .pcms-cols[data-cols="3"] {
        grid-template-columns: minmax(0, 1fr);
    }
    .pcms-spacer { height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    .pcms-btn-link { transition: none; }
    .pcms-btn-link:hover { transform: none; }
}

/* ---- Numbered steps block (docs) ---- */
.pcms-steps {
    counter-reset: pcms-step;
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.pcms-steps > li {
    counter-increment: pcms-step;
    position: relative;
    padding: 0 0 18px 46px;
    margin: 0;
    border-left: 2px solid var(--border-color, #2d2d44);
}

.pcms-steps > li:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.pcms-steps > li::before {
    content: counter(pcms-step);
    position: absolute;
    left: -15px;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-color, #8B5CF6);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcms-steps > li > strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-light, #e2e2ef);
}

.pcms-steps > li > p {
    margin: 0;
    color: var(--text-muted, #9595aa);
}

/* ---- Code block ---- */
.pcms-code {
    margin: 24px 0;
    padding: 16px 18px;
    background: var(--bg-darker, #12121f);
    border: 1px solid var(--border-color, #2d2d44);
    border-radius: 8px;
    overflow-x: auto;
}

.pcms-code code {
    font-family: Consolas, Menlo, monospace;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--text-light, #e2e2ef);
    background: none;
    white-space: pre;
}

/* ---- Search results page (/search) ---- */
.pcms-search-page {
    padding: 48px 20px 80px;
    max-width: 820px;
}

.pcms-search-head h1 {
    margin: 0 0 20px;
    font-size: 2rem;
    color: var(--text-light, #e2e2ef);
}

.pcms-search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pcms-search-form input[type="search"] {
    flex: 1 1 240px;
    min-width: 0;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text-light, #e2e2ef);
    background: var(--bg-input, #12121f);
    border: 1px solid var(--border-color, #2d2d44);
    border-radius: var(--btn-radius, 8px);
}

.pcms-search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--brand-color, #8B5CF6);
}

.pcms-search-form button {
    padding: 12px 26px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--brand-color, #8B5CF6);
    border: none;
    border-radius: var(--btn-radius, 8px);
    cursor: pointer;
}

.pcms-search-note {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--text-muted, #9595aa);
}

.pcms-search-empty {
    margin-top: 36px;
    padding: 28px 24px;
    text-align: center;
    background: var(--bg-card, #1e1e32);
    border: 1px solid var(--border-color, #2d2d44);
    border-radius: 10px;
}

.pcms-search-empty p {
    margin: 0 0 8px;
    color: var(--text-muted, #9595aa);
    font-size: 14px;
    line-height: 1.6;
}

.pcms-search-empty p:last-child { margin-bottom: 0; }

.pcms-search-group { margin-top: 40px; }

.pcms-search-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #9595aa);
}

.pcms-search-group-count {
    padding: 1px 7px;
    font-size: 11px;
    letter-spacing: 0;
    color: var(--text-muted, #9595aa);
    background: var(--bg-card, #1e1e32);
    border-radius: 9px;
}

.pcms-search-results {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pcms-search-result + .pcms-search-result {
    border-top: 1px solid var(--border-color, #2d2d44);
}

.pcms-search-result > a {
    display: block;
    padding: 16px 14px;
    border-radius: 8px;
    text-decoration: none;
}

.pcms-search-result > a:hover {
    background: var(--bg-card, #1e1e32);
}

.pcms-search-result-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light, #e2e2ef);
}

.pcms-search-result > a:hover .pcms-search-result-title {
    color: var(--brand-color, #8B5CF6);
}

.pcms-search-result-excerpt {
    display: block;
    margin-top: 5px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-muted, #9595aa);
}

.pcms-search-result-url {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted, #9595aa);
    opacity: 0.75;
    overflow-wrap: anywhere;
}
