/* ============================================
   BulletproofAI.org — Editorial Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Animated Gradient Button @property declarations ── */
@property --grd-pos-x {
    syntax: '<percentage>';
    initial-value: 11.14%;
    inherits: false;
}
@property --grd-pos-y {
    syntax: '<percentage>';
    initial-value: 140%;
    inherits: false;
}
@property --grd-spread-x {
    syntax: '<percentage>';
    initial-value: 150%;
    inherits: false;
}
@property --grd-spread-y {
    syntax: '<percentage>';
    initial-value: 180.06%;
    inherits: false;
}
@property --grd-c1 {
    syntax: '<color>';
    initial-value: #000;
    inherits: false;
}
@property --grd-c2 {
    syntax: '<color>';
    initial-value: #020e24;
    inherits: false;
}
@property --grd-c3 {
    syntax: '<color>';
    initial-value: #1a3068;
    inherits: false;
}
@property --grd-c4 {
    syntax: '<color>';
    initial-value: #2450b8;
    inherits: false;
}
@property --grd-c5 {
    syntax: '<color>';
    initial-value: #1e3a8f;
    inherits: false;
}
@property --grd-s1 {
    syntax: '<percentage>';
    initial-value: 37.35%;
    inherits: false;
}
@property --grd-s2 {
    syntax: '<percentage>';
    initial-value: 61.36%;
    inherits: false;
}
@property --grd-s3 {
    syntax: '<percentage>';
    initial-value: 78.42%;
    inherits: false;
}
@property --grd-s4 {
    syntax: '<percentage>';
    initial-value: 89.52%;
    inherits: false;
}
@property --grd-s5 {
    syntax: '<percentage>';
    initial-value: 100%;
    inherits: false;
}
@property --grd-border-angle {
    syntax: '<angle>';
    initial-value: 20deg;
    inherits: true;
}
@property --grd-border-c1 {
    syntax: '<color>';
    initial-value: hsla(220, 75%, 60%, 0.2);
    inherits: true;
}
@property --grd-border-c2 {
    syntax: '<color>';
    initial-value: hsla(220, 75%, 40%, 0.75);
    inherits: true;
}

/* Light theme only (dark mode removed) */
:root {
    --bg-primary: #eff6ff;
    --bg-secondary: #f3f4f6;
    --bg-card: #ffffff;
    --bg-card-hover: #f9fafb;
    --bg-elevated: #ffffff;
    --border: rgba(0, 0, 0, 0.06);
    --border-light: rgba(0, 0, 0, 0.10);
    --border-accent: rgba(37, 99, 235, 0.25);

    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;

    --accent: #2563eb;
    --accent-light: #3b82f6;
    --accent-dim: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.08);
    --accent-glow-strong: rgba(37, 99, 235, 0.15);

    --green: #16a34a;
    --green-bg: rgba(22, 163, 74, 0.07);
    --green-border: rgba(22, 163, 74, 0.20);
    --red: #dc2626;
    --red-bg: rgba(220, 38, 38, 0.06);
    --red-border: rgba(220, 38, 38, 0.16);
    --orange: #d97706;
    --orange-bg: rgba(217, 119, 6, 0.06);
    --orange-border: rgba(217, 119, 6, 0.16);
    --blue: #3b82f6;
    --blue-bg: rgba(59, 130, 246, 0.07);
    --yellow: #ca8a04;

    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition: 0.25s var(--ease-out);

    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ---- Light theme element overrides ---- */
[data-theme="light"] body::before { opacity: 0; }
[data-theme="light"] .navbar {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    box-shadow: none;
}
[data-theme="light"] .sidebar {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .footer {
    background: var(--bg-primary, #eff6ff);
    border-top-color: transparent;
}
/* Cards get subtle border + lift shadow on hover */
[data-theme="light"] .tip-card:hover,
[data-theme="light"] .guide-card:hover,
[data-theme="light"] .feature-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
/* Mockup card dark internals get a soft gray in light mode */
[data-theme="light"] .m-video-frame {
    background: #e5e7eb;
}
[data-theme="light"] .m-video-frame::before {
    background: radial-gradient(circle at 50% 40%, rgba(37,99,235,0.06), transparent 70%);
}
/* Input / textarea */
[data-theme="light"] textarea,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"] {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] textarea:focus,
[data-theme="light"] input[type="text"]:focus,
[data-theme="light"] input[type="email"]:focus,
[data-theme="light"] input[type="password"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
/* Quote bar — frosted glass */
[data-theme="light"] .quote-bar {
    background: rgba(239, 246, 255, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
/* Section accent gradients — nearly invisible in light mode */
[data-theme="light"] .feature-section::before { opacity: 0.4; }
/* Sidebar links */
[data-theme="light"] .sidebar-link { color: #374151; }
[data-theme="light"] .sidebar-link:hover { color: var(--accent); background: rgba(37, 99, 235, 0.04); }
/* Sticky sub-nav sections — light mode */
[data-theme="light"] .tips-nav-section {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
[data-theme="light"] .analyze-easter-egg {
    text-shadow: none !important;
    animation-name: fadeUp !important;
}
[data-theme="light"] .gradient-text {
    color: #2563eb;
}
/* Sidebar overlay — lighter in light mode */
[data-theme="light"] .sidebar-overlay {
    background: rgba(0, 0, 0, 0.2);
}
/* CTA button — vibrant in light mode */
[data-theme="light"] .cta-button {
    --grd-c2: #081838;
    --grd-c3: #1d4ed8;
    --grd-c4: #2563eb;
    --grd-c5: #3b82f6;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}
[data-theme="light"] .cta-button:hover {
    --grd-c1: #60a5fa;
    --grd-c2: #3b82f6;
    --grd-c3: #2563eb;
    --grd-c4: #1e3a5f;
    --grd-c5: #0a1628;
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.35);
}
/* Mockup cards — soften dark backgrounds */
[data-theme="light"] .mockup-card {
    background: #f3f4f6;
    border-color: rgba(0, 0, 0, 0.06);
}
/* Feature sections */
[data-theme="light"] .feature-section {
    border-color: rgba(0, 0, 0, 0.05);
}
/* Checkmark items in light mode */
[data-theme="light"] .check-item {
    background: rgba(0, 0, 0, 0.02);
}
/* Label colors */
[data-theme="light"] .label.good { color: #ffffff; }
/* Analyzer tab hover — no white bg flash */
[data-theme="light"] .analyzer-tab:hover:not(.active) {
    background: rgba(0, 0, 0, 0.03);
}
/* Analyze button — calmer glow in light mode */
[data-theme="light"] .analyze-button {
    --grd-c2: #081838;
    --grd-c3: #1d4ed8;
    --grd-c4: #2563eb;
    --grd-c5: #3b82f6;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}
[data-theme="light"] .analyze-button:hover:not(:disabled) {
    --grd-c1: #60a5fa;
    --grd-c2: #3b82f6;
    --grd-c3: #2563eb;
    --grd-c4: #1e3a5f;
    --grd-c5: #0a1628;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.35);
}
/* Easter egg — no text-shadow in light mode */
[data-theme="light"] .analyze-btn-wrapper:hover .analyze-easter-egg {
    text-shadow: none;
    color: var(--accent);
}
/* Input cards */
[data-theme="light"] .input-card textarea {
    background: #f9fafb;
}
/* Nav links — more readable */
[data-theme="light"] .nav-links .nav-cloud a { color: #6b7280; }
[data-theme="light"] .nav-links .nav-cloud a:hover { color: #111827; }
[data-theme="light"] .nav-links .nav-cloud a.active { color: var(--accent); }
/* Scan counter */
[data-theme="light"] .scan-counter-wrapper {
    background: rgba(37, 99, 235, 0.04);
    border-color: rgba(37, 99, 235, 0.12);
}
/* Upload zone in light mode */
[data-theme="light"] .upload-zone {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Film grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
    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; }

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 110;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    box-shadow: none;
    transition: background 0.3s ease, transform 0.35s cubic-bezier(.4,0,.2,1);
}

.navbar.navbar-hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: none;
    margin: 0;
    padding: 0 40px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.hamburger-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

/* ============================================
   Sidebar Navigation
   ============================================ */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-out);
}

.sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    z-index: 250;
    transform: translateX(-100%);
    transition: transform 0.4s var(--ease-out);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition);
}

.sidebar-close:hover {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-bg);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    letter-spacing: -0.01em;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.sidebar-link svg { flex-shrink: 0; }

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-mark { flex-shrink: 0; }

.logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-links::-webkit-scrollbar { display: none; }

/* Dashboard / Home / About — plain text links, no cloud */
.nav-links .nav-cloud {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 0;
    background: none;
    filter: none;
}

.nav-links .nav-cloud a {
    position: relative;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: color 0.2s ease, transform 0.15s ease;
    background: transparent;
    border: none;
    padding: 0;
}

.nav-links .nav-cloud a:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.nav-links .nav-cloud a.active {
    color: var(--accent);
    font-weight: 600;
    background: transparent !important;
    box-shadow: none !important;
}

/* Kill every possible source of a "box" behind the active nav link:
   hover/focus backgrounds, text selection, and browser focus rings. */
.nav-links .nav-cloud a,
.nav-links .nav-cloud a:hover,
.nav-links .nav-cloud a:focus,
.nav-links .nav-cloud a:focus-visible,
.nav-links .nav-cloud a:active {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}
.nav-links .nav-cloud a::selection,
.nav-links .nav-cloud a *::selection {
    background: transparent !important;
    color: inherit !important;
}

/* Nav Profile Icon Link */
.nav-profile-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    padding: 0 !important;
    margin-left: 12px;
    transition: all var(--transition);
}

.nav-profile-link:hover {
    border-color: var(--accent);
}

.nav-profile-link svg {
    color: var(--text-muted);
    transition: color var(--transition);
}

.nav-profile-link:hover svg {
    color: var(--accent);
}

.nav-profile-link.signed-in {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.nav-profile-link.signed-in svg {
    color: var(--accent);
}

/* Guest mode — pulsing glow on profile icon */
@keyframes guestPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(91, 157, 255, 0.3), 0 0 12px rgba(91, 157, 255, 0.15); }
    50% { box-shadow: 0 0 10px rgba(91, 157, 255, 0.5), 0 0 20px rgba(91, 157, 255, 0.25); }
}
@keyframes guestTextGlow {
    0%, 100% { text-shadow: 0 0 6px rgba(91, 157, 255, 0.4); }
    50% { text-shadow: 0 0 12px rgba(91, 157, 255, 0.7); }
}

.nav-profile-link.guest-mode {
    border-color: rgba(91, 157, 255, 0.5);
    animation: guestPulse 2.5s ease-in-out infinite;
}
.nav-profile-link.guest-mode svg {
    color: #5b9dff;
}
.nav-guest-label {
    font-size: 11px;
    font-weight: 600;
    color: #5b9dff;
    margin-left: 6px;
    letter-spacing: 0.03em;
    animation: guestTextGlow 2.5s ease-in-out infinite;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
[data-theme="light"] .nav-profile-link.guest-mode {
    border-color: rgba(37, 99, 235, 0.45);
    animation-name: guestPulseLight;
}
[data-theme="light"] .nav-profile-link.guest-mode svg {
    color: #2563eb;
}
[data-theme="light"] .nav-guest-label {
    color: #2563eb;
    animation-name: guestTextGlowLight;
}
@keyframes guestPulseLight {
    0%, 100% { box-shadow: 0 0 6px rgba(37, 99, 235, 0.25), 0 0 12px rgba(37, 99, 235, 0.1); }
    50% { box-shadow: 0 0 10px rgba(37, 99, 235, 0.4), 0 0 20px rgba(37, 99, 235, 0.2); }
}
@keyframes guestTextGlowLight {
    0%, 100% { text-shadow: 0 0 6px rgba(37, 99, 235, 0.3); }
    50% { text-shadow: 0 0 12px rgba(37, 99, 235, 0.55); }
}

/* Sidebar guest glow */
.sidebar-link.guest-glow {
    color: #5b9dff;
    animation: guestTextGlow 2.5s ease-in-out infinite;
}
.sidebar-link.guest-glow svg {
    color: #5b9dff;
    filter: drop-shadow(0 0 4px rgba(91, 157, 255, 0.4));
}
[data-theme="light"] .sidebar-link.guest-glow {
    color: #2563eb;
    animation-name: guestTextGlowLight;
}
[data-theme="light"] .sidebar-link.guest-glow svg {
    color: #2563eb;
    filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.3));
}

/* ── Guest Sign-In Modal ── */
.guest-signin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
    pointer-events: none;
}
.guest-signin-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.guest-signin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 36px 32px 28px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.35s var(--ease-spring);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}
.guest-signin-overlay.visible .guest-signin-card {
    transform: translateY(0) scale(1);
}
.guest-signin-card .gs-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-glow);
    border: 1.5px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    animation: guestPulse 2.5s ease-in-out infinite;
}
.guest-signin-card .gs-icon svg { color: var(--accent); }
.guest-signin-card h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}
.guest-signin-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px;
    line-height: 1.6;
}
.gs-btn-primary {
    display: block;
    width: 100%;
    padding: 13px 0;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    margin-bottom: 10px;
    text-decoration: none;
    text-align: center;
}
.gs-btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow-strong);
}
.gs-btn-secondary {
    display: block;
    width: 100%;
    padding: 12px 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    text-decoration: none;
    text-align: center;
}
.gs-btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}
[data-theme="light"] .guest-signin-card {
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .guest-signin-card .gs-icon {
    animation-name: guestPulseLight;
}

/* ============================================
   Hero — Editorial Asymmetric
   ============================================ */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.gradient-text {
    color: #5b9dff;
}

/* Ensure hero text renders above decorative layers */
.interview-hero h1,
.interview-hero-subtitle,
.practice-hero h1,
.net-hero h1,
.net-hero > p,
.cl-hero h1,
.cl-hero .cl-steps,
.tips-hero > .container {
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(20px, 4vw, 40px);
    font-weight: 500;
    color: var(--text-secondary);
    max-width: 750px;
    margin: 0 auto 36px;
    line-height: 1.75;
    animation: fadeUp 0.8s var(--ease-out) 0.3s both;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 36px;
    color: #fff;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
    animation: fadeUp 0.8s var(--ease-out) 0.4s both;
    position: relative;
    overflow: hidden;
    appearance: none;
    background: radial-gradient(
        var(--grd-spread-x) var(--grd-spread-y) at var(--grd-pos-x) var(--grd-pos-y),
        var(--grd-c1) var(--grd-s1),
        var(--grd-c2) var(--grd-s2),
        var(--grd-c3) var(--grd-s3),
        var(--grd-c4) var(--grd-s4),
        var(--grd-c5) var(--grd-s5)
    );
    box-shadow: 0 0 20px rgba(36, 80, 184, 0.3), 0 4px 16px rgba(36, 80, 184, 0.2);
    transition:
        --grd-pos-x 0.5s, --grd-pos-y 0.5s,
        --grd-spread-x 0.5s, --grd-spread-y 0.5s,
        --grd-c1 0.5s, --grd-c2 0.5s, --grd-c3 0.5s, --grd-c4 0.5s, --grd-c5 0.5s,
        --grd-s1 0.5s, --grd-s2 0.5s, --grd-s3 0.5s, --grd-s4 0.5s, --grd-s5 0.5s,
        --grd-border-angle 0.5s, --grd-border-c1 0.5s, --grd-border-c2 0.5s,
        transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.cta-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        var(--grd-border-angle),
        var(--grd-border-c1),
        var(--grd-border-c2)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(36, 80, 184, 0.5), 0 8px 32px rgba(36, 80, 184, 0.3);
    --grd-pos-x: 0%;
    --grd-pos-y: 91.51%;
    --grd-spread-x: 120.24%;
    --grd-spread-y: 103.18%;
    --grd-c1: #5b8def;
    --grd-c2: #3a6ed4;
    --grd-c3: #2450b8;
    --grd-c4: #0a1a3a;
    --grd-c5: #000;
    --grd-s1: 0%;
    --grd-s2: 8.8%;
    --grd-s3: 21.44%;
    --grd-s4: 71.34%;
    --grd-s5: 85.76%;
    --grd-border-angle: 190deg;
    --grd-border-c1: hsla(220, 78%, 90%, 0.1);
    --grd-border-c2: hsla(220, 75%, 90%, 0.6);
}

/* ============================================
   Section Titles — Editorial Style
   ============================================ */
.section-title {
    text-align: center;
    font-family: 'Space Grotesk', var(--font-display);
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    line-height: 1.15;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 56px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
}

/* ============================================
   Analyzer Section
   ============================================ */
/* Analyzer Hero — matches interview/networking hero style */
.analyzer-hero {
    padding: 140px 24px 16px;
    text-align: center;
    position: relative;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(26, 58, 143, 0.12), transparent);
    animation: pageEnter 0.6s ease both;
}

@keyframes pageEnter {
    from { opacity: 0; }
    to { opacity: 1; }
}
[data-theme="light"] .analyzer-hero {
    background: none;
}

.analyzer-hero h1 {
    font-family: 'Space Grotesk', var(--font-display);
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    animation: fadeUp 0.7s var(--ease-out) 0.1s both;
}

.analyzer-hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.7;
    animation: fadeUp 0.7s var(--ease-out) 0.2s both;
}

/* Live Scan Counter */
.scan-counter-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 8px 20px;
    background: rgba(36, 80, 184, 0.06);
    border: 1px solid rgba(36, 80, 184, 0.15);
    border-radius: 100px;
    animation: fadeUp 0.7s var(--ease-out) 0.3s both;
}

.scan-counter-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: counterPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes counterPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 210, 160, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(0, 210, 160, 0); }
}

.scan-counter-number {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.scan-counter-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.analyzer-section {
    padding: 14px 0 40px;
    position: relative;
    min-height: 70vh;
}

.analyzer-section > .container {
    max-width: 1600px;
}

/* Ambient glow behind analyzer */
.analyzer-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, rgba(36, 80, 184, 0.04), transparent 70%);
    pointer-events: none;
}

/* Upload Zone */
.upload-zone {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    border: 1.5px dashed var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.01);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-glow);
    color: var(--accent);
}

.upload-text {
    font-size: 14px;
    margin-top: 10px;
}

.upload-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.upload-success {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--green);
    font-weight: 500;
}

.upload-clear {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color var(--transition);
}

.upload-clear:hover { color: var(--red); }

/* Signed-In Data Banner (replaces input-grid when user has saved data) */
.signed-in-banner {
    display: none;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 24px;
    margin-bottom: 44px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.signed-in-banner.border-trail {
    border-color: transparent;
}

.signed-in-banner.border-trail::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    padding: 1px;
    background-image: radial-gradient(transparent, transparent, #3b82f6, #60a5fa, transparent, transparent);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: shine-pulse 8s infinite linear;
    pointer-events: none;
}

[data-theme="light"] .signed-in-banner.border-trail::after {
    background-image: radial-gradient(transparent, transparent, #2563eb, #3b82f6, transparent, transparent);
}

/* Static navy border on signed-in banner when both resume and JD are present */
.signed-in-banner.border-filled {
    border-color: transparent;
}

.signed-in-banner.border-filled::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    padding: 1px;
    background: #162040;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

[data-theme="light"] .signed-in-banner.border-filled::after {
    background: #1e3a6e;
}

.signed-in-banner.visible {
    display: block;
    animation: fadeUp 0.5s var(--ease-out) 0.3s both;
}

.signed-in-banner-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.signed-in-data-items {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
}

.signed-in-data-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.signed-in-data-item .data-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--green-bg);
    color: var(--green);
    font-size: 11px;
    flex-shrink: 0;
}

.signed-in-data-item .data-missing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.signed-in-data-item .data-label {
    color: var(--text-muted);
    font-size: 12px;
}

.signed-in-data-item .data-preview {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 12px;
}

.signed-in-banner-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.signed-in-edit-btn {
    padding: 7px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: -0.01em;
}

.signed-in-edit-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.signed-in-manage-link {
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: opacity var(--transition);
}

.signed-in-manage-link:hover {
    opacity: 0.8;
}

.input-grid.hidden-by-signin {
    display: none;
}

/* Input Grid */
.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 48px;
    animation: fadeUp 0.7s var(--ease-out) 0.35s both;
}

.input-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
    min-width: 0;
    overflow: hidden;
}

.input-card:focus-within {
    border-color: var(--border-light);
}

/* ── Shine Border Effect ── */
@keyframes shine-pulse {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* Animated shine — not uploaded */
.input-card.border-trail,
.li-panel.border-trail,
.ce-panel.border-trail,
.cl-panel.border-trail {
    position: relative;
    border-color: transparent;
}

.input-card.border-trail::after,
.li-panel.border-trail::after,
.ce-panel.border-trail::after,
.cl-panel.border-trail::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    padding: 1px;
    background-image: radial-gradient(transparent, transparent, #3b82f6, #60a5fa, transparent, transparent);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: shine-pulse 8s infinite linear;
    pointer-events: none;
}

[data-theme="light"] .input-card.border-trail::after,
[data-theme="light"] .li-panel.border-trail::after,
[data-theme="light"] .ce-panel.border-trail::after,
[data-theme="light"] .cl-panel.border-trail::after {
    background-image: radial-gradient(transparent, transparent, #2563eb, #3b82f6, transparent, transparent);
}

/* Static navy — uploaded */
.input-card.border-filled,
.li-panel.border-filled,
.ce-panel.border-filled,
.cl-panel.border-filled {
    position: relative;
    border-color: transparent;
}

.input-card.border-filled::after,
.li-panel.border-filled::after,
.ce-panel.border-filled::after,
.cl-panel.border-filled::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    padding: 1px;
    background: #162040;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

[data-theme="light"] .input-card.border-filled::after,
[data-theme="light"] .li-panel.border-filled::after,
[data-theme="light"] .ce-panel.border-filled::after,
[data-theme="light"] .cl-panel.border-filled::after {
    background: #1e3a6e;
}

.input-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.input-header h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.input-card textarea {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 700px;
    min-height: 480px;
    padding: 22px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.85;
    resize: vertical;
    transition: border-color 0.3s var(--ease-out);
}

.input-card textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.input-card textarea::placeholder {
    color: var(--text-muted);
}

.char-count {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    letter-spacing: 0.03em;
}

/* ============================================
   Analyzer Tab Bar — Cell Navigation
   ============================================ */
/* ============================================
   Analyzer Tab Bar
   ============================================ */
.analyzer-tab-bar {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
    margin-bottom: 8px;
    padding: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeUp 0.7s var(--ease-out) 0.4s both;
}

.analyzer-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 100px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.08s ease-out;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.analyzer-tab:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.analyzer-tab.active[data-tab="resume"] {
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #fff;
    box-shadow: 0 2px 12px rgba(36, 80, 184, 0.35);
}

.analyzer-tab.active[data-tab="bullets"] {
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #fff;
    box-shadow: 0 2px 12px rgba(36, 80, 184, 0.35);
}

.analyzer-tab.active[data-tab="rag"] {
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #fff;
    box-shadow: 0 2px 12px rgba(36, 80, 184, 0.35);
}

.analyzer-tab svg {
    flex-shrink: 0;
}

/* Tab Content Sections */
.analyzer-tab-content {
    display: none;
}

.analyzer-tab-content.active {
    display: block;
    animation: tabSwitch 0.15s ease-out;
}

@keyframes tabSwitch {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Analyze Button */
.analyze-btn-wrapper {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 56px;
    animation: none;
}

.analyze-button {
    padding: 14px 24px;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: -0.01em;
    position: relative;
    appearance: none;
    background: radial-gradient(
        var(--grd-spread-x) var(--grd-spread-y) at var(--grd-pos-x) var(--grd-pos-y),
        var(--grd-c1) var(--grd-s1),
        var(--grd-c2) var(--grd-s2),
        var(--grd-c3) var(--grd-s3),
        var(--grd-c4) var(--grd-s4),
        var(--grd-c5) var(--grd-s5)
    );
    box-shadow: 0 0 20px rgba(36, 80, 184, 0.3), 0 4px 16px rgba(36, 80, 184, 0.2);
    transition:
        --grd-pos-x 0.5s, --grd-pos-y 0.5s,
        --grd-spread-x 0.5s, --grd-spread-y 0.5s,
        --grd-c1 0.5s, --grd-c2 0.5s, --grd-c3 0.5s, --grd-c4 0.5s, --grd-c5 0.5s,
        --grd-s1 0.5s, --grd-s2 0.5s, --grd-s3 0.5s, --grd-s4 0.5s, --grd-s5 0.5s,
        --grd-border-angle 0.5s, --grd-border-c1 0.5s, --grd-border-c2 0.5s,
        transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.analyze-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        var(--grd-border-angle),
        var(--grd-border-c1),
        var(--grd-border-c2)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.analyze-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(36, 80, 184, 0.5), 0 8px 32px rgba(36, 80, 184, 0.3);
    --grd-pos-x: 0%;
    --grd-pos-y: 91.51%;
    --grd-spread-x: 120.24%;
    --grd-spread-y: 103.18%;
    --grd-c1: #5b8def;
    --grd-c2: #3a6ed4;
    --grd-c3: #2450b8;
    --grd-c4: #0a1a3a;
    --grd-c5: #000;
    --grd-s1: 0%;
    --grd-s2: 8.8%;
    --grd-s3: 21.44%;
    --grd-s4: 71.34%;
    --grd-s5: 85.76%;
    --grd-border-angle: 190deg;
    --grd-border-c1: hsla(220, 78%, 90%, 0.1);
    --grd-border-c2: hsla(220, 75%, 90%, 0.6);
}

.analyze-button:active:not(:disabled) {
    transform: translateY(0px);
}

.analyze-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.analyze-note {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 28px;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.analyze-stay-note {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    opacity: 0.7;
    letter-spacing: 0.01em;
}

/* XL Analyze Button */
.analyze-button-xl {
    padding: 18px 48px;
    font-size: 16px;
}

.analyze-button-xl .btn-text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.analyze-easter-egg {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 10px;
    font-style: italic;
    opacity: 0.5;
    letter-spacing: 0.02em;
    transition: all 0.4s ease;
}

.analyze-btn-wrapper:hover .analyze-easter-egg {
    opacity: 0.8;
    color: var(--accent-light);
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   Progress Bar
   ============================================ */
.progress-section {
    margin-bottom: 48px;
}

.progress-bar-container {
    width: 100%;
    height: 3px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 18px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent), var(--accent-light));
    border-radius: 3px;
    transition: width 0.5s var(--ease-out);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    transition: color var(--transition);
    letter-spacing: 0.03em;
}

.progress-step.active { color: var(--accent); }
.progress-step.done { color: var(--green); }

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all var(--transition);
}

.progress-step.active .step-dot {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow-strong);
}

.progress-step.done .step-dot { background: var(--green); }

/* ============================================
   Results Section — Split Panel Layout
   ============================================ */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Stacked column — multiple cards in one grid cell */
.results-stacked-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* --- Results Two-Column Row Layout --- */
.results-row-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

.results-row-two-col > .result-card {
    min-width: 0;
}

.results-row-full {
    margin-bottom: 24px;
}

/* --- Resume Preview Card (big, full column height) --- */
.results-preview-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.results-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.results-preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.results-preview-filename {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.results-preview-body {
    overflow-y: auto;
    overflow-x: hidden;
    background: #f0f0f0;
    padding: 12px;
    flex: 1;
    min-height: 700px;
    max-height: 1200px;
}

.results-preview-body canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    margin-bottom: 10px;
    image-rendering: auto;
}

.results-preview-body canvas:last-child {
    margin-bottom: 0;
}

/* Text-only resume preview fallback */
.results-preview-text {
    background: #fff;
    padding: 28px 24px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    font-family: 'Times New Roman', Times, serif;
    font-size: 12.5px;
    line-height: 1.6;
    color: #222;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: none;
    user-select: text;
    cursor: text;
}

/* Copy resume text section inside preview */
.preview-copy-section {
    margin-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 12px;
}

.preview-copy-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.preview-copy-toggle:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.preview-copy-text {
    margin-top: 10px;
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    user-select: text;
    cursor: text;
    max-height: 500px;
    overflow-y: auto;
}

/* Scrollbar for preview body */
.results-preview-body::-webkit-scrollbar {
    width: 6px;
}

.results-preview-body::-webkit-scrollbar-track {
    background: transparent;
}

.results-preview-body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
}

.results-preview-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

/* --- Skills Match Card --- */
.skills-match-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.skills-column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.skills-column-header svg {
    color: var(--accent);
    flex-shrink: 0;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.skill-item.found {
    background: var(--green-bg);
    color: var(--text-primary);
}

.skill-item.missing {
    background: var(--red-bg);
    color: var(--text-secondary);
}

.skill-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.skill-item.found .skill-icon {
    background: var(--green);
    color: var(--bg-primary);
}

.skill-item.missing .skill-icon {
    background: var(--red);
    color: #fff;
}

.skill-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Soft Skills Interview Note */
.soft-skills-interview-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    color: var(--accent-light, #5b9cf5);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}
.soft-skills-interview-note svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Skills Summary Bar */
.skills-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.skills-summary-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    font-family: var(--font-mono);
}

.skills-percent {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 4px;
}

.skills-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.skills-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent-dim), var(--green));
    transition: width 1s var(--ease-out);
    width: 0%;
}

/* ============================================ */
/* Keywords Comparison Card                     */
/* ============================================ */

.kw-compare-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kw-compare-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 2px;
}

.kw-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.kw-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.kw-dot-match {
    background: #00d2a0;
}

.kw-dot-variation {
    background: #ffa94d;
}

.kw-dot-missing {
    background: #ff6b6b;
}

/* Keyword Pills */
.kw-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 0;
}

.kw-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 12.5px;
    font-weight: 500;
    font-family: var(--font-body);
    line-height: 1;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kw-pill:hover {
    transform: translateY(-1px);
}

.kw-pill-icon {
    font-size: 11px;
    flex-shrink: 0;
}

.kw-pill.match {
    background: rgba(0, 210, 160, 0.12);
    color: #00d2a0;
    border: 1px solid rgba(0, 210, 160, 0.25);
}

.kw-pill.variation {
    background: rgba(255, 169, 77, 0.12);
    color: #ffa94d;
    border: 1px solid rgba(255, 169, 77, 0.25);
}

.kw-pill.missing {
    background: rgba(255, 107, 107, 0.12);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.25);
}

/* Side-by-side text panels */
.kw-text-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.kw-text-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.kw-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.kw-panel-body {
    padding: 18px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    font-family: var(--font-body);
    max-height: 700px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--bg-primary);
}

.kw-panel-body::-webkit-scrollbar {
    width: 5px;
}

.kw-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.kw-panel-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Highlighted keyword spans inside text panels */
.kw-hl-match {
    background: rgba(0, 210, 160, 0.18);
    color: #00d2a0;
    border-radius: 3px;
    padding: 1px 3px;
    font-weight: 600;
}

.kw-hl-variation {
    background: rgba(255, 169, 77, 0.18);
    color: #ffa94d;
    border-radius: 3px;
    padding: 1px 3px;
    font-weight: 600;
}

.kw-hl-missing {
    background: rgba(255, 107, 107, 0.18);
    color: #ff6b6b;
    border-radius: 3px;
    padding: 1px 3px;
    font-weight: 600;
}

/* Resume panel annotations for missing/variation keywords */
.kw-resume-annotations {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kw-annotation-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kw-annotation-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kw-annotation-missing .kw-annotation-label {
    color: var(--red);
}

.kw-annotation-variation .kw-annotation-label {
    color: var(--orange, #ffa94d);
}

.kw-annotation-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.kw-annotation-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.kw-annotation-tag.missing {
    background: rgba(255, 107, 107, 0.12);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.kw-annotation-tag.variation {
    background: rgba(255, 169, 77, 0.12);
    color: #ffa94d;
    border: 1px solid rgba(255, 169, 77, 0.2);
}

.kw-suggestion-tip {
    margin-left: 4px;
    cursor: help;
    font-size: 12px;
}

.kw-suggestion-list {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(36, 80, 184, 0.06);
    border: 1px solid rgba(36, 80, 184, 0.15);
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.kw-suggestion-item {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.kw-suggestion-item:last-child {
    border-bottom: none;
}

.kw-suggestion-item strong {
    color: #ff6b6b;
    font-weight: 600;
}

[data-theme="light"] .kw-suggestion-list {
    background: rgba(36, 80, 184, 0.05);
    border-color: rgba(36, 80, 184, 0.12);
}

[data-theme="light"] .kw-suggestion-item {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}


.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    animation: resultFadeIn 0.6s var(--ease-out) both;
}

@keyframes resultFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.result-badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.step-badge-1 { background: var(--accent-glow); color: var(--accent); border: 1px solid var(--border-accent); }
.step-badge-2 { background: var(--orange-bg); color: var(--orange); }
.step-badge-3 { background: var(--green-bg); color: var(--green); }
.step-badge-4 { background: var(--blue-bg); color: var(--blue); }

.badge-accent { background: var(--accent-glow); color: var(--accent-light); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-yellow { background: rgba(232, 211, 106, 0.08); color: var(--yellow); }

.result-header h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
}

/* Score header with ring next to title */
.score-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Score Ring */
.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.score-ring-container {
    position: relative;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }

.score-ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 6;
}

.score-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1.5s var(--ease-out), stroke 0.5s ease;
}

.score-number {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 800;
    text-align: center;
    line-height: 1;
}

.score-number .score-value {
    display: block;
    width: 100%;
    text-align: center;
    line-height: 1;
}

.score-number .score-label {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.score-details {
    width: 100%;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.75;
    white-space: pre-line;
}

/* Score category breakdown */
.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
    padding: 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.score-cat-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.score-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.score-cat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.score-cat-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.score-cat-max {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 12px;
}

.score-cat-bar-bg {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.score-cat-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.score-cat-note {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Strengths & Gaps two-column grid */
.score-strengths-gaps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 18px;
    white-space: normal;
}

.score-sg-col {
    padding: 16px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.score-sg-col.strengths-col {
    border-left: 3px solid var(--green);
}

.score-sg-col.gaps-col {
    border-left: 3px solid var(--red);
}

.score-sg-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.score-sg-title.strengths-title {
    color: var(--green);
}

.score-sg-title.gaps-title {
    color: var(--red);
}

.score-sg-title svg {
    flex-shrink: 0;
}

.score-sg-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-primary);
}

.score-sg-item + .score-sg-item {
    border-top: 1px solid var(--border);
}

.score-sg-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    margin-top: 1px;
}

.score-sg-icon.strength-icon {
    background: var(--green-bg, rgba(0, 210, 160, 0.1));
    color: var(--green);
}

.score-sg-icon.gap-icon {
    background: var(--red-bg, rgba(255, 107, 107, 0.1));
    color: var(--red);
}

/* Keywords */
.keywords-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.keyword-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.keyword-item:hover {
    border-color: var(--border-light);
}

.keyword-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.keyword-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.kw-importance-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.kw-badge-critical {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid rgba(185, 28, 28, 0.25);
}

.kw-badge-high {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid rgba(194, 65, 12, 0.3);
}

.kw-badge-medium {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid rgba(29, 78, 216, 0.3);
}

.keyword-context {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Recommendations card — uses same layout as keywords-list */
.recommendations-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rec-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.recommendation-item .keyword-top {
    flex-shrink: 0;
}

.recommendation-item {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 14px !important;
}

/* Rewrite */
.rewrite-content {
    margin-bottom: 20px;
}

.rewrite-entry {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.rewrite-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.rewrite-entry h4 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 12px;
}

.rewrite-original {
    padding: 12px 16px;
    background: var(--red-bg);
    border-left: 2px solid var(--red);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 8px;
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.rewrite-improved {
    padding: 12px 16px;
    background: var(--green-bg);
    border-left: 2px solid var(--green);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 13.5px;
    color: var(--text-primary);
    line-height: 1.65;
}

/* X-Y-Z Tooltip */
.xyz-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(36, 80, 184, 0.15);
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    margin-left: 4px;
    line-height: 1;
    text-transform: none;
}

.xyz-tip-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 12.5px;
    font-weight: 400;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    white-space: normal;
    width: 280px;
    line-height: 1.55;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    text-align: left;
}

.xyz-tip.active .xyz-tip-popup {
    display: block;
}

/* "Why it matters" badge for bullet rewrites */
.wim-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    background: rgba(56, 189, 148, 0.12);
    color: var(--green);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    position: relative;
    margin-left: 8px;
    margin-top: 8px;
    text-transform: none;
    white-space: nowrap;
    vertical-align: middle;
}

.wim-badge:hover {
    background: rgba(56, 189, 148, 0.2);
}

.wim-badge-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 12.5px;
    font-weight: 400;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    white-space: normal;
    width: 280px;
    line-height: 1.55;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    text-align: left;
}

.wim-badge.active .wim-badge-popup {
    display: block;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

.copy-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

/* ATS */
.ats-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ats-overall-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    width: fit-content;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.ats-overall-icon {
    font-size: 14px;
}

.ats-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ats-item {
    padding: 12px 16px;
    border-radius: var(--radius);
    border-left: 3px solid;
}

.ats-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.ats-item-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.ats-item-section {
    font-weight: 700;
    font-size: 14px;
}

.ats-item-detail {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding-left: 22px;
}

.ats-item.pass {
    background: var(--green-bg);
    border-color: var(--green);
}

.ats-item.warn {
    background: var(--orange-bg);
    border-color: var(--orange);
}

.ats-item.fail {
    background: var(--red-bg);
    border-color: var(--red);
}

.ats-item.pass .ats-item-icon,
.ats-item.pass .ats-item-section { color: var(--green); }
.ats-item.warn .ats-item-icon,
.ats-item.warn .ats-item-section { color: var(--orange); }
.ats-item.fail .ats-item-icon,
.ats-item.fail .ats-item-section { color: var(--red); }

/* AI & Buzzword Detection */
.aid-summary-badge,
.aid-clean-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.aid-clean-badge {
    background: var(--green-bg);
    color: var(--green);
}

.aid-clean-icon,
.aid-summary-icon {
    font-size: 14px;
}

.aid-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aid-item {
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: border-color var(--transition);
}

.aid-item:hover {
    border-color: var(--border-light);
}

.aid-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.aid-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid;
}

.aid-severity-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
}

.aid-severity-dot.high { background: var(--red); }
.aid-severity-dot.medium { background: var(--orange); }
.aid-severity-dot.low { background: var(--text-muted); }

.aid-quote {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
    padding: 8px 14px;
    border-left: 3px solid var(--border-light);
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 6px 6px 0;
}

.aid-issue {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0 0 4px;
}

.aid-suggestion {
    font-size: 12.5px;
    color: var(--green);
    line-height: 1.5;
    margin: 6px 0 0;
}

.aid-suggestion strong {
    color: var(--green);
}

.aid-item.high {
    border-color: var(--red-border);
}

.aid-item.medium {
    border-color: var(--orange-border);
}

/* Error */
.error-display {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    border-radius: var(--radius);
    margin-top: 20px;
}

.error-icon {
    width: 34px;
    height: 34px;
    background: var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.error-display p {
    color: var(--red);
    font-size: 14px;
}

/* ============================================
   Tips Section
   ============================================ */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tip-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: all 0.4s var(--ease-out);
}

.tip-card:hover {
    border-color: var(--border-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.tip-category {
    display: inline-block;
    padding: 3px 10px;
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid var(--border-accent);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.tip-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.25;
}

.tip-card > p {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.65;
}

.tip-example {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tip-bad, .tip-good {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    line-height: 1.6;
}

.tip-bad {
    background: var(--red-bg);
    color: var(--text-secondary);
    border-left: 2px solid var(--red);
}

.tip-good {
    background: var(--green-bg);
    color: var(--text-primary);
    border-left: 2px solid var(--green);
}

.label {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 500;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.label.bad { background: var(--red); color: white; }
.label.good { background: var(--green); color: var(--bg-primary); }

.tip-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.check-item {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-item::before {
    font-size: 16px;
    flex-shrink: 0;
}

.check-item.pass {
    background: var(--green-bg);
    color: var(--green);
}

.check-item.pass::before { content: "\2713"; }

.check-item.fail {
    background: var(--red-bg);
    color: var(--red);
}

.check-item.fail::before { content: "\2715"; }

.tip-stat-row {
    display: flex;
    gap: 12px;
}

.tip-stat {
    flex: 1;
    text-align: center;
    padding: 16px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ============================================
   JD Example Box (Expandable)
   ============================================ */
.jd-example-box {
    margin-top: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.jd-example-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
    list-style: none;
}

.jd-example-toggle::-webkit-details-marker { display: none; }

.jd-example-toggle::after {
    content: '\25BC';
    font-size: 9px;
    margin-left: auto;
    transition: transform 0.3s var(--ease-out);
}

details[open] .jd-example-toggle::after {
    transform: rotate(180deg);
}

.jd-example-toggle:hover { color: var(--text-primary); }

.jd-example-content {
    padding: 0 14px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.jd-example-content ul {
    margin: 8px 0 0 0;
    padding-left: 16px;
}

.jd-example-content li {
    margin-bottom: 4px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 0;
    margin-top: 0;
    border-top: none;
}

.footer > .container {
    max-width: none;
    padding: 0 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
}

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

.footer-right {
    text-align: right;
}

.footer-right h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.footer-right p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: none;
    line-height: 1.6;
    margin-bottom: 12px;
    margin-left: auto;
}

.footer-right .footer-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #fff;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.footer-right .footer-contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.footer-quote {
    text-align: center;
    margin-bottom: 32px;
    padding-top: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.footer-quote p {
    display: inline;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    font-size: 15px;
    color: var(--text-secondary);
    opacity: 1;
}

.footer-quote span {
    display: inline;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.7;
    letter-spacing: 0.03em;
    margin-left: 4px;
}

.footer-copyright {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer-copyright p {
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.6;
    margin: 0;
    letter-spacing: 0.02em;
}

.footer-social-links {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.footer-instagram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 180px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888, #405de6, #5b51d8, #f09433);
    background-size: 300% 300%;
    animation: socialGradient 4s ease infinite;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 100px;
    transition: all 0.25s ease;
    letter-spacing: 0.01em;
}

.footer-tiktok-btn {
    background: linear-gradient(135deg, #010101, #25f4ee, #fe2c55);
    background-size: 200% 200%;
    animation: socialGradient 3s ease infinite;
}

.footer-linkedin-btn {
    background: linear-gradient(135deg, #0077B5, #004e7a, #0077B5, #00a0dc);
    background-size: 300% 300%;
    animation: socialGradient 4s ease infinite;
}
.footer-linkedin-btn:hover {
    box-shadow: 0 6px 24px rgba(0, 119, 181, 0.4);
}

@keyframes socialGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.footer-tiktok-btn:hover {
    box-shadow: 0 6px 24px rgba(37,244,238,0.3), 0 6px 24px rgba(254,44,85,0.3);
}

.footer-instagram-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(124,58,237,0.4);
    filter: brightness(1.08);
}

/* Instagram icon — purple glow + pulse */
.footer-instagram-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.3));
    animation: igIconPulse 2.5s ease-in-out infinite;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-instagram-btn:hover svg {
    filter:
        drop-shadow(0 0 6px rgba(255,255,255,0.9))
        drop-shadow(0 0 14px rgba(192,132,252,0.8))
        drop-shadow(0 0 28px rgba(124,58,237,0.6));
    animation: igIconBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(1.2);
}

.footer-instagram-btn:active svg {
    transform: scale(0.9);
    filter:
        drop-shadow(0 0 10px rgba(255,255,255,1))
        drop-shadow(0 0 20px rgba(192,132,252,1))
        drop-shadow(0 0 40px rgba(124,58,237,0.8));
    transition: all 0.08s ease;
}

/* Idle glow pulse on the icon */
@keyframes igIconPulse {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(255,255,255,0.2));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(192,132,252,0.6)) drop-shadow(0 0 16px rgba(124,58,237,0.3));
    }
}

/* Bounce on hover */
@keyframes igIconBounce {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.3) rotate(-10deg); }
    50% { transform: scale(1.15) rotate(5deg); }
    75% { transform: scale(1.25) rotate(-3deg); }
    100% { transform: scale(1.2) rotate(0deg); }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-left p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 420px;
    line-height: 1.6;
}

/* ============================================
   Footer Easter Egg — Hoverable Discipline Icons
   ============================================ */
.footer-egg {
    position: relative;
    display: inline;
    cursor: default;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.3s ease;
}

.footer-egg:hover {
    border-bottom-color: rgba(36,80,184,0.35);
}

.footer-egg .egg-icon {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0) translateY(8px);
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15), 0 0 0 0 transparent;
    z-index: 10;
}

.footer-egg .egg-icon svg {
    width: 16px;
    height: 16px;
}

.footer-egg:hover .egg-icon {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
}

/* Business — briefcase, blue */
.footer-egg.egg-biz:hover {
    color: #6aaae8;
}
.footer-egg.egg-biz .egg-icon {
    border-color: rgba(106,170,232,0.3);
    box-shadow: 0 4px 16px rgba(106,170,232,0.15);
}
.footer-egg.egg-biz .egg-icon svg {
    color: #6aaae8;
    animation: eggPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* CS — code brackets, green */
.footer-egg.egg-cs:hover {
    color: #5fd4a3;
}
.footer-egg.egg-cs .egg-icon {
    border-color: rgba(95,212,163,0.3);
    box-shadow: 0 4px 16px rgba(95,212,163,0.15);
}
.footer-egg.egg-cs .egg-icon svg {
    color: #5fd4a3;
    animation: eggPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Engineering — gear, orange */
.footer-egg.egg-eng:hover {
    color: #f0a060;
}
.footer-egg.egg-eng .egg-icon {
    border-color: rgba(240,160,96,0.3);
    box-shadow: 0 4px 16px rgba(240,160,96,0.15);
}
.footer-egg.egg-eng .egg-icon svg {
    color: #f0a060;
    animation: eggSpin 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* BulletproofAI easter egg — shield pop on hover */
.bp-egg {
    position: relative;
    display: inline;
    cursor: default;
}

.bp-egg .egg-icon {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0) translateY(8px);
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid rgba(36,80,184,0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 16px rgba(36,80,184,0.15);
    z-index: 10;
}

.bp-egg .egg-icon svg {
    width: 18px;
    height: 18px;
    color: #2450b8;
}

.bp-egg:hover .egg-icon {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
}

.bp-egg:hover .egg-icon svg {
    animation: eggShield 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes eggShield {
    0% { transform: scale(0) rotate(-15deg); }
    40% { transform: scale(1.3) rotate(5deg); }
    70% { transform: scale(0.95) rotate(-2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes eggPop {
    0% { transform: scale(0) rotate(-20deg); }
    60% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes eggSpin {
    0% { transform: scale(0) rotate(-90deg); }
    60% { transform: scale(1.15) rotate(20deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* ============================================
   About Page
   ============================================ */
.about-section {
    padding: 12px 0 64px;
    margin-top: -40px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 28px;
    text-align: center;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    --x: 0px;
    --y: 0px;
    --xp: 0.5;
    --yp: 0.5;
    --glow-opacity: 0;
}

/* Border glow that follows mouse */
.about-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: radial-gradient(
        300px circle at var(--x) var(--y),
        rgba(100, 170, 255, 0.85),
        rgba(80, 140, 255, 0.4) 35%,
        rgba(80, 140, 255, 0.1) 55%,
        transparent 70%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: var(--glow-opacity);
    transition: opacity 0.3s ease;
    z-index: 0;
}

/* Ambient glow behind/around card */
.about-card::after {
    content: '';
    position: absolute;
    inset: -25px;
    border-radius: inherit;
    background: radial-gradient(
        350px circle at calc(var(--x) + 25px) calc(var(--y) + 25px),
        rgba(100, 160, 255, 0.14),
        transparent 65%
    );
    pointer-events: none;
    opacity: var(--glow-opacity);
    transition: opacity 0.4s ease;
    z-index: -1;
    filter: blur(15px);
}

/* Ensure card content sits above pseudo-elements */
.about-card > * {
    position: relative;
    z-index: 1;
}

.about-card:hover {
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --glow-opacity: 1;
}

/* Light mode spotlight adjustments */
[data-theme="light"] .about-card::before {
    background: radial-gradient(
        300px circle at var(--x) var(--y),
        rgba(37, 99, 235, 0.7),
        rgba(37, 99, 235, 0.25) 35%,
        rgba(37, 99, 235, 0.06) 55%,
        transparent 70%
    );
}
[data-theme="light"] .about-card::after {
    background: radial-gradient(
        350px circle at calc(var(--x) + 25px) calc(var(--y) + 25px),
        rgba(37, 99, 235, 0.1),
        transparent 65%
    );
}

.about-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent);
}

.about-avatar.about-avatar--photo {
    width: 140px;
    height: 140px;
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: 3px solid var(--border-accent);
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.12);
}

.about-avatar.about-avatar--photo .about-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 50%;
}

.about-card h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.about-role {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
}

.about-bio {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #6aaae8;
    background: rgba(106, 170, 232, 0.08);
    border: 1px solid rgba(106, 170, 232, 0.2);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition);
}

.about-linkedin:hover {
    background: rgba(106, 170, 232, 0.15);
    border-color: rgba(106, 170, 232, 0.3);
    transform: translateY(-1px);
}

.about-linkedin svg { flex-shrink: 0; }

/* Contact Form */
.contact-section { padding: 0 0 100px; }

.contact-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235e5c56' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   Visual Resume Preview
   ============================================ */
.resume-visual-preview {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    overflow: hidden;
    max-width: 100%;
}

.visual-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.visual-preview-header span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.visual-preview-content {
    max-height: 700px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f0f0f0;
    padding: 8px;
}

.visual-preview-content canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    image-rendering: auto;
}

/* DOCX scale wrapper — CSS zoom shrinks Word page to fit container */
.visual-preview-content .docx-scale-wrapper,
.results-preview-body .docx-scale-wrapper {
    overflow: hidden;
}

/* docx-preview output container */
.visual-preview-content .docx-preview-render,
.results-preview-body .docx-preview-render {
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    overflow: hidden;
}

.visual-preview-content .docx-preview-render .docx-wrapper,
.results-preview-body .docx-preview-render .docx-wrapper {
    background: #ffffff !important;
}

.visual-preview-content .docx-preview-render .docx-wrapper > section,
.results-preview-body .docx-preview-render .docx-wrapper > section {
    box-shadow: none !important;
    margin-bottom: 0;
    background: #ffffff !important;
}

/*
 * Undo global CSS reset (* { margin:0; padding:0; box-sizing:border-box })
 * inside DOCX preview so Word document formatting is fully preserved.
 * The docx-preview library relies on browser defaults + inline styles.
 */
.docx-preview-render .docx-wrapper *,
.docx-preview-render .docx-wrapper *::before,
.docx-preview-render .docx-wrapper *::after {
    margin: revert;
    padding: revert;
    box-sizing: revert;
}

.docx-preview-render .docx-wrapper {
    font-family: initial;
    line-height: normal;
    color: #000000;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}

/* DOCX Zoom Controls */
.docx-zoom-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    border-radius: 4px 4px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.docx-zoom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.docx-zoom-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

.docx-zoom-level {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    min-width: 40px;
    text-align: center;
    user-select: none;
}

/* Scrollbar styling for visual preview */
.visual-preview-content::-webkit-scrollbar {
    width: 6px;
}

.visual-preview-content::-webkit-scrollbar-track {
    background: transparent;
}

.visual-preview-content::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.visual-preview-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Bullet Analysis Progress */
.bullet-progress-section {
    margin-bottom: 36px;
    text-align: center;
}

.bullet-progress-label {
    font-family: var(--font-mono);
    font-size: 13px;
    color: #2dd4bf;
    margin-bottom: 12px;
    letter-spacing: 0.03em;
}

.bullet-progress-track {
    width: 100%;
    height: 3px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.bullet-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0d9488, #2dd4bf, #5eead4);
    border-radius: 3px;
    transition: width 0.5s var(--ease-out);
}

/* ============================================
   Bullet Analysis Results — Redesigned
   ============================================ */
.ba-header {
    text-align: center;
    margin-bottom: 36px;
}

.ba-header h2 {
    font-family: 'Space Grotesk', var(--font-display);
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.ba-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 480px;
    margin: 0 auto;
}

/* ---- Summary Dashboard ---- */
.ba-summary-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    margin-bottom: 40px;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl, 16px);
    align-items: center;
}

/* Radial score gauge */
.ba-gauge {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.ba-gauge svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.ba-gauge-track {
    fill: none;
    stroke: var(--border);
    stroke-width: 8;
}

.ba-gauge-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s var(--ease-out);
}

.ba-gauge-fill.ba-fill-high { stroke: var(--green); }
.ba-gauge-fill.ba-fill-mid { stroke: var(--orange); }
.ba-gauge-fill.ba-fill-low { stroke: #ef4444; }

.ba-gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.ba-gauge-score {
    font-family: 'Space Grotesk', var(--font-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

.ba-gauge-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* Stats grid */
.ba-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ba-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary, rgba(255,255,255,0.03));
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    transition: border-color 0.2s ease;
}

.ba-stat-card:hover {
    border-color: var(--border-light);
}

.ba-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ba-stat-icon svg {
    width: 18px;
    height: 18px;
}

.ba-stat-icon.ba-icon-total {
    background: rgba(36, 80, 184, 0.12);
    color: var(--accent-light);
}
.ba-stat-icon.ba-icon-strong {
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
}
.ba-stat-icon.ba-icon-weak {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}
.ba-stat-icon.ba-icon-flagged {
    background: rgba(251, 146, 60, 0.12);
    color: var(--orange);
}

.ba-stat-info {
    display: flex;
    flex-direction: column;
}

.ba-stat-value {
    font-family: 'Space Grotesk', var(--font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.ba-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 3px;
}

/* ---- Group sections ---- */
.ba-group {
    margin-bottom: 32px;
}

.ba-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Space Grotesk', var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.01em;
}

.ba-group-header svg {
    width: 20px;
    height: 20px;
    color: var(--accent-light);
    flex-shrink: 0;
}

/* ---- Bullet cards ---- */
.ba-bullet-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl, 16px);
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.ba-bullet-card:hover {
    border-color: var(--border-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Score accent strip */
.ba-card-accent {
    height: 3px;
    width: 100%;
}

.ba-card-accent.ba-accent-high { background: linear-gradient(90deg, var(--green), rgba(34, 197, 94, 0.3)); }
.ba-card-accent.ba-accent-mid { background: linear-gradient(90deg, var(--orange), rgba(251, 146, 60, 0.3)); }
.ba-card-accent.ba-accent-low { background: linear-gradient(90deg, #ef4444, rgba(239, 68, 68, 0.3)); }

.ba-card-body {
    padding: 20px 24px;
}

/* Card header: score badge + flags inline */
.ba-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Score circle badge */
.ba-score-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', var(--font-display);
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

.ba-score-circle.ba-circle-high {
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
    border: 2px solid rgba(34, 197, 94, 0.3);
}
.ba-score-circle.ba-circle-mid {
    background: rgba(251, 146, 60, 0.12);
    color: var(--orange);
    border: 2px solid rgba(251, 146, 60, 0.3);
}
.ba-score-circle.ba-circle-low {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.ba-card-diagnosis {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

/* Original / Rewrite blocks */
.ba-text-block {
    margin-bottom: 16px;
}

.ba-text-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    padding: 3px 8px;
    border-radius: 4px;
}

.ba-text-label.ba-label-original {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.ba-text-label.ba-label-rewrite {
    color: var(--green);
    background: rgba(34, 197, 94, 0.08);
}

.ba-bullet-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    opacity: 0.9;
}

.ba-bullet-text.ba-has-rewrite {
    opacity: 0.55;
    text-decoration: line-through;
    text-decoration-color: rgba(239, 68, 68, 0.35);
    text-decoration-thickness: 1.5px;
}

.ba-rewrite-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 12px 16px;
    background: rgba(34, 197, 94, 0.05);
    border-left: 3px solid var(--green);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.ba-metric-tip {
    font-size: 12.5px;
    color: var(--accent-light);
    line-height: 1.5;
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(36, 80, 184, 0.05);
    border-left: 3px solid var(--accent-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Flag badges */
.ba-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ba-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.ba-flag-red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.ba-flag-orange {
    background: rgba(251, 146, 60, 0.1);
    color: var(--orange);
    border: 1px solid rgba(251, 146, 60, 0.2);
}

/* ---- Score bars ---- */
.ba-scores-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
    padding: 16px 0;
    margin-top: 4px;
    border-top: 1px solid var(--border);
}

.ba-score-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ba-score-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 88px;
    flex-shrink: 0;
}

.ba-bar-bg {
    flex: 1;
    height: 7px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.ba-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s var(--ease-out);
}

.ba-bar-fill.ba-fill-high { background: linear-gradient(90deg, #22c55e, #4ade80); }
.ba-bar-fill.ba-fill-mid { background: linear-gradient(90deg, #f97316, #fb923c); }
.ba-bar-fill.ba-fill-low { background: linear-gradient(90deg, #dc2626, #ef4444); }

.ba-score-value {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    min-width: 28px;
    text-align: right;
}

.ba-score-value.ba-val-high { color: var(--green); }
.ba-score-value.ba-val-mid { color: var(--orange); }
.ba-score-value.ba-val-low { color: #ef4444; }

/* ---- Light mode adjustments ---- */
[data-theme="light"] .ba-summary-row {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ba-bullet-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ba-stat-card {
    background: rgba(0, 0, 0, 0.02);
}

/* ============================================
   Responsive — Consolidated Media Queries
   Order: 900px → 768px → 480px
   ============================================ */

/* ---- max-width: 900px ---- */
@media (max-width: 900px) {
    .input-grid { grid-template-columns: 1fr; }
    .tips-grid { grid-template-columns: 1fr; }
    .score-display { gap: 16px; }
    .score-header-row { gap: 12px; }
    .tip-stat-row { flex-direction: column; }
    .container { padding: 0 24px; }
    .nav-container { padding: 0 24px; }
    .results-row-two-col {
        grid-template-columns: 1fr;
    }
    .results-preview-body {
        min-height: 500px;
        max-height: 800px;
    }
}

/* ---- max-width: 768px ---- */
@media (max-width: 768px) {
    /* Nav container padding */
    .nav-container {
        padding: 0 16px;
    }

    /* Signed-in banner (moved from 640px) */
    .signed-in-banner-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .signed-in-data-items {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Keyword text panels (moved from 700px) */
    .kw-text-panels {
        grid-template-columns: 1fr;
    }

    /* Score strengths/gaps (moved from 700px) */
    .score-strengths-gaps {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-right {
        text-align: center;
    }
    .footer-right p {
        margin-left: auto;
        margin-right: auto;
    }

    /* Nav links */
    .nav-links { display: none; }

    /* Result card */
    .result-card { padding: 20px 18px; }

    /* About grid */
    .about-grid { grid-template-columns: 1fr; }

    /* Form row */
    .form-row { grid-template-columns: 1fr; }

    /* Section subtitle */
    .section-subtitle { margin-bottom: 40px; }

    /* Skills grid */
    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Analyzer hero */
    .analyzer-hero { padding: 120px 24px 24px; }
    .analyzer-hero h1 { font-size: 28px; }

    /* Analyzer tab bar — bullet analysis */
    .analyzer-tab-bar {
        max-width: 100%;
    }
    .analyzer-tab {
        padding: 10px 16px;
        font-size: 13px;
        gap: 6px;
    }
    .analyzer-tab svg {
        width: 15px;
        height: 15px;
    }
    .analyze-button-xl {
        width: 100%;
        max-width: 300px;
    }
    .bullet-analyze-btn {
        width: 100%;
        max-width: 300px;
    }
    .ba-summary-row {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 20px;
    }
    .ba-stats-grid {
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .ba-scores-grid {
        grid-template-columns: 1fr;
    }
    .ba-header h2 {
        font-size: 22px;
    }
    .ba-card-body {
        padding: 16px 18px;
    }

}

/* ---- max-width: 480px ---- */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .result-card { padding: 16px 14px; }

    .ba-stats-grid {
        grid-template-columns: 1fr;
    }
    .ba-gauge {
        width: 100px;
        height: 100px;
    }
    .ba-gauge svg {
        width: 100px;
        height: 100px;
    }
    .ba-gauge-score {
        font-size: 26px;
    }

    .sidebar {
        width: min(280px, 85vw);
    }
}

/* ============================================
   Dashboard — Enhanced
   ============================================ */
.dashboard-body {
    background: linear-gradient(180deg, #edf4ff 0%, #f0f4ff 40%, #f5f7ff 100%);
    min-height: 100vh;
}

.dashboard-page {
    flex: 1;
    width: 100%;
    min-height: calc(100vh - 60px);
    padding: 80px max(24px, env(safe-area-inset-right, 0px)) 56px max(24px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
}

.dashboard-body .navbar,
[data-theme="light"] .dashboard-body .navbar {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    box-shadow: none;
}

.dashboard-body .navbar.navbar-scrolled,
[data-theme="light"] .dashboard-body .navbar.navbar-scrolled {
    background: rgba(237, 244, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.dashboard-page-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    gap: 22px;
}

/* ── Hero greeting ── */
.dash-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 4px;
}

.dash-hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.8vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--text-primary);
    margin: 0 0 4px;
    line-height: 1.15;
}

.dash-hero-sub {
    margin: 0;
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 40rem;
}

.dash-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 20px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}
.dash-hero-cta:hover {
    background: var(--accent-dim);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(36, 80, 184, 0.2);
}

.dash-hero-email {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── KPI stat cards ── */
.dash-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.dash-kpi {
    position: relative;
    padding: 22px 22px 20px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.7);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.dash-kpi:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1), 0 2px 6px rgba(0,0,0,0.04);
}

.dash-kpi--blue {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    color: #fff;
}
.dash-kpi--indigo {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #818cf8 100%);
    color: #fff;
}
.dash-kpi--teal {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 50%, #2dd4bf 100%);
    color: #fff;
}

.dash-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.dash-kpi-data {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}
.dash-kpi-value {
    font-size: clamp(2rem, 4.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}
.dash-kpi-label {
    font-size: 12.5px;
    font-weight: 500;
    opacity: 0.8;
    letter-spacing: 0.01em;
}

.dash-kpi-sparkline {
    position: absolute;
    bottom: 8px;
    right: 12px;
    width: 80px;
    height: 30px;
    opacity: 0.35;
}
.dash-kpi-sparkline svg {
    width: 100%;
    height: 100%;
}

/* ── Twin row: ring + calendar ── */
.dash-twin-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dash-ring-card,
.dash-cal-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.04);
}

.dash-card-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Ring card */
.dash-ring-body {
    display: flex;
    align-items: center;
    gap: 28px;
}

.dash-ring-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.dash-ring-svg {
    width: 100%;
    height: 100%;
}

.dash-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dash-ring-pct {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.dash-ring-sub {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 2px;
}

.dash-ring-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-ring-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8faff;
    border: 1px solid var(--border-light);
}

.dash-ring-stat-val {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.dash-ring-stat-lbl {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.dash-ring-stat-desc {
    display: block;
    margin-top: 4px;
    font-size: 10.5px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--text-secondary);
    letter-spacing: 0.005em;
}

/* Calendar card */
.dash-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.dash-cal-head .dash-card-title { margin: 0; }

.dash-cal-badge {
    display: flex;
    align-items: baseline;
    gap: 3px;
    background: rgba(36, 80, 184, 0.08);
    border-radius: 8px;
    padding: 5px 12px;
    flex-shrink: 0;
}
.dash-cal-badge-num {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.dash-cal-badge-of {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.dash-cal-card .streak-calendar {
    margin-top: 16px;
}

.streak-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.streak-easter-egg {
    margin: 10px 0 0;
    font-size: 11.5px;
    color: var(--text-muted);
    opacity: 0.5;
    font-style: italic;
    line-height: 1.3;
    text-align: center;
}

.streak-day {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: #f8faff;
    border: 1px solid var(--border-light);
    transition: all 0.15s ease;
    cursor: default;
}

.streak-day.streak-header {
    aspect-ratio: auto;
    background: none;
    border: none;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 0 4px;
    opacity: 0.7;
}

.streak-day.streak-empty {
    background: none;
    border: none;
}

.streak-day.streak-active {
    background: linear-gradient(135deg, #2450b8, #3b82f6);
    color: #fff;
    border-color: #2450b8;
    box-shadow: 0 2px 6px rgba(36, 80, 184, 0.25);
}

.streak-day.streak-today {
    border-color: #2450b8;
    box-shadow: 0 0 0 2px rgba(36, 80, 184, 0.2);
}

.streak-day.streak-today.streak-active {
    box-shadow: 0 0 0 2px rgba(36, 80, 184, 0.3), 0 2px 6px rgba(36, 80, 184, 0.25);
}

.streak-day.streak-future {
    opacity: 0.3;
    border-style: dashed;
}

/* ── Tools section ── */
.dash-tools-section {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 26px 28px 30px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.04);
}

.dash-tools-head {
    margin-bottom: 20px;
}
.dash-tools-title {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    margin-bottom: 4px;
}
.dash-tools-sub {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.dashboard-tool-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.dashboard-tool-link {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 82px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    background: #fcfdff;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
}

.dashboard-tool-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(36, 80, 184, 0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.dashboard-tool-link:hover::before { opacity: 1; }

.dashboard-tool-link:hover {
    border-color: rgba(37, 99, 235, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(36, 80, 184, 0.12), 0 2px 8px rgba(36, 80, 184, 0.05);
    background: #fff;
}

.dashboard-tool-link-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    transition: transform 0.25s ease;
}

.dashboard-tool-link:hover .dashboard-tool-link-icon {
    transform: scale(1.08);
}

/* Colorful icon variants */
.dtl-icon--blue    { background: rgba(37, 99, 235, 0.09); border: 1px solid rgba(37, 99, 235, 0.15); color: #2563eb; }
.dtl-icon--indigo  { background: rgba(99, 102, 241, 0.09); border: 1px solid rgba(99, 102, 241, 0.15); color: #6366f1; }
.dtl-icon--teal    { background: rgba(20, 184, 166, 0.09); border: 1px solid rgba(20, 184, 166, 0.15); color: #0d9488; }
.dtl-icon--violet  { background: rgba(139, 92, 246, 0.09); border: 1px solid rgba(139, 92, 246, 0.15); color: #7c3aed; }
.dtl-icon--amber   { background: rgba(217, 119, 6, 0.09); border: 1px solid rgba(217, 119, 6, 0.15); color: #d97706; }
.dtl-icon--emerald { background: rgba(16, 185, 129, 0.09); border: 1px solid rgba(16, 185, 129, 0.15); color: #059669; }
.dtl-icon--rose    { background: rgba(244, 63, 94, 0.09); border: 1px solid rgba(244, 63, 94, 0.15); color: #e11d48; }

.dashboard-tool-link-icon svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.dashboard-tool-link-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dashboard-tool-link-label {
    min-width: 0;
    line-height: 1.3;
    font-weight: 650;
    font-size: 14.5px;
    color: var(--text-primary);
}

.dashboard-tool-link-desc {
    font-size: 12.5px;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.4;
}

.dashboard-tool-link-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.dashboard-tool-link:hover .dashboard-tool-link-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent);
}

/* ── Dashboard responsive ── */
@media (max-width: 900px) {
    .dash-kpi-row {
        grid-template-columns: 1fr;
    }
    .dash-twin-row {
        grid-template-columns: 1fr;
    }
    .dash-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .dash-ring-body {
        flex-direction: column;
        align-items: center;
    }
    .dash-ring-stats {
        flex-direction: row;
        width: 100%;
    }
    .dash-ring-stat {
        flex: 1;
        align-items: center;
        text-align: center;
    }
    .dashboard-tool-links {
        grid-template-columns: 1fr;
    }
    .dash-hero-title {
        font-size: 1.5rem;
    }
}

/* ============================================
   RAG Review — PDF + RAG Analysis UI
   ============================================ */

/* --- RAG Input Form --- */
.rag-analyze-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rag-input-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.rag-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rag-field-span-2 {
    grid-column: 1 / -1;
}

.rag-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rag-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-body);
    transition: border-color var(--transition);
}
.rag-input:focus {
    outline: none;
    border-color: var(--accent);
}

.rag-jd-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-body);
    resize: vertical;
    transition: border-color var(--transition);
}
.rag-jd-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.rag-jd-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.rag-sync-jd-btn {
    padding: 6px 14px;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.rag-sync-jd-btn:hover {
    background: var(--accent-glow-strong);
}

.rag-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* File row status */
.rag-file-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-secondary);
}

.rag-jd-active {
    color: var(--green);
}
.rag-jd-missing {
    color: var(--orange);
}

/* Submit button */
.rag-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition);
}
.rag-submit-btn:hover:not(:disabled) {
    background: var(--accent-dim);
    transform: translateY(-1px);
}
.rag-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Progress / Loading --- */
.rag-progress-section {
    text-align: center;
    padding: 32px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.rag-progress-indeterminate {
    width: 200px;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    margin: 16px auto 0;
    overflow: hidden;
    position: relative;
}
.rag-progress-indeterminate::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    animation: ragProgressSlide 1.4s ease-in-out infinite;
}
@keyframes ragProgressSlide {
    0% { left: -40%; }
    100% { left: 100%; }
}

/* --- Error Display --- */
.rag-error-display {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    border-radius: var(--radius);
}
.rag-error {
    color: var(--red);
}
.rag-error-message {
    font-size: 14px;
    color: var(--red);
    line-height: 1.5;
}

/* --- RAG "What is RAG?" Explainer --- */
.rag-what-is-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.rag-what-is-icon {
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 2px;
}
.rag-what-is-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.rag-explainer {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* --- RAG Results Section --- */
.rag-results-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: resultFadeIn 0.6s var(--ease-out) both;
}

/* --- Score Hero --- */
.rag-score-hero {
    display: flex;
    align-items: center;
    gap: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.rag-score-hero-left {
    flex-shrink: 0;
    text-align: center;
}

.rag-score-big {
    font-size: 56px;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--accent);
    line-height: 1;
}

.rag-score-label-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

.rag-score-hero-right {
    flex: 1;
    min-width: 0;
}

.rag-score-summary {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.rag-takeaway {
    font-size: 13px;
    color: var(--text-muted);
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    line-height: 1.5;
}

.rag-next-step {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.rag-next-step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --- Overall card (score box) --- */
.rag-overall-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
}
.rag-overall-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.rag-overall-score {
    font-size: 48px;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--accent);
    line-height: 1;
}
.rag-overall-summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 480px;
    margin: 0 auto;
}

/* --- PDF Formatting Check Card --- */
.rag-format-check {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.rag-format-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.rag-pdf-preview-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
    border-right: 1px solid var(--border);
}

.rag-pdf-preview-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.rag-pdf-preview-img {
    max-width: 100%;
    max-height: 320px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    object-fit: contain;
}

.rag-pdf-meta {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}
.rag-pdf-label {
    font-size: 11px;
    color: var(--text-muted);
}

.rag-format-results-col {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.rag-format-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.rag-format-header svg {
    color: var(--accent);
    flex-shrink: 0;
}
.rag-format-header h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    flex: 1;
    min-width: 0;
}
.rag-format-score {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.rag-format-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 420px;
    padding-right: 4px;
}

.rag-format-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all var(--transition);
}

.rag-format-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.rag-format-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rag-format-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.rag-format-detail {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Severity colors for format items */
.rag-fmt-pass {
    background: var(--green-bg);
    border-color: var(--green-border);
}
.rag-fmt-pass .rag-format-icon { color: var(--green); }
.rag-fmt-pass .rag-format-label { color: var(--green); }

.rag-fmt-warn {
    background: var(--orange-bg);
    border-color: var(--orange-border);
}
.rag-fmt-warn .rag-format-icon { color: var(--orange); }
.rag-fmt-warn .rag-format-label { color: var(--orange); }

.rag-fmt-fail {
    background: var(--red-bg);
    border-color: var(--red-border);
}
.rag-fmt-fail .rag-format-icon { color: var(--red); }
.rag-fmt-fail .rag-format-label { color: var(--red); }

/* --- Results Grid (fallback card view) --- */
.rag-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.rag-result-card {
    position: relative;
    overflow: hidden;
}

.rag-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.rag-card-body {
    padding-top: 8px;
}

.rag-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rag-card-list-item {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 16px;
    position: relative;
}
.rag-card-list-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* --- Annotated Resume View --- */
.rag-annotated-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rag-annotated-legend {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
}
.rag-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}
.rag-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.rag-sev-strength .rag-legend-dot { background: var(--green); }
.rag-sev-improvement .rag-legend-dot { background: var(--orange); }
.rag-sev-critical .rag-legend-dot { background: var(--red); }

/* Resume section block */
.rag-resume-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    overflow: hidden;
}
.rag-resume-section:hover,
.rag-section-hover {
    border-color: var(--border-light);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.rag-has-annotations {
    border-left: 3px solid var(--accent);
}

.rag-general-section {
    border-left: 3px solid var(--orange);
}

.rag-section-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    user-select: none;
}
.rag-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}
.rag-section-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.rag-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.rag-badge {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.rag-badge-critical {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}
.rag-badge-improvement {
    background: var(--orange-bg);
    color: var(--orange);
    border: 1px solid var(--orange-border);
}
.rag-badge-strength {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.rag-expand-icon {
    transition: transform var(--transition);
    color: var(--text-muted);
}
.rag-expand-icon.rag-expanded {
    transform: rotate(180deg);
}

/* Resume text block */
.rag-section-text {
    padding: 0 20px 14px;
}
.rag-resume-pre {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: #0f172a;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
}

/* Collapsed hint */
.rag-collapsed-hint {
    padding: 8px 20px 14px;
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
    font-weight: 500;
}
.rag-collapsed-hint:hover {
    text-decoration: underline;
}

/* --- Annotations (expanded feedback) --- */
.rag-annotations {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 20px 16px;
    animation: resultFadeIn 0.3s var(--ease-out) both;
}

.rag-annotation {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all var(--transition);
}
.rag-annotation.rag-annotation-hover {
    transform: translateX(4px);
}

.rag-annotation.rag-sev-strength {
    background: var(--green-bg);
    border-color: var(--green-border);
}
.rag-annotation.rag-sev-improvement {
    background: var(--orange-bg);
    border-color: var(--orange-border);
}
.rag-annotation.rag-sev-critical {
    background: var(--red-bg);
    border-color: var(--red-border);
}

.rag-annotation-indicator {
    flex-shrink: 0;
    margin-top: 2px;
}
.rag-annotation-icon {
    font-size: 14px;
}
.rag-sev-strength .rag-annotation-icon { color: var(--green); }
.rag-sev-improvement .rag-annotation-icon { color: var(--orange); }
.rag-sev-critical .rag-annotation-icon { color: var(--red); }

.rag-annotation-content {
    flex: 1;
    min-width: 0;
}
.rag-annotation-category {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
    color: var(--text-muted);
}
.rag-annotation-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

/* --- Priority Fixes --- */
.rag-priority-fixes {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.rag-priority-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.rag-priority-header svg {
    color: var(--accent);
    flex-shrink: 0;
}
.rag-priority-header h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
}

.rag-priority-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    counter-reset: priority;
}
.rag-priority-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.rag-priority-item:hover {
    background: var(--accent-glow);
}
.rag-priority-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
}
.rag-priority-text {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* --- Narrative (collapsible) --- */
.rag-narrative-details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.rag-narrative-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    transition: background var(--transition);
}
.rag-narrative-summary:hover {
    background: var(--bg);
}
.rag-narrative-summary svg {
    color: var(--accent);
    flex-shrink: 0;
}
.rag-narrative-body {
    padding: 0 24px 24px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* --- RAG Responsive --- */
@media (max-width: 768px) {
    .rag-score-hero {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 20px;
    }
    .rag-format-split {
        grid-template-columns: 1fr;
    }
    .rag-pdf-preview-col {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .rag-field-grid {
        grid-template-columns: 1fr;
    }
    .rag-annotated-legend {
        flex-wrap: wrap;
        gap: 12px;
    }
    .rag-results-grid {
        grid-template-columns: 1fr;
    }
    .rag-badge-row {
        flex-wrap: wrap;
    }
    .rag-section-header {
        padding: 12px 14px;
    }
    .rag-section-text {
        padding: 0 14px 12px;
    }
    .rag-annotations {
        padding: 0 14px 14px;
    }
}

