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

:root {
    /* Medical-grade color palette - refined teal/cyan for trust & professionalism */
    --bg: #f8fafb;
    --bg-white: #ffffff;
    --bg-gradient: linear-gradient(135deg, #f8fafb 0%, #e8f4f8 100%);
    --fg: #0f172a;
    --fg-secondary: #334155;
    --card: #ffffff;
    --secondary: #f1f5f9;
    --muted: #64748b;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    /* Primary: Medical teal */
    --primary: #0d9488;
    --primary-light: #14b8a6;
    --primary-dark: #0f766e;
    --primary-fg: #ffffff;
    --primary-bg: #f0fdfa;
    /* Accent: Calm blue */
    --accent: #0284c7;
    --accent-light: #0ea5e9;
    --accent-bg: #f0f9ff;
    /* AI Purple accent */
    --ai-purple: #7c3aed;
    --ai-purple-light: #8b5cf6;
    --ai-purple-bg: #f5f3ff;
    /* Status colors */
    --success: #059669;
    --success-bg: #ecfdf5;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --ring: #14b8a6;
    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --max-w: 1280px;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --shadow-glow: 0 0 20px rgba(13, 148, 136, 0.15);
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 15px;
}

.shell {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* ══════════════════════════════════════════════════════════════════════
Navigation - Clean, professional header with AI elements
══════════════════════════════════════════════════════════════════════ */
.nav {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 20px;
    position: relative;
}

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

.nav-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    padding: 6px;
}

.nav-brand-group {
    display: flex;
    flex-direction: column;
}

.nav-brand {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fg);
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand .ai-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    background: linear-gradient(135deg, var(--ai-purple) 0%, var(--ai-purple-light) 100%);
    color: white;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

.nav-tagline {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.02em;
    font-weight: 500;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 150ms ease;
}

.nav-link:hover {
    color: var(--fg);
    background: var(--secondary);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-bg);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--success-bg);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 24px;
    font-size: 12px;
    font-weight: 500;
    color: var(--success);
}

.nav-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.lang-switcher {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-white);
}

.lang-btn {
    padding: 8px 14px;
    border: none;
    border-right: 1px solid var(--border);
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: var(--muted);
    cursor: pointer;
    transition: all 150ms ease;
    line-height: 1.4;
    min-height: 34px;
}

.lang-btn:last-child {
    border-right: none;
}

.lang-btn:hover {
    color: var(--fg);
    background: var(--secondary);
}

.lang-btn.active {
    color: var(--primary);
    background: var(--primary-bg);
}

/* ══════════════════════════════════════════════════════════════════════
Hero Section - AI-focused welcoming design
══════════════════════════════════════════════════════════════════════ */
.hero {
    padding: 56px 0 48px;
    background: var(--bg-gradient);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 56px;
    align-items: start;
    position: relative;
}

.hero-grid > * {
    min-width: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ai-purple);
    margin-bottom: 20px;
    padding: 8px 16px;
    background: var(--ai-purple-bg);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 24px;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
}

.hero-title {
    font-size: clamp(40px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--fg);
    text-wrap: balance;
}

.hero-title-brand {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--fg-secondary);
    margin-top: 24px;
    line-height: 1.7;
    text-wrap: auto;
}

/* How it works steps */
.hero-steps {
    margin-top: 36px;
    padding: 28px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
}

.hero-steps-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-steps-title svg {
    width: 18px;
    height: 18px;
}

.hero-steps ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.hero-steps li {
    font-size: 15px;
    color: var(--fg-secondary);
    line-height: 1.6;
    counter-increment: step;
    position: relative;
    padding-left: 44px;
    margin-bottom: 16px;
}

.hero-steps li:last-child {
    margin-bottom: 0;
}

.hero-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--primary-fg);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

/* Research Institution Card */
.hero-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 100%;
}

.hero-card-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-card-label::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.hero-logos-stacked {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-logo-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--secondary);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 200ms ease;
}

.hero-logo-link:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.hero-logo-img {
    height: auto;
    width: min(256px, 100%);
    max-width: 100%;
    object-fit: contain;
    flex-shrink: 0;
}

.hero-logo-text {
    font-size: 13px;
    color: var(--fg-secondary);
    line-height: 1.5;
    font-weight: 500;
}

.hero-logo-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Trust indicators */
.trust-indicators {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--fg-secondary);
}

.trust-item svg {
    width: 18px;
    height: 18px;
    color: var(--success);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════
Metrics - Key Statistics with AI styling
══════════════════════════════════════════════════════════════════════ */
.metrics {
    padding: 24px 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.metric-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all 250ms ease;
    display: flex;
    align-items: center;
    gap: 14px;
}

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

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-bg) 0%, #ccfbf1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.metric-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.metric-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex: 1;
}

.metric-value {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--fg) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ══════════════════════════════════════════════════════════════════════
Workspace Section
══════════════════════════════════════════════════════════════════════ */
.workspace {
    padding: 56px 0;
}

.section-header {
    margin-bottom: 36px;
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    padding: 6px 14px;
    background: var(--accent-bg);
    border-radius: 24px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fg);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 16px;
    color: var(--muted);
    margin-top: 12px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-wrap: balance;
}

/* ══════════════════════════════════════════════════════════════════════
Tabs - Body Region Selection
══════════════════════════════════════════════════════════════════════ */
.tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.tab {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 200ms ease;
    font-family: inherit;
}

.tab:hover {
    background: var(--secondary);
    color: var(--fg);
}

.tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--primary-fg);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

/* ══════════════════════════════════════════════════════════════════════
Unified Analysis Grid — panels + model cards in one 3-column flow
══════════════════════════════════════════════════════════════════════ */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.panel {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.panel-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-bg) 0%, #ccfbf1 100%);
    border: 1px solid rgba(13, 148, 136, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.panel-icon svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.panel-icon.accent {
    background: linear-gradient(135deg, var(--accent-bg) 0%, #e0f2fe 100%);
    border-color: rgba(2, 132, 199, 0.15);
}

.panel-icon.accent svg {
    color: var(--accent);
}

.panel-icon.muted {
    background: var(--secondary);
    border-color: var(--border);
}

.panel-icon.muted svg {
    color: var(--muted);
}

.panel-title-group {
    flex: 1;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--fg);
}

.panel-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════════
Upload Zone
══════════════════════════════════════════════════════════════════════ */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 200ms ease;
    position: relative;
    overflow: hidden;
    background: var(--secondary);
    margin-top: 20px;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.upload-zone.drag-over {
    border-color: var(--primary);
    border-style: solid;
    background: var(--primary-bg);
    transform: scale(1.02);
}

.upload-zone.has-image {
    border-style: solid;
    border-color: var(--primary);
    background: var(--bg-white);
}

.upload-zone img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gt-display {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
}

.upload-placeholder {
    text-align: center;
    color: var(--muted);
    padding: 24px;
}

.upload-placeholder-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 200ms ease;
}

.upload-zone:hover .upload-placeholder-icon {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.upload-placeholder-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.upload-placeholder-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 6px;
}

.upload-placeholder-text {
    font-size: 13px;
    color: var(--muted);
}

.upload-input {
    display: none;
}

/* ══════════════════════════════════════════════════════════════════════
Gallery - Reference Samples
══════════════════════════════════════════════════════════════════════ */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    aspect-ratio: 1/1;
    margin-top: 20px;
    min-height: 0;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 200ms ease;
    background: var(--secondary);
}

.gallery-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.gallery-item.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ══════════════════════════════════════════════════════════════════════
Buttons
══════════════════════════════════════════════════════════════════════ */
.actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
    border: 1px solid var(--border);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    line-height: 1.4;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--primary-fg);
    border-color: var(--primary);
    flex: 1;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--fg);
}

.btn-secondary:hover {
    background: var(--secondary);
    border-color: var(--fg);
}

/* ══════════════════════════════════════════════════════════════════════
Results Section
══════════════════════════════════════════════════════════════════════ */
.results-section {
    margin-top: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    padding: 32px;
    box-shadow: var(--shadow);
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.results-body:empty {
    display: none;
}

.results-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.results-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-bg) 0%, #e0f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.results-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--fg);
    line-height: 1.3;
}

.results-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.4;
}

.results-legend {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    min-height: 36px;
    line-height: 1.4;
    background: var(--danger-bg);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--radius-sm);
}

.results-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger);
    flex-shrink: 0;
}

.results-legend span {
    color: var(--danger);
    font-weight: 500;
}

.results-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toggle-btn {
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--muted);
    cursor: pointer;
    transition: all 200ms ease;
    white-space: nowrap;
    min-height: 36px;
    line-height: 1.4;
}

.toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.toggle-btn.active {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.result-card {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 250ms ease;
    display: flex;
    flex-direction: column;
}

.result-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.model-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.model-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--fg);
}

.model-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #ccfbf1 100%);
    border: 1px solid rgba(13, 148, 136, 0.2);
    color: var(--primary);
}

.model-badge.baseline {
    background: linear-gradient(135deg, var(--accent-bg) 0%, #e0f2fe 100%);
    border-color: rgba(2, 132, 199, 0.2);
    color: var(--accent);
}

.status {
    font-size: 13px;
    color: var(--fg-secondary);
    margin-top: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status svg {
    width: 16px;
    height: 16px;
    color: var(--success);
}

/* ══════════════════════════════════════════════════════════════════════
Image Slider - Before/After Comparison
══════════════════════════════════════════════════════════════════════ */
.img-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: col-resize;
    user-select: none;
    touch-action: none;
    background: var(--bg-white);
    border: 1px solid var(--border);
    margin-top: 20px;
}

.img-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.img-slider .img-after {
    z-index: 1;
}

.img-slider .img-before {
    z-index: 2;
}

.img-slider .handle {
    position: absolute;
    top: 0;
    left: 5%;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(13, 148, 136, 0.5);
}

.img-slider .handle-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    color: var(--primary);
    border: 3px solid var(--primary);
}

.img-slider .label {
    position: absolute;
    bottom: 16px;
    z-index: 4;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.img-slider .label-left {
    left: 16px;
}

.img-slider .label-right {
    right: 16px;
}

.img-slider .placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    z-index: 0;
    gap: 12px;
    text-align: center;
    padding: 24px;
}

.img-slider .placeholder svg {
    width: 40px;
    height: 40px;
    opacity: 0.4;
}

.img-slider .placeholder span {
    font-size: 13px;
    max-width: 200px;
}

/* ══════════════════════════════════════════════════════════════════════
AI Classification Pipeline - New Design
══════════════════════════════════════════════════════════════════════ */
.cls-section {
    margin-top: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    padding: 32px;
    box-shadow: var(--shadow);
}

.cls-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.cls-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--ai-purple-bg) 0%, #ede9fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cls-icon svg {
    width: 24px;
    height: 24px;
    color: var(--ai-purple);
}

.cls-title-group {
    flex: 1;
}

.cls-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cls-title .ai-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    background: linear-gradient(135deg, var(--ai-purple) 0%, var(--ai-purple-light) 100%);
    color: white;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

.cls-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
}

/* AI Pipeline Visualization */
.cls-pipeline {
    display: grid;
    grid-template-columns: 1fr auto 180px auto 1fr;
    gap: 20px;
    align-items: center;
    padding: 28px;
    background: var(--secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.cls-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cls-input-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    width: 100%;
}

.cls-input-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cls-input-label .letter {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cls-input-image {
    width: 100%;
    aspect-ratio: 1;
    max-height: 120px;
    border-radius: var(--radius-sm);
    background: var(--secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cls-input-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cls-input-image svg {
    width: 28px;
    height: 28px;
    color: var(--muted);
    opacity: 0.4;
}

/* Arrow connector */
.cls-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.cls-arrow-line {
    width: 52px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    position: relative;
    opacity: 0.6;
}

.cls-arrow-line::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid var(--primary);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    opacity: 1;
}

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

/* AI Model box */
.cls-model-box {
    background: linear-gradient(135deg, var(--ai-purple-bg) 0%, #ede9fe 100%);
    border: 2px solid var(--ai-purple);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cls-model-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
    animation: ai-pulse 3s ease-in-out infinite;
}

@keyframes ai-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.cls-model-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ai-purple) 0%, var(--ai-purple-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    position: relative;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.cls-model-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.cls-model-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ai-purple);
    position: relative;
}

/* Output section */
.cls-output-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cls-prob-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.cls-prob-card.highlight-benign {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.cls-prob-card.highlight-malignant {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.cls-prob-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cls-prob-label .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.cls-prob-label .dot.benign {
    background: var(--success);
}

.cls-prob-label .dot.malignant {
    background: var(--danger);
}

.cls-prob-bar {
    height: 10px;
    background: var(--secondary);
    border-radius: 5px;
    overflow: hidden;
}

.cls-prob-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cls-prob-fill.benign {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.cls-prob-fill.malignant {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.cls-prob-value {
    font-size: 24px;
    font-weight: 800;
    margin-top: 8px;
    letter-spacing: -0.02em;
}

.cls-prob-value.benign {
    color: var(--success);
}

.cls-prob-value.malignant {
    color: var(--danger);
}

/* Final prediction */
.cls-prediction-final {
    grid-column: 1 / -1;
    margin-top: 24px;
    padding: 20px 28px;
    border-radius: var(--radius);
    text-align: center;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.cls-prediction-final.benign {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: var(--success);
}

.cls-prediction-final.malignant {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: var(--danger);
}

.cls-prediction-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cls-prediction-final.benign .cls-prediction-icon {
    background: var(--success);
}

.cls-prediction-final.malignant .cls-prediction-icon {
    background: var(--danger);
}

.cls-prediction-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.cls-prediction-text {
    text-align: left;
}

.cls-prediction-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.7;
}

.cls-prediction-final.benign .cls-prediction-label {
    color: var(--success);
}

.cls-prediction-final.malignant .cls-prediction-label {
    color: var(--danger);
}

.cls-prediction-result {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cls-prediction-final.benign .cls-prediction-result {
    color: #065f46;
}

.cls-prediction-final.malignant .cls-prediction-result {
    color: #991b1b;
}

/* Placeholder state */
.cls-placeholder {
    text-align: center;
    padding: 48px 24px;
    color: var(--muted);
}

.cls-placeholder svg {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    opacity: 0.3;
    display: block;
}

.cls-placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--fg-secondary);
    margin-bottom: 6px;
}

.cls-placeholder-text {
    font-size: 14px;
}

/* Classification loading spinner */
.cls-loading {
    text-align: center;
    padding: 40px 24px;
    color: var(--muted);
}

.cls-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: cls-spin 0.8s linear infinite;
    margin: 0 auto 14px;
}

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

.cls-loading-text {
    font-size: 14px;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════════════
About Section - Refined
══════════════════════════════════════════════════════════════════════ */
.about {
    padding: 72px 0 88px;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
}

.about-header {
    text-align: center;
    margin-bottom: 56px;
}

.about-title {
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fg);
    line-height: 1.2;
}

.about-subtitle {
    font-size: 16px;
    color: var(--muted);
    margin-top: 12px;
    line-height: 1.6;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: stretch;
}

.about-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: all 250ms ease;
}

.about-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.about-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.about-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-bg) 0%, #ccfbf1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.about-card-icon svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.about-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--fg);
}

.about-card-body {
    margin-top: 8px;
    flex: 1;
}

.about-card p,
.about-card li {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.75;
}

.about-card ul {
    padding-left: 20px;
}

.about-card li {
    margin-bottom: 10px;
}

.about-card-wide {
    grid-column: 1 / -1;
}

.about-card-warning {
    background: linear-gradient(135deg, var(--warning-bg) 0%, #fef3c7 100%);
    border: 2px solid rgba(217, 119, 6, 0.3);
}

.about-card-warning:hover {
    border-color: rgba(217, 119, 6, 0.45);
}

.about-card-warning .about-card-header {
    align-items: center;
}

.about-card-warning .about-card-icon {
    background: rgba(217, 119, 6, 0.2);
}

.about-card-warning .about-card-icon svg {
    color: var(--warning);
}

.about-card-warning .about-card-title,
.about-card-warning .about-card-text,
.about-card-warning .about-card-body p {
    color: #92400e;
}

/* ══════════════════════════════════════════════════════════════════════
Footer - Clean & Professional
══════════════════════════════════════════════════════════════════════ */
.footer {
    padding: 16px 0;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.footer-bottom {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    color: var(--fg);
}

.footer-brand img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    transition: all 200ms ease;
    font-size: 13px;
    font-weight: 500;
}

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

/* ══════════════════════════════════════════════════════════════════════
Loading Overlay
══════════════════════════════════════════════════════════════════════ */
.loading-overlay {
    position: fixed;
    top: 88px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 28px;
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 14px;
    z-index: 100;
    width: max-content;
    max-width: calc(100vw - 32px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    aspect-ratio: 1 / 1;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
}

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

/* ══════════════════════════════════════════════════════════════════════
Responsive Design - Mobile First
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-card {
        max-width: 480px;
    }

    .cls-pipeline {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cls-arrow {
        transform: rotate(90deg);
    }

    .cls-arrow-line {
        width: 40px;
    }
}

@media (max-width: 768px) {
    .nav {
        padding-top: max(env(safe-area-inset-top), 10px);
    }

    .shell {
        padding: 0 16px;
    }

    .hero-card {
        max-width: 100%;
    }

    .hero-steps-title,
    .hero-card-label,
    .hero-logo-link {
        flex-wrap: wrap;
    }

    .hero-logo-link {
        gap: 12px;
    }

    .hero-logo-img {
        width: min(100%, 220px);
    }

    .nav-inner {
        height: 64px;
    }

    .nav-badge {
        display: none;
    }

    .nav-brand .ai-badge {
        display: none;
    }

    .analysis-grid,
    .results-body {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        max-width: 420px;
    }

    .tab {
        padding: 10px 18px;
        font-size: 13px;
        width: 100%;
        text-align: center;
    }

    .hero {
        padding: 40px 0 32px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .workspace {
        padding: 40px 0;
    }

    .results-section,
    .cls-section {
        padding: 24px;
    }

    .footer-top {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .results-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .cls-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .cls-prediction-final {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .cls-prediction-text {
        text-align: center;
    }

    .loading-overlay {
        top: 88px;
        padding: 14px 18px;
        gap: 12px;
    }

    .loading-text {
        min-width: 0;
        font-size: 13px;
    }
}

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

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        aspect-ratio: auto;
        gap: 8px;
    }

    .lang-switcher {
        font-size: 11px;
    }

    .lang-btn {
        padding: 6px 10px;
        min-height: 30px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 14px;
    }
}
