﻿/* =========================================================
   PhotoBrain — Shared Design System
   Deployed at: /Apps/PhotoBrain/Content/photobrain.css
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
    --bg: #0a0b0f;
    --bg-elev: #12141a;
    --surface: #16181f;
    --surface-2: #1c1f27;
    --border: rgba(255,255,255,.08);
    --border-strong: rgba(255,255,255,.14);
    --ink: #f5f6f8;
    --ink-soft: #b6bac5;
    --muted: #7b8092;
    --brand: #ff6b35;
    --brand-2: #ffb347;
    --accent: #5b8dff;
    --accent-soft: rgba(91,141,255,.15);
    --success: #4ade80;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Fraunces', Georgia, serif;
    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 26px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.25);
    --shadow-md: 0 8px 24px rgba(0,0,0,.35), 0 20px 50px rgba(0,0,0,.25);
    --shadow-lg: 0 30px 80px rgba(0,0,0,.55);
    --glow-brand: 0 0 0 1px rgba(255,107,53,.4), 0 12px 40px rgba(255,107,53,.35);
    --container: 1200px;
    --header-h: 72px;
    --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: 1;
        background: radial-gradient(1200px 800px at 50% -10%, rgba(91,141,255,.08), transparent 60%), radial-gradient(900px 700px at 100% 100%, rgba(255,107,53,.06), transparent 60%);
    }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brand);
    color: #fff;
    padding: 12px 18px;
    border-radius: 0 0 8px 0;
    z-index: 9999;
    font-weight: 600;
}

    .skip-link:focus {
        left: 0;
    }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    margin: 0;
    letter-spacing: -.02em;
    font-weight: 700;
}

h1 {
    font-size: clamp(38px, 6.5vw, 76px);
    line-height: 1.03;
    letter-spacing: -.035em;
    font-weight: 800;
}

h2 {
    font-size: clamp(28px, 4.2vw, 48px);
    line-height: 1.1;
    font-weight: 800;
}

h3 {
    font-size: 19px;
    font-weight: 700;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--brand-2);
    margin-bottom: 18px;
}

    .eyebrow::before {
        content: "";
        width: 24px;
        height: 1px;
        background: currentColor;
        opacity: .6;
    }

    .eyebrow.center {
        justify-content: center;
    }

        .eyebrow.center::after {
            content: "";
            width: 24px;
            height: 1px;
            background: currentColor;
            opacity: .6;
        }

.lead {
    font-size: clamp(16px, 1.6vw, 19px);
    color: var(--ink-soft);
    line-height: 1.65;
}

.grad-text {
    background: linear-gradient(120deg, #fff 0%, #ffd9b8 40%, var(--brand) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Inline back link on Upload page */
.upload-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color .18s var(--ease);
}

    .upload-back-link:hover {
        color: var(--brand-2);
    }

    .upload-back-link svg {
        flex-shrink: 0;
        opacity: .8;
    }


/* =========================================================
   Exports page
   ========================================================= */

.exports-quick {
    padding: 24px;
    margin-bottom: 20px;
}

    .exports-quick .app-panel-head {
        margin-bottom: 20px;
    }

.exports-quick-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .exports-quick-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.exports-quick-card {
    background: rgba(255,255,255,.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color .18s var(--ease), background .18s var(--ease);
}

    .exports-quick-card:hover {
        border-color: var(--border-strong);
        background: rgba(255,255,255,.03);
    }

.exports-quick-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(255,107,53,.18), rgba(91,141,255,.12));
    border: 1px solid rgba(255,255,255,.08);
    color: var(--brand-2);
    flex-shrink: 0;
}

    .exports-quick-icon svg {
        width: 20px;
        height: 20px;
    }

.exports-quick-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.exports-quick-card p {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
    flex-grow: 1;
}

.exports-quick-card .btn {
    align-self: flex-start;
}

/* ---------- History list ---------- */

.exports-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exports-history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}

    .exports-history-item:first-child {
        border-top: 0;
    }

.exports-history-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    color: var(--muted);
    flex-shrink: 0;
}

    .exports-history-icon svg {
        width: 20px;
        height: 20px;
    }

.exports-history-body {
    flex: 1;
    min-width: 0;
}

    .exports-history-body strong {
        display: block;
        font-size: 14.5px;
        font-weight: 600;
        color: var(--ink);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .exports-history-body span {
        display: block;
        font-size: 12.5px;
        color: var(--muted);
        margin-top: 2px;
    }

.exports-history-actions {
    flex-shrink: 0;
}

    .exports-history-actions .btn {
        padding: 8px 16px;
        font-size: 13px;
    }

/* =========================================================
   Header actions — grouped panels
   ========================================================= */

.header-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

    /* Hide the wrapper when its child panel isn't rendered,
   so it doesn't add empty space */
    .header-actions-group:empty {
        display: none;
    }

/* Sign out button in the header — subtle red tint on hover */
.btn-logout {
    font-size: 13.5px;
    padding: 10px 18px;
}

    .btn-logout:hover {
        background: rgba(255,107,107,.1);
        border-color: rgba(255,107,107,.35);
        color: #ff9b8a;
    }

/* Mobile nav sign out link */
.nav-mobile-logout {
    display: block;
    text-decoration: none;
    color: #ff9b8a !important;
    font-size: 16px;
    font-weight: 500;
    padding: 13px 14px;
    border-radius: 10px;
    background: none;
    border: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

    .nav-mobile-logout:hover {
        background: rgba(255,107,107,.1);
    }

/* On mobile, hide the desktop action groups — the mobile nav covers it */
@media (max-width: 899px) {
    /* Hide secondary actions on mobile; keep the primary CTA */
    .header-actions .btn-login,
    .header-actions .btn-logout {
        display: none !important;
    }
}

/* =========================================================
   Settings page
   ========================================================= */

.settings-page {
    padding: 0;
}

.settings-content {
    padding-top: 32px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 860px;
}

.settings-intro {
    max-width: 640px;
    margin-bottom: 8px;
}

    .settings-intro h1 {
        font-size: clamp(30px, 4.5vw, 44px);
        line-height: 1.1;
        letter-spacing: -.03em;
        font-weight: 800;
        margin: 0 0 14px;
    }

    .settings-intro .lead {
        margin: 0;
    }

/* -------- Panels -------- */
.settings-panel {
    padding: 28px;
}

    .settings-panel .app-panel-head {
        margin-bottom: 22px;
    }

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

    .settings-form .form-row {
        margin-bottom: 0;
    }

.settings-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
}

/* -------- Checkboxes -------- */
.settings-check {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

    .settings-check:last-of-type {
        border-bottom: 0;
    }

.settings-check-hint {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 2px;
    font-weight: 400;
}

/* =========================================================
   Dashboard — upload CTA, sidebar accent, disabled links
   ========================================================= */

/* ---------- Upload CTA band at top of dashboard ---------- */
.dashboard-upload-cta {
    background: radial-gradient(800px 400px at 100% 0%, rgba(255,107,53,.15), transparent 60%), linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

    .dashboard-upload-cta::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255,107,53,.4), transparent);
    }

.dashboard-upload-cta-content .eyebrow {
    margin-bottom: 10px;
}

.dashboard-upload-cta-content h2 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 8px;
    color: var(--ink);
}

.dashboard-upload-cta-content p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 620px;
}

.dashboard-upload-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (min-width: 720px) {
    .dashboard-upload-cta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 32px 40px;
    }

    .dashboard-upload-cta-content {
        flex: 1;
        min-width: 0;
    }

    .dashboard-upload-cta-actions {
        flex-shrink: 0;
    }
}

/* ---------- Sidebar: accent link ---------- */
.app-nav-link-accent {
    background: rgba(255,107,53,.1);
    border: 1px solid rgba(255,107,53,.28);
    color: var(--brand-2);
    font-weight: 600;
    margin-top: 2px;
    margin-bottom: 8px;
}

    .app-nav-link-accent:hover {
        background: rgba(255,107,53,.18);
        border-color: rgba(255,107,53,.45);
        color: #ffd9b8;
    }

/* ---------- Sidebar: disabled links ---------- */
.app-nav-link.is-disabled {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
}

    .app-nav-link.is-disabled::before {
        display: none;
    }

/* ---------- Sidebar: persistent CTA button ---------- */
.app-sidebar-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #1a0c05;
    font-weight: 700;
    font-size: 13.5px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    margin-bottom: 12px;
    box-shadow: 0 6px 20px rgba(255,107,53,.35);
    transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}

    .app-sidebar-cta:hover {
        box-shadow: 0 10px 28px rgba(255,107,53,.5);
        transform: translateY(-1px);
    }

    .app-sidebar-cta svg {
        flex-shrink: 0;
    }

/* -------- Danger zone -------- */
.settings-danger {
    border-color: rgba(255,107,107,.3);
    background: radial-gradient(600px 200px at 100% 0%, rgba(255,107,107,.08), transparent 70%), linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
}

    .settings-danger .app-panel-head h2 {
        color: #ff9b8a;
    }

.settings-danger-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0;
}

.settings-danger-btn {
    background: rgba(255,107,107,.1);
    border: 1px solid rgba(255,107,107,.4);
    color: #ff9b8a;
    font-weight: 700;
}

    .settings-danger-btn:hover {
        background: rgba(255,107,107,.2);
        border-color: rgba(255,107,107,.6);
        color: #ffb3a6;
    }

/* -------- Responsive -------- */
@media (min-width: 640px) {
    .settings-form .form-row {
        margin-bottom: 0;
    }
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,11,15,.72);
    backdrop-filter: saturate(160%) blur(20px);
    -webkit-backdrop-filter: saturate(160%) blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.logo {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -.02em;
    color: var(--ink);
    text-decoration: none;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: var(--glow-brand);
    position: relative;
    flex-shrink: 0;
}

    .logo-mark::after {
        content: "";
        position: absolute;
        inset: 2px;
        border-radius: 8px;
        background: linear-gradient(135deg, rgba(255,255,255,.25), transparent 60%);
        pointer-events: none;
    }

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2px;
}

    .nav-desktop a {
        text-decoration: none;
        color: var(--ink-soft);
        font-size: 14.5px;
        font-weight: 500;
        padding: 9px 15px;
        border-radius: 10px;
        transition: color .18s var(--ease), background .18s var(--ease);
    }

        .nav-desktop a:hover {
            color: var(--ink);
            background: rgba(255,255,255,.05);
        }

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .header-actions .btn-login {
        display: none;
    }

.hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-strong);
    background: rgba(255,255,255,.04);
    border-radius: 12px;
    cursor: pointer;
    color: var(--ink);
    padding: 0;
}

    .hamburger svg {
        width: 20px;
        height: 20px;
    }

    .hamburger:focus-visible {
        outline: 2px solid var(--brand);
        outline-offset: 2px;
    }

.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 8px 16px 22px;
    background: rgba(10,11,15,.98);
    border-bottom: 1px solid var(--border);
    gap: 2px;
}

    .nav-mobile.open {
        display: flex;
    }

    .nav-mobile a {
        text-decoration: none;
        color: var(--ink);
        font-size: 16px;
        font-weight: 500;
        padding: 13px 14px;
        border-radius: 10px;
    }

        .nav-mobile a:hover {
            background: rgba(255,255,255,.05);
            color: var(--brand-2);
        }


/* =========================================================
   Library + Bursts pages
   ========================================================= */

/* Grid used by both pages */
.library-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 640px) {
    .library-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .library-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Tile */
.library-tile {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
    position: relative;
}

    .library-tile:hover {
        transform: translateY(-2px);
        border-color: var(--border-strong);
        box-shadow: var(--shadow-md);
    }

    .library-tile.is-best {
        border-color: rgba(255,107,53,.5);
        box-shadow: 0 0 0 3px rgba(255,107,53,.18);
    }

.library-tile-img {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #0d0f14;
}

    .library-tile-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .4s var(--ease);
    }

.library-tile:hover .library-tile-img img {
    transform: scale(1.04);
}

.library-tile-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(10,11,15,.65) 100%);
    pointer-events: none;
}

.library-tile-score {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    min-width: 32px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(10,11,15,.82);
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.library-tile-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #1a0c05;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
}

    .library-tile-badge:empty {
        display: none;
    }

.library-tile-meta {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.library-tile-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.library-tile-time {
    font-size: 11px;
    color: var(--muted);
}

/* Burst groups */
.burst-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.burst-group {
    padding: 20px 22px 24px;
}

.burst-group-head {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

    .burst-group-head h2 {
        font-size: 16px;
        font-weight: 700;
        margin: 0 0 4px;
        color: var(--ink);
        letter-spacing: -.01em;
    }

    .burst-group-head p {
        font-size: 13px;
        color: var(--muted);
        margin: 0;
    }

        .burst-group-head p strong {
            color: var(--brand-2);
            font-weight: 600;
        }

/* =========================================================
   Glass-Box Reasoning — "Why this score?"
   ========================================================= */

.lb-glassbox {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.lb-glassbox-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand-2);
    margin-bottom: 12px;
}

    .lb-glassbox-head svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

.lb-glassbox-verdict {
    margin: 0 0 16px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink);
    padding: 12px 14px;
    background: rgba(255,255,255,.03);
    border-left: 3px solid var(--brand);
    border-radius: 0 8px 8px 0;
}

.lb-glassbox-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.lb-glassbox-item {
    border-left: 2px solid var(--border-strong);
    padding-left: 12px;
}

    .lb-glassbox-item.is-good {
        border-left-color: #4ade80;
    }

    .lb-glassbox-item.is-ok {
        border-left-color: #ffb347;
    }

    .lb-glassbox-item.is-bad {
        border-left-color: #ff9b8a;
    }

.lb-glassbox-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.lb-glassbox-label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
}

.lb-glassbox-value {
    font-size: 13.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.lb-glassbox-verdict {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    margin-left: auto;
}

    .lb-glassbox-verdict.is-good {
        background: rgba(74,222,128,.12);
        color: #a7f3c6;
    }

    .lb-glassbox-verdict.is-ok {
        background: rgba(255,179,71,.12);
        color: #ffe4b8;
    }

    .lb-glassbox-verdict.is-bad {
        background: rgba(255,107,107,.12);
        color: #ffc4b8;
    }

.lb-glassbox-explain {
    margin: 0 0 6px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ink-soft);
}

.lb-glassbox-cite {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--muted);
    font-style: italic;
}

    .lb-glassbox-cite strong {
        color: var(--brand-2);
        font-style: normal;
        font-weight: 600;
    }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}

    .btn:active {
        transform: translateY(1px);
    }

    .btn:focus-visible {
        outline: 2px solid var(--brand-2);
        outline-offset: 3px;
    }

.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    color: #1a0c05;
    font-weight: 700;
    box-shadow: 0 8px 28px rgba(255,107,53,.32);
}

    .btn-primary:hover {
        box-shadow: 0 12px 36px rgba(255,107,53,.45);
        transform: translateY(-1px);
    }

.btn-ghost {
    background: rgba(255,255,255,.05);
    color: var(--ink);
    border-color: var(--border-strong);
}

    .btn-ghost:hover {
        background: rgba(255,255,255,.09);
        border-color: rgba(255,255,255,.22);
    }

.btn-lg {
    padding: 15px 28px;
    font-size: 15.5px;
}

.btn-block {
    width: 100%;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.hero-copy {
    max-width: 620px;
}

    .hero-copy h1 {
        margin-bottom: 22px;
    }

    .hero-copy .lead {
        margin-bottom: 32px;
        max-width: 540px;
    }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 36px;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 26px;
    font-size: 13px;
    color: var(--muted);
}

    .hero-trust span {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .hero-trust svg {
        width: 15px;
        height: 15px;
        color: var(--success);
        flex-shrink: 0;
    }

.hero-mosaic {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 12px;
    aspect-ratio: 1 / 1;
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}

.photo-tile {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    background: #222;
}

    .photo-tile::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.35) 100%);
        pointer-events: none;
    }

    .photo-tile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .6s var(--ease);
    }

    .photo-tile:hover img {
        transform: scale(1.06);
    }

    .photo-tile.t1 {
        grid-column: 1 / 4;
        grid-row: 1 / 4;
    }

    .photo-tile.t2 {
        grid-column: 4 / 7;
        grid-row: 1 / 3;
    }

    .photo-tile.t3 {
        grid-column: 4 / 7;
        grid-row: 3 / 5;
    }

    .photo-tile.t4 {
        grid-column: 1 / 3;
        grid-row: 4 / 7;
    }

    .photo-tile.t5 {
        grid-column: 3 / 7;
        grid-row: 5 / 7;
    }

.score-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(10,11,15,.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: 999px;
    letter-spacing: .02em;
}

    .score-badge .dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--success);
        box-shadow: 0 0 0 3px rgba(74,222,128,.25);
    }

    .score-badge.hot .dot {
        background: var(--brand);
        box-shadow: 0 0 0 3px rgba(255,107,53,.25);
    }


/* =========================================================
   Verification code form
   ========================================================= */

.verify-code-form {
    margin-top: 20px;
}

.verify-code-input {
    text-align: center;
    font-family: 'Consolas', 'Menlo', monospace;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brand-2);
    padding: 16px;
    background: rgba(255,107,53,.06);
    border: 1px solid rgba(255,107,53,.35);
}

    .verify-code-input:focus {
        border-color: var(--brand);
        background: rgba(255,107,53,.1);
        box-shadow: 0 0 0 3px rgba(255,107,53,.18);
    }

    .verify-code-input::placeholder {
        color: var(--muted);
        font-weight: 400;
        letter-spacing: 0.1em;
    }


/* =========================================================
   Lightbox — Coach's notes panel
   ========================================================= */

.lb-coach {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lb-coach-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand-2);
}

    .lb-coach-head svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        color: var(--brand-2);
    }

.lb-coach p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--ink-soft);
}

@media (min-width: 900px) {
    /* The lightbox side panel is where the coach lives on wide screens */
    .lb-info .lb-coach {
        margin-top: 24px;
    }
}


/* =========================================================
   Promote-to-keepers button on Review cards
   ========================================================= */

.promote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 12px;
    margin-top: 4px;
    border-radius: 999px;
    background: rgba(74,222,128,.08);
    border: 1px solid rgba(74,222,128,.3);
    color: #a7f3c6;
    cursor: pointer;
    transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
    align-self: flex-start;
    white-space: nowrap;
}

    .promote-btn:hover {
        background: rgba(74,222,128,.16);
        border-color: rgba(74,222,128,.5);
    }

    .promote-btn:focus-visible {
        outline: 2px solid #a7f3c6;
        outline-offset: 2px;
    }

    .promote-btn svg {
        width: 12px;
        height: 12px;
        flex-shrink: 0;
        opacity: 0;
        transition: opacity .15s var(--ease);
    }

    .promote-btn.is-promoted {
        background: rgba(74,222,128,.2);
        border-color: rgba(74,222,128,.55);
        color: #4ade80;
    }

        .promote-btn.is-promoted svg {
            opacity: 1;
        }

/* ---------- Sections ---------- */
section {
    padding: 88px 0;
    position: relative;
}

.section-head {
    max-width: 720px;
    margin: 0 auto 56px;
    text-align: center;
}

    .section-head h2 {
        margin-bottom: 16px;
    }

    .section-head .lead {
        max-width: 580px;
        margin: 0 auto;
    }

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

/* ---------- Duplicate group headers ---------- */
.dup-group-header {
    grid-column: 1 / -1; /* span the full width of the grid */
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand-2);
    padding: 16px 4px 8px;
    border-bottom: 1px solid var(--border);
    margin-top: 4px;
}

    .dup-group-header:first-child {
        margin-top: 0;
    }

.dup-group-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #c4b5fd);
    box-shadow: 0 0 0 4px rgba(139,92,246,.15);
    flex-shrink: 0;
}

/* ---------- Feature cards ---------- */
.feature-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
    position: relative;
    overflow: hidden;
}

    .feature-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
    }

    .feature-card:hover {
        transform: translateY(-4px);
        border-color: var(--border-strong);
        box-shadow: var(--shadow-md);
    }

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(255,107,53,.18), rgba(91,141,255,.12));
    border: 1px solid rgba(255,255,255,.08);
    color: var(--brand-2);
    margin-bottom: 18px;
}

    .feature-icon svg {
        width: 22px;
        height: 22px;
    }

.feature-card h3 {
    margin-bottom: 8px;
    color: var(--ink);
}

.feature-card p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.6;
}

/* ---------- Showcase ---------- */
.showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.show-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

    .show-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

    .show-card .thumb {
        aspect-ratio: 16 / 11;
        background: #0d0f14;
        overflow: hidden;
        position: relative;
    }

        .show-card .thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: .92;
        }

        .show-card .thumb .overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, transparent 50%, rgba(10,11,15,.8) 100%);
        }

    .show-card .body {
        padding: 22px 24px 26px;
    }

    .show-card h3 {
        margin-bottom: 8px;
    }

    .show-card p {
        margin: 0;
        color: var(--ink-soft);
        font-size: 15px;
    }

/* ---------- Stats ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat {
    text-align: center;
    padding: 12px;
}

    .stat .num {
        font-family: var(--font-display);
        font-weight: 600;
        font-size: clamp(30px, 4.5vw, 44px);
        letter-spacing: -.02em;
        line-height: 1;
        background: linear-gradient(135deg, #fff, var(--brand-2));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        margin-bottom: 8px;
    }

    .stat .lbl {
        font-size: 12.5px;
        color: var(--muted);
        letter-spacing: .12em;
        text-transform: uppercase;
    }

/* Select-all button when in "clear" mode */
.filter-helper.is-clear-mode {
    background: rgba(255,107,107,.1);
    border-color: rgba(255,107,107,.35);
    color: #ff9b8a;
}

    .filter-helper.is-clear-mode:hover {
        background: rgba(255,107,107,.18);
        border-color: rgba(255,107,107,.5);
    }

/* ---------- Pricing ---------- */
.price-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: stretch;
}

.price-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform .25s var(--ease), border-color .25s var(--ease);
}

    .price-card:hover {
        border-color: var(--border-strong);
    }

    .price-card.featured {
        background: radial-gradient(600px 300px at 50% -20%, rgba(255,107,53,.28), transparent 70%), linear-gradient(180deg, #1c1a1f 0%, #12141a 100%);
        border-color: rgba(255,107,53,.35);
        box-shadow: var(--glow-brand);
    }

@media (min-width: 900px) {
    .price-card.featured {
        transform: scale(1.03);
    }
}

.price-card .plan-name {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 10px;
}

.price-card.featured .plan-name {
    color: var(--brand-2);
}

.price-amount {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 46px;
    letter-spacing: -.03em;
    line-height: 1;
    margin: 0 0 6px;
    color: var(--ink);
}

    .price-amount .unit {
        font-family: var(--font-sans);
        font-size: 14px;
        font-weight: 500;
        color: var(--muted);
        letter-spacing: 0;
    }

.price-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14.5px;
}

    .price-list li {
        display: flex;
        align-items: flex-start;
        gap: 11px;
        color: var(--ink-soft);
    }

    .price-list svg {
        width: 17px;
        height: 17px;
        flex-shrink: 0;
        margin-top: 3px;
        color: var(--brand-2);
    }

.price-card .btn {
    margin-top: auto;
}

.pill {
    position: absolute;
    top: -13px;
    right: 28px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #1a0c05;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 6px 13px;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(255,107,53,.4);
}

/* ---------- Quotes ---------- */
.quote-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.quote-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

    .quote-card::before {
        content: "\201C";
        position: absolute;
        top: 10px;
        right: 24px;
        font-family: var(--font-display);
        font-size: 96px;
        line-height: 1;
        color: rgba(255,107,53,.14);
        pointer-events: none;
    }

    .quote-card blockquote {
        margin: 0 0 22px;
        font-size: 16px;
        line-height: 1.65;
        color: var(--ink);
        flex-grow: 1;
        position: relative;
        z-index: 1;
    }

.quote-who {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.12);
}

.quote-who strong {
    display: block;
    font-size: 14.5px;
    color: var(--ink);
}

.quote-who span {
    display: block;
    font-size: 13px;
    color: var(--muted);
}

/* ---------- CTA band ---------- */
.cta-band {
    position: relative;
    border-radius: 28px;
    padding: 70px 32px;
    text-align: center;
    overflow: hidden;
    background: radial-gradient(800px 400px at 50% 0%, rgba(255,107,53,.28), transparent 65%), radial-gradient(600px 400px at 100% 100%, rgba(91,141,255,.22), transparent 60%), linear-gradient(180deg, #16181f 0%, #0d0f14 100%);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
}

    .cta-band h2 {
        margin-bottom: 14px;
    }

    .cta-band .lead {
        max-width: 520px;
        margin: 0 auto 30px;
        color: var(--ink-soft);
    }

/* ---------- Footer ---------- */
.site-footer {
    background: #06070a;
    border-top: 1px solid var(--border);
    color: var(--muted);
    padding: 60px 0 30px;
    font-size: 14px;
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 34px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    color: var(--ink);
    margin-bottom: 14px;
}

.footer-brand p {
    margin: 0;
    max-width: 320px;
    color: var(--muted);
    line-height: 1.6;
}

.footer-col h4 {
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 16px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.footer-col a {
    color: var(--muted);
    text-decoration: none;
    transition: color .18s var(--ease);
}

    .footer-col a:hover {
        color: var(--brand-2);
    }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

    .footer-bottom a {
        color: var(--muted);
        text-decoration: none;
        margin-left: 20px;
    }

        .footer-bottom a:hover {
            color: var(--ink);
        }

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}

    .reveal.in {
        opacity: 1;
        transform: translateY(0);
    }


/* =========================================================
   Cull to Target
   ========================================================= */

.cull-target {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.cull-target-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

    .cull-target-divider::before,
    .cull-target-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--border);
    }

.cull-target .tool-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
}

.cull-target-input {
    width: 80px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-2);
    background: rgba(255,107,53,.08);
    border: 1px solid rgba(255,107,53,.3);
    border-radius: 8px;
    text-align: center;
    outline: none;
    -webkit-appearance: textfield;
    appearance: textfield;
}

    .cull-target-input::-webkit-outer-spin-button,
    .cull-target-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .cull-target-input:focus {
        border-color: var(--brand);
        background: rgba(255,107,53,.14);
        box-shadow: 0 0 0 3px rgba(255,107,53,.18);
    }

.cull-target-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,179,71,.1);
    border-color: rgba(255,179,71,.35);
    color: var(--brand-2);
    font-weight: 700;
}

    .cull-target-btn:hover {
        background: rgba(255,179,71,.2);
        border-color: rgba(255,179,71,.55);
    }

    .cull-target-btn svg {
        width: 14px;
        height: 14px;
    }


/* =========================================================
   Compare Grid — side-by-side comparison of 2-6 photos
   ========================================================= */

.cmp {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 20px;
}

    .cmp[hidden] {
        display: none;
    }

.cmp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5,6,10,.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: zoom-out;
}

.cmp-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    max-height: 92vh;
    background: #12141a;
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cmpIn .22s var(--ease);
}

@keyframes cmpIn {
    from {
        opacity: 0;
        transform: scale(.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cmp-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

    .cmp-head h2 {
        font-size: 18px;
        font-weight: 700;
        margin: 0 0 4px;
        color: var(--ink);
    }

.cmp-sub {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}

.cmp-close {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .15s var(--ease);
}

    .cmp-close:hover {
        background: rgba(255,107,53,.9);
        color: #1a0c05;
        border-color: transparent;
    }

    .cmp-close:focus-visible {
        outline: 2px solid var(--brand-2);
        outline-offset: 2px;
    }

/* -------- Grid -------- */
.cmp-grid {
    --cmp-cols: 2;
    display: grid;
    grid-template-columns: repeat(var(--cmp-cols), minmax(0, 1fr));
    gap: 14px;
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    background: #0a0b0f;
}

/* -------- Tile -------- */
.cmp-tile {
    display: flex;
    flex-direction: column;
    background: #16181f;
    border: 2px solid transparent;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

    .cmp-tile.is-winner {
        border-color: var(--brand);
        box-shadow: 0 0 0 4px rgba(255,107,53,.22);
    }

.cmp-tile-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #1a1d24;
    overflow: hidden;
}

    .cmp-tile-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
    }

.cmp-tile-score {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(10,11,15,.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}

.cmp-tile-meta {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.cmp-tile-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmp-tile-rec {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
}

    .cmp-tile-rec.keep {
        background: rgba(74,222,128,.12);
        border-color: rgba(74,222,128,.35);
        color: #a7f3c6;
    }

    .cmp-tile-rec.review {
        background: rgba(255,179,71,.12);
        border-color: rgba(255,179,71,.35);
        color: #ffe4b8;
    }

    .cmp-tile-rec.discard {
        background: rgba(255,107,107,.12);
        border-color: rgba(255,107,107,.35);
        color: #ffc4b8;
    }

    .cmp-tile-rec.duplicate {
        background: rgba(139,92,246,.12);
        border-color: rgba(139,92,246,.35);
        color: #ddd1ff;
    }

.cmp-tile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
}

/* -------- Footer -------- */
.cmp-foot {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* -------- Mobile -------- */
@media (max-width: 780px) {
    .cmp-grid {
        --cmp-cols: 1 !important;
    }

    .cmp-panel {
        max-height: 94vh;
    }
}
/* =========================================================
   Auth pages — Signup, Login, Verify
   ========================================================= */

.auth-page {
    padding: 0;
}

.auth-section {
    padding: 60px 0 90px;
    position: relative;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}

.auth-aside {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

.auth-aside-title {
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -.025em;
    font-weight: 800;
    margin: 0 0 18px;
}

.auth-aside-lead {
    margin: 0 0 32px;
}

.auth-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 36px;
    display: grid;
    gap: 18px;
}

    .auth-benefits li {
        display: flex;
        gap: 14px;
        align-items: flex-start;
    }

    .auth-benefits svg {
        width: 20px;
        height: 20px;
        color: var(--success);
        flex-shrink: 0;
        margin-top: 3px;
    }

    .auth-benefits strong {
        display: block;
        font-size: 15px;
        color: var(--ink);
        font-weight: 600;
        margin-bottom: 2px;
    }

    .auth-benefits span {
        display: block;
        font-size: 14px;
        color: var(--muted);
        line-height: 1.5;
    }

.auth-quote {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
}

    .auth-quote blockquote {
        margin: 0 0 16px;
        font-size: 15px;
        color: var(--ink);
        line-height: 1.6;
    }

    .auth-quote .quote-who {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .auth-quote .avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--brand), var(--accent));
        color: #fff;
        display: grid;
        place-items: center;
        font-weight: 700;
        font-size: 14px;
        flex-shrink: 0;
        border: 1px solid rgba(255,255,255,.12);
    }

    .auth-quote strong {
        display: block;
        font-size: 14px;
        color: var(--ink);
    }

    .auth-quote span {
        display: block;
        font-size: 12.5px;
        color: var(--muted);
    }

.auth-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

    .auth-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255,107,53,.4), transparent);
    }

.auth-card-head {
    margin-bottom: 26px;
}

    .auth-card-head h2 {
        font-size: 26px;
        font-weight: 800;
        letter-spacing: -.02em;
        margin: 0 0 6px;
    }

.auth-card-sub {
    font-size: 14.5px;
    color: var(--muted);
    margin: 0;
}

    .auth-card-sub a {
        color: var(--brand-2);
        text-decoration: none;
        font-weight: 600;
    }

        .auth-card-sub a:hover {
            text-decoration: underline;
        }

/* ---------- Form fields ---------- */
.form-row {
    margin-bottom: 18px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: .005em;
}

    .form-label .req {
        color: var(--brand);
    }

.form-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

    .form-label-row .form-label {
        margin-bottom: 0;
    }

.form-label-link {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color .18s var(--ease);
    white-space: nowrap;
}

    .form-label-link:hover {
        color: var(--brand-2);
    }

    .form-label-link:focus-visible {
        outline: 2px solid var(--brand-2);
        outline-offset: 2px;
        border-radius: 4px;
    }

.form-input {
    display: block;
    width: 100%;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border-strong);
    color: var(--ink);
    font-family: inherit;
    font-size: 15px;
    padding: 13px 15px;
    border-radius: 12px;
    outline: none;
    transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

    .form-input::placeholder {
        color: var(--muted);
        opacity: .8;
    }

    .form-input:hover {
        border-color: rgba(255,255,255,.22);
    }

    .form-input:focus {
        border-color: var(--brand);
        background: rgba(255,107,53,.05);
        box-shadow: 0 0 0 3px rgba(255,107,53,.18);
    }

.form-input-inline {
    max-width: 140px;
}

.form-hint {
    font-size: 12.5px;
    color: var(--muted);
    margin: 8px 0 0;
    line-height: 1.5;
}

.form-error {
    display: block;
    font-size: 12.5px;
    color: #ff9b8a;
    margin-top: 6px;
    font-weight: 500;
}

/* ---------- Password field ---------- */
.pw-wrap {
    position: relative;
}

    .pw-wrap .form-input {
        padding-right: 46px;
    }

.pw-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

    .pw-toggle svg {
        width: 18px;
        height: 18px;
    }

    .pw-toggle:hover {
        color: var(--ink);
        background: rgba(255,255,255,.05);
    }

    .pw-toggle:focus-visible {
        outline: 2px solid var(--brand-2);
        outline-offset: 2px;
    }

.pw-meter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 600;
}

.pw-meter-bar {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,.06);
    border-radius: 999px;
    overflow: hidden;
}

    .pw-meter-bar span {
        display: block;
        height: 100%;
        width: 8%;
        background: #ff6b6b;
        border-radius: 999px;
        transition: width .3s var(--ease), background .3s var(--ease);
    }

.pw-meter[data-level="1"] .pw-meter-bar span {
    background: #ff6b6b;
}

.pw-meter[data-level="2"] .pw-meter-bar span {
    background: #ffb347;
}

.pw-meter[data-level="3"] .pw-meter-bar span {
    background: #6ee7b7;
}

.pw-meter[data-level="4"] .pw-meter-bar span {
    background: #4ade80;
}

/* ---------- Checkboxes ---------- */
.form-check-row {
    margin-bottom: 14px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.55;
    cursor: pointer;
    user-select: none;
}

    .form-check input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        width: 20px;
        height: 20px;
        border: 1.5px solid var(--border-strong);
        border-radius: 6px;
        background: rgba(255,255,255,.04);
        flex-shrink: 0;
        margin: 2px 0 0;
        cursor: pointer;
        position: relative;
        transition: border-color .18s var(--ease), background .18s var(--ease);
    }

        .form-check input[type="checkbox"]:hover {
            border-color: rgba(255,255,255,.25);
        }

        .form-check input[type="checkbox"]:checked {
            background: linear-gradient(135deg, var(--brand), var(--brand-2));
            border-color: transparent;
        }

            .form-check input[type="checkbox"]:checked::after {
                content: "";
                position: absolute;
                left: 5px;
                top: 1px;
                width: 6px;
                height: 11px;
                border: solid #1a0c05;
                border-width: 0 2.2px 2.2px 0;
                transform: rotate(45deg);
            }

        .form-check input[type="checkbox"]:focus-visible {
            outline: 2px solid var(--brand-2);
            outline-offset: 2px;
        }

    .form-check a {
        color: var(--brand-2);
        text-decoration: none;
        font-weight: 500;
    }

        .form-check a:hover {
            text-decoration: underline;
        }

/* ---------- Actions ---------- */
.form-actions {
    margin-top: 24px;
}

.form-legal {
    font-size: 12.5px;
    color: var(--muted);
    margin: 18px 0 0;
    line-height: 1.55;
    text-align: center;
}

    .form-legal a {
        color: var(--ink-soft);
        text-decoration: underline;
    }

        .form-legal a:hover {
            color: var(--brand-2);
        }

/* ---------- Alerts ---------- */
.form-alert {
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

    .form-alert ul {
        margin: 6px 0 0;
        padding-left: 20px;
    }

.form-alert-error {
    background: rgba(255,107,107,.1);
    border-color: rgba(255,107,107,.35);
    color: #ffb3a6;
}

.form-alert-success {
    background: rgba(74,222,128,.1);
    border-color: rgba(74,222,128,.35);
    color: #a7f3c6;
}

/* ---------- Honeypot ---------- */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ---------- Verification panel ---------- */
.verify-block {
    text-align: center;
    padding: 8px 0;
}

.verify-icon {
    width: 62px;
    height: 62px;
    margin: 4px auto 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(74,222,128,.2), rgba(74,222,128,.08));
    border: 1px solid rgba(74,222,128,.35);
    color: var(--success);
}

    .verify-icon svg {
        width: 26px;
        height: 26px;
    }

.verify-block h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.verify-block p {
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.6;
    margin: 0 0 12px;
}

.verify-block strong {
    color: var(--brand-2);
}

.verify-hint {
    font-size: 13.5px !important;
    color: var(--muted) !important;
}

.link-inline {
    background: none;
    border: none;
    padding: 0;
    color: var(--brand-2);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

    .link-inline:hover {
        color: var(--brand);
    }

/* ---------- Trust strip ---------- */
.auth-trust {
    list-style: none;
    padding: 0;
    margin: 40px auto 0;
    max-width: 460px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px 20px;
    font-size: 13.5px;
    color: var(--muted);
}

    .auth-trust li {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .auth-trust svg {
        width: 16px;
        height: 16px;
        color: var(--success);
        flex-shrink: 0;
    }

/* =========================================================
   App shell (Dashboard and logged-in pages)
   ========================================================= */

.app {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "topbar"
        "main";
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.app-sidebar {
    grid-area: sidebar; /* ← ADD THIS */
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: #0d0f14;
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform .28s var(--ease);
    z-index: 200;
    overflow-y: auto;
}

.app.is-nav-open .app-sidebar {
    transform: translateX(0);
}

.app-sidebar-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 20px 14px;
    gap: 24px;
}

.app-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -.02em;
    color: var(--ink);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 10px;
}

    .app-sidebar-logo .logo-mark {
        width: 30px;
        height: 30px;
        border-radius: 9px;
        background: linear-gradient(135deg, var(--brand), var(--brand-2));
        display: grid;
        place-items: center;
        color: #fff;
        box-shadow: var(--glow-brand);
        flex-shrink: 0;
    }

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-nav-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 12px 12px 6px;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    transition: background .15s var(--ease), color .15s var(--ease);
}

    .app-nav-link svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        opacity: .85;
    }

    .app-nav-link:hover {
        color: var(--ink);
        background: rgba(255,255,255,.05);
    }

    .app-nav-link.is-active {
        color: var(--ink);
        background: rgba(255,107,53,.14);
        position: relative;
    }

        .app-nav-link.is-active::before {
            content: "";
            position: absolute;
            left: -14px;
            top: 8px;
            bottom: 8px;
            width: 3px;
            background: linear-gradient(180deg, var(--brand), var(--brand-2));
            border-radius: 0 3px 3px 0;
        }

.app-sidebar-foot {
    margin-top: auto;
}

.usage-card {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
}

.usage-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 10px;
}

    .usage-head strong {
        color: var(--ink);
        font-size: 13.5px;
    }

.usage-bar {
    height: 6px;
    background: rgba(255,255,255,.06);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}

    .usage-bar span {
        display: block;
        height: 100%;
        background: linear-gradient(90deg, var(--brand), var(--brand-2));
        border-radius: 999px;
        transition: width .3s var(--ease);
    }

.usage-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-2);
    text-decoration: none;
}

    .usage-link:hover {
        color: var(--brand);
    }

/* ---------- Top bar ---------- */
.app-topbar {
    grid-area: topbar;
    background: rgba(10,11,15,.85);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.app-topbar-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    min-height: 68px;
}

.app-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: rgba(255,255,255,.04);
    color: var(--ink);
    cursor: pointer;
    padding: 0;
}

    .app-menu-toggle svg {
        width: 20px;
        height: 20px;
    }

    .app-menu-toggle:focus-visible {
        outline: 2px solid var(--brand-2);
        outline-offset: 2px;
    }

.app-topbar-title {
    flex: 1;
    min-width: 0;
}

    .app-topbar-title h1 {
        font-size: 17px;
        font-weight: 700;
        letter-spacing: -.015em;
        margin: 0 0 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-topbar-title p {
        font-size: 12.5px;
        color: var(--muted);
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.app-user {
    position: relative;
}

.app-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--ink);
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
}

    .app-user-btn:hover {
        background: rgba(255,255,255,.07);
    }

.app-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.app-user-name {
    display: none;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #12141a;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 6px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

    .app-user-menu a,
    .app-user-menu button {
        display: block;
        width: 100%;
        text-align: left;
        padding: 10px 12px;
        font-size: 14px;
        color: var(--ink-soft);
        text-decoration: none;
        border-radius: 8px;
        background: none;
        border: 0;
        font-family: inherit;
        cursor: pointer;
    }

        .app-user-menu a:hover,
        .app-user-menu button:hover {
            background: rgba(255,255,255,.05);
            color: var(--ink);
        }

.app-user-menu-danger {
    color: #ff9b8a !important;
}

.app-user-menu-sep {
    height: 1px;
    background: var(--border);
    margin: 6px 4px;
}


/* =========================================================
   Review page — filter bar + select-all helper
   ========================================================= */

.filter-bar-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.chip-count {
    color: var(--muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    margin-left: 2px;
}

.chip.is-active .chip-count {
    color: var(--brand-2);
    opacity: .85;
}

.filter-bar-tools {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-helper {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255,107,53,.08);
    border: 1px solid rgba(255,107,53,.3);
    color: var(--brand-2);
    cursor: pointer;
    transition: background .15s var(--ease), border-color .15s var(--ease);
    white-space: nowrap;
}

    .filter-helper:hover {
        background: rgba(255,107,53,.16);
        border-color: rgba(255,107,53,.5);
    }

    .filter-helper:focus-visible {
        outline: 2px solid var(--brand-2);
        outline-offset: 2px;
    }

    .filter-helper svg {
        flex-shrink: 0;
    }

/* ---------- Small toast for selection feedback ---------- */
.select-feedback {
    position: fixed;
    left: 50%;
    bottom: 96px; /* sits just above the selection bar */
    transform: translateX(-50%) translateY(10px);
    background: #12141a;
    border: 1px solid var(--border-strong);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
    z-index: 950;
    white-space: nowrap;
}

    .select-feedback.is-visible {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

/* Push the feedback toast up a bit more when the select bar is visible */
.select-bar:not([hidden]) ~ .select-feedback,
body:has(.select-bar:not([hidden])) .select-feedback {
    bottom: 110px;
}

@media (max-width: 640px) {
    .filter-bar-tools {
        width: 100%;
    }

    .filter-helper {
        width: 100%;
        justify-content: center;
    }
}

/* ---------- Main content ---------- */
.app-main {
    grid-area: main;
    min-width: 0;
}

.app-content {
    padding: 24px 20px 60px;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ---------- App stats ---------- */
.app-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.app-stat {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-stat-label {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.app-stat-value {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(26px, 3.5vw, 34px);
    line-height: 1;
    letter-spacing: -.02em;
    background: linear-gradient(135deg, #fff, var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.app-stat-sub {
    font-size: 12.5px;
    color: var(--muted);
}

/* ---------- Panels ---------- */
.app-panel {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

    .app-panel::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255,107,53,.25), transparent);
    }

.app-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

    .app-panel-head h2 {
        font-size: 18px;
        font-weight: 700;
        letter-spacing: -.015em;
        margin: 0 0 4px;
    }

    .app-panel-head p {
        font-size: 13.5px;
        color: var(--muted);
        margin: 0;
    }

.app-panel-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-2);
    text-decoration: none;
    white-space: nowrap;
}

    .app-panel-link:hover {
        color: var(--brand);
    }

/* ---------- Dropzone ---------- */
.dropzone {
    position: relative;
    border: 1.5px dashed var(--border-strong);
    border-radius: 16px;
    background: rgba(255,255,255,.02);
    padding: 40px 24px;
    text-align: center;
    transition: border-color .2s var(--ease), background .2s var(--ease);
    cursor: pointer;
}

    .dropzone:hover {
        border-color: rgba(255,255,255,.25);
    }

    .dropzone:focus-visible {
        outline: 2px solid var(--brand-2);
        outline-offset: 4px;
    }

    .dropzone.is-dragover {
        border-color: var(--brand);
        background: rgba(255,107,53,.06);
    }

.dropzone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.dropzone-inner {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

    .dropzone-inner .btn,
    .dropzone-inner label.btn {
        pointer-events: auto;
    }

.dropzone-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(255,107,53,.18), rgba(91,141,255,.12));
    border: 1px solid rgba(255,255,255,.08);
    color: var(--brand-2);
}

    .dropzone-icon svg {
        width: 28px;
        height: 28px;
    }

.dropzone h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.dropzone p {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0 0 20px;
}

.dropzone-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.dropzone-or {
    font-size: 13px;
    color: var(--muted);
}

/* ---------- File list ---------- */
.file-list {
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255,255,255,.02);
    overflow: hidden;
}

.file-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--ink-soft);
}

    .file-list-head strong {
        color: var(--ink);
    }

.file-list-clear {
    background: none;
    border: 0;
    padding: 0;
    color: var(--brand-2);
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

    .file-list-clear:hover {
        color: var(--brand);
        text-decoration: underline;
    }

#fileListUl {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 240px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 16px;
    font-size: 13px;
    border-top: 1px solid var(--border);
}

    .file-item:first-child {
        border-top: 0;
    }

.file-name {
    color: var(--ink-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.file-size {
    color: var(--muted);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.file-item-more {
    justify-content: center;
    color: var(--muted);
    font-style: italic;
}

/* ---------- Upload options ---------- */
.upload-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

/* ---------- Empty state ---------- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    color: var(--muted);
}

    .empty-icon svg {
        width: 30px;
        height: 30px;
    }

.empty-state h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0;
}

/* ---------- Activity list ---------- */
.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

    .activity-item:first-child {
        border-top: 0;
    }

.activity-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255,107,53,.18), rgba(91,141,255,.12)), #1a1d24;
    flex-shrink: 0;
}

.activity-body {
    flex: 1;
    min-width: 0;
}

    .activity-body strong {
        display: block;
        font-size: 14.5px;
        font-weight: 600;
        color: var(--ink);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .activity-body span {
        display: block;
        font-size: 12.5px;
        color: var(--muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.activity-actions .btn {
    padding: 7px 14px;
    font-size: 13px;
}

/* ---------- Mobile overlay ---------- */
.app-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s var(--ease);
    z-index: 150;
}

.app.is-nav-open .app-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* =========================================================
   Legal pages — Privacy, Terms, Cookies
   ========================================================= */

.legal-page {
    padding: 0;
}

.legal-section {
    padding: 60px 0 100px;
    position: relative;
}

.legal-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.legal-head {
    margin-bottom: 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

    .legal-head .eyebrow {
        margin-bottom: 14px;
    }

    .legal-head h1 {
        font-size: clamp(30px, 4.5vw, 46px);
        line-height: 1.1;
        letter-spacing: -.03em;
        font-weight: 800;
        margin: 0 0 14px;
    }

    .legal-head p {
        font-size: 15px;
        color: var(--muted);
        margin: 0;
    }

    .legal-head .legal-updated {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: var(--muted);
        padding: 6px 12px;
        background: rgba(255,255,255,.03);
        border: 1px solid var(--border);
        border-radius: 999px;
        margin-top: 16px;
    }

        .legal-head .legal-updated svg {
            width: 14px;
            height: 14px;
            color: var(--brand-2);
        }

.legal-toc {
    background: rgba(255,255,255,.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 40px;
}

    .legal-toc h2 {
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: var(--muted);
        margin: 0 0 14px;
    }

    .legal-toc ol {
        list-style: none;
        counter-reset: legal-toc;
        padding: 0;
        margin: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

        .legal-toc ol li {
            counter-increment: legal-toc;
        }

            .legal-toc ol li a {
                display: flex;
                gap: 12px;
                align-items: baseline;
                font-size: 14px;
                color: var(--ink-soft);
                text-decoration: none;
                padding: 4px 0;
                transition: color .15s var(--ease);
            }

                .legal-toc ol li a::before {
                    content: counter(legal-toc, decimal-leading-zero);
                    font-family: var(--font-display);
                    font-weight: 600;
                    font-size: 12px;
                    color: var(--brand-2);
                    letter-spacing: 0;
                    flex-shrink: 0;
                    min-width: 22px;
                }

                .legal-toc ol li a:hover {
                    color: var(--ink);
                }

.legal-body {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--ink-soft);
}

    .legal-body > * + * {
        margin-top: 18px;
    }

    .legal-body h2 {
        font-size: 22px;
        font-weight: 700;
        letter-spacing: -.02em;
        color: var(--ink);
        margin: 56px 0 16px;
        scroll-margin-top: 90px;
    }

        .legal-body h2:first-child {
            margin-top: 0;
        }

    .legal-body h3 {
        font-size: 16.5px;
        font-weight: 700;
        color: var(--ink);
        margin: 28px 0 10px;
        letter-spacing: -.01em;
    }

    .legal-body p {
        margin: 0;
    }

        .legal-body p + p {
            margin-top: 14px;
        }

    .legal-body a {
        color: var(--brand-2);
        text-decoration: underline;
        text-decoration-color: rgba(255,179,71,.4);
        text-underline-offset: 3px;
        transition: color .15s var(--ease), text-decoration-color .15s var(--ease);
    }

        .legal-body a:hover {
            color: var(--brand);
            text-decoration-color: var(--brand);
        }

    .legal-body ul,
    .legal-body ol {
        padding-left: 22px;
        margin: 0;
    }

        .legal-body ul li,
        .legal-body ol li {
            margin: 6px 0;
        }

    .legal-body strong {
        color: var(--ink);
        font-weight: 600;
    }

    .legal-body em {
        color: var(--ink);
        font-style: italic;
    }

    .legal-body hr {
        border: 0;
        border-top: 1px solid var(--border);
        margin: 40px 0;
    }

.legal-callout {
    background: rgba(255,107,53,.06);
    border: 1px solid rgba(255,107,53,.28);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-soft);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

    .legal-callout svg {
        width: 18px;
        height: 18px;
        color: var(--brand-2);
        flex-shrink: 0;
        margin-top: 3px;
    }

    .legal-callout strong {
        color: var(--ink);
    }

.legal-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 8px;
}

    .legal-body table th,
    .legal-body table td {
        text-align: left;
        padding: 12px 14px;
        border-bottom: 1px solid var(--border);
        vertical-align: top;
        line-height: 1.55;
    }

    .legal-body table th {
        font-weight: 600;
        color: var(--ink);
        background: rgba(255,255,255,.03);
        font-size: 12.5px;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .legal-body table td {
        color: var(--ink-soft);
    }

    .legal-body table tr:last-child td {
        border-bottom: 0;
    }

.legal-foot {
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    color: var(--muted);
}

    .legal-foot a {
        color: var(--brand-2);
        text-decoration: none;
        font-weight: 500;
    }

        .legal-foot a:hover {
            color: var(--brand);
        }

/* =========================================================
   Darkroom / Studio (editing workspace)
   ========================================================= */

.darkroom-page,
.studio-page {
    padding: 0;
}

/* ---------- Workflow bar ---------- */
.darkroom-bar,
.studio-bar {
    background: rgba(10,11,15,.72);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: var(--header-h);
    z-index: 40;
}

.darkroom-bar-inner,
.studio-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.darkroom-steps,
.studio-steps {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.darkroom-step,
.studio-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}

    .darkroom-step:hover,
    .studio-step:hover {
        color: var(--ink);
        background: rgba(255,255,255,.05);
    }

    .darkroom-step.is-active,
    .studio-step.is-active {
        color: var(--ink);
        background: rgba(255,107,53,.14);
        border-color: rgba(255,107,53,.35);
    }

.darkroom-bar-actions,
.studio-bar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================================================
   Burst view — collapsed tiles, badges, headers
   ========================================================= */

/* The ×N badge in the top-right of the thumbnail (next to the score) */
.burst-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,107,53,.9);
    border: 1px solid rgba(255,255,255,.2);
    color: #1a0c05;
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
    box-shadow: 0 4px 12px rgba(255,107,53,.4);
}

/* The "Show all N" toggle button below the thumbnail */
.burst-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    margin-top: 4px;
    border-radius: 999px;
    background: rgba(255,107,53,.1);
    border: 1px solid rgba(255,107,53,.3);
    color: var(--brand-2);
    cursor: pointer;
    transition: background .15s var(--ease), border-color .15s var(--ease);
    align-self: flex-start;
}

    .burst-toggle:hover {
        background: rgba(255,107,53,.2);
        border-color: rgba(255,107,53,.5);
    }

    .burst-toggle:focus-visible {
        outline: 2px solid var(--brand-2);
        outline-offset: 2px;
    }

/* Group header above each collapsed burst */
.burst-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 4px 8px;
    margin-top: 4px;
    border-bottom: 1px solid var(--border);
}

    .burst-header:first-of-type {
        margin-top: 0;
    }

.burst-header-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 0 0 4px rgba(255,107,53,.15);
    flex-shrink: 0;
}

.burst-header-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand-2);
}

/* The "Pick best of each burst" helper button */
.filter-helper-burst {
    background: rgba(255,179,71,.1);
    border-color: rgba(255,179,71,.35);
    color: var(--brand-2);
}

    .filter-helper-burst:hover {
        background: rgba(255,179,71,.2);
        border-color: rgba(255,179,71,.55);
    }

/* When a burst is expanded, highlight all its members with a subtle
   visual treatment so the user can see which photos belong together. */
.result-card.burst-expanded {
    border-color: rgba(255,107,53,.35);
}

.result-card.burst-lead {
    border-color: rgba(255,107,53,.5);
}

    .result-card.burst-lead::after {
        content: "";
        position: absolute;
        inset: -1px;
        border-radius: inherit;
        pointer-events: none;
        box-shadow: inset 0 0 0 1px rgba(255,107,53,.25);
    }

/* ---------- Content wrapper ---------- */
.darkroom-content,
.studio-content {
    padding-top: 32px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1400px;
}

/* ---------- Intro ---------- */
.darkroom-intro,
.studio-intro {
    max-width: 640px;
}

    .darkroom-intro h1,
    .studio-intro h1 {
        font-size: clamp(30px, 4.5vw, 44px);
        line-height: 1.1;
        letter-spacing: -.03em;
        font-weight: 800;
        margin: 0 0 14px;
    }

    .darkroom-intro .lead,
    .studio-intro .lead {
        margin: 0;
    }

        .darkroom-intro .lead strong,
        .studio-intro .lead strong {
            color: var(--ink);
            font-weight: 600;
        }

/* ---------- Workspace: two panels ---------- */
.darkroom-workspace,
.studio-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: stretch;
}

.darkroom-panel,
.studio-panel {
    min-height: 240px;
    display: flex;
    flex-direction: column;
}

.darkroom-panel-head,
.studio-panel-head {
    align-items: flex-start;
    flex-shrink: 0;
}

    .darkroom-panel-head h2,
    .studio-panel-head h2 {
        font-size: 17px;
        margin-bottom: 4px;
    }

    .darkroom-panel-head p,
    .studio-panel-head p {
        font-size: 13px;
        color: var(--muted);
        margin: 0;
    }

/* =========================================================
   Photo grid — single source of truth
   Exactly 4 columns on desktop, uniform square tiles.
   Used by Darkroom, Studio, and Upload preview.
   ========================================================= */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    flex: 1;
    align-content: start;
    overflow-y: auto;
    max-height: 620px;
    padding-right: 4px;
    min-width: 0;
}

@media (max-width: 900px) {
    .photo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Photo card — strictly square ---------- */
.photo-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    background: #0d0f14;
    cursor: pointer;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}

    .photo-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .photo-card.selected,
    .photo-card:has(.photo-checkbox:checked) {
        border-color: var(--brand);
        box-shadow: 0 0 0 3px rgba(255,107,53,.18);
    }

/* Image wrapper — fills the square */
.photo-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #1a1d24;
}

    /* Every image cropped to fill, never stretched */
    .photo-card-img img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transition: transform .4s var(--ease);
    }

.photo-card:hover .photo-card-img img {
    transform: scale(1.04);
}

/* Bottom gradient for the filename */
.photo-card-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(10,11,15,.75) 100%);
    pointer-events: none;
}

/* Selection tick */
.photo-card-tick {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand);
    color: #1a0c05;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: scale(.7);
    transition: opacity .15s var(--ease), transform .15s var(--ease);
    z-index: 2;
}

    .photo-card-tick svg {
        width: 12px;
        height: 12px;
    }

.photo-card:has(.photo-checkbox:checked) .photo-card-tick {
    opacity: 1;
    transform: scale(1);
}

/* Invisible checkbox over the tick */
.photo-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
}

/* Filename overlay */
.photo-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    font-size: 11.5px;
    padding: 8px 10px;
    color: #f5f6f8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

/* "+ N more" tile used by Upload preview */
.photo-card-more .photo-card-img {
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.04);
    border: 1px dashed var(--border-strong);
}

.photo-card-more-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

/* ---------- Darkroom tools — header actions wrapper ---------- */
.darkroom-tools-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    /* IMPORTANT: ensures the actions block has its own width in the header */
    flex-shrink: 0;
}

/* ---------- Style picker ---------- */
.style-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    /* IMPORTANT: prevents collapsing to 0 width */
    min-width: 260px;
}

    /* The hidden attribute still wins when present */
    .style-picker[hidden] {
        display: none !important;
    }

.style-picker-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    margin: 0;
}

.style-picker .form-input,
.style-picker select {
    display: block;
    width: 100%;
    min-width: 180px;
    padding: 8px 12px;
    font-size: 13px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border-strong);
    color: var(--ink);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    /* Ensure the native arrow is visible */
    -webkit-appearance: menulist;
    appearance: menulist;
}

    .style-picker select:hover {
        border-color: rgba(255,255,255,.22);
        background: rgba(255,255,255,.06);
    }

    .style-picker select:focus {
        border-color: var(--brand);
        box-shadow: 0 0 0 3px rgba(255,107,53,.18);
    }

/* =========================================================
   Editing tools (used by Darkroom and Studio)
   ========================================================= */

.darkroom-tools,
.studio-tools {
    padding: 28px;
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 8px;
}

.tool-column-title {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brand-2);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.tool-group {
    margin-bottom: 20px;
}

    .tool-group:last-child {
        margin-bottom: 0;
    }

.tool-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

.tool-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .tool-input-row input[type="range"] {
        flex: 1;
        -webkit-appearance: none;
        appearance: none;
        height: 5px;
        background: rgba(255,255,255,.08);
        border-radius: 999px;
        outline: none;
        cursor: pointer;
    }

        .tool-input-row input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--brand), var(--brand-2));
            cursor: pointer;
            border: 2px solid #1a0c05;
            box-shadow: 0 2px 8px rgba(255,107,53,.4);
            transition: transform .12s var(--ease);
        }

            .tool-input-row input[type="range"]::-webkit-slider-thumb:hover {
                transform: scale(1.15);
            }

        .tool-input-row input[type="range"]::-moz-range-thumb {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--brand), var(--brand-2));
            cursor: pointer;
            border: 2px solid #1a0c05;
            box-shadow: 0 2px 8px rgba(255,107,53,.4);
        }

        .tool-input-row input[type="range"]:focus-visible {
            outline: 2px solid var(--brand-2);
            outline-offset: 4px;
        }

.value-display {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--brand-2);
    background: rgba(255,107,53,.1);
    border: 1px solid rgba(255,107,53,.25);
    padding: 4px 9px;
    border-radius: 6px;
    min-width: 42px;
    text-align: center;
}

/* ---------- Tooltip ---------- */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid var(--border-strong);
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 700;
    cursor: help;
    position: relative;
    flex-shrink: 0;
}

    .tooltip-icon:hover {
        background: var(--brand);
        color: #1a0c05;
        border-color: transparent;
    }

    .tooltip-icon::after {
        content: attr(title);
        position: absolute;
        bottom: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        background: #1a1d24;
        border: 1px solid var(--border-strong);
        color: var(--ink);
        padding: 10px 13px;
        border-radius: 10px;
        font-size: 12.5px;
        font-weight: 400;
        line-height: 1.5;
        width: 240px;
        text-align: left;
        opacity: 0;
        pointer-events: none;
        transition: opacity .15s var(--ease);
        z-index: 1000;
        box-shadow: var(--shadow-lg);
    }

    .tooltip-icon:hover::after {
        opacity: 1;
    }

.tool-check {
    margin-bottom: 12px;
}

    .tool-check:last-child {
        margin-bottom: 0;
    }

    .tool-check .tooltip-icon {
        margin-left: 6px;
    }

.darkroom-actions,
.studio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.darkroom-tips,
.studio-tips {
    background: radial-gradient(500px 200px at 0% 0%, rgba(91,141,255,.1), transparent 70%), rgba(255,255,255,.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 24px;
}

.darkroom-tips-head,
.studio-tips-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--brand-2);
    margin-bottom: 12px;
    font-weight: 600;
}

.darkroom-tips ul,
.studio-tips ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-soft);
}

.darkroom-tips li + li,
.studio-tips li + li {
    margin-top: 4px;
}

.darkroom-tips strong,
.studio-tips strong {
    color: var(--ink);
}

/* =========================================================
   Upload page
   ========================================================= */

.upload-page {
    padding: 0;
}

.upload-content {
    padding-top: 32px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 760px;
}

.upload-intro {
    text-align: left;
}

    .upload-intro h1 {
        font-size: clamp(30px, 4.5vw, 44px);
        line-height: 1.1;
        letter-spacing: -.03em;
        font-weight: 800;
        margin: 0 0 14px;
    }

    .upload-intro .lead {
        max-width: 620px;
        margin: 0;
    }

.upload-panel {
    padding: 32px;
}

.upload-actions {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    .upload-actions .btn {
        align-self: flex-start;
    }

.upload-hint {
    font-size: 12.5px;
    color: var(--muted);
    margin: 0;
    line-height: 1.55;
}

.upload-next {
    background: rgba(255,255,255,.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 26px 28px;
}

    .upload-next h2 {
        font-size: 13px;
        font-weight: 700;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: var(--brand-2);
        margin: 0 0 18px;
    }

.upload-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 18px;
}

    .upload-steps li {
        display: flex;
        gap: 16px;
        align-items: flex-start;
    }

.upload-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,107,53,.14);
    border: 1px solid rgba(255,107,53,.35);
    color: var(--brand-2);
    font-size: 13px;
    font-weight: 700;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.upload-steps strong {
    display: block;
    font-size: 14.5px;
    color: var(--ink);
    font-weight: 600;
    margin-bottom: 2px;
}

.upload-steps span {
    display: block;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.55;
}

/* ---------- Upload preview grid ---------- */
.upload-preview {
    margin-top: 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,.02);
    overflow: hidden;
}

.upload-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--ink-soft);
}

    .upload-preview-head strong {
        color: var(--ink);
    }

.upload-preview .photo-grid {
    padding: 16px;
    max-height: 520px;
}

.upload-preview .photo-card {
    border-color: rgba(255,255,255,.06);
}

    .upload-preview .photo-card:hover {
        border-color: var(--border-strong);
    }

.upload-preview .photo-name {
    font-size: 11px;
    opacity: .85;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (min-width: 640px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .price-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quote-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .showcase {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .header-actions .btn-login {
        display: inline-flex;
    }

    .auth-trust {
        grid-template-columns: 1fr 1fr;
        justify-items: start;
    }

    .app-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .app-user-name {
        display: inline;
    }
}

@media (min-width: 720px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 40px;
    }

    .legal-toc ol {
        grid-template-columns: 1fr 1fr;
        gap: 8px 32px;
    }

    .upload-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .upload-hint {
        max-width: 320px;
        text-align: right;
    }
}

@media (min-width: 900px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .price-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .quote-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .showcase {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .nav-desktop {
        display: flex;
    }

    .hamburger {
        display: none;
    }

    .nav-mobile {
        display: none !important;
    }

    .hero {
        padding: 110px 0 90px;
    }

    .hero-grid {
        grid-template-columns: 1.05fr 1fr;
        gap: 70px;
    }

    section {
        padding: 110px 0;
    }

    .auth-section {
        padding: 90px 0 120px;
    }

    .auth-grid {
        grid-template-columns: 1fr 1fr;
        gap: 70px;
        align-items: center;
    }

    .auth-aside {
        margin: 0;
    }

    .auth-card {
        padding: 40px;
    }

    .legal-section {
        padding: 80px 0 120px;
    }

    .legal-head {
        margin-bottom: 56px;
    }

    .darkroom-workspace,
    .studio-workspace {
        grid-template-columns: 1fr 1fr;
    }

    .upload-content {
        padding-top: 48px;
    }

    .upload-panel {
        padding: 40px;
    }

    .app {
        grid-template-columns: 260px 1fr;
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "sidebar topbar"
            "sidebar main";
    }

    .app-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        transform: none;
    }

    .app-menu-toggle {
        display: none;
    }

    .app-overlay {
        display: none;
    }

    .app-content {
        padding: 32px 32px 80px;
    }

    .app-topbar-inner {
        padding: 12px 32px;
    }
}

@media (min-width: 1024px) {
    :root {
        --header-h: 78px;
    }

    .tool-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 32px;
    }
}

@media (min-width: 1100px) {
    .auth-grid {
        grid-template-columns: 1fr 1.05fr;
        gap: 80px;
    }
}

/* =========================================================
   Review / Results pages
   ========================================================= */

.results-page {
    padding: 0;
}

.results-content {
    padding-top: 32px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1400px;
}

/* ---------- Intro ---------- */
.results-intro {
    max-width: 640px;
}

    .results-intro h1 {
        font-size: clamp(30px, 4.5vw, 44px);
        line-height: 1.1;
        letter-spacing: -.03em;
        font-weight: 800;
        margin: 0 0 14px;
    }

    .results-intro .lead {
        margin: 0;
    }

/* ---------- Summary bar ---------- */
.results-summary {
    background: radial-gradient(600px 200px at 0% 0%, rgba(255,107,53,.08), transparent 70%), rgba(255,255,255,.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 26px;
}

.results-summary-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.results-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,.02);
    border: 1px solid var(--border);
}

.results-summary-value {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 28px;
    line-height: 1;
    letter-spacing: -.02em;
    color: var(--ink);
}

.results-summary-label {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.results-summary-keep .results-summary-value {
    color: #4ade80;
}

.results-summary-review .results-summary-value {
    color: #ffb347;
}

.results-summary-discard .results-summary-value {
    color: #ff9b8a;
}

.results-summary-meta {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--muted);
}

/* ---------- Analytics: thresholds + histogram ---------- */
.results-analytics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.results-tool {
    padding: 26px;
}

.threshold-row {
    margin-bottom: 18px;
}

    .threshold-row:last-of-type {
        margin-bottom: 22px;
    }

.results-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.histogram-wrap {
    background: rgba(255,255,255,.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    overflow-x: auto;
}

    .histogram-wrap canvas {
        max-width: 100%;
        height: auto;
        display: block;
    }

/* ---------- Toolbar: filters + actions ---------- */
.results-toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border-strong);
    color: var(--ink-soft);
    cursor: pointer;
    transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}

    .chip:hover {
        background: rgba(255,255,255,.08);
        color: var(--ink);
    }

    .chip.is-active {
        background: rgba(255,107,53,.14);
        border-color: rgba(255,107,53,.4);
        color: var(--brand-2);
    }

    .chip:focus-visible {
        outline: 2px solid var(--brand-2);
        outline-offset: 2px;
    }

.results-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.results-clear {
    color: #ff9b8a !important;
}

    .results-clear:hover {
        background: rgba(255,107,107,.1) !important;
        border-color: rgba(255,107,107,.35) !important;
        color: #ffb3a6 !important;
    }

/* =========================================================
   Results grid — exactly 4 per row, uniform tiles
   ========================================================= */

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

@media (max-width: 1100px) {
    .results-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Result card ---------- */
.result-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    min-width: 0;
    cursor: pointer;
    transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}

    .result-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: rgba(255,255,255,.06);
        z-index: 2;
    }

    .result-card.keep::before {
        background: linear-gradient(90deg, #4ade80, #6ee7b7);
    }

    .result-card.review::before {
        background: linear-gradient(90deg, #ffb347, #ffd9b8);
    }

    .result-card.discard::before {
        background: linear-gradient(90deg, #ff6b6b, #ff9b8a);
    }

    .result-card.duplicate::before {
        background: linear-gradient(90deg, #8b5cf6, #c4b5fd);
    }

    .result-card:hover {
        transform: translateY(-3px);
        border-color: var(--border-strong);
        box-shadow: var(--shadow-md);
    }

    .result-card:focus-visible {
        outline: 2px solid var(--brand-2);
        outline-offset: 3px;
        border-color: var(--brand-2);
    }

/* Thumbnail — fixed 4:3 aspect, image always fills it */
.result-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #1a1d24;
}

    .result-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transition: transform .4s var(--ease);
    }

.result-card:hover .result-thumb img {
    transform: scale(1.04);
}

.result-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(10,11,15,.55) 100%);
    pointer-events: none;
}

/* Score badge */
.result-score {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(10,11,15,.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}

.result-card.keep .result-score {
    color: #a7f3c6;
    border-color: rgba(74,222,128,.4);
}

.result-card.review .result-score {
    color: #ffe4b8;
    border-color: rgba(255,179,71,.4);
}

.result-card.discard .result-score {
    color: #ffc4b8;
    border-color: rgba(255,107,107,.4);
}

.result-card.duplicate .result-score {
    color: #ddd1ff;
    border-color: rgba(139,92,246,.4);
}

/* ---------- Score breakdown under the tile ---------- */
.result-meta {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.result-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-tag {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
}

    .result-tag.keep {
        background: rgba(74,222,128,.12);
        border-color: rgba(74,222,128,.35);
        color: #a7f3c6;
    }

    .result-tag.review {
        background: rgba(255,179,71,.12);
        border-color: rgba(255,179,71,.35);
        color: #ffe4b8;
    }

    .result-tag.discard {
        background: rgba(255,107,107,.12);
        border-color: rgba(255,107,107,.35);
        color: #ffc4b8;
    }

    .result-tag.duplicate {
        background: rgba(139,92,246,.12);
        border-color: rgba(139,92,246,.35);
        color: #ddd1ff;
    }

.result-breakdown {
    list-style: none;
    padding: 8px 0 0;
    margin: 0;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 4px;
    font-size: 12px;
}

    .result-breakdown li {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 10px;
        color: var(--muted);
        line-height: 1.5;
    }

        .result-breakdown li span {
            opacity: .9;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
        }

        .result-breakdown li strong {
            color: var(--ink-soft);
            font-weight: 600;
            font-variant-numeric: tabular-nums;
            flex-shrink: 0;
        }

.results-empty-wrap {
    display: block;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
    .results-summary-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 900px) {
    .results-content {
        padding-top: 48px;
    }

    .results-analytics {
        grid-template-columns: 1fr 1.4fr;
    }

    .results-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .results-toolbar-actions {
        flex-shrink: 0;
    }
}


/* =========================================================
   Upload confirmation modal
   ========================================================= */

.upload-confirm {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 20px;
}

.upload-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5,6,10,.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}

.upload-confirm-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    background: #12141a;
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    padding: 32px 28px 26px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: uploadConfirmIn .22s var(--ease);
}

@keyframes uploadConfirmIn {
    from {
        opacity: 0;
        transform: scale(.96) translateY(6px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.upload-confirm-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(255,107,53,.2), rgba(91,141,255,.12));
    border: 1px solid rgba(255,107,53,.35);
    color: var(--brand-2);
}

    .upload-confirm-icon svg {
        width: 26px;
        height: 26px;
    }

.upload-confirm-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.015em;
    margin: 0 0 12px;
    line-height: 1.35;
    color: var(--ink);
}

    .upload-confirm-title strong {
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 26px;
        letter-spacing: -.02em;
        background: linear-gradient(135deg, #fff, var(--brand-2));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        vertical-align: -2px;
    }

.upload-confirm-text {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 24px;
}

.upload-confirm-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

    .upload-confirm-actions .btn {
        width: 100%;
    }

@media (min-width: 560px) {
    .upload-confirm-actions {
        flex-direction: row;
        justify-content: center;
    }

        .upload-confirm-actions .btn {
            width: auto;
        }

        .upload-confirm-actions .btn-primary {
            min-width: 200px;
        }
}

/* ---------- Preview head count chip ---------- */
.upload-preview-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--ink);
    font-weight: 500;
}

    .upload-preview-count svg {
        color: var(--success);
        flex-shrink: 0;
    }

    .upload-preview-count strong {
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 17px;
        letter-spacing: -.02em;
        background: linear-gradient(135deg, #fff, var(--brand-2));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        vertical-align: -1px;
    }
/* =========================================================
   Lightbox — full-size image + score breakdown
   ========================================================= */

.lb {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
}

    .lb[hidden] {
        display: none;
    }

.lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5,6,10,.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: zoom-out;
}

/* =========================================================
   Lightbox — panel and scrollable info column
   ========================================================= */

.lb-panel {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    max-height: 92vh;
    background: #12141a;
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr;
    /* KEY: allow children to be their own scroll areas */
    overflow: hidden;
    animation: lbIn .25s var(--ease);
}

@keyframes lbIn {
    from {
        opacity: 0;
        transform: scale(.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lb-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(10,11,15,.75);
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .15s var(--ease);
}

    .lb-close:hover {
        background: rgba(255,107,53,.9);
        color: #1a0c05;
        border-color: transparent;
    }

    .lb-close:focus-visible {
        outline: 2px solid var(--brand-2);
        outline-offset: 2px;
    }

.lb-media {
    background: #0a0b0f;
    display: grid;
    place-items: center;
    min-height: 240px;
    overflow: hidden;
}

    .lb-media img {
        display: block;
        max-width: 100%;
        max-height: 88vh;
        width: auto;
        height: auto;
        object-fit: contain;
    }

.lb-info {
    padding: 22px 24px 26px;
    /* KEY: the panel becomes a scroll container on its own */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* smooth iOS scrolling */
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-top: 1px solid var(--border);
    /* Important: min-height must be 0 so flex/grid doesn't fight the scroll */
    min-height: 0;
}

    .lb-info h3 {
        font-size: 17px;
        font-weight: 700;
        margin: 0;
        color: var(--ink);
        word-break: break-word;
    }

.lb-recommendation {
    align-self: flex-start;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
}

    .lb-recommendation.keep {
        background: rgba(74,222,128,.12);
        border-color: rgba(74,222,128,.35);
        color: #a7f3c6;
    }

    .lb-recommendation.review {
        background: rgba(255,179,71,.12);
        border-color: rgba(255,179,71,.35);
        color: #ffe4b8;
    }

    .lb-recommendation.discard {
        background: rgba(255,107,107,.12);
        border-color: rgba(255,107,107,.35);
        color: #ffc4b8;
    }

    .lb-recommendation.duplicate {
        background: rgba(139,92,246,.12);
        border-color: rgba(139,92,246,.35);
        color: #ddd1ff;
    }

.lb-breakdown {
    list-style: none;
    padding: 12px 0 0;
    margin: 0;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 8px;
    font-size: 13.5px;
}

    .lb-breakdown li {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 12px;
        color: var(--muted);
    }

        .lb-breakdown li span {
            opacity: .9;
        }

        .lb-breakdown li strong {
            color: var(--ink);
            font-weight: 600;
            font-variant-numeric: tabular-nums;
        }

/* ---------- Desktop: two-column lightbox ---------- */
@media (min-width: 900px) {
    .lb-panel {
        grid-template-columns: 1.6fr 1fr;
        max-height: 88vh;
        /* Each column is now free to scroll independently */
        overflow: hidden;
    }

    .lb-media {
        max-height: 88vh;
        overflow-y: auto; /* let the image column scroll if the image is very tall */
    }

        .lb-media img {
            max-height: calc(88vh - 4px);
        }

    .lb-info {
        border-top: 0;
        border-left: 1px solid var(--border);
        max-height: 88vh; /* hard cap so overflow-y: auto actually kicks in */
    }
}


/* =========================================================
   Review page — selection checkbox on cards
   ========================================================= */

.result-select {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    display: block;
    width: 28px;
    height: 28px;
    cursor: pointer;
    border-radius: 50%;
}

.result-select-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    /* NOTE: no pointer-events: none here — the input must catch the click */
}

.result-select-tick {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(10,11,15,.75);
    border: 1.5px solid rgba(255,255,255,.35);
    display: grid;
    place-items: center;
    color: transparent;
    transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
    pointer-events: none; /* THE KEY LINE — lets the click hit the input underneath */
}

    .result-select-tick svg {
        width: 14px;
        height: 14px;
    }

.result-select:hover .result-select-tick {
    border-color: rgba(255,255,255,.6);
    background: rgba(10,11,15,.85);
}

.result-select-input:focus-visible + .result-select-tick {
    outline: 2px solid var(--brand-2);
    outline-offset: 2px;
}

.result-select-input:checked + .result-select-tick {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent;
    color: #1a0c05;
}

/* =========================================================
   Review page — floating selection action bar
   ========================================================= */

.select-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 900;
    background: #12141a;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    animation: selectBarIn .22s var(--ease);
    padding: 14px 18px;
}

    .select-bar[hidden] {
        display: none;
    }

@keyframes selectBarIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.select-bar-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch;
}

.select-bar-info {
    font-size: 14.5px;
    color: var(--ink-soft);
}

    .select-bar-info strong {
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 22px;
        letter-spacing: -.02em;
        background: linear-gradient(135deg, #fff, var(--brand-2));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        vertical-align: -2px;
    }

.select-bar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

    .select-bar-actions .btn {
        font-size: 13.5px;
        padding: 10px 18px;
    }

@media (min-width: 720px) {
    .select-bar-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .select-bar-actions {
        flex-shrink: 0;
    }
}

/* Toast feedback */
.select-feedback {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%) translateY(10px);
    background: #12141a;
    border: 1px solid var(--border-strong);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
    z-index: 950;
    white-space: nowrap;
}

    .select-feedback.is-visible {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

/* Select-all button toggle state */
.filter-helper.is-clear-mode {
    background: rgba(255,107,107,.1);
    border-color: rgba(255,107,107,.35);
    color: #ff9b8a;
}

    .filter-helper.is-clear-mode:hover {
        background: rgba(255,107,107,.18);
        border-color: rgba(255,107,107,.5);
    }

/* Card looks selected when its checkbox is ticked */
.result-card:has(.result-select-input:checked) {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(255,107,53,.2);
}
/* ---------- Disabled submit button ---------- */
.btn.is-disabled,
.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
    filter: saturate(.6);
}

/* ---------- Score tone colours ---------- */
.result-breakdown li strong.score-ideal {
    color: #4ade80;
}
/* green */
.result-breakdown li strong.score-ok {
    color: #ffb347;
}
/* amber */
.result-breakdown li strong.score-poor {
    color: #ff9b8a;
}

/* =========================================================
   Darkroom — style picker (force visibility)
   ========================================================= */

.darkroom-tools-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 340px;
    justify-content: flex-end;
}

.style-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 240px;
}

    /* The hidden attribute should still win when present */
    .style-picker[hidden] {
        display: none !important;
    }

.style-picker-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    margin: 0;
}

/* Force the <select> to look like a real dropdown */
.style-picker select,
.style-picker .form-input {
    display: block !important;
    width: 100% !important;
    min-width: 180px;
    padding: 8px 34px 8px 12px;
    font-size: 13px;
    line-height: 1.4;
    background-color: #1c1f27 !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b6bac5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    border: 1px solid var(--border-strong) !important;
    color: var(--ink) !important;
    border-radius: 10px !important;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

    .style-picker select:hover,
    .style-picker .form-input:hover {
        border-color: rgba(255,255,255,.22) !important;
        background-color: #22262f !important;
    }

    .style-picker select:focus,
    .style-picker .form-input:focus {
        border-color: var(--brand) !important;
        box-shadow: 0 0 0 3px rgba(255,107,53,.18) !important;
    }

    /* Make the option list readable in the dropdown */
    .style-picker select option {
        background: #1c1f27;
        color: var(--ink);
        padding: 8px;
    }
/* red */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
/* =========================================================
   Force lightbox above the compare grid (final override)
   ========================================================= */
#lightbox,
.lb {
    z-index: 9999 !important;
}

#compareGrid,
.cmp {
    z-index: 1100;
}

/* Force visibility for Library, Bursts, Exports pages where JS observer isn't loaded */
.app-main .reveal {
    opacity: 1 !important;
    transform: none !important;
}
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border-strong);
    padding: 16px 24px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.cookie-banner-content {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

    .cookie-banner-content p {
        margin: 0;
        font-size: 13.5px;
        color: var(--ink-soft);
        flex: 1;
        min-width: 300px;
    }

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
/* =========================================================
   Fix for Job Dropdown Visibility
   ========================================================= */

/* 1. Ensure the parent panel doesn't clip the dropdown */
.app-panel {
    overflow: visible !important;
}

/* 2. Style the actual select box */
select.form-input {
    background-color: #16181f !important; /* Dark surface color */
    color: #f5f6f8 !important; /* White text */
    border: 1px solid rgba(255,255,255,.14) !important;
    appearance: auto !important; /* Ensure native arrow shows */
    position: relative;
    z-index: 100;
}

    /* 3. Style the options inside the dropdown */
    select.form-input option {
        background-color: #16181f !important;
        color: #f5f6f8 !important;
        padding: 10px;
    }

        /* 4. Highlight the selected/hovered option */
        select.form-input option:checked,
        select.form-input option:hover {
            background-color: #ff6b35 !important; /* Brand orange */
            color: #1a0c05 !important;
        }

.nav-mobile-sep {
    height: 1px;
    background: var(--border);
    margin: 8px 14px;
}