/* ─── CMS-specific: header/footer wrappers (replaces WP theme wrapper) ─── */
.luperiq-ts-layout--header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--luperiq-header-bg, #0f172a);
    color: var(--luperiq-header-text, #ffffff);
}

.luperiq-ts-layout--header a {
    color: inherit;
}

.luperiq-ts-layout--header .luperiq-ts-layout-row {
    max-width: var(--luperiq-container, 1280px);
    margin: 0 auto;
    padding: 12px 18px;
}

/* Header: blocks must be transparent so dark header bg shows through */
.luperiq-ts-layout--header .luperiq-ts-block {
    background-color: transparent !important;
    background: transparent !important;
    color: inherit !important;
    border-bottom: none !important;
}

/* Header: 3-col layout — narrow left (toggle), wide center (brand+nav), narrow right (cta+user) */
.luperiq-ts-layout--header .luperiq-ts-layout-row.is-cols-3 {
    grid-template-columns: auto 1fr auto;
}

/* Mega nav links and toggles inside header */
.luperiq-ts-layout--header .luperiq-ts-mega-nav-link,
.luperiq-ts-layout--header .luperiq-ts-mega-nav-toggle {
    color: inherit;
    font-size: var(--luperiq-nav-size, 16px);
}

.luperiq-ts-layout--header .luperiq-ts-mega-nav-link:hover,
.luperiq-ts-layout--header .luperiq-ts-mega-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Nav toggle (hamburger): hidden on desktop, visible on mobile */
.luperiq-ts-nav-toggle {
    display: none;
    gap: 10px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: inherit;
    border-radius: calc(var(--luperiq-radius, 16px) * 0.75);
    padding: 10px 12px;
    cursor: pointer;
}

/* Brand link styling */
.luperiq-ts-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    font-size: var(--luperiq-brand-size, 24px);
    font-weight: 850;
    letter-spacing: 0.2px;
    line-height: 1.1;
    white-space: nowrap;
}

/* Footer wrapper */
.luperiq-theme-footer {
    background: var(--luperiq-footer-bg, var(--luperiq-primary, #0f172a));
    color: var(--luperiq-footer-text, rgba(255,255,255,0.7));
    margin-top: auto;
}

/* Footer layout */
.luperiq-ts-layout--footer {
    color: inherit;
}

.luperiq-ts-layout--footer a {
    color: inherit;
}

.luperiq-ts-layout--footer .luperiq-ts-layout-row {
    max-width: var(--luperiq-container, 1280px);
    margin: 0 auto;
    padding: 24px 18px;
}

/* Footer: blocks transparent like header */
.luperiq-ts-layout--footer .luperiq-ts-block {
    background-color: transparent !important;
    background: transparent !important;
    color: inherit !important;
    border-bottom: none !important;
}

/* Footer legal bar — copyright, address, policy links */
.luperiq-theme-footer-legal {
    max-width: var(--luperiq-container, 1280px);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 24px;
    padding: 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.luperiq-theme-footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.luperiq-theme-footer-legal a:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

.luperiq-theme-footer-legal-note {
    font-weight: 500;
}

.luperiq-theme-footer-legal-sep {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.luperiq-theme-footer-address {
    color: rgba(255, 255, 255, 0.4);
}

/* Ensure page fills viewport height so footer is at bottom */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--luperiq-background, #f1f5f9);
    color: var(--luperiq-text, #1e293b);
}

.site-main {
    flex: 1;
    max-width: var(--luperiq-container, 1100px);
    margin: 0 auto;
    padding: 32px 18px;
    width: 100%;
    box-sizing: border-box;
}

/* CTA group in header */
.luperiq-ts-cta-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* User menu in header */
.luperiq-ts-user-menu {
    display: flex;
    align-items: center;
}

.luperiq-ts-user-menu a {
    text-decoration: none;
    color: inherit;
    opacity: 0.88;
    font-weight: 500;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: calc(var(--luperiq-radius, 16px) * 0.5);
    border: 1px solid rgba(255,255,255,0.2);
}

.luperiq-ts-user-menu a:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}

/* Body typography tokens — only active when the CSS variables are defined via :root */
body {
    font-family: var(--luperiq-body-font, inherit);
    font-size: var(--luperiq-body-size, inherit);
    line-height: var(--luperiq-body-line-height, inherit);
}

.luperiq-ts-layout {
    width: 100%;
    display: grid;
    gap: 14px;
}

/* Page layouts: seamless full-bleed rows, no gap */
.luperiq-ts-layout--page {
    gap: 0;
}

/* Collapse vertical padding when consecutive rows share the same tone */
.luperiq-ts-layout--page > .luperiq-ts-layout-row.is-tone-dark + .luperiq-ts-layout-row.is-tone-dark,
.luperiq-ts-layout--page > .luperiq-ts-layout-row.is-tone-accent + .luperiq-ts-layout-row.is-tone-accent,
.luperiq-ts-layout--page > .luperiq-ts-layout-row.is-tone-muted + .luperiq-ts-layout-row.is-tone-muted,
.luperiq-ts-layout--page > .luperiq-ts-layout-row.is-tone-surface + .luperiq-ts-layout-row.is-tone-surface {
    padding-top: 0;
}

/* Page rows get inner container constraint for readability.
   Use responsive padding so content has breathing room at all viewport widths. */
.luperiq-ts-layout--page > .luperiq-ts-layout-row {
    max-width: none;
    padding-left: clamp(16px, 4vw, 48px);
    padding-right: clamp(16px, 4vw, 48px);
}

.luperiq-ts-layout--page > .luperiq-ts-layout-row > .luperiq-ts-layout-col {
    max-width: var(--luperiq-container, 1100px);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.luperiq-ts-layout-row {
    display: grid;
    gap: 14px;
    align-items: center;
}

.luperiq-ts-layout-row.is-cols-1 {
    grid-template-columns: 1fr;
}

.luperiq-ts-layout-row.is-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.luperiq-ts-layout-row.is-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.luperiq-ts-layout-row.is-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.luperiq-ts-layout-col {
    min-width: 0;
}

/* Row tone variants */
.luperiq-ts-layout-row.is-tone-surface {
    background-color: var(--luperiq-surface, #ffffff);
    color: var(--luperiq-text, #111111);
}

/* Header/footer layouts inherit their parent background, not tone */
.luperiq-ts-layout--header .luperiq-ts-layout-row,
.luperiq-ts-layout--footer .luperiq-ts-layout-row {
    background-color: transparent;
    color: inherit;
}

.luperiq-ts-layout-row.is-tone-dark {
    background-color: var(--luperiq-primary, #0f1115);
    color: #f1f5f9;
    padding: 48px clamp(16px, 4vw, 48px);
}

.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-block,
.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-hero {
    background: transparent;
    color: inherit;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

/* Full-bleed hero inside page dark rows */
.luperiq-ts-layout--page .luperiq-ts-layout-row.is-tone-dark .luperiq-ts-hero {
    border: none;
    border-radius: 0;
    padding: 64px 24px;
}

.luperiq-ts-layout--page .luperiq-ts-layout-row.is-tone-dark .luperiq-ts-hero .luperiq-ts-hero-actions {
    justify-content: center;
}

.luperiq-ts-layout--page .luperiq-ts-layout-row.is-tone-dark .luperiq-ts-hero .luperiq-ts-hero-title {
    text-align: center;
}

.luperiq-ts-layout--page .luperiq-ts-layout-row.is-tone-dark .luperiq-ts-hero .luperiq-ts-hero-subtitle {
    text-align: center;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.luperiq-ts-layout--page .luperiq-ts-layout-row.is-tone-dark .luperiq-ts-hero .luperiq-ts-hero-kicker {
    text-align: center;
}

.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-hero-meta-item {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.luperiq-ts-layout-row.is-tone-dark a:not(.luperiq-ts-button):not(.luperiq-ts-cta-button) {
    color: #93c5fd;
}

.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-button {
    background: var(--luperiq-accent, #2563eb);
    color: #ffffff;
}

.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-button.is-secondary,
.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-button.is-outline {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
    color: #f1f5f9;
}

.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: inherit;
}

.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-cta-bar {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: inherit;
}

.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-stat {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
    color: inherit;
}

.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-stat span {
    opacity: 0.5;
}

.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-stat strong {
    color: #ffffff;
}

.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-card:hover {
    background: rgba(255, 255, 255, 0.10);
}

.luperiq-ts-layout-row.is-tone-dark .luperiq-ts-card-link {
    color: #93c5fd;
}

.luperiq-ts-layout-row.is-tone-dark h2,
.luperiq-ts-layout-row.is-tone-dark h3 {
    color: #ffffff;
}

.luperiq-ts-layout-row.is-tone-accent {
    background-color: var(--luperiq-accent, #22c55e);
    color: #ffffff;
    padding: 48px clamp(16px, 4vw, 48px);
}

.luperiq-ts-layout-row.is-tone-accent .luperiq-ts-block,
.luperiq-ts-layout-row.is-tone-accent .luperiq-ts-hero {
    background: transparent;
    color: inherit;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.luperiq-ts-layout-row.is-tone-accent a:not(.luperiq-ts-button):not(.luperiq-ts-cta-button) {
    color: #ffffff;
    text-decoration: underline;
}

.luperiq-ts-layout-row.is-tone-accent .luperiq-ts-button {
    background: #ffffff;
    color: var(--luperiq-accent, #2563eb);
    font-weight: 800;
}

.luperiq-ts-layout-row.is-tone-accent .luperiq-ts-button.is-secondary,
.luperiq-ts-layout-row.is-tone-accent .luperiq-ts-button.is-outline {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.luperiq-ts-layout-row.is-tone-accent h2,
.luperiq-ts-layout-row.is-tone-accent h3 {
    color: #ffffff;
}

.luperiq-ts-layout-row.is-tone-muted {
    background-color: var(--luperiq-background, #f6f7f8);
    color: var(--luperiq-text, #111111);
    padding: 48px clamp(16px, 4vw, 48px);
}

/* Theme-level shell (optional sidebars) */

.luperiq-ts-shell {
    width: 100%;
    display: grid;
    gap: 18px;
    align-items: start;
    grid-template-columns: minmax(0, 1fr) var(--luperiq-ts-sidebar-width, 340px);
}

.luperiq-ts-shell.is-sidebar-left {
    grid-template-columns: var(--luperiq-ts-sidebar-width, 340px) minmax(0, 1fr);
}

.luperiq-ts-shell-main {
    min-width: 0;
}

.luperiq-ts-shell-sidebar {
    min-width: 0;
}

.luperiq-ts-shell-sidebar.is-sticky {
    position: sticky;
    top: 20px;
}

.luperiq-ts-sidebar-placeholder {
    border: 1px dashed rgba(15, 17, 21, 0.24);
    border-radius: calc(var(--luperiq-radius, 16px) * 0.75);
    background: rgba(15, 17, 21, 0.03);
    padding: 14px;
    font-size: 13px;
    line-height: 1.35;
    color: rgba(15, 17, 21, 0.78);
    font-weight: 650;
}

@media (max-width: 980px) {
    .luperiq-ts-shell {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 860px) {
    .luperiq-ts-layout-row {
        grid-template-columns: 1fr !important;
    }
}

/* Inline blocks when used inside layout builder (avoid “full-width bar” styling).
   background/color omit !important so per-element inline style overrides take effect. */
body .luperiq-ts-layout .luperiq-ts-block {
    background: transparent;
    border: 0 !important;
    color: inherit;
}

/* Block alignment */
body .luperiq-ts-layout .luperiq-ts-block.is-align-center { text-align: center; }
body .luperiq-ts-layout .luperiq-ts-block.is-align-right { text-align: right; }
body .luperiq-ts-layout .luperiq-ts-block.is-align-left { text-align: left; }

/* Let text_color cascade into block children */
body .luperiq-ts-layout .luperiq-ts-block h1,
body .luperiq-ts-layout .luperiq-ts-block h2,
body .luperiq-ts-layout .luperiq-ts-block h3,
body .luperiq-ts-layout .luperiq-ts-block h4,
body .luperiq-ts-layout .luperiq-ts-block h5,
body .luperiq-ts-layout .luperiq-ts-block h6,
body .luperiq-ts-layout .luperiq-ts-block p,
body .luperiq-ts-layout .luperiq-ts-block span,
body .luperiq-ts-layout .luperiq-ts-block li {
    color: inherit;
}

body .luperiq-ts-layout .luperiq-ts-block-inner {
    max-width: none !important;
    margin: 0 !important;
    padding: 0;
    display: block !important;
    gap: 0 !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

/* Brand */
.luperiq-ts-brand {
    display: flex;
    gap: 10px;
    align-items: center;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.luperiq-ts-brand-logo {
    display: inline-flex;
    align-items: center;
}

.luperiq-ts-brand-logo-img {
    width: auto;
    max-height: 46px;
    display: block;
}

.luperiq-ts-brand-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.luperiq-ts-brand-name {
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.luperiq-ts-brand-subtitle {
    font-size: 12px;
    opacity: 0.85;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nav */
.luperiq-ts-nav {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.luperiq-ts-nav-link,
.luperiq-ts-nav-menu a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    opacity: 0.88;
}

.luperiq-ts-nav-link:hover,
.luperiq-ts-nav-menu a:hover {
    opacity: 1;
}

.luperiq-ts-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

/* Mobile toggle (themes can override/replace) */
.luperiq-ts-nav-toggle {
    display: none;
    gap: 10px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: inherit;
    border-radius: calc(var(--luperiq-radius, 16px) * 0.75);
    padding: 10px 12px;
    font-weight: 850;
    cursor: pointer;
}

.luperiq-ts-nav-toggle-lines {
    width: 18px;
    height: 12px;
    position: relative;
    display: inline-block;
}

.luperiq-ts-nav-toggle-lines::before,
.luperiq-ts-nav-toggle-lines::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.luperiq-ts-nav-toggle-lines::before {
    top: 2px;
}

.luperiq-ts-nav-toggle-lines::after {
    bottom: 2px;
}

@media (max-width: 860px) {
    .luperiq-ts-nav-toggle {
        display: inline-flex;
    }

    .luperiq-ts-nav {
        display: none;
        width: 100%;
    }

    .luperiq-ts-nav.is-open {
        display: flex;
    }
}

/* Mega navigation */
.luperiq-ts-mega-nav {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.luperiq-ts-mega-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    opacity: 0.88;
    padding: 8px 6px;
    border-radius: calc(var(--luperiq-radius, 16px) * 0.5);
}

.luperiq-ts-mega-nav-link:hover {
    opacity: 1;
}

.luperiq-ts-mega-nav-item {
    position: relative;
}

.luperiq-ts-mega-nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    font-weight: 500;
    opacity: 0.88;
    cursor: pointer;
    padding: 8px 6px;
    border-radius: calc(var(--luperiq-radius, 16px) * 0.5);
}

.luperiq-ts-mega-nav-toggle:hover {
    opacity: 1;
}

.luperiq-ts-mega-chevron {
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

[data-lq-mega-open] > .luperiq-ts-mega-nav-toggle .luperiq-ts-mega-chevron {
    transform: rotate(180deg);
}

/* Mega panel */
.luperiq-ts-mega-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--luperiq-surface, #ffffff);
    color: var(--luperiq-text, #111111);
    border: 1px solid var(--luperiq-stroke, rgba(15, 17, 21, 0.12));
    border-radius: calc(var(--luperiq-radius, 16px) * 0.5);
    box-shadow: 0 16px 48px rgba(15, 17, 21, 0.14), 0 4px 12px rgba(15, 17, 21, 0.06);
    padding: 24px;
    z-index: 200;
}

[data-lq-mega-open] > .luperiq-ts-mega-panel {
    display: grid;
    grid-template-columns: repeat(var(--lq-mega-cols, 4), minmax(0, 1fr));
    gap: 24px;
}

.luperiq-ts-mega-panel.is-full-width {
    width: var(--luperiq-container, 1100px);
    max-width: calc(100vw - 32px);
    /* Dynamically positioned via --lq-mega-offset set by JS */
    left: var(--lq-mega-offset, 0px);
}

.luperiq-ts-mega-panel.is-auto-width {
    width: auto;
    min-width: 320px;
    max-width: calc(100vw - 32px);
}

.luperiq-ts-mega-panel.is-fixed-width {
    max-width: calc(100vw - 32px);
}

/* Mega column */
.luperiq-ts-mega-col {
    min-width: 0;
}

.luperiq-ts-mega-col-header {
    display: block;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.6;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(15, 17, 21, 0.08);
    text-decoration: none;
    color: inherit;
}

a.luperiq-ts-mega-col-header:hover {
    opacity: 0.85;
}

.luperiq-ts-mega-col-desc {
    display: block;
    font-size: 12px;
    opacity: 0.55;
    margin: -6px 0 8px;
    line-height: 1.35;
}

/* Mega links */
.luperiq-ts-mega-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.luperiq-ts-mega-link {
    display: block;
    padding: 6px 8px;
    text-decoration: none;
    color: var(--luperiq-text, #111111);
    font-weight: 500;
    font-size: 14px;
    border-radius: calc(var(--luperiq-radius, 16px) * 0.35);
    transition: background 0.15s ease;
    line-height: 1.3;
}

.luperiq-ts-mega-link:hover {
    background: rgba(15, 17, 21, 0.06);
}

.luperiq-ts-mega-link-desc {
    display: block;
    font-size: 12px;
    opacity: 0.5;
    padding: 0 8px 4px;
    line-height: 1.35;
}

/* Level 4 sub-links (pill badges) */
.luperiq-ts-mega-sublinks {
    display: flex;
    gap: 4px;
    padding: 2px 8px 6px;
    flex-wrap: wrap;
}

.luperiq-ts-mega-sublink {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--luperiq-accent, #2563eb);
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.10);
    transition: background 0.15s ease, border-color 0.15s ease;
    line-height: 1.3;
}

.luperiq-ts-mega-sublink:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.22);
    text-decoration: none;
}

.luperiq-ts-mega-sublink[data-type="about"]::before   { content: "\1F4C4"; font-size: 10px; }
.luperiq-ts-mega-sublink[data-type="guide"]::before   { content: "\1F527"; font-size: 10px; }
.luperiq-ts-mega-sublink[data-type="help"]::before    { content: "\1F4D6"; font-size: 10px; }
.luperiq-ts-mega-sublink[data-type="roadmap"]::before { content: "\1F5D3"; font-size: 10px; }
.luperiq-ts-mega-sublink[data-type="docs"]::before    { content: "\1F4DA"; font-size: 10px; }

/* Non-clickable module names */
span.luperiq-ts-mega-tab-card-title,
span.luperiq-ts-mega-link {
    cursor: default;
}

/* Mega nav — Tabbed mode */
[data-lq-mega-open] > .luperiq-ts-mega-panel.is-tabbed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.luperiq-ts-mega-tab-bar {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid rgba(15, 17, 21, 0.08);
    padding: 0 0 0;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.luperiq-ts-mega-tab-bar::-webkit-scrollbar {
    display: none;
}

.luperiq-ts-mega-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: inherit;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    opacity: 0.55;
    cursor: pointer;
    padding: 10px 10px 12px;
    white-space: nowrap;
    transition: opacity 0.15s ease, border-color 0.2s ease;
}

.luperiq-ts-mega-tab:hover {
    opacity: 0.8;
}

.luperiq-ts-mega-tab.is-active {
    opacity: 1;
    border-bottom-color: var(--luperiq-accent, #2563eb);
    color: var(--luperiq-accent, #2563eb);
}

.luperiq-ts-mega-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(15, 17, 21, 0.07);
    border-radius: 9px;
    padding: 0 5px;
    line-height: 1;
}

.luperiq-ts-mega-tab.is-active .luperiq-ts-mega-tab-count {
    background: var(--luperiq-accent, #2563eb);
    color: #fff;
}

.luperiq-ts-mega-tab-panels {
    position: relative;
    min-height: 120px;
}

.luperiq-ts-mega-tab-panel {
    display: none;
    animation: lqMegaTabFadeIn 0.2s ease;
}

.luperiq-ts-mega-tab-panel.is-active {
    display: block;
}

@keyframes lqMegaTabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.luperiq-ts-mega-tab-panel-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--luperiq-accent, #2563eb);
    text-decoration: none;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: calc(var(--luperiq-radius, 16px) * 0.25);
    transition: background 0.15s ease;
}

.luperiq-ts-mega-tab-panel-link:hover {
    background: rgba(37, 99, 235, 0.08);
}

.luperiq-ts-mega-tab-panel-desc {
    font-size: 13px;
    opacity: 0.6;
    margin: 0 0 12px;
    line-height: 1.4;
}

.luperiq-ts-mega-tab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 4px 16px;
}

.luperiq-ts-mega-tab-card {
    padding: 8px 10px;
    border-radius: calc(var(--luperiq-radius, 16px) * 0.35);
    transition: background 0.15s ease;
}

.luperiq-ts-mega-tab-card:hover {
    background: rgba(15, 17, 21, 0.04);
}

.luperiq-ts-mega-tab-card-title {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: var(--luperiq-text, #111111);
    text-decoration: none;
    line-height: 1.3;
}

.luperiq-ts-mega-tab-card-title:hover {
    color: var(--luperiq-accent, #2563eb);
}

.luperiq-ts-mega-tab-card-desc {
    display: block;
    font-size: 12px;
    opacity: 0.5;
    margin-top: 2px;
    line-height: 1.35;
}

.luperiq-ts-mega-tab-card .luperiq-ts-mega-sublinks {
    padding: 2px 0 0;
}

/* Mega nav — Card images */
.luperiq-ts-mega-tab-card-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: calc(var(--luperiq-radius, 16px) * 0.25);
    margin-bottom: 6px;
}

.luperiq-ts-mega-tab-card.has-image {
    display: flex;
    flex-direction: column;
}

/* Mobile: collapse mega nav into hamburger dropdown */
@media (max-width: 860px) {
    /* Hide mega nav by default on mobile — hamburger controls visibility */
    .luperiq-ts-mega-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
    }

    /* Show when hamburger menu is open */
    html.lq-theme-nav-open .luperiq-ts-mega-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    /* Position as dropdown below header (matches .luperiq-ts-nav behavior) */
    .luperiq-theme-header.has-ts-layout .luperiq-ts-mega-nav {
        position: absolute;
        top: 100%;
        left: 18px;
        right: 18px;
        width: auto;
        z-index: 100;
        background: #ffffff;
        color: var(--luperiq-text, #111111);
        border: 1px solid var(--luperiq-stroke, rgba(15, 17, 21, 0.12));
        padding: 10px;
        border-radius: calc(var(--luperiq-radius, 16px) * 0.75);
        box-shadow: 0 12px 24px rgba(15, 17, 21, 0.08);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }

    /* Force readable text color inside dropdown */
    .luperiq-ts-mega-nav .luperiq-ts-mega-nav-toggle,
    .luperiq-ts-mega-nav .luperiq-ts-mega-nav-link {
        color: var(--luperiq-text, #111111);
    }

    /* Simple links (Themes, Pricing, etc.) stack full-width */
    .luperiq-ts-mega-nav > .luperiq-ts-mega-nav-link {
        display: block;
        padding: 10px 14px;
        border-bottom: 1px solid rgba(15, 17, 21, 0.06);
        text-decoration: none;
        font-weight: 500;
    }

    .luperiq-ts-mega-nav-item {
        position: static;
        width: 100%;
    }

    .luperiq-ts-mega-panel {
        position: static;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid rgba(15, 17, 21, 0.08);
        border-radius: 0;
        padding: 12px 0;
    }

    [data-lq-mega-open] > .luperiq-ts-mega-panel {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .luperiq-ts-mega-panel.is-full-width {
        left: auto !important;
        transform: none !important;
        width: 100% !important;
    }

    /* Tabbed mode on mobile: vertical accordion tabs */
    .luperiq-ts-mega-tab-bar {
        flex-direction: column;
        gap: 0;
        border-bottom: none;
        margin-bottom: 0;
        overflow-x: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .luperiq-ts-mega-tab {
        font-size: 13px;
        padding: 12px 14px;
        border-bottom: 1px solid rgba(15, 17, 21, 0.06);
        border-left: 3px solid transparent;
        margin-bottom: 0;
        justify-content: space-between;
        width: 100%;
        text-align: left;
    }

    .luperiq-ts-mega-tab.is-active {
        border-left-color: var(--luperiq-accent, #2563eb);
        border-bottom-color: rgba(15, 17, 21, 0.06);
        background: rgba(37, 99, 235, 0.04);
    }

    /* Tab panels on mobile: hidden by default until JS-activated */
    .luperiq-ts-mega-tab-panel {
        padding: 8px 0 16px 16px;
    }

    .luperiq-ts-mega-tab-panel.is-active {
        animation: none;
    }

    /* Mobile card grid: 2 columns for lists with 4+ items, configurable via data attr */
    .luperiq-ts-mega-tab-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 4px 12px;
    }

    /* Wider cards on mobile */
    .luperiq-ts-mega-tab-card {
        padding: 10px 8px;
    }

    .luperiq-ts-mega-tab-card-title {
        font-size: 13px;
    }

    .luperiq-ts-mega-tab-card .luperiq-ts-mega-sublinks {
        display: flex;
        flex-wrap: wrap;
        gap: 3px;
        padding: 2px 6px 4px;
    }

    .luperiq-ts-mega-tab-card .luperiq-ts-mega-sublink {
        font-size: 10px;
        padding: 2px 7px;
    }

    /* Expanded mode columns on mobile */
    .luperiq-ts-mega-col {
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(15, 17, 21, 0.06);
        margin-bottom: 8px;
    }
}

/* User menu */
.luperiq-ts-user-menu {
    position: relative;
}

.luperiq-ts-user-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    font-weight: 500;
    opacity: 0.88;
    cursor: pointer;
    padding: 4px 0;
}

.luperiq-ts-user-menu-toggle:hover {
    opacity: 1;
}

.luperiq-ts-user-menu-chevron {
    transition: transform 0.2s ease;
}

.luperiq-ts-user-menu[data-open] .luperiq-ts-user-menu-chevron {
    transform: rotate(180deg);
}

.luperiq-ts-user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--luperiq-surface, #fff);
    color: var(--luperiq-ink, #0f172a);
    border-radius: var(--luperiq-radius-sm, 10px);
    box-shadow: var(--luperiq-shadow-soft, 0 10px 24px rgba(15,23,42,0.1));
    padding: 6px 0;
    z-index: 100;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.luperiq-ts-user-menu[data-open] .luperiq-ts-user-menu-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.luperiq-ts-user-menu-item {
    display: block;
    padding: 8px 16px;
    color: var(--luperiq-ink, #0f172a);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.luperiq-ts-user-menu-item:hover {
    background: var(--luperiq-bg, #f6f7fb);
}

.luperiq-ts-user-menu-item--logout {
    border-top: 1px solid var(--luperiq-border, rgba(148,163,184,0.28));
    margin-top: 4px;
    padding-top: 10px;
    opacity: 0.7;
}

.luperiq-ts-user-menu-item--logout:hover {
    opacity: 1;
}

/* Guest (logged out) state */
.luperiq-ts-user-menu-guest {
    display: flex;
    align-items: center;
    gap: 14px;
}

.luperiq-ts-user-menu-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    opacity: 0.88;
}

.luperiq-ts-user-menu-link:hover {
    opacity: 1;
}

@media (max-width: 860px) {
    .luperiq-ts-user-menu-name {
        display: none;
    }

    .luperiq-ts-user-menu-toggle::before {
        content: "";
        display: block;
        width: 20px;
        height: 20px;
        background: currentColor;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center/contain no-repeat;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center/contain no-repeat;
    }

    .luperiq-ts-user-menu-chevron {
        display: none;
    }
}

/* Buttons */
.luperiq-ts-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: calc(var(--luperiq-radius, 8px) * 0.75);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid transparent;
    background: var(--luperiq-accent, #2563eb);
    color: #fff;
    line-height: 1.2;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
}

.luperiq-ts-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.luperiq-ts-button:active {
    transform: translateY(0);
}

.luperiq-ts-button.is-primary {
    background: var(--luperiq-accent, #2563eb);
    border-color: transparent;
    color: #fff;
}

.luperiq-ts-button.is-secondary {
    background: rgba(15, 17, 21, 0.08);
    border-color: rgba(15, 17, 21, 0.18);
    color: var(--luperiq-text, #111111);
}

.luperiq-ts-button.is-secondary:hover {
    background: rgba(15, 17, 21, 0.12);
}

.luperiq-ts-button.is-outline {
    background: transparent;
    border-color: rgba(15, 17, 21, 0.24);
    color: var(--luperiq-text, #111111);
}

.luperiq-ts-button.is-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--luperiq-link, #2563eb);
    padding: 12px 16px;
}

/* CTA bar */
.luperiq-ts-cta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 36px 40px;
    border-radius: calc(var(--luperiq-radius, 16px) * 0.9);
    background: var(--luperiq-surface, #ffffff);
    border: 1px solid rgba(15, 17, 21, 0.08);
    flex-wrap: wrap;
}

.luperiq-ts-cta-copy {
    flex: 1 1 320px;
    min-width: 0;
}

.luperiq-ts-cta-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.luperiq-ts-cta-text {
    font-size: 16px;
    opacity: 0.7;
    line-height: 1.55;
}

.luperiq-ts-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: calc(var(--luperiq-radius, 8px) * 0.75);
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    background: var(--luperiq-accent, #2563eb);
    color: #fff;
    white-space: nowrap;
    transition: filter 0.15s ease, transform 0.1s ease;
}

.luperiq-ts-cta-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.luperiq-ts-layout-row.is-tone-accent .luperiq-ts-cta-bar {
    background: transparent;
    border-color: transparent;
}

.luperiq-ts-layout-row.is-tone-accent .luperiq-ts-cta-title,
.luperiq-ts-layout-row.is-tone-accent .luperiq-ts-cta-text {
    color: #ffffff;
    opacity: 1;
}

.luperiq-ts-layout-row.is-tone-accent .luperiq-ts-cta-text {
    opacity: 0.85;
}

.luperiq-ts-layout-row.is-tone-accent .luperiq-ts-cta-button {
    background: #ffffff;
    color: var(--luperiq-accent, #2563eb);
}

@media (max-width: 640px) {
    .luperiq-ts-cta-bar {
        flex-direction: column;
        text-align: center;
        padding: 28px 20px;
    }
}

/* CTA group */
.luperiq-ts-cta-group {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Hero */
.luperiq-ts-hero {
    background: var(--luperiq-surface, #ffffff);
    border: 1px solid rgba(15, 17, 21, 0.08);
    border-radius: calc(var(--luperiq-radius, 16px) * 1.05);
    padding: 48px 40px;
    box-shadow: 0 12px 32px rgba(15, 17, 21, 0.08);
    display: grid;
    gap: 20px;
}

.luperiq-ts-hero-kicker {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 13px;
    font-weight: 800;
    opacity: 0.6;
}

.luperiq-ts-hero-title {
    margin: 0;
    font-size: 48px;
    letter-spacing: -1px;
    line-height: 1.08;
    font-weight: 800;
}

.luperiq-ts-hero-subtitle {
    margin: 0;
    font-size: 19px;
    opacity: 0.75;
    line-height: 1.55;
    max-width: 640px;
}

.luperiq-ts-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.luperiq-ts-hero-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.luperiq-ts-hero-meta-item {
    background: rgba(15, 17, 21, 0.04);
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 17, 21, 0.06);
}

.luperiq-ts-hero-meta-item span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.6;
    margin-bottom: 4px;
}

.luperiq-ts-hero-meta-item strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

/* Stat grid */
.luperiq-ts-stat-title {
    margin: 0 0 16px;
    font-size: 26px;
    font-weight: 700;
}

.luperiq-ts-stat-grid-items {
    display: grid;
    gap: 14px;
}

.luperiq-ts-stat {
    background: rgba(15, 17, 21, 0.04);
    border-radius: 14px;
    padding: 20px 18px;
    border: 1px solid rgba(15, 17, 21, 0.06);
    transition: transform 0.2s ease;
}

.luperiq-ts-stat:hover {
    transform: translateY(-2px);
}

.luperiq-ts-stat span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.6;
    margin-bottom: 6px;
}

.luperiq-ts-stat strong {
    display: block;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

/* Card grid */
.luperiq-ts-card-grid-title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
}

.luperiq-ts-card-grid-subtitle {
    margin: 0 0 20px;
    opacity: 0.7;
    font-size: 16px;
    line-height: 1.5;
}

.luperiq-ts-card-grid-items {
    display: grid;
    gap: 18px;
}

.luperiq-ts-card {
    background: var(--luperiq-surface, #ffffff);
    border: 1px solid rgba(15, 17, 21, 0.08);
    border-radius: calc(var(--luperiq-radius, 16px) * 0.9);
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(15, 17, 21, 0.06);
    display: grid;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.luperiq-ts-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(15, 17, 21, 0.12);
}

.luperiq-ts-card-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    opacity: 0.55;
    font-weight: 700;
}

.luperiq-ts-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.luperiq-ts-card-text {
    margin: 0;
    opacity: 0.7;
    line-height: 1.6;
    font-size: 15px;
}

.luperiq-ts-card-link {
    color: var(--luperiq-link, #0b57d0);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    transition: gap 0.15s ease;
}

.luperiq-ts-card-link:hover {
    text-decoration: none;
    gap: 8px;
}

.luperiq-ts-card-link::after {
    content: "\2192";
}

/* List */
.luperiq-ts-list-title {
    margin: 0 0 8px;
    font-size: 22px;
}

.luperiq-ts-list ul,
.luperiq-ts-list ol {
    margin: 0;
    padding-left: 18px;
    line-height: 1.6;
    opacity: 0.85;
}

/* FAQ */
.luperiq-ts-faq-title {
    margin: 0 0 10px;
    font-size: 22px;
}

.luperiq-ts-faq-list {
    display: grid;
    gap: 12px;
}

.luperiq-ts-faq-item {
    border: 1px solid rgba(15, 17, 21, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    background: var(--luperiq-surface, #ffffff);
    box-shadow: 0 10px 24px rgba(15, 17, 21, 0.08);
}

.luperiq-ts-faq-item summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.luperiq-ts-faq-item summary::-webkit-details-marker {
    display: none;
}

.luperiq-ts-faq-answer {
    margin-top: 8px;
    opacity: 0.8;
}

/* Pricing */
.luperiq-ts-pricing-title {
    margin: 0 0 6px;
    font-size: 24px;
}

.luperiq-ts-pricing-subtitle {
    margin: 0 0 14px;
    opacity: 0.75;
}

.luperiq-ts-pricing-placeholder {
    padding: 16px;
    border-radius: 12px;
    border: 1px dashed rgba(15, 17, 21, 0.18);
    opacity: 0.7;
}

/* AI tasks */
.luperiq-ts-ai-title {
    margin: 0 0 6px;
    font-size: 24px;
}

.luperiq-ts-ai-subtitle {
    margin: 0 0 12px;
    opacity: 0.75;
}

.luperiq-ts-ai-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.luperiq-ts-ai-cat {
    background: rgba(15, 17, 21, 0.04);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
}

.luperiq-ts-ai-grid {
    display: grid;
    gap: 12px;
}

.luperiq-ts-ai-task {
    background: var(--luperiq-surface, #ffffff);
    border: 1px solid rgba(15, 17, 21, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 8px 22px rgba(15, 17, 21, 0.08);
}

.luperiq-ts-ai-task-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.luperiq-ts-ai-task-head span {
    color: var(--luperiq-accent, #22c55e);
    font-weight: 800;
    font-size: 12px;
}

.luperiq-ts-ai-task p {
    margin: 8px 0 6px;
    opacity: 0.75;
    line-height: 1.5;
}

.luperiq-ts-ai-task-scope {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 700;
}

@media (max-width: 860px) {
    .luperiq-ts-stat-grid-items {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .luperiq-ts-hero-meta {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .luperiq-ts-hero {
        padding: 32px 20px;
    }
    .luperiq-ts-layout--page .luperiq-ts-layout-row.is-tone-dark .luperiq-ts-hero {
        padding: 40px 16px;
    }
    .luperiq-ts-hero-title {
        font-size: 32px;
        letter-spacing: -0.5px;
    }
    .luperiq-ts-hero-subtitle {
        font-size: 16px;
    }
    .luperiq-ts-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .luperiq-ts-layout-row.is-tone-dark,
    .luperiq-ts-layout-row.is-tone-accent,
    .luperiq-ts-layout-row.is-tone-muted {
        padding: 32px 16px;
    }
    .luperiq-ts-stat-grid-items {
        grid-template-columns: 1fr 1fr !important;
    }
    .luperiq-ts-hero-meta {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Popup Overlay ─────────────────────────────────────────── */

.luperiq-ts-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    pointer-events: none;
}

.luperiq-ts-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.luperiq-ts-popup-overlay.is-closing {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
}

.luperiq-ts-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}

.luperiq-ts-popup-content {
    position: relative;
    background: var(--luperiq-surface, #fff);
    border-radius: var(--luperiq-radius, 14px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, .3);
    overflow: auto;
    max-width: calc(100vw - 32px);
    padding: 24px;
}

.luperiq-ts-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--luperiq-text, #333);
    opacity: .6;
    transition: opacity .15s;
    padding: 4px 8px;
}

.luperiq-ts-popup-close:hover {
    opacity: 1;
}

.luperiq-ts-popup-close-action {
    display: inline-block;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: inherit;
    line-height: 1.4;
    opacity: .7;
    transition: opacity .15s;
    padding: 4px 12px;
}

.luperiq-ts-popup-close-action:hover {
    opacity: 1;
}

/* Position variants */
.luperiq-ts-popup-overlay[data-lqts-popup-position="bottom_bar"] {
    align-items: flex-end;
    justify-content: stretch;
}
.luperiq-ts-popup-overlay[data-lqts-popup-position="bottom_bar"] .luperiq-ts-popup-content {
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    max-height: none;
}

.luperiq-ts-popup-overlay[data-lqts-popup-position="top_bar"] {
    align-items: flex-start;
    justify-content: stretch;
}
.luperiq-ts-popup-overlay[data-lqts-popup-position="top_bar"] .luperiq-ts-popup-content {
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    max-height: none;
}

.luperiq-ts-popup-overlay[data-lqts-popup-position="bottom_right"] {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 24px;
}

.luperiq-ts-popup-overlay[data-lqts-popup-position="bottom_left"] {
    align-items: flex-end;
    justify-content: flex-start;
    padding: 24px;
}

/* Animation: slide_up */
.luperiq-ts-popup-overlay[data-lqts-popup-animation="slide_up"] .luperiq-ts-popup-content {
    transform: translateY(30px);
    transition: transform .3s ease, opacity .3s ease;
}
.luperiq-ts-popup-overlay[data-lqts-popup-animation="slide_up"].is-open .luperiq-ts-popup-content {
    transform: translateY(0);
}

/* Animation: scale */
.luperiq-ts-popup-overlay[data-lqts-popup-animation="scale"] .luperiq-ts-popup-content {
    transform: scale(.9);
    transition: transform .3s ease, opacity .3s ease;
}
.luperiq-ts-popup-overlay[data-lqts-popup-animation="scale"].is-open .luperiq-ts-popup-content {
    transform: scale(1);
}

/* --- Newsletter signup --- */

.luperiq-ts-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.luperiq-ts-newsletter-heading {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
}

.luperiq-ts-newsletter-subheading {
    margin: 0 0 8px;
    opacity: 0.75;
    line-height: 1.5;
}

.luperiq-ts-field {
    display: flex;
    flex-direction: column;
}

.luperiq-ts-input {
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--luperiq-radius, 8px);
    font-size: 15px;
    font-family: inherit;
    background: var(--luperiq-surface, #fff);
    color: var(--luperiq-text, #111);
    transition: border-color 0.15s;
}

.luperiq-ts-input:focus {
    outline: none;
    border-color: var(--luperiq-accent, #22c55e);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.luperiq-ts-newsletter-submit {
    width: 100%;
    cursor: pointer;
}

.luperiq-ts-newsletter-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.luperiq-ts-newsletter-error {
    margin: 6px 0 0;
    color: #dc2626;
    font-size: 13px;
}

/* Newsletter list checkboxes (Step 2) */
.luperiq-ts-newsletter-list-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin: 8px 0;
    border: 1px solid rgba(15, 17, 21, 0.14);
    border-radius: calc(var(--luperiq-radius, 16px) * 0.5);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.luperiq-ts-newsletter-list-option:hover {
    border-color: var(--luperiq-accent, #22c55e);
    background: rgba(0, 0, 0, 0.02);
}

.luperiq-ts-newsletter-list-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--luperiq-accent, #22c55e);
    cursor: pointer;
}

.luperiq-ts-newsletter-step {
    animation: lqts-fade-in 0.3s ease;
}

@keyframes lqts-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.luperiq-ts-newsletter-success {
    text-align: center;
}

.luperiq-ts-newsletter-success-msg {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
}

.luperiq-ts-newsletter-coupon-msg {
    margin: 0 0 8px;
    font-size: 14px;
    opacity: 0.8;
}

/* --- Coupon display --- */

.luperiq-ts-coupon-static {
    text-align: center;
}

.luperiq-ts-coupon-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    opacity: 0.8;
}

.luperiq-ts-coupon-display {
    display: inline-flex;
    align-items: stretch;
    border: 2px dashed var(--luperiq-accent, #22c55e);
    border-radius: var(--luperiq-radius, 8px);
    overflow: hidden;
    background: var(--luperiq-surface, #fff);
}

.luperiq-ts-coupon-code {
    padding: 10px 16px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--luperiq-text, #111);
    user-select: all;
}

.luperiq-ts-coupon-copy {
    padding: 10px 16px;
    border: none;
    border-left: 2px dashed var(--luperiq-accent, #22c55e);
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--luperiq-accent, #22c55e);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.luperiq-ts-coupon-copy:hover {
    background: var(--luperiq-accent, #22c55e);
    color: #fff;
}

.luperiq-ts-coupon-copy.is-copied {
    background: var(--luperiq-accent, #22c55e);
    color: #fff;
}

/* Minimize pill */
.luperiq-ts-popup-pill {
    position: fixed;
    z-index: 99998;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--luperiq-accent, #22c55e);
    color: #fff;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    transition: transform .2s, box-shadow .2s;
    animation: lqts-pill-in .3s ease;
}
.luperiq-ts-popup-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.luperiq-ts-popup-pill[data-lqts-popup-pill-position="bottom_right"] { bottom: 24px; right: 24px; }
.luperiq-ts-popup-pill[data-lqts-popup-pill-position="bottom_left"] { bottom: 24px; left: 24px; }
.luperiq-ts-popup-pill[data-lqts-popup-pill-position="top_right"] { top: 24px; right: 24px; }
.luperiq-ts-popup-pill[data-lqts-popup-pill-position="top_left"] { top: 24px; left: 24px; }
.luperiq-ts-popup-pill-icon { font-size: 16px; }

@keyframes lqts-pill-in {
    from { opacity: 0; transform: scale(.8) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 600px) {
    .luperiq-ts-popup-content {
        max-width: calc(100vw - 16px) !important;
        width: calc(100vw - 16px) !important;
        padding: 16px;
    }
    .luperiq-ts-popup-pill {
        padding: 8px 14px;
        font-size: 13px;
    }
    .luperiq-ts-popup-pill[data-lqts-popup-pill-position="bottom_right"],
    .luperiq-ts-popup-pill[data-lqts-popup-pill-position="bottom_left"] { bottom: 16px; }
    .luperiq-ts-popup-pill[data-lqts-popup-pill-position="bottom_right"] { right: 16px; }
    .luperiq-ts-popup-pill[data-lqts-popup-pill-position="bottom_left"] { left: 16px; }
    .luperiq-ts-popup-pill[data-lqts-popup-pill-position="top_right"],
    .luperiq-ts-popup-pill[data-lqts-popup-pill-position="top_left"] { top: 16px; }
    .luperiq-ts-popup-pill[data-lqts-popup-pill-position="top_right"] { right: 16px; }
    .luperiq-ts-popup-pill[data-lqts-popup-pill-position="top_left"] { left: 16px; }
}
