/* ============================================================================
   SOKYO Analytics — Compare Page M3 Expressive Stylesheet
   Material Design 3 with unified adaptive background
   ============================================================================ */

/* ── M3 EXPRESSIVE DESIGN TOKENS ── */
:root {
    /* === Primary Palette === */
    --md-sys-color-primary:              #3F6212;
    --md-sys-color-on-primary:           #FFFFFF;
    --md-sys-color-primary-container:    #C7D7B2;
    --md-sys-color-on-primary-container: #0F2000;
    
    /* === Secondary Palette === */
    --md-sys-color-secondary:            #556B2F;
    --md-sys-color-on-secondary:         #FFFFFF;
    --md-sys-color-secondary-container:  #DDE3D0;
    --md-sys-color-on-secondary-container: #141F00;
    
    /* === Tertiary Palette === */
    --md-sys-color-tertiary:             #6A7BFF;
    --md-sys-color-on-tertiary:          #FFFFFF;
    --md-sys-color-tertiary-container:   #E6E8FF;
    --md-sys-color-on-tertiary-container:#001160;
    
    /* === Error Palette === */
    --md-sys-color-error:                #BA1A1A;
    --md-sys-color-on-error:             #FFFFFF;
    --md-sys-color-error-container:      #FFDAD6;
    
    /* === Surface & Background === */
    --md-sys-color-background:           #F7F8F3;
    --md-sys-color-on-background:        #2F342C;
    --md-sys-color-surface:              #F7F8F3;
    --md-sys-color-on-surface:           #2F342C;
    --md-sys-color-surface-variant:      #EEF0E7;
    --md-sys-color-on-surface-variant:   #6E7566;
    
    /* === Surface Container Levels === */
    --md-sys-color-surface-container-lowest:  #FFFFFF;
    --md-sys-color-surface-container-low:     #F4F5F0;
    --md-sys-color-surface-container:         #EEF0E7;
    --md-sys-color-surface-container-high:    #E8EAE2;
    --md-sys-color-surface-container-highest: #E2E4DB;
    
    /* === Outline === */
    --md-sys-color-outline:              #C7D7B2;
    --md-sys-color-outline-variant:      #E5E7DE;
    
    /* === Inverse === */
    --md-sys-color-inverse-surface:      #2F342C;
    --md-sys-color-inverse-on-surface:   #F4F5F0;
    
    /* === M3 Elevation System === */
    --md-sys-elevation-0: none;
    --md-sys-elevation-1: 0 1px 3px 1px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.08);
    --md-sys-elevation-2: 0 2px 6px 2px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.08);
    --md-sys-elevation-3: 0 4px 8px 3px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.10);
    --md-sys-elevation-4: 0 6px 10px 4px rgba(0,0,0,.08), 0 2px 3px rgba(0,0,0,.10);
    --md-sys-elevation-5: 0 8px 12px 6px rgba(0,0,0,.09), 0 4px 4px rgba(0,0,0,.10);
    
    /* === M3 Shape Scale === */
    --md-sys-shape-corner-none:       0px;
    --md-sys-shape-corner-extra-small: 4px;
    --md-sys-shape-corner-small:      8px;
    --md-sys-shape-corner-medium:     12px;
    --md-sys-shape-corner-large:      16px;
    --md-sys-shape-corner-extra-large: 28px;
    --md-sys-shape-corner-full:       9999px;
    
    /* === M3 Motion === */
    --md-sys-motion-duration-short1:   50ms;
    --md-sys-motion-duration-short2:   100ms;
    --md-sys-motion-duration-short3:   150ms;
    --md-sys-motion-duration-short4:   200ms;
    --md-sys-motion-duration-medium1:  250ms;
    --md-sys-motion-duration-medium2:  300ms;
    --md-sys-motion-duration-medium3:  350ms;
    --md-sys-motion-duration-medium4:  400ms;
    --md-sys-motion-duration-long1:    450ms;
    --md-sys-motion-duration-long2:    500ms;
    
    /* === M3 Easing === */
    --md-sys-motion-easing-standard:           cubic-bezier(0.2, 0, 0, 1);
    --md-sys-motion-easing-emphasized:         cubic-bezier(0.2, 0, 0, 1);
    --md-sys-motion-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
    
    /* === Brand Colors === */
    --c-moss:       #AEBF96;
    --c-moss-light: #C7D7B2;
    --c-moss-dark:  #7F8C6D;
    --c-charcoal:   #2F342C;
    --c-slate:      #6E7566;
    
    /* === Data Visualization Colors === */
    --data-viz-primary:   #D946EF;
    --data-viz-secondary: #FB7185;
    --data-viz-accent:    #06B6D4;
    --data-viz-grid:      rgba(175, 191, 150, 0.15);
    --data-viz-grid-major: rgba(175, 191, 150, 0.25);
}

/* ── DARK MODE TOKENS ── */
body.dark {
    --md-sys-color-primary:              #A3C77E;
    --md-sys-color-on-primary:           #1B3700;
    --md-sys-color-primary-container:    #2B5000;
    --md-sys-color-on-primary-container: #BFDD9B;
    
    --md-sys-color-secondary:            #B7CCA0;
    --md-sys-color-on-secondary:         #233515;
    --md-sys-color-secondary-container:  #394C2A;
    --md-sys-color-on-secondary-container: #D3E8BA;
    
    --md-sys-color-tertiary:             #B8BFFF;
    --md-sys-color-on-tertiary:          #1A2876;
    --md-sys-color-tertiary-container:   #3140A0;
    
    --md-sys-color-background:           #1C2119;
    --md-sys-color-on-background:        #DDE3D0;
    --md-sys-color-surface:              #1C2119;
    --md-sys-color-on-surface:           #DDE3D0;
    --md-sys-color-surface-variant:      #343C30;
    --md-sys-color-on-surface-variant:   #8A9480;
    
    --md-sys-color-surface-container-lowest:  #161B14;
    --md-sys-color-surface-container-low:     #1C2119;
    --md-sys-color-surface-container:         #262B23;
    --md-sys-color-surface-container-high:    #2C332A;
    --md-sys-color-surface-container-highest: #343C30;
    
    --md-sys-color-outline:              #7F8C6D;
    --md-sys-color-outline-variant:      #3A4234;
    
    --md-sys-elevation-1: 0 1px 3px 1px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.35);
    --md-sys-elevation-2: 0 2px 6px 2px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.35);
    --md-sys-elevation-3: 0 4px 8px 3px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.35);
    --md-sys-elevation-4: 0 6px 10px 4px rgba(0,0,0,.32), 0 2px 3px rgba(0,0,0,.37);
    --md-sys-elevation-5: 0 8px 12px 6px rgba(0,0,0,.34), 0 4px 4px rgba(0,0,0,.39);
    
    --data-viz-primary:   #E879F9;
    --data-viz-secondary: #FDA4AF;
    --data-viz-accent:    #67E8F9;
    --data-viz-grid:      rgba(127, 140, 109, 0.12);
    --data-viz-grid-major: rgba(127, 140, 109, 0.2);
}

/* ============================================================================
   UNIFIED ADAPTIVE BACKGROUND SYSTEM
   ============================================================================ */

body {
    position: relative;
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    transition: background-color var(--md-sys-motion-duration-long2) var(--md-sys-motion-easing-emphasized),
                color var(--md-sys-motion-duration-long2) var(--md-sys-motion-easing-emphasized);
    min-height: 100vh;
    margin: 0;
    font-family: 'Google Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Unified Background Canvas */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: 
        /* Vertical Grid Lines */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent calc(100% / 12 - 1px),
            var(--data-viz-grid) calc(100% / 12 - 1px),
            var(--data-viz-grid) calc(100% / 12)
        ),
        /* Horizontal Grid Lines */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 79px,
            var(--data-viz-grid) 79px,
            var(--data-viz-grid) 80px
        ),
        /* Major Horizontal Lines */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 239px,
            var(--data-viz-grid-major) 239px,
            var(--data-viz-grid-major) 240px
        );
    pointer-events: none;
    opacity: 1;
    transition: opacity var(--md-sys-motion-duration-long2) var(--md-sys-motion-easing-standard);
}

/* Data-Inspired Curved Lines */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(
            ellipse 120% 50% at 50% -10%,
            transparent 49.5%,
            var(--data-viz-primary) 49.5%,
            var(--data-viz-primary) 50.5%,
            transparent 50.5%
        ),
        radial-gradient(
            ellipse 100% 60% at 70% 40%,
            transparent 49%,
            var(--data-viz-secondary) 49%,
            var(--data-viz-secondary) 51%,
            transparent 51%
        ),
        radial-gradient(
            ellipse 90% 45% at 30% 85%,
            transparent 48.5%,
            var(--data-viz-accent) 48.5%,
            var(--data-viz-accent) 51.5%,
            transparent 51.5%
        );
    opacity: 0.15;
    mix-blend-mode: overlay;
    pointer-events: none;
    transition: opacity var(--md-sys-motion-duration-long2) var(--md-sys-motion-easing-standard);
}

body.dark::after {
    opacity: 0.25;
    mix-blend-mode: screen;
}

.md3-main::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(
        ellipse 120% 100% at 50% 0%,
        transparent 0%,
        var(--md-sys-color-background) 100%
    );
    pointer-events: none;
    opacity: 0.6;
}

/* ============================================================================
   GLOBAL RESETS
   ============================================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 64px;
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

/* Selection */
::selection {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--md-sys-color-surface-container);
}

::-webkit-scrollbar-thumb {
    background: var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-full);
    border: 3px solid var(--md-sys-color-surface-container);
    transition: background var(--md-sys-motion-duration-short4);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--md-sys-color-primary);
}

/* ============================================================================
   M3 TOP APP BAR
   ============================================================================ */

.md3-top-app-bar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: color-mix(in srgb, var(--md-sys-color-surface-container-low) 85%, transparent);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    transition: 
        background var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized),
        box-shadow var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized),
        border-color var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized);
}

.md3-top-app-bar.scrolled {
    box-shadow: var(--md-sys-elevation-2);
    background: color-mix(in srgb, var(--md-sys-color-surface-container) 95%, transparent);
    border-bottom-color: transparent;
}

.md3-top-app-bar__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.md3-top-app-bar__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: transform var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized);
}

.md3-top-app-bar__logo:hover {
    transform: scale(1.02);
}

.md3-top-app-bar__logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.md3-nav-tabs {
    display: none;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

@media (min-width: 768px) {
    .md3-nav-tabs {
        display: flex;
    }
}

.md3-nav-tab {
    position: relative;
    padding: 10px 20px;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
    transition:
        color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        transform var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-emphasized);
}

.md3-nav-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--md-sys-color-primary);
    border-radius: 3px 3px 0 0;
    transition: width var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized);
}

.md3-nav-tab:hover {
    color: var(--md-sys-color-on-surface);
    background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
    transform: translateY(-1px);
}

.md3-nav-tab--active {
    color: var(--md-sys-color-primary);
    font-weight: 700;
}

.md3-nav-tab--active::after {
    width: calc(100% - 40px);
}

.md3-top-app-bar__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

/* ============================================================================
   M3 ICON BUTTONS
   ============================================================================ */

.md3-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--md-sys-shape-corner-full);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    transition:
        background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        transform var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-emphasized);
    flex-shrink: 0;
}

.md3-icon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.md3-icon-btn:hover::before {
    opacity: 0.08;
}

.md3-icon-btn:active {
    transform: scale(0.92);
}

.md3-icon-btn--standard {
    border: 1px solid var(--md-sys-color-outline-variant);
    transition:
        border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        transform var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-emphasized);
}

.md3-icon-btn--standard:hover {
    border-color: var(--md-sys-color-outline);
}

.md3-icon-btn .material-symbols-rounded {
    font-size: 20px;
    line-height: 1;
    position: relative;
    z-index: 1;
}

/* ============================================================================
   M3 NAVIGATION DRAWER
   ============================================================================ */

.md3-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--md-sys-motion-duration-medium4) var(--md-sys-motion-easing-standard);
    z-index: 299;
    backdrop-filter: blur(4px);
}

.md3-scrim.active {
    opacity: 1;
    pointer-events: auto;
}

.md3-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(360px, 90vw);
    background: var(--md-sys-color-surface-container-low);
    display: flex;
    flex-direction: column;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform var(--md-sys-motion-duration-long2) var(--md-sys-motion-easing-emphasized-decelerate);
    overflow: hidden;
    box-shadow: var(--md-sys-elevation-3);
}

.md3-drawer.active {
    transform: translateX(0);
}

.md3-drawer__header {
    padding: 24px 16px 16px;
    background: var(--md-sys-color-surface-container-low);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    flex-shrink: 0;
}

.md3-drawer__header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.md3-drawer__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.md3-drawer__logo-wrap {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.md3-drawer__logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.md3-drawer__brand-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin: 0;
    line-height: 1.2;
}

.md3-drawer__brand-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0;
    line-height: 1.2;
}

.md3-drawer__tagline {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.5;
    margin: 0;
}

.md3-drawer__content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
    background: var(--md-sys-color-surface-container);
}

.md3-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.md3-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 56px;
    border-radius: 0 var(--md-sys-shape-corner-full) var(--md-sys-shape-corner-full) 0;
    margin: 2px 12px 2px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    position: relative;
    overflow: hidden;
    transition:
        background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        transform var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-emphasized);
}

.md3-nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.md3-nav-item:hover {
    transform: translateX(4px);
}

.md3-nav-item:hover::before {
    opacity: 0.08;
}

.md3-nav-item--active {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    font-weight: 700;
}

.md3-nav-item__icon {
    font-size: 20px;
    flex-shrink: 0;
}

.md3-nav-item__label {
    flex: 1;
}

.md3-divider {
    height: 1px;
    background: var(--md-sys-color-outline-variant);
    margin: 8px 0;
}

.md3-drawer__footer {
    padding: 16px;
    background: var(--md-sys-color-surface-container-low);
    border-top: 1px solid var(--md-sys-color-outline-variant);
    flex-shrink: 0;
}

.md3-drawer__social {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.md3-drawer__copyright {
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
    margin: 0;
}

/* ============================================================================
   M3 BUTTONS
   ============================================================================ */

.md3-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--md-sys-shape-corner-full);
    border: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    transition:
        background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        box-shadow var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized),
        transform var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-emphasized);
}

.md3-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.md3-btn:hover {
    transform: translateY(-1px) scale(1.01);
}

.md3-btn:hover::before {
    opacity: 0.08;
}

.md3-btn:active {
    transform: scale(0.97);
}

.md3-btn--filled {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.md3-btn--filled:hover {
    box-shadow: var(--md-sys-elevation-1);
}

.md3-btn--tonal {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.md3-btn--outlined {
    background: transparent;
    color: var(--md-sys-color-primary);
    border: 1px solid var(--md-sys-color-outline);
}

/* ============================================================================
   COMPARE PAGE SPECIFIC STYLES
   ============================================================================ */

/* Hero Section */
.compare-hero {
    position: relative;
    padding: 96px 24px 56px;
    overflow: visible;
}

@media (max-width: 480px) {
    .compare-hero {
        padding: 64px 20px 40px;
    }
}

.compare-hero__inner {
    max-width: 1024px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
}

.compare-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: var(--md-sys-shape-corner-full);
    background: color-mix(in srgb, var(--md-sys-color-surface-container) 90%, transparent);
    backdrop-filter: blur(16px);
    border: 1px solid var(--md-sys-color-outline-variant);
    font-size: 14px;
    color: var(--md-sys-color-on-surface);
    font-weight: 500;
    margin-bottom: 40px;
    transition:
        transform var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized),
        box-shadow var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-standard);
}

.compare-hero__badge:hover {
    transform: translateY(-4px);
    box-shadow: var(--md-sys-elevation-2);
}

.compare-hero__badge-dot {
    width: 8px;
    height: 8px;
    background: var(--md-sys-color-primary);
    border-radius: 50%;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.3);
    }
}

.compare-hero__badge-icon {
    font-size: 16px;
    color: var(--md-sys-color-primary);
}

.compare-hero__headline {
    font-size: clamp(40px, 8vw, 88px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 32px;
}

.gradient-text {
    background: linear-gradient(
        135deg,
        var(--md-sys-color-primary) 0%,
        var(--md-sys-color-on-background) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark .gradient-text {
    background: linear-gradient(
        135deg,
        var(--c-moss-light) 0%,
        var(--c-moss) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.compare-hero__headline-plain {
    color: var(--md-sys-color-on-background);
}

.compare-hero__supporting {
    font-size: clamp(15px, 2.5vw, 22px);
    color: var(--md-sys-color-on-surface-variant);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Search Section */
.compare-search-section {
    padding: 0 24px 56px;
}

.compare-search-section__inner {
    max-width: 896px;
    margin: 0 auto;
}

.md3-search-bar-wrap {
    position: relative;
    margin-bottom: 24px;
}

.md3-search-bar {
    display: flex;
    align-items: center;
    background: var(--md-sys-color-surface-container-highest);
    border-radius: var(--md-sys-shape-corner-extra-large);
    border: 1px solid var(--md-sys-color-outline-variant);
    overflow: hidden;
    transition:
        box-shadow var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized),
        border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        transform var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized);
}

.md3-search-bar:focus-within {
    box-shadow: var(--md-sys-elevation-3);
    border-color: var(--md-sys-color-primary);
    transform: translateY(-2px);
}

.md3-search-bar__icon {
    padding: 0 16px 0 20px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 22px;
    flex-shrink: 0;
}

.md3-search-bar__input {
    flex: 1;
    padding: 18px 12px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--md-sys-color-on-surface);
}

.md3-search-bar__input::placeholder {
    color: var(--md-sys-color-on-surface-variant);
}

.md3-search-bar__btn {
    margin: 6px;
    border-radius: var(--md-sys-shape-corner-large) !important;
    padding: 12px 24px;
}

.md3-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--md-sys-color-surface-container-lowest);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-extra-large);
    box-shadow: var(--md-sys-elevation-3);
    z-index: 100;
    max-height: 480px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
    transition:
        opacity var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized-decelerate),
        transform var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized-decelerate);
}

.md3-search-dropdown:not(.hidden) {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.md3-search-dropdown.hidden {
    display: none;
}

.compare-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.compare-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--md-sys-color-surface-container-high);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-small);
    font-size: 14px;
    font-weight: 500;
    transition:
        background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        transform var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-emphasized);
}

.compare-chip:hover {
    background: var(--md-sys-color-surface-container-highest);
    transform: translateY(-2px);
}

/* Overview Section */
.compare-overview-section {
    padding: 56px 24px;
}

.compare-overview-section__inner {
    max-width: 1280px;
    margin: 0 auto;
}

.md3-section-header {
    margin-bottom: 32px;
}

.md3-section-header__label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.md3-section-header__accent {
    width: 4px;
    height: 32px;
    background: linear-gradient(
        to bottom,
        var(--md-sys-color-primary) 0%,
        transparent 100%
    );
    border-radius: var(--md-sys-shape-corner-full);
    flex-shrink: 0;
}

.md3-section-header__title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.md3-section-header__sub {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0;
    padding-left: 16px;
}

.compare-overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .compare-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .compare-overview-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.compare-overview-card {
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-large);
    padding: 24px;
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.05),
        0 1px 2px -1px rgba(0, 0, 0, 0.05);
    transition:
        transform var(--md-sys-motion-duration-medium3) var(--md-sys-motion-easing-emphasized),
        box-shadow var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized);
}

.compare-overview-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid var(--md-sys-color-outline-variant);
    opacity: 1;
    transition: opacity var(--md-sys-motion-duration-short4);
    pointer-events: none;
}

.compare-overview-card:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.compare-overview-card:hover::after {
    opacity: 0;
}

body.dark .compare-overview-card {
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.3),
        0 1px 2px -1px rgba(0, 0, 0, 0.3);
}

.compare-overview-card__header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.compare-overview-card__icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--c-moss-light) 0%, var(--c-moss) 100%);
    border-radius: var(--md-sys-shape-corner-large);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 
        0 2px 8px rgba(174, 191, 150, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.compare-overview-card__icon .material-symbols-rounded {
    font-size: 24px;
    color: white;
}

.compare-overview-card__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin: 0 0 4px;
}

.compare-overview-card__subtitle {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0;
}

.compare-overview-card__stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.compare-overview-stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compare-overview-stat__icon {
    font-size: 20px;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
}

.compare-overview-stat__label {
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0;
}

.compare-overview-stat__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin: 0;
}

.compare-overview-card__score {
    background: var(--md-sys-color-surface-container-highest);
    padding: 16px;
    border-radius: var(--md-sys-shape-corner-medium);
}

.compare-overview-card__score-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0 0 8px;
}

.compare-overview-card__score-value {
    font-size: 28px;
    font-weight: 900;
    color: var(--md-sys-color-primary);
    margin: 0;
}

/* Charts Section */
.compare-charts-section {
    padding: 56px 24px;
    background: var(--md-sys-color-surface);
}

.compare-charts-section__inner {
    max-width: 1280px;
    margin: 0 auto;
}

.compare-charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .compare-charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.compare-chart-card {
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-large);
    overflow: hidden;
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.05),
        0 1px 2px -1px rgba(0, 0, 0, 0.05);
    transition:
        transform var(--md-sys-motion-duration-medium3) var(--md-sys-motion-easing-emphasized),
        box-shadow var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized);
}

.compare-chart-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid var(--md-sys-color-outline-variant);
    opacity: 1;
    transition: opacity var(--md-sys-motion-duration-short4);
    pointer-events: none;
}

.compare-chart-card:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.compare-chart-card:hover::after {
    opacity: 0;
}

.compare-chart-card__header {
    padding: 20px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.compare-chart-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin: 0;
}

.compare-chart-card__badge {
    display: inline-flex;
    padding: 4px 12px;
    background: var(--md-sys-color-surface-container-highest);
    border-radius: var(--md-sys-shape-corner-small);
    font-size: 11px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
}

.compare-chart-card__canvas {
    padding: 24px;
    min-height: 300px;
}

/* Specs Section */
.compare-specs-section {
    padding: 56px 24px;
}

.compare-specs-section__inner {
    max-width: 1280px;
    margin: 0 auto;
}

.spec-table-wrapper {
    overflow-x: auto;
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-sys-elevation-1);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--md-sys-color-surface-container-low);
}

.spec-table-head {
    background: var(--md-sys-color-surface-container);
}

.spec-table-cell {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--md-sys-color-on-surface);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    text-align: left;
}

.spec-table-header {
    font-weight: 700;
    text-align: center;
}

.spec-table-sticky {
    position: sticky;
    left: 0;
    background: var(--md-sys-color-surface-container);
    z-index: 10;
    font-weight: 600;
}

.spec-table-label {
    font-weight: 600;
    min-width: 200px;
}

.spec-table-section-row td {
    background: var(--md-sys-color-surface-container-high);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
    padding: 12px 20px;
}

.spec-table-section-row .material-symbols-rounded {
    font-size: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

.spec-table-row-highlight {
    background: color-mix(in srgb, var(--md-sys-color-tertiary) 4%, transparent);
}

.spec-value-highlight {
    color: var(--md-sys-color-tertiary);
    font-weight: 700;
}

/* ============================================================================
   M3 FOOTER
   ============================================================================ */

.md3-footer {
    position: relative;
    margin-top: 80px;
    overflow: visible;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container-low);
}

.md3-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 24px 48px;
}

.md3-footer__brand {
    display: flex;
    justify-content: center;
    margin-bottom: 64px;
}

.md3-footer__logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.md3-footer__logo-img {
    width: 128px;
    height: auto;
    object-fit: contain;
}

.md3-footer__links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 48px;
    text-align: center;
    margin-bottom: 64px;
}

@media (min-width: 768px) {
    .md3-footer__links {
        grid-template-columns: repeat(4, 1fr);
        text-align: left;
    }
}

.md3-footer__col-title {
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--md-sys-color-on-surface);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.md3-footer__link {
    display: block;
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 12px;
    transition:
        color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        transform var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-emphasized);
}

.md3-footer__link:hover {
    color: var(--md-sys-color-primary);
    transform: translateX(4px);
}

.md3-footer__divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--md-sys-color-outline-variant),
        transparent
    );
    margin-bottom: 48px;
}

.md3-footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

@media (min-width: 768px) {
    .md3-footer__bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.md3-footer__copyright {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0;
}

.md3-footer__social {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.hidden {
    display: none !important;
}

.font-black {
    font-weight: 900;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

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

.fade-in {
    animation: fadeIn 0.4s var(--md-sys-motion-easing-emphasized-decelerate) backwards;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 640px) {
    .compare-hero {
        padding: 64px 16px 40px;
    }
    
    .compare-search-section,
    .compare-overview-section,
    .compare-charts-section,
    .compare-specs-section {
        padding: 40px 16px;
    }
    
    .md3-section-header__title {
        font-size: 24px;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    body::before,
    body::after,
    .md3-main::before {
        display: none !important;
    }
    
    .md3-top-app-bar,
    .md3-drawer,
    .md3-scrim,
    button {
        display: none !important;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
    }
}

/* ============================================================================
   END OF COMPARE M3 EXPRESSIVE STYLESHEET
   ============================================================================ */

/* ============================================================================
   COMPARE PAGE — SELECTION PANEL
   ============================================================================ */

.compare-search-section {
    padding: 0 24px 56px;
}

@media (max-width: 480px) {
    .compare-search-section { padding: 0 16px 40px; }
}

.compare-search-section__inner {
    max-width: 896px;
    margin: 0 auto;
}

/* M3 card wrapping the entire selection UI */
.selection-card {
    background: var(--md-sys-color-surface-container-low);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: 28px;
    box-shadow: var(--md-sys-elevation-1);
    transition:
        background var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard),
        border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.compare-selection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.compare-selection-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin: 0;
}

/* Count badge */
.count-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* Search input inside selection card */
.search-container {
    position: relative;
}

/* Search results dropdown — JS adds/removes .active */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 400px;
    overflow-y: auto;
    background: var(--md-sys-color-surface-container-lowest);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-extra-large);
    box-shadow: var(--md-sys-elevation-3);
    z-index: 50;
    display: none;                        /* hidden by default */
    scrollbar-width: thin;
    scrollbar-color: var(--md-sys-color-outline) transparent;
}

/* JS sets .active to show results */
.search-results.active { display: block; }

.search-result-item {
    padding: 14px 20px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    cursor: pointer;
    font-size: 14px;
    color: var(--md-sys-color-on-surface);
    transition:
        background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        padding-left var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-emphasized);
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item:hover {
    background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
    padding-left: 24px;
}

/* Selected SoC card row (built by SelectionManager._updateList) */
.selected-soc-card {
    background: var(--md-sys-color-surface-container);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-large);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    transition:
        border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        box-shadow var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized);
}

.selected-soc-card:hover {
    border-color: var(--md-sys-color-primary);
    box-shadow: var(--md-sys-elevation-1);
}

/* Remove button inside selected card */
.remove-btn {
    background: color-mix(in srgb, var(--md-sys-color-error) 10%, transparent);
    color: var(--md-sys-color-error);
    border: 1px solid color-mix(in srgb, var(--md-sys-color-error) 30%, transparent);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        transform var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-emphasized);
}

.remove-btn:hover {
    background: color-mix(in srgb, var(--md-sys-color-error) 20%, transparent);
    transform: scale(1.04);
}

/* Compare / clear action row */
.compare-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--c-moss) 0%, var(--c-moss-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--md-sys-shape-corner-large);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(174, 191, 150, 0.3);
    transition:
        transform var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized),
        box-shadow var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized);
}

.compare-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(174, 191, 150, 0.45);
}

.compare-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface-variant);
    box-shadow: none;
}

/* secondary "Clear all" button */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: var(--md-sys-shape-corner-large);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition:
        background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        transform var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-emphasized);
}

.action-btn-secondary {
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.action-btn-secondary:hover {
    background: var(--md-sys-color-surface-container-highest);
    border-color: var(--md-sys-color-outline);
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px;
    text-align: center;
}

/* ============================================================================
   COMPARE PAGE — CHARTS LAYOUT
   ============================================================================ */

.compare-charts-section {
    padding: 56px 24px;
}

@media (max-width: 480px) {
    .compare-charts-section { padding: 40px 16px; }
}

.compare-charts-section__inner {
    max-width: 1280px;
    margin: 0 auto;
}

/* 2-column responsive grid for chart pairs */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .charts-grid { grid-template-columns: repeat(2, 1fr); }
}

/* M3 chart card */
.chart-card {
    position: relative;
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-large);
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,.05), 0 1px 2px -1px rgba(0,0,0,.05);
    transition:
        transform var(--md-sys-motion-duration-medium3) var(--md-sys-motion-easing-emphasized),
        box-shadow var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized);
}

.chart-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid var(--md-sys-color-outline-variant);
    pointer-events: none;
    transition: opacity var(--md-sys-motion-duration-short4);
}

.chart-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.08);
}

.chart-card:hover::after { opacity: 0; }

.chart-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.chart-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--md-sys-shape-corner-large);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    transition: transform var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized);
}

.chart-card:hover .chart-icon {
    transform: scale(1.08) rotate(5deg);
}

.chart-icon .material-symbols-rounded {
    font-size: 22px;
    color: #fff;
}

.chart-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin: 0;
}

.chart-subtitle {
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
    margin: 2px 0 0;
}

.chart-wrapper {
    padding: 20px;
    min-height: 300px;
}

.chart-wrapper canvas {
    max-height: 380px !important;
}

.chart-wrapper.many-socs  { min-height: 420px; }
.chart-wrapper.many-socs canvas  { max-height: 500px !important; }
.chart-wrapper.extra-socs { min-height: 600px; max-height: 600px; overflow-y: auto; }
.chart-wrapper.extra-socs canvas { max-height: none !important; }

/* info-badge reuse */
.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--md-sys-color-surface-container-highest);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 11px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
}

/* Winner banner */
.winner-banner {
    position: relative;
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: 24px 28px;
    color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(245,158,11,.25);
}

.winner-glow {
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(255,255,255,.15) 0%, transparent 60%);
    border-radius: inherit;
    pointer-events: none;
}

.winner-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(8px);
    border-radius: var(--md-sys-shape-corner-extra-large);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================================================
   COMPARE PAGE — SPEC SECTIONS  (compare_specs component)
   ============================================================================ */

.compare-specs-section {
    padding: 56px 24px;
}

@media (max-width: 480px) {
    .compare-specs-section { padding: 40px 16px; }
}

.compare-specs-section__inner {
    max-width: 1280px;
    margin: 0 auto;
}

.specs-sections-wrap {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* Section block */
.spec-section {
    position: relative;
}

/* Section header row */
.spec-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

/* Coloured icon box */
.spec-section-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--md-sys-shape-corner-large);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    transition: transform var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized);
}

.spec-section-icon .material-symbols-rounded {
    font-size: 26px;
    color: #fff;
}

.spec-section-icon--amber  { background: linear-gradient(135deg,#F59E0B,#F97316); }
.spec-section-icon--pink   { background: linear-gradient(135deg,#EC4899,#F43F5E); }
.spec-section-icon--purple { background: linear-gradient(135deg,#8B5CF6,#A855F7); }
.spec-section-icon--teal   { background: linear-gradient(135deg,#14B8A6,#10B981); }
.spec-section-icon--blue   { background: linear-gradient(135deg,#3B82F6,#6366F1); }
.spec-section-icon--cyan   { background: linear-gradient(135deg,#06B6D4,#3B82F6); }
.spec-section-icon--green  { background: linear-gradient(135deg,#22C55E,#10B981); }

.spec-section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--md-sys-color-on-surface);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.spec-section-subtitle {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0;
}

/* Card grid — dynamic columns based on SoC count suffix class */
.spec-cards-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* Force exact columns matching SoC count */
.spec-cards-grid--2 { grid-template-columns: repeat(2, 1fr); }
.spec-cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
.spec-cards-grid--4 { grid-template-columns: repeat(4, 1fr); }

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

@media (max-width: 600px) {
    .spec-cards-grid--2,
    .spec-cards-grid--3,
    .spec-cards-grid--4 { grid-template-columns: 1fr; }
}

/* Individual spec card — Pixel Android 14-15 style */
.spec-card {
    background: var(--md-sys-color-surface-container-low);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-large);
    padding: 20px;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,.05), 0 1px 2px -1px rgba(0,0,0,.05);
    transition:
        transform var(--md-sys-motion-duration-medium3) var(--md-sys-motion-easing-emphasized),
        box-shadow var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized),
        border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
        border-radius var(--md-sys-motion-duration-medium1) var(--md-sys-motion-easing-emphasized);
}

.spec-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -4px rgba(0,0,0,.1);
    border-color: var(--md-sys-color-primary);
    border-radius: var(--md-sys-shape-corner-medium);
}

body.dark .spec-card {
    background: color-mix(in srgb, var(--md-sys-color-surface-container) 80%, transparent);
}

/* Chip name heading inside card */
.spec-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--md-sys-color-primary);
    transition: color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.spec-card:hover .spec-card-name {
    color: var(--md-sys-color-primary);
}

/* Row inside card */
.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

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

.spec-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    flex-shrink: 0;
}

.spec-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    text-align: right;
    word-break: break-word;
}

.spec-value-highlight {
    color: var(--md-sys-color-tertiary);
    font-weight: 700;
}

.spec-value-success {
    color: #10B981;
    font-weight: 700;
}

body.dark .spec-value-success { color: #34D399; }

/* Empty state for specs */
.spec-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 24px;
    text-align: center;
}

.spec-empty-state__icon {
    width: 80px;
    height: 80px;
    background: var(--md-sys-color-surface-container-high);
    border-radius: var(--md-sys-shape-corner-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.spec-empty-state__icon .material-symbols-rounded {
    font-size: 36px;
    color: var(--md-sys-color-on-surface-variant);
}

.spec-empty-state__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin: 0 0 8px;
}

.spec-empty-state__body {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0;
}

/* Spec table wrapper (benchmark table at bottom) */
.spec-table-wrapper {
    overflow-x: auto;
    border-radius: var(--md-sys-shape-corner-large);
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: var(--md-sys-elevation-1);
}

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

.spec-table-head { background: var(--md-sys-color-surface-container-high); }

.spec-table-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    padding: 14px 20px;
    text-align: center;
    border-bottom: 2px solid var(--md-sys-color-outline-variant);
}

.spec-table-cell {
    padding: 13px 20px;
    font-size: 13px;
    color: var(--md-sys-color-on-surface);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container-low);
    text-align: center;
}

.spec-table-sticky {
    position: sticky;
    left: 0;
    background: var(--md-sys-color-surface-container);
    z-index: 10;
    text-align: left;
}

.spec-table-label {
    font-weight: 600;
    text-align: left;
}

.spec-table-row:hover .spec-table-cell {
    background: color-mix(in srgb, var(--md-sys-color-primary) 5%, var(--md-sys-color-surface-container-low));
}

.spec-table-row-highlight .spec-table-cell {
    background: color-mix(in srgb, var(--md-sys-color-tertiary) 5%, var(--md-sys-color-surface-container-low));
}

.spec-value-highlight {
    color: var(--md-sys-color-tertiary);
    font-weight: 700;
}

/* font helpers used in template */
.font-bold    { font-weight: 700; }
.font-semibold { font-weight: 600; }
