/* ============================================================
   img.lu — style.css
   ============================================================ */

/* ── THEME DEFINITIONS ───────────────────────────────────────── */
:root {
    --bg:            #050505;
    --surface:       #111111;
    --border:        rgba(255, 255, 255, 0.08);
    --text-main:     #ffffff;
    --text-dim:      #88888e;
    --accent:        #ea141e;
    --accent-glow:   rgba(234, 20, 30, 0.2);
    --success:       #00a3e0;
    --ghost-color:   #ffffff;
    --hero-gradient: linear-gradient(180deg, #ffffff 0%, #ea141e 100%);
    --upload-grad:   linear-gradient(145deg, #1a1a1a, #0a0a0a);
    --nav-blur:      rgba(5, 5, 5, 0.8);
    --pro-bg:        linear-gradient(135deg, #f5d142 0%, #d4af37 100%);
    --pro-text:      #000000;
    --pro-glow:      rgba(212, 175, 55, 0.3);

    /* Transition timing used everywhere for theme switch */
    --theme-speed: 0.45s;
    --theme-ease:  cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg:            #f5f5f7;
    --surface:       #ffffff;
    --border:        rgba(0, 0, 0, 0.06);
    --text-main:     #1d1d1f;
    --text-dim:      #86868b;
    --accent:        #00a3e0;
    --accent-glow:   rgba(0, 163, 224, 0.2);
    --success:       #ea141e;
    --ghost-color:   #000000;
    --hero-gradient: linear-gradient(180deg, #ea141e 0%, #00a3e0 100%);
    --upload-grad:   linear-gradient(145deg, #ffffff, #f5f5f7);
    --nav-blur:      rgba(245, 245, 247, 0.8);
    --pro-bg:        linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    --pro-text:      #ffffff;
    --pro-glow:      rgba(184, 134, 11, 0.2);
}

/* ── GLOBAL THEME TRANSITION ──────────────────────────────────
   CSS custom properties can't be transitioned directly.
   Instead, we transition every property that consumes a variable.
   Keep this list tight — too many transitions hurt paint perf.
   ─────────────────────────────────────────────────────────── */
body,
nav,
.card,
.upload-area,
.glass-inner,
.options-pill,
.btn-primary,
.icon-btn,
.privacy-pill,
.site-footer,
.footer-link,
.status-pill,
.reduction,
.toast {
    transition:
        background        var(--theme-speed) var(--theme-ease),
        background-color  var(--theme-speed) var(--theme-ease),
        color             var(--theme-speed) var(--theme-ease),
        border-color      var(--theme-speed) var(--theme-ease),
        box-shadow        var(--theme-speed) var(--theme-ease);
}

/* .footer-body gets its own declaration so max-height can coexist
   with the theme transitions without cascade fighting.
   translateZ(0) promotes the element to its own GPU compositing layer —
   required on iOS Safari so the max-height animation runs on the
   compositor thread and isn't dropped by scroll/touch gesture processing. */
.footer-body {
    transition:
        max-height        0.45s cubic-bezier(0.4, 0, 0.2, 1),
        background        var(--theme-speed) var(--theme-ease),
        background-color  var(--theme-speed) var(--theme-ease),
        color             var(--theme-speed) var(--theme-ease),
        border-color      var(--theme-speed) var(--theme-ease),
        box-shadow        var(--theme-speed) var(--theme-ease);
    -webkit-transform: translateZ(0);
    transform:          translateZ(0);
}

/* ── BASE ─────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── GHOST TYPOGRAPHY ─────────────────────────────────────────── */
.ghost-typography {
    position: fixed;
    top: 55%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 25vw; font-weight: 900;
    color: var(--ghost-color);
    opacity: 0.02;
    pointer-events: none; z-index: -1;
    line-height: 1; letter-spacing: -0.05em;
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    white-space: nowrap;
    will-change: transform, opacity;
}

/* ── NAVIGATION ───────────────────────────────────────────────── */
nav.glass {
    position: sticky; top: 0; z-index: 100;
    background: var(--nav-blur);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

/* Three-column grid: brand | centre | right
   The two outer columns are equal (1fr) so the centre is always
   page-centred regardless of how wide the right cluster grows. */
.nav-content {
    max-width: 1100px; margin: 0 auto; padding: 15px 20px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

/* Right cluster sits at the end of its column */
.nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
}

.logo { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.8px; }
.nav-stats { font-size: 0.85rem; color: var(--accent); font-weight: 600; }

.icon-btn {
    background: none; border: 1px solid var(--border);
    padding: 8px; border-radius: 10px; cursor: pointer; color: var(--text-main);
    display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    transform: translateY(-1px);
}

/* ── HAMBURGER BUTTON ─────────────────────────────────────────── */
.nav-hamburger {
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    color: var(--text-main);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 38px; height: 38px;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.nav-hamburger:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}
.nav-hamburger__bar {
    display: block;
    width: 14px; height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease, width 0.25s ease;
    transform-origin: center;
}
/* Animate to × when open */
.nav-hamburger[aria-expanded="true"] .nav-hamburger__bar:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger__bar:nth-child(2) {
    opacity: 0; width: 0;
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger__bar:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}

/* ── TOOL DROPDOWN MENU ───────────────────────────────────────── */
.nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 2px;
    /* Hidden state */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 200;
}
.nav-menu--open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Anchor for the dropdown */
.nav-menu-anchor {
    position: relative;
}

/* ── TOOL LINKS INSIDE MENU ───────────────────────────────────── */
.nav-tool-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dim);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}
.nav-tool-link:hover {
    color: var(--text-main);
    background: rgba(128, 128, 128, 0.08);
}
.nav-tool-link--active {
    color: var(--accent);
    background: var(--accent-glow);
    border-color: var(--border);
}
.nav-tool-link--active:hover { color: var(--accent); }

/* Thin separator between items */
.nav-menu-sep {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ── HERO & UPLOAD AREA ───────────────────────────────────────── */
.hero { padding: 80px 20px; display: flex; flex-direction: column; align-items: center; }

.hero h1 {
    font-size: 4rem; margin: 0 0 10px 0;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.04em;
    text-align: center; font-weight: 800;
}
.hero p { color: var(--text-dim); margin-bottom: 40px; font-size: 1.1rem; }

.upload-area {
    width: 100%; max-width: 620px; position: relative;
    border-radius: 40px;
    background: var(--upload-grad);
    box-shadow: 0 40px 100px rgba(0,0,0,0.2);
    padding: 2px;
    cursor: pointer;
    outline: none;
    /* Keep only non-theme transitions here (theme ones handled above) */
    transition:
        transform         0.4s cubic-bezier(0.2, 1, 0.3, 1),
        box-shadow        var(--theme-speed) var(--theme-ease);
}
.upload-area:hover,
.upload-area:focus-visible { transform: translateY(-4px) scale(1.01); }

.upload-area:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.glass-inner {
    padding: 60px 40px; border-radius: 38px;
    border: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center;
    background: transparent;
}
.upload-icon { color: var(--accent); margin-bottom: 20px; opacity: 0.8; }

@media (max-width: 480px) {
    .hero { padding: 48px 16px; }
    .hero h1 { font-size: clamp(2.2rem, 10vw, 4rem); }
    .hero p  { font-size: 1rem; margin-bottom: 28px; }
    .glass-inner { padding: 40px 20px; }
    .upload-area { border-radius: 28px; }
}

/* ── OPTIONS PILL ─────────────────────────────────────────────── */
.options-pill {
    display: flex; align-items: center;
    flex-wrap: wrap; justify-content: center;
    gap: 10px 12px;
    background: rgba(128, 128, 128, 0.08); padding: 10px 20px;
    border-radius: 100px; border: 1px solid var(--border);
    backdrop-filter: blur(10px); color: var(--text-main);
    font-size: 0.9rem; margin-top: 20px;
    /* Never wider than its container */
    max-width: 100%; box-sizing: border-box;
    width: fit-content;
}

/* Select and checkbox label share identical typography */
.options-pill select,
.pill-label {
    background: transparent;
    color: var(--text-main);
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    /* Allow shrinking if space is tight */
    min-width: 0; flex-shrink: 1;
}

/* Constrain native select so it never forces overflow */
.options-pill select {
    max-width: 100%;
}

.pill-label input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px; height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Vertical dividers hide when the pill has wrapped to two rows */
.divider {
    width: 1px; height: 16px;
    background: var(--border); flex-shrink: 0;
}

@media (max-width: 480px) {
    .options-pill {
        border-radius: 20px;   /* pill shape breaks when content wraps — use softer radius */
        padding: 10px 16px;
        gap: 8px 10px;
        font-size: 0.82rem;
    }
    /* Hide dividers on very small screens — they look odd between wrapped rows */
    .options-pill .divider { display: none; }
}

/* ── FORMAT TOGGLE (WebP / AVIF) ──────────────────────────────── */
.format-toggle {
    display: inline-flex; align-items: center;
    background: rgba(128,128,128,0.1);
    border: 1px solid var(--border);
    border-radius: 8px; padding: 2px;
    gap: 2px;
}
.fmt-btn {
    background: none; border: none;
    padding: 3px 10px; border-radius: 6px;
    font-size: 0.78rem; font-weight: 700;
    font-family: inherit; letter-spacing: 0.03em;
    color: var(--text-dim); cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
    line-height: 1.4;
}
.fmt-btn--active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px var(--accent-glow);
}
.fmt-btn:not(.fmt-btn--active):not(:disabled):hover {
    color: var(--text-main);
    background: rgba(128,128,128,0.12);
}
.fmt-btn--unsupported,
.fmt-btn:disabled {
    opacity: 0.35; cursor: not-allowed;
}

/* ── DRAG-OVER STATE ──────────────────────────────────────────── */
.upload-area.drag-over {
    box-shadow: 0 0 50px var(--accent-glow);
    transform: scale(1.02);
}

/* ── RESULTS GRID ─────────────────────────────────────────────── */
.results-container {
    max-width: 1100px; margin: 0 auto; padding: 0 20px 100px;
    /* Defer paint until near viewport — big PageSpeed win on long lists */
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}
.results-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; gap: 12px; flex-wrap: wrap;
}
.results-header h3 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.count-badge {
    font-size: 0.8rem; color: var(--text-dim); font-weight: 500;
}

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

/* ── TEMP UPLOAD PAGE ─────────────────────────────────────────── */
.upload-page__actions {
    margin: 30px 0;
}

.upload-page__input {
    display: none;
}

.upload-page__button {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.upload-page__status {
    margin-top: 20px;
    min-height: 28px;
    color: var(--text-dim);
    text-align: center;
}

.upload-page__status p {
    margin: 0;
}

.upload-page__status--progress {
    color: var(--text-dim);
}

.upload-page__status--success {
    color: var(--success);
}

.upload-page__status--error {
    color: var(--accent);
}

.upload-results__grid {
    grid-template-columns: minmax(300px, 700px);
    justify-content: center;
}

.upload-results__card {
    padding: 30px;
    text-align: center;
}

.upload-results__image-box {
    height: 320px;
    margin-bottom: 20px;
}

.upload-results__image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 16px;
}

.upload-results__label {
    margin: 0 0 10px;
}

.upload-results__link {
    position: relative;
    margin: 0;
    padding: 12px;
    border-radius: 8px;
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.upload-results__link:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-glow);
    transform: translateY(-1px);
}

.upload-results__copied-badge {
    position: absolute;
    top: -12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(6px) scale(0.96);
    pointer-events: none;
}

.upload-results__copied-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.8rem;
    line-height: 1;
}

.upload-results__link.is-copied .upload-results__copied-badge {
    animation: uploadCopiedBadge 1.5s ease forwards;
}

.upload-results__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.upload-results__download {
    display: inline-flex;
}

.upload-results__copy-btn {
    position: relative;
    overflow: hidden;
}

.upload-results__copy-btn-label,
.upload-results__copy-btn-confirm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.upload-results__copy-btn-confirm {
    position: absolute;
    inset: 0;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
}

.upload-results__copy-btn.is-copied .upload-results__copy-btn-label {
    opacity: 0;
    transform: translateY(-10px);
}

.upload-results__copy-btn.is-copied .upload-results__copy-btn-confirm {
    opacity: 1;
    transform: translateY(0);
}

@keyframes uploadCopiedBadge {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(0.96);
    }
    15%,
    75% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
}

@media (max-width: 640px) {
    .upload-results__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .upload-results__card {
        padding: 20px;
    }

    .upload-results__image-box {
        height: 260px;
    }

    .upload-results__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .upload-results__download,
    .upload-results__copy-btn {
        width: 100%;
    }
}

/* ── CARD ─────────────────────────────────────────────────────── */
.card {
    background: var(--surface); border-radius: 30px; padding: 18px;
    border: 1px solid var(--border);
    animation: reveal 0.6s cubic-bezier(0.2, 1, 0.3, 1) backwards;
}
@keyframes reveal {
    from { opacity: 0; transform: translateY(30px); }
}

/* Loading placeholder */
.card-placeholder .img-box--loading {
    display: flex; align-items: center; justify-content: center;
    background: var(--accent); 
}

/* ── IMAGE BOX ────────────────────────────────────────────────── */
.img-box {
    position: relative; 
    height: 180px; 
    border-radius: 20px; 
    overflow: hidden;
    /* Checkerboard Pattern for transparency */
    background-color: #eee;
    background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd), 
                      linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    cursor: zoom-in;
}

.img-box img {
    width: 100%; height: 100%; object-fit: contain;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.img-orig {
    position: absolute; top: 0; left: 0;
    opacity: 0; z-index: 2;
    cursor: zoom-in;
}

.img-box:hover .img-orig  { opacity: 1; }
.img-box:hover .img-comp  { opacity: 0.2; transform: scale(1.05); }
/* When hovering (original visible) switch to default */
.img-box:hover             { cursor: default; }

/* ── DELETE BUTTON ────────────────────────────────────────────── */
.btn-delete {
    position: absolute; top: 10px; right: 10px; z-index: 20;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff; font-size: 14px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
}
.img-box:hover .btn-delete {
    opacity: 1;
    transform: scale(1);
}
.btn-delete:hover {
    background: rgba(234, 20, 30, 0.85);
    border-color: rgba(234, 20, 30, 0.4);
}
/* Ensure delete button stays on top even when original is showing */
.btn-delete { z-index: 30; }

.status-pill {
    position: absolute; bottom: 12px; left: 12px; z-index: 10;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px);
    color: white; font-size: 10px; padding: 5px 12px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700;
    pointer-events: none;
}
.status-pill::after { content: "Compressed"; }
.img-box:hover .status-pill::after { content: "Original"; }

.card-footer { margin: 15px 0; display: flex; justify-content: space-between; align-items: center; }
.card-name {
    font-size: 13px; font-weight: 600;
    overflow: hidden; width: 120px; white-space: nowrap; text-overflow: ellipsis;
}
.card-size { font-size: 11px; color: var(--text-dim); }
.placeholder-name {
    font-size: 13px; font-weight: 600; color: var(--text-dim);
    overflow: hidden; width: 150px; white-space: nowrap; text-overflow: ellipsis;
}

.reduction {
    background: rgba(16, 185, 129, 0.12); color: var(--success);
    padding: 4px 10px; border-radius: 8px; font-weight: 800; font-size: 12px;
    flex-shrink: 0;
}

/* ── PROGRESS SPINNER (placeholder card) ──────────────────────── */
.spinner {
    width: 44px; height: 44px; position: relative; z-index: 2;
}

.progress-ring {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
}
.progress-ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.progress-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 3;
}
.progress-arc {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 113;
    stroke-dashoffset: 113;
    transition: stroke-dashoffset 0.3s ease;
}

/* ── BUTTONS ──────────────────────────────────────────────────── */
.btn-primary {
    background: var(--accent); color: white; border: none;
    padding: 12px 24px; border-radius: 14px; font-weight: 600;
    box-shadow: 0 4px 15px var(--accent-glow);
    cursor: pointer; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
    justify-content: center;
}
.btn-primary:hover {
    filter: brightness(1.1); transform: translateY(-1px);
    box-shadow: 0 8px 25px var(--accent-glow);
}
.btn-primary:disabled {
    opacity: 0.6; cursor: not-allowed;
    filter: none; transform: none;
}
.btn-download {
    display: flex; text-align: center; margin-top: 15px; text-decoration: none;
}

/* ── BRAND ────────────────────────────────────────────────────── */
.brand-wrapper {
    display: inline-flex; flex-direction: column; align-items: stretch;
    cursor: pointer; transition: transform 0.2s ease;
    text-decoration: none; color: inherit;  /* kills <a> underline */
}
.brand-wrapper:hover { transform: translateY(-1px); }
.brand-wrapper:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 6px;
}
.logo-row { display: flex; align-items: baseline; gap: 8px; }

.badge-pro {
    background: var(--pro-bg); color: var(--pro-text);
    font-size: 10px; font-weight: 900; padding: 2px 6px;
    border-radius: 4px; letter-spacing: 0.05em;
    box-shadow: 0 2px 10px var(--pro-glow);
    position: relative; top: -4px;
    user-select: none; transition: transform 0.3s ease;
}
.brand-wrapper:hover .badge-pro { transform: translateY(-12px) rotate(-10deg); }

/* ── THEME ICON ───────────────────────────────────────────────── */
.theme-icon {
    width: 22px; height: 22px;
    stroke: var(--text-main); fill: none;
    stroke-width: 2; stroke-linecap: round;
    transition: stroke var(--theme-speed) var(--theme-ease);
}
.sun { transform-origin: center; transition: transform 0.5s ease, opacity 0.4s ease; }
.rays line { transition: all 0.4s ease; }
.moon {
    fill: var(--text-main); stroke: none; opacity: 0;
    transform: scale(0.6); transform-origin: center;
    transition: all 0.5s ease, fill var(--theme-speed) var(--theme-ease);
}

[data-theme="dark"]  .sun              { transform: scale(0.6); opacity: 0; }
[data-theme="dark"]  .rays line        { opacity: 0; transform: scale(0.5); }
[data-theme="dark"]  .moon             { opacity: 1; transform: scale(1); }
[data-theme="light"] .sun              { transform: scale(1); opacity: 1; }
[data-theme="light"] .rays line        { opacity: 1; }
[data-theme="light"] .moon             { opacity: 0; transform: scale(0.6); }

/* ── TOAST NOTIFICATION ───────────────────────────────────────── */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(12px);
    background: var(--surface); color: var(--text-main);
    border: 1px solid var(--border); border-radius: 12px;
    padding: 12px 24px; font-size: 0.9rem; font-weight: 500;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    z-index: 999; opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none; white-space: nowrap;
}
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── LUXEMBOURG FLAG ──────────────────────────────────────────── */
.lux-flag-underline {
    display: flex; flex-direction: column;
    height: 6px; border-radius: 2px; overflow: hidden;
}
.lux-flag-underline .stripe { flex: 1; width: 100%; }
.stripe.red   { background-color: #ea141e; }
.stripe.white { background-color: #ffffff; }
.stripe.blue  { background-color: #00a3e0; }
[data-theme="light"] .stripe.white {
    background-color: #f5f5f7;
    box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.05);
}

/* ── FOOTER ───────────────────────────────────────────────────── */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 20px;
}

/* Mobile toggle button (visible only on small screens) */
.footer-toggle {
    display: flex; width: 100%;
    justify-content: space-between; align-items: center;
    padding: 20px 0; background: none; border: none;
    color: var(--text-main); font-weight: 700; font-size: 1rem;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
    /* iOS Safari: eliminates the 300ms tap delay and prevents the first
       touch from being consumed by iOS scroll/gesture detection */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.footer-toggle[aria-expanded="true"] { border-bottom-color: var(--border); }
.chevron {
    width: 18px; height: 18px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.footer-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

/* Footer body: collapsed by default on mobile */
.footer-body {
    max-height: 0; overflow: hidden;
}
.footer-body.open { max-height: 900px; }

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 28px 0;
}

.footer-col { display: flex; flex-direction: column; gap: 12px; }

.footer-logo {
    font-weight: 900; font-size: 1.8rem; letter-spacing: -1.2px;
    color: var(--text-main); line-height: 1;
}
.footer-tagline {
    font-size: 0.85rem; color: var(--text-dim); line-height: 1.6;
    margin: 0;
}

.footer-heading {
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-dim);
    margin: 0 0 4px 0;
}

.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-link {
    color: var(--text-dim); text-decoration: none; font-size: 0.9rem;
    transition: color 0.2s ease;
}
.footer-link:hover { color: var(--accent); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    display: flex; flex-direction: column; align-items: center;
    gap: 12px; text-align: center;
}
.footer-copy { font-size: 0.8rem; color: var(--text-dim); margin: 0; }

.privacy-pill {
    background: transparent; border: 1px solid var(--border);
    padding: 10px 20px; border-radius: 100px;
    font-size: 0.82rem; color: var(--text-dim);
    display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
    justify-content: center;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    cursor: default;
}
.privacy-pill:hover {
    border-color: var(--accent); color: var(--text-main);
    transform: translateY(-2px);
}

/* ── DESKTOP FOOTER (≥ 768px) ─────────────────────────────────── */
@media (min-width: 768px) {
    .footer-toggle { display: none; }   /* Hide the toggle button */

    .footer-body {
        /* Always open on desktop — override mobile collapsed state */
        max-height: none !important;
        overflow: visible;
        /* Make sure aria-hidden doesn't visually hide on desktop */
    }

    .footer-grid {
        grid-template-columns: 1.6fr 1fr 1fr;
        gap: 48px;
        padding: 48px 0;
    }

    .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ════════════════════════════════════════════════════════════════
   PAGE / BLOG LAYOUT  (page.php)
   ════════════════════════════════════════════════════════════════ */

/* ── PAGE WRAPPER ─────────────────────────────────────────────── */
.page-wrap {
    min-height: 100vh;
    display: flex; flex-direction: column;
}
.page-wrap main { flex: 1; }

/* ── PAGE HERO (blog + pages) ─────────────────────────────────── */
.page-hero {
    position: relative; overflow: hidden;
    padding: 80px 20px 60px;
    text-align: center;
    /* Subtle noise grain for texture */
    background: var(--bg);
}

/* Gradient orb backdrop */
.page-hero::before {
    content: '';
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(234,20,30,0.18), transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 110%, rgba(0,163,224,0.12), transparent 70%);
    pointer-events: none;
}
[data-theme="light"] .page-hero::before {
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0,163,224,0.14), transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 110%, rgba(234,20,30,0.10), transparent 70%);
}

.page-hero__inner {
    position: relative; z-index: 1;
    max-width: 780px; margin: 0 auto;
}

/* Content-type chip */
.page-type-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(128,128,128,0.1);
    border: 1px solid var(--border);
    color: var(--accent); font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    padding: 5px 14px; border-radius: 100px;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}
.page-type-chip svg { flex-shrink: 0; }

/* Hero title */
.page-hero__title {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 900; letter-spacing: -0.04em;
    line-height: 1.1; margin: 0 0 20px 0;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Meta row: date · reading time · tags */
.page-meta {
    display: flex; align-items: center; flex-wrap: wrap;
    justify-content: center; gap: 8px 16px;
    font-size: 0.85rem; color: var(--text-dim);
    margin-bottom: 32px;
}
.page-meta__sep { opacity: 0.35; }

.tag-chip {
    display: inline-flex; align-items: center;
    background: rgba(128,128,128,0.08);
    border: 1px solid var(--border);
    color: var(--text-dim); font-size: 0.75rem; font-weight: 600;
    padding: 3px 10px; border-radius: 100px;
    transition: color 0.2s, border-color 0.2s;
    text-decoration: none;
}
.tag-chip:hover { color: var(--accent); border-color: var(--accent); }

/* Divider line below hero */
.page-hero__rule {
    width: 48px; height: 3px; border-radius: 2px;
    background: var(--accent);
    margin: 0 auto; opacity: 0.7;
}

/* ── PROSE COLUMN ─────────────────────────────────────────────── */
.prose-wrap {
    max-width: 700px; margin: 0 auto;
    padding: 56px 20px 100px;
}

/* CTA bar — sticky at the bottom of prose for blog posts */
.cta-bar {
    display: flex; justify-content: center;
    margin: 56px 0 0;
    padding: 32px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    text-align: center;
    flex-direction: column; align-items: center; gap: 12px;
}
.cta-bar__title {
    font-size: 1.1rem; font-weight: 700; margin: 0;
    letter-spacing: -0.02em;
}
.cta-bar__sub {
    font-size: 0.88rem; color: var(--text-dim); margin: 0;
}

/* ── BREADCRUMB ───────────────────────────────────────────────── */
.breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.82rem; color: var(--text-dim);
    margin-bottom: 40px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-separator { opacity: 0.35; font-size: 0.7rem; }
.breadcrumb [aria-current="page"] { color: var(--text-main); font-weight: 500; }

/* ── MARKDOWN CONTENT TYPOGRAPHY ─────────────────────────────── */
.markdown-content { line-height: 1.78; font-size: 1.05rem; color: var(--text-main); }

.markdown-content h1 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 900; letter-spacing: -0.04em; line-height: 1.15;
    margin: 0 0 24px; color: var(--text-main);
    /* Hide the H1 in prose when we already show it in the hero */
}
.page-hero ~ * .markdown-content h1,
.has-hero .markdown-content h1 { display: none; }

.markdown-content h2 {
    font-size: 1.4rem; font-weight: 800; letter-spacing: -0.025em;
    margin: 2.4em 0 0.8em; color: var(--text-main);
    padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.markdown-content h3 {
    font-size: 1.15rem; font-weight: 700; margin: 2em 0 0.6em;
    color: var(--text-main);
}

.markdown-content p {
    margin: 0 0 1.4em; color: var(--text-main);
    opacity: 0.92;
}
.markdown-content a {
    color: var(--accent); text-decoration: underline;
    text-decoration-thickness: 1px; text-underline-offset: 3px;
    transition: opacity 0.2s;
}
.markdown-content a:hover { opacity: 0.75; }

.markdown-content ul,
.markdown-content ol {
    margin: 0 0 1.4em; padding-left: 1.5em;
}
.markdown-content li { margin-bottom: 0.4em; }

.markdown-content blockquote {
    margin: 1.8em 0; padding: 16px 24px;
    border-left: 3px solid var(--accent);
    background: rgba(128,128,128,0.05);
    border-radius: 0 12px 12px 0;
    color: var(--text-dim); font-style: italic;
}
.markdown-content blockquote p { margin: 0; }

.markdown-content code {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 0.87em;
    background: rgba(128,128,128,0.1);
    padding: 2px 6px; border-radius: 5px;
    border: 1px solid var(--border);
}

.markdown-content pre {
    background: #0a0a0a; border: 1px solid var(--border);
    border-radius: 14px; padding: 20px 24px;
    overflow-x: auto; margin: 1.8em 0;
}
[data-theme="light"] .markdown-content pre { background: #f0f0f2; }

.markdown-content pre code {
    background: none; border: none; padding: 0;
    font-size: 0.9rem; color: #e2e8f0; line-height: 1.7;
}
[data-theme="light"] .markdown-content pre code { color: #1e293b; }

.markdown-content hr {
    border: none; border-top: 1px solid var(--border);
    margin: 2.5em 0;
}

.markdown-content img {max-width:90%; margin-left: auto;
    margin-right: auto;
border: 1px solid var(--border);
    padding: 10px;}
/* Tables */
.markdown-content table {
    width: 100%; border-collapse: collapse;
    margin: 1.8em 0; font-size: 0.95rem;
    border-radius: 12px; overflow: hidden;
    border: 1px solid var(--border);
}
.markdown-content th {
    background: rgba(128,128,128,0.08);
    padding: 11px 16px; text-align: left;
    font-weight: 700; font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-dim);
}
.markdown-content td {
    padding: 11px 16px;
    border-top: 1px solid var(--border);
}
.markdown-content tr:hover td { background: rgba(128,128,128,0.04); }

/* ── 404 PAGE ─────────────────────────────────────────────────── */
.error-page {
    min-height: 60vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 60px 20px;
}
.error-code {
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 900; line-height: 1;
    letter-spacing: -0.05em;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}
.error-msg { font-size: 1.15rem; color: var(--text-dim); margin: 16px 0 32px; }

/* ── NAV CTA (content pages) ──────────────────────────────────── */
.nav-cta {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--accent); color: #fff;
    padding: 8px 16px; border-radius: 10px; font-size: 0.82rem;
    font-weight: 700; text-decoration: none; letter-spacing: 0.01em;
    box-shadow: 0 3px 12px var(--accent-glow);
    transition: filter 0.2s, transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
    filter: brightness(1.1); transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
    color: #fff; text-decoration: none;
}

/* ════════════════════════════════════════════════════════════════
   BLOG ARCHIVE  (templates/blog_archive.php)
   ════════════════════════════════════════════════════════════════ */

.archive-wrap {
    max-width: 900px; margin: 0 auto;
    padding: 48px 20px 100px;
    display: flex; flex-direction: column; gap: 48px;
}

/* ── Archive hero extras ─────────────────────────────────────── */
.archive-hero__sub {
    font-size: 1.05rem; color: var(--text-dim);
    margin: 0 0 12px; max-width: 560px; margin-inline: auto;
    line-height: 1.65;
}
.archive-hero__count {
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-dim);
    margin: 0 0 24px;
}

/* ── Featured post ───────────────────────────────────────────── */
.post-featured {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px 44px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.post-featured:hover {
    border-color: var(--accent);
    box-shadow: 0 0 40px var(--accent-glow);
}

/* Invisible full-card link overlay (below text) */
.post-featured__link {
    position: absolute; inset: 0; z-index: 0;
}

.post-featured__body { position: relative; z-index: 1; }

.post-featured__meta {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 6px 12px; font-size: 0.82rem; color: var(--text-dim);
    margin-bottom: 16px;
}

.post-featured__title {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 900; letter-spacing: -0.03em; line-height: 1.15;
    margin: 0 0 16px;
}
.post-featured__title a {
    color: var(--text-main); text-decoration: none;
    transition: color 0.2s;
}
.post-featured__title a:hover { color: var(--accent); }

.post-featured__desc {
    font-size: 1rem; color: var(--text-dim);
    line-height: 1.7; margin: 0 0 24px;
    max-width: 580px;
}

.post-featured__cta {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.88rem; font-weight: 700;
    color: var(--accent); text-decoration: none;
    transition: gap 0.2s ease;
}
.post-featured__cta:hover { gap: 12px; }

/* "Latest" badge — top-right corner */
.post-featured__badge {
    position: absolute; top: 24px; right: 24px;
    background: var(--accent);
    color: #fff; font-size: 0.68rem; font-weight: 800;
    letter-spacing: 0.1em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 100px;
    opacity: 0.9;
}

/* Accent line on the left edge */
.post-featured::before {
    content: '';
    position: absolute; left: 0; top: 24px; bottom: 24px;
    width: 3px; border-radius: 0 2px 2px 0;
    background: var(--accent); opacity: 0.7;
}

/* ── Post grid ───────────────────────────────────────────────── */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.post-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px 26px;
    display: flex; flex-direction: column; gap: 10px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.post-card__meta {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 4px 10px; font-size: 0.78rem; color: var(--text-dim);
}

.post-card__title {
    font-size: 1.05rem; font-weight: 800;
    letter-spacing: -0.02em; line-height: 1.3;
    margin: 0;
}
.post-card__title a {
    color: var(--text-main); text-decoration: none;
    transition: color 0.2s;
    /* Stretch to fill card */
    display: block;
}
.post-card__title a::after {
    content: ''; position: absolute; inset: 0; z-index: 0;
}
.post-card__title a:hover { color: var(--accent); }

.post-card__desc {
    font-size: 0.88rem; color: var(--text-dim);
    line-height: 1.6; margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__tags {
    display: flex; flex-wrap: wrap; gap: 6px;
    position: relative; z-index: 1; /* above card overlay */
}

/* Arrow icon — bottom right */
.post-card__arrow {
    position: absolute; bottom: 20px; right: 20px;
    z-index: 1;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(128,128,128,0.08);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-dim); text-decoration: none;
    opacity: 0; transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.post-card:hover .post-card__arrow {
    opacity: 1; transform: scale(1);
    color: var(--accent);
    background: var(--accent-glow);
}

/* ── Empty state ─────────────────────────────────────────────── */
.archive-empty {
    text-align: center; padding: 60px 20px;
    display: flex; flex-direction: column;
    align-items: center; gap: 20px;
    color: var(--text-dim);
}

/* ── REDUCED MOTION ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Dashboard ───────────────────────────────────────────────── */
.dashboard-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 72px;
    display: grid;
    gap: 24px;
}

.dashboard-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
}

.dashboard-hero .page-hero__inner {
    max-width: 920px;
}

.dashboard-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: end;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 22px;
}

.dashboard-filter__field {
    display: grid;
    gap: 8px;
    min-width: 180px;
    color: var(--text);
    font-size: 0.95rem;
}

.dashboard-filter__field span {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.dashboard-filter__field input {
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0 14px;
    font: inherit;
}

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-login {
    width: min(460px, 100%);
    padding: 24px;
    display: grid;
    gap: 16px;
    margin: 0 auto;
}

.dashboard-login__error {
    margin: 0;
    color: #ffb4b4;
}

.dashboard-logout {
    display: flex;
    align-items: stretch;
}

.dashboard-logout .btn-primary {
    min-height: 60px;
}

.dashboard-card {
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)),
        rgba(8, 8, 10, 0.58);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .dashboard-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.78)),
        rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 48px rgba(18, 30, 54, 0.08);
}

.dashboard-kpi {
    padding: 22px;
    display: grid;
    gap: 8px;
}

.dashboard-kpi__label,
.dashboard-panel__eyebrow {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.dashboard-kpi__value {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    line-height: 1;
}

.dashboard-kpi__hint,
.dashboard-panel__meta {
    color: var(--text-dim);
    font-size: 0.92rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    gap: 18px;
}

.dashboard-panel {
    padding: 22px;
    min-height: 100%;
}

.dashboard-panel--wide {
    grid-column: 1 / -1;
}

.dashboard-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-panel__head h2 {
    margin: 4px 0 0;
    font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.dashboard-chart-wrap {
    padding: 12px 0 0;
}

#calls-chart {
    width: 100%;
    display: block;
}

.dashboard-table-wrap {
    overflow: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    text-align: left;
    padding: 12px 10px;
    border-top: 1px solid var(--border);
    vertical-align: top;
}

.dashboard-table th {
    border-top: 0;
    color: var(--text-dim);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-table__mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.dashboard-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.72rem;
    margin-left: 6px;
    color: var(--text-dim);
}

.dashboard-remap-form {
    display: grid;
    gap: 8px;
    min-width: 220px;
}

.dashboard-remap-form input {
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0 12px;
    font: inherit;
}

.dashboard-remap__actions {
    display: flex;
    gap: 8px;
}

.dashboard-remap__actions .btn-primary,
.dashboard-remap-clear {
    min-height: 36px;
    padding: 8px 12px;
}

.dashboard-remap-clear {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.dashboard-remap__state {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.dashboard-remap__state--error {
    color: #d95555;
}

@media (max-width: 980px) {
    .dashboard-toolbar,
    .dashboard-kpis,
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-panel--wide {
        grid-column: auto;
    }
}

@media (max-width: 680px) {
    .dashboard-shell {
        width: min(100% - 24px, 1180px);
    }

    .dashboard-toolbar,
    .dashboard-kpis,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-filter {
        align-items: stretch;
    }

    .dashboard-filter .btn-primary {
        width: 100%;
    }

    .dashboard-panel__head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ══════════════════════════════════════════════════════════════
       BANNER CSS — 
══════════════════════════════════════════════════════════════ */
 

.imglu-notice {
      width: 100%;
      max-width: 620px;             /* matches .upload-area */
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 22px;          /* matches .dashboard-filter */
      overflow: hidden;
      position: relative;
 
      /* inherits site theme transitions */
      transition:
        background        var(--theme-speed) var(--theme-ease),
        background-color  var(--theme-speed) var(--theme-ease),
        color             var(--theme-speed) var(--theme-ease),
        border-color      var(--theme-speed) var(--theme-ease),
        box-shadow        var(--theme-speed) var(--theme-ease),
        opacity           0.3s ease,
        transform         0.3s ease;
    }
 
    /* Top stripe — mirrors .btn-primary / .accent usage */
    .imglu-notice__stripe {
      height: 2px;
      background: var(--accent);
      box-shadow: 0 0 18px var(--accent-glow);
    }
 
    .imglu-notice__body {
      padding: 18px 20px 20px;
    }
 
    /* ── Header row ── */
    .imglu-notice__head {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 14px;
    }
 
    .imglu-notice__dot {
      width: 7px; height: 7px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 6px var(--accent-glow);
      flex-shrink: 0;
      animation: imglu-blink 2.4s ease-in-out infinite;
    }
    @keyframes imglu-blink {
      0%,100% { opacity: 1; }
      50%      { opacity: 0.3; }
    }
 
    .imglu-notice__eyebrow {
      font-size: 0.72rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-dim);
      font-weight: 600;
    }
 
    /* Language toggle — reuses .icon-btn feel */
    .imglu-notice__langs {
      margin-left: auto;
      display: flex;
      gap: 4px;
    }
    .imglu-notice__lang {
      font: inherit;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      cursor: pointer;
      padding: 3px 9px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: none;
      color: var(--text-dim);
      transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    }
    .imglu-notice__lang:hover,
    .imglu-notice__lang[aria-pressed="true"] {
      color: var(--accent);
      border-color: var(--accent);
      background: var(--accent-glow);
    }
 
    /* ── Lines ── */
    .imglu-notice__lines {
      display: flex;
      flex-direction: column;
      gap: 9px;
      margin-bottom: 16px;
    }
 
    .imglu-notice__line {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      font-size: 0.88rem;
      line-height: 1.55;
      color: var(--text-main);
    }
 
    .imglu-notice__line-icon {
      font-size: 14px;
      flex-shrink: 0;
      margin-top: 1px;
    }
 
    /* highlighted brand name */
    .imglu-notice__line b {
      font-weight: 700;
      background: linear-gradient(90deg, var(--text-main), var(--accent));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
 
    /* warning line */
    .imglu-notice__line--warn {
      color: var(--text-dim);
    }
    .imglu-notice__line--warn .imglu-notice__line-icon {
      filter: grayscale(0.3);
    }
 
    /* ── Separator ── */
    .imglu-notice__sep {
      height: 1px;
      background: var(--border);
      margin-bottom: 14px;
    }
 
    /* ── Community tags ── */
    .imglu-notice__footer-label {
      font-size: 0.72rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 8px;
    }
 
    .imglu-notice__tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
 
    /* reuses the nav-tool-link pill aesthetic */
    .imglu-notice__tag {
      display: inline-block;
      font-size: 0.76rem;
      font-weight: 600;
      padding: 4px 11px;
      border-radius: 8px;
      border: 1px solid var(--border);
      color: var(--success);           /* --success = blue in dark, red in light */
      background: none;
      text-decoration: none;
      transition: border-color 0.18s ease, background 0.18s ease;
    }
    .imglu-notice__tag:hover {
      border-color: var(--success);
      background: rgba(0,163,224,0.08);
    }
    [data-theme="light"] .imglu-notice__tag:hover {
      background: rgba(234,20,30,0.06);
    }
    .imglu-notice__tag--more {
      color: var(--text-dim);
      cursor: default;
      pointer-events: none;
    }
 
    /* ── Dismiss button — matches .icon-btn ── */
    .imglu-notice__close {
      position: absolute;
      top: 14px; right: 14px;
      background: none;
      border: 1px solid var(--border);
      border-radius: 10px;
      width: 28px; height: 28px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-dim);
      font-size: 12px;
      line-height: 1;
      transition: color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    }
    .imglu-notice__close:hover {
      color: var(--text-main);
      border-color: var(--accent);
      box-shadow: 0 0 10px var(--accent-glow);
    }
 
    /* Dismiss animation */
    .imglu-notice--dismissed {
      opacity: 0;
      transform: translateY(-6px);
      pointer-events: none;
    }
 
    /* ── Responsive (matches site breakpoints) ── */
    @media (max-width: 480px) {
      .imglu-notice { border-radius: 16px; }
      .imglu-notice__body { padding: 14px 16px 16px; }
    }
 
    /* END BANNER CSS ══════════════════════════════════════════════ */
