/* SEO checker tool — styled to match the NOKM.dev marketing homepage */
:root {
    --sc-bg: #FFFFFF;
    --sc-panel: #FFFFFF;
    --sc-border: var(--border-subtle);
    --sc-text: var(--text-main);
    --sc-muted: var(--text-muted);
    --sc-accent: var(--color-electric-blue);
    --sc-pass: var(--color-success);
    --sc-warn: var(--color-warning);
    --sc-fail: var(--color-error);
    
    --sc-dark-panel: #0f172a;
    --sc-dark-border: rgba(255, 255, 255, 0.1);
}

/* Base resets handled by styles.css, just some specific layout adjustments */
.sc-hidden {
    display: none !important;
}

/* Full-page boot overlay — true viewport cover + safe areas */
.sc-page-boot-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: max(1.5rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
    box-sizing: border-box;
    overflow: hidden;
    isolation: isolate;
    color: rgba(255, 255, 255, 0.95);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.45s step-end;
    background: radial-gradient(120% 80% at 50% -20%, #1e3a5f 0%, transparent 55%), #050816;
}

.sc-page-boot-loader.sc-page-boot--hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.45s step-start;
}

.sc-page-boot-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.sc-page-boot-mesh {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(37, 99, 235, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(99, 102, 241, 0.22) 0%, transparent 45%),
        radial-gradient(ellipse 50% 35% at 50% 100%, rgba(14, 165, 233, 0.12) 0%, transparent 50%);
    opacity: 0.9;
}

.sc-page-boot-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    opacity: 0.55;
    animation: sc-page-boot-blob-drift 14s ease-in-out infinite;
}

.sc-page-boot-blob--1 {
    width: min(55vw, 420px);
    height: min(55vw, 420px);
    top: -8%;
    left: -10%;
    background: #2563eb;
    animation-delay: 0s;
}

.sc-page-boot-blob--2 {
    width: min(45vw, 340px);
    height: min(45vw, 340px);
    bottom: -5%;
    right: -8%;
    background: #6366f1;
    animation-delay: -4.5s;
}

.sc-page-boot-blob--3 {
    width: min(35vw, 260px);
    height: min(35vw, 260px);
    top: 36%;
    left: 33%;
    background: #0ea5e9;
    opacity: 0.35;
    animation-delay: -9s;
}

.sc-page-boot-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 75%);
}

.sc-page-boot-vignette {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.sc-page-boot-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    max-width: 22rem;
}

.sc-page-boot-brand {
    font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    font-weight: 600;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.25rem;
}

.sc-page-boot-brand-mark {
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.28em;
}

.sc-page-boot-brand-dot {
    color: rgba(96, 165, 250, 0.95);
    letter-spacing: 0.12em;
}

.sc-page-boot-orbit {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 1.25rem 0 1rem;
}

.sc-page-boot-orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.sc-page-boot-orbit-ring--outer {
    inset: 0;
    border-top-color: rgba(147, 197, 253, 0.95);
    border-right-color: rgba(147, 197, 253, 0.12);
    animation: sc-page-boot-spin 1.1s linear infinite;
}

.sc-page-boot-orbit-ring--inner {
    inset: 10px;
    border-bottom-color: rgba(56, 189, 248, 0.85);
    border-left-color: rgba(56, 189, 248, 0.1);
    animation: sc-page-boot-spin-reverse 0.85s linear infinite;
}

.sc-page-boot-orbit-core {
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35), transparent 55%), radial-gradient(circle at 50% 50%, #3b82f6, #1d4ed8);
    box-shadow:
        0 0 28px rgba(59, 130, 246, 0.65),
        0 0 60px rgba(37, 99, 235, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    animation: sc-page-boot-core-pulse 2s ease-in-out infinite;
}

.sc-page-boot-text {
    margin: 0;
    font-size: clamp(1.05rem, 3.5vw, 1.35rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.96);
    line-height: 1.3;
}

.sc-page-boot-sub {
    margin: 0.35rem 0 0;
    font-size: clamp(0.8rem, 2.8vw, 0.9rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: rgba(186, 230, 253, 0.65);
}

@keyframes sc-page-boot-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes sc-page-boot-spin-reverse {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes sc-page-boot-core-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.04);
        opacity: 0.92;
    }
}

@keyframes sc-page-boot-blob-drift {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(4%, 3%) scale(1.05);
    }
    66% {
        transform: translate(-3%, 2%) scale(0.98);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sc-page-boot-orbit-ring--outer,
    .sc-page-boot-orbit-ring--inner {
        animation: none;
        border-color: rgba(147, 197, 253, 0.45);
    }

    .sc-page-boot-orbit-ring--inner {
        border-color: rgba(56, 189, 248, 0.35);
    }

    .sc-page-boot-orbit-core {
        animation: none;
    }

    .sc-page-boot-blob {
        animation: none;
    }

    .sc-page-boot-loader {
        transition: opacity 0.2s ease, visibility 0.2s step-end;
    }

    .sc-page-boot-loader.sc-page-boot--hide {
        transition: opacity 0.2s ease, visibility 0.2s step-start;
    }
}

/* =========================================
   Hero & Form Redesign
   ========================================= */
.sc-hero-form {
    max-width: 650px;
    margin: 2rem auto;
    position: relative;
    z-index: 10;
}

.sc-hero-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 0 4px rgba(255, 255, 255, 0.1);
    transition: all var(--t-med) var(--ease-standard);
}

.sc-hero-input-group:focus-within {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2), 0 10px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--color-electric-blue);
    transform: translateY(-2px);
}

.sc-search-icon {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    margin-left: 16px;
}

.sc-hero-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.15rem;
    padding: 16px 20px;
    outline: none;
    font-weight: 500;
}

.sc-hero-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.sc-hero-btn {
    background: var(--color-electric-blue);
    color: #FFF;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 32px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: var(--shadow-button);
    transition: all var(--t-fast) var(--ease-standard);
    white-space: nowrap;
}

.sc-hero-btn:hover:not(:disabled) {
    background: var(--color-electric-blue-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
}

.sc-hero-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sc-quota-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: -10px;
    margin-bottom: 20px;
}

.sc-quota-divider {
    color: rgba(255, 255, 255, 0.3);
}

/* Compact SEO checker hero + history modal */
.sc-hero-compact.hero,
section.hero.sc-hero-compact {
    padding-top: 2rem !important;
    padding-bottom: 1.35rem !important;
}

@media (min-width: 768px) {
    .sc-hero-compact.hero {
        padding-top: 2.5rem !important;
        padding-bottom: 1.75rem !important;
    }
}

.sc-hero-badge-compact {
    margin: 0 auto 0.4rem !important;
    display: inline-block;
    font-size: 0.62rem !important;
    padding: 0.15rem 0.45rem !important;
}

.sc-hero-compact .hero-content {
    max-width: 34rem;
}

.sc-hero-compact .hero-title {
    font-size: clamp(1.28rem, 4vw, 1.75rem) !important;
    margin-bottom: 0.35rem !important;
}

.sc-hero-sub-compact.hero-subtitle {
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    margin-bottom: 0.55rem !important;
}

.sc-hero-compact .sc-quota-hero {
    font-size: 0.72rem;
    margin: 0.3rem 0 0.55rem;
}

.sc-hero-compact .sc-hero-form {
    margin: 0.55rem auto 0;
    max-width: 100%;
}

.sc-hero-compact .sc-hero-input {
    font-size: 0.92rem;
    padding: 10px 12px;
}

.sc-hero-compact .sc-hero-input-group {
    padding: 4px 6px;
}

.sc-hero-compact .sc-hero-btn {
    padding: 10px 16px;
    font-size: 0.84rem;
}

.sc-hero-compact .sc-search-icon {
    width: 18px;
    height: 18px;
    margin-left: 10px;
}

.sc-hero-form-hint {
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.72rem;
    margin-top: 0.4rem;
    line-height: 1.4;
}

.sc-hero-toolbar {
    display: flex;
    justify-content: center;
    margin-top: 0.55rem;
}

.sc-btn-history {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.38rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.sc-btn-history:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.38);
}

.sc-btn-history:focus-visible {
    outline: 2px solid rgba(147, 197, 253, 0.95);
    outline-offset: 2px;
}

body.sc-modal-open {
    overflow: hidden;
}

.sc-modal {
    position: fixed;
    inset: 0;
    z-index: 999997;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: max(0.5rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(0.5rem, env(safe-area-inset-left));
    box-sizing: border-box;
}

.sc-modal.sc-hidden {
    display: none !important;
}

@media (min-width: 640px) {
    .sc-modal {
        align-items: center;
        padding: 1.5rem;
    }
}

.sc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.sc-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    max-height: min(88vh, 620px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.22);
    border: 1px solid #e2e8f0;
    border-bottom: none;
}

@media (min-width: 640px) {
    .sc-modal__dialog {
        border-radius: var(--radius-lg);
        border-bottom: 1px solid #e2e8f0;
        max-height: min(82vh, 580px);
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    }
}

.sc-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.sc-modal__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.sc-modal__close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: -0.25rem -0.25rem 0 0;
    padding: 0;
    border: none;
    border-radius: 8px;
    font-size: 1.35rem;
    line-height: 1;
    color: #64748b;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.sc-modal__close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sc-modal__lead {
    padding: 0.65rem 1.1rem 0;
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
    flex-shrink: 0;
}

.sc-modal__toolbar {
    padding: 0.45rem 1.1rem 0.5rem;
    flex-shrink: 0;
}

.sc-modal__body {
    padding: 0 1.1rem 1.1rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.sc-history-list--modal {
    margin-top: 0.35rem;
}

.sc-main-container {
    padding-top: var(--section-spacing-mobile);
    padding-bottom: var(--section-spacing-desktop);
}

.sc-secondary-tools {
    display: grid;
    gap: var(--grid-spacing-mobile);
    margin-bottom: 3rem;
}

@media (min-width: 800px) {
    .sc-secondary-tools {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: var(--grid-spacing-tablet);
    }
}

.sc-shell-card {
    background: var(--bg-body);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-card);
    transition: transform var(--t-med) var(--ease-standard), box-shadow var(--t-med) var(--ease-standard);
}

.sc-shell-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.sc-shell-card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* =========================================
   Standard Form Elements
   ========================================= */
.sc-textarea, .sc-input, .sc-select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 16px;
    font-family: var(--font-primary);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: all var(--t-fast) var(--ease-standard);
    min-height: 48px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    color: var(--text-main);
}

.sc-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.sc-textarea:focus, .sc-input:focus, .sc-select:focus {
    outline: none;
    border-color: var(--color-electric-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 4px 16px rgba(37, 99, 235, 0.08);
    background-color: #fff;
    transform: translateY(-1px);
}

.sc-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--spacing-md) center;
    padding-right: calc(var(--spacing-md) + 20px);
}

.sc-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.sc-input {
    flex: 1;
    min-width: 0;
}

.sc-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    padding: 0 var(--spacing-md);
    height: 48px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all var(--t-fast) var(--ease-standard);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sc-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* =========================================
   Results — layout (Lighthouse-style clarity)
   ========================================= */
.sc-results-root {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.sc-results-header {
    margin-bottom: 1.75rem;
}

.sc-results-title {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin: 0 0 0.5rem;
}

.sc-results-lead {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 52rem;
}

.sc-findings-section,
.sc-meta-section {
    margin-top: 2.5rem;
}

.sc-section-heading-block {
    margin-bottom: 1.25rem;
}

.sc-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.sc-section-sub {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.sc-status-legend {
    color: var(--text-muted);
}

.sc-legend-pass { color: #059669; font-weight: 600; }
.sc-legend-warn { color: #d97706; font-weight: 600; }
.sc-legend-fail { color: #dc2626; font-weight: 600; }

.sc-exec-summary {
    margin: 0 0 1.75rem;
    padding: 1.1rem 1.25rem;
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--text-main);
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--sc-accent);
}

.sc-priority-section {
    margin-bottom: 2.25rem;
    padding: 1.25rem 1.35rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-md);
}

.sc-priority-heading {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #92400e;
}

.sc-priority-lead {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #78350f;
}

.sc-priority-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sc-priority-row {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    border-left-width: 4px;
    border-left-color: #ef4444;
    margin: 0;
}

.sc-priority-sev {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    background: #dc2626;
    padding: 0.25rem 0.45rem;
    border-radius: 4px;
    margin-top: 0.15rem;
}

.sc-priority-body {
    min-width: 0;
}

.sc-priority-cat {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.sc-priority-title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-main);
}

.sc-priority-msg {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.sc-priority-fix {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-main);
}

.sc-priority-fix-label {
    font-weight: 700;
    color: #b45309;
    margin-right: 0.25rem;
}

.sc-cat-count--fail { color: #dc2626; font-weight: 600; }
.sc-cat-count--warn { color: #d97706; font-weight: 600; }
.sc-cat-count--pass { color: #059669; font-weight: 600; }

.sc-check-sections .sc-section {
    margin-bottom: 2rem;
}

/* Score card + gauge */
.sc-score-card {
    background: linear-gradient(135deg, #020617 0%, #1e293b 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: 1.75rem;
    display: grid;
    gap: 1.75rem;
    box-shadow: var(--shadow-hero);
}

@media (min-width: 768px) {
    .sc-score-card {
        grid-template-columns: minmax(11rem, 13rem) 1fr;
        align-items: start;
        gap: 2rem;
    }
}

.sc-score-card-primary {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .sc-score-card-primary {
        align-items: center;
    }
}

.sc-score-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 0.75rem;
}

.sc-score-gauge {
    --sc-score: 0;
    --sc-gauge-hue: 210;
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(
        from -90deg,
        hsl(var(--sc-gauge-hue), 78%, 52%) calc(var(--sc-score) * 1%),
        rgba(255, 255, 255, 0.12) 0
    );
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.sc-score-gauge-inner {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: linear-gradient(165deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sc-score-gauge-num {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #fff;
}

.sc-score-gauge-max {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.15rem;
}

.sc-score-meta--note {
    margin-top: 1rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.5);
    max-width: 12rem;
}

.sc-score-modifiers {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.25);
    text-align: left;
    width: 100%;
    max-width: 22rem;
    box-sizing: border-box;
}

.sc-modifiers-title {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(251, 191, 36, 0.95);
}

.sc-modifiers-intro {
    margin: 0 0 0.65rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(226, 232, 240, 0.82);
}

.sc-modifiers-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.sc-modifier-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    background: rgba(2, 6, 23, 0.45);
    border-left: 3px solid rgba(148, 163, 184, 0.5);
    font-size: 0.78rem;
    line-height: 1.35;
    color: rgba(241, 245, 249, 0.95);
}

.sc-modifier-row--penalty { border-left-color: #f97316; }
.sc-modifier-row--cap { border-left-color: #38bdf8; }
.sc-modifier-row--overall_cap { border-left-color: #a855f7; }

.sc-modifier-kind {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.95);
}

.sc-modifier-summary {
    font-weight: 600;
}

.sc-modifier-hint {
    font-size: 0.72rem;
    color: rgba(203, 213, 225, 0.92);
    font-weight: 400;
}

.sc-score-card-secondary {
    min-width: 0;
}

.sc-score-url-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 0.35rem;
}

.sc-score-url {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    line-height: 1.45;
    word-break: break-all;
    color: rgba(147, 197, 253, 0.95);
}

.sc-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.sc-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
}

.sc-chip-n {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.sc-chip--pass { border-color: rgba(16, 185, 129, 0.45); }
.sc-chip--pass .sc-chip-n { color: #6ee7b7; }

.sc-chip--warn { border-color: rgba(245, 158, 11, 0.45); }
.sc-chip--warn .sc-chip-n { color: #fcd34d; }

.sc-chip--fail { border-color: rgba(248, 113, 113, 0.45); }
.sc-chip--fail .sc-chip-n { color: #fca5a5; }

.sc-cat-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

.sc-cat-pill {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xs);
    padding: 0.65rem 0.75rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.35rem 0.5rem;
    align-items: center;
}

.sc-cat-pill-label {
    grid-column: 1 / -1;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    line-height: 1.2;
}

.sc-cat-pill-meter {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    align-self: end;
}

.sc-cat-pill-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #4ade80);
    min-width: 4%;
    transition: width 0.4s ease;
}

.sc-cat-pill-score {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
    justify-self: end;
    align-self: end;
    line-height: 1;
}

.sc-benchmark,
.sc-diff-box {
    margin-top: 1rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.82);
}

.sc-diff-title {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.sc-diff-summary {
    margin: 0 0 0.65rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
}

.sc-diff-list {
    margin: 0;
    padding-left: 1.2rem;
    color: rgba(226, 232, 240, 0.92);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Category sections (findings) */
.sc-cat-section-head {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-subtle);
}

@media (min-width: 640px) {
    .sc-cat-section-head {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 1rem;
    }
}

.sc-cat-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.sc-cat-section-sub {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sc-cat-meter {
    width: 100%;
    max-width: 200px;
    height: 8px;
    border-radius: 999px;
    background: var(--bg-light);
    overflow: hidden;
    flex-shrink: 0;
}

.sc-cat-meter-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
}

/* Audit cards */
.sc-check {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0;
    margin-bottom: 0.65rem;
    background: var(--bg-body);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    border-left-width: 4px;
}

.sc-check--pass { border-left-color: #10b981; }
.sc-check--warn { border-left-color: #f59e0b; }
.sc-check--fail { border-left-color: #ef4444; }

.sc-check-row {
    display: flex;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    align-items: flex-start;
}

.sc-check-icon-wrap {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-top: 0.1rem;
}

.sc-check--pass .sc-check-icon-wrap { background: rgba(16, 185, 129, 0.12); color: #059669; }
.sc-check--warn .sc-check-icon-wrap { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.sc-check--fail .sc-check-icon-wrap { background: rgba(239, 68, 68, 0.12); color: #dc2626; }

.sc-audit-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.sc-check-body {
    flex: 1;
    min-width: 0;
}

.sc-check-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    justify-content: space-between;
}

.sc-check-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
    color: var(--text-main);
    line-height: 1.35;
}

.sc-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.02em;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    flex-shrink: 0;
    white-space: nowrap;
}

.sc-badge-pass {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.sc-badge-warn {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.sc-badge-fail {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.sc-check-msg {
    margin: 0.55rem 0 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.sc-check-fix {
    margin: 0.85rem 0 0;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-xs);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.sc-check-fix-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sc-accent);
    margin-bottom: 0.35rem;
}

.sc-check-fix-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-main);
}

.sc-audit-more {
    margin-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.5rem;
}

.sc-audit-more-summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sc-accent);
    list-style: none;
    padding: 0.35rem 0;
    user-select: none;
}

.sc-audit-more-summary::-webkit-details-marker {
    display: none;
}

.sc-audit-more-summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform 0.15s ease;
}

.sc-audit-more[open] .sc-audit-more-summary::before {
    transform: rotate(90deg);
}

.sc-audit-more-body {
    padding: 0.5rem 0 0.25rem;
    font-size: 0.85rem;
    color: var(--text-main);
}

.sc-detail-list {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.55;
}

.sc-detail-list li {
    margin-bottom: 0.35rem;
}

.sc-detail-dl {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(5rem, 10rem) 1fr;
    gap: 0.35rem 0.75rem;
    font-size: 0.82rem;
}

.sc-detail-dl dt {
    font-weight: 600;
    color: var(--text-muted);
}

.sc-detail-dl dd {
    margin: 0;
    word-break: break-word;
}

.sc-detail-text {
    margin: 0;
    line-height: 1.55;
}

.sc-detail-pre {
    margin: 0;
    padding: 0.65rem 0.75rem;
    background: #f1f5f9;
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    overflow: auto;
    max-height: 14rem;
    border: 1px solid var(--border-subtle);
    color: #334155;
}

.sc-meta-section .sc-meta-panels {
    margin-bottom: 2rem;
}

.sc-meta-section .sc-section.sc-meta-card {
    margin-bottom: 0;
}

.sc-meta-panels .sc-meta-card > h2 {
    position: relative;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin: -0.25rem 0 1rem;
    padding: 0 0 0.65rem 0.85rem;
    border-left: 4px solid var(--sc-accent);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.sc-meta-card--cwv > h2 {
    font-size: 1.2rem;
    border-left-color: #0ea5e9;
}

/* Legacy / shared */
.sc-section {
    margin-bottom: 2.5rem;
}

.sc-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
}

.sc-cat-section .sc-cat-section-head .sc-cat-section-title {
    border-bottom: none;
    margin: 0;
    padding: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.sc-meta-panels > .sc-section {
    margin-bottom: 0;
}

.sc-details {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #e2e8f0;
    max-height: 200px;
    overflow: auto;
    background: var(--sc-dark-panel);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-xs);
    font-family: ui-monospace, monospace;
}

/* =========================================
   Report Actions & Meta Panels
   ========================================= */
.sc-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.sc-meta-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.sc-meta-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 1.35rem 1.5rem 1.5rem;
    margin: 0;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.045);
}

.sc-meta-card h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: none;
}

.sc-muted-inline {
    color: var(--sc-muted);
    font-size: 0.9rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* Meta Panel content styling */
.sc-kv-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

.sc-kv-list li { margin-bottom: 0.25rem; }

.sc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.sc-table th,
.sc-table td {
    border: 1px solid var(--border-subtle);
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.sc-table thead th {
    background: linear-gradient(180deg, #f1f5f9 0%, #e8edf4 100%);
    color: #475569;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sc-meta-panels .sc-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.65);
}

.sc-meta-panels .sc-table tbody tr:hover {
    background: rgba(239, 246, 255, 0.75);
}

.sc-serp {
    background: #ffffff;
    border-radius: var(--radius-xs);
    padding: 1rem;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sc-serp-url {
    color: #1a0dab;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.sc-serp-title {
    color: #1a0dab;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}
.sc-serp-title:hover {
    text-decoration: underline;
}

.sc-serp-desc {
    color: #4d5156;
    font-size: 0.9rem;
    line-height: 1.5;
}

.sc-qw {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.sc-qw-warn strong { color: #d97706; }
.sc-qw-fail strong { color: #dc2626; }

.sc-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-xs);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.sc-alert-error a.sc-quota-buy-link {
    display: inline;
    font-weight: 700;
    color: #7f1d1d;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sc-alert-error a.sc-quota-buy-link:hover {
    color: #450a0a;
}

.sc-alert-success {
    background: #f0fdf4;
    border: 1px solid #4ade80;
    color: #166534;
}

/* Utilities */
.sc-td-wrap { word-break: break-all; max-width: 28rem; }
.sc-td-num { text-align: right; width: 4rem; }
.sc-td-dims { white-space: nowrap; }
.sc-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    margin-top: 0.75rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-subtle);
}
.sc-table.sc-table--media-probe {
    min-width: 58rem;
    table-layout: fixed;
    margin-top: 0;
}
.sc-table.sc-table--media-probe th:nth-child(1),
.sc-table.sc-table--media-probe td.sc-td-url {
    width: 32%;
    min-width: 12rem;
}
.sc-td-url {
    vertical-align: top;
    font-size: 0.8rem;
    line-height: 1.4;
    word-break: break-all;
    overflow-wrap: anywhere;
}
.sc-td-opt {
    vertical-align: top;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--text-main);
    min-width: 10rem;
}
a.sc-probe-url {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}
a.sc-probe-url:hover {
    color: #1d4ed8;
}
.sc-loading { color: var(--sc-muted); font-size: 0.9rem; margin-top: 0.5rem; }

/* Packs */
.sc-packs { margin-top: 3rem; }
.sc-pack-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.sc-pack {
    background: var(--bg-body);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-card);
}
.sc-pack h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.sc-pack .price { color: var(--text-muted); font-size: 1rem; margin-bottom: 1.25rem; }

/* Analyze in-flight overlay (staged progress — time-based until fetch completes) */
body.sc-analyze-scroll-lock {
    overflow: hidden;
}

.sc-analyze-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-sizing: border-box;
}

.sc-analyze-overlay-card {
    width: 100%;
    max-width: 26rem;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.65rem 1.4rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.sc-analyze-overlay-title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    text-align: center;
}

.sc-analyze-overlay-url {
    margin: 0 0 1.25rem;
    font-size: 0.8rem;
    line-height: 1.45;
    word-break: break-all;
    color: var(--text-muted);
    text-align: center;
}

.sc-analyze-bar-wrap {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 0.65rem;
}

.sc-analyze-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #38bdf8, #22c55e);
    background-size: 140% 100%;
    transition: width 0.22s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .sc-analyze-bar-fill {
        transition: none;
        background: #2563eb;
    }
}

.sc-analyze-pct {
    font-size: 1.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: center;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.sc-analyze-status {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    min-height: 2.75rem;
    color: var(--text-main);
    text-align: center;
}

.sc-analyze-hint {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-muted);
    text-align: center;
}

/* --- PageSpeed-inspired score visuals (lab palette aligned with PSI) --- */
:root {
    --psi-poor: #ff4e42;
    --psi-needs: #ffa400;
    --psi-good: #0cce6b;
}

.sc-psi-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    justify-content: center;
    margin: 0.85rem 0 0;
    max-width: 22rem;
}

.sc-psi-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.2;
}

.sc-psi-legend-txt strong {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
}

.sc-psi-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sc-psi-swatch--poor { background: var(--psi-poor); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15); }
.sc-psi-swatch--ni { background: var(--psi-needs); border-radius: 2px; }
.sc-psi-swatch--good { background: var(--psi-good); }

.sc-cat-grid-heading {
    margin: 0 0 0.65rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.48);
}

.sc-cat-grid--psi {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 1rem 0.75rem;
}

.sc-psi-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.sc-psi-mini-donut {
    --psi-pct: 0;
    --psi-ring: var(--psi-needs);
    width: 4.35rem;
    height: 4.35rem;
    border-radius: 50%;
    background: conic-gradient(from -90deg, var(--psi-ring) calc(var(--psi-pct) * 1%), rgba(255, 255, 255, 0.12) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.sc-psi-mini-hole {
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 50%;
    background: linear-gradient(165deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-psi-mini-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.sc-psi-mini-lbl {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.25;
    max-width: 10rem;
}

.sc-score-gauge {
    width: 8.25rem;
    height: 8.25rem;
}

.sc-score-gauge-num {
    font-size: 2.25rem;
}

.sc-cat-section {
    border-radius: var(--radius-md);
    padding: 0 0 0 0.85rem;
    margin-left: -0.25rem;
    border-left: 4px solid #e2e8f0;
    transition: border-color 0.2s ease;
}

.sc-cat-section--tier-poor { border-left-color: rgba(255, 78, 66, 0.85); }
.sc-cat-section--tier-ni { border-left-color: rgba(255, 164, 0, 0.9); }
.sc-cat-section--tier-good { border-left-color: rgba(12, 206, 107, 0.9); }

.sc-cat-meter--poor .sc-cat-meter-fill { background: linear-gradient(90deg, #ff4e42, #fb7185); }
.sc-cat-meter--ni .sc-cat-meter-fill { background: linear-gradient(90deg, #ffa400, #fbbf24); }
.sc-cat-meter--good .sc-cat-meter-fill { background: linear-gradient(90deg, #0cce6b, #4ade80); }

.sc-check--pass {
    background: linear-gradient(135deg, #f8fafc 0%, #ecfdf5 55%, #f8fafc 100%);
}

.sc-check--warn {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.sc-check--fail {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.sc-exec-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 50%, #f8fafc 100%);
    border-left-width: 5px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.sc-findings-section .sc-section-heading-block,
.sc-meta-section .sc-section-heading-block {
    position: relative;
    padding-bottom: 0.15rem;
}

.sc-findings-section .sc-section-heading-block::after,
.sc-meta-section .sc-section-heading-block::after {
    content: '';
    display: block;
    height: 3px;
    border-radius: 3px;
    margin-top: 0.65rem;
    background: linear-gradient(90deg, var(--sc-accent), rgba(37, 99, 235, 0.12));
}

@media (prefers-reduced-motion: reduce) {
    .sc-cat-section { transition: none; }
}

/* Core Web Vitals / PSI panel */
.sc-meta-card--span-2 {
    grid-column: 1 / -1;
}

.sc-meta-card--psi {
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.sc-psi-cwv-intro {
    margin-top: 0;
}

.sc-psi-cwv {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sc-psi-perf {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 1.75rem;
    padding: 1.25rem 1.35rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid var(--border-subtle);
}

.sc-psi-perf-donut {
    --psi-pct: 0;
    --psi-ring: var(--psi-needs);
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 50%;
    flex-shrink: 0;
    background: conic-gradient(from -90deg, var(--psi-ring) calc(var(--psi-pct) * 1%), #e2e8f0 0);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.sc-psi-perf-hole {
    width: 4.35rem;
    height: 4.35rem;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
}

.sc-psi-perf-num {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.sc-psi-perf-kicker {
    margin: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.sc-psi-perf-title {
    margin: 0.15rem 0 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.sc-psi-perf-sub {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sc-psi-lab-head {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .sc-psi-lab-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.sc-psi-lab-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.sc-psi-scale-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.1rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.sc-psi-scale-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.sc-psi-shape {
    display: inline-block;
    flex-shrink: 0;
}

.sc-psi-shape--tri {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 9px solid var(--psi-poor);
}

.sc-psi-shape--sq {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--psi-needs);
}

.sc-psi-shape--circ {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--psi-good);
}

.sc-psi-shape--dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.sc-psi-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.65rem;
}

.sc-psi-metric {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: #fff;
}

.sc-psi-metric-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.sc-psi-metric-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sc-psi-metric-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.sc-psi-metric-value {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.sc-psi-metric-audit {
    font-size: 0.85rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: #f1f5f9;
    align-self: flex-start;
}

.sc-psi-metric--poor {
    border-color: rgba(255, 78, 66, 0.35);
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.sc-psi-metric--poor .sc-psi-metric-value { color: #b91c1c; }

.sc-psi-metric--ni {
    border-color: rgba(255, 164, 0, 0.4);
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.sc-psi-metric--ni .sc-psi-metric-value { color: #b45309; }

.sc-psi-metric--good {
    border-color: rgba(12, 206, 107, 0.35);
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

.sc-psi-metric--good .sc-psi-metric-value { color: #047857; }

.sc-psi-metric--neutral .sc-psi-metric-value {
    color: var(--text-main);
}

.sc-psi-field-block {
    padding-top: 0.25rem;
}

.sc-psi-field-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.sc-psi-field-hint {
    margin-top: -0.25rem !important;
}

.sc-table--crux .sc-psi-crux-code {
    font-size: 0.78rem;
}

.sc-psi-crux-pct {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.sc-psi-crux-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sc-psi-crux-pill--good {
    background: rgba(12, 206, 107, 0.15);
    color: #047857;
}

.sc-psi-crux-pill--ni {
    background: rgba(255, 164, 0, 0.18);
    color: #b45309;
}

.sc-psi-crux-pill--poor {
    background: rgba(255, 78, 66, 0.15);
    color: #b91c1c;
}

.sc-psi-eic-meta {
    margin: 1rem 0 0.35rem;
    font-size: 0.88rem;
    color: var(--text-main);
}

.sc-psi-eic-samples {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.sc-psi-eic-note {
    margin-top: 0.35rem !important;
}

.sc-psi-cwv-alert {
    padding: 1rem 1.15rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
}

.sc-psi-cwv-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.sc-psi-cwv-alert-lead {
    margin: 0;
}

.sc-psi-cwv-alert--warn {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

/* --- Secondary tools: batch, history, schedules --- */
.sc-batch-panel {
    margin-top: 1rem;
}

.sc-batch-summary {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.sc-batch-summary-n {
    display: inline-block;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--sc-accent);
    margin-right: 0.25rem;
}

.sc-table-scroll--batch {
    border-radius: var(--radius-md);
}

.sc-table--batch {
    margin-top: 0;
}

.sc-table--batch tbody tr.sc-batch-row--ok:hover {
    background: rgba(239, 246, 255, 0.65);
}

.sc-table--batch tbody tr.sc-batch-row--fail {
    background: rgba(254, 242, 242, 0.55);
}

.sc-batch-status {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sc-batch-status--ok {
    background: rgba(12, 206, 107, 0.15);
    color: #047857;
}

.sc-batch-err-cell {
    vertical-align: middle;
}

.sc-batch-err {
    font-size: 0.85rem;
    color: #b91c1c;
    line-height: 1.45;
}

.sc-td-actions {
    white-space: nowrap;
    vertical-align: middle;
}

.sc-btn-tiny {
    height: auto !important;
    min-height: 36px;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.82rem !important;
}

.sc-btn-view {
    border-radius: 999px;
}

.sc-btn-ghost {
    background: transparent !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
}

.sc-btn-ghost:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

.sc-tier-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.sc-tier-tag--good {
    background: rgba(12, 206, 107, 0.15);
    color: #047857;
}

.sc-tier-tag--ni {
    background: rgba(255, 164, 0, 0.18);
    color: #b45309;
}

.sc-tier-tag--poor {
    background: rgba(255, 78, 66, 0.14);
    color: #b91c1c;
}

.sc-tier-tag--na {
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
}

.sc-history-list,
#schedulesList {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sc-history-li,
.sc-schedule-li {
    margin: 0;
}

.sc-history-card,
.sc-schedule-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 8px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sc-history-card:hover,
.sc-schedule-card:hover {
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.sc-history-open {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.sc-history-url {
    flex: 1;
    min-width: 0;
    font-size: 0.88rem;
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}

.sc-history-open-hint {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.sc-schedule-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sc-schedule-url {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    word-break: break-all;
}

.sc-schedule-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.sc-schedule-freq {
    font-weight: 700;
    color: #475569;
}

.sc-list-empty,
.sc-empty-hint {
    margin: 0.75rem 0 0;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.sc-shell-card h2 {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 0.85rem;
}

.sc-shell-card h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 3rem;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--sc-accent), transparent);
}

.sc-report-actions {
    padding: 1rem 1.15rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid var(--border-subtle);
}

.sc-meta-panels .sc-kv-list li {
    padding: 0.35rem 0;
    border-bottom: 1px dashed rgba(226, 232, 240, 0.9);
}

.sc-meta-panels .sc-kv-list li:last-child {
    border-bottom: none;
}

.sc-keyword-cloud {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid var(--border-subtle);
    line-height: 1.8;
}

.sc-qw-list {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.sc-qw {
    padding: 0.85rem 1rem !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    background: #fff;
}

.sc-qw:last-child {
    border-bottom: none !important;
}

.sc-priority-section {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(252, 211, 77, 0.65);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12);
}

.sc-tool-list a.sc-tool-link {
    font-weight: 600;
}
