        /* Heritage Pine Color Scheme */
        :root {
            --primary-bg: #12352c;
            --secondary-bg: #205f4a;
            --accent-color: #3ecf8e;
            --success-color: #1f6f54;
            --text-light: #ffffff;
            --text-dark: #142821;
            --border-color: #1b4c3b;
            --card-bg: #1b4c3b;
            --highlight-bg: #1c5441;
            --sidebar-bg: #12352c;
            --sidebar-hover: #164236;
            --main-bg: #f2f4f3;
            --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            --font-mono: 'IBM Plex Mono', 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
        }

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

        body { 
            font-family: var(--font-sans);
            background: var(--main-bg);
            color: #1c2c26;
        }

        body.modal-open {
            overflow: hidden;
        }

        .global-progress {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            padding: 12px 32px 16px;
            background: rgba(18, 53, 44, 0.92);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(62, 207, 142, 0.35);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
            display: none;
            z-index: 2000;
            pointer-events: none;
        }

        .global-progress.active {
            display: block;
        }

        .global-progress .progress-track {
            position: relative;
            width: 100%;
            height: 6px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 999px;
            overflow: hidden;
        }

        .global-progress .progress-bar {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, rgba(62, 207, 142, 0.25), #3ecf8e 45%, #67f0af);
            border-radius: inherit;
            box-shadow: 0 0 12px rgba(62, 207, 142, 0.45);
            transition: width 0.35s ease, opacity 0.2s ease;
        }

        .ack-error-banner {
            position: fixed;
            top: 42px;
            right: 10px;
            background: #fef2f2;
            color: #b91c1c;
            border: 1px solid #fca5a5;
            border-radius: 8px;
            padding: 10px 14px;
            box-shadow: 0 6px 18px rgba(0,0,0,0.12);
            font-size: 13px;
            display: none;
            z-index: 3200;
        }

        .ack-error-banner.visible {
            display: block;
        }

        .billing-past-due-banner {
            position: relative;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 12px;
            background: #fef2f2;
            color: #b91c1c;
            border-bottom: 1px solid #fca5a5;
            padding: 12px 18px;
            font-size: 14px;
            font-weight: 500;
            text-align: center;
            z-index: 3300;
        }

        .billing-past-due-text i {
            margin-right: 8px;
        }

        .billing-past-due-cta {
            background: #b91c1c;
            color: #ffffff;
            border: none;
            border-radius: 6px;
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
        }

        .billing-past-due-cta:hover:not(:disabled) {
            background: #991b1b;
        }

        .billing-past-due-cta:disabled {
            opacity: 0.6;
            cursor: default;
        }

        .global-progress .progress-bar::after {
            content: '';
            position: absolute;
            top: -40%;
            right: -30px;
            width: 80px;
            height: 180%;
            background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
            transform: skewX(-20deg);
            animation: progress-glow 1.8s ease-in-out infinite;
        }

        .global-progress .progress-label {
            margin-top: 12px;
            color: rgba(255, 255, 255, 0.88);
            font-size: 14px;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .global-progress .progress-elapsed {
            margin-top: 4px;
            color: rgba(255, 255, 255, 0.6);
            font-size: 12px;
            letter-spacing: 0.04em;
            font-variant-numeric: tabular-nums;
        }

        @keyframes progress-glow {
            from { transform: translateX(-120%) skewX(-20deg); }
            to { transform: translateX(220%) skewX(-20deg); }
        }

        .app-container {
            display: flex;
            height: 100vh;
            height: 100dvh;
        }

        /* Sidebar Styles */
        .sidebar {
            width: 280px;
            background: var(--sidebar-bg);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            position: relative;
            z-index: 50;
        }

        .sidebar-header {
            padding: 24px 20px;
            border-bottom: 1px solid var(--border-color);
        }

        .sidebar-header h1 {
            color: #eef7f3;
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .user-info {
            color: rgba(237, 249, 244, 0.7);
            font-size: 14px;
        }

        .tier-badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            margin-top: 4px;
            background: var(--accent-color);
            color: var(--text-light);
        }

        .sidebar-nav {
            flex: 1;
            padding: 20px 0;
        }

        .nav-section {
            margin-bottom: 24px;
        }

        .nav-section-title {
            color: #6a847b;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 0 20px 8px;
        }

        .nav-section-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            width: 100%;
            border: 1px solid rgba(62, 207, 142, 0.45);
            background: rgba(62, 207, 142, 0.12);
            border-radius: 8px;
            cursor: pointer;
            color: var(--accent-color);
            font-size: 14px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 12px 20px;
            text-align: left;
            min-height: 44px;
            transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
        }

        .nav-section-toggle:hover {
            background: rgba(62, 207, 142, 0.22);
            border-color: var(--accent-color);
            color: #67f0af;
        }

        .nav-section-toggle .nav-toggle-chevron {
            width: 20px;
            height: 20px;
            stroke-width: 2.5;
            flex-shrink: 0;
            transition: transform 0.2s ease;
        }

        .nav-section-toggle[aria-expanded="true"] .nav-toggle-chevron {
            transform: rotate(180deg);
        }

        .skip-link {
            position: absolute;
            top: -48px;
            left: 12px;
            z-index: 5000;
            padding: 10px 16px;
            background: #0f2f25;
            color: #fff;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            text-decoration: none;
            transition: top 0.15s ease;
        }

        .skip-link:focus {
            top: 12px;
        }

        .nav-subsection-title {
            color: rgba(167, 195, 186, 0.9);
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            padding: 6px 20px 6px;
        }

        .nav-subsection-title--spaced {
            margin-top: 10px;
        }

        .nav-item {
            display: flex;
            align-items: center;
            padding: 12px 20px;
            color: rgba(237, 249, 244, 0.78);
            text-decoration: none;
            transition: all 0.2s;
            cursor: pointer;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
            font-size: 14px;
            pointer-events: auto;
        }

        .commander-notification-badge {
            margin-left: 8px;
            min-width: 18px;
            height: 18px;
            border-radius: 999px;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 0 6px;
            background: #3ecf8e;
            color: #0f2f25;
            border: 1px solid #7df0ba;
            font-size: 11px;
            font-weight: 700;
            line-height: 1;
        }

        .nav-item:hover, .nav-item.active {
            background: var(--sidebar-hover);
            color: var(--text-light);
        }

        .nav-item.active {
            border-right: 3px solid var(--accent-color);
            background: var(--sidebar-hover);
        }

        .nav-item-icon {
            margin-right: 12px;
            width: 32px;
            height: 32px;
            min-width: 32px;
            min-height: 32px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.1);
            transition: background 0.2s ease;
            flex-shrink: 0;
        }

        .nav-item:hover .nav-item-icon,
        .nav-item.active .nav-item-icon {
            background: rgba(255, 255, 255, 0.18);
        }

        .nav-item-icon svg {
            width: 20px;
            height: 20px;
            stroke: rgba(231, 249, 242, 0.92);
            stroke-width: 1.6;
            stroke-linecap: round;
            stroke-linejoin: round;
            fill: none;
        }

        .tier-lock {
            margin-left: auto;
            font-size: 12px;
            opacity: 0.6;
        }

        /* Main Content */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            position: relative;
            z-index: 1;
        }

        .main-header {
            background: white;
            padding: 20px 32px;
            border-bottom: 1px solid #e2e8f0;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }

        .main-header__inner {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
        }

        .sidebar-toggle {
            display: none;
            flex-shrink: 0;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            padding: 0;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            background: #f8fafc;
            color: #1e293b;
            cursor: pointer;
        }

        .sidebar-toggle:hover {
            background: #f1f5f9;
        }

        .sidebar-toggle svg {
            width: 22px;
            height: 22px;
        }

        .sidebar-backdrop {
            display: none;
        }

        .main-header h2 {
            color: #1e293b;
            font-size: 24px;
            font-weight: 600;
            flex: 1;
            min-width: 0;
        }

        .content-area {
            flex: 1;
            padding: 32px;
            overflow-y: auto;
            background: var(--main-bg);
        }

        /* Tool Content Styles */
        .tool-content {
            display: none;
            max-width: 1000px;
        }

        .tool-content.active {
            display: block;
        }

        .tool-content h4 {
            margin-top: 28px;
            color: #1f2937;
        }

        .tool-content h5 {
            margin-top: 16px;
            font-size: 16px;
            color: #1f2937;
        }

        .two-column {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 20px;
            margin: 16px 0;
        }

        .two-column ul {
            padding-left: 20px;
        }

        .scroll-table {
            margin: 16px 0;
            overflow-x: auto;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            background: #ffffff;
        }

        .scroll-table table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14px;
        }

        .scroll-table th,
        .scroll-table td {
            padding: 12px 16px;
            border-bottom: 1px solid #edf2f7;
            text-align: left;
        }

        th.sort-trigger {
            cursor: pointer;
            user-select: none;
            position: relative;
        }

        th.sorted-asc::after,
        th.sorted-desc::after {
            content: '';
            position: absolute;
            left: 50%;
            top: calc(100% + 2px);
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;
        }

        th.sorted-asc::after {
            border-bottom: 6px solid #2563eb;
        }

        th.sorted-desc::after {
            border-top: 6px solid #2563eb;
        }

        .scroll-table thead {
            background: #f8fafc;
        }

        .form-section pre {
            background: #0f172a;
            color: #f8fafc;
            padding: 16px;
            border-radius: 12px;
            overflow-x: auto;
        }

        .form-section code {
            font-family: var(--font-mono);
            font-size: 14px;
        }

        .search-trends-theme {
            display: contents;
        }

        #search-trends-container {
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        #search-trends-container .header-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 16px;
        }

        #search-trends-container .last-synced {
            font-size: 12px;
            color: #6b7280;
        }

        .kpi-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 16px;
        }

        .kpi-card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
        }

        .kpi-card .label {
            font-size: 12px;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: #6b7280;
        }

        .kpi-card .value {
            font-size: 28px;
            font-weight: 600;
            color: #1f2937;
        }

        .kpi-card .delta {
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .kpi-card .delta.delta-positive { color: #047857; }
        .kpi-card .delta.delta-negative { color: #dc2626; }

        .kpi-card canvas {
            height: 36px !important;
        }

        .filters-bar {
            display: grid;
            grid-template-columns: auto 1fr auto;
            gap: 12px;
            align-items: flex-end;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 16px;
        }

        .filters-bar label {
            font-size: 12px;
            font-weight: 600;
            color: #475569;
            display: block;
            margin-bottom: 4px;
        }

        .filters-inline {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 12px;
        }

        .filter-select, .filter-search {
            width: 100%;
            padding: 10px;
            border: 1px solid #cbd5f5;
            border-radius: 8px;
            font-size: 16px;
        }

        .filter-search {
            width: 220px;
        }

        .chart-card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
            position: relative;
            overflow: hidden;
            min-height: 320px;
        }

        .chart-card canvas {
            width: 100% !important;
            height: 260px !important;
            max-height: 260px !important;
        }

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

        .chart-legend {
            font-size: 12px;
            color: #475569;
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .legend-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            display: inline-block;
        }

        .legend-clicks { background: #3ecf8e; }
        .legend-impressions { background: #12352c; }

        .tables-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 16px;
        }

        .table-card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 16px;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
            overflow-x: auto;
        }

        .app-toast-container {
            position: fixed;
            top: 16px;
            right: 16px;
            z-index: 10060;
            display: flex;
            flex-direction: column;
            gap: 8px;
            max-width: min(360px, 92vw);
        }

        .app-toast {
            background: #12352c;
            color: #e7f5ef;
            border: 1px solid rgba(62, 207, 142, 0.45);
            border-radius: 10px;
            padding: 10px 14px;
            font-size: 14px;
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
        }

        .app-toast.error {
            background: #7f1d1d;
            border-color: #fca5a5;
            color: #fff;
        }

        .loading-skeleton {
            display: grid;
            gap: 10px;
            padding: 12px 0;
        }

        .loading-skeleton .sk-line {
            height: 12px;
            border-radius: 6px;
            background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 50%, #e2e8f0 75%);
            background-size: 200% 100%;
            animation: sk-shimmer 1.2s ease-in-out infinite;
        }

        @keyframes sk-shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        .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;
        }

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

        .table-total {
            font-size: 12px;
            color: #64748b;
        }

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

        .table-card th, .table-card td {
            font-size: 13px;
            padding: 8px 4px;
            text-align: left;
            border-bottom: 1px solid #e2e8f0;
        }

        .table-card th.numeric, .table-card td.numeric {
            text-align: right;
        }

        .grid-two {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 16px;
        }

        .insights-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(280px, 1fr));
            gap: 18px;
        }

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

        @media (max-width: 960px) {
            .insights-row {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 680px) {
            .insights-row {
                grid-template-columns: 1fr;
            }
        }

        .insights-card, .alerts-card, .analysis-card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 16px;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
            display: flex;
            flex-direction: column;
            gap: 12px;
            min-height: 280px;
        }

        .insights-card .insights-header,
        .analysis-card .insights-header,
        .alerts-card .insights-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
        }

        .insights-actions {
            display: flex;
            justify-content: flex-end;
        }

        .insights-actions .btn {
            min-width: 160px;
        }

        .analysis-section {
            margin-bottom: 12px;
        }

        .analysis-section h5 {
            margin: 0 0 6px;
            font-size: 14px;
            color: #1e293b;
        }

        .analysis-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .analysis-item {
            border: 1px solid #dbeafe;
            background: #f8fbff;
            border-radius: 6px;
            padding: 8px;
            font-size: 13px;
        }

        .analysis-item .analysis-label {
            font-weight: 600;
            color: #1d4ed8;
        }

        .analysis-item .analysis-metrics {
            color: #475569;
            margin-top: 2px;
        }

        .analysis-tip {
            margin-top: 6px;
            font-size: 12px;
            color: #1d4ed8;
        }

        .insight-actions {
            margin-top: 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .insight-task {
            display: inline-block;
            background: #e5f2ff;
            color: #0f172a;
            border-radius: 6px;
            padding: 6px 10px;
            font-size: 13px;
        }

        .insights-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .insights-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .insights-actions .btn {
            flex: 1 1 0;
            min-width: 160px;
        }

        .insights-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .insight-item {
            border: 1px solid #cbd5f5;
            border-left: 4px solid #2563eb;
            border-radius: 8px;
            padding: 12px;
            background: #f8fafc;
        }

        .insight-item .impact-high { color: #b91c1c; font-weight: 600; }
        .insight-item .impact-medium { color: #b45309; font-weight: 600; }
        .insight-item .impact-low { color: #047857; font-weight: 600; }

        .alerts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
        .alert-item { border-radius: 6px; padding: 10px 12px; font-size: 13px; }
        .alert-critical { background: #fee2e2; border: 1px solid #f87171; color: #991b1b; }
        .alert-warning { background: #fef9c3; border: 1px solid #facc15; color: #92400e; }
        .alert-positive { background: #d1fae5; border: 1px solid #10b981; color: #065f46; }
        .delta-positive { color: #047857; }
        .delta-negative { color: #b91c1c; }

        .footer-actions {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            align-items: center;
        }

        .error-banner {
            border: 1px solid #f87171;
            background: #fee2e2;
            color: #991b1b;
            border-radius: 8px;
            padding: 12px;
            font-size: 14px;
        }
        @media (max-width: 1024px) {
            .filters-bar {
                grid-template-columns: 1fr;
            }
            .filters-inline {
                grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            }
            .filters-right {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
            .filter-search { width: 100%; }
            .insights-grid { grid-template-columns: 1fr; }
        }

        @media (max-width: 640px) {
            #search-trends-container .header-row {
                flex-direction: column;
                align-items: flex-start;
            }
            .footer-actions { flex-direction: column; align-items: stretch; }
        }

        .welcome-content {
            background: white;
            padding: 40px;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            text-align: center;
        }

        .welcome-content h3 {
            color: #1e293b;
            font-size: 28px;
            margin-bottom: 16px;
        }

        .welcome-content p {
            color: #64748b;
            font-size: 16px;
            margin-bottom: 24px;
        }

        .usage-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 32px;
        }

        .usage-card {
            background: white;
            padding: 24px;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            text-align: center;
        }

        .usage-number {
            font-size: 32px;
            font-weight: bold;
            color: var(--accent-color);
            margin-bottom: 8px;
        }

        .usage-label {
            font-size: 14px;
            color: #64748b;
            font-weight: 500;
        }

        /* Form Styles */
        .form-section {
            background: white;
            padding: 32px;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            margin-bottom: 24px;
        }

        .form-section h3 {
            margin-bottom: 20px;
        }

        .form-section p {
            margin-bottom: 24px;
            line-height: 1.65;
        }

        .form-section h4 {
            margin-top: 32px;
            margin-bottom: 12px;
        }

        .form-section h4:first-of-type {
            margin-top: 20px;
        }

        .form-section ul {
            margin: 0 0 28px 20px;
            padding-left: 0;
            line-height: 1.65;
        }

        .form-section li + li {
            margin-top: 8px;
        }

        .form-group {
            margin-bottom: 24px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #374151;
            font-weight: 500;
        }

        .form-group input, .form-group select, .form-group textarea {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            font-size: 16px;
            transition: border-color 0.2s;
        }

        .static-field {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            font-size: 16px;
            background: #f8fafc;
            color: #1f2937;
        }

        .form-group input[type="checkbox"] {
            width: auto;
            min-width: 18px;
            height: 18px;
            padding: 0;
            margin: 0;
            border: 1px solid #94a3b8;
            border-radius: 4px;
            box-shadow: none;
        }

        .checkbox-row {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .checkbox-row label {
            margin: 0;
            line-height: 1.2;
            display: inline-flex;
            align-items: center;
        }

        .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
            outline: none;
            border-color: var(--accent-color);
        }

        .form-group textarea {
            height: 120px;
            resize: vertical;
            font-family: var(--font-mono);
            font-size: 16px;
        }

        .focus-slider-row {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 6px;
        }

        .focus-slider-row span {
            font-size: 14px;
            color: #64748b;
            white-space: nowrap;
        }

        .focus-slider-row input[type="range"] {
            flex: 1;
        }

        #firm-focus-display {
            margin-top: 8px;
            font-size: 14px;
            font-weight: 500;
            color: #4b5563;
        }

        .btn {
            background: var(--accent-color);
            color: white;
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 500;
            transition: all 0.2s;
        }

        .btn:hover {
            background: var(--highlight-bg);
            transform: translateY(-1px);
        }

        .btn:disabled {
            background: #9ca3af;
            cursor: not-allowed;
            transform: none;
        }

        .btn .btn-spinner {
            display: none;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(255, 255, 255, 0.6);
            border-top-color: #ffffff;
            border-radius: 50%;
            margin-left: 12px;
            animation: btn-spin 0.8s linear infinite;
        }

        .btn.loading .btn-spinner {
            display: inline-block;
        }

        .btn.loading .btn-label {
            opacity: 0.9;
        }

        .profile-save-cta-wrap {
            position: static;
            margin-top: 14px;
            padding: 12px;
            border-radius: 12px;
            border: 1px solid rgba(16, 185, 129, 0.35);
            background: rgba(16, 185, 129, 0.08);
            box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
        }

        .profile-save-cta-note {
            margin: 0 0 8px 0;
            color: #0f5132;
            font-size: 13px;
            font-weight: 600;
        }

        .profile-save-cta {
            width: 100%;
            min-height: 50px;
            font-size: 17px;
            font-weight: 700;
            letter-spacing: 0.2px;
            background: #059669;
            box-shadow: 0 10px 20px rgba(5, 150, 105, 0.28);
        }

        .profile-save-cta:hover {
            background: #047857;
        }

        @keyframes btn-spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .btn-success {
            background: var(--success-color);
        }

        .btn-success:hover {
            background: #184f3d;
        }

        /* Results Styles */
        .results {
            background: white;
            padding: 32px;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            margin-top: 24px;
            display: none;
        }

        .results.active {
            display: block;
        }

        .results h3 {
            color: #1e293b;
            margin-bottom: 20px;
            font-size: 20px;
            font-weight: 600;
            border-bottom: 2px solid var(--accent-color);
            padding-bottom: 10px;
        }

        .results pre {
            background: #f8fafc;
            color: #374151;
            padding: 24px;
            border-radius: 8px;
            overflow-x: auto;
            white-space: pre-wrap;
            border: 1px solid #e2e8f0;
            font-family: var(--font-mono);
            font-size: 14px;
            line-height: 1.6;
        }

        .loading {
            display: none;
            text-align: center;
            padding: 40px;
            color: #6b7280;
        }

        .loading.active {
            display: block;
        }

        .compliance-banner {
            background: #fef3c7;
            border: 1px solid #f59e0b;
            padding: 20px;
            margin-bottom: 24px;
            border-radius: 8px;
        }

        .compliance-banner h4 {
            color: #92400e;
            margin: 0 0 12px 0;
            font-size: 16px;
        }

        .compliance-banner p {
            color: #92400e;
            margin: 0;
            font-size: 14px;
        }

        /* Commander thinking animation */
        .dot-anim {
            display: inline-block;
            animation: dotPulse 1.4s infinite;
        }
        @keyframes dotPulse {
            0%, 20% { opacity: 0.2; }
            50% { opacity: 1; }
            80%, 100% { opacity: 0.2; }
        }

        /* Commander assistant messages — paragraphs, lists, spacing */
        .commander-msg-wrap {
            line-height: 1.55;
        }
        .commander-msg-body {
            font-size: 15px;
            color: inherit;
        }
        .commander-msg-body .commander-msg-p {
            margin: 0 0 12px;
        }
        .commander-msg-body .commander-msg-p:last-child {
            margin-bottom: 0;
        }
        .commander-msg-body ul.commander-msg-list,
        .commander-msg-body ol.commander-msg-list {
            margin: 8px 0 14px;
            padding-left: 1.35em;
        }
        .commander-msg-body ul.commander-msg-list {
            list-style-type: disc;
        }
        .commander-msg-body ol.commander-msg-list.commander-msg-ol {
            list-style-type: decimal;
        }
        .commander-msg-body li {
            margin: 6px 0;
            padding-left: 2px;
        }
        .commander-msg-body strong {
            font-weight: 700;
        }

        /* Responsive + mobile navigation */
        @media (max-width: 768px) {
            .sidebar-backdrop {
                display: none;
                position: fixed;
                inset: 0;
                z-index: 3400;
                background: rgba(15, 23, 42, 0.45);
            }

            .sidebar-backdrop.active {
                display: block;
            }

            .sidebar-toggle {
                display: inline-flex;
            }

            .sidebar {
                position: fixed;
                left: 0;
                top: 0;
                bottom: 0;
                width: min(280px, 88vw);
                max-width: 280px;
                transform: translateX(-100%);
                transition: transform 0.25s ease;
                z-index: 3500;
                box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
            }

            .sidebar.sidebar-open {
                transform: translateX(0);
            }

            .main-header {
                padding: 16px 20px;
            }

            .content-area {
                padding: 16px 20px;
            }

            #commander-kpi-strip,
            #commander-charts-row {
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
            }

            /* 44px minimum touch targets for mobile nav (WCAG 2.5.8 / Apple HIG) */
            .nav-item {
                min-height: 44px;
                padding-top: 10px;
                padding-bottom: 10px;
            }

            .nav-section-toggle {
                min-height: 44px;
                align-items: center;
            }
        }

        @media (max-width: 480px) {
            #commander-kpi-strip,
            #commander-charts-row {
                grid-template-columns: 1fr !important;
            }
        }
        
        /* Analysis Results Styling */
        .analysis-results {
            background: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 8px 10px;
            margin: 8px 0;
            font-family: var(--font-sans);
            font-size: 14px;
            line-height: 1.4;
            white-space: normal;
            overflow-x: auto;
        }
        
        .analysis-results strong {
            font-weight: bold;
            color: #1f2937;
        }

.analysis-results.seo-scorecard {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 14px 16px;
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.55;
    display: grid;
    gap: 16px;
}

.seo-scorecard-section {
    display: grid;
    gap: 8px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.seo-scorecard-section:first-child {
    border-top: none;
    padding-top: 0;
}

.seo-scorecard-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.seo-scorecard-metrics {
    display: grid;
    gap: 8px;
}

.seo-scorecard-chip {
    background: #f1f5f9;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 13px;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.seo-scorecard-chip .star-rating {
    display: inline-flex;
    align-items: center;
}

.seo-scorecard-body {
    display: grid;
    gap: 6px;
}

.seo-scorecard-body-item + .seo-scorecard-body-item {
    margin-top: 6px;
}

.seo-scorecard-body .seo-label {
    font-weight: 600;
    color: #0f172a;
}

.seo-scorecard-body p {
    margin: 0;
    color: #1f2937;
}

.seo-scorecard-list {
    margin: 0;
    padding-left: 18px;
    color: #1f2937;
}

.seo-scorecard-list li + li {
    margin-top: 4px;
}

/* TOP 3 CHANGES — action cards surfaced at the top of the scorecard */
.sc-top3-section {
    border-top: none;
    padding-top: 0;
}

.sc-top3-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: stretch;
}

.sc-top3-card {
    border: 1px solid #d1fae5;
    border-top: 3px solid #059669;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fdf9 100%);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.sc-top3-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sc-top3-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #065f46;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sc-top3-rating {
    font-size: 12px;
    font-weight: 600;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
}

.sc-top3-text {
    font-size: 14px;
    color: #0f172a;
    line-height: 1.5;
}

.sc-top3-impact {
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
    /* Pin the Impact line to the bottom so it aligns across all three cards. */
    margin-top: auto;
}

/* Score trend vs prior scorecard runs */
.sc-trend-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    padding: 12px 14px;
    margin: 12px 0 0;
    display: grid;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sc-trend-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.sc-trend-sub {
    font-size: 12.5px;
    color: #64748b;
}

.sc-trend-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sc-trend-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #1f2937;
}

.sc-trend-chip.up {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #065f46;
}

.sc-trend-chip.down {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.sc-trend-arrow {
    font-size: 11px;
}

.seo-scorecard-list.numbered {
    list-style: decimal;
    padding-left: 22px;
}

.seo-scorecard-list.numbered li {
    margin-bottom: 6px;
}

/* ── Module Visualization System ── */
.mv-kpi-strip{display:grid;gap:10px;margin-bottom:16px}
.mv-kpi-strip.cols-3{grid-template-columns:repeat(3,1fr)}
.mv-kpi-strip.cols-4{grid-template-columns:repeat(4,1fr)}
.mv-kpi-card{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:14px 16px;text-align:center;position:relative}
.mv-kpi-card .mv-kpi-value{font-size:26px;font-weight:800;color:#0f172a;line-height:1.2}
.mv-kpi-card .mv-kpi-label{font-size:11px;color:#64748b;text-transform:uppercase;letter-spacing:.04em;margin-top:2px}
.mv-kpi-card .mv-kpi-delta{display:inline-block;font-size:11px;font-weight:600;padding:1px 7px;border-radius:999px;margin-top:4px}
.mv-kpi-card .mv-kpi-delta.up,.mv-chart-card .mv-kpi-delta.up{background:#ecfdf5;color:#065f46}
.mv-kpi-card .mv-kpi-delta.down,.mv-chart-card .mv-kpi-delta.down{background:#fef2f2;color:#991b1b}
.mv-kpi-card .mv-kpi-delta.neutral,.mv-chart-card .mv-kpi-delta.neutral{background:#f1f5f9;color:#475569}
.mv-kpi-card .mv-kpi-badge{display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;margin-top:4px}
.mv-kpi-card .mv-kpi-badge.green{background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0}
.mv-kpi-card .mv-kpi-badge.amber{background:#fffbeb;color:#92400e;border:1px solid #fbbf24}
.mv-kpi-card .mv-kpi-badge.red{background:#fef2f2;color:#991b1b;border:1px solid #fca5a5}
.mv-kpi-card .mv-kpi-badge.blue{background:#eff6ff;color:#1e40af;border:1px solid #93c5fd}
.mv-kpi-card .mv-kpi-sub{font-size:11px;color:#94a3b8;margin-top:2px}
.mv-chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px}
.mv-chart-grid.cols-3{grid-template-columns:1fr 1fr 1fr}
.mv-chart-card{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:16px;min-height:200px}
.mv-chart-card.full-width{grid-column:1/-1}
.mv-chart-card h4{margin:0 0 10px;font-size:14px;font-weight:600;color:#0f172a}
.mv-chart-card canvas{max-height:280px}
.mv-progress-bar{height:18px;background:#e2e8f0;border-radius:999px;overflow:hidden;position:relative}
.mv-progress-bar .mv-progress-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,#205f4a,#3ecf8e);transition:width .6s ease}
.mv-progress-bar .mv-progress-text{position:absolute;top:0;left:0;right:0;text-align:center;font-size:11px;font-weight:600;color:#fff;line-height:18px}
.mv-stage-strip{display:flex;align-items:center;gap:0;justify-content:center}
.mv-stage-step{display:flex;flex-direction:column;align-items:center;gap:4px;flex:0 0 auto;padding:0 12px}
.mv-stage-dot{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;border:2px solid #cbd5e1;color:#94a3b8;background:#fff}
.mv-stage-dot.done{background:#065f46;border-color:#065f46;color:#fff}
.mv-stage-dot.active{background:#205f4a;border-color:#3ecf8e;color:#fff;box-shadow:0 0 0 3px rgba(62,207,142,.25)}
.mv-stage-label{font-size:10px;color:#64748b;text-transform:uppercase;letter-spacing:.03em}
.mv-stage-line{flex:1;height:2px;background:#cbd5e1;min-width:30px}
.mv-stage-line.done{background:#065f46}
.mv-checklist{list-style:none;padding:0;margin:8px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:4px 16px}
.mv-checklist li{font-size:12px;display:flex;align-items:center;gap:5px}
.mv-checklist .mv-check-yes{color:#065f46}
.mv-checklist .mv-check-no{color:#dc2626}
@media(max-width:768px){
  .mv-kpi-strip.cols-4{grid-template-columns:repeat(2,1fr)}
  .mv-chart-grid{grid-template-columns:1fr}
  .mv-checklist{grid-template-columns:1fr}
}

        .sync-note {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 4px;
        }

        @media (max-width: 1180px) {
            .insights-grid {
                grid-template-columns: repeat(2, minmax(260px, 1fr));
            }
        }

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

        .insights-layout {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            grid-template-areas:
                "alerts alerts"
                "recommendations analysis";
            gap: 20px;
        }

        .insights-card {
            grid-area: recommendations;
        }

        .analysis-card {
            grid-area: analysis;
        }

        .alerts-card {
            grid-area: alerts;
        }

        @media (max-width: 960px) {
            .insights-layout {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                grid-template-areas:
                    "alerts"
                    "recommendations"
                    "analysis";
            }
        }

        @media (max-width: 680px) {
            .insights-layout {
                grid-template-columns: 1fr;
                grid-template-areas:
                    "alerts"
                    "recommendations"
                    "analysis";
            }
        }

        .alerts-card h4 {
            font-weight: 700;
        }

        .analysis-tip {
            margin-top: 6px;
            font-size: 13px;
            color: #1e293b;
        }

        .alert-headline {
            font-weight: 700;
            display: inline-block;
        }

        .meta-card { display: grid; gap: 10px; }
        .meta-field { padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f9fbff; box-shadow: inset 0 -1px 0 #eef2ff; }
        .meta-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
        .meta-label { font-weight: 600; color: #0f172a; font-size: 15px; }
        .meta-chip { background: #e0f2fe; color: #0369a1; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
        .meta-main { font-size: 16px; color: #111827; line-height: 1.5; margin-bottom: 4px; }
        .meta-main .muted { color: #94a3b8; }
        .meta-reason { font-size: 14px; color: #1f2937; line-height: 1.6; }
        .instruction-card { padding: 16px 18px; border: 1px solid #e2e8f0; border-radius: 10px; background: #ffffff; display: grid; gap: 14px; }
        .instruction-block { margin: 0; }
        .instruction-block h4 { margin: 0 0 6px; font-size: 15px; color: #0f172a; }
        .instruction-list { margin: 0; padding-left: 18px; color: #1f2937; line-height: 1.6; font-size: 14px; }
        .instruction-list li + li { margin-top: 4px; }
        .muted { color: #94a3b8; }

        .analysis-results.meta-optimized { background: transparent; border: none; padding: 0; margin: 6px 0; }
        .meta-card { display: grid; gap: 4px; }
        .meta-field { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f9fbff; box-shadow: inset 0 -1px 0 #eef2ff; }
        .meta-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
        .meta-label { font-weight: 600; color: #0f172a; font-size: 16px; }
        .meta-main { font-size: 16px; color: #111827; line-height: 1.32; margin-bottom: 3px; }
        .meta-main .muted { color: #94a3b8; }
        .meta-chip-row { margin-bottom: 3px; }
        .meta-chip { background: #e0f2fe; color: #0369a1; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
        .meta-reason { font-size: 14px; color: #1f2937; line-height: 1.4; }
        .instruction-card { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #ffffff; display: grid; gap: 6px; }
        .instruction-block { margin: 0; }
        .instruction-block h4 { margin: 0 0 3px; font-size: 15px; color: #0f172a; }
        .instruction-list { margin: 0; padding-left: 16px; color: #1f2937; line-height: 1.45; font-size: 14px; }
        .instruction-list li + li { margin-top: 2px; }
        .muted { color: #94a3b8; }

        .analysis-results.analysis-cards { background: transparent; border: none; padding: 0; margin: 6px 0; }
        .analysis-cards .meta-card { border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; padding: 8px 12px; margin-bottom: 6px; }
        .analysis-cards .meta-card h4 { margin: 0; font-size: 15px; font-weight: 600; color: #0f172a; line-height: 1.2; }
        .analysis-cards .analysis-copy p { margin: 0 0 4px; font-size: 14px; line-height: 1.45; color: #1f2937; }
        .analysis-cards .analysis-lines { display: grid; gap: 0; margin-top: 0; }
        .analysis-cards .meta-card h4 + .analysis-lines { margin-top: 0; }
        .analysis-cards .analysis-line { position: relative; padding-left: 14px; font-size: 14px; line-height: 1.4; color: #1f2937; }
        .analysis-cards .analysis-line::before { content: '\2022'; position: absolute; left: 0; color: #0f172a; }
        .compliance-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: none; align-items: center; justify-content: center; z-index: 999999; padding: 12px; pointer-events: auto; }
        .compliance-modal.active { display: flex; }
        .compliance-modal__dialog { background: #fff; width: min(520px, 96vw); max-height: min(90vh, 90dvh); overflow-y: auto; border-radius: 12px; padding: 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); pointer-events: auto; z-index: 999999; }
        .compliance-modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
        .compliance-modal__checkbox { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: #374151; font-size: 14px; }
        .hidden { display: none !important; }
        .onboarding-toast { position: fixed; top: 20px; right: 20px; z-index: 10050; background: #12352c; color: #e7f5ef; border: 1px solid rgba(62, 207, 142, 0.45); border-radius: 12px; padding: 10px 14px; box-shadow: 0 16px 34px rgba(0,0,0,0.24); font-size: 13px; max-width: 360px; }
        .driver-active-element { border-radius: 12px; }
        /* driver.css sets .driver-active * { pointer-events: none }; ensure the dimmed overlay still receives clicks to close (Mac Chrome / layered UI). */
        body.driver-active .driver-overlay,
        body.driver-active .driver-overlay path {
            pointer-events: auto !important;
        }
        .driver-popover { background: #ffffff; border: 1px solid #d1d5db; border-radius: 12px; box-shadow: 0 20px 60px rgba(18, 53, 44, 0.15); color: #1f2937; max-width: 360px; }
        .driver-popover-title { color: #12352c; font-size: 16px; font-weight: 700; }
        .driver-popover-description { color: #374151; font-size: 14px; line-height: 1.55; }
        .driver-popover-progress-text { color: #6b7280; font-size: 12px; }
        .driver-popover-close-btn { color: #64748b; }
        .driver-popover-footer button.driver-popover-next-btn {
            min-height: 36px;
            padding: 0 15px;
            border-radius: 10px;
            border: 1px solid #14532d;
            background: #15803d;
            color: #ffffff;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
            font-size: 15px;
            font-weight: 600;
            letter-spacing: 0;
            line-height: 1;
            text-shadow: none;
            box-shadow: none;
            filter: none;
            transform: none;
            transition: background 0.14s ease, border-color 0.14s ease;
            -webkit-font-smoothing: auto;
            text-rendering: auto;
            font-feature-settings: "liga" 0, "kern" 1;
            appearance: none;
            -webkit-appearance: none;
        }
        .driver-popover-footer button.driver-popover-next-btn:hover {
            background: #166534;
            border-color: #14532d;
        }
        .driver-popover-footer button.driver-popover-next-btn:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22);
        }
        .driver-popover-footer button.driver-popover-prev-btn {
            min-height: 36px;
            padding: 0 12px;
            border-radius: 10px;
            border: 1px solid #cbd5e1;
            background: #ffffff;
            color: #334155;
            font-size: 14px;
            font-weight: 600;
            line-height: 1;
            transition: background 0.14s ease, border-color 0.14s ease;
            appearance: none;
            -webkit-appearance: none;
        }
        .driver-popover-footer button.driver-popover-prev-btn:hover {
            background: #f8fafc;
            border-color: #94a3b8;
        }
        .driver-popover-footer button.driver-popover-close-btn { border-radius: 8px; color: #64748b; }
        .personalization-card {
            background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
            border: 1px solid #34d399;
            border-radius: 12px;
            padding: 14px 16px;
            margin: 0 0 16px;
            box-shadow: 0 8px 20px rgba(16, 185, 129, 0.12);
        }
        .personalization-card h4 {
            margin: 0 0 6px;
            color: #065f46;
            font-size: 15px;
            font-weight: 700;
            letter-spacing: 0.01em;
        }
        .personalization-card p {
            margin: 0;
            color: #065f46;
            font-size: 13px;
            line-height: 1.5;
        }
        .personalization-card ul {
            margin: 8px 0 0 18px;
            color: #065f46;
            font-size: 13px;
            line-height: 1.45;
        }
        .guided-gsc-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
        .guided-gsc-actions button, .guided-gsc-actions a { font-size: 12px; border-radius: 8px; padding: 6px 10px; border: 1px solid #cbd5e1; background: #f8fafc; color: #0f172a; text-decoration: none; cursor: pointer; }
        .guided-gsc-actions .guided-gsc-primary { background: #3ecf8e; border-color: #32b877; color: #12352c; font-weight: 600; }
        .guided-gsc-list { margin: 8px 0 0 18px; padding: 0; color: #334155; }
        .guided-gsc-list li { margin-bottom: 6px; }
        .btn.primary { background: #3ecf8e; color: #0f172a; border: 1px solid #32b877; }
        .btn.primary:hover { background: #34c983; }
        .education-module { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 14px; padding: 22px; box-shadow: 0 8px 22px rgba(0,0,0,0.05); }
        .education-module h3 { margin-top: 0; color: #0f172a; }
        .education-module h4 { margin-top: 18px; color: #0f172a; }
        .education-module h5 { margin-top: 12px; color: #0f172a; }
        .education-module p { color: #1f2937; }
        .education-module ol, .education-module ul { margin-top: 8px; }
        .education-module .scroll-table { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,0.04); }
        .education-module .two-column { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 8px; }
        .education-module .two-column ul { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; }
        .education-actions { margin-top: 12px; margin-bottom: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
        .education-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0; }
        .education-card { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
        .education-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #0f172a; background: #d1fae5; border: 1px solid #a7f3d0; }
        .education-callout { background: #ecfeff; border: 1px solid #a5f3fc; border-radius: 12px; padding: 12px 14px; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
        .education-callout.danger { background: #fff7ed; border-color: #fdba74; }
        .education-callout.success { background: #f0fdf4; border-color: #bbf7d0; }
        .education-mini-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
        .education-mini-table td { border: 1px solid #e5e7eb; padding: 8px 10px; font-size: 13px; }
        .education-mini-table td:first-child { background: #f8fafc; font-weight: 600; width: 38%; }
        @media (max-width: 768px) {
            .driver-popover { max-width: min(92vw, 360px); }
            .onboarding-toast { right: 12px; left: 12px; max-width: none; }
        }
