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

/* ═══════════════════════════════════════════════════════════════════
   ColorPickerCode.com - MODERN PREMIUM DESIGN 2026
   Vibrant • Glassmorphism • Professional Typography
   ═══════════════════════════════════════════════════════════════════ */



:root {
    /* Brand Colors (Vibrant Blue & Violet Gradient) */
    --primary: #4F46E5;
    /* Indigo */
    --primary-hover: #4338CA;
    --accent: #8B5CF6;
    /* Violet */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;

    /* Backgrounds & Surfaces */
    --bg-page: #F8FAFC;
    --surface-1: #FFFFFF;
    --surface-2: #F1F5F9;
    --surface-glass: rgba(255, 255, 255, 0.85);

    /* Text Colors */
    --text-main: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;

    /* Borders & Shadows */
    --border: #E2E8F0;
    --ring: rgba(79, 70, 229, 0.2);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
    --bg-page: #020617;
    --surface-1: #0F172A;
    --surface-2: #1E293B;
    --surface-glass: rgba(15, 23, 42, 0.85);

    --text-main: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;

    --border: #1E293B;
    --ring: rgba(99, 102, 241, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════
   GLOBAL RESET
   ═══════════════════════════════════════════════════════════════════ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    background-image:
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Font Smoothing for Premium Feel */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

code,
pre {
    font-family: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s var(--ease-bounce);
    cursor: pointer;
    border: none;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════
   FAQ SECTION (Original Simple List)
   ═══════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════
   FAQ SECTION (Modern Accordion)
   ═══════════════════════════════════════════════════════════════════ */
.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item[open] {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
}

/* Styles for Static Blog FAQs (.faq-box) */
.faq-box {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all 0.2s;
    margin-bottom: 1rem;
    /* Spacing between boxes */
}

.faq-box:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.faq-q {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.faq-a {
    display: block;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}


.faq-question {
    padding: 1.25rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-2);
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--surface-1);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.faq-item[open] .faq-question::after {
    content: '\2212';
    /* Minus sign */
    transform: none;
    color: var(--primary);
}

.faq-answer {
    padding: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-top: 1px solid var(--border);
    background: var(--surface-1);
}

/* ═══════════════════════════════════════════════════════════════════
   RICH CONTENT ARTICLES (Converter Pages)
   ═══════════════════════════════════════════════════════════════════ */
.content-article {
    max-width: 800px;
    margin: 5rem auto;
}

.article-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.article-card h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.article-card h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.article-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.formula-box {
    background: var(--surface-2);
    padding: 2rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    border: 1px dashed var(--border);
}

.formula-step {
    margin-bottom: 1rem;
}

.formula-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.data-table th {
    background: var(--surface-2);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.data-table td {
    padding: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: var(--surface-glass);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-weight: 800;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    list-style: none;
}

.nav-menu .nav-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    max-width: 18px;
    min-height: 18px;
    max-height: 18px;
    flex-shrink: 0;
    display: none;
}

@media (min-width: 769px) {
    .nav-menu {
        display: flex;
        gap: 2rem;
    }

    .nav-menu a {
        text-decoration: none;
        color: var(--text-secondary);
        font-weight: 500;
        transition: color 0.2s;
        display: flex;
        align-items: center;
    }

    /* Hide SaaS dashboard icons on horizontal desktop nav */
    .nav-menu .nav-icon {
        display: none;
    }

    .trigger-label {
        display: flex;
        align-items: center;
    }

    .nav-menu a:hover {
        color: var(--primary);
    }
}

/* Header Controls (Theme + Mobile Btn) */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    /* Hidden on Desktop */
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 0;
}

/* X icon hidden by default — only shown when menu is open */
.menu-icon-close {
    display: none !important;
}
body.menu-open .menu-icon-open {
    display: none !important;
}
body.menu-open .menu-icon-close {
    display: block !important;
}


/* ═══════════════════════════════════════════════════════════════════
   MOBILE MENU — Premium Slide-In Drawer (Brand-Level)
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.6rem 1.25rem;
    }

    /* ── Mobile Hamburger Button ── */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        z-index: 1001;
        position: relative;
        background: transparent;
        border: none;
        color: var(--text-main);
        transition: background-color 0.2s, color 0.2s;
    }

    .mobile-menu-btn:active {
        background: var(--surface-2);
    }

    /* SVG Icon Toggle — Hamburger ↔ X */    /* Spin-in animation for X icon */
    @keyframes spinIn {
        from { transform: rotate(-90deg); opacity: 0; }
        to { transform: rotate(0deg); opacity: 1; }
    }

    body.menu-open .menu-icon-close {
        animation: spinIn 0.3s ease;
    }

    /* ── Drawer Panel ── */
    .nav-menu {
        display: none !important;
        position: fixed;
        top: 0;
        right: 0;
        left: auto !important;
        width: 100%;
        max-width: 340px;
        height: auto !important;
        /* NOT 100vh — prevents flex stretch */
        min-height: 100vh;
        min-height: 100dvh;
        background-color: var(--surface-1);
        flex-direction: column;
        justify-content: flex-start !important;
        align-items: stretch;
        padding: 5rem 1.5rem 2rem;
        gap: 0.25rem;
        /* Tight, consistent spacing */
        opacity: 0;
        visibility: hidden;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
            opacity 0.3s ease,
            visibility 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        border-left: 1px solid var(--border);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    }

    [data-theme="dark"] .nav-menu {
        background-color: var(--surface-1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
    }

    .nav-menu.active {
        display: flex !important;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    /* Remove old MENU label */
    .nav-menu::before {
        display: none !important;
    }

    /* ── Nav Items ── */
    .nav-menu li {
        width: 100%;
        list-style: none;
        border: none;
        /* Removed heavy borders */
    }

    .nav-menu>li>a {
        display: flex;
        align-items: center;
        gap: 1.25rem;
        /* Large gap separating icon and text like the example */
        padding: 0.9rem 1.25rem;
        font-size: 1.15rem;
        font-weight: 500;
        color: var(--text-muted);
        /* Muted default state */
        text-decoration: none;
        border-radius: 12px;
        transition: all 0.2s ease;
        letter-spacing: -0.01em;
    }

    /* Active SaaS Dashboard State */
    .nav-menu>li>a.active {
        background: var(--surface-2);
        /* The distinct pill shape */
        color: var(--text-main);
        /* Bright prominent text */
        font-weight: 600;
    }

    .nav-menu>li>a:hover,
    .dropdown-trigger:hover {
        background: rgba(139, 92, 246, 0.05);
        /* Very subtle hover */
        color: var(--text-main);
    }

    .nav-menu .nav-icon {
        display: block;
        width: 24px;
        height: 24px;
        min-width: 24px;
        max-width: 24px;
        min-height: 24px;
        max-height: 24px;
        flex-shrink: 0;
        opacity: 0.8;
        transition: opacity 0.2s;
    }

    .nav-menu>li>a.active .nav-icon,
    .nav-menu>li>a:hover .nav-icon,
    .dropdown-trigger:hover .nav-icon {
        opacity: 1;
        /* Brightens up */
    }

    /* ── Dropdown Accordion ── */
    .nav-item-dropdown {
        flex-direction: column;
        align-items: stretch;
    }

    .trigger-label {
        display: flex;
        align-items: center;
        gap: 1.25rem;
        /* Match the <a> tag gap */
    }

    .dropdown-trigger {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        padding: 0.9rem 1.25rem !important;
        font-size: 1.15rem !important;
        font-weight: 500 !important;
        color: var(--text-muted) !important;
        background: transparent !important;
        border-radius: 12px !important;
        border: none !important;
        cursor: pointer;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
        outline: none;
        letter-spacing: -0.01em;
        font-family: inherit !important;
    }

    .dropdown-trigger:hover,
    .dropdown-trigger:active {
        background: rgba(139, 92, 246, 0.05);
    }

    .dropdown-trigger .chevron-icon {
        margin-left: auto;
        /* Push safely to the right without forcing space-between on wrapper */
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        color: var(--text-muted);
    }

    .nav-item-dropdown.active .dropdown-trigger {
        color: var(--text-main);
        /* Match active state */
    }

    .nav-item-dropdown.active .dropdown-trigger .chevron-icon {
        transform: rotate(180deg);
        color: var(--text-main);
    }

    /* ── Dropdown Panel (Clean Layout Switch) ── */
    .dropdown-menu {
        position: static !important;
        display: none !important;
        /* Physically removed from layout to kill gap */
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        width: 100% !important;
        padding: 0 0 0 1.5rem !important;
        /* Clean indent */
        margin: 0 !important;
        min-width: 0 !important;
    }

    .dropdown-menu::before {
        display: none !important;
    }

    .nav-item-dropdown.active .dropdown-menu {
        display: block !important;
        margin-top: 0.25rem !important;
        margin-bottom: 0.5rem !important;
        animation: fadeIn 0.25s ease;
    }

    .dropdown-menu a {
        display: flex !important;
        align-items: center !important;
        padding: 0.85rem 1.25rem !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        color: var(--text-secondary) !important;
        text-decoration: none !important;
        border-radius: 0 12px 12px 0 !important;
        border-left: 2px solid var(--border) !important;
        /* Elegant vertical line */
        background: transparent !important;
        transition: all 0.2s ease !important;
    }

    .dropdown-menu a::before {
        display: none !important;
        /* Replace ugly dots */
    }

    .dropdown-menu a:last-child {
        border-bottom: none !important;
    }

    .dropdown-menu a:hover,
    .dropdown-menu a:active {
        color: var(--primary) !important;
        border-left-color: var(--primary) !important;
        background: rgba(79, 70, 229, 0.05) !important;
    }

    /* ── Body Lock & Stacking Fixes (iOS Safari Bulletproof) ── */
    body.menu-open {
        overflow: hidden;
    }

    /* iOS Safari Bug Fix: position:fixed breaks inside position:sticky. Force fixed to viewport! */
    body.menu-open .header {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: transparent !important;
        transform: none !important;
        z-index: 1000;
    }

    body.menu-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(15, 23, 42, 0.75);
        /* Darker overlay */
        z-index: 999;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        animation: fadeInOverlay 0.3s ease;
    }

    @keyframes fadeInOverlay {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    /* Ensure toggle remains clickable if needed, or hide in drawer */
}

.theme-toggle:hover {
    background: var(--surface-2);
    color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════ */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

.hero-section {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 900px;
    margin: 0 auto 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════
   APP INTERFACE (HOME PAGE MAIN TOOL)
   ═══════════════════════════════════════════════════════════════════ */
.tool-section {
    margin-bottom: 4rem;
}

.app-interface {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .app-interface {
        grid-template-columns: 1fr;
    }
}

/* Left Column */
.app-left-col {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.canvas-wrapper {
    width: 100%;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #e5e5e5;
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    margin-bottom: 1.5rem;
    cursor: crosshair;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#canvas {
    max-width: 100%;
    display: block;
}

.magnifier {
    position: fixed;
    width: 120px;
    height: 120px;
    border: 4px solid white;
    border-radius: 16px;
    pointer-events: none;
    display: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 999;
    background: #fff;
    overflow: hidden;
}

.magnifier canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.palette-section h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.palette-strip {
    display: flex;
    height: 50px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.palette-swatch {
    flex: 1;
    height: 100%;
    transition: transform 0.2s;
    cursor: pointer;
}

.palette-swatch:hover {
    transform: scale(1.1);
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Right Column */
.app-right-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.selected-color-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface-1);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.preview-main {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.color-meta h3 {
    font-family: 'JetBrains Mono';
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.color-meta p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.code-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.code-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-1);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.code-row:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--ring);
}

.code-label {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 35px;
    text-transform: uppercase;
}

.code-input {
    border: none;
    background: transparent;
    font-family: 'JetBrains Mono';
    font-size: 1rem;
    color: var(--text-main);
    flex: 1;
    outline: none;
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--surface-2);
    color: var(--primary);
}

.upload-cta-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.upload-btn-lg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.upload-btn-lg:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.pick-screen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.pick-screen-btn:hover {
    background: var(--surface-2);
    border-color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════
   CONVERTER WORKSPACES (SUB-PAGES)
   ═══════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════
   CONVERTER WORKSPACES (SUB-PAGES)
   ═══════════════════════════════════════════════════════════════════ */
.converter-workspace {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto 5rem;
    position: relative;
    overflow: hidden;
}

.converter-workspace::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 768px) {
    .converter-workspace {
        padding: 1.5rem;
    }

    .tool-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-prefix {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.25rem;
    pointer-events: none;
}

.input-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: block;
}

.input-field {
    width: 100%;
    padding: 1rem 1rem 1rem 2.5rem;
    /* Space for prefix if needed */
    font-size: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-field.has-prefix {
    padding-left: 3rem;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--ring);
    background: var(--surface-1);
    transform: translateY(-1px);
}

/* Result Section */
.result-box {
    background: var(--surface-2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.preview-swatch-large {
    width: 100%;
    height: 120px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 0.5rem;
    transition: background-color 0.3s ease;
}

.channel-grid {
    display: flex;
    gap: 1rem;
}

.channel-item {
    flex: 1;
    min-width: 0;
}

.channel-label {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.channel-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--surface-1);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-align: center;
}

.result-code-display {
    background: var(--surface-1);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    font-weight: 700;
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.result-code-display:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}


.btn-full {
    width: 100%;
    justify-content: center;
}

/* Sliders */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    outline: none;
    background: var(--surface-2);
    cursor: pointer;
    margin-top: 0.5rem;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.range-r::-webkit-slider-thumb {
    background: #ef4444;
}

.range-g::-webkit-slider-thumb {
    background: #22c55e;
}

.range-b::-webkit-slider-thumb {
    background: #3b82f6;
}

.range-h::-webkit-slider-thumb {
    background: linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red);
}

.range-s::-webkit-slider-thumb {
    background: linear-gradient(to right, gray, #22c55e);
}

/* Generic sat */
.range-l::-webkit-slider-thumb {
    background: linear-gradient(to right, black, white);
}

.channel-control {
    background: var(--surface-1);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    transition: border-color 0.2s;
}

.channel-control:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
}

.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}


.number-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    text-align: center;
    background: var(--surface-2);
    color: var(--text-main);
}

/* ═══════════════════════════════════════════════════════════════════
   CONVERTER INDEX PAGE (Card Grid)
   ═══════════════════════════════════════════════════════════════════ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.tool-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-card:hover::before {
    opacity: 1;
}

.icon-box {
    width: 56px;
    height: 56px;
    background: var(--surface-2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    transition: all 0.3s;
}

.tool-card:hover .icon-box {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(3deg);
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-family: 'Outfit', sans-serif;
}

.tool-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tool-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface-2);
    /* Standard state less aggressive */
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s;
    text-align: center;
}

.tool-card:hover .tool-cta {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* SEO Content Styling */
.seo-content {
    max-width: 800px;
    margin: 0 auto 5rem;
}

.seo-box {
    background: var(--surface-glass);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 3rem;
    /*   backdrop-filter: blur(10px); */
}

.seo-box h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-main), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.seo-box h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.seo-box p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Format Grid */
.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.format-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.2s, border-color 0.2s;
}

.format-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.format-card h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.format-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.5;
    color: var(--text-secondary);
}


/* ═══════════════════════════════════════════════════════════════════
   FEATURES & STEPS SECTIONS
   ═══════════════════════════════════════════════════════════════════ */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: var(--surface-1);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.icon-box {
    width: 54px;
    height: 54px;
    background: var(--surface-2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.how-to-section {
    margin-bottom: 5rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step-card {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════
   SEO GRID (HOME PAGE)
   ═══════════════════════════════════════════════════════════════════ */
.seo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 600px) {

    .seo-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: var(--surface-1);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* ═══════════════════════════════════════════════════════════════════
   BREADCRUMB & CONTENT
   ═══════════════════════════════════════════════════════════════════ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.breadcrumb a:hover {
    color: var(--primary);
}



/* ═══════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════
   FOOTER (Professional Update)
   ═══════════════════════════════════════════════════════════════════ */
.footer {
    background: var(--surface-1);
    border-top: 1px solid var(--border);
    padding: 5rem 1.5rem 2rem;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

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

@media (max-width: 600px) {
    .footer {
        padding: 3rem 1rem 1rem;
    }
}


/* Footer Top: Brand & tagline */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Footer Grid: Links & Newsletter */
.footer-grid {
    display: grid;
    /* Flexible columns: each column min 180px, grow to fill space */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   CONVERTER CONTENT ARTICLE STYLES
   ═══════════════════════════════════════════════════════════════════ */

.content-article {
    max-width: 800px;
    margin: 0 auto 5rem;
}

.article-card {
    background: var(--surface-1);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.article-card h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 0.75rem;
}

.article-card h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.article-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.article-card p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Formula Box */
.formula-box {
    background: var(--surface-2);
    border-radius: 12px;
    padding: 2rem;
    font-family: 'JetBrains Mono', monospace;
    border-left: 4px solid var(--accent);
    margin: 2rem 0;
    overflow-x: auto;
}

.formula-step {
    margin-bottom: 1rem;
    color: var(--text-main);
    line-height: 1.6;
}

.formula-step:last-child {
    margin-bottom: 0;
}

.formula-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--surface-2);
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.data-table th:first-child {
    border-top-left-radius: 8px;
}

.data-table th:last-child {
    border-top-right-radius: 8px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--surface-2);
}

/* FAQ Accordion Styles */
.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Brand Palette Specific Styles */
.palette-header {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.brand-logo-large {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1;
    display: inline-block;
    background: var(--surface-1);
    padding: 1rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    color: var(--text-main);
}

.color-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

.color-card {
    background: var(--surface-1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.color-card:hover {
    transform: translateY(-5px);
}

.color-preview-large {
    height: 180px;
    width: 100%;
    cursor: pointer;
    position: relative;
}

.color-preview-large::after {
    content: 'Click to Copy';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.color-preview-large:hover::after {
    opacity: 1;
}

.color-values {
    padding: 1.5rem;
}

.color-values h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text-main);
}

.value-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.value-row:last-child {
    border-bottom: none;
}

.value-row span:first-child {
    font-weight: 600;
    color: var(--text-muted);
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.section-card {
    background: var(--surface-1);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.section-card h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.section-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}



.faq-item[open] {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
}

.faq-question {
    padding: 1.25rem;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-2);
    color: var(--text-main);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.faq-item[open] .faq-question::after {
    content: '\2212';
    /* Minus sign */
    transform: none;
    color: var(--primary);
}

.faq-answer {
    padding: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
    border-top: 1px solid var(--border);
    background: var(--surface-1);
}

.footer-col h4 {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 0.85rem;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col a:hover {
    color: var(--primary);
    transform: translateX(2px);
}

/* Newsletter Widget */
.newsletter-col {
    grid-column: span 1;
}

@media (min-width: 900px) {
    /* Make newsletter wider if space */
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface-1);
    box-shadow: 0 0 0 3px var(--ring);
}

.newsletter-form button {
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: none;
    background: var(--text-main);
    color: var(--bg-page);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.newsletter-form button:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Footer Bottom */
.footer-divider {
    height: 1px;
    background: var(--border);
    margin-bottom: 2rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════════════════════════
   SHARED COMPONENTS (Theme Toggle, Tools Grid)
   ═══════════════════════════════════════════════════════════════════*/
/* Custom Plus Icon (Simple restoration) */
.plus-icon {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
    background: transparent;
}

.plus-icon::before,
.plus-icon::after {
    content: '';
    position: absolute;
    background-color: var(--text-main);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.2s;
}

.plus-icon::before {
    width: 2px;
    height: 16px;
}

.plus-icon::after {
    width: 16px;
    height: 2px;
}

/* Open State */
.faq-item[open] .plus-icon::before {
    transform: translate(-50%, -50%) rotate(90deg);
}

/* No fancy hover effects, keeping it clean */
.faq-item:hover .plus-icon {
    background: transparent;
}


.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--surface-2);
    color: var(--primary);
}

/* Tools Grid (Consolidated from sub-pages) */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tool-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.tool-icon {
    width: 64px;
    height: 64px;
    background: var(--surface-2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tool-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* -------------------------------------------------------------------
   GLOBAL MOBILE RESPONSIVENESS TWEAKS
   ------------------------------------------------------------------- */
@media (max-width: 640px) {
    .main-container {
        padding: 1rem;
    }

    .hero-section {
        padding: 2rem 0;
    }

    .converter-workspace {
        padding: 1.5rem;
        margin-bottom: 3rem;
    }

    .result-box {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .output-value {
        font-size: 1.25rem;
        word-break: break-all;
    }

    .input-field {
        font-size: 1.1rem;
        padding: 1rem;
    }

    .footer-grid {
        gap: 2rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   DROPDOWN MENU
   ═══════════════════════════════════════════════════════════════════ */
.nav-item-dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0;
}

@media (min-width: 769px) {
    .dropdown-trigger:hover {
        color: var(--primary);
    }

    .dropdown-icon {
        transition: transform 0.2s ease;
        width: 16px;
        height: 16px;
        opacity: 0.7;
    }

    .nav-item-dropdown:hover .dropdown-icon {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        position: absolute;
        top: 100%;
        /* Align with bottom of header */
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        background: var(--surface-1);
        min-width: 240px;
        padding: 0.5rem;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-xl);
        border: 1px solid var(--border);
        opacity: 0;
        visibility: hidden;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
    }

    /* Arrow tip for dropdown */
    .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -6px;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
        width: 12px;
        height: 12px;
        background: var(--surface-1);
        border-left: 1px solid var(--border);
        border-top: 1px solid var(--border);
    }

    .nav-item-dropdown:hover .dropdown-menu,
    .nav-item-dropdown:focus-within .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    .dropdown-menu li {
        list-style: none;
        width: 100%;
    }

    .dropdown-menu a {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
        color: var(--text-secondary);
        font-weight: 500;
        text-decoration: none;
        transition: all 0.2s;
        font-size: 0.95rem;
    }

    .dropdown-menu a:hover {
        background: var(--surface-2);
        color: var(--primary);
        transform: translateX(4px);
    }
}



/* -------------------------------------------------------------------
   BLOG & ARTICLE LAYOUT (Professional Modern Update)
   ------------------------------------------------------------------- */

/* Blog Layout Grid */
/* FIX 3: Widen content column + add sidebar TOC grid */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1.5rem;
    gap: 0;
}

/* Desktop: two-column grid when TOC sidebar is present */
@media (min-width: 1100px) {
    .blog-layout {
        grid-template-columns: 1fr;
        max-width: 800px;
        gap: 3rem;
        align-items: start;
    }
    .blog-layout article {
        min-width: 0;
    }
}

@media (max-width: 900px) {
    .blog-layout {
        max-width: 100%;
    }
}

/* Article Typography & Spacing */
.article-content {
    font-family: 'Outfit', sans-serif;
    color: var(--text-secondary);
    font-size: 1.15rem;
    /* Slightly larger text */
    line-height: 1.85;
    /* Relaxed reading rhythm */
}

.article-content p {
    margin-bottom: 2rem;
}

.article-content h2 {
    color: var(--text-main);
    font-size: 2.25rem;
    font-weight: 800;
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.02em;
    /* Tighter tracking for headings */
}

.article-content h3 {
    color: var(--text-main);
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 2.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 0.5rem;
}

.article-content li::marker {
    color: var(--primary);
    /* Colored bullets */
    font-weight: bold;
}

/* Featured & Hero Elements */
.blog-hero {
    background: var(--surface-1);
    /* Cleaner look */
    padding: 5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(79, 70, 229, 0.08) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: var(--text-main);
    max-width: 1000px;
    margin: 0 auto 1.5rem;
    line-height: 1.1;
    position: relative;
    z-index: 1;
}

.blog-meta-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-meta-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* Professional Content Boxes */
.key-takeaways {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 4rem;
    box-shadow: var(--shadow-sm);
}

.key-takeaways h3 {
    margin-top: 0;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
}

.pro-tip-box {
    background: linear-gradient(135deg, var(--surface-1), var(--surface-2));
    border: 1px solid var(--primary);
    /* Highlighted border */
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.15);
    /* Glow effect */
    position: relative;
}

.pro-tip-box p {
    margin-bottom: 0;
    font-weight: 500;
    color: var(--text-main);
}

/* Sidebar Widgets */
.sidebar {
    position: sticky;
    top: 6rem;
    align-self: start;
}

.sidebar-widget {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    padding: 0.5rem 0 0.5rem 1rem;
    display: block;
    line-height: 1.4;
}

.toc-link:hover {
    color: var(--primary);
    background: var(--surface-2);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.toc-link.active {
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
    background: linear-gradient(to right, rgba(79, 70, 229, 0.05), transparent);
}

.widget-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 2rem;
    background: var(--surface-1);
    padding: 3rem;
    border-radius: var(--radius-xl);
    margin-top: 6rem;
    align-items: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.author-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--surface-2);
}

.author-info h4 {
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.author-info p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Breadcrumbs */
.breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface-2);
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0 auto 2rem;
    /* Centered in hero */
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

/* -------------------------------------------------------------------
   BLOG INDEX PAGE DESIGN
   ------------------------------------------------------------------- */
.blog-index-header {
    text-align: center;
    padding: 6rem 1.5rem;
    background: linear-gradient(135deg, var(--surface-1) 0%, var(--surface-2) 100%);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4rem;
}

.blog-index-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.blog-index-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 2.5rem;
    padding: 0 1.5rem 6rem;
    max-width: 1400px;
    margin: 0 auto;
}

.blog-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.blog-card-image-wrapper {
    width: 100%;
    height: 220px;
    background: var(--surface-2);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img {
    transform: scale(1.05);
}

/* Fallback: Hide wrapper if image fails (handled by JS/inline onerror) */
.blog-card-image-wrapper.no-image {
    display: none;
}

.blog-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.blog-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.read-more-link {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.read-more-link svg {
    transition: transform 0.2s;
}

.blog-card:hover .read-more-link svg {
    transform: translateX(4px);
}

/* -------------------------------------------------------------------
   ADVANCED MOBILE OPTIMIZATIONS (Best Version)
   ------------------------------------------------------------------- */
@media (max-width: 640px) {

    /* Responsive Tables - Horizontal Scroll */
    .data-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Better Breadcrumb wrapping */
    .breadcrumb {
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    /* Adjust Headers for small screens */
    .hero-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .section-title {
        font-size: 1.75rem;
    }

    /* Compact inputs for mobile */
    .input-field {
        font-size: 1.1rem;
        /* Prevent zoom on iOS (needs 16px+, 1.1rem is safe) */
        padding: 1rem;
    }

    /* Ensure content padding isn't too wide */
    .article-card,
    .converter-workspace {
        padding: 1.5rem;
    }

    /* Improve touch targets for palette */
    .palette-strip {
        height: 60px;
        /* Taller for touch */
    }

    /* Stack footer items nicely */
    .footer {
        padding-top: 3rem;
    }

    /* Ensure text in content doesn't overflow */
    p,
    li {
        word-wrap: break-word;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   COLOR PALETTE INDEX PAGE
   ═══════════════════════════════════════════════════════════════════ */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.category-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-decoration: none;
    transition: all 0.3s var(--ease-bounce);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.category-card .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.category-card .card-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.preview-strip {
    display: flex;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: auto;
    /* Push to bottom */
    box-shadow: var(--shadow-sm);
}

.preview-strip .mini {
    flex: 1;
    height: 100%;
}

/* Info Section with Mockup */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
    background: var(--surface-2);
    border-radius: var(--radius-xl);
    padding: 3rem;
    border: 1px solid var(--border);
}

@media (max-width: 900px) {
    .info-section {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

.info-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    line-height: 1.2;
}

.info-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-image {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-card-mockup {
    width: 240px;
    height: 320px;
    background: var(--surface-1);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    position: absolute;
    transition: transform 0.3s ease;
}

.mockup-1 {
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    transform: rotate(-6deg) translateX(-20px);
    z-index: 1;
}

.mockup-2 {
    background: var(--surface-1);
    transform: rotate(6deg) translateX(20px);
    z-index: 2;
    background-image: linear-gradient(to bottom, var(--surface-1) 60%, var(--surface-2) 60%);
}

.info-section:hover .mockup-1 {
    transform: rotate(-8deg) translateX(-30px) scale(0.95);
}

.info-section:hover .mockup-2 {
    transform: rotate(8deg) translateX(30px) scale(1.05);
}

/* Guide Grid */
.guide-grid {
    margin-bottom: 5rem;
}

.guide-content h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.guide-content>p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.feature-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tip-item {
    background: var(--surface-2);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.tip-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-dot-lg {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* ═══════════════════════════════════════════════════════════════════
   PALETTE COLLECTIONS (Brand, Dark Mode, etc.)
   ═══════════════════════════════════════════════════════════════════ */

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding-bottom: 4rem;
}

.palette-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.palette-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.palette-preview {
    height: 120px;
    display: flex;
    width: 100%;
}

.color-strip {
    flex: 1;
    height: 100%;
}

.palette-info {
    padding: 1rem;
}

.palette-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.palette-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.75rem;
    background: var(--surface-2);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════
   PALETTE ARTICLE PAGE LAYOUT (Sidebar + Content)
   ═══════════════════════════════════════════════════════════════════ */
.wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    padding: 0 2rem;
}

@media (max-width: 1024px) {
    .wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1.5rem;
    }
}

/* Sidebar TOC */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    padding: 2rem 0;
    border-right: 1px solid var(--border);
    padding-right: 2rem;
}

@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }
}

.toc-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.toc-list {
    list-style: none;
}

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-item a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-radius: var(--radius-sm);
}

.toc-item a:hover {
    color: var(--text-main);
    background: var(--surface-2);
}

/* Content Area */
.content-area {
    padding: 4rem 0;
    min-width: 0;
}

/* Breadcrumbs Responsive Fix */
.content-area nav {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .content-area nav {
        margin-bottom: 0.5rem !important;
        /* Override inline style */
        font-size: 0.8rem !important;
    }
}

.content-area h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 1.5rem 0;
    line-height: 1.1;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .content-area {
        padding: 1rem 0 3rem 0;
        /* Significant reduction from 4rem */
    }

    .content-area h1 {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }
}

.content-area h2 {
    font-size: 2.2rem;
    margin: 4rem 0 1.5rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.content-area p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Badges */
.hero-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 500;
}

/* Color Strip Container (Large Preview) */
.color-strip-container {
    display: flex;
    height: 180px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 3rem 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
}

.c-strip {
    flex: 1;
    transition: flex 0.3s ease;
    position: relative;
    cursor: pointer;
}

.c-strip:hover {
    flex: 2.5;
}

/* Feature/Glass Card */
.glass-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
}

/* Stats */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--surface-2);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: center;
}

.stat-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Terminal/Code */
.terminal {
    background: #0f172a;
    /* Always dark for code */
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.terminal-header {
    background: #1e293b;
    padding: 0.75rem 1.25rem;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #334155;
}

.dot-code {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #334155;
}

.dot-code.red {
    background: #ef4444;
}

.dot-code.yellow {
    background: #f59e0b;
}

.dot-code.green {
    background: #10b981;
}

.terminal pre {
    color: #e2e8f0;
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Hero Section for Palettes Main Pages */
.hero-section {
    text-align: center;
    padding: 6rem 1rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════
   PREMIUM PALETTE CARDS (Modern Update 2026)
   ═══════════════════════════════════════════════════════════════════ */

/* Enhanced Palette Grid */
.palette-grid {
    gap: 2rem;
    padding-bottom: 6rem;
    perspective: 1000px;
}

.palette-card {
    background: var(--surface-1);
    border: none;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s var(--ease-bounce);
    cursor: pointer;
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
    /* Softer, spread out shadow */
    position: relative;

    @media (max-width: 600px) {
        .footer {
            padding: 3rem 1rem 1rem;
        }
    }

    isolation: isolate;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: fade-in-up 0.8s var(--ease-bounce) backwards;
}

/* Staggered Animation for first 12 items */
.palette-card:nth-child(1) {
    animation-delay: 0.05s;
}

.palette-card:nth-child(2) {
    animation-delay: 0.1s;
}

.palette-card:nth-child(3) {
    animation-delay: 0.15s;
}

.palette-card:nth-child(4) {
    animation-delay: 0.2s;
}

.palette-card:nth-child(5) {
    animation-delay: 0.25s;
}

.palette-card:nth-child(6) {
    animation-delay: 0.3s;
}

.palette-card:nth-child(7) {
    animation-delay: 0.35s;
}

.palette-card:nth-child(8) {
    animation-delay: 0.4s;
}

.palette-card:nth-child(9) {
    animation-delay: 0.45s;
}

.palette-card:nth-child(10) {
    animation-delay: 0.5s;
}

.palette-card:nth-child(11) {
    animation-delay: 0.55s;
}

.palette-card:nth-child(12) {
    animation-delay: 0.6s;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.palette-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -5px rgba(79, 70, 229, 0.15), 0 10px 15px -5px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

/* Preview Area */
.palette-preview {
    height: 160px;
    /* Taller */
    width: 100%;
    position: relative;
}

/* Color Strips */
.color-strip {
    transition: transform 0.3s ease;
}

/* Subtle interaction on strips */
.palette-card:hover .color-strip:first-child {
    transform: scaleY(1.1);
    transform-origin: top;
}

.palette-card:hover .color-strip:last-child {
    transform: scaleY(1.1);
    transform-origin: bottom;
}

/* Info Area */
.palette-info {
    padding: 1.5rem;
    background: var(--surface-1);
    position: relative;
    z-index: 2;
}

.palette-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Arrow indicator that appears on hover */
.palette-title::after {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--primary);
}

.palette-card:hover .palette-title::after {
    opacity: 1;
    transform: translateX(0);
}

/* Tags */
.palette-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    background: var(--surface-2);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.palette-card:hover .tag {
    background: rgba(79, 70, 229, 0.1);
    /* Light Primary */
    color: var(--primary);
    border-color: rgba(79, 70, 229, 0.2);
}

/* Dark Mode Adjustments */
[data-theme="dark"] .palette-card {
    background: var(--surface-1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .palette-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .palette-preview {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ═══════════════════════════════════════════════════════════════════
   WEBSITE PALETTES PAGE SPECIFIC
   ═══════════════════════════════════════════════════════════════════ */
.website-hero {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.hero-badge {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(236, 72, 153, 0.1));
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.website-hero-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    /* Bigger */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    /* Fallback */
    background: linear-gradient(135deg, var(--text-main) 20%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
    /* Tighter for modern look */
    text-shadow: 0 2px 10px rgba(79, 70, 229, 0.1);
}

.website-hero-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.filter-btn {
    background: var(--surface-1);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s var(--ease-bounce);
}

.filter-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--text-main);
    color: var(--bg-page);
    border-color: var(--text-main);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
        /* Reduce global container padding */
    }

    .website-hero {
        padding: 2rem 0.5rem;
        /* Even tighter padding */
        margin-bottom: 1.5rem;
    }

    .website-hero-title {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 0.75rem;
    }

    /* ═══════════════════════════════════════════════════════════════════
   BRAND PALETTE PAGE SPECIFIC STYLES
   ═══════════════════════════════════════════════════════════════════ */

    /* Modern Swatch Box */
    .swatch-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .swatch-wrapper {
        background: var(--surface-1);
        padding: 1rem;
        border-radius: var(--radius-lg);
        border: 1px solid var(--border);
        transition: all 0.3s var(--ease-bounce);
        text-align: center;
    }

    .swatch-wrapper:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary);
    }

    .swatch-box {
        width: 100%;
        height: 120px;
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* Enhanced Content Area Headers */
    .content-area h1 {
        font-size: 3.5rem;
        font-weight: 800;
        margin: 0 0 1.5rem 0;
        line-height: 1.1;
        background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 1.5rem;
    }

    .highlight-box {
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(236, 72, 153, 0.05));
        border-left: 4px solid var(--primary);
        padding: 1.5rem;
        border-radius: var(--radius-md);
        margin: 2rem 0;
        font-size: 1rem;
        color: var(--text-secondary);
    }

    .filter-container {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .palette-grid {
        grid-template-columns: 1fr;
        /* Force single column */
        gap: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   DEEP COLOR ANALYSIS TABLES
   ═══════════════════════════════════════════════════════════════════ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: var(--surface-1);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--surface-2);
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    color: var(--text-secondary);
    font-size: 0.95rem;
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table code {
    background: var(--surface-2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--primary);
}

.color-dot {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    vertical-align: middle;
}

/* Mobile responsive table */
@media (max-width: 600px) {

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        display: none;
        /* Hide RGB on very small screens to save space */
    }
}

/* ═══════════════════════════════════════════════════════════════════
   GUIDELINES GRID (Usage Best Practices)
   ═══════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════
   BRAND PALETTE PAGE SPECIFIC STYLES
   ═══════════════════════════════════════════════════════════════════ */

/* Modern Swatch Box */
.swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.swatch-wrapper {
    background: var(--surface-1);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s var(--ease-bounce);
    text-align: center;
}

.swatch-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.swatch-box {
    width: 100%;
    height: 120px;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.highlight-box {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(236, 72, 153, 0.05));
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 2rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

[data-theme="dark"] .glass-card {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Brand Palette Specifics */
.brand-logo-large {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.color-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.color-card-large {
    background: var(--surface-1);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s ease;
}

.color-card-large:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.color-preview-large {
    height: 200px;
    width: 100%;
    position: relative;
    cursor: pointer;
}

.color-values {
    padding: 1.5rem;
}

.color-values h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.value-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════════════════════════════
   RELATED PALETTES (MODERN)
   ═══════════════════════════════════════════════════════════════════ */
.related-palettes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.related-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.related-card-preview {
    height: 80px;
    display: flex;
    width: 100%;
    border-bottom: 1px solid var(--border);
}

.related-card-color {
    flex: 1;
    height: 100%;
    transition: width 0.3s ease;
}

.related-card:hover .related-card-color:first-child {
    flex: 1.5;
}

.related-card-title {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--surface-1);
}

.related-card:hover .related-card-title {
    color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════
   PREMIUM SECTIONS REFRESH (Visual Identity & UI)
   ═══════════════════════════════════════════════════════════════════ */

/* Identity Grid */
.identity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.identity-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.identity-card:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.identity-icon {
    width: 48px;
    height: 48px;
    background: var(--surface-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.5rem;
    border: 1px solid var(--border);
}

.identity-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--text-main);
}

.identity-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* UI Mockups */
.ui-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.ui-mockup-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mockup-header {
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: center;
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
}

.mockup-dot:nth-child(1) {
    background: #ef4444;
}

.mockup-dot:nth-child(2) {
    background: #eab308;
}

.mockup-dot:nth-child(3) {
    background: #22c55e;
}

.mockup-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.mockup-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
}

/* Button & Card Styles within Mockup */
.mock-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: default;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mock-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Typography Specimen */
.type-specimen {
    background: var(--surface-1);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    margin: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}

.type-large-container {
    flex: 1 1 300px;
}

.type-large {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    letter-spacing: -0.05em;
}

.type-info {
    flex: 1 1 200px;
}

.type-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS (Premium Pages)
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Adjust Glass Card Padding */
    .glass-card {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }

    /* Stack Grids faster */
    .identity-grid,
    .ui-guide-grid,
    .color-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Type Specimen Adjustments */
    .type-specimen {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .type-large {
        font-size: 2.5rem;
    }

    .type-large-container,
    .type-info {
        flex: auto;
        width: 100%;
    }

    /* Mockup Adjustments */
    .ui-mockup-card {
        border-radius: 16px;
    }

    .mockup-content {
        padding: 1.5rem;
    }

    .mockup-header {
        padding: 0.75rem 1rem;
    }

    /* Identity Cards */
    .identity-card {
        padding: 1.5rem;
    }

    /* Related Palettes */
    .related-palettes-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Force 2 columns on mobile for better density */
        gap: 1rem;
    }

    .related-card-preview {
        height: 60px;
    }

    .related-card-title {
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    /* Hero Section Fixes */
    .brand-logo-large {
        font-size: 3rem;
        margin-bottom: 0.5rem;
    }

    .hero-title {
        font-size: 1.75rem !important;
    }
}

@media (max-width: 480px) {

    /* Ultra-small screens */
    .related-palettes-grid {
        grid-template-columns: 1fr;
        /* 1 column for very small screens */
    }

    .glass-card {
        padding: 1.25rem;
    }

    .brand-logo-large {
        font-size: 2.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   SHADES OF COLORS PAGES (Modern Premium Redesign)
   ═══════════════════════════════════════════════════════════════════ */

/* Page Background */
body.shades-page {
    background-image:
        radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.03) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Hero Section */
.hero {
    padding: 6rem 1.5rem 4rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Color Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 3rem auto 8rem;
    padding: 0 2rem;
}

@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
        /* Single column on mobile for better focus */
        padding: 0 1rem;
        gap: 1.5rem;
    }
}

/* Modern Color Card */
.color-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.color-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.color-swatch {
    height: 200px;
    width: 100%;
    position: relative;
}

.color-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.color-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.color-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.color-hex {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--surface-2);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

.color-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.color-card:hover .color-arrow {
    background: var(--primary);
    color: white;
    transform: rotate(-45deg);
}

/* Content Section (Articles) */
.content-section {
    max-width: 800px;
    margin: 0 auto 6rem;
    padding: 0 1.5rem;
    position: relative;
}

.content-section h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin: 3rem 0 1.5rem;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.content-section h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-main);
    font-weight: 700;
}

.content-section p,
.content-section li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* FAQ Grid in Shades Pages */
.faq-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.faq-item {
    background: var(--surface-2);
    /* Distinct from card background */
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.faq-item:hover {
    background: var(--surface-1);
    border-color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════
   PREMIUM SHADES PAGE EXTENSIONS (2026 UPDATE)
   ═══════════════════════════════════════════════════════════════════ */

/* Immersive Hero */
/* Immersive Hero */
.shades-header {
    position: relative;
    padding: 4rem 1.5rem 2rem;
    /* Reduced from 8rem 2rem 4rem */
    background: var(--surface-1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.shades-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--page-color, #ccc) 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.shades-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.color-pilla {
    width: 80px;
    /* Reduced from 160px */
    height: 80px;
    /* Reduced from 160px */
    border-radius: 20px;
    background: var(--page-color);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.25);
    margin: 0 auto 1.5rem;
    border: 4px solid var(--surface-1);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.color-pilla:hover {
    transform: scale(1.05) rotate(5deg);
}

.shades-title {
    font-size: clamp(2rem, 4vw, 3rem);
    /* Reduced from 3rem-4.5rem */
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.shades-subtitle {
    font-size: 1.1rem;
    /* Reduced from 1.25rem */
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.action-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    /* Reduced from 3rem */
}

/* Tech Specs Grid */
.tech-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
    /* Reduced from 3rem */
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tech-spec-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    padding: 1rem;
    /* Reduced from 1.5rem */
    border-radius: var(--radius-md);
    text-align: left;
    transition: all 0.3s ease;
}

.tech-spec-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tech-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.tech-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 600;
}

/* Premium Color Grid */
/* Premium Color Grid - Compact Tableau Style */
.premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    padding: 2rem 0;
    max-width: 1000px;
    margin: 0 auto 3rem;
}

.shade-item {
    display: flex;
    align-items: center;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    gap: 0.75rem;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.shade-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
    z-index: 2;
}

.shade-preview {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 8px;
    /* Rounded square swatches */
    flex-shrink: 0;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    /* Subtle border for light colors */
}

/* Hide the old copy overlay elements as they don't fit the mini size */
.copy-overlay,
.copy-btn {
    display: none;
}

.shade-meta {
    display: flex;
    flex-direction: column;
    padding: 0;
    flex: 1;
    overflow: hidden;
    gap: 0.2rem;
}

.shade-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shade-code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    font-size: 0.8rem;
    background: transparent;
    padding: 0;
    display: block;

    .shade-item:hover::after {
        opacity: 1;
        transform: translateX(0);
    }

    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transform: translateY(10px);
    transition: transform 0.3s;
}

.shade-item:hover .copy-btn {
    transform: translateY(0);
}

/* Article Typography Upgrade */
.prose {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.prose h2 {
    font-size: 2rem;
    color: var(--text-main);
    margin: 3rem 0 1.5rem;
    letter-spacing: -0.02em;
}

.prose p {
    margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════════
   PREMIUM EDITORIAL CONTENT STYLES
   ═══════════════════════════════════════════════════════════════════ */

/* Enhanced Prose Typography */
.prose {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Beautiful Paragraphs */
.prose p {
    margin-bottom: 1.75rem;
    position: relative;
}

/* Drop Cap for first paragraph of article */
.prose>p:first-of-type::first-letter {
    float: left;
    font-size: 3.5rem;
    line-height: 0.8;
    margin-right: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 0.25rem;
}

/* Editorial Headings */
.prose h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 4rem 0 1.5rem;
    /* More breathing room */
    letter-spacing: -0.03em;
    position: relative;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.prose h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 2.5rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.prose h3::before {
    content: '#';
    color: var(--primary);
    opacity: 0.5;
    font-weight: 400;
}

/* Custom Lists */
.prose ul {
    list-style: none;
    margin: 2rem 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.prose ul li {
    position: relative;
    padding-left: 2rem;
    background: var(--surface-1);
    padding: 1.25rem 1.25rem 1.25rem 3rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.prose ul li:hover {
    transform: translateX(4px);
    border-color: var(--primary);
}

.prose ul li::before {
    content: '→';
    position: absolute;
    left: 1.25rem;
    color: var(--primary);
    font-weight: 800;
}

.prose strong {
    color: var(--text-main);
    font-weight: 700;
}

/* Premium FAQ Grid in Editorial Content */
.prose .faq-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 3rem;
}

.prose .faq-item {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.prose .faq-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.prose .faq-item h3 {
    margin-top: 0;
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    border: none;
    padding: 0;
}

.prose .faq-item h3::before {
    display: none;
    /* Remove hash from FAQ headers */
}

.prose .faq-item p {
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Technical FAQ Specifics */
.technical-grid {
    gap: 1.5rem;
}

.technical-grid .faq-item {
    background: var(--surface-2);
    /* Slightly darker/distinct background */
    border-left: 3px solid transparent;
    /* Prepare for hover/active state */
    padding: 1.5rem;
    /* Slightly more compact */
}

.technical-grid .faq-item:hover {
    border-left-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.technical-grid .faq-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.technical-grid .faq-item h3::before {
    content: '→';
    /* Technical arrow */
    color: var(--primary);
    font-family: monospace;
    display: block;
}

.technical-grid .faq-item p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Feature/Application Cards */
.application-grid {
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    /* Force wider cards */
}

.app-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem !important;
    background: var(--surface-1);
}

.app-icon {
    width: 56px;
    height: 56px;
    background: var(--surface-2);
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-card:hover .app-icon {
    background: var(--primary);
    color: #ffffff;
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
}

.app-card h4 {
    font-size: 1.3rem !important;
    margin-bottom: 0.75rem !important;
}

.app-card p {
    font-size: 1rem !important;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Professional Info Box */
.info-box {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    margin: 2.5rem 0;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.info-box strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════════
   TOOLS SUITE (Mixer, Picker, Converter)
   ═══════════════════════════════════════════════════════════════════ */

/* Tool Canvas / Wrapper */
.tool-workspace {
    background: var(--surface-1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    padding: 3rem;
    margin: -4rem auto 4rem;
    position: relative;
    z-index: 10;
    max-width: 1100px;
}

@media (max-width: 768px) {
    .tool-workspace {
        padding: 1.5rem;
        margin-top: -2rem;
        border-radius: var(--radius-lg);
    }
}

/* Mixer Grid Layout */
.mixer-ui-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

/* Color Input Card */
.tool-input-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
}

.tool-input-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    background: var(--surface-1);
}

.tool-input-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: space-between;
}

/* Interactive Color Picker Box */
.interactive-picker {
    width: 100%;
    height: 120px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.interactive-picker:active {
    transform: scale(0.98);
}

.interactive-picker input[type="color"] {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    padding: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.picker-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: background-color 0.4s ease;
}

/* Hex Input Field */
.tool-hex-input {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    width: 100%;
    text-align: center;
    transition: all 0.2s;
}

.tool-hex-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
}

/* Mixer Slider Area */
.mixer-slider-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.5rem;
    padding: 0 1rem;
}

.slider-track {
    width: 100%;
    height: 12px;
    border-radius: 100px;
    position: relative;
    background: linear-gradient(to right, currentColor 0%, currentColor 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 850px) {
    .mixer-ui-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Mix Result Box */
.mix-result-box {
    margin-top: 3rem;
    background: var(--bg-page);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    /* For double border effect */
    background-image: linear-gradient(135deg, var(--surface-2), var(--border));
}

.mix-result-inner {
    background: var(--surface-1);
    border-radius: calc(var(--radius-xl) - 4px);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    gap: 3rem;
}

@media (max-width: 768px) {
    .mix-result-inner {
        flex-direction: column;
        padding: 1.5rem;
        gap: 2rem;
    }
}

.result-swatch-large {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════════
   MULTI-MIXER ADD-ONS
   ═══════════════════════════════════════════════════════════════════ */

/* Mode Switcher Tabs */
/* Mode Switcher Tabs */
.tool-mode-tabs {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 3rem;
    background: var(--surface-2);
    padding: 0.35rem;
    /* Tighter padding for cleaner look */
    border-radius: 12px;
    /* iOS Segmented Control style radius, or keep 100px for pill */
    border-radius: 99px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
    /* Subtle inner depth */
    border: 1px solid var(--border);
}

.tool-tab {
    padding: 0.6rem 1.25rem;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
    border: 1px solid transparent;
    /* Prevent layout shift */
    background: transparent;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tool-tab svg {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tool-tab:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.03);
}

.tool-tab:hover svg {
    opacity: 1;
}

.tool-tab.active {
    background: var(--surface-1);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    /* Deep pleasing shadow */
    border-color: rgba(0, 0, 0, 0.04);
}

.tool-tab.active svg {
    opacity: 1;
}

/* Multi-Mixer Grid Layout */
.multi-mix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Add Color Button */
.add-color-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: var(--surface-1);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    gap: 1rem;
}

.add-color-card:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface-2);
}

/* Individual Multi-Color Card */
.multi-color-card {
    background: var(--surface-2);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.remove-color-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    color: var(--error, #ef4444);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
    z-index: 5;
}

.remove-color-btn:hover {
    transform: scale(1.1);
    background: #fef2f2;
}

/* Social Link Hover Effects */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0.8;
    transform-origin: center;
}

.social-link:hover {
    opacity: 1;
    transform: translateY(-5px) scale(1.15);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.15));
}
/* -------------------------------------------------------------------
   MODERN BLOG ARTICLE DESIGN OVERRIDES
   ------------------------------------------------------------------- */

/* Glassmorphic Breadcrumbs */
.blog-hero .breadcrumbs {
    background: var(--surface-glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-hero .breadcrumbs:hover {
    box-shadow: var(--shadow-md);
}

.blog-hero .breadcrumbs a {
    color: var(--primary);
    font-weight: 600;
}

/* Enhanced Typography */
.article-content {
    font-size: 1.15rem;
    line-height: 1.9;
    letter-spacing: -0.01em;
}

.article-content p {
    margin-bottom: 2.25rem;
}

.article-content h2 {
    font-size: 2.25rem;
    letter-spacing: -0.03em;
    margin-top: 4.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--surface-2);
    padding-bottom: 0.75rem;
}

.article-content h3 {
    font-size: 1.6rem;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
}

/* Modern Image Styling */
.article-content figure img {
    border-radius: 16px;
    box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    border: 1px solid var(--border);
    margin: 3rem 0;
}

.article-content figure img:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 40px -15px rgba(79, 70, 229, 0.2);
}

/* Elegant Code Blocks & Pre */
.article-content pre {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    margin: 2.5rem 0;
    position: relative;
}

.article-content pre::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 12px 12px 0 0;
}

.article-content code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--surface-2);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--primary);
    border: 1px solid var(--border);
}

.article-content pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: var(--text-main);
    font-size: 0.95rem;
}

/* Premium Blockquotes */
.article-content blockquote {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-main);
    padding: 2rem 2rem 2rem 3rem;
    margin: 3rem 0;
    position: relative;
    background: linear-gradient(to right, var(--surface-2), transparent);
    border-radius: 0 16px 16px 0;
    border-left: 4px solid var(--primary);
}

.article-content blockquote::before {
    content: '"';
    position: absolute;
    left: 1rem;
    top: -0.5rem;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.2;
    font-family: serif;
}

/* Beautiful Links */
.article-content a:not(.modern-btn) {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    padding-bottom: 1px;
}

.article-content a:not(.modern-btn):hover {
    border-bottom-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

/* Modern Author Byline (Top) */
.modern-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.modern-byline:hover {
    box-shadow: var(--shadow-md);
}

.modern-byline .byline-info {
    flex: 1;
}

.modern-byline .byline-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.modern-byline .byline-name a {
    color: var(--text-main);
    text-decoration: none;
    border: none;
}

.modern-byline .byline-name a:hover {
    color: var(--primary);
    background: transparent;
}

.modern-byline .byline-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.modern-byline .meta-divider {
    color: var(--border);
}

/* Modern Author Bio (Bottom) */
.modern-author-bio {
    display: flex;
    gap: 24px;
    padding: 32px;
    background: linear-gradient(135deg, var(--surface-1), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: 24px;
    margin-top: 60px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    align-items: flex-start;
}

.modern-author-bio .bio-content {
    flex: 1;
}

.modern-author-bio .bio-name {
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.modern-author-bio .bio-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.modern-author-bio .bio-links {
    display: flex;
    gap: 16px;
    font-size: 0.95rem;
    font-weight: 600;
}

.modern-author-bio .bio-links a {
    color: var(--primary) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--surface-1);
    border: 1px solid var(--ring);
    border-radius: 100px;
    transition: all 0.2s ease;
}

.modern-author-bio .bio-links a:hover {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

/* Modern Continue Reading */
.modern-related {
    margin-top: 60px;
    padding: 32px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.modern-related::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 6px; height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.modern-related h3 {
    margin: 0 0 24px 0 !important;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
}

.modern-related ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modern-related li {
    padding: 0 !important;
    margin: 0 !important;
}

.modern-related li::marker {
    content: none !important;
}

.modern-related a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--surface-2);
    border-radius: 12px;
    color: var(--text-main) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border: 1px solid transparent !important;
    transition: all 0.2s ease !important;
}

.modern-related a::after {
    content: '→';
    color: var(--primary);
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.modern-related a:hover {
    background: var(--surface-1);
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-sm);
    color: var(--primary) !important;
}

.modern-related a:hover::after {
    transform: translateX(4px);
}

/* Modern Expert Signature */
.modern-signature {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(79, 70, 229, 0.05);
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 1.5rem;
    margin-bottom: 0rem;
    transition: all 0.2s ease;
}

.modern-signature:hover {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.3);
}

.modern-signature strong {
    color: var(--text-main);
}

/* -------------------------------------------------------------------
   RELATED CARDS SECTION (BOTTOM OF ARTICLES)
   ------------------------------------------------------------------- */
/* -------------------------------------------------------------------
   FIX 2: RELATED ARTICLES — Premium Responsive Grid Layout
   ------------------------------------------------------------------- */
.related-cards-section {
    background: var(--surface-1);
    padding: 4rem 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

.related-cards-container {
    max-width: 1060px;
    margin: 0 auto;
}

.related-cards-container h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    padding-bottom: 0;
    border-bottom: none;
    text-align: center;
}

.related-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.related-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.related-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.related-card-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
}

.related-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-card-img-wrapper img {
    transform: scale(1.05);
}

.related-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    gap: 1rem;
}

.related-card-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    margin: 0;
    /* Multiline truncation for long titles */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-article-btn {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.2s ease;
    margin-top: auto;
}

.related-card:hover .read-article-btn {
    gap: 0.75rem;
}

/* -------------------------------------------------------------------
   FIX 4: TABLE OF CONTENTS — Desktop sidebar + Mobile inline
   ------------------------------------------------------------------- */

/* Inline TOC (mobile, shown inside article) */
.toc-inline {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 0 0 2.5rem;
}

.toc-inline h2 {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted) !important;
    margin: 0 0 0.75rem !important;
    padding: 0 !important;
    border: none !important;
}

.toc-inline ol {
    margin: 0;
    padding-left: 1.25rem;
    list-style: decimal;
    counter-reset: none;
}

.toc-inline li {
    margin-bottom: 0.4rem;
    padding-left: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.toc-inline li::marker {
    color: var(--primary);
    font-weight: 600;
}

.toc-inline a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    border-bottom: none !important;
}

.toc-inline a:hover {
    color: var(--primary);
    border-bottom: none !important;
    background: none !important;
}

/* Desktop sticky sidebar TOC */
.toc-sidebar {
    display: none;
}

@media (min-width: 1100px) {
    .toc-inline {
        display: none; /* Hide inline on desktop — sidebar takes over */
    }

    .toc-sidebar {
        display: block;
        position: sticky;
        top: 5rem;
        align-self: start;
        background: var(--surface-1);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1.25rem;
        font-size: 0.875rem;
        max-height: calc(100vh - 8rem);
        overflow-y: auto;
    }

    .toc-sidebar h2 {
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--text-muted);
        margin: 0 0 0.75rem;
    }

    .toc-sidebar ol {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .toc-sidebar li {
        margin-bottom: 0;
        padding: 0;
    }

    .toc-sidebar a {
        display: block;
        padding: 0.35rem 0.5rem;
        border-radius: 6px;
        color: var(--text-secondary);
        text-decoration: none;
        font-weight: 500;
        line-height: 1.4;
        transition: background 0.15s, color 0.15s;
        border-bottom: none !important;
    }

    .toc-sidebar a:hover,
    .toc-sidebar a.toc-active {
        background: rgba(79, 70, 229, 0.08);
        color: var(--primary);
    }

    .toc-sidebar a.toc-active {
        font-weight: 700;
    }
}

/* FIX 1: First article figure — constrain width, add breathing room */
.article-content > figure:first-child img,
.article-content > figure:first-of-type img {
    max-width: 100%;
    border-radius: 14px;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px -8px rgba(0,0,0,0.12);
}

/* Mobile specific fixes for new blog components */
@media (max-width: 600px) {
    .modern-author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 16px;
    }
    .modern-author-bio .bio-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    .modern-byline {
        padding: 16px;
    }
    .modern-signature {
        display: flex;
        align-items: flex-start;
        text-align: left;
    }
    .related-cards-section {
        padding: 3rem 1rem;
    }
    .related-card-img-wrapper {
        aspect-ratio: 3 / 2; /* Slightly taller on mobile */
    }
}

/* -------------------------------------------------------------------
   UNIFIED HERO BYLINE
   ------------------------------------------------------------------- */
.unified-hero-byline {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 100px;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.unified-hero-byline img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.unified-hero-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.unified-hero-top {
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
}

.expert-badge {
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    background: rgba(79, 70, 229, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.unified-hero-bottom {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 600px) {
    .unified-hero-byline {
        flex-direction: column;
        border-radius: 24px;
        text-align: center;
        padding: 20px;
    }
    .unified-hero-top {
        justify-content: center;
        flex-wrap: wrap;
    }
    .unified-hero-bottom {
        justify-content: center;
    }
}
