/* ==========================================================================
   AstrophotoMarket.com - redesign 2026-10 foundation (WP-A)
   --------------------------------------------------------------------------
   Loaded by layout/master.html.twig (body.apm-public), layout/authMaster.html.twig
   (body.apm-auth) and layout/masterAdmin.html.twig (logged-in app, components only).

   Rules:
   - px only (Metronic forces html{font-size:13px}, 12px under 992px).
   - Every class is prefixed apm-. Rules that restyle Metronic, Bootstrap or the older
     .am-* design system are scoped under body.apm-public so the logged-in app is unchanged.
   - Class reference for other packages: claude-work/redesign-2026-10/FOUNDATION.md

   Contents
     0. Fonts
     1. Tokens
     2. Base (public + auth bodies)
     3. Layout: container, sections, glows, grids
     4. Typography: display, headings, lead, highlight, eyebrow
     5. Buttons, icon buttons, icon tiles, pills, chips, tags
     6. Section heading block
     7. Dataset card + rank numerals + rank badge
     8. Stats, frame/window, spec list, panel, author card, credit chip, error box, photo layer
     9. Motion: reveal, count-up, live dot
    10. Header + mobile drawer
    11. Footer
    12. Shell refresh (body.apm-public only)
    13. Reduced motion
   ========================================================================== */


/* ==========================================================================
   0. Fonts (self-hosted, OFL; files in ../fonts, licences next to them)
   ========================================================================== */

@font-face {
    font-family: 'Bricolage Grotesque Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url('../fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2') format('woff2-variations'),
         url('../fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Bricolage Grotesque Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url('../fonts/bricolage-grotesque-latin-opsz-normal.woff2') format('woff2-variations'),
         url('../fonts/bricolage-grotesque-latin-opsz-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
    --apm-bg-deep: #04060C;
    --apm-bg: #070A12;
    --apm-bg-subtle: #0B101C;
    --apm-surface: #101726;
    --apm-surface-hover: #151E33;
    --apm-surface-elevated: #1A2440;
    --apm-border: #1C2538;
    --apm-border-light: #2A3654;
    --apm-text: #F4F6FB;
    --apm-text-secondary: #C2C9DB;
    --apm-text-muted: #8E99B5;
    --apm-accent: #FF7F00;
    --apm-accent-hover: #E86F00;
    --apm-accent-light: #FFA640;
    --apm-accent-ink: #1A0D00;
    --apm-accent-tint: rgba(255, 127, 0, .12);
    --apm-accent-border: rgba(255, 127, 0, .32);
    --apm-blue-glow: rgba(64, 110, 255, .16);
    --apm-free: #22C55E;
    --apm-free-tint: rgba(34, 197, 94, .14);
    --apm-gold: #FFD166;
    --apm-radius-sm: 10px;
    --apm-radius: 16px;
    --apm-radius-lg: 22px;
    --apm-radius-xl: 30px;
    --apm-container: 1280px;
    --apm-font-display: 'Bricolage Grotesque Variable', 'Inter', system-ui, sans-serif;
    --apm-font-sans: 'Inter', system-ui, sans-serif;
    --apm-font-mono: 'JetBrains Mono', ui-monospace, monospace;

    /* Derived (not in the spec table, used across components) */
    --apm-free-light: #86EFAC;
    --apm-free-border: rgba(34, 197, 94, .34);
    --apm-danger: #F87171;
    --apm-gradient-accent: linear-gradient(135deg, #FF9A1F 0%, #FF7F00 100%);
    --apm-gradient-text: linear-gradient(120deg, #FFC46B 0%, #FF7F00 55%, #FF9A1F 100%);
    --apm-gradient-text-free: linear-gradient(120deg, #BBF7D0 0%, #4ADE80 50%, #22C55E 100%);
    --apm-gradient-surface: linear-gradient(180deg, #111A2B 0%, #0D1320 100%);
    --apm-hairline: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .07) 22%, rgba(255, 127, 0, .42) 50%, rgba(255, 255, 255, .07) 78%, rgba(255, 255, 255, 0) 100%);
    --apm-dots: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .035) 1px, transparent 0) 0 0 / 32px 32px;
    --apm-ease: cubic-bezier(.4, 0, .2, 1);
    --apm-shadow-card: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 18px 40px -28px rgba(0, 0, 0, .9);
    --apm-shadow-card-hover: 0 24px 50px -30px rgba(255, 127, 0, .45);
    --apm-header-h: 64px;
    --apm-gutter: 20px;
}

@media (min-width: 992px) {
    :root {
        --apm-header-h: 78px;
    }
}

@media (min-width: 1024px) {
    :root {
        --apm-gutter: 32px;
    }
}


/* ==========================================================================
   2. Base
   ========================================================================== */

/* No horizontal page scroll on public pages (html:has for the viewport, body as fallback). */
html:has(> body.apm-public),
html:has(> body.apm-auth) {
    overflow-x: clip;
}

body.apm-public,
body.apm-auth {
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* One typeface on every guest page (owner decision 2026-10-02): Bricolage Grotesque for
   headings, body copy and UI. The opsz axis of the variable file gives small sizes the text
   design. The token names stay so component CSS keeps working; Metronic/Bootstrap font
   variables are re-pointed so forms, buttons, tables, select2, SweetAlert and tooltips
   (appended to <body>) inherit it. Scoped to the guest layouts: masterAdmin has neither class. */
body.apm-public,
body.apm-auth {
    --apm-font-sans: var(--apm-font-display);
    --apm-font-mono: var(--apm-font-display);
    --bs-font-sans-serif: var(--apm-font-display);
    --bs-body-font-family: var(--apm-font-display);
    --bs-btn-font-family: var(--apm-font-display);
    font-family: var(--apm-font-display) !important;
    font-optical-sizing: auto;
}

body.apm-public :is(button, input, select, textarea, optgroup, .btn, .form-control, .form-select,
    .form-label, .input-group-text, .menu, .table, .badge, .tooltip, .popover, .dropdown-menu,
    .select2-container, .select2-dropdown, .swal2-popup, .daterangepicker, .tippy-box, .tippy-content),
body.apm-auth :is(button, input, select, textarea, optgroup, .btn, .form-control, .form-select,
    .form-label, .input-group-text, .menu, .table, .badge, .tooltip, .popover, .dropdown-menu,
    .select2-container, .select2-dropdown, .swal2-popup, .tippy-box, .tippy-content) {
    font-family: var(--apm-font-display);
    font-optical-sizing: auto;
}

/* Numbers that used the mono face keep aligned digits. */
body.apm-public :is(.apm-chip, .apm-mono, .apm-card__count, .apm-stat__value, .ds-chip__text, td, time),
body.apm-auth :is(.apm-mono, td, time) {
    font-variant-numeric: tabular-nums;
}

/* Public <body> is a flex column (Metronic app-blank). Without this, any in-flow child with
   overflow other than visible gets squeezed by the flex algorithm and clips its content.
   Fixed/absolute children (scroll-to-top, drawer, consent banner) are out of flow, unaffected. */
body.apm-public > * {
    flex-shrink: 0;
}

body.apm-public {
    --bs-body-bg: #070A12;
    --bs-body-bg-rgb: 7, 10, 18;
    background-color: var(--apm-bg) !important;
    color: var(--apm-text-secondary);
}

body.apm-public ::selection,
body.apm-auth ::selection {
    background: rgba(255, 127, 0, .35);
    color: #FFFFFF;
}

/* Visible focus ring on everything focusable (keyboard only). */
body.apm-public :focus-visible,
body.apm-auth :focus-visible,
[class*="apm-"]:focus-visible {
    outline: 2px solid var(--apm-accent-light);
    outline-offset: 2px;
}

.apm-icon {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
}

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


/* ==========================================================================
   3. Layout
   ========================================================================== */

.apm-container {
    width: 100%;
    max-width: calc(var(--apm-container) + 2 * var(--apm-gutter));
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--apm-gutter);
    padding-right: var(--apm-gutter);
}

.apm-container--narrow {
    max-width: calc(880px + 2 * var(--apm-gutter));
}

/* Section: 80px rhythm (112px from 1024px), hairline divider with a faint orange centre. */
.apm-section {
    position: relative;
    flex-shrink: 0; /* public <body> is a flex column (Metronic app-blank) */
    padding: 80px 0;
    background: var(--apm-bg);
    color: var(--apm-text-secondary);
    overflow: clip;
    isolation: isolate;
}

.apm-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: min(100%, var(--apm-container));
    height: 1px;
    transform: translateX(-50%);
    background: var(--apm-hairline);
    pointer-events: none;
    z-index: 1;
}

.apm-section--flush::before {
    display: none;
}

.apm-section--alt {
    background: var(--apm-bg-subtle);
}

.apm-section--deep {
    background: var(--apm-bg-deep);
}

.apm-section--grid {
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .035) 1px, transparent 0);
    background-size: 32px 32px;
}

/* Dot grid that fades out towards the edges (softer than the full-bleed grid). */
.apm-section--grid-fade::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--apm-dots);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 100%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

.apm-section--tight {
    padding: 56px 0;
}

@media (min-width: 1024px) {
    .apm-section {
        padding: 112px 0;
    }

    .apm-section--tight {
        padding: 72px 0;
    }
}

/* Glow blob: absolutely positioned, aria-hidden, never interactive. */
.apm-glow {
    position: absolute;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 127, 0, .16) 0%, rgba(255, 127, 0, 0) 68%);
    filter: blur(20px);
    pointer-events: none;
    z-index: -1;
}

.apm-glow--blue {
    background: radial-gradient(circle, rgba(64, 110, 255, .2) 0%, rgba(64, 110, 255, 0) 68%);
}

.apm-glow--green {
    background: radial-gradient(circle, rgba(34, 197, 94, .14) 0%, rgba(34, 197, 94, 0) 68%);
}

.apm-glow--sm {
    width: 360px;
    height: 360px;
}

.apm-glow--tl { top: -220px; left: -200px; }
.apm-glow--tr { top: -220px; right: -200px; }
.apm-glow--bl { bottom: -240px; left: -200px; }
.apm-glow--br { bottom: -240px; right: -200px; }
.apm-glow--center { top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* Grids */
.apm-grid {
    display: grid;
    gap: 20px;
}

.apm-grid--2,
.apm-grid--3,
.apm-grid--4,
.apm-grid--cards {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 560px) {
    .apm-grid--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

@media (min-width: 992px) {
    .apm-grid--cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
    .apm-grid { gap: 24px; }
    .apm-grid--4,
    .apm-grid--cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Top-10 rail: horizontal scroll-snap row (next card peeks) below 1200px, 5 x 2 grid above. */
.apm-rank-grid {
    --apm-rank-gap: 16px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(236px, 74%);
    gap: var(--apm-rank-gap);
    margin: 0 calc(-1 * var(--apm-gutter));
    padding: 8px var(--apm-gutter) 18px calc(var(--apm-gutter) + 12px);
    scroll-padding-left: calc(var(--apm-gutter) + 12px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.apm-rank-grid::-webkit-scrollbar {
    display: none;
}

.apm-rank-grid > * {
    scroll-snap-align: start;
    min-width: 0;
}

@media (min-width: 600px) {
    .apm-rank-grid { grid-auto-columns: minmax(236px, 42%); }
}

@media (min-width: 900px) {
    .apm-rank-grid { grid-auto-columns: minmax(236px, 30%); }
}

@media (min-width: 1200px) {
    .apm-rank-grid {
        --apm-rank-gap: 22px;
        grid-auto-flow: row;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        row-gap: 40px;
        margin: 0;
        padding: 0 0 0 12px;
        overflow: visible;
        scroll-snap-type: none;
    }
}


/* ==========================================================================
   4. Typography
   ========================================================================== */

.apm-display {
    font-family: var(--apm-font-display);
    font-optical-sizing: auto;
}

.apm-mono {
    font-family: var(--apm-font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

.apm-h1,
.apm-h2,
.apm-h3 {
    font-family: var(--apm-font-display);
    color: var(--apm-text);
    margin: 0;
    text-wrap: balance;
}

.apm-h1 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.025em;
}

.apm-h2 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.apm-h3 {
    font-size: 20px;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

@media (min-width: 768px) {
    .apm-h1 { font-size: 56px; }
    .apm-h2 { font-size: 38px; }
    .apm-h3 { font-size: 22px; }
}

@media (min-width: 1200px) {
    .apm-h1 { font-size: 68px; }
    .apm-h2 { font-size: 46px; }
}

.apm-lead {
    font-size: 16px;
    line-height: 1.7;
    color: var(--apm-text-secondary);
    margin: 0;
    text-wrap: pretty;
}

@media (min-width: 768px) {
    .apm-lead { font-size: 18px; }
}

.apm-text {
    font-size: 15px;
    line-height: 1.65;
    color: var(--apm-text-secondary);
    margin: 0;
}

@media (min-width: 768px) {
    .apm-text { font-size: 16px; }
}

.apm-small {
    font-size: 13px;
    line-height: 1.55;
    color: var(--apm-text-muted);
}

/* Headline device: the accent clause of a headline. Used once per section h2. */
.apm-hl {
    background: var(--apm-gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    /* Keeps descenders (g, y, p) inside the clipped background. */
    padding-bottom: .06em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.apm-hl--free {
    background-image: var(--apm-gradient-text-free);
}

/* Eyebrow pill above h2 */
.apm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 5px 13px 5px 10px;
    border: 1px solid var(--apm-border-light);
    border-radius: 999px;
    background: rgba(16, 23, 38, .7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--apm-text-secondary);
    font-family: var(--apm-font-sans);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .04em;
    white-space: nowrap;
}

.apm-eyebrow__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--apm-accent);
    box-shadow: 0 0 0 3px rgba(255, 127, 0, .16), 0 0 10px rgba(255, 127, 0, .7);
    flex-shrink: 0;
}

.apm-eyebrow__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: -3px;
    border-radius: 6px;
    background: var(--apm-accent-tint);
    color: var(--apm-accent-light);
}

.apm-eyebrow--free .apm-eyebrow__dot {
    background: var(--apm-free);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .16), 0 0 10px rgba(34, 197, 94, .7);
}

.apm-eyebrow--free .apm-eyebrow__icon {
    background: var(--apm-free-tint);
    color: var(--apm-free-light);
}


/* ==========================================================================
   5. Buttons, icon buttons, tiles, pills, chips, tags
   ========================================================================== */

.apm-btn {
    --apm-btn-h: 48px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: var(--apm-btn-h);
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: var(--apm-font-sans);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.005em;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
    user-select: none;
    transition: transform .2s var(--apm-ease), box-shadow .2s var(--apm-ease), background-color .2s var(--apm-ease), border-color .2s var(--apm-ease), color .2s var(--apm-ease);
}

.apm-btn:focus-visible {
    outline: 2px solid var(--apm-accent-light);
    outline-offset: 3px;
}

.apm-btn--primary {
    background: var(--apm-gradient-accent);
    color: var(--apm-accent-ink) !important;
    box-shadow: 0 8px 24px rgba(255, 127, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .28);
}

.apm-btn--primary:hover {
    transform: translateY(-1px);
    color: var(--apm-accent-ink) !important;
    box-shadow: 0 12px 32px rgba(255, 127, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .32);
    background: linear-gradient(135deg, #FFA93D 0%, #FF8710 100%);
}

.apm-btn--primary:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(255, 127, 0, .3);
}

.apm-btn--outline {
    background: rgba(255, 255, 255, .015);
    border-color: var(--apm-border-light);
    color: var(--apm-text-secondary) !important;
}

.apm-btn--outline:hover {
    border-color: var(--apm-accent-border);
    background: rgba(255, 127, 0, .06);
    color: var(--apm-text) !important;
}

.apm-btn--ghost {
    --apm-btn-h: auto;
    height: auto;
    padding: 6px 2px;
    background: none;
    color: var(--apm-accent-light) !important;
    font-size: 15px;
}

.apm-btn--ghost .apm-icon {
    transition: transform .2s var(--apm-ease);
}

.apm-btn--ghost:hover {
    color: #FFC46B !important;
}

.apm-btn--ghost:hover .apm-icon:last-child {
    transform: translateX(2px);
}

.apm-btn--sm {
    --apm-btn-h: 38px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
}

.apm-btn--lg {
    --apm-btn-h: 54px;
    padding: 0 28px;
    font-size: 16px;
}

.apm-btn--block {
    display: flex;
    width: 100%;
}

/* Square icon button (header actions, drawer close). 40px visual, 44px tap target on touch. */
.apm-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--apm-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
    color: var(--apm-text-secondary);
    cursor: pointer;
    transition: color .2s var(--apm-ease), border-color .2s var(--apm-ease), background-color .2s var(--apm-ease);
    text-decoration: none !important;
}

.apm-icon-btn:hover {
    color: var(--apm-text);
    border-color: var(--apm-border-light);
    background: rgba(255, 255, 255, .06);
}

@media (pointer: coarse) {
    .apm-icon-btn {
        width: 44px;
        height: 44px;
    }
}

/* Icon tile: every icon on a page sits in one of these. */
.apm-icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--apm-accent-tint);
    border: 1px solid rgba(255, 127, 0, .18);
    color: var(--apm-accent-light);
}

.apm-icon-tile--sm {
    width: 32px;
    height: 32px;
    border-radius: 9px;
}

.apm-icon-tile--lg {
    width: 48px;
    height: 48px;
    border-radius: 11px;
}

.apm-icon-tile--free {
    background: var(--apm-free-tint);
    border-color: rgba(34, 197, 94, .22);
    color: var(--apm-free-light);
}

.apm-icon-tile--blue {
    background: rgba(64, 110, 255, .14);
    border-color: rgba(64, 110, 255, .26);
    color: #9DB5FF;
}

.apm-icon-tile--neutral {
    background: rgba(255, 255, 255, .04);
    border-color: var(--apm-border);
    color: var(--apm-text-secondary);
}

/* Small pill (labels, counts) */
.apm-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--apm-border-light);
    background: rgba(255, 255, 255, .03);
    color: var(--apm-text-secondary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.apm-pill--accent {
    background: var(--apm-accent-tint);
    border-color: var(--apm-accent-border);
    color: var(--apm-accent-light);
}

.apm-pill--free {
    background: var(--apm-free-tint);
    border-color: var(--apm-free-border);
    color: var(--apm-free-light);
}

/* Data chip (mono): hours, telescope, Bortle, coordinates */
.apm-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    height: 24px;
    padding: 0 8px;
    border-radius: 7px;
    border: 1px solid var(--apm-border);
    background: rgba(255, 255, 255, .025);
    color: var(--apm-text-secondary);
    font-family: var(--apm-font-mono);
    font-size: 11.5px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    white-space: nowrap;
}

.apm-chip .apm-icon {
    color: var(--apm-text-muted);
}

.apm-chip__text {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Overlay tag on images (tutorial, premium, awards). Glass so it reads on any photo. */
.apm-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 9px;
    border-radius: 8px;
    background: rgba(4, 6, 12, .66);
    border: 1px solid rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--apm-text);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.apm-tag--premium {
    color: #FFE29A;
    border-color: rgba(255, 209, 102, .35);
}

.apm-tag--award {
    color: #FFD166;
    border-color: rgba(255, 209, 102, .28);
}

.apm-tag--tutorial .apm-icon {
    color: var(--apm-accent-light);
}


/* ==========================================================================
   6. Section heading block (templates/apm/_heading.html.twig)
   ========================================================================== */

.apm-heading {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.apm-heading__main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    max-width: 760px;
}

.apm-heading__lead {
    max-width: 640px;
}

.apm-heading__link {
    align-self: flex-start;
}

.apm-heading--center {
    align-items: center;
    text-align: center;
}

.apm-heading--center .apm-heading__main {
    align-items: center;
    margin: 0 auto;
}

.apm-heading--center .apm-heading__lead {
    margin: 0 auto;
}

.apm-heading--center .apm-heading__link {
    align-self: center;
}

@media (min-width: 992px) {
    .apm-heading {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 32px;
        margin-bottom: 56px;
    }

    .apm-heading--center {
        flex-direction: column;
        align-items: center;
    }

    .apm-heading:not(.apm-heading--center) .apm-heading__link {
        align-self: flex-end;
        margin-bottom: 4px;
    }
}


/* ==========================================================================
   7. Dataset card (templates/apm/_dataset_card.html.twig)
   ========================================================================== */

.apm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--apm-border);
    border-radius: var(--apm-radius);
    background: var(--apm-gradient-surface);
    box-shadow: var(--apm-shadow-card);
    color: var(--apm-text-secondary);
    text-decoration: none !important;
    transition: transform .3s var(--apm-ease), border-color .3s var(--apm-ease), box-shadow .3s var(--apm-ease);
}

.apm-card:hover {
    transform: translateY(-3px);
    border-color: var(--apm-accent-border);
    box-shadow: var(--apm-shadow-card-hover);
    color: var(--apm-text-secondary);
}

.apm-card:focus-visible {
    outline: 2px solid var(--apm-accent-light);
    outline-offset: 3px;
}

.apm-card--free:hover {
    border-color: var(--apm-free-border);
    box-shadow: 0 24px 50px -30px rgba(34, 197, 94, .4);
}

/* Media wrapper is NOT clipped, so the rank numeral can sit on the card's left edge. */
.apm-card__media-wrap {
    position: relative;
    z-index: 1;
}

.apm-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: calc(var(--apm-radius) - 1px) calc(var(--apm-radius) - 1px) 0 0;
    background:
        radial-gradient(ellipse 80% 70% at 30% 20%, rgba(64, 110, 255, .12) 0%, rgba(64, 110, 255, 0) 70%),
        linear-gradient(160deg, #141D31 0%, #0A0F1A 100%);
}

/* Fallback behind the preview: visible only when the <img> is missing or fails
   (apm.js adds .is-broken to the media box and hides the image). */
.apm-card__fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--apm-text-muted);
    opacity: .55;
}

.apm-card__media.is-broken .apm-card__img {
    display: none;
}

.apm-card__img {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--apm-ease);
}

.apm-card:hover .apm-card__img {
    transform: scale(1.04);
}

/* Bottom shade keeps the price pill and the numeral readable on bright photos. */
.apm-card__media::after {
    content: '';
    position: absolute;
    inset: 45% 0 0 0;
    background: linear-gradient(180deg, rgba(7, 10, 18, 0) 0%, rgba(7, 10, 18, .55) 70%, rgba(7, 10, 18, .78) 100%);
    pointer-events: none;
}

.apm-card__tags {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}

.apm-card__tags--right {
    left: auto;
    justify-content: flex-end;
}

/* Left tags (tutorial / premium) and an award tag on the right collide in narrow columns.
   Then the left tags collapse to icon-only (text stays for screen readers): one left tag
   below 360px of card width (awards like "Top Pick Nomination" are wide), two below 460px.
   home.css keeps an older .home-scoped rule with the same result; they do not conflict. */
.apm-card__media {
    container-type: inline-size;
}

@container (max-width: 360px) {
    .apm-card__media:has(.apm-card__tags--right) .apm-card__tags:not(.apm-card__tags--right) .apm-tag {
        gap: 0;
        padding-left: 7px;
        padding-right: 7px;
        font-size: 0;
    }
}

@container (max-width: 460px) {
    .apm-card__media:has(.apm-card__tags--right) .apm-card__tags:not(.apm-card__tags--right):has(.apm-tag + .apm-tag) .apm-tag {
        gap: 0;
        padding-left: 7px;
        padding-right: 7px;
        font-size: 0;
    }
}

.apm-card__price {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 11px;
    border-radius: 9px;
    background: var(--apm-gradient-accent);
    color: var(--apm-accent-ink);
    font-family: var(--apm-font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}

.apm-card__price--free {
    background: linear-gradient(135deg, #34D178 0%, #16A34A 100%);
    color: #03170A;
}

/* With a rank numeral the numeral owns the lower-left corner, so the price moves right. */
.apm-card--ranked .apm-card__price {
    left: auto;
    right: 10px;
}

.apm-card__body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    padding: 14px 16px 16px;
    border-radius: 0 0 calc(var(--apm-radius) - 1px) calc(var(--apm-radius) - 1px);
    background: linear-gradient(180deg, #111A2B 0%, #0D1320 100%);
}

.apm-card__title {
    margin: 0;
    color: var(--apm-text);
    font-family: var(--apm-font-sans);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.005em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.apm-card:hover .apm-card__title {
    color: #FFFFFF;
}

.apm-card__author {
    margin: -2px 0 0;
    color: var(--apm-text-muted);
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apm-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
}

.apm-card__chips .apm-chip--telescope {
    max-width: 100%;
}

.apm-card__count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--apm-free-light);
    font-family: var(--apm-font-mono);
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Rank numeral ("Top 10" look): big display numeral on the lower-left edge of the card,
   tucked behind the card body so it reads as sitting slightly behind the card. */
.apm-card__rank {
    position: absolute;
    left: -14px;
    bottom: -0.1em;
    z-index: 1;
    font-family: var(--apm-font-display);
    font-size: 72px;
    font-weight: 800;
    line-height: .8;
    letter-spacing: -0.06em;
    font-variant-numeric: lining-nums;
    padding: 0 .08em 0 0;
    background: linear-gradient(180deg, #FFE2B8 0%, #FFA640 42%, #FF7F00 72%, #C25400 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px rgba(255, 196, 107, .55);
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .75));
    pointer-events: none;
    user-select: none;
}

.apm-card__rank--free {
    background-image: linear-gradient(180deg, #DCFCE7 0%, #86EFAC 40%, #22C55E 72%, #127A38 100%);
    -webkit-text-stroke-color: rgba(134, 239, 172, .5);
}

.apm-card__rank--gold {
    background-image: linear-gradient(180deg, #FFF6D6 0%, #FFE08A 38%, #FFD166 62%, #C9932B 100%);
    -webkit-text-stroke-color: rgba(255, 233, 168, .7);
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .75)) drop-shadow(0 0 18px rgba(255, 209, 102, .35));
}

@media (min-width: 1200px) {
    .apm-card__rank {
        font-size: 88px;
        left: -16px;
    }
}

/* Rank badge pill (templates/apm/_rank_badge.html.twig): catalog cards, detail title area. */
.apm-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px 0 8px;
    border-radius: 999px;
    border: 1px solid var(--apm-accent-border);
    background: linear-gradient(135deg, rgba(255, 154, 31, .2) 0%, rgba(255, 127, 0, .1) 100%);
    color: #FFC46B;
    font-family: var(--apm-font-sans);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .01em;
    white-space: nowrap;
    vertical-align: middle;
}

.apm-rank-badge .apm-icon {
    color: currentColor;
}

.apm-rank-badge--free {
    border-color: var(--apm-free-border);
    background: linear-gradient(135deg, rgba(74, 222, 128, .18) 0%, rgba(34, 197, 94, .08) 100%);
    color: var(--apm-free-light);
}

.apm-rank-badge--gold {
    border-color: rgba(255, 209, 102, .5);
    background: linear-gradient(135deg, rgba(255, 224, 138, .22) 0%, rgba(255, 209, 102, .1) 100%);
    color: var(--apm-gold);
}

.apm-rank-badge--overlay {
    background-color: rgba(4, 6, 12, .7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.apm-rank-badge--md {
    height: 30px;
    padding: 0 12px 0 10px;
    font-size: 13px;
}


/* ==========================================================================
   8. Stats, frame, spec list, panel, author card, credit, error box, photo layer
   ========================================================================== */

/* Stat cells: display number (count-up), label, 2px accent rule on the left. */
.apm-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
}

@media (min-width: 768px) {
    .apm-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 24px;
    }
}

/* Glass strip variant (e.g. overlapping a hero bottom edge). */
.apm-stats--panel {
    padding: 22px 20px;
    border: 1px solid var(--apm-border-light);
    border-radius: var(--apm-radius-lg);
    background: rgba(11, 16, 28, .78);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .9);
}

@media (min-width: 768px) {
    .apm-stats--panel {
        padding: 28px 32px;
    }
}

.apm-stat {
    position: relative;
    padding: 2px 0 2px 16px;
    min-width: 0;
}

.apm-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, #FFC46B 0%, #FF7F00 100%);
}

.apm-stat--free::before {
    background: linear-gradient(180deg, #86EFAC 0%, #22C55E 100%);
}

.apm-stat__value {
    display: block;
    color: var(--apm-text);
    font-family: var(--apm-font-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.apm-stat__label {
    display: block;
    margin-top: 6px;
    color: var(--apm-text-muted);
    font-size: 13px;
    line-height: 1.4;
}

@media (min-width: 1200px) {
    .apm-stat__value { font-size: 42px; }
    .apm-stat__label { font-size: 14px; }
}

/* Frame / window: structured data panel with a mono title bar. */
.apm-frame {
    position: relative;
    border: 1px solid var(--apm-border-light);
    border-radius: var(--apm-radius);
    background: linear-gradient(180deg, rgba(21, 30, 51, .9) 0%, rgba(13, 19, 32, .95) 100%);
    box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .04);
    overflow: hidden;
}

.apm-frame__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 42px;
    padding: 0 14px;
    border-bottom: 1px solid var(--apm-border);
    background: rgba(4, 6, 12, .35);
}

.apm-frame__dots {
    display: inline-flex;
    gap: 6px;
    flex-shrink: 0;
}

.apm-frame__dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--apm-border-light);
}

.apm-frame__dots span:first-child {
    background: rgba(255, 127, 0, .7);
}

.apm-frame__title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--apm-text-muted);
    font-family: var(--apm-font-mono);
    font-size: 12px;
    font-weight: 500;
}

.apm-frame__tag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--apm-accent-border);
    background: var(--apm-accent-tint);
    color: var(--apm-accent-light);
    font-family: var(--apm-font-mono);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.apm-frame__body {
    padding: 20px;
}

@media (min-width: 768px) {
    .apm-frame__body { padding: 24px 28px; }
}

/* Spec list inside a frame: label / mono value rows. */
.apm-spec {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    margin: 0;
}

.apm-spec > dt,
.apm-spec > dd {
    margin: 0;
    padding: 11px 0;
    border-bottom: 1px dashed var(--apm-border);
    font-size: 13px;
    line-height: 1.45;
}

.apm-spec > dt {
    padding-right: 20px;
    color: var(--apm-text-muted);
    font-weight: 500;
}

.apm-spec > dd {
    color: var(--apm-text);
    font-family: var(--apm-font-mono);
    font-variant-numeric: tabular-nums;
    text-align: right;
    overflow-wrap: anywhere;
}

.apm-spec > dt:last-of-type,
.apm-spec > dd:last-of-type {
    border-bottom: 0;
}

/* Generic surface panel (bento tiles, feature cards, form cards). */
.apm-panel {
    position: relative;
    border: 1px solid var(--apm-border);
    border-radius: var(--apm-radius-lg);
    background: var(--apm-gradient-surface);
    box-shadow: var(--apm-shadow-card);
    padding: 24px;
    color: var(--apm-text-secondary);
}

@media (min-width: 768px) {
    .apm-panel { padding: 30px; }
}

.apm-panel--hover {
    transition: transform .3s var(--apm-ease), border-color .3s var(--apm-ease), box-shadow .3s var(--apm-ease);
}

a.apm-panel {
    display: block;
    text-decoration: none !important;
}

.apm-panel--hover:hover {
    transform: translateY(-3px);
    border-color: var(--apm-accent-border);
    box-shadow: var(--apm-shadow-card-hover);
    color: var(--apm-text-secondary);
}

.apm-panel--glass {
    background: rgba(11, 16, 28, .72);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border-color: var(--apm-border-light);
}

/* Author card shell (community leaders). Whole card is a link. */
.apm-author-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 26px 20px 22px;
    border: 1px solid var(--apm-border);
    border-radius: var(--apm-radius);
    background: var(--apm-gradient-surface);
    box-shadow: var(--apm-shadow-card);
    text-align: center;
    color: var(--apm-text-secondary);
    text-decoration: none !important;
    transition: transform .3s var(--apm-ease), border-color .3s var(--apm-ease), box-shadow .3s var(--apm-ease);
}

a.apm-author-card:hover {
    transform: translateY(-3px);
    border-color: var(--apm-accent-border);
    box-shadow: var(--apm-shadow-card-hover);
    color: var(--apm-text-secondary);
}

.apm-author-card__name {
    margin: 0;
    color: var(--apm-text);
    font-family: var(--apm-font-display);
    font-size: 17px;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

.apm-author-card__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.apm-author-card__foot {
    margin-top: auto;
    color: var(--apm-accent-light);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.apm-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFC46B 0%, #FF7F00 50%, rgba(64, 110, 255, .7) 100%);
}

.apm-avatar img,
.apm-avatar__initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--apm-surface);
    object-fit: cover;
    background: var(--apm-surface-elevated);
}

.apm-avatar__initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--apm-text);
    font-family: var(--apm-font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.apm-avatar--sm {
    width: 40px;
    height: 40px;
}

.apm-avatar--sm .apm-avatar__initials {
    font-size: 14px;
    border-width: 2px;
}

/* Photo credit chip ("IC 1396 Elephant's Trunk Nebula - data by Chris Gaudy"). */
.apm-credit {
    /* inline-block (not flex) so "<strong>name</strong> - data by X" wraps as one sentence */
    display: inline-block;
    max-width: 100%;
    padding: 6px 12px 6px 10px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(4, 6, 12, .62);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--apm-text-secondary);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none !important;
}

.apm-credit .apm-icon {
    margin: -2px 6px 0 0;
    color: var(--apm-accent-light);
}

.apm-credit strong {
    color: var(--apm-text);
    font-weight: 600;
}

a.apm-credit:hover {
    border-color: var(--apm-accent-border);
    color: var(--apm-text);
}

/* Visible error box for a failed block (rule 0.9: failures must be visible). */
.apm-error-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(248, 113, 113, .4);
    border-radius: var(--apm-radius);
    background: rgba(248, 113, 113, .08);
    color: #FECACA;
    font-size: 14px;
    line-height: 1.5;
}

.apm-error-box .apm-icon {
    color: var(--apm-danger);
    margin-top: 1px;
}

.apm-error-box code {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .3);
    color: #FECACA;
    font-family: var(--apm-font-mono);
    font-size: 12px;
    word-break: break-word;
}

/* Full-bleed photo layer for heroes and CTA bands:
   <div class="apm-photo"><picture>...<img class="apm-photo__img"></picture><div class="apm-photo__shade"></div></div> */
.apm-photo {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: var(--apm-bg-deep);
}

.apm-photo__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apm-photo__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 10, 18, .94) 0%, rgba(7, 10, 18, .8) 38%, rgba(7, 10, 18, .35) 70%, rgba(7, 10, 18, .2) 100%),
        linear-gradient(180deg, rgba(7, 10, 18, .35) 0%, rgba(7, 10, 18, 0) 30%, rgba(7, 10, 18, 0) 65%, var(--apm-bg) 100%);
}

.apm-photo__shade--center {
    background:
        radial-gradient(ellipse 80% 70% at 50% 50%, rgba(7, 10, 18, .55) 0%, rgba(7, 10, 18, .85) 100%),
        linear-gradient(180deg, rgba(7, 10, 18, .2) 0%, var(--apm-bg) 100%);
}

@media (max-width: 767.98px) {
    /* On phones the text sits on top of the photo, so shade it evenly. */
    .apm-photo__shade {
        background: linear-gradient(180deg, rgba(7, 10, 18, .7) 0%, rgba(7, 10, 18, .78) 50%, var(--apm-bg) 100%);
    }
}


/* ==========================================================================
   9. Motion
   ========================================================================== */

/* Hidden only when JS runs (html.apm-js is set inline at the top of <body>). */
.apm-js .apm-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s var(--apm-ease) var(--apm-delay, 0ms), transform .7s var(--apm-ease) var(--apm-delay, 0ms);
    will-change: opacity, transform;
}

.apm-js .apm-reveal.is-visible,
.apm-reveal-all .apm-reveal {
    opacity: 1;
    transform: none;
}

.apm-reveal-all .apm-reveal {
    transition: none;
}

/* Live dot (e.g. "N new datasets this week") */
.apm-live-dot {
    position: relative;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--apm-free);
    flex-shrink: 0;
}

.apm-live-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--apm-free);
    opacity: 0;
    animation: apm-pulse 2.2s var(--apm-ease) infinite;
}

.apm-live-dot--accent {
    background: var(--apm-accent);
}

.apm-live-dot--accent::after {
    border-color: var(--apm-accent);
}

@keyframes apm-pulse {
    0% { transform: scale(.6); opacity: .8; }
    80%, 100% { transform: scale(1.6); opacity: 0; }
}


/* ==========================================================================
   10. Header + mobile drawer (templates/pages/front/partials/_topHeader.html.twig)
   ========================================================================== */

/* In-flow slot keeps the page offset; the bar itself is fixed, so it stays visible on scroll
   whatever wrapper the include sits in. */
.apm-header-slot {
    position: relative;
    flex-shrink: 0;
    height: var(--apm-header-h);
    z-index: 1030;
}

.apm-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: var(--apm-header-h);
    background: rgba(7, 10, 18, .72);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    font-family: var(--apm-font-sans);
    transition: background-color .3s var(--apm-ease), box-shadow .3s var(--apm-ease), border-color .3s var(--apm-ease);
}

.apm-header.is-scrolled {
    background: rgba(7, 10, 18, .9);
    border-bottom-color: rgba(255, 255, 255, .08);
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .9);
}

/* Faint accent hairline under the bar once scrolled. */
.apm-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--apm-hairline);
    opacity: 0;
    transition: opacity .3s var(--apm-ease);
    pointer-events: none;
}

.apm-header.is-scrolled::after {
    opacity: .7;
}

.apm-header__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    width: 100%;
    max-width: calc(var(--apm-container) + 2 * var(--apm-gutter));
    margin: 0 auto;
    padding: 0 var(--apm-gutter);
}

.apm-header__brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    height: 100%;
    padding: 4px 0;
    border-radius: 8px;
}

.apm-header__brand img {
    display: block;
    width: auto;
    height: 44px;
}

@media (min-width: 992px) {
    .apm-header__brand img { height: 60px; }
}

/* Desktop nav */
.apm-nav {
    display: none;
}

@media (min-width: 992px) {
    .apm-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        flex: 1 1 auto;
        min-width: 0;
    }
}

.apm-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 9px;
    border-radius: 10px;
    color: var(--apm-text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none !important;
    transition: color .2s var(--apm-ease), background-color .2s var(--apm-ease);
}

@media (min-width: 992px) and (max-width: 1099.98px) {
    .apm-nav__link { padding: 0 7px; font-size: 13px; }
    .apm-nav__link--pill { margin: 0 2px; }
}

@media (min-width: 1360px) {
    .apm-nav { gap: 4px; }
    .apm-nav__link { padding: 0 12px; font-size: 14px; }
}

.apm-nav__link:hover {
    color: var(--apm-text);
    background: rgba(255, 255, 255, .045);
}

.apm-nav__link.is-active {
    color: var(--apm-text);
}

.apm-nav__link.is-active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    transform: translateX(-50%);
    background: var(--apm-gradient-accent);
    box-shadow: 0 0 10px rgba(255, 127, 0, .6);
}

/* Subscription keeps its highlighted pill. */
.apm-nav__link--pill {
    height: 34px;
    margin: 0 4px;
    padding: 0 12px 0 10px;
    border-radius: 999px;
    border: 1px solid var(--apm-accent-border);
    background: linear-gradient(135deg, rgba(255, 154, 31, .2) 0%, rgba(255, 127, 0, .07) 100%);
    color: #FFC46B;
    font-weight: 600;
}

.apm-nav__link--pill .apm-icon {
    color: var(--apm-gold);
}

.apm-nav__link--pill:hover,
.apm-nav__link--pill.is-active {
    color: #FFE2B8;
    border-color: rgba(255, 166, 64, .6);
    background: linear-gradient(135deg, rgba(255, 154, 31, .3) 0%, rgba(255, 127, 0, .12) 100%);
    box-shadow: 0 6px 20px -8px rgba(255, 127, 0, .6);
}

.apm-nav__link--pill.is-active::after {
    display: none;
}

/* Right-hand actions */
.apm-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .apm-header__actions { margin-left: 0; }
}

.apm-header__account {
    position: relative;
    display: inline-flex;
}

.apm-header__cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--apm-gradient-accent);
    color: var(--apm-accent-ink);
    font-family: var(--apm-font-mono);
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--apm-bg);
}

.apm-header__cart-count.has-items {
    display: inline-flex;
}

.apm-header__signup {
    margin-left: 4px;
}

@media (max-width: 479.98px) {
    .apm-header__signup { display: none; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    /* The nav needs the room between 992 and 1200px; the drawer and account menu offer sign up. */
    .apm-header__signup { display: none; }
}

.apm-header__burger {
    display: inline-flex;
}

@media (min-width: 992px) {
    .apm-header__burger { display: none; }
}

/* Account dropdown (Metronic KTMenu markup from partials/menus/_user-account-menu.html.twig),
   restyled only inside the public header. */
.apm-header .menu-sub-dropdown {
    background: var(--apm-surface);
    border: 1px solid var(--apm-border-light);
    border-radius: 14px;
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .85);
    color: var(--apm-text-secondary);
    font-family: var(--apm-font-sans);
}

.apm-header .menu-sub-dropdown .menu-link {
    border-radius: 10px;
    color: var(--apm-text-secondary);
    font-size: 14px;
}

.apm-header .menu-sub-dropdown .menu-link:hover,
.apm-header .menu-sub-dropdown .menu-item.hover > .menu-link,
.apm-header .menu-sub-dropdown .menu-item.show > .menu-link {
    background: rgba(255, 255, 255, .05) !important;
    color: var(--apm-text) !important;
}

.apm-header .menu-sub-dropdown .separator {
    border-bottom-color: var(--apm-border) !important;
}

.apm-header .menu-sub-dropdown .menu-content a {
    color: var(--apm-accent-light);
}

.apm-header .menu-sub-dropdown .menu-content .fa-user {
    color: var(--apm-text-muted);
}

.apm-header .menu-sub-dropdown .bg-light {
    background: var(--apm-surface-elevated) !important;
    color: var(--apm-text-secondary);
}

/* Mobile drawer */
.apm-drawer {
    position: fixed;
    inset: 0;
    z-index: 1060;
    visibility: hidden;
    pointer-events: none;
}

.apm-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
}

.apm-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 9, .62);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .3s var(--apm-ease);
}

.apm-drawer.is-open .apm-drawer__backdrop {
    opacity: 1;
}

.apm-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(380px, 88vw);
    height: 100%;
    height: 100dvh;
    padding: 0 16px calc(20px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid var(--apm-border-light);
    background:
        radial-gradient(ellipse 120% 40% at 100% 0%, rgba(255, 127, 0, .1) 0%, rgba(255, 127, 0, 0) 60%),
        var(--apm-bg);
    box-shadow: -30px 0 60px -20px rgba(0, 0, 0, .8);
    transform: translateX(100%);
    transition: transform .34s var(--apm-ease);
    font-family: var(--apm-font-sans);
}

.apm-drawer.is-open .apm-drawer__panel {
    transform: none;
}

.apm-drawer__panel:focus {
    outline: none;
}

.apm-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--apm-header-h);
    flex-shrink: 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--apm-border);
}

.apm-drawer__head img {
    height: 38px;
    width: auto;
}

.apm-drawer__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
}

.apm-drawer__link {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--apm-text);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none !important;
    transition: background-color .2s var(--apm-ease), border-color .2s var(--apm-ease);
}

.apm-drawer__link:hover,
.apm-drawer__link:active {
    background: rgba(255, 255, 255, .04);
    color: var(--apm-text);
}

.apm-drawer__link.is-active {
    border-color: var(--apm-accent-border);
    background: var(--apm-accent-tint);
}

.apm-drawer__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--apm-border);
    color: var(--apm-text-secondary);
    flex-shrink: 0;
}

.apm-drawer__link.is-active .apm-drawer__icon,
.apm-drawer__link--pill .apm-drawer__icon {
    background: var(--apm-accent-tint);
    border-color: rgba(255, 127, 0, .2);
    color: var(--apm-accent-light);
}

.apm-drawer__link--pill .apm-drawer__label {
    color: #FFC46B;
    font-weight: 600;
}

.apm-drawer__label {
    flex: 1 1 auto;
    min-width: 0;
}

.apm-drawer__chevron {
    color: var(--apm-text-muted);
}

.apm-drawer__foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--apm-border);
}

html.apm-nav-open,
html.apm-nav-open body {
    overflow: hidden;
}

@media (min-width: 992px) {
    .apm-drawer { display: none; }
}


/* ==========================================================================
   11. Footer (templates/pages/front/partials/_footer.html.twig)
   ========================================================================== */

.apm-footer {
    position: relative;
    flex-shrink: 0;
    overflow: clip;
    isolation: isolate;
    padding: 64px 0 0;
    background: var(--apm-bg-deep);
    color: var(--apm-text-secondary);
    font-family: var(--apm-font-sans);
}

.apm-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--apm-hairline);
}

.apm-footer__glow {
    position: absolute;
    left: -180px;
    bottom: -260px;
    width: 620px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(64, 110, 255, .12) 0%, rgba(64, 110, 255, 0) 68%);
    filter: blur(20px);
    pointer-events: none;
    z-index: -1;
}

.apm-footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--apm-dots);
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9) 0%, transparent 70%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

@media (min-width: 1024px) {
    .apm-footer { padding-top: 88px; }
}

.apm-footer__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
    padding-bottom: 48px;
}

.apm-footer__brand {
    grid-column: 1 / -1;
    max-width: 380px;
}

@media (min-width: 768px) {
    .apm-footer__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .apm-footer__grid {
        grid-template-columns: minmax(280px, 1.5fr) repeat(4, minmax(0, 1fr));
        gap: 40px;
        padding-bottom: 64px;
    }

    .apm-footer__brand {
        grid-column: auto;
        padding-right: 24px;
    }
}

.apm-footer__logo {
    display: inline-flex;
    border-radius: 8px;
}

.apm-footer__logo img {
    display: block;
    height: 60px;
    width: auto;
}

.apm-footer__tagline {
    margin: 18px 0 22px;
    color: var(--apm-text-muted);
    font-size: 14px;
    line-height: 1.65;
}

.apm-footer__title {
    margin: 0 0 16px;
    color: var(--apm-text);
    font-family: var(--apm-font-display);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.005em;
}

.apm-footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.apm-footer__col a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 0;
    color: var(--apm-text-muted);
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none !important;
    transition: color .2s var(--apm-ease);
}

.apm-footer__col a:hover {
    color: var(--apm-text);
}

/* Social icons come from partials/_social_media.html.twig; quieter tiles here, brand colour on hover. */
.apm-footer .social-media-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.apm-footer .social-media-label {
    color: var(--apm-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.apm-footer .social-media-icons {
    gap: 8px;
}

.apm-footer .social-icon,
.apm-footer .social-icon.instagram,
.apm-footer .social-icon.facebook,
.apm-footer .social-icon.tiktok {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: 1px solid var(--apm-border-light);
    background: rgba(255, 255, 255, .03);
    transition: background .2s var(--apm-ease), border-color .2s var(--apm-ease), transform .2s var(--apm-ease);
}

.apm-footer .social-icon i {
    font-size: 16px;
    color: var(--apm-text-secondary);
}

.apm-footer .social-icon:hover {
    transform: translateY(-2px);
    border-color: transparent;
}

.apm-footer .social-icon:hover i {
    color: #FFFFFF;
    transform: none;
}

.apm-footer .social-icon.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #dc2743 50%, #bc1888 100%);
}

.apm-footer .social-icon.facebook:hover {
    background: #1877F2;
}

.apm-footer .social-icon.tiktok:hover {
    background: #000000;
}

.apm-footer__bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 0 28px;
    border-top: 1px solid var(--apm-border);
}

@media (min-width: 768px) {
    .apm-footer__bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.apm-footer__copy {
    margin: 0;
    color: var(--apm-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* Language switcher: markup from layout/partials/_changeFlag.html.twig (Metronic menu items). */
.apm-footer__lang {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    color: var(--apm-text-muted);
}

.apm-footer__lang > .apm-icon {
    margin-right: 4px;
}

.apm-footer__lang .menu-item {
    padding: 0 !important;
    display: inline-flex;
}

.apm-footer__lang .menu-link {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 4px 10px !important;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--apm-text-muted) !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    background: none !important;
    transition: color .2s var(--apm-ease), border-color .2s var(--apm-ease);
}

.apm-footer__lang .menu-link:hover {
    color: var(--apm-text) !important;
    border-color: var(--apm-border-light);
}

.apm-footer__lang .symbol {
    margin: 0 !important;
    display: inline-flex;
}

.apm-footer__lang .symbol img {
    width: 16px !important;
    height: 16px !important;
    border-radius: 50%;
    object-fit: cover;
}

/* Metronic scroll-to-top button, quiet version on public pages. */
body.apm-public .scrolltop {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--apm-border-light);
    background: rgba(16, 23, 38, .9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .8);
}

body.apm-public .scrolltop i {
    color: var(--apm-text-secondary);
}

body.apm-public .scrolltop:hover {
    border-color: var(--apm-accent-border);
    background: var(--apm-surface-hover);
}

body.apm-public .scrolltop:hover i {
    color: var(--apm-accent-light);
}


/* ==========================================================================
   12. Shell refresh (public pages only)
   Light, safe changes that make the existing public templates look fresher.
   ========================================================================== */

body.apm-public .landing-dark-bg {
    background-color: var(--apm-bg);
}

body.apm-public .landing-dark-color {
    color: var(--apm-bg);
}

body.apm-public .landing-dark-separator {
    border-top-color: var(--apm-border);
}

body.apm-public .section-dark {
    background: var(--apm-bg-subtle);
}

body.apm-public .section-darker {
    background: var(--apm-bg-deep);
}

body.apm-public h1,
body.apm-public h2,
body.apm-public .h1,
body.apm-public .h2 {
    font-family: var(--apm-font-display);
    font-optical-sizing: auto;
    letter-spacing: -0.015em;
}

/* Section eyebrow + title (older .am-* design system) */
body.apm-public .am-section-eyebrow,
body.apm-public .am-page-header-eyebrow {
    gap: 8px;
    padding: 6px 13px 6px 11px;
    border: 1px solid var(--apm-border-light);
    border-radius: 999px;
    background: rgba(16, 23, 38, .7);
    color: var(--apm-text-secondary);
    font-family: var(--apm-font-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: none;
}

body.apm-public .am-section-eyebrow::before,
body.apm-public .am-page-header-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--apm-accent);
    box-shadow: 0 0 0 3px rgba(255, 127, 0, .16), 0 0 10px rgba(255, 127, 0, .7);
    flex-shrink: 0;
}

body.apm-public .am-section-title {
    font-family: var(--apm-font-display);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--apm-text);
    text-wrap: balance;
}

body.apm-public .am-section-subtitle {
    color: var(--apm-text-secondary);
    font-size: 16px;
    line-height: 1.65;
}

@media (min-width: 768px) {
    body.apm-public .am-section-title { font-size: 34px; }
    body.apm-public .am-section-subtitle { font-size: 17px; }
}

@media (min-width: 1200px) {
    body.apm-public .am-section-title { font-size: 40px; }
}

/* Compact page header: LDN 673 photo at low opacity + gradient + dot grid. */
body.apm-public .am-page-header {
    position: relative;
    flex-shrink: 0; /* body is a flex column; with overflow other than visible it would shrink */
    isolation: isolate;
    overflow: clip;
    padding: 40px 0 34px !important;
    background-color: var(--apm-bg-deep);
    background-image:
        linear-gradient(180deg, rgba(4, 6, 12, 0) 50%, var(--apm-bg-deep) 100%),
        linear-gradient(90deg, rgba(7, 10, 18, .97) 0%, rgba(7, 10, 18, .9) 40%, rgba(7, 10, 18, .62) 100%),
        url('../img/bg/ldn-673-1100.webp');
    background-size: auto, auto, cover;
    background-position: center, center, 70% 35%;
    background-repeat: no-repeat;
    border-bottom: 0;
}

@media (min-width: 1100px) {
    body.apm-public .am-page-header {
        padding: 52px 0 40px !important;
        background-image:
            linear-gradient(180deg, rgba(4, 6, 12, 0) 50%, var(--apm-bg-deep) 100%),
            linear-gradient(90deg, rgba(7, 10, 18, .97) 0%, rgba(7, 10, 18, .88) 40%, rgba(7, 10, 18, .5) 100%),
            url('../img/bg/ldn-673-2400.webp');
    }
}

body.apm-public .am-page-header::before {
    top: -120px;
    right: -80px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(255, 127, 0, .12) 0%, rgba(255, 127, 0, 0) 65%);
}

body.apm-public .am-page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--apm-dots);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .4) 60%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .4) 60%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

body.apm-public .am-page-header-eyebrow {
    margin-bottom: 14px;
}

body.apm-public .am-page-header-title {
    font-family: var(--apm-font-display);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--apm-text);
    margin-bottom: 10px;
    text-wrap: balance;
}

@media (min-width: 992px) {
    body.apm-public .am-page-header-title { font-size: 40px; }
}

body.apm-public .am-page-header-subtitle {
    color: var(--apm-text-secondary);
    font-size: 15px;
    line-height: 1.65;
}

@media (min-width: 992px) {
    body.apm-public .am-page-header-subtitle { font-size: 16px; }
}

/* Older product cards (catalog, detail "similar" rows) */
body.apm-public .am-product-card {
    border-radius: var(--apm-radius);
    border: 1px solid var(--apm-border);
    background: var(--apm-gradient-surface);
    box-shadow: var(--apm-shadow-card);
    transition: transform .3s var(--apm-ease), border-color .3s var(--apm-ease), box-shadow .3s var(--apm-ease);
}

body.apm-public .am-product-card:hover {
    transform: translateY(-3px);
    border-color: var(--apm-accent-border);
    box-shadow: var(--apm-shadow-card-hover);
}

body.apm-public .am-product-card-title {
    font-size: 15px;
    color: var(--apm-text);
}

body.apm-public .am-price-overlay {
    border-radius: 9px;
    background: var(--apm-gradient-accent);
    color: var(--apm-accent-ink);
    font-family: var(--apm-font-display);
    font-size: 15px;
    letter-spacing: -0.01em;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}

/* Feature cards */
body.apm-public .feature-card {
    border-radius: var(--apm-radius);
    border: 1px solid var(--apm-border);
    background: var(--apm-gradient-surface);
    box-shadow: var(--apm-shadow-card);
    transition: transform .3s var(--apm-ease), border-color .3s var(--apm-ease), box-shadow .3s var(--apm-ease);
}

body.apm-public .feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--apm-accent-border);
    background: linear-gradient(180deg, #141E33 0%, #0F1626 100%);
    box-shadow: var(--apm-shadow-card-hover);
}

body.apm-public .feature-card p {
    color: var(--apm-text-secondary) !important;
}

/* Buttons */
body.apm-public .btn-brand-gradient {
    border-radius: 12px;
    background: var(--apm-gradient-accent);
    color: var(--apm-accent-ink) !important;
    box-shadow: 0 8px 24px rgba(255, 127, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .28);
}

body.apm-public .btn-brand-gradient i,
body.apm-public .btn-brand-gradient .apm-icon {
    color: var(--apm-accent-ink) !important;
}

body.apm-public .btn-brand-gradient:hover {
    background: linear-gradient(135deg, #FFA93D 0%, #FF8710 100%);
    color: var(--apm-accent-ink) !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(255, 127, 0, .42);
}

body.apm-public .btn.btn-primary {
    --bs-primary-inverse: var(--apm-accent-ink);
    border-color: transparent;
    border-radius: 12px;
    background-image: var(--apm-gradient-accent);
    color: var(--apm-accent-ink);
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(255, 127, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .2s var(--apm-ease), box-shadow .2s var(--apm-ease);
}

body.apm-public .btn.btn-primary:hover:not(.btn-active),
body.apm-public .btn.btn-primary:focus:not(.btn-active),
body.apm-public .btn.btn-primary:active:not(.btn-active) {
    border-color: transparent;
    background-image: linear-gradient(135deg, #FFA93D 0%, #FF8710 100%);
    color: var(--apm-accent-ink);
    box-shadow: 0 12px 30px rgba(255, 127, 0, .38);
}

body.apm-public .btn.btn-primary:hover:not(.btn-active):not(:disabled) {
    transform: translateY(-1px);
}

body.apm-public .btn.btn-primary i,
body.apm-public .btn.btn-primary .svg-icon {
    color: var(--apm-accent-ink);
}


/* Metronic button variants that became unreadable on the new neutrals (measured contrast <4.5:1).
   In this theme --bs-success is orange, so btn-success follows btn-primary. */
body.apm-public .btn.btn-danger {
    --bs-danger-inverse: #FFFFFF;
    background-color: #E60000;
    border-color: #E60000;
    color: #FFFFFF;
}

body.apm-public .btn.btn-danger:hover:not(.btn-active),
body.apm-public .btn.btn-danger:focus:not(.btn-active),
body.apm-public .btn.btn-danger:active:not(.btn-active) {
    background-color: #C40000 !important;
    border-color: #C40000;
    color: #FFFFFF;
}

body.apm-public .btn.btn-danger i,
body.apm-public .btn.btn-danger .svg-icon {
    color: #FFFFFF;
}

body.apm-public .btn.btn-success {
    --bs-success-inverse: var(--apm-accent-ink);
    border-color: transparent;
    background-image: var(--apm-gradient-accent);
    color: var(--apm-accent-ink);
    font-weight: 600;
}

body.apm-public .btn.btn-success:hover:not(.btn-active),
body.apm-public .btn.btn-success:focus:not(.btn-active),
body.apm-public .btn.btn-success:active:not(.btn-active) {
    border-color: transparent;
    background-image: linear-gradient(135deg, #FFA93D 0%, #FF8710 100%);
    color: var(--apm-accent-ink);
}

body.apm-public .btn.btn-success i,
body.apm-public .btn.btn-success .svg-icon {
    color: var(--apm-accent-ink);
}

body.apm-public .btn.btn-warning {
    --bs-warning-inverse: #1A1300;
    color: #1A1300;
}

body.apm-public .btn.btn-warning i,
body.apm-public .btn.btn-warning .svg-icon {
    color: #1A1300;
}

body.apm-public .btn.btn-light {
    --bs-light-inverse: var(--apm-text-secondary);
    background-color: var(--apm-surface-elevated);
    border: 1px solid var(--apm-border-light);
    color: var(--apm-text-secondary);
}

body.apm-public .btn.btn-light:hover:not(.btn-active),
body.apm-public .btn.btn-light:focus:not(.btn-active) {
    background-color: var(--apm-surface-hover) !important;
    border-color: var(--apm-accent-border);
    color: var(--apm-text);
}

body.apm-public .btn.btn-light i,
body.apm-public .btn.btn-light .svg-icon {
    color: inherit;
}

body.apm-public .btn.btn-light-info {
    color: #B79BFF;
}

/* Hover/active fills of the light variants switch to the solid colour with "inverse" text
   (Metronic custom properties); point those at readable pairs. */
body.apm-public .btn.btn-light-primary,
body.apm-public .btn.btn-light-success,
body.apm-public .btn.btn-active-light-primary {
    --bs-primary-inverse: var(--apm-accent-ink);
    --bs-success-inverse: var(--apm-accent-ink);
}

body.apm-public .btn.btn-light-danger {
    --bs-danger: #E60000;
    --bs-danger-inverse: #FFFFFF;
    color: #FF9A9A;
}

body.apm-public .btn.btn-light-danger i,
body.apm-public .btn.btn-light-danger .svg-icon {
    color: inherit;
}

body.apm-public .btn.btn-light-warning {
    --bs-warning-inverse: #1A1300;
}

body.apm-public .btn.btn-info {
    --bs-info-active: #6E2BD9;
}


/* --------------------------------------------------------------------------
   12b. Public typography scale (guest pages only, owner request 2026-10-02)
   Single typeface (Bricolage Grotesque, see section 2); this section sets the
   reading sizes, weights and heading treatment. Logged-in pages (masterAdmin,
   no body.apm-public) are untouched.
   -------------------------------------------------------------------------- */

/* All heading levels in the display font (h1/h2 already set above). */
body.apm-public h3,
body.apm-public h4,
body.apm-public h5,
body.apm-public h6,
body.apm-public .h3,
body.apm-public .h4,
body.apm-public .h5,
body.apm-public .h6 {
    font-family: var(--apm-font-display);
    font-optical-sizing: auto;
    letter-spacing: -0.01em;
}

body.apm-public h1,
body.apm-public h2,
body.apm-public h3 {
    text-wrap: balance;
}

/* Heading-like elements that are not heading tags: card titles, plan names,
   prices, stat numbers, FAQ questions, step titles on the older landings. */
body.apm-public :is(
    .am-product-card-title,
    .price-display, .price-highlight, .price-pill, .stats-number,
    .telescope-stat-value, .telescope-stat-num,
    .fits-plan-name, .fits-plan-price,
    .si-fact-kicker, .si-amount, .stepper-title,
    .faq-question, .stat-badge .stat-number
) {
    font-family: var(--apm-font-display);
    font-optical-sizing: auto;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

/* Running text: one readable default for paragraphs and list items in page content.
   Zero specificity on purpose: any component or utility class that sets a size wins
   (Metronic .fs-* are !important anyway). Chrome, menus, tables and forms are excluded. */
:where(body.apm-public) :where(p, li, dd):not(:where(
    .apm-header *, .apm-header-slot *, .apm-drawer *, .apm-footer *,
    .menu *, .dropdown-menu *, .pagination *, table *, form *
)) {
    font-size: 15px;
    line-height: 1.65;
}

@media (min-width: 992px) {
    /* paragraphs step up to 16px on desktop; list items stay at 15px (sidebars, plan lists) */
    :where(body.apm-public) :where(p):not(:where(
        .apm-header *, .apm-header-slot *, .apm-drawer *, .apm-footer *,
        .menu *, .dropdown-menu *, .pagination *, table *, form *
    )) {
        font-size: 16px;
    }
}

/* Feature cards (subscription, FITS, upload, equipment, contact landings). */
body.apm-public .feature-card h4,
body.apm-public .feature-card h3 {
    font-size: 19px;
    font-weight: 650;
    line-height: 1.25;
    color: var(--apm-text);
}

body.apm-public .feature-card p {
    font-size: 15px;
    line-height: 1.65;
}

/* FAQ blocks on the older landings (subscription, FITS). */
body.apm-public .faq-question,
body.apm-public .faq-question span {
    font-size: 17px;
    font-weight: 600;
    color: var(--apm-text);
}

body.apm-public .faq-answer,
body.apm-public .faq-answer p {
    color: var(--apm-text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

/* Dataset card titles: same display treatment as the foundation card. */
body.apm-public .apm-card__title {
    font-family: var(--apm-font-display);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* Older catalog / "other images" cards (pages/imageset/_data-set-container,
   front/partials/_smallProduct): same scale and chip style as .apm-card. */
body.apm-public .am-product-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--apm-text);
}

body.apm-public .am-product-card-info .dataset-card-subtitle {
    color: var(--apm-text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

body.apm-public .am-product-card-info .dataset-card-subtitle strong {
    color: var(--apm-text-secondary);
    font-weight: 600;
}

body.apm-public .am-product-card-info .dataset-card-author {
    color: var(--apm-text-muted);
    font-size: 13px;
}

/* .ds-chip* classes sit on elements that also carry inline styles (kept for the
   logged-in app), hence !important here. */
body.apm-public .ds-chip {
    height: 24px;
    gap: 5px;
    padding: 0 8px !important;
    border: 1px solid var(--apm-border) !important;
    border-radius: 7px !important;
    background: rgba(255, 255, 255, .025) !important;
}

body.apm-public .ds-chip i,
body.apm-public .ds-chip .svg-icon {
    font-size: 12px !important;
    color: var(--apm-text-muted) !important;
}

body.apm-public .ds-chip .ds-chip__text {
    margin-left: 0 !important;
    color: var(--apm-text-secondary) !important;
    font-family: var(--apm-font-mono);
    font-size: 12px !important;
    font-weight: 500 !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.apm-public .ds-chip--price {
    height: 26px;
    border-color: transparent !important;
    border-radius: 9px !important;
    background: var(--apm-gradient-accent) !important;
}

body.apm-public .ds-chip--price .ds-chip__text {
    color: var(--apm-accent-ink) !important;
    font-family: var(--apm-font-display);
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
}

body.apm-public .ds-chip--free {
    height: 26px;
    border-color: var(--apm-free-border) !important;
    border-radius: 9px !important;
    background: var(--apm-free-tint) !important;
}

/* A free dataset shows only the green "free" pill (the $0.00 price chip is redundant), like .apm-card. */
body.apm-public .ds-chip--price:has(+ .ds-chip--free) {
    display: none !important;
}

body.apm-public .ds-chip--free .ds-chip__text {
    color: var(--apm-free-light) !important;
    font-family: var(--apm-font-sans);
    font-size: 12px !important;
    font-weight: 600 !important;
}

/* Metronic "light" and dashed button variants -> foundation outline button
   (.apm-btn--outline look). Page CSS with more specific selectors (FITS plans,
   detail page) still wins. */
body.apm-public .btn.btn-light-primary,
body.apm-public .btn.btn-light-secondary,
body.apm-public .btn.btn-light-success,
body.apm-public .btn.btn-outline-dashed,
body.apm-public .btn.btn-outline.btn-outline-primary {
    border: 1px solid var(--apm-border-light) !important;
    border-radius: 12px;
    background: transparent !important;
    color: var(--apm-text-secondary) !important;
    font-weight: 600;
}

body.apm-public .btn.btn-light-primary:hover,
body.apm-public .btn.btn-light-secondary:hover,
body.apm-public .btn.btn-light-success:hover,
body.apm-public .btn.btn-outline-dashed:hover,
body.apm-public .btn.btn-outline.btn-outline-primary:hover {
    border-color: var(--apm-accent-border) !important;
    background: rgba(255, 127, 0, .06) !important;
    color: var(--apm-text) !important;
}

body.apm-public .btn.btn-light-primary i,
body.apm-public .btn.btn-light-secondary i,
body.apm-public .btn.btn-light-success i,
body.apm-public .btn.btn-outline-dashed i {
    color: var(--apm-accent-light) !important;
}

/* Catalog search / filter panel. */
body.apm-public #imageSearchForm .form-label {
    color: var(--apm-text-secondary);
    font-size: 14px;
    font-weight: 600;
}

body.apm-public #imageSearchForm .form-check-label {
    color: var(--apm-text-secondary);
    font-size: 14px;
}

body.apm-public #imageSearchForm .form-control,
body.apm-public #imageSearchForm .form-select,
body.apm-public #imageSearchForm .input-group-text {
    font-size: 14px;
    color: var(--apm-text);
}

body.apm-public .thumbnails-info {
    color: var(--apm-text-secondary);
    font-size: 15px !important; /* overrides the inline 14px in _data-set-container */
    line-height: 1.6;
}

/* Legal pages (terms, privacy policy, data deletion): the legal text is pasted Word
   markup with inline Calibri sizes, so the reading scale is enforced on the wrapper
   (.apm-legal) with !important. Text, numbering and clause order are untouched. */
body.apm-public .apm-legal {
    max-width: 880px;
    margin: 28px 0 72px;
    border: 1px solid var(--apm-border) !important;
    border-radius: var(--apm-radius-lg);
    background: var(--apm-gradient-surface) !important;
    box-shadow: var(--apm-shadow-card);
}

/* The title moved to the compact page header above the card. */
body.apm-public .apm-legal > .card-header {
    display: none;
}

body.apm-public .apm-legal > .card-body {
    padding: 28px 20px 32px !important;
}

@media (min-width: 768px) {
    body.apm-public .apm-legal > .card-body {
        padding: 44px 48px 48px !important;
    }
}

/* termsPL's pasted markup closes .card-body early, so later clauses are direct card children. */
body.apm-public .apm-legal > :not(.card-header):not(.card-body) {
    padding-left: 20px;
    padding-right: 20px;
}

body.apm-public .apm-legal > ol,
body.apm-public .apm-legal > ul {
    padding-left: 44px;
}

@media (min-width: 768px) {
    body.apm-public .apm-legal > :not(.card-header):not(.card-body) {
        padding-left: 48px;
        padding-right: 48px;
    }

    body.apm-public .apm-legal > ol,
    body.apm-public .apm-legal > ul {
        padding-left: 72px;
    }
}

body.apm-public .apm-legal :is(p, li, div, span, dd, dt) {
    font-family: var(--apm-font-sans) !important;
    font-size: 15px !important;
    line-height: 1.75 !important;
    color: var(--apm-text-secondary);
}

@media (min-width: 992px) {
    body.apm-public .apm-legal :is(p, li, div, span, dd, dt) {
        font-size: 16px !important;
    }
}

body.apm-public .apm-legal :is(strong, b) {
    color: var(--apm-text);
    font-weight: 600;
}

body.apm-public .apm-legal li {
    margin-bottom: 6px !important;
}

body.apm-public .apm-legal :is(ol, ul) {
    padding-left: 24px;
}

/* Centred paragraphs are the section titles of the pasted terms ("§ 1", "GENERAL PROVISIONS"). */
body.apm-public .apm-legal p[style*="text-align:center"],
body.apm-public .apm-legal p[style*="text-align: center"] {
    color: var(--apm-text) !important;
    font-family: var(--apm-font-display) !important;
    font-size: 18px !important;
    font-weight: 650;
    letter-spacing: -0.01em;
}

body.apm-public .apm-legal :is(h2, h3, h4, h5) {
    margin: 32px 0 10px !important;
    color: var(--apm-text);
    font-size: 20px;
    font-weight: 650;
    line-height: 1.3;
}

body.apm-public .apm-legal a {
    color: var(--apm-accent-light);
    overflow-wrap: anywhere;
}

body.apm-public .apm-legal a:hover {
    color: var(--apm-accent);
}

/* ==========================================================================
   13. Reduced motion: everything frozen
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .apm-js .apm-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .apm-btn,
    .apm-card,
    .apm-card__img,
    .apm-panel--hover,
    .apm-author-card,
    .apm-header,
    .apm-drawer__panel,
    .apm-drawer__backdrop,
    body.apm-public .am-product-card,
    body.apm-public .feature-card {
        transition: none !important;
    }

    .apm-card:hover,
    .apm-card:hover .apm-card__img,
    .apm-btn:hover,
    .apm-panel--hover:hover,
    a.apm-author-card:hover {
        transform: none !important;
    }

    .apm-live-dot::after {
        animation: none;
    }
}
