/* base.html - canonical design tokens, navbar, typography, dark-mode hooks. */
        * { margin: 0; padding: 0; box-sizing: border-box; }
        :root {
            /* Brand Book Palette */
            --cream: #F6F4EF;
            --black: #1A1A1A;
            --gold: #8A7560;
            --gold-text: #7A6650;  /* WCAG AA accessible — 4.97:1 on cream */
            --gold-light: #B5A08A;
            --gold-dark: #5A4A3A;
            --warm-white: #F0ECE4;
            --dark-gray: #6B6B6B;
            
            /* Semantic Colors */
            --bg-primary: #F6F4EF;
            --bg-secondary: #F0ECE4;
            --bg-card: #FFFFFF;
            --bg-hover: #F0ECE4;
            --bg-input: #FAFAF8;
            
            --text-primary: #1A1A1A;
            --text-secondary: #4A4A48;  /* WCAG AA on cream: 7.2:1 */
            --text-muted: #595958;      /* WCAG AA on cream: 5.6:1 (was #6B6B6B = 3.97:1, failed) */
            
            --border-color: #E0DDD6;
            --border-light: #E8E5DE;
            
            --accent: #1A1A1A;
            --accent-hover: #2D2D2D;
            --accent-light: rgba(26, 26, 26, 0.08);
            
            --success: #2D5A3D;
            --success-light: #E8F0EA;
            --error: #8B3A3A;
            --error-light: #F5EAEA;
            --warning: #7A5C2E;
            --warning-light: #F5F0E5;
            
            /* Shadows */
            --shadow-sm: 0 1px 2px rgba(27, 27, 27, 0.04);
            --shadow-md: 0 4px 12px rgba(27, 27, 27, 0.06);
            --shadow-lg: 0 8px 24px rgba(27, 27, 27, 0.08);
            --shadow-xl: 0 16px 48px rgba(27, 27, 27, 0.10);
            
            /* Radius */
            --radius-sm: 6px;
            --radius-md: 10px;
            --radius-lg: 16px;
            --radius-xl: 24px;

            /* === Font scale (canonical) === */
            --fs-xs:   11px;
            --fs-sm:   13px;
            --fs-base: 15px;
            --fs-md:   16px;
            --fs-lg:   18px;
            --fs-xl:   22px;
            --fs-2xl:  28px;
            --fs-3xl:  36px;

            /* === Legacy aliases ===
               Several older pages (contact.html, axiomera_about.html, home.html, …)
               use short token names like --text / --serif / --sans / --mono inside
               their own local :root. New pages should reference the canonical
               brand/semantic tokens above. These aliases let the canonical
               tokens flow through to any legacy CSS that hasn't been migrated. */
            --text:    #1A1A1A;   /* alias of --text-primary */
            --serif:   'Playfair Display', Georgia, serif;
            --sans:    'Inter', system-ui, sans-serif;
            --mono:    'JetBrains Mono', monospace;
        }
        html {
            scroll-behavior: smooth;
        }
        html, body {
            overflow-x: clip;
        }
        body {
            font-family: 'Inter', system-ui, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            min-height: 100vh;
            font-weight: 400;
            letter-spacing: -0.01em;
            -webkit-font-smoothing: antialiased;
            padding-top: 60px;
        }
        body.no-scroll {
            overflow: hidden;
        }
        
        /* Navbar */
        /* === PILL NAVIGATION (Desktop) === */
        /* ═══ EDGE BAR NAVBAR ═══════════════════════════════════════════════
           Award-winning pattern (Linear, Mercury, Resend, Arc) - single
           full-width dark bar instead of floating pills. Reads more mature
           and authoritative than the previous two-pill approach, which fits
           Quadrance's editorial / enterprise-HR positioning better.

           Detail finesse:
           - Backdrop blur + 92% solid for "premium glass" depth
           - Hairline bottom border in brand-gold tint (not generic white)
           - Active state: gold underline under text, no pill bg
           - Vertical 1px separator between nav cluster and right cluster
             so the bar reads as two cohesive zones
           ─────────────────────────────────────────────────────────────── */
        .navbar {
            /* Solid near-black to match sidebar (#0a0a0a) - the previous 92%
               translucent rgba(22,20,18,.92) let the cream body bg bleed
               through and read as warm-gray instead of true black. No
               border-bottom: the gold hairline read as a bright white line
               where it met the black sidebar below. */
            background: #0a0a0a;
            padding: 0 28px;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            height: 60px;
            display: flex;
            align-items: center;
        }
        /* Transparent variant - landing-page hero only. Keeps the old
           floating feel before the user scrolls into the solid bar. */
        .navbar.transparent {
            background: transparent;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border-bottom-color: transparent;
        }
        .navbar.transparent .logo-text { color: #0d0d0d; }
        .navbar.transparent .nav-link {
            color: rgba(0, 0, 0, .55);
        }
        .navbar.transparent .nav-link:hover { color: #0d0d0d; }
        .navbar.transparent .nav-link.active {
            color: #5A4A3A;
        }
        .navbar.transparent .nav-link.active::before {
            background: #8a7560;
        }
        .navbar.transparent .nav-right::before {
            background: rgba(0, 0, 0, .1);
        }
        .navbar.transparent .nav-login-btn {
            color: #0d0d0d;
            background: transparent;
            border-color: rgba(0, 0, 0, .25);
        }
        .navbar.transparent .nav-login-btn:hover {
            background: #0d0d0d;
            color: #F6F4EF;
            border-color: #0d0d0d;
        }
        .navbar.transparent .nav-logout-btn {
            color: rgba(0, 0, 0, .55);
        }
        .navbar.transparent .nav-logout-btn:hover {
            color: #0d0d0d;
        }
        .navbar.transparent .base-burger span {
            background: #0d0d0d;
        }
        .navbar-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 100%;
            width: 100%;
            gap: 32px;
        }
        .logo {
            display: flex;
            align-items: center;
            cursor: pointer;
            flex-shrink: 0;
        }
        .logo-img {
            height: 24px;
            width: auto;
        }
        .logo-text {
            font-family: 'Playfair Display', Georgia, serif;
            font-size: 16px;
            font-weight: 400;
            letter-spacing: .28em;
            text-transform: uppercase;
            color: #F6F4EF;
            text-decoration: none;
            transition: color .2s ease, opacity .3s;
        }
        .logo-text.on-dark { color: #F6F4EF; }
        .logo-text:hover { opacity: .75; }

        /* Nav cluster - text-only links, no pill background. Active state
           uses a 2px gold underline that animates in on hover/active.
           Inspired by Linear's nav-link treatment. */
        .nav-links {
            display: flex;
            gap: 4px;
            align-items: center;
            margin-left: auto;
        }
        .nav-link {
            font-family: 'Inter', system-ui, sans-serif;
            font-size: 13px;
            font-weight: 500;
            color: rgba(246, 244, 239, .72);
            text-decoration: none;
            letter-spacing: .015em;
            padding: 18px 14px;
            background: none;
            border: none;
            cursor: pointer;
            position: relative;
            white-space: nowrap;
            transition: color .18s ease;
        }
        /* Underline indicator uses ::before so it doesn't clash with the
           dropdown chevron arrow which already owns ::after on
           .nav-dropdown-trigger. */
        .nav-link::before {
            content: '';
            position: absolute;
            left: 14px; right: 14px; bottom: 12px;
            height: 2px;
            background: #c4a378;
            opacity: 0;
            transform: scaleX(.4);
            transform-origin: center;
            transition: opacity .2s ease, transform .25s cubic-bezier(.22,1,.36,1);
            border-radius: 1px;
            pointer-events: none;
        }
        .nav-link:hover {
            color: #F6F4EF;
        }
        .nav-link:hover::before {
            opacity: .35;
            transform: scaleX(.7);
        }
        .nav-link.active {
            color: #F6F4EF;
        }
        .nav-link.active::before {
            opacity: 1;
            transform: scaleX(1);
        }

        /* Axiomera dropdown */
        .nav-dropdown { position: relative; }
        .nav-dropdown-trigger { display: flex; align-items: center; gap: 5px; }
        .nav-dropdown-trigger::after {
            content: '';
            border-left: 3.5px solid transparent;
            border-right: 3.5px solid transparent;
            border-top: 4px solid currentColor;
            opacity: .55;
            transition: transform .2s;
        }
        .nav-dropdown:hover .nav-dropdown-trigger::after { transform: rotate(180deg); }
        .nav-dropdown-menu {
            position: absolute;
            top: 100%;
            left: -4px;
            padding-top: 10px;
            display: none;
            z-index: 100;
        }
        .nav-dropdown:hover .nav-dropdown-menu,
        .nav-dropdown.open .nav-dropdown-menu { display: block; }
        .nav-dropdown.open .nav-dropdown-trigger::after { transform: rotate(180deg); }
        .nav-dropdown-menu-inner {
            background: #1a1a1a;
            border: 1px solid rgba(255, 255, 255, .08);
            border-radius: 16px;
            box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
            padding: 10px;
            min-width: 260px;
        }
        .nav-dropdown-item {
            display: flex !important;
            flex-direction: column;
            gap: 2px;
            padding: 10px 14px !important;
            font-family: 'Inter', sans-serif;
            color: rgba(255, 255, 255, .85) !important;
            text-decoration: none;
            border-radius: 10px;
            transition: background .15s, color .15s;
        }
        .nav-dropdown-item strong {
            font-size: 13px;
            font-weight: 500;
            color: #fff;
            letter-spacing: .01em;
        }
        .nav-dropdown-item .nav-dd-sub {
            font-size: 12px;
            font-weight: 400;
            color: rgba(255, 255, 255, .45);
            letter-spacing: 0;
        }
        .nav-dropdown-item:hover {
            background: rgba(255, 255, 255, .05);
            color: #fff !important;
        }
        .nav-dropdown-item:hover .nav-dd-sub { color: rgba(255, 255, 255, .65); }

        /* Right cluster - workspace badge + logout. Thin vertical 1px
           separator on the left (::before) divides it from the nav cluster
           so the bar reads as two distinct zones without needing a pill. */
        .nav-right {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
            position: relative;
            padding-left: 24px;
        }
        .nav-right::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 1px;
            height: 22px;
            background: rgba(246, 244, 239, .12);
        }
        .nav-login-btn {
            display: inline-flex;
            align-items: center;
            padding: 7px 14px;
            font-family: 'Inter', system-ui, sans-serif;
            font-size: 12.5px;
            font-weight: 500;
            letter-spacing: .015em;
            color: #F6F4EF;
            background: transparent;
            border: 1px solid rgba(246, 244, 239, .22);
            border-radius: 6px;
            text-decoration: none;
            cursor: pointer;
            transition: background .18s ease, border-color .18s ease, color .18s ease;
            white-space: nowrap;
            max-width: 220px;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .nav-login-btn:hover {
            background: rgba(196, 163, 120, .12);
            border-color: rgba(196, 163, 120, .55);
            color: #F6F4EF;
        }
        .nav-logout-btn {
            font-family: 'Inter', sans-serif;
            font-size: 12.5px;
            font-weight: 500;
            color: rgba(246, 244, 239, .55);
            background: none;
            border: none;
            cursor: pointer;
            letter-spacing: .015em;
            padding: 7px 12px;
            border-radius: 6px;
            transition: color .18s ease, background .18s ease;
            white-space: nowrap;
        }
        .nav-logout-btn:hover {
            color: #F6F4EF;
            background: rgba(246, 244, 239, .06);
        }

        /* ─── Account avatar in the navbar (top-right) ─────────────────────
           Just the initials chip; hover / keyboard-focus reveals a card with
           the account name + email + current organisation. Replaces the old
           sidebar user footer. */
        .nav-user {
            position: relative;
            display: inline-flex;
            align-items: center;
            margin-left: 4px;
            text-decoration: none;
        }
        .nav-user-avatar {
            width: 34px; height: 34px;
            border-radius: 50%;
            background: linear-gradient(135deg, #c4a378, #8a7560);
            color: #fff;
            display: flex; align-items: center; justify-content: center;
            font-family: 'Inter', system-ui, sans-serif;
            font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
            border: 1px solid rgba(255, 255, 255, .16);
            transition: box-shadow .14s ease, transform .14s ease;
        }
        .nav-user:hover .nav-user-avatar,
        .nav-user:focus-visible .nav-user-avatar {
            box-shadow: 0 0 0 3px rgba(196, 163, 120, .28);
        }
        .nav-user-pop {
            position: absolute;
            top: calc(100% + 12px); right: 0;
            min-width: 220px; max-width: 300px;
            background: #fff; color: #1a1a1a;
            border: 1px solid #e6e4df; border-radius: 11px;
            box-shadow: 0 14px 36px rgba(0, 0, 0, .20);
            padding: 13px 15px;
            display: flex; flex-direction: column; gap: 2px;
            text-align: left;
            opacity: 0; visibility: hidden; transform: translateY(-5px);
            transition: opacity .15s ease, transform .16s cubic-bezier(.22,1,.36,1), visibility 0s linear .16s;
            z-index: 1200;
        }
        /* Up-pointing arrow */
        .nav-user-pop::before {
            content: '';
            position: absolute; bottom: 100%; right: 13px;
            border: 6px solid transparent; border-bottom-color: #fff;
        }
        .nav-user:hover .nav-user-pop,
        .nav-user:focus-within .nav-user-pop {
            opacity: 1; visibility: visible; transform: translateY(0);
            transition-delay: 0s;
        }
        .nav-user-pop-name { font-size: 14px; font-weight: 600; color: #1a1a1a; line-height: 1.3; }
        .nav-user-pop-email { font-size: 12px; color: #5b5a55; word-break: break-all; line-height: 1.4; }
        .nav-user-pop-div { height: 1px; background: #eeece7; margin: 9px 0 7px; }
        .nav-user-pop-lbl {
            font-family: 'JetBrains Mono', monospace;
            font-size: 9.5px; font-weight: 600; letter-spacing: .14em;
            text-transform: uppercase; color: #8b8a85; margin-bottom: 2px;
        }
        .nav-user-pop-org { font-size: 13.5px; font-weight: 500; color: #1a1a1a; }

        /* Responsive: tighten at narrower desktop widths */
        @media (max-width: 1180px) {
            .navbar { padding: 0 24px; }
            .navbar-content { gap: 16px; }
            .nav-links { gap: 2px; }
            .nav-link { padding: 9px 14px; }
        }
        @media (max-width: 1024px) {
            .nav-link { font-size: 12.5px; padding: 8px 12px; }
            .nav-login-btn { padding: 9px 18px; font-size: 12.5px; }
        }
        
        /* Main */
        .main-content { max-width: 1200px; margin: 0 auto; padding: 48px 32px; }
        .main-content:has(#page-home.active) { max-width: none; padding: 0; }
        #page-home.page { max-width: none; padding: 0; margin: 0; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; width: 100vw; }
        .page { display: none; }
        .page.active { display: block; }
        
        /* Hero Fullscreen with Parallax */
        .home-scroll-container {
            position: relative;
        }
        .home-scroll-wrapper {
            position: relative;
        }
        .hero-fullscreen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 40px;
            padding-top: 60px;
            overflow: hidden;
            background: #000000;
            z-index: 1;
        }
        .hero-center {
            text-align: center;
        }
        .hero-static {
            font-size: 4rem;
            font-weight: 700;
            color: #FFFFFF;
            line-height: 1.3;
            margin: 0;
            letter-spacing: -0.02em;
            display: inline;
        }
        .hero-rotating-container {
            display: inline-block;
            height: 1.3em;
            overflow: hidden;
            vertical-align: bottom;
            position: relative;
        }
        .hero-rotating-words {
            display: flex;
            flex-direction: column;
            animation: rotateWords 12.5s ease-in-out infinite;
        }
        .hero-word {
            height: 1.3em;
            display: flex;
            align-items: center;
            font-size: 4rem;
            font-weight: 700;
            font-style: italic;
            color: #FFFFFF;
            letter-spacing: -0.02em;
            line-height: 1.3;
        }
        
        @keyframes rotateWords {
            0%, 16% { transform: translateY(0); }
            18%, 34% { transform: translateY(-1.3em); }
            36%, 52% { transform: translateY(-2.6em); }
            54%, 70% { transform: translateY(-3.9em); }
            72%, 88% { transform: translateY(-5.2em); }
            90%, 100% { transform: translateY(-6.5em); }
        }
        
        /* Home Content Section */
        .home-content {
            position: relative;
            z-index: 2;
            background: #FFFFFF;
            min-height: auto;
            padding: 120px 0 30px 0;
            width: 100%;
            margin-top: calc(100vh - 144px);
        }
        .content-inner {
            max-width: 1100px;
            margin: 0 auto;
            padding: 0 48px;
        }
        .content-inner h2 {
            font-size: 3rem;
            font-weight: 700;
            color: #1B1B1B;
            margin-bottom: 32px;
            line-height: 1.2;
        }
        .content-inner > p {
            font-size: 1.25rem;
            line-height: 1.8;
            color: #5A5A58;
            margin-bottom: 80px;
            max-width: 800px;
        }
        .features-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 40px;
            margin-bottom: 80px;
        }
        .feature-card {
            padding: 40px;
            background: #F8F8F6;
            border-radius: 16px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .feature-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        }
        .feature-icon {
            width: 64px;
            height: 64px;
            background: #000000;
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 24px;
            font-size: 1.5rem;
            color: #FFFFFF;
        }
        .feature-card h3 {
            font-size: 1.35rem;
            font-weight: 700;
            color: #1B1B1B;
            margin-bottom: 12px;
        }
        .feature-card p {
            font-size: 1rem;
            line-height: 1.6;
            color: #5A5A58;
        }
        .cta-block {
            text-align: center;
            padding-top: 40px;
        }
        .cta-block .btn-large {
            padding: 20px 48px;
            font-size: 1.15rem;
            background: #000000;
            color: #FFFFFF;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .cta-block .btn-large:hover {
            background: #333333;
            transform: translateY(-2px);
        }
        .cta-block .btn-large i {
            margin-left: 12px;
        }
        
        /* About the Firm Section */
        .about-firm-inner {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 48px;
        }
        
        /* About Hero Image */
        .about-hero-image {
            width: 100%;
            height: 400px;
            border-radius: 20px;
            overflow: hidden;
            margin-bottom: 32px;
            background: #f0f0f0;
        }
        .about-hero-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
        }
        
        /* About Title */
        .about-title {
            font-size: 3.5rem;
            font-weight: 700;
            color: var(--black);
            margin: 0 0 16px 0;
            letter-spacing: 0.02em;
        }
        
        /* About Description */
        .about-description {
            font-size: 1.1rem;
            line-height: 1.8;
            color: var(--text-secondary);
            margin: 0 0 48px 0;
            max-width: 100%;
        }
        
        /* About Stats Row */
        .about-stats-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            width: 100%;
        }
        
        /* Scroll Reveal Animations */
        .reveal {
            opacity: 0;
            transform: translateY(40px);
            transition: opacity 0.8s ease, transform 0.8s ease;
        }
        .reveal.revealed {
            opacity: 1;
            transform: translateY(0);
        }
        .reveal-delay-1 { transition-delay: 0.1s; }
        .reveal-delay-2 { transition-delay: 0.2s; }
        .reveal-delay-3 { transition-delay: 0.3s; }
        .reveal-delay-4 { transition-delay: 0.4s; }
        
        .reveal-fade {
            opacity: 0;
            transition: opacity 1s ease;
        }
        .reveal-fade.revealed {
            opacity: 1;
        }
        
        .reveal-scale {
            opacity: 0;
            transform: scale(0.9);
            transition: opacity 0.8s ease, transform 0.8s ease;
        }
        .reveal-scale.revealed {
            opacity: 1;
            transform: scale(1);
        }
        .about-stat-item {
            display: flex;
            flex-direction: column;
        }
        .stat-number-large {
            display: block;
            font-size: 4.5rem;
            font-weight: 700;
            color: #40C4D8;
            line-height: 1;
            margin-bottom: 12px;
        }
        .stat-label-small {
            font-size: 1rem;
            color: var(--text-secondary);
            line-height: 1.4;
        }
        
        @media (max-width: 1024px) {
            .about-title {
                font-size: 2.5rem;
            }
            .about-hero-image {
                height: 300px;
            }
            .stat-number-large {
                font-size: 3.5rem;
            }
        }
        @media (max-width: 768px) {
            .about-title {
                font-size: 2rem;
            }
            .about-hero-image {
                height: 220px;
                border-radius: 12px;
            }
            .about-firm-inner {
                padding: 0 24px;
            }
            .about-stats-row {
                flex-direction: column;
                gap: 32px;
            }
            .stat-number-large {
                font-size: 3rem;
            }
        }
        
        /* Team Section */
        .team-section {
            background: #f8f8f8;
            padding: 60px 0 80px 0;
            position: relative;
            z-index: 2;
        }
        .team-inner {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 48px;
        }
        .team-title {
            font-size: 3rem;
            font-weight: 700;
            color: var(--black);
            margin: 0 0 16px 0;
            text-align: center;
        }
        .team-subtitle {
            font-size: 1.2rem;
            color: var(--text-secondary);
            text-align: center;
            margin: 0 0 64px 0;
        }
        .team-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 40px;
        }
        .team-card {
            background: #FFFFFF;
            border-radius: 16px;
            overflow: hidden;
            display: flex;
            box-shadow: 0 4px 20px rgba(0,0,0,0.06);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .team-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 30px rgba(0,0,0,0.1);
        }
        .team-photo {
            width: 200px;
            min-width: 200px;
            height: 260px;
            overflow: hidden;
        }
        .team-photo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center top;
        }
        .team-info {
            padding: 28px;
            display: flex;
            flex-direction: column;
        }
        .team-info h3 {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--black);
            margin: 0 0 4px 0;
        }
        .team-role {
            font-size: 0.9rem;
            font-weight: 600;
            color: #40C4D8;
            margin-bottom: 16px;
        }
        .team-bio {
            font-size: 0.9rem;
            line-height: 1.6;
            color: var(--text-secondary);
            margin: 0 0 16px 0;
            flex-grow: 1;
        }
        .team-clients {
            font-size: 0.85rem;
            color: var(--text-secondary);
            border-top: 1px solid var(--border-light);
            padding-top: 12px;
        }
        .clients-label {
            font-weight: 600;
            color: var(--black);
        }
        
        @media (max-width: 1024px) {
            .team-grid {
                grid-template-columns: 1fr;
            }
            .team-card {
                flex-direction: row;
            }
            .team-photo {
                width: 180px;
                min-width: 180px;
                height: 240px;
            }
        }
        @media (max-width: 768px) {
            .team-section {
                padding: 80px 0;
            }
            .team-inner {
                padding: 0 24px;
            }
            .team-title {
                font-size: 2rem;
            }
            .team-card {
                flex-direction: column;
            }
            .team-photo {
                width: 100%;
                height: 280px;
            }
        }
        
        /* Footer */
        .site-footer {
            background: #000000;
            color: #FFFFFF;
            padding: 80px 0 0;
            margin-top: 0;
            position: relative;
            z-index: 2;
        }
        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 48px;
        }
        .footer-main {
            display: flex;
            justify-content: space-between;
            padding-bottom: 60px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .footer-brand {
            max-width: 280px;
        }
        .footer-logo-img {
            height: 32px;
            width: auto;
            display: block;
        }
        .footer-tagline {
            margin-top: 12px;
            font-size: 0.95rem;
            color: rgba(255,255,255,0.6);
            line-height: 1.6;
        }
        .footer-links {
            display: flex;
            gap: 80px;
        }
        .footer-col {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .footer-col h4 {
            font-size: 0.85rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: rgba(255,255,255,0.5);
            margin-bottom: 8px;
        }
        .footer-col a {
            font-size: 0.95rem;
            color: rgba(255,255,255,0.8);
            transition: color 0.2s ease;
        }
        .footer-col a:hover {
            color: #40C4D8;
        }
        .footer-bottom {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 24px 0;
        }
        .footer-bottom p {
            font-size: 0.85rem;
            color: rgba(255,255,255,0.5);
        }
        .footer-legal {
            display: flex;
            gap: 24px;
        }
        .footer-legal a {
            font-size: 0.85rem;
            color: rgba(255,255,255,0.5);
            transition: color 0.2s ease;
        }
        .footer-legal a:hover {
            color: #FFFFFF;
        }
        
        @media (max-width: 768px) {
            .footer-main {
                flex-direction: column;
                gap: 48px;
            }
            .footer-links {
                flex-direction: column;
                gap: 32px;
            }
            .footer-bottom {
                flex-direction: column;
                gap: 16px;
                text-align: center;
            }
            .footer-content {
                padding: 0 24px;
            }
        }
        
        /* Scroll Indicator */
        .scroll-indicator {
            position: absolute;
            bottom: 40px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            color: var(--text-muted);
            font-size: 0.85rem;
            animation: bounce 2s infinite;
            z-index: 10;
        }
        .scroll-indicator i {
            font-size: 1.2rem;
        }
        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
            40% { transform: translateX(-50%) translateY(10px); }
            60% { transform: translateX(-50%) translateY(5px); }
        }
        
        /* Content Section */
        .home-content-section {
            padding: 100px 0;
            background: #FFFFFF;
            position: relative;
            z-index: 5;
        }
        .content-block {
            max-width: 700px;
            margin-bottom: 60px;
        }
        .content-block h2 {
            font-size: 2.5rem;
            font-weight: 600;
            margin-bottom: 24px;
            color: var(--black);
        }
        .content-block p {
            font-size: 1.15rem;
            line-height: 1.8;
            color: var(--text-secondary);
        }
        
        /* Features Grid */
        .features-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 32px;
            margin-bottom: 60px;
        }
        .feature-item {
            padding: 32px;
            background: var(--bg-primary);
            border-radius: var(--radius-lg);
            border: 1px solid var(--border-light);
            transition: all 0.3s ease;
        }
        .feature-item:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-md);
        }
        .feature-icon-small {
            width: 48px;
            height: 48px;
            border-radius: var(--radius-md);
            background: var(--accent-light);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
            font-size: 1.25rem;
            color: var(--black);
        }
        .feature-item h3 {
            font-size: 1.15rem;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--black);
        }
        .feature-item p {
            font-size: 0.95rem;
            color: var(--text-muted);
            line-height: 1.5;
        }
        
        /* CTA Section */
        .cta-section {
            text-align: center;
            padding-top: 20px;
        }
        .btn-large {
            padding: 18px 36px;
            font-size: 1.1rem;
        }
        
        @media (max-width: 1024px) {
            .hero-static { font-size: 3rem; }
            .hero-word { font-size: 3rem; }
            .features-grid {
                grid-template-columns: 1fr;
            }
            .features-row {
                grid-template-columns: 1fr;
                gap: 24px;
            }
            .content-inner h2 {
                font-size: 2.2rem;
            }
        }
        
        @media (max-width: 768px) {
            .hero-static { font-size: 1.8rem; }
            .hero-word { font-size: 1.8rem; }
            .content-inner {
                padding: 0 24px;
            }
            .content-inner h2 {
                font-size: 1.8rem;
            }
            .content-inner > p {
                font-size: 1.1rem;
            }
            .feature-card {
                padding: 28px;
            }
        }
        
        /* About Axiomera Page */
        .about-content {
            max-width: 900px;
            margin: 0 auto;
        }
        .about-section {
            margin-bottom: 60px;
        }
        .about-section h2 {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--black);
            margin-bottom: 20px;
        }
        .about-section > p {
            font-size: 1.1rem;
            line-height: 1.8;
            color: var(--text-secondary);
        }
        .how-it-works {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 24px;
            margin-top: 24px;
        }
        .step-card {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            padding: 28px;
            text-align: center;
        }
        .step-number {
            width: 48px;
            height: 48px;
            background: var(--black);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            font-weight: 700;
            margin: 0 auto 16px;
        }
        .step-card h3 {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--black);
            margin-bottom: 8px;
        }
        .step-card p {
            font-size: 0.9rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }
        .features-list {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin-top: 24px;
        }
        .feature-row {
            display: flex;
            align-items: flex-start;
            gap: 16px;
            padding: 20px;
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-md);
        }
        .feature-row i {
            color: var(--success);
            font-size: 1.25rem;
            margin-top: 2px;
        }
        .feature-row h4 {
            font-size: 1rem;
            font-weight: 600;
            color: var(--black);
            margin-bottom: 4px;
        }
        .feature-row p {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }
        .about-cta {
            text-align: center;
            margin-top: 60px;
            padding-top: 40px;
            border-top: 1px solid var(--border-light);
        }
        
        @media (max-width: 1024px) {
            .how-it-works {
                grid-template-columns: repeat(2, 1fr);
            }
        }
        @media (max-width: 768px) {
            .how-it-works {
                grid-template-columns: 1fr;
            }
        }
        
        /* Legacy Hero (kept for reference) */
        .hero { text-align: center; padding: 80px 0 60px; }
        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            padding: 10px 20px;
            border-radius: 100px;
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 32px;
            box-shadow: var(--shadow-sm);
        }
        .hero-badge i { color: var(--text-primary); }
        .hero h1 { font-size: 3.5rem; font-weight: 700; line-height: 1.1; margin-bottom: 24px; letter-spacing: -0.03em; color: var(--black); }
        .hero h1 span {
            position: relative;
            display: inline-block;
        }
        .hero h1 span::after {
            content: '';
            position: absolute;
            bottom: 4px;
            left: 0;
            right: 0;
            height: 12px;
            background: var(--sage);
            opacity: 0.5;
            z-index: -1;
            border-radius: 2px;
        }
        .hero p { font-size: 1.2rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto 40px; line-height: 1.6; font-weight: 400; }
        .hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
        
        /* Buttons */
        .btn {
            padding: 14px 28px;
            border: none;
            border-radius: var(--radius-md);
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            transition: all 0.2s ease;
            letter-spacing: -0.01em;
        }
        .btn-primary {
            background: var(--black);
            color: var(--ivory);
            box-shadow: var(--shadow-md);
        }
        .btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
        .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
        .btn-secondary {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
        }
        .btn-secondary:hover { background: var(--bg-hover); border-color: var(--text-secondary); }
        .btn-success { background: var(--success); color: white; }
        .btn-success:hover { background: #234A31; }
        
        /* Features & Stats */
        .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 80px; }
        .feature-card {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            padding: 32px;
            transition: all 0.3s ease;
            box-shadow: var(--shadow-sm);
        }
        .feature-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-lg);
            border-color: var(--sage);
        }
        .feature-icon {
            width: 52px; height: 52px;
            background: var(--accent-light);
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            color: var(--black);
            margin-bottom: 20px;
        }
        .feature-card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.01em; }
        .feature-card p { color: var(--text-secondary); line-height: 1.6; font-size: 0.95rem; }
        .stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 24px;
            margin-top: 80px;
            padding: 48px;
            background: var(--bg-card);
            border-radius: var(--radius-xl);
            border: 1px solid var(--border-light);
            box-shadow: var(--shadow-md);
        }
        .stat { text-align: center; }
        .stat-value {
            font-size: 2.75rem;
            font-weight: 700;
            color: var(--black);
            letter-spacing: -0.02em;
        }
        .stat-label { color: var(--text-secondary); margin-top: 8px; font-size: 0.9rem; font-weight: 500; }
        
        /* Card */
        .card {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            padding: 28px;
            margin-bottom: 24px;
            box-shadow: var(--shadow-sm);
        }
        .page-header { margin-bottom: 40px; }
        .page-header h1 { font-size: 2rem; display: flex; align-items: center; gap: 14px; font-weight: 700; letter-spacing: -0.02em; }
        .page-header h1 i { color: var(--text-secondary); font-size: 1.5rem; }
        .page-header p { color: var(--text-secondary); margin-top: 8px; font-size: 1.05rem; }
        
        /* Pipeline */
        .pipeline-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
        .pipeline-info { display: flex; align-items: center; gap: 16px; }
        .pipeline-icon {
            width: 52px; height: 52px;
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            background: var(--bg-hover);
            color: var(--text-secondary);
            border: 1px solid var(--border-light);
            transition: all 0.3s ease;
        }
        .pipeline-icon.loading {
            background: var(--black);
            color: var(--ivory);
            border-color: var(--black);
            animation: pulse 2s infinite;
        }
        .pipeline-icon.ready {
            background: var(--success);
            color: white;
            border-color: var(--success);
        }
        .pipeline-icon.error {
            background: var(--error);
            color: white;
            border-color: var(--error);
        }
        @keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
        .pipeline-text h3 { font-size: 1.05rem; font-weight: 600; }
        .pipeline-text p { color: var(--text-secondary); font-size: 0.9rem; }
        
        /* Progress */
        .progress-section { margin-top: 24px; display: none; }
        .progress-section.active { display: block; }
        .progress-header { display: flex; justify-content: space-between; margin-bottom: 12px; }
        .progress-bar { height: 8px; background: var(--bg-hover); border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
        .progress-fill { height: 100%; background: var(--black); transition: width 0.3s; border-radius: 4px; }
        .progress-percent { font-size: 1.25rem; font-weight: 700; color: var(--black); }
        .steps-list { display: flex; flex-direction: column; gap: 8px; }
        .step-item {
            display: flex; align-items: center; gap: 12px;
            padding: 12px 16px;
            background: var(--bg-hover);
            border-radius: var(--radius-md);
            opacity: 0.4;
            transition: all 0.2s ease;
        }
        .step-item.active { opacity: 1; background: var(--accent-light); border: 1px solid var(--border-color); }
        .step-item.completed { opacity: 1; }
        .step-item.completed .step-num { background: var(--success); border-color: var(--success); color: white; }
        .step-num {
            width: 28px; height: 28px;
            border-radius: 50%;
            border: 2px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 600;
        }
        .step-item.active .step-num { border-color: var(--black); color: var(--black); }
        .step-text { font-weight: 500; font-size: 0.95rem; }
        
        /* Upload */
        .upload-area {
            border: 2px dashed var(--sage);
            border-radius: var(--radius-lg);
            padding: 48px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            background: var(--bg-input);
        }
        .upload-area:hover { border-color: var(--black); background: var(--bg-hover); }
        .upload-area.disabled { opacity: 0.5; pointer-events: none; }
        .upload-icon {
            width: 72px; height: 72px;
            margin: 0 auto 20px;
            background: var(--accent-light);
            border-radius: var(--radius-lg);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            color: var(--black);
        }
        .upload-area h3 { font-size: 1.2rem; margin-bottom: 8px; font-weight: 600; }
        .upload-area p { color: var(--text-secondary); font-size: 0.95rem; }
        .job-editor {
            padding: 24px;
            background: var(--bg-input);
            border-radius: var(--radius-lg);
            border: 1px solid var(--border-light);
            transition: border-color 0.2s, background 0.2s;
        }
        .job-editor.disabled {
            opacity: 0.5;
            pointer-events: none;
        }
        .editor-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        .editor-header h3 {
            color: var(--text-primary);
            font-size: 1.05rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .editor-header h3 i {
            color: var(--text-secondary);
        }
        .editor-actions {
            display: flex;
            gap: 8px;
        }
        .btn-sm {
            padding: 8px 14px;
            font-size: 0.85rem;
        }
        .form-input {
            width: 100%;
            padding: 14px 16px;
            border: 1px solid var(--border-light);
            border-radius: var(--radius-md);
            background: var(--bg-card);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.95rem;
            transition: all 0.2s ease;
        }
        .form-input:focus {
            border-color: var(--black);
            box-shadow: 0 0 0 3px var(--accent-light);
        }
        /* Hide outline only on mouse focus — keyboard users keep the global :focus-visible ring */
        .form-input:focus:not(:focus-visible) {
            outline: none;
        }
        .form-input::placeholder {
            color: var(--text-muted);
        }
        textarea.form-input {
            line-height: 1.6;
            resize: vertical;
        }
        
        /* Description Quality Indicator */
        .quality-indicator {
            margin-top: 12px;
            padding: 12px 16px;
            border-radius: var(--radius-md);
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            transition: all 0.3s ease;
        }
        .quality-indicator.checking {
            border-color: var(--sage);
            background: var(--bg-hover);
        }
        .quality-indicator.excellent {
            border-color: var(--success);
            background: var(--success-light);
        }
        .quality-indicator.good {
            border-color: var(--success);
            background: var(--success-light);
        }
        .quality-indicator.fair {
            border-color: var(--warning);
            background: var(--warning-light);
        }
        .quality-indicator.poor {
            border-color: var(--warning);
            background: var(--warning-light);
        }
        .quality-indicator.invalid, .quality-indicator.too_short {
            border-color: var(--error);
            background: var(--error-light);
        }
        .quality-status {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .quality-icon {
            font-size: 1.1rem;
        }
        .quality-indicator.checking .quality-icon { color: var(--text-secondary); }
        .quality-indicator.excellent .quality-icon { color: var(--success); }
        .quality-indicator.good .quality-icon { color: var(--success); }
        .quality-indicator.fair .quality-icon { color: var(--warning); }
        .quality-indicator.poor .quality-icon { color: var(--warning); }
        .quality-indicator.invalid .quality-icon, .quality-indicator.too_short .quality-icon { color: var(--error); }
        .quality-text {
            font-weight: 500;
            font-size: 0.9rem;
        }
        .quality-message {
            margin-top: 6px;
            font-size: 0.85rem;
            color: var(--text-secondary);
            padding-left: 26px;
        }
        
        /* Analysis Mode Tabs */
        .analysis-mode-tabs {
            display: flex;
            gap: 0;
            margin-bottom: 24px;
            border-bottom: 1px solid var(--border-light);
        }
        .mode-tab {
            flex: 1;
            padding: 14px 20px;
            background: transparent;
            border: none;
            color: var(--text-secondary);
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            transition: all 0.2s ease;
            border-bottom: 2px solid transparent;
            margin-bottom: -1px;
        }
        .mode-tab:hover {
            color: var(--text-primary);
            background: var(--bg-hover);
        }
        .mode-tab.active {
            color: var(--black);
            border-bottom-color: var(--black);
            font-weight: 600;
        }
        .mode-tab i {
            font-size: 1rem;
        }
        .analysis-mode-content {
            display: none;
        }
        .analysis-mode-content.active {
            display: block;
        }
        
        /* Batch Analysis */
        .batch-editor {
            padding: 24px;
            background: var(--bg-input);
            border-radius: var(--radius-lg);
            border: 1px solid var(--border-light);
        }
        .batch-editor.disabled {
            opacity: 0.5;
            pointer-events: none;
        }
        .batch-name-input {
            margin-bottom: 16px;
        }
        .batch-name-input label {
            display: block;
            color: var(--text-secondary);
            font-size: 0.9rem;
            font-weight: 500;
            margin-bottom: 8px;
        }
        .batch-name-input label i {
            color: var(--text-primary);
            margin-right: 6px;
        }
        .batch-files-area {
            border: 2px dashed var(--sage);
            border-radius: var(--radius-md);
            padding: 32px;
            text-align: center;
            transition: all 0.2s ease;
            cursor: pointer;
            background: var(--bg-card);
        }
        .batch-files-area:hover {
            border-color: var(--black);
            background: var(--bg-hover);
        }
        .batch-files-area.dragover {
            border-color: var(--black);
            background: var(--accent-light);
        }
        .batch-files-placeholder i {
            font-size: 2.5rem;
            color: var(--text-muted);
            margin-bottom: 12px;
        }
        .batch-files-placeholder p {
            color: var(--text-primary);
            margin-bottom: 6px;
            font-weight: 500;
        }
        .batch-files-placeholder small {
            color: var(--text-secondary);
        }
        .batch-files-list {
            max-height: 250px;
            overflow-y: auto;
            margin-top: 16px;
            border: 1px solid var(--border-light);
            border-radius: var(--radius-md);
            background: var(--bg-card);
        }
        .batch-file-item {
            display: flex;
            align-items: center;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-light);
            gap: 12px;
        }
        .batch-file-item:last-child {
            border-bottom: none;
        }
        .batch-file-item i.fa-file-alt {
            color: var(--text-secondary);
        }
        .batch-file-item .file-name {
            flex: 1;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .batch-file-item .file-size {
            color: var(--text-muted);
            font-size: 0.8rem;
        }
        .batch-file-item .remove-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 6px;
            border-radius: var(--radius-sm);
            transition: all 0.2s ease;
        }
        .batch-file-item .remove-btn:hover {
            color: var(--error);
            background: var(--error-light);
        }
        .batch-summary {
            margin-top: 16px;
            padding: 12px 16px;
            background: var(--accent-light);
            border-radius: var(--radius-md);
            color: var(--text-primary);
            font-weight: 500;
            border: 1px solid var(--border-light);
        }
        .batch-progress {
            margin-top: 24px;
            padding: 24px;
            background: var(--bg-input);
            border-radius: var(--radius-lg);
            border: 1px solid var(--border-light);
        }
        .batch-progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        .batch-progress-header h4 {
            color: var(--text-primary);
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .batch-progress-stats {
            display: flex;
            align-items: center;
            gap: 16px;
            color: var(--text-secondary);
        }
        .batch-eta {
            display: flex;
            gap: 12px;
            align-items: center;
            flex-wrap: wrap;
        }
        .batch-eta .eta-estimate,
        .batch-eta .eta-remaining {
            color: var(--text-primary);
            font-weight: 600;
        }
        .batch-eta .eta-details,
        .batch-eta .eta-avg {
            color: var(--text-secondary);
            font-size: 0.85rem;
        }
        .batch-eta .eta-completing {
            color: var(--warning);
            font-weight: 500;
        }
        .batch-eta .eta-complete {
            color: var(--success);
            font-weight: 600;
        }
        .batch-eta .eta-avg-final {
            color: var(--text-secondary);
            font-size: 0.85rem;
        }
        .batch-current-file {
            margin-top: 12px;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }
        
        /* Batch Results Navigation */
        .batch-results-nav {
            margin-top: 24px;
            padding: 16px 20px;
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
        }
        .batch-nav-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 16px;
            flex-wrap: wrap;
        }
        .batch-nav-controls {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .batch-nav-controls .btn {
            width: 40px;
            height: 40px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .batch-nav-indicator {
            font-weight: 600;
            color: var(--text-primary);
            min-width: 60px;
            text-align: center;
        }
        .batch-nav-pills {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid var(--border-light);
        }
        .batch-nav-pill {
            padding: 8px 14px;
            background: var(--bg-hover);
            border: 1px solid var(--border-light);
            border-radius: 100px;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 8px;
            max-width: 180px;
        }
        .batch-nav-pill:hover {
            border-color: var(--black);
            background: var(--accent-light);
        }
        .batch-nav-pill.active {
            background: var(--black);
            border-color: var(--black);
            color: var(--ivory);
        }
        .batch-nav-pill .pill-title {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100px;
        }
        .batch-nav-pill .pill-grade {
            font-weight: 600;
            font-size: 0.8rem;
        }
        .batch-nav-pill.error {
            border-color: var(--error);
            color: var(--error);
        }
        .batch-nav-pill.error:hover {
            background: var(--error-light);
        }
        
        /* Old batch results - remove */
        .batch-results {
            display: none !important;
        }
        .batch-results-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        .batch-results-header h4 {
            color: var(--success);
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .batch-results-summary {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 12px;
        }
        .batch-result-item {
            padding: 12px;
            background: var(--bg-hover);
            border-radius: var(--radius-md);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .batch-result-item .title {
            font-size: 0.9rem;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 150px;
        }
        .batch-result-item .grade {
            background: var(--black);
            color: var(--ivory);
            padding: 4px 10px;
            border-radius: var(--radius-sm);
            font-size: 0.8rem;
            font-weight: 600;
        }
        
        /* File info */
        .file-info {
            display: none;
            background: var(--success-light);
            border: 1px solid var(--success);
            border-radius: var(--radius-lg);
            padding: 16px;
            margin-top: 16px;
        }
        .file-info.visible { display: block; }
        .file-info-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
        .file-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
        .file-name i { color: var(--success); }
        .btn-clear { background: none; border: none; color: var(--error); cursor: pointer; padding: 8px; }
        
        /* Analysis */
        .analysis-progress { display: none; margin-top: 24px; }
        .analysis-progress.active { display: block; }
        
        /* ========== NEW RESULTS UI ========== */
        .results { display: none; margin-top: 24px; }
        .results.active { display: block; animation: fadeIn 0.4s ease-out; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }
        
        /* Job Description Box */
        .job-description-box {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            margin-bottom: 24px;
            overflow: hidden;
            box-shadow: var(--shadow-sm);
        }
        .job-description-box h3 {
            font-size: 1.15rem;
            font-weight: 600;
            color: var(--text-primary);
            padding: 18px 24px;
            background: var(--bg-hover);
            border-bottom: 1px solid var(--border-light);
            margin: 0;
        }
        .job-description-content {
            padding: 20px 24px;
            max-height: 250px;
            overflow-y: auto;
        }
        .job-description-content p {
            color: var(--text-secondary);
            line-height: 1.7;
            white-space: pre-wrap;
            margin: 0;
            font-size: 0.95rem;
        }
        
        /* Tabs */
        .tabs-container {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: var(--shadow-sm);
        }
        .tabs-header {
            display: flex;
            background: var(--bg-hover);
            border-bottom: 1px solid var(--border-light);
        }
        .tab-btn {
            flex: 1;
            padding: 16px 20px;
            background: none;
            border: none;
            color: var(--text-secondary);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            border-bottom: 2px solid transparent;
            font-size: 0.9rem;
            margin-bottom: -1px;
        }
        .tab-btn:hover {
            color: var(--text-primary);
            background: var(--bg-card);
        }
        .tab-btn.active {
            color: var(--black);
            background: var(--bg-card);
            border-bottom-color: var(--black);
            font-weight: 600;
        }
        .tab-content {
            padding: 28px;
            display: none;
            min-height: 300px;
        }
        .tab-content.active { display: block; }
        
        /* Pay Transparency Criteria */
        .criteria-item {
            margin-bottom: 24px;
        }
        .criteria-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        .criteria-label {
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.95rem;
        }
        .criteria-label i {
            color: var(--text-secondary);
        }
        .criteria-value {
            font-weight: 700;
            color: var(--black);
        }
        .criteria-bar {
            height: 20px;
            background: var(--bg-hover);
            border-radius: var(--radius-md);
            overflow: hidden;
            position: relative;
        }
        .criteria-fill {
            height: 100%;
            border-radius: var(--radius-md);
            transition: width 0.5s ease;
            position: relative;
        }
        .criteria-fill.skills { background: var(--black); }
        .criteria-fill.responsibility { background: var(--sage); }
        .criteria-fill.effort { background: var(--success); }
        .criteria-fill.working { background: var(--warning); }
        
        /* Grading Slider */
        .grading-section {
            margin-top: 20px;
        }
        .pay-fairly-group {
            background: var(--accent-light);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            padding: 18px 24px;
            margin-bottom: 24px;
        }
        .pay-fairly-group h4 {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 6px;
            font-weight: 500;
        }
        .pay-fairly-group p {
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--black);
        }
        .grade-slider-container {
            margin-top: 32px;
        }
        .grade-slider-label {
            font-weight: 600;
            margin-bottom: 16px;
            display: block;
            font-size: 0.95rem;
        }
        .grade-slider {
            display: flex;
            gap: 2px;
            margin-bottom: 10px;
        }
        .grade-slot {
            flex: 1;
            height: 44px;
            background: var(--sage);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.85rem;
            color: var(--text-primary);
            transition: all 0.3s ease;
        }
        .grade-slot:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
        .grade-slot:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
        .grade-slot.selected {
            background: var(--black);
            color: var(--ivory);
            transform: scaleY(1.15);
            box-shadow: var(--shadow-lg);
            z-index: 1;
        }
        .grade-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
            color: var(--text-secondary);
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        /* Placeholder content */
        .placeholder-content {
            color: var(--text-secondary);
            line-height: 1.8;
        }
        .placeholder-content h4 {
            color: var(--text-primary);
            margin-bottom: 12px;
            font-weight: 600;
        }
        
        /* ESCO content */
        .esco-content {
            color: var(--text-secondary);
            line-height: 1.8;
        }
        .esco-content h4 {
            color: var(--text-primary);
            margin-bottom: 12px;
            font-weight: 600;
        }
        .esco-description {
            background: var(--bg-hover);
            border-radius: var(--radius-md);
            padding: 18px;
            line-height: 1.7;
        }
        .esco-alt-labels {
            color: var(--text-secondary);
        }
        
        /* ESCO Level Boxes */
        .esco-level-box {
            background: var(--bg-hover);
            border-radius: var(--radius-lg);
            padding: 20px 24px;
            margin-bottom: 16px;
            border-left: 4px solid var(--black);
        }
        .esco-level-box.parent-level {
            border-left-color: var(--sage);
            background: var(--bg-input);
        }
        .esco-level-box.direct-match {
            border-left-color: var(--success);
            background: var(--success-light);
        }
        .level-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        .level-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            border-radius: 100px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .level-badge.parent {
            background: var(--sage);
            color: var(--text-primary);
        }
        .level-badge.direct {
            background: var(--success);
            color: white;
        }
        .esco-level-box h4 {
            margin: 0;
            color: var(--text-primary);
            font-size: 1.1rem;
            font-weight: 600;
        }
        .esco-code-line {
            margin: 6px 0 0 0;
            font-size: 0.9rem;
            color: var(--text-secondary);
        }
        
        /* Similarity Scores */
        .similarity-scores {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid var(--border-light);
        }
        .similarity-item {
            display: grid;
            grid-template-columns: 140px 1fr 60px;
            align-items: center;
            gap: 14px;
            margin-bottom: 12px;
        }
        .similarity-item.combined {
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px dashed var(--border-light);
        }
        .sim-label {
            font-size: 0.85rem;
            color: var(--text-secondary);
            font-weight: 500;
        }
        .sim-bar-container {
            height: 8px;
            background: var(--bg-hover);
            border-radius: 4px;
            overflow: hidden;
        }
        .sim-bar {
            height: 100%;
            border-radius: 4px;
            transition: width 0.5s ease;
        }
        .sim-bar.title-sim { background: var(--black); }
        .sim-bar.desc-sim { background: var(--success); }
        .sim-bar.combined-sim { background: var(--sage); }
        .sim-value {
            font-weight: 600;
            text-align: right;
            color: var(--text-primary);
        }
        
        /* Grading Metrics */
        .grading-metrics {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-bottom: 24px;
        }
        .metric-card {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 16px;
            border: 1px solid var(--border-light);
            box-shadow: var(--shadow-sm);
            transition: all 0.2s ease;
        }
        .metric-card:hover {
            box-shadow: var(--shadow-md);
        }
        .metric-icon {
            width: 48px;
            height: 48px;
            background: var(--accent-light);
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: var(--black);
        }
        .metric-content {
            display: flex;
            flex-direction: column;
        }
        .metric-label {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 4px;
            font-weight: 500;
        }
        .metric-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.02em;
        }
        
        /* Combined Score Box */
        .combined-score-box {
            background: var(--accent-light);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            padding: 18px 24px;
            display: flex;
            align-items: center;
            gap: 14px;
            margin: 24px 0;
        }
        .combined-score-box i {
            font-size: 22px;
            color: var(--black);
        }
        .combined-score-box span {
            color: var(--text-secondary);
            font-weight: 500;
        }
        .combined-score-box strong {
            font-size: 1.5rem;
            color: var(--black);
            margin-left: auto;
            font-weight: 700;
        }
        
        /* Criteria Details Cards */
        .criteria-details {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-top: 24px;
        }
        .criteria-detail-card {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            overflow: hidden;
            border: 1px solid var(--border-light);
        }
        .detail-header {
            padding: 14px 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            font-weight: 600;
        }
        .detail-header.responsibility { background: var(--bg-hover); border-left: 4px solid var(--sage); }
        .detail-header.skills { background: var(--bg-hover); border-left: 4px solid var(--black); }
        .detail-header.effort { background: var(--bg-hover); border-left: 4px solid var(--success); }
        .detail-header.working { background: var(--bg-hover); border-left: 4px solid var(--warning); }
        .detail-number {
            width: 24px;
            height: 24px;
            background: var(--accent-light);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
        }
        .detail-title {
            flex: 1;
            color: var(--text-primary);
        }
        .detail-weight {
            color: var(--text-muted);
            font-weight: 400;
            font-size: 0.85rem;
        }
        .detail-body {
            padding: 18px 20px;
        }
        .detail-body p {
            margin: 0 0 8px 0;
            color: var(--text-secondary);
            line-height: 1.6;
        }
        .detail-body p strong {
            color: var(--text-primary);
        }
        .detail-signals {
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px dashed var(--border-light);
        }
        .detail-signals p {
            margin: 4px 0;
            font-size: 0.9rem;
            padding-left: 18px;
            position: relative;
        }
        .detail-signals p::before {
            content: '-';
            position: absolute;
            left: 0;
            color: var(--black);
        }
        
        /* =================================================================
           PAY TRANSPARENCY v3.1 - Redesigned Layout
           ================================================================= */
        
        .criteria-details-v3 {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .criteria-card-v3 {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            overflow: hidden;
            border: 1px solid var(--border-light);
            transition: all 0.3s ease;
            box-shadow: var(--shadow-sm);
        }
        .criteria-card-v3:hover {
            border-color: var(--sage);
            box-shadow: var(--shadow-md);
        }
        
        .card-header-v3 {
            padding: 18px 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-light);
        }
        .card-header-v3.responsibility { background: var(--bg-hover); border-left: 4px solid var(--sage); }
        .card-header-v3.skills { background: var(--bg-hover); border-left: 4px solid var(--black); }
        .card-header-v3.effort { background: var(--bg-hover); border-left: 4px solid var(--success); }
        .card-header-v3.working { background: var(--bg-hover); border-left: 4px solid var(--warning); }
        
        .card-title-row {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .card-number {
            width: 28px;
            height: 28px;
            background: var(--accent-light);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text-primary);
        }
        .card-title {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
            letter-spacing: -0.01em;
        }
        .card-weight {
            color: var(--text-muted);
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        .card-body-v3 {
            padding: 24px;
        }
        
        /* Score Row with Inline Bar */
        .score-row-v3 {
            display: flex;
            align-items: center;
            gap: 18px;
            margin-bottom: 18px;
            padding-bottom: 18px;
            border-bottom: 1px solid var(--border-light);
        }
        .score-label-v3 {
            min-width: 140px;
            font-size: 1rem;
        }
        .score-label-v3 strong {
            color: var(--text-primary);
        }
        .score-label-v3 span {
            color: var(--black);
            font-weight: 700;
            font-size: 1.1rem;
        }
        .score-max {
            color: var(--text-muted) !important;
            font-weight: 400 !important;
            font-size: 0.9rem !important;
        }
        
        .score-bar-v3 {
            flex: 1;
            height: 10px;
            background: var(--bg-hover);
            border-radius: 5px;
            overflow: hidden;
        }
        .score-fill-v3 {
            height: 100%;
            border-radius: 5px;
            transition: width 0.8s ease;
        }
        .score-fill-v3.responsibility { background: var(--sage); }
        .score-fill-v3.skills { background: var(--black); }
        .score-fill-v3.effort { background: var(--success); }
        .score-fill-v3.working { background: var(--warning); }
        
        /* Card Info Rows */
        .card-info-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            color: var(--text-secondary);
        }
        .card-info-row .info-label {
            color: var(--text-muted);
            min-width: 120px;
            font-weight: 500;
        }
        .card-info-row .info-label i {
            margin-right: 8px;
            color: var(--text-secondary);
        }
        .card-info-row .info-value {
            color: var(--text-primary);
            font-weight: 500;
        }
        
        .card-definition {
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px dashed var(--border-light);
        }
        .card-definition .info-label {
            color: var(--text-muted);
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }
        .card-definition .info-label i {
            margin-right: 8px;
            color: var(--text-secondary);
        }
        .card-definition .info-value {
            color: var(--text-secondary);
            line-height: 1.6;
            font-style: italic;
        }
        
        /* Signals Section v3 - Beautiful Sentences */
        .signals-section-v3 {
            margin-top: 18px;
            padding-top: 18px;
            border-top: 1px solid var(--border-light);
        }
        .signals-header {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-muted);
            margin-bottom: 14px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .signals-header i {
            margin-right: 8px;
            color: var(--text-secondary);
        }
        
        .signals-list-v3 {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .signal-item-v3 {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 14px 18px;
            background: var(--bg-hover);
            border-radius: var(--radius-md);
            border-left: 3px solid var(--black);
        }
        .signal-item-v3 i {
            color: var(--text-secondary);
            margin-top: 3px;
            flex-shrink: 0;
        }
        .signal-item-v3 .signal-text {
            color: var(--text-secondary);
            line-height: 1.6;
        }
        .signal-item-v3 .signal-highlight {
            color: var(--text-primary);
            font-weight: 600;
        }
        
        /* Total Score Box - Bottom Position */
        .total-score-box-v3 {
            margin-top: 28px;
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            padding: 28px;
            box-shadow: var(--shadow-sm);
        }
        .total-score-main {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 18px;
        }
        .total-score-label {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .total-score-label i {
            color: var(--text-secondary);
            font-size: 1.2rem;
        }
        .total-score-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--black);
        }
        .total-score-note {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding-top: 18px;
            border-top: 1px solid var(--border-light);
            font-size: 0.85rem;
            color: var(--text-muted);
            line-height: 1.6;
        }
        .total-score-note i {
            color: var(--text-secondary);
            margin-top: 2px;
            flex-shrink: 0;
        }
        
        /* =================================================================
           GRADING TAB - Signals Section
           ================================================================= */
        
        .grading-signals-section {
            margin-top: 28px;
            padding-top: 28px;
            border-top: 1px solid var(--border-light);
        }
        .signals-section-header {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 18px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .signals-section-header i {
            color: var(--text-secondary);
        }
        
        .signals-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 18px;
        }
        
        .signals-category-box {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: var(--shadow-sm);
        }
        .signals-category-title {
            padding: 14px 18px;
            background: var(--bg-hover);
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid var(--border-light);
        }
        .signals-category-title i {
            color: var(--text-secondary);
        }
        
        .signals-category-list {
            padding: 14px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .signal-compact {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 12px 14px;
            background: var(--bg-hover);
            border-radius: var(--radius-md);
            border-left: 3px solid var(--black);
            font-size: 0.9rem;
            line-height: 1.6;
            color: var(--text-secondary);
        }
        .signal-compact i {
            color: var(--text-secondary);
            margin-top: 2px;
            flex-shrink: 0;
            width: 16px;
            text-align: center;
        }
        .signal-compact .highlight {
            color: var(--text-primary);
            font-weight: 600;
        }
        
        .no-signals-msg {
            padding: 16px;
            text-align: center;
            color: var(--text-muted);
            font-style: italic;
            font-size: 0.9rem;
        }
        
        .grading-source-note {
            margin-top: 20px;
            padding: 16px 20px;
            background: rgba(99, 102, 241, 0.08);
            border: 1px solid rgba(99, 102, 241, 0.2);
            border-radius: 10px;
            display: flex;
            align-items: flex-start;
            gap: 12px;
            font-size: 0.85rem;
            color: var(--text-muted);
            line-height: 1.6;
        }
        .grading-source-note i {
            color: var(--accent);
            margin-top: 2px;
            flex-shrink: 0;
        }
        
        /* Criteria Summary in Pay Transparency tab */
        .criteria-summary {
            margin-bottom: 0;
        }
        .criteria-summary .criteria-item {
            margin-bottom: 20px;
        }
        
        /* Generated Definition Box (v3.0) */
        .generated-definition-box {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 78, 59, 0.2));
            border: 1px solid rgba(16, 185, 129, 0.3);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .definition-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }
        .definition-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 14px;
            background: rgba(16, 185, 129, 0.2);
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            color: #34d399;
            text-transform: uppercase;
        }
        .definition-badge i {
            font-size: 14px;
        }
        .definition-word-count {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }
        .definition-text {
            line-height: 1.8;
            color: var(--text-primary);
            font-size: 0.95rem;
        }
        .definition-text p {
            margin: 0;
        }
        
        /* ESCO Database Description */
        .esco-description-section {
            margin-top: 20px;
        }
        .esco-db-header {
            margin-bottom: 12px;
        }
        .esco-db-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 14px;
            background: rgba(99, 102, 241, 0.2);
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            color: #a5b4fc;
            text-transform: uppercase;
        }
        .esco-db-badge i {
            font-size: 14px;
        }
        
        /* Skills Section */
        .skills-section {
            margin-top: 24px;
            border-top: 1px solid var(--border-color);
            padding-top: 20px;
        }
        .skills-category {
            margin-bottom: 20px;
        }
        .skills-category-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 12px;
            cursor: pointer;
            user-select: none;
        }
        .skills-category-header h4 {
            margin: 0;
            font-size: 1rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .skills-category-header .badge {
            background: rgba(99, 102, 241, 0.2);
            color: var(--accent);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.75rem;
            font-weight: 600;
        }
        .skills-category-header.essential h4 {
            color: var(--success);
        }
        .skills-category-header.essential .badge {
            background: rgba(16, 185, 129, 0.2);
            color: var(--success);
        }
        .skills-category-header.optional h4 {
            color: var(--warning);
        }
        .skills-category-header.optional .badge {
            background: rgba(245, 158, 11, 0.2);
            color: var(--warning);
        }
        .skills-group {
            margin-bottom: 12px;
        }
        .skills-group-label {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 8px;
            font-weight: 500;
        }
        .skills-group-label i {
            font-size: 0.8rem;
        }
        .skills-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .skill-tag {
            background: rgba(51, 65, 85, 0.6);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            transition: all 0.2s;
        }
        .skill-tag:hover {
            background: rgba(99, 102, 241, 0.2);
            border-color: var(--accent);
        }
        .skill-tag.knowledge {
            border-left: 3px solid #8b5cf6;
        }
        .skill-tag.competence {
            border-left: 3px solid #06b6d4;
        }
        .no-skills {
            color: var(--text-muted);
            font-style: italic;
            font-size: 0.85rem;
        }
        
        /* Match quality badges */
        .match-quality {
            padding: 5px 12px;
            border-radius: 100px;
            font-size: 0.8rem;
            font-weight: 600;
            margin-left: 8px;
        }
        .match-quality.unusable {
            background: var(--error-light);
            color: var(--error);
        }
        .match-quality.usable {
            background: var(--warning-light);
            color: var(--warning);
        }
        .match-quality.perfect {
            background: var(--success-light);
            color: var(--success);
        }
        
        /* Results actions */
        .results-actions { 
            margin-top: 28px; 
            display: flex; 
            gap: 12px; 
            justify-content: center;
            padding-top: 24px;
            border-top: 1px solid var(--border-light);
        }
        
        /* History Page */
        .history-container {
            display: grid;
            grid-template-columns: 480px 1fr;
            gap: 24px;
            min-height: 700px;
        }
        .history-list-panel {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: var(--shadow-sm);
        }
        .history-list-header {
            padding: 18px 20px;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .history-list-header h3 {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 0;
            font-size: 1rem;
            font-weight: 600;
        }
        .history-count {
            background: var(--accent-light);
            color: var(--text-primary);
            padding: 5px 14px;
            border-radius: 100px;
            font-size: 0.85rem;
            font-weight: 600;
        }
        /* Search and Filters */
        .history-filters {
            padding: 14px;
            border-bottom: 1px solid var(--border-light);
            background: var(--bg-hover);
        }
        .history-search {
            position: relative;
            margin-bottom: 12px;
        }
        .history-search input {
            width: 100%;
            padding: 12px 14px 12px 40px;
            border: 1px solid var(--border-light);
            border-radius: var(--radius-md);
            background: var(--bg-card);
            color: var(--text-primary);
            font-size: 0.9rem;
        }
        .history-search input:focus {
            border-color: var(--black);
            box-shadow: 0 0 0 3px var(--accent-light);
        }
        .history-search input:focus:not(:focus-visible) {
            outline: none;
        }
        .history-search i {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
        }
        .history-filter-row {
            display: flex;
            gap: 10px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }
        .history-filter-row select,
        .history-filter-row input[type="date"],
        .history-filter-row input[type="number"] {
            padding: 10px 12px;
            border: 1px solid var(--border-light);
            border-radius: var(--radius-sm);
            background: var(--bg-card);
            color: var(--text-primary);
            font-size: 0.85rem;
            min-width: 0;
        }
        .history-filter-row input[type="date"] {
            width: 145px;
            padding-right: 8px;
        }
        .history-filter-row input[type="date"]::-webkit-calendar-picker-indicator {
            opacity: 0.6;
            cursor: pointer;
            width: 14px;
            height: 14px;
            margin-left: 4px;
        }
        .history-filter-row select:focus,
        .history-filter-row input:focus {
            border-color: var(--black);
        }
        .history-filter-row select:focus:not(:focus-visible),
        .history-filter-row input:focus:not(:focus-visible) {
            outline: none;
        }
        .history-filter-row label {
            font-size: 0.8rem;
            color: var(--text-secondary);
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
        }
        .history-filter-group {
            flex: 1;
            min-width: 140px;
        }
        .history-sort-row {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        .history-sort-row select {
            flex: 1;
            padding: 8px 10px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background: var(--bg-primary);
            color: var(--text-primary);
            font-size: 0.8rem;
        }
        .btn-icon {
            width: 34px;
            height: 34px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background: var(--bg-primary);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        .btn-icon:hover {
            border-color: var(--accent);
            color: var(--accent);
        }
        .btn-icon.active {
            background: var(--black);
            border-color: var(--black);
            color: var(--ivory);
        }
        /* History Actions Bar */
        .history-actions-bar {
            padding: 12px 14px;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            background: var(--bg-card);
        }
        .history-actions-bar .btn {
            padding: 8px 14px;
            font-size: 0.85rem;
        }
        .compare-count {
            background: var(--black);
            color: var(--ivory);
            padding: 2px 8px;
            border-radius: 100px;
            font-size: 0.75rem;
            margin-left: 6px;
        }
        .history-list {
            flex: 1;
            overflow-y: auto;
            padding: 14px;
        }
        .history-item {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            padding: 16px;
            padding-right: 75px;
            margin-bottom: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
            box-shadow: var(--shadow-sm);
        }
        .history-item:hover {
            border-color: var(--sage);
            box-shadow: var(--shadow-md);
        }
        .history-item.active {
            border-color: var(--black);
            background: var(--accent-light);
        }
        .history-item.selected-compare {
            border-color: var(--warning);
            background: var(--warning-light);
        }
        .history-item-checkbox {
            position: absolute;
            top: 50%;
            left: 16px;
            transform: translateY(-50%);
            width: 20px;
            height: 20px;
            cursor: pointer;
            accent-color: var(--black);
            z-index: 10;
        }
        .history-item.has-checkbox {
            padding-left: 48px;
        }
        .history-item-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 10px;
            gap: 12px;
        }
        .history-item-title {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 0.95rem;
            line-height: 1.4;
            flex: 1;
            word-break: break-word;
        }
        .history-item-grade {
            background: var(--black);
            color: var(--ivory);
            padding: 5px 12px;
            border-radius: var(--radius-sm);
            font-weight: 700;
            font-size: 0.8rem;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .history-item-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        .history-item-meta span {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .history-item-actions {
            position: absolute;
            top: 50%;
            right: 14px;
            transform: translateY(-50%);
            display: flex;
            gap: 8px;
            opacity: 0;
            transition: opacity 0.2s ease;
            z-index: 5;
        }
        .history-item:hover .history-item-actions {
            opacity: 1;
        }
        .history-item-btn {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            color: var(--text-secondary);
            width: 28px;
            height: 28px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            transition: all 0.2s;
        }
        .history-item-btn:hover {
            background: var(--black);
            border-color: var(--black);
            color: var(--ivory);
        }
        .history-item-btn.delete:hover {
            background: var(--error);
            border-color: var(--error);
            color: white;
        }
        
        /* Batch folder styles */
        .batch-folder {
            background: var(--accent-light);
            border: 1px solid var(--border-light);
            padding-right: 14px;
        }
        .batch-folder:hover {
            border-color: var(--black);
            background: var(--bg-hover);
        }
        .batch-folder .history-item-title i {
            color: var(--text-secondary);
            margin-right: 8px;
        }
        .batch-folder .batch-count {
            background: var(--accent-light);
            color: var(--text-primary);
            font-weight: 600;
        }
        .batch-folder-header {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 14px 16px;
            background: var(--accent-light);
            border-radius: var(--radius-lg);
            margin-bottom: 12px;
            cursor: pointer;
            border: 1px solid var(--border-light);
            transition: all 0.2s ease;
        }
        .batch-folder-header:hover {
            background: var(--bg-hover);
            border-color: var(--sage);
        }
        .batch-folder-title {
            color: var(--text-primary);
            font-weight: 600;
            font-size: 0.95rem;
        }
        .batch-folder-title i {
            margin-right: 8px;
            color: var(--text-secondary);
        }
        
        .history-detail-panel {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: var(--shadow-sm);
        }
        .history-detail-header {
            padding: 24px;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            flex-wrap: wrap;
            gap: 14px;
            background: var(--bg-hover);
        }
        .history-detail-header h2 {
            margin: 0 0 8px 0;
            font-size: 1.25rem;
            font-weight: 600;
        }
        .history-detail-header .meta {
            color: var(--text-muted);
            font-size: 0.85rem;
            display: flex;
            gap: 18px;
            flex-wrap: wrap;
        }
        .history-detail-actions {
            display: flex;
            gap: 10px;
        }
        .history-detail-actions .btn {
            padding: 10px 16px;
            font-size: 0.85rem;
        }
        .history-detail-content {
            padding: 24px;
            max-height: calc(700px - 120px);
            overflow-y: auto;
        }
        /* Notes Section */
        .notes-section {
            margin-top: 20px;
        }
        .notes-section h4 {
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
        }
        .note-add-form {
            margin-bottom: 18px;
            padding-bottom: 18px;
            border-bottom: 1px solid var(--border-light);
        }
        .notes-textarea {
            width: 100%;
            min-height: 70px;
            padding: 14px;
            border: 1px solid var(--border-light);
            border-radius: var(--radius-md);
            background: var(--bg-input);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.9rem;
            resize: vertical;
            transition: all 0.2s ease;
        }
        .notes-textarea:focus {
            border-color: var(--black);
            box-shadow: 0 0 0 3px var(--accent-light);
        }
        .notes-textarea:focus:not(:focus-visible) {
            outline: none;
        }
        .notes-actions {
            display: flex;
            justify-content: flex-end;
            margin-top: 10px;
        }
        .notes-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .note-item {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-md);
            padding: 14px;
            position: relative;
        }
        .note-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }
        .note-item-date {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        .note-item-actions {
            display: flex;
            gap: 6px;
        }
        .note-item-btn {
            background: transparent;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            transition: all 0.2s;
        }
        .note-item-btn:hover {
            background: var(--bg-hover);
            color: var(--black);
        }
        .note-item-btn.delete:hover {
            color: var(--error);
            background: var(--error-light);
        }
        .note-item-text {
            font-size: 0.9rem;
            color: var(--text-primary);
            line-height: 1.6;
            white-space: pre-wrap;
        }
        .note-item.editing .note-item-text {
            display: none;
        }
        .note-item-edit {
            display: none;
        }
        .note-item.editing .note-item-edit {
            display: block;
        }
        .note-item-edit textarea {
            width: 100%;
            min-height: 70px;
            padding: 12px;
            border: 1px solid var(--black);
            border-radius: var(--radius-sm);
            background: var(--bg-input);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.9rem;
            resize: vertical;
            margin-bottom: 10px;
        }
        .note-item-edit-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }
        .notes-empty {
            text-align: center;
            color: var(--text-muted);
            padding: 24px;
            font-style: italic;
        }
        .history-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--text-muted);
            text-align: center;
            padding: 48px;
        }
        .history-empty i {
            font-size: 4rem;
            margin-bottom: 24px;
            opacity: 0.25;
            color: var(--sage);
        }
        .history-empty h3 {
            margin-bottom: 12px;
            color: var(--text-primary);
            font-weight: 600;
        }
        .history-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: var(--text-muted);
            text-align: center;
        }
        .history-placeholder i {
            font-size: 3rem;
            margin-bottom: 18px;
            opacity: 0.25;
            color: var(--sage);
        }
        /* Compare Modal */
        .compare-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(27, 27, 27, 0.6);
            backdrop-filter: blur(4px);
            z-index: 2000;
            padding: 48px;
            overflow-y: auto;
        }
        .compare-modal.active {
            display: block;
        }
        .compare-modal-content {
            background: var(--bg-card);
            border-radius: var(--radius-xl);
            max-width: 1400px;
            margin: 0 auto;
            border: 1px solid var(--border-light);
            box-shadow: var(--shadow-xl);
        }
        .compare-modal-header {
            padding: 24px;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--bg-hover);
        }
        .compare-modal-header h2 {
            margin: 0;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .compare-modal-body {
            padding: 28px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 24px;
        }
        .compare-card {
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-lg);
            padding: 24px;
            box-shadow: var(--shadow-sm);
        }
        .compare-card h3 {
            margin: 0 0 6px 0;
            font-size: 1.1rem;
            font-weight: 600;
        }
        .compare-card .grade-badge {
            display: inline-block;
            background: var(--black);
            color: var(--ivory);
            padding: 6px 14px;
            border-radius: var(--radius-sm);
            font-weight: 700;
            margin: 12px 0;
        }
        .compare-card .meta {
            font-size: 0.85rem;
            color: var(--text-muted);
            margin-bottom: 18px;
        }
        .compare-criteria {
            margin-top: 14px;
        }
        .compare-criteria .criteria-item {
            margin-bottom: 12px;
        }
        .compare-skills-section {
            margin-top: 18px;
            padding-top: 18px;
            border-top: 1px solid var(--border-light);
        }
        .compare-skills-category {
            margin-bottom: 14px;
        }
        .compare-skills-group {
            margin-bottom: 10px;
        }
        .compare-skills-label {
            display: block;
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-bottom: 6px;
            font-weight: 500;
        }
        .compare-skills-section .skills-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .compare-skills-section .skill-tag {
            font-size: 0.75rem;
            padding: 4px 10px;
        }
        .compare-skills-section .no-skills {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-style: italic;
        }
        @media (max-width: 1000px) {
            .history-container {
                grid-template-columns: 1fr;
            }
            .history-list-panel {
                max-height: 500px;
            }
        }
        
        /* Quality Warning Modal */
        .quality-warning-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(27, 27, 27, 0.6);
            backdrop-filter: blur(4px);
            z-index: 3000;
            align-items: center;
            justify-content: center;
        }
        .quality-warning-modal.active {
            display: flex;
        }
        .quality-warning-content {
            background: var(--bg-card);
            border-radius: var(--radius-xl);
            max-width: 480px;
            padding: 36px;
            text-align: center;
            border: 1px solid var(--border-light);
            box-shadow: var(--shadow-xl);
        }
        .quality-warning-icon {
            width: 68px;
            height: 68px;
            border-radius: 50%;
            background: var(--error-light);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 24px;
        }
        .quality-warning-icon i {
            font-size: 28px;
            color: var(--error);
        }
        .quality-warning-content h3 {
            margin: 0 0 18px 0;
            color: var(--error);
            font-size: 1.25rem;
            font-weight: 600;
        }
        .quality-warning-content p {
            color: var(--text-secondary);
            margin: 0 0 14px 0;
            line-height: 1.6;
        }
        .quality-warning-note {
            font-size: 0.9rem;
            color: var(--text-muted);
            background: var(--bg-hover);
            padding: 14px;
            border-radius: var(--radius-md);
            margin-top: 18px !important;
        }
        .quality-warning-buttons {
            display: flex;
            gap: 14px;
            margin-top: 28px;
            justify-content: center;
        }
        .quality-warning-buttons .btn {
            min-width: 140px;
        }
        .btn-danger {
            background: var(--error);
            color: white;
            border: none;
        }
        .btn-danger:hover {
            background: #7A2D2D;
        }
        
        /* Language Switcher */
        .language-switcher {
            display: flex;
            gap: 4px;
            background: var(--bg-hover);
            padding: 5px;
            border-radius: var(--radius-md);
            border: 1px solid var(--border-light);
        }
        .lang-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 14px;
            border: none;
            border-radius: var(--radius-sm);
            background: transparent;
            color: var(--text-secondary);
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .lang-btn:hover {
            background: var(--bg-card);
            color: var(--text-primary);
        }
        .lang-btn.active {
            background: var(--black);
            color: var(--ivory);
        }
        
        /* Results Language Toggle */
        .results-lang-toggle {
            display: flex;
            gap: 4px;
            background: var(--bg-card);
            padding: 4px;
            border-radius: var(--radius-sm);
            margin-left: auto;
            border: 1px solid var(--border-light);
        }
        .results-lang-btn {
            padding: 6px 12px;
            border: none;
            border-radius: var(--radius-sm);
            background: transparent;
            color: var(--text-secondary);
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .results-lang-btn:hover {
            color: var(--text-primary);
        }
        .results-lang-btn.active {
            background: var(--black);
            color: var(--ivory);
        }
        
        /* Resources Page - New Design */
        .resources-hero {
            text-align: center;
            padding: 80px 48px;
            background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
            position: relative;
            overflow: hidden;
        }
        .resources-hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2340C4D8' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
            opacity: 0.5;
        }
        .resources-hero h1 {
            font-size: 3.5rem;
            font-weight: 700;
            color: #FFFFFF;
            margin-bottom: 20px;
            position: relative;
            z-index: 1;
        }
        .resources-hero p {
            font-size: 1.25rem;
            color: rgba(255,255,255,0.7);
            max-width: 600px;
            margin: 0 auto;
            line-height: 1.7;
            position: relative;
            z-index: 1;
        }
        
        .resources-container {
            max-width: 1100px;
            margin: 0 auto;
            padding: 0 48px 60px;
            background: #FFFFFF;
        }
        
        .resource-item {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 60px;
            align-items: center;
            padding: 60px 0;
            border-bottom: 1px solid #eee;
            opacity: 0;
            transform: translateY(40px);
            transition: opacity 0.6s ease, transform 0.6s ease;
        }
        .resource-item.revealed {
            opacity: 1;
            transform: translateY(0);
        }
        .resource-item:last-child {
            border-bottom: none;
        }
        .resource-item:nth-child(even) {
            direction: rtl;
        }
        .resource-item:nth-child(even) > * {
            direction: ltr;
        }
        
        .resource-image {
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 15px 50px rgba(0,0,0,0.12);
            transition: transform 0.4s ease, box-shadow 0.4s ease;
            background: #f5f5f5;
        }
        .resource-item:hover .resource-image {
            transform: translateY(-8px);
            box-shadow: 0 25px 60px rgba(0,0,0,0.18);
        }
        .resource-image img {
            width: 100%;
            height: 280px;
            object-fit: cover;
            display: block;
        }
        .resource-image.contain-img img {
            object-fit: contain;
            background: #1a1a2e;
            padding: 20px;
        }
        
        .resource-content {
            padding: 10px 0;
        }
        .resource-number {
            font-size: 4rem;
            font-weight: 800;
            background: linear-gradient(135deg, #40C4D8 0%, #35B0C3 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1;
            margin-bottom: 8px;
            opacity: 0.9;
        }
        .resource-content h2 {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--black);
            margin-bottom: 16px;
        }
        .resource-content p {
            font-size: 1rem;
            line-height: 1.75;
            color: var(--text-secondary);
            margin-bottom: 24px;
        }
        .resource-btn {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 14px 28px;
            background: linear-gradient(135deg, #40C4D8 0%, #35B0C3 100%);
            color: #FFFFFF;
            border-radius: 50px;
            font-weight: 600;
            font-size: 0.95rem;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(64, 196, 216, 0.3);
        }
        .resource-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(64, 196, 216, 0.4);
        }
        .resource-btn i {
            transition: transform 0.3s ease;
        }
        .resource-btn:hover i {
            transform: translateX(4px);
        }
        
        @media (max-width: 900px) {
            .resource-item {
                grid-template-columns: 1fr;
                gap: 30px;
                padding: 50px 0;
            }
            .resource-item:nth-child(even) {
                direction: ltr;
            }
            .resource-image img {
                height: 240px;
            }
            .resources-hero h1 {
                font-size: 2.5rem;
            }
            .resource-number {
                font-size: 3rem;
            }
            .resource-content h2 {
                font-size: 1.5rem;
            }
        }
        @media (max-width: 600px) {
            .resources-container {
                padding: 0 24px 40px;
            }
            .resources-hero {
                padding: 60px 24px;
            }
            .resources-hero h1 {
                font-size: 2rem;
            }
        }
        
        /* Skeleton Loading */
        @keyframes shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }
        @keyframes pulse {
            0%, 100% { opacity: 0.6; }
            50% { opacity: 0.3; }
        }
        .skeleton {
            background: linear-gradient(90deg, 
                var(--bg-hover) 25%, 
                var(--sage) 50%, 
                var(--bg-hover) 75%
            );
            background-size: 200% 100%;
            animation: shimmer 1.5s ease-in-out infinite;
            border-radius: var(--radius-sm);
        }
        .skeleton-text {
            height: 14px;
            margin-bottom: 10px;
        }
        .skeleton-text.short { width: 40%; }
        .skeleton-text.medium { width: 70%; }
        .skeleton-text.long { width: 90%; }
        .skeleton-title {
            height: 24px;
            width: 60%;
            margin-bottom: 14px;
        }
        .skeleton-badge {
            height: 28px;
            width: 80px;
            border-radius: var(--radius-sm);
        }
        .skeleton-bar {
            height: 8px;
            width: 100%;
            border-radius: 4px;
            margin-top: 10px;
        }
        .skeleton-card {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            padding: 16px;
            margin-bottom: 12px;
            border: 1px solid var(--border-light);
        }
        .skeleton-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }
        .skeleton-card-meta {
            display: flex;
            gap: 16px;
        }
        .skeleton-meta-item {
            height: 12px;
            width: 60px;
        }
        
        /* Micro-interactions */
        @keyframes popIn {
            0% { transform: scale(0.8); opacity: 0; }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); opacity: 1; }
        }
        @keyframes bounceIn {
            0% { transform: scale(0.3); opacity: 0; }
            50% { transform: scale(1.08); }
            70% { transform: scale(0.95); }
            100% { transform: scale(1); opacity: 1; }
        }
        @keyframes slideInRight {
            from { transform: translateX(20px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }
        @keyframes slideOutLeft {
            from { transform: translateX(0); opacity: 1; }
            to { transform: translateX(-20px); opacity: 0; }
        }
        @keyframes slideOutRight {
            from { transform: translateX(0); opacity: 1; }
            to { transform: translateX(100%); opacity: 0; }
        }
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-5px); }
            40%, 80% { transform: translateX(5px); }
        }
        @keyframes glow {
            0%, 100% { box-shadow: 0 0 5px rgba(27, 27, 27, 0.15); }
            50% { box-shadow: 0 0 20px rgba(27, 27, 27, 0.25); }
        }
        @keyframes checkmark {
            0% { transform: scale(0); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }
        @keyframes fadeSlideIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .animate-pop { animation: popIn 0.3s ease-out; }
        .animate-bounce { animation: bounceIn 0.5s ease-out; }
        .animate-slide-in { animation: slideInRight 0.3s ease-out; }
        .animate-slide-out { animation: slideOutRight 0.3s ease-out forwards; }
        .animate-shake { animation: shake 0.4s ease-out; }
        .animate-glow { animation: glow 0.6s ease-out; }
        .animate-fade-slide { animation: fadeSlideIn 0.3s ease-out; }
        
        /* Button interactions */
        .btn {
            transition: all 0.2s ease, transform 0.1s ease;
        }
        .btn:active {
            transform: scale(0.96);
        }
        .btn.btn-success-flash {
            background: var(--success) !important;
            border-color: var(--success) !important;
            color: white !important;
        }
        .btn .fa-check.success-check {
            animation: checkmark 0.3s ease-out;
        }
        
        /* History item interactions */
        .history-item {
            transition: all 0.2s ease, transform 0.15s ease;
        }
        .history-item:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
        .history-item.removing {
            animation: slideOutRight 0.3s ease-out forwards;
        }
        
        /* Batch file item interactions */
        .batch-file-item {
            transition: all 0.2s ease;
            animation: fadeSlideIn 0.3s ease-out;
        }
        .batch-file-item.removing {
            animation: slideOutRight 0.25s ease-out forwards;
        }
        .batch-file-item.new-item {
            animation: popIn 0.3s ease-out;
        }
        
        /* Tab sliding underline */
        .analysis-mode-tabs {
            position: relative;
        }
        .mode-tab {
            transition: color 0.2s ease;
        }
        .tab-slider {
            position: absolute;
            bottom: 0;
            height: 2px;
            background: var(--black);
            transition: left 0.3s ease, width 0.3s ease;
            border-radius: 2px 2px 0 0;
        }
        
        /* Grade badge bounce */
        .history-item-grade.new-grade {
            animation: bounceIn 0.5s ease-out;
        }
        .result-grade-badge.new-grade {
            animation: bounceIn 0.5s ease-out, glow 0.6s ease-out 0.3s;
        }
        
        /* Progress bar shimmer */
        .progress-fill {
            position: relative;
            overflow: hidden;
        }
        .progress-fill.active::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(255, 255, 255, 0.4) 50%, 
                transparent 100%
            );
            animation: shimmer 1s ease-in-out infinite;
            background-size: 200% 100%;
        }
        
        /* Batch nav pill interactions */
        .batch-nav-pill {
            transition: all 0.2s ease, transform 0.15s ease;
        }
        .batch-nav-pill:hover {
            transform: translateY(-2px);
        }
        .batch-nav-pill.active {
            animation: popIn 0.2s ease-out;
        }
        
        /* Content transitions */
        .results {
            transition: opacity 0.3s ease;
        }
        .results.fade-in {
            animation: fadeSlideIn 0.4s ease-out;
        }
        
        /* Notification */
        .notification {
            position: fixed; top: 90px; right: 20px;
            padding: 16px 24px;
            border-radius: var(--radius-md);
            color: white;
            font-weight: 600;
            z-index: 1000;
            animation: slideIn 0.3s;
            box-shadow: var(--shadow-lg);
        }
        .notification.success { background: var(--success); }
        .notification.error { background: var(--error); }
        .notification.info { background: var(--black); }
        @keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        
        @media (max-width: 768px) {
            .navbar { padding: 0 20px; height: 64px; }
            .nav-links { display: none; }
            .nav-right { display: none; }
            .base-burger { display: flex; }
            .logo-text { font-size: 14px; letter-spacing: .24em; }
            .main-content { padding: 24px 20px; }
            .hero h1 { font-size: 2rem; }
            .tabs-header { flex-wrap: wrap; }
            .tab-btn { flex: 1 1 50%; font-size: 0.8rem; padding: 12px; }
            .grading-metrics { grid-template-columns: 1fr; gap: 12px; }
            .metric-card { padding: 16px; }
            .metric-value { font-size: 1.2rem; }
            .similarity-item { grid-template-columns: 100px 1fr 50px; gap: 8px; }
            .sim-label { font-size: 0.75rem; }
            .criteria-detail-card .detail-body { padding: 12px 16px; }
            .combined-score-box { flex-wrap: wrap; padding: 12px 16px; }
            .combined-score-box strong { margin-left: 0; width: 100%; text-align: center; margin-top: 8px; }
            .history-container { grid-template-columns: 1fr; }
        }

        /* === BASE HAMBURGER === */
        .base-burger { display:none; flex-direction:column; justify-content:center; gap:5px; width:28px; height:28px; cursor:pointer; z-index:1001; margin-left:auto; background:none; border:none; padding:0; }
        .base-burger span { display:block; width:100%; height:1.5px; background:#fff; transition:transform .4s,opacity .3s; }
        .base-burger.open span:nth-child(1) { transform:translateY(6.5px) rotate(45deg); }
        .base-burger.open span:nth-child(2) { opacity:0; }
        .base-burger.open span:nth-child(3) { transform:translateY(-6.5px) rotate(-45deg); }

        /* === BASE MOBILE MENU (Pill-flavoured: gold dust for active, rounded pill for CTA) === */
        .base-mobile-menu { position:fixed; inset:0; z-index:999; background:#121110; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; opacity:0; pointer-events:none; transition:opacity .4s cubic-bezier(.4,0,.2,1); }
        .base-mobile-menu.open { opacity:1; pointer-events:auto; }
        .base-mobile-menu a, .base-mobile-menu .m-logout-form button {
            font-family: 'Playfair Display', Georgia, serif;
            font-size: clamp(22px, 5.5vw, 32px);
            font-weight: 400;
            color: rgba(255,255,255,.75);
            letter-spacing: .08em;
            text-transform: uppercase;
            padding: 14px 28px;
            border-radius: 100px;
            text-decoration: none;
            background: none;
            border: none;
            cursor: pointer;
            transition: color .25s ease, background .25s ease;
            opacity: 0;
            transform: translateY(20px);
        }
        .base-mobile-menu a.active {
            color: #F6E8D4;
            background: rgba(138, 117, 96, .18);
        }
        .base-mobile-menu a.cta {
            font-family: 'Inter', sans-serif;
            font-size: clamp(15px, 3.2vw, 17px);
            font-weight: 600;
            letter-spacing: .04em;
            color: #F6F4EF;
            border: 1px solid rgba(246, 244, 239, .3);
            padding: 14px 36px;
            margin-top: 12px;
        }
        .base-mobile-menu a.cta:hover {
            background: #F6F4EF;
            color: #121110;
            border-color: #F6F4EF;
        }
        .base-mobile-menu.open a,
        .base-mobile-menu.open .m-logout-form button { animation:baseMobileNavIn .5s ease forwards; }
        .base-mobile-menu.open a:nth-child(1),
        .base-mobile-menu.open > *:nth-child(1) { animation-delay:.05s; }
        .base-mobile-menu.open > *:nth-child(2) { animation-delay:.1s; }
        .base-mobile-menu.open > *:nth-child(3) { animation-delay:.15s; }
        .base-mobile-menu.open > *:nth-child(4) { animation-delay:.2s; }
        .base-mobile-menu.open > *:nth-child(5) { animation-delay:.25s; }
        .base-mobile-menu.open > *:nth-child(6) { animation-delay:.3s; }
        .base-mobile-menu.open > *:nth-child(7) { animation-delay:.35s; }
        .base-mobile-menu a:hover { color:#fff; background: rgba(255,255,255,.04); }
        .base-mobile-menu .mobile-divider { width:40px; height:1px; background:#8A7560; opacity:.3; margin:10px 0; flex-shrink: 0; }
        .base-mobile-menu .m-logout-form { margin: 0; }
        .base-mobile-menu .m-logout-form button {
            font-family: 'Inter', sans-serif;
            font-size: 14px;
            font-weight: 400;
            letter-spacing: .04em;
            text-transform: none;
            color: rgba(255, 255, 255, .45);
        }
        .base-mobile-menu .m-logout-form button:hover {
            color: #fff;
            background: rgba(255, 255, 255, .04);
        }
        @keyframes baseMobileNavIn { to { opacity:1; transform:translateY(0); } }

        /* === ACCESSIBILITY === */
        .skip-to-content {
            position: absolute;
            top: -100px;
            left: 16px;
            background: var(--black, #1A1A1A);
            color: #fff;
            padding: 12px 24px;
            font-family: 'Inter', system-ui, sans-serif;
            font-size: 14px;
            font-weight: 600;
            text-decoration: none;
            z-index: 10000;
            border-radius: 0 0 6px 6px;
            transition: top 0.2s;
        }
        .skip-to-content:focus {
            top: 0;
        }
        :focus-visible {
            outline: 2px solid var(--gold-text, #7A6650);
            outline-offset: 2px;
        }
        /* Don't show focus ring on mouse click */
        :focus:not(:focus-visible) {
            outline: none;
        }
        /* Force keyboard focus ring on form controls even when local CSS sets outline:none
           (page-level rules like .form-input:focus { outline: none } would otherwise win
           on specificity and break keyboard navigation). */
        input:focus-visible,
        select:focus-visible,
        textarea:focus-visible,
        button:focus-visible,
        a:focus-visible,
        [tabindex]:focus-visible {
            outline: 2px solid var(--gold-text, #7A6650) !important;
            outline-offset: 2px;
        }
        /* A5: Respect user preference for reduced motion */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }