/* ========================================
   Marbos Audit – brand-aligned UI
   ======================================== */

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

:root {
    /* Marbos-inspired palette */
    --marbos-navy: #0A2540;
    --marbos-navy-soft: #0F1628;
    --marbos-violet: #635bff;
    --marbos-violet-hover: #5248e6;
    --marbos-cyan: #00d4ff;
    --marbos-green: #00d924;

    --color-bg: #eef1f8;
    --color-bg-elevated: #f7f8fc;
    --color-surface: #ffffff;
    --color-text: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #64748b;
    --color-primary: var(--marbos-violet);
    --color-primary-hover: var(--marbos-violet-hover);
    --color-primary-light: rgba(99, 91, 255, 0.08);
    --color-primary-ring: rgba(99, 91, 255, 0.22);
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;
    --color-good: #059669;
    --color-good-bg: #ecfdf5;
    --color-avg: #d97706;
    --color-avg-bg: #fffbeb;
    --color-poor: #dc2626;
    --color-poor-bg: #fef2f2;
    --shadow-xs: 0 1px 2px rgba(7, 11, 23, 0.04);
    --shadow-sm: 0 1px 3px rgba(7, 11, 23, 0.06), 0 1px 2px rgba(7, 11, 23, 0.04);
    --shadow-md: 0 8px 24px rgba(7, 11, 23, 0.08);
    --shadow-lg: 0 20px 50px rgba(7, 11, 23, 0.1);
    --shadow-focus: 0 0 0 3px var(--color-primary-ring);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Sora', var(--font);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 0.18s;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 32px);
}

.container--wide {
    max-width: 1200px;
}

/* --- Header (Marbos dark bar) --- */
.site-header {
    padding: 14px 0;
    background: linear-gradient(180deg, var(--marbos-navy) 0%, var(--marbos-navy-soft) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 24px rgba(7, 11, 23, 0.35);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: baseline;
    gap: 0.35em;
}

.logo-mark {
    font-weight: 800;
}

.logo-suffix {
    font-weight: 600;
    color: var(--marbos-cyan);
}

/* --- Header navigation --- */
.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font);
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease);
    white-space: nowrap;
}

.header-nav-link:hover {
    color: var(--marbos-cyan);
}

.header-nav-link.active {
    color: #f8fafc;
    border-bottom-color: var(--marbos-violet);
}

/* --- Hamburger button (hidden on desktop) --- */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    width: 28px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.hamburger span {
    display: block;
    position: absolute;
    left: 2px;
    right: 2px;
    height: 2px;
    background: #f8fafc;
    border-radius: 1px;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.hamburger span:nth-child(1) { top: 4px; }
.hamburger span:nth-child(2) { top: 11px; }
.hamburger span:nth-child(3) { top: 18px; }

.hamburger.open span:nth-child(1) { top: 11px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

@media (max-width: 767px) {
    .hamburger {
        display: block;
        order: 2;
    }

    .header-inner {
        flex-wrap: nowrap;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--marbos-navy);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
        z-index: 100;
        padding: 8px 0;
    }

    .header-nav.open {
        display: flex;
        animation: slideDown 0.25s var(--ease);
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .header-nav-link {
        display: block;
        width: 100%;
        padding: 14px clamp(16px, 4vw, 32px);
        font-size: 0.9375rem;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .header-nav-link:hover {
        background: rgba(255, 255, 255, 0.04);
    }

    .header-nav-link.active {
        color: #f8fafc;
        border-left-color: var(--marbos-violet);
        border-bottom-color: transparent;
        background: rgba(99, 91, 255, 0.08);
    }

    .site-header {
        position: sticky;
    }

    .btn-header-cta {
        order: 3;
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 0.6875rem;
    }
}

.btn-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: var(--font);
    color: var(--marbos-navy);
    background: linear-gradient(135deg, #fff 0%, #f0f4ff 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-full);
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: box-shadow var(--duration) var(--ease);
    -webkit-tap-highlight-color: transparent;
}

.btn-header-cta:hover {
    box-shadow: 0 4px 20px rgba(99, 91, 255, 0.35);
}

.btn-header-cta:active {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.btn-header-cta:visited {
    color: var(--marbos-navy);
    text-decoration: none;
}

/* --- Hero --- */
.hero {
    padding: clamp(48px, 8vw, 88px) 0 40px;
    text-align: center;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--marbos-violet);
    background: var(--color-primary-light);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
    border: 1px solid rgba(99, 91, 255, 0.15);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.035em;
    color: var(--marbos-navy);
    margin-bottom: 20px;
    max-width: 22ch;
    margin-left: auto;
    margin-right: auto;
}

.hero h1 .accent {
    color: var(--marbos-violet);
}

.hero .subtitle {
    font-size: 1.0625rem;
    color: var(--color-text-secondary);
    max-width: 34rem;
    margin: 0 auto;
    line-height: 1.75;
}

/* --- Audit Form --- */
.audit-form-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border-light);
    padding: clamp(24px, 4vw, 36px);
    margin-top: 36px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.audit-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--marbos-violet), var(--marbos-cyan));
    opacity: 0.9;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 10px;
}

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

.input-wrapper {
    flex: 1;
    position: relative;
    min-width: 0;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    font-size: 0.9375rem;
    font-family: var(--font);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-elevated);
    color: var(--color-text);
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease);
    outline: none;
}

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

.form-input:focus {
    border-color: var(--marbos-violet);
    background: var(--color-surface);
    box-shadow: var(--shadow-focus);
}

.form-input.has-error {
    border-color: var(--color-poor);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font);
    color: #fff;
    background: linear-gradient(135deg, var(--marbos-violet) 0%, #4f46e5 100%);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform 0.12s var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--marbos-violet-hover) 0%, #4338ca 100%);
    box-shadow: 0 8px 28px rgba(99, 91, 255, 0.35);
}

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

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-hint {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* --- Error --- */
.error-message {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--color-poor-bg);
    border: 1px solid rgba(220, 38, 38, 0.18);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-poor);
    text-align: center;
}

.error-message.visible {
    display: flex;
}

.error-icon {
    flex-shrink: 0;
}

/* --- Trust Bar --- */
.trust-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px 28px;
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid var(--color-border-light);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.trust-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--marbos-violet);
}

/* --- Loading --- */
.loading-state {
    display: none;
    padding: 48px 0;
}

.loading-state.visible {
    display: block;
    animation: fadeIn 0.35s var(--ease);
}

.loading-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-md);
    padding: 48px 32px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--marbos-violet);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin-bottom: 20px;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.loading-text {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.65;
    max-width: 360px;
    margin: 0 auto;
}

.loading-steps {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--color-border-light);
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: color 0.35s var(--ease);
}

.loading-step.active {
    color: var(--marbos-violet);
}

.loading-step.done {
    color: var(--color-good);
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border);
    transition: background 0.35s var(--ease);
    flex-shrink: 0;
}

.loading-step.active .step-dot {
    background: var(--marbos-violet);
    animation: pulse 1.2s var(--ease) infinite;
}

.loading-step.done .step-dot {
    background: var(--color-good);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* --- Results --- */
.results-area {
    display: none;
    padding-bottom: 32px;
}

.results-area.visible {
    display: block;
    animation: fadeUp 0.45s var(--ease);
}

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

.results-hero-panel {
    margin-bottom: 28px;
}

.results-header {
    text-align: center;
    margin-bottom: 28px;
    padding-top: 28px;
}

.results-eyebrow {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.results-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--marbos-violet);
    word-break: break-word;
    margin-bottom: 16px;
    line-height: 1.35;
    max-width: 100%;
}

/* --- Tab bar --- */
.tab-bar {
    display: flex;
    justify-content: center;
    gap: 6px;
    background: rgba(99, 91, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 6px;
    margin-bottom: 28px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(99, 91, 255, 0.1);
}

.tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: var(--font);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.tab-btn.active {
    background: var(--color-surface);
    color: var(--marbos-navy);
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover:not(.active) {
    color: var(--color-text-secondary);
}

/* --- New audit button --- */
.btn-new-audit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: var(--font);
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.btn-new-audit:hover {
    border-color: var(--marbos-violet);
    color: var(--marbos-navy);
    box-shadow: var(--shadow-sm);
}

/* --- Score Grid --- */
.score-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}

.score-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    padding: 22px 14px 18px;
    text-align: center;
    transition: box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

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

.score-ring {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border: 3px solid var(--color-border);
    transition: border-color 0.45s var(--ease);
    background: var(--color-bg-elevated);
}

.score-card .score-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.score-card .score-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.score-card .score-subtitle {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    font-weight: 500;
    line-height: 1.35;
}

.score-good .score-ring { border-color: var(--color-good); }
.score-good .score-value { color: var(--color-good); }
.score-average .score-ring { border-color: var(--color-avg); }
.score-average .score-value { color: var(--color-avg); }
.score-poor .score-ring { border-color: var(--color-poor); }
.score-poor .score-value { color: var(--color-poor); }

/* --- Panel blocks (cards) --- */
.panel-block {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    padding: clamp(20px, 3vw, 28px);
    margin-bottom: 20px;
    box-shadow: var(--shadow-xs);
}

.panel-block--emphasis {
    border-color: rgba(99, 91, 255, 0.2);
    box-shadow: var(--shadow-sm);
    background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
}

/* --- Section headers --- */
.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.section-header--panel {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--color-border-light);
}

.section-header-text {
    flex: 1;
    min-width: 0;
}

.section-header h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--marbos-navy);
    margin-bottom: 6px;
}

.section-lead {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.55;
    max-width: 42rem;
}

.section-badge {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    background: var(--color-bg-elevated);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border-light);
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
}

.section-badge--accent {
    color: var(--marbos-violet);
    background: var(--color-primary-light);
    border-color: rgba(99, 91, 255, 0.2);
}

/* --- Two-column results --- */
.results-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-top: 8px;
}

.results-split__col--insights {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.results-split__col--insights .panel-block:last-child {
    margin-bottom: 0;
}

.results-split__col--actions {
    order: 2;
    position: sticky;
    top: 88px;
    min-width: 0;
}

/* --- Metrics --- */
.metrics-section {
    margin-bottom: 28px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.metric-card {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 118px;
}

.metric-top { margin-bottom: 12px; }

.metric-name {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--marbos-navy);
    letter-spacing: -0.01em;
}

.metric-full {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-top: 4px;
    line-height: 1.4;
}

.metric-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    justify-content: flex-end;
}

.metric-value-wrap {
    min-width: 0;
    flex-shrink: 0;
    display: inline-block;
    white-space: nowrap;
}

.metric-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-text);
    display: inline-block;
}

.metric-rating {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.metric-rating.good {
    background: var(--color-good-bg);
    color: var(--color-good);
}

.metric-rating.average {
    background: var(--color-avg-bg);
    color: var(--color-avg);
}

.metric-rating.poor {
    background: var(--color-poor-bg);
    color: var(--color-poor);
}

/* --- CrUX --- */
.crux-section {
    margin-bottom: 0;
}

.crux-intro {
    margin-bottom: 18px;
}

.crux-source-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.crux-source-badge.badge-url {
    background: var(--color-good-bg);
    color: var(--color-good);
}

.crux-source-badge.badge-origin {
    background: var(--color-primary-light);
    color: var(--marbos-violet);
}

.crux-explanation {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.crux-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.crux-card {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    padding: 18px;
    transition: box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.crux-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--color-border);
}

.crux-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.crux-card-label {
    display: flex;
    flex-direction: column;
}

.crux-card-name {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--marbos-navy);
    letter-spacing: -0.01em;
}

.crux-card-full {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    margin-top: 4px;
    line-height: 1.35;
}

.crux-card-value-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-shrink: 0;
}

.crux-card-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-text);
}

.crux-card-rating {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.crux-card-rating.good {
    background: var(--color-good-bg);
    color: var(--color-good);
}

.crux-card-rating.average {
    background: var(--color-avg-bg);
    color: var(--color-avg);
}

.crux-card-rating.poor {
    background: var(--color-poor-bg);
    color: var(--color-poor);
}

.crux-hist {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.crux-hist-bar {
    min-width: 2px;
    transition: width 0.5s var(--ease);
}

.crux-hist-bar.good { background: var(--color-good); }
.crux-hist-bar.average { background: var(--color-avg); }
.crux-hist-bar.poor { background: var(--color-poor); }

.crux-hist-labels {
    display: flex;
    justify-content: space-between;
}

.crux-hist-pct {
    font-size: 0.625rem;
    font-weight: 700;
}

.crux-hist-pct.good { color: var(--color-good); }
.crux-hist-pct.average { color: var(--color-avg); }
.crux-hist-pct.poor { color: var(--color-poor); }

.crux-no-data {
    display: none;
    text-align: left;
    padding: 0;
    background: transparent;
    border: none;
}

.crux-no-data-panel {
    text-align: left;
    padding: 20px 18px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-xs);
}

.crux-no-data-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.crux-no-data-head .crux-no-data-icon {
    flex-shrink: 0;
    margin-bottom: 0;
}

.crux-no-data-head .crux-no-data-title {
    margin-bottom: 0;
    text-align: left;
}

.crux-no-data-icon {
    color: var(--color-text-muted);
    margin-bottom: 14px;
}

.crux-no-data-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 10px;
}

.crux-no-data-text {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.75;
    max-width: 32rem;
    margin: 0 auto;
}

.crux-no-data-panel .crux-no-data-text {
    max-width: none;
    margin: 0;
}

.crux-period {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    margin-top: 14px;
    font-weight: 500;
}

.crux-note {
    display: none;
}

.crux-note-text {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.75;
    background: var(--color-primary-light);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-top: 10px;
    border: 1px solid rgba(99, 91, 255, 0.12);
}

/* --- CrUX History --- */
.crux-history-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--color-border-light);
}

.crux-history-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.crux-history-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--marbos-navy);
    letter-spacing: -0.01em;
}

.crux-history-explanation {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.crux-history-charts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.crux-history-card {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    padding: 16px 18px 12px;
    transition: box-shadow var(--duration) var(--ease);
}

.crux-history-card:hover {
    box-shadow: var(--shadow-sm);
}

.crux-history-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.crux-history-card-label {
    display: flex;
    flex-direction: column;
}

.crux-history-card-name {
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--marbos-navy);
}

.crux-history-card-full {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.crux-history-card-val {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
    white-space: nowrap;
}

.crux-history-card-val.good { color: var(--color-good); }
.crux-history-card-val.average { color: var(--color-avg); }
.crux-history-card-val.poor { color: var(--color-poor); }

.crux-history-spark {
    width: 100%;
    height: 56px;
    margin-bottom: 6px;
}

.crux-sparkline-svg {
    width: 100%;
    height: 100%;
}

.spark-line {
    fill: none;
    stroke: var(--marbos-violet);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.spark-dot {
    fill: var(--marbos-violet);
}

.spark-thresh {
    stroke-width: 1;
    stroke-dasharray: 4 3;
    vector-effect: non-scaling-stroke;
}

.spark-thresh-good {
    stroke: var(--color-good);
    opacity: 0.35;
}

.spark-thresh-poor {
    stroke: var(--color-poor);
    opacity: 0.35;
}

.spark-gap {
    stroke: var(--color-text-muted);
    stroke-width: 1;
    stroke-dasharray: 2 2;
    opacity: 0.45;
    vector-effect: non-scaling-stroke;
}

.crux-history-dates {
    display: flex;
    justify-content: space-between;
    font-size: 0.625rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* --- Security --- */
.security-section {
    margin-bottom: 0;
}

.security-overview {
    margin-bottom: 16px;
}

.security-grade-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    padding: 22px;
    margin-bottom: 16px;
    transition: box-shadow var(--duration) var(--ease);
}

.security-grade-card:hover {
    box-shadow: var(--shadow-sm);
}

.security-grade-ring {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--color-border);
    flex-shrink: 0;
    transition: border-color 0.45s var(--ease);
    background: var(--color-surface);
}

.security-grade-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-text);
}

.grade-good .security-grade-ring { border-color: var(--color-good); }
.grade-good .security-grade-value { color: var(--color-good); }
.grade-average .security-grade-ring { border-color: var(--color-avg); }
.grade-average .security-grade-value { color: var(--color-avg); }
.grade-poor .security-grade-ring { border-color: var(--color-poor); }
.grade-poor .security-grade-value { color: var(--color-poor); }

.security-grade-info {
    flex: 1;
    min-width: 0;
}

.security-grade-label {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--marbos-navy);
    margin-bottom: 4px;
}

.security-grade-score {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    font-weight: 600;
}

.security-grade-tests {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.security-explanation {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.security-tips {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.security-tip-card {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    padding: 16px 18px;
    border-left: 3px solid var(--color-border);
}

.security-tip-card.tip-good { border-left-color: var(--color-good); }
.security-tip-card.tip-average { border-left-color: var(--color-avg); }
.security-tip-card.tip-poor { border-left-color: var(--color-poor); }

.security-tip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.security-tip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--color-border);
}

.tip-good .security-tip-dot { background: var(--color-good); }
.tip-average .security-tip-dot { background: var(--color-avg); }
.tip-poor .security-tip-dot { background: var(--color-poor); }

.security-tip-label {
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--marbos-navy);
}

.security-tip-text {
    font-size: 0.8125rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    padding-left: 16px;
}

.security-no-data {
    display: none;
    text-align: center;
    padding: 36px 22px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    border: 1px dashed var(--color-border);
}

/* --- Recommendations --- */
.recommendations-section {
    margin-bottom: 0;
}

.recommendation-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    padding: 18px 20px;
    margin-bottom: 12px;
    border-left: 4px solid var(--color-border);
    transition: box-shadow var(--duration) var(--ease);
}

.recommendation-card:last-child {
    margin-bottom: 0;
}

.recommendation-card:hover {
    box-shadow: var(--shadow-sm);
}

.recommendation-card.severity-high {
    border-left-color: var(--color-poor);
    background: linear-gradient(90deg, rgba(254, 242, 242, 0.5) 0%, #fff 12%);
}

.recommendation-card.severity-medium {
    border-left-color: var(--color-avg);
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.6) 0%, #fff 12%);
}

.recommendation-card.severity-low {
    border-left-color: var(--color-good);
    background: linear-gradient(90deg, rgba(236, 253, 245, 0.5) 0%, #fff 12%);
}

.rec-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.rec-badge {
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.severity-high .rec-badge {
    background: var(--color-poor-bg);
    color: var(--color-poor);
}

.severity-medium .rec-badge {
    background: var(--color-avg-bg);
    color: var(--color-avg);
}

.severity-low .rec-badge {
    background: var(--color-good-bg);
    color: var(--color-good);
}

.rec-title {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--marbos-navy);
    line-height: 1.35;
}

.rec-text {
    font-size: 0.8125rem;
    line-height: 1.75;
    color: var(--color-text-secondary);
}

/* --- CTA --- */
.cta-section {
    margin-top: 36px;
    margin-bottom: 48px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    background: var(--marbos-navy);
    box-shadow: var(--shadow-lg);
}

/* Csak laptop / desktop nézetben legyen kvázi full-bleed,
   de mindkét oldalon pontosan 15px maradjon */
@media (min-width: 1024px) {
    .cta-section {
        width: calc(100vw - 30px);
        max-width: calc(100vw - 30px);
        margin-left: calc(50% - 50vw + 15px);
        margin-right: 0;
    }
}


.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(99, 91, 255, 0.45) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(0, 212, 255, 0.2) 0%, transparent 45%);
    pointer-events: none;
}

.cta-inner {
    position: relative;
    z-index: 1;
    padding: clamp(40px, 6vw, 56px) clamp(24px, 5vw, 48px);
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .cta-inner {
        max-width: 760px;
        padding: clamp(48px, 5vw, 64px) clamp(32px, 4vw, 56px);
    }
}


.cta-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--marbos-cyan);
    margin-bottom: 14px;
}

.cta-headline {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 2.125rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.25;
}

.cta-br {
    display: inline;
}

.cta-copy {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 auto 28px;
    line-height: 1.75;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-size: 1.125rem;
    font-weight: 700;
    font-family: var(--font);
    color: var(--marbos-navy);
    background: #fff;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s var(--ease), box-shadow var(--duration) var(--ease);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.btn-cta:hover {
    box-shadow: 0 12px 40px rgba(99, 91, 255, 0.45);
    transform: translateY(-2px);
}

.btn-cta:active {
    transform: translateY(0);
}

.cta-trust {
    margin-top: 18px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    line-height: 1.55;
}

/* Taller CTA block: laptop + desktop only (tablet/mobile unchanged) */
@media (min-width: 1025px) and (max-width: 1366px) {
    .cta-inner {
        padding: clamp(52px, 6.5vw, 72px) clamp(24px, 5vw, 48px);
    }
}

@media (min-width: 1367px) {
    .cta-inner {
        padding: clamp(60px, 5vw, 88px) clamp(24px, 5vw, 48px);
    }
}

/* --- Footer --- */
.site-footer {
    padding: 28px 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.site-footer p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.site-footer a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 700;
}

.site-footer a:hover {
    color: var(--marbos-violet);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .results-split__col--actions {
        position: static;
    }
}

@media (max-width: 900px) {
    .results-split {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .results-split__col--insights {
        order: 1;
    }

    .results-split__col--actions {
        order: 2;
    }
}

@media (max-width: 768px) {
    .score-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

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

/* Mobile-only polish: metrics, CrUX, security, header CTA (0–767px) */
@media (max-width: 767px) {
    .header-inner {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .logo {
        flex: 1;
        min-width: 0;
    }

    .btn-header-cta {
        flex-shrink: 0;
        max-width: 11.5rem;
        padding: 9px 12px;
        font-size: 0.6875rem;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: -0.02em;
        text-align: center;
        white-space: nowrap;
        align-self: center;
        border: 1px solid rgba(255, 255, 255, 0.35);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    }

    .metrics-section.panel-block {
        padding: 22px 18px;
    }

    .metric-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: auto;
        padding: 16px 16px;
    }

    .metric-top {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }

    .metric-full {
        max-width: 100%;
    }

    .metric-bottom {
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 6px;
        flex-shrink: 0;
        flex: 0 0 auto;
    }

    .metric-value-wrap {
        white-space: nowrap;
        text-align: right;
    }

    .metric-value {
        font-size: 1.125rem;
    }

    .metric-rating {
        flex-shrink: 0;
    }

    .crux-section.panel-block,
    .security-section.panel-block {
        padding: 22px 18px;
        box-shadow: var(--shadow-sm);
    }

    .crux-section .section-header--panel,
    .security-section .section-header--panel {
        gap: 10px;
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .crux-intro {
        padding: 16px 16px;
        margin-bottom: 16px;
        background: var(--color-bg-elevated);
        border: 1px solid var(--color-border-light);
        border-radius: var(--radius-md);
    }

    .crux-explanation {
        line-height: 1.65;
        max-width: none;
    }

    .crux-grid,
    .crux-history-charts {
        gap: 10px;
    }

    .crux-card {
        padding: 16px 16px;
    }

    .crux-history-section {
        margin-top: 18px;
        padding-top: 18px;
    }

    .crux-no-data {
        padding: 0;
        background: transparent;
    }

    .crux-no-data-panel {
        padding: 18px 16px;
    }

    .security-section .security-explanation {
        padding: 14px 16px;
        margin-top: 14px;
        background: var(--color-bg-elevated);
        border: 1px solid var(--color-border-light);
        border-radius: var(--radius-md);
    }

    .security-grade-card {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        gap: 14px;
        padding: 18px 16px;
    }

    .security-grade-card .security-grade-ring {
        align-self: center;
    }

    .security-grade-info {
        text-align: center;
    }

    .security-grade-label,
    .security-grade-score,
    .security-grade-tests {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .security-tips {
        width: 100%;
        gap: 0.625rem;
    }

    .security-tip-card {
        width: 100%;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .security-tip-header {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .security-tip-label {
        flex: 1;
        min-width: 0;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .security-tip-text {
        padding-left: 0;
        margin: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
        hyphens: auto;
    }
}

@media (max-width: 640px) {
    .hero h1 br { display: none; }

    .audit-form-card {
        margin-top: 28px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 15px;
    }

    .score-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .score-card {
        padding: 18px 10px 14px;
    }

    .score-ring {
        width: 64px;
        height: 64px;
        margin-bottom: 10px;
    }

    .score-card .score-value {
        font-size: 1.5rem;
    }

    .recommendation-card {
        padding: 16px 18px;
    }

    .rec-header {
        flex-wrap: wrap;
    }

    .cta-headline br {
        display: none;
    }

    .security-grade-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px 18px;
    }

    .security-tip-text {
        padding-left: 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-badge {
        align-self: flex-start;
    }

    .loading-steps {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .crux-grid,
    .crux-history-charts {
        grid-template-columns: 1fr;
    }

    .crux-card-header {
        flex-direction: column;
        gap: 8px;
    }
}

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

    .hero h1 {
        font-size: 1.5rem;
    }
}

/* --- Utility --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
